mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 23:28:35 +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 cpw.mods.fml.relauncher.SideOnly;
|
||||||
import ellpeck.actuallyadditions.util.PersistantVariables;
|
import ellpeck.actuallyadditions.util.PersistantVariables;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraftforge.common.DimensionManager;
|
|
||||||
|
|
||||||
public class PacketCheckBook implements IMessage{
|
public class PacketCheckBook implements IMessage{
|
||||||
|
|
||||||
|
@ -36,13 +35,11 @@ public class PacketCheckBook implements IMessage{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fromBytes(ByteBuf buf){
|
public void fromBytes(ByteBuf buf){
|
||||||
World world = DimensionManager.getWorld(buf.readInt());
|
this.player = (EntityPlayer)Minecraft.getMinecraft().theWorld.getEntityByID(buf.readInt());
|
||||||
this.player = (EntityPlayer)world.getEntityByID(buf.readInt());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void toBytes(ByteBuf buf){
|
public void toBytes(ByteBuf buf){
|
||||||
buf.writeInt(this.player.worldObj.provider.dimensionId);
|
|
||||||
buf.writeInt(this.player.getEntityId());
|
buf.writeInt(this.player.getEntityId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue