RFTools

RFTools

74M Downloads

Builder voids failed placements

josephcsible opened this issue ยท 2 comments

commented

We currently call consumeBlock unconditionally, then use the returned stack in placeStackAt. If placeStackAt fails to place the item for whatever reason, it gets left in the ItemStack, but we forget to put this back where it came from, so it gets voided.

commented

But can placeStackAt() still fail? Normally before doing consumeBlock the builder will have done various checks to ensure that placement works

commented

Yeah, there's still a couple of edge cases where that can happen. For example, trying to plant sugar cane on a block that isn't next to water.