From 5d9a86bf56af621d5bd8ce825b768d3e9d09747e Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sun, 20 Sep 2015 21:00:19 +0200 Subject: [PATCH] Fixed what I did --- .../ellpeck/actuallyadditions/network/PacketCheckBook.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/ellpeck/actuallyadditions/network/PacketCheckBook.java b/src/main/java/ellpeck/actuallyadditions/network/PacketCheckBook.java index 6da0fb309..12009aa17 100644 --- a/src/main/java/ellpeck/actuallyadditions/network/PacketCheckBook.java +++ b/src/main/java/ellpeck/actuallyadditions/network/PacketCheckBook.java @@ -17,9 +17,8 @@ import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import ellpeck.actuallyadditions.util.PersistantVariables; import io.netty.buffer.ByteBuf; +import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.world.World; -import net.minecraftforge.common.DimensionManager; public class PacketCheckBook implements IMessage{ @@ -36,13 +35,11 @@ public class PacketCheckBook implements IMessage{ @Override public void fromBytes(ByteBuf buf){ - World world = DimensionManager.getWorld(buf.readInt()); - this.player = (EntityPlayer)world.getEntityByID(buf.readInt()); + this.player = (EntityPlayer)Minecraft.getMinecraft().theWorld.getEntityByID(buf.readInt()); } @Override public void toBytes(ByteBuf buf){ - buf.writeInt(this.player.worldObj.provider.dimensionId); buf.writeInt(this.player.getEntityId()); }