Closed nicwatson closed 2 years ago
Hmm, odd. I've never encountered this issue myself. Regardless, will fix next update.
I've got the same problem. It's still not updated :(
Hmm, odd. I've never encountered this issue myself. Regardless, will fix next update.
Btw, you did encounter this issue in your own gif (on the curseforge page of your mod)!
To reproduce:
Place a placer. Put a button on the placer. Put a stack of 64 cobblestones in the placer inventory. Press the button. Observe that one block is placed, but the size of the stack in the placer is 62.
This is due to the fact that the placer block uses Mojang's
BlockPlacementDispenserBehavior
which is buggy. Specifically, after invokingBlockItem.place()
(and passing it anAutomaticItemPlacementContext
with a reference to the ItemStack, it callssubtractAmount(1)
on the same ItemStack, butplace()
already does that itself. Consequently, two subtractions are carried out.This isn't really Redstone Bits' fault but overriding
BlockPlacementDispenserBehavior.dispenseStack()
is probably necessary to avoid the trap.