Merge pull request #5266 from NovaStarter/mc1.18/dev

Fix Deployers not using item's useOn method
This commit is contained in:
simibubi 2023-09-20 10:02:27 +02:00 committed by GitHub
commit a6a3c72538
Failed to generate hash of commit

View file

@ -300,9 +300,6 @@ public class DeployerHandler {
return; return;
if (useItem == DENY) if (useItem == DENY)
return; return;
if (item instanceof BlockItem && !(item instanceof CartAssemblerBlockItem)
&& !clickedState.canBeReplaced(new BlockPlaceContext(itemusecontext)))
return;
// Reposition fire placement for convenience // Reposition fire placement for convenience
if (item == Items.FLINT_AND_STEEL) { if (item == Items.FLINT_AND_STEEL) {
@ -324,6 +321,10 @@ public class DeployerHandler {
player.placedTracks = true; player.placedTracks = true;
return; return;
} }
if (item instanceof BlockItem && !(item instanceof CartAssemblerBlockItem)
&& !clickedState.canBeReplaced(new BlockPlaceContext(itemusecontext)))
return;
if (item == Items.ENDER_PEARL) if (item == Items.ENDER_PEARL)
return; return;
if (AllItemTags.DEPLOYABLE_DRINK.matches(item)) if (AllItemTags.DEPLOYABLE_DRINK.matches(item))