mirror of
https://github.com/Creators-of-Create/Create.git
synced 2024-12-29 08:27:03 +01:00
Fix deployer duplicating Quark pickarang
This commit is contained in:
parent
073e3980ee
commit
428dda58e7
1 changed files with 5 additions and 3 deletions
|
@ -26,7 +26,6 @@ import net.minecraft.entity.LivingEntity;
|
||||||
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||||
import net.minecraft.entity.item.ItemEntity;
|
import net.minecraft.entity.item.ItemEntity;
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
import net.minecraft.entity.player.PlayerEntity;
|
||||||
import net.minecraft.entity.player.ServerPlayerEntity;
|
|
||||||
import net.minecraft.fluid.Fluid;
|
import net.minecraft.fluid.Fluid;
|
||||||
import net.minecraft.fluid.Fluids;
|
import net.minecraft.fluid.Fluids;
|
||||||
import net.minecraft.inventory.EquipmentSlotType;
|
import net.minecraft.inventory.EquipmentSlotType;
|
||||||
|
@ -294,7 +293,10 @@ public class DeployerHandler {
|
||||||
itemUseWorld = new ItemUseWorld(world, face, pos);
|
itemUseWorld = new ItemUseWorld(world, face, pos);
|
||||||
|
|
||||||
ActionResult<ItemStack> onItemRightClick = item.onItemRightClick(itemUseWorld, player, hand);
|
ActionResult<ItemStack> onItemRightClick = item.onItemRightClick(itemUseWorld, player, hand);
|
||||||
|
ItemStack resultStack = onItemRightClick.getResult();
|
||||||
|
if (resultStack != stack || resultStack.getCount() != stack.getCount() || resultStack.getUseDuration() > 0 || resultStack.getDamage() != stack.getDamage()) {
|
||||||
player.setHeldItem(hand, onItemRightClick.getResult());
|
player.setHeldItem(hand, onItemRightClick.getResult());
|
||||||
|
}
|
||||||
|
|
||||||
CompoundNBT tag = stack.getTag();
|
CompoundNBT tag = stack.getTag();
|
||||||
if (tag != null && stack.getItem() instanceof SandPaperItem && tag.contains("Polishing"))
|
if (tag != null && stack.getItem() instanceof SandPaperItem && tag.contains("Polishing"))
|
||||||
|
@ -349,7 +351,7 @@ public class DeployerHandler {
|
||||||
interactionManager.world.updateComparatorOutputLevel(clickedPos, state.getBlock());
|
interactionManager.world.updateComparatorOutputLevel(clickedPos, state.getBlock());
|
||||||
}
|
}
|
||||||
|
|
||||||
CriteriaTriggers.BEE_NEST_DESTROYED.test((ServerPlayerEntity) interactionManager.player,
|
CriteriaTriggers.BEE_NEST_DESTROYED.test(interactionManager.player,
|
||||||
state.getBlock(), heldItem, beehivetileentity.getBeeCount());
|
state.getBlock(), heldItem, beehivetileentity.getBeeCount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue