Fix #1801
This commit is contained in:
parent
785242d5b3
commit
084d240f05
1 changed files with 9 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue