mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 15:18:34 +01:00
Fixed what I did
This commit is contained in:
parent
163fcac786
commit
5d9a86bf56
1 changed files with 2 additions and 5 deletions
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue