diff --git a/src/main/java/makeo/gadomancy/common/blocks/tiles/TileInfusionClaw.java b/src/main/java/makeo/gadomancy/common/blocks/tiles/TileInfusionClaw.java index 7bcec66..e315572 100644 --- a/src/main/java/makeo/gadomancy/common/blocks/tiles/TileInfusionClaw.java +++ b/src/main/java/makeo/gadomancy/common/blocks/tiles/TileInfusionClaw.java @@ -10,6 +10,9 @@ import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; +import net.minecraft.network.NetHandlerPlayServer; +import net.minecraft.network.NetworkManager; +import net.minecraft.network.Packet; import net.minecraft.server.MinecraftServer; import net.minecraft.server.management.ItemInWorldManager; import net.minecraft.world.World; @@ -275,6 +278,14 @@ private void performClickBlock() { } AdvancedFakePlayer fakePlayer = new AdvancedFakePlayer((WorldServer) world, TileInfusionClaw.FAKE_UUID); + fakePlayer.playerNetServerHandler = new NetHandlerPlayServer( + MinecraftServer.getServer(), + new NetworkManager(false), + fakePlayer) { + + @Override + public void sendPacket(Packet discard) {} + }; this.loadResearch(fakePlayer); if (behavior.hasVisCost()) { @@ -287,6 +298,7 @@ private void performClickBlock() { if (this.im == null) { this.im = new ItemInWorldManager(world); + this.im.thisPlayerMP = fakePlayer; } else { this.im.setWorld((WorldServer) world); } @@ -465,4 +477,5 @@ public boolean canInsertItem(int slot, ItemStack stack, int side) { public boolean canExtractItem(int slot, ItemStack stack, int side) { return (!this.isLocked() || !this.hasSufficientVis()) && this.canInsertItem(slot, stack, side); } + }