Create icon indicating copy to clipboard operation
Create copied to clipboard

fix deployers placing blocks when they shouldn't

Open Larsianer opened this issue 1 year ago • 3 comments

This should fix #5674. I don't know if this is the correct way to do things, but before this fix, the deployer could right click blocks and therefore place them directly in front of itself.

Larsianer avatar Jan 29 '24 16:01 Larsianer

This looks like the right place to fix the issue. However, the proposed fix will prevent deployers from placing blocks into source liquid blocks, since they are instance of BlockItem but not AirBlock. It would be preferable to add a check for whether (world.getBlockState(targetPos).getBlock() is an instance of BlockLiquid or IFluidBlock, in addition to Air.

zimboptoo avatar Apr 12 '24 08:04 zimboptoo

Thanks for your suggestion! I implemented it with

world.getBlockState(targetPos).getMaterial().isLiquid()

because your exact suggestion did not work for me.

Larsianer avatar Apr 13 '24 12:04 Larsianer

Can we have this merged into the next release?

Andy608 avatar May 08 '24 03:05 Andy608

Thanks for the PR Looks like this happened as a result of another PR fixing a different set of issues. Further investigation might be useful if it leads to both issues being solved. For now the revert is taking priority

simibubi avatar Jul 25 '24 17:07 simibubi