From 084d240f050b1c452d0592baf8ee6a5c3f1f8d34 Mon Sep 17 00:00:00 2001 From: grimmauld Date: Thu, 17 Jun 2021 14:01:20 +0200 Subject: [PATCH] Fix #1801 --- .../components/deployer/DeployerHandler.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerHandler.java index 620b6b0ec..081efd0ff 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerHandler.java @@ -12,6 +12,8 @@ import com.simibubi.create.content.contraptions.components.structureMovement.mou import net.minecraft.block.DoublePlantBlock; +import net.minecraft.entity.merchant.villager.AbstractVillagerEntity; +import net.minecraft.entity.merchant.villager.VillagerEntity; import net.minecraft.state.properties.DoubleBlockHalf; import org.apache.commons.lang3.tuple.Pair; @@ -165,8 +167,14 @@ public class DeployerHandler { } if (cancelResult == null) { if (entity.processInitialInteract(player, hand) - .isAccepted()) + .isAccepted()){ + if (entity instanceof AbstractVillagerEntity) { + AbstractVillagerEntity villager = ((AbstractVillagerEntity) entity); + if (villager.getCustomer() instanceof DeployerFakePlayer) + villager.setCustomer(null); + } success = true; + } else if (entity instanceof LivingEntity && stack.useOnEntity(player, (LivingEntity) entity, hand) .isAccepted()) success = true;