Building Bricks

Building Bricks

610k Downloads

Make the algorithm the trowel uses to consume blocks smarter

hea3ven opened this issue ยท 3 comments

commented
commented

Yeah, I just wanted something that worked first. Right now it just consumes from the first block of the same material that it finds.

My idea is to make it first try to match the same exact block, if that fails start consuming the smaller pieces until enough has been consumed.

Also, you don't need to craft them together, say if you have a slab + a step, you will be able to place a stair with the trowel.

commented

Sounds like a good plan, I can't think of a scenario where one would like to use large blocks before the smaller. Keeping inventory as clean as possible should always be prioritized.

I never tried using up all resources before posting that, tried it now, seems to work fine!

commented

Not much of a description here, but I guess one of my concerns fits in this thread. At least I will give a few thoughts on the trowel algorithm.

When placing a block, like the slab, the other half is put in inventory. However, next time I place a slab I think it should use the leftover from last time and not split a new block. As it works now, every time I place a block I get an extra slab in the inventory.

Placing stairs gives me steps in inventory. Perhaps the same thing there, but not as obvious as the first one. I haven't decided, but since they can't be placed within the same block space to make a new stair, so I would have to craft them into blocks again and start all over again....