Fix Client/Server issues.

This commit is contained in:
Ben Spiers 2014-07-07 23:33:11 +01:00
parent 83ff761ec4
commit 4e32a77ac8
2 changed files with 9 additions and 5 deletions

View file

@ -560,6 +560,13 @@ public class ClientProxy extends CommonProxy
@Override
public EntityPlayer getPlayer(MessageContext context)
{
return Minecraft.getMinecraft().thePlayer;
if(FMLCommonHandler.instance().getEffectiveSide().isServer())
{
return context.getServerHandler().playerEntity;
}
else
{
return Minecraft.getMinecraft().thePlayer;
}
}
}

View file

@ -49,10 +49,7 @@ public class PacketDataRequest implements IMessageHandler<DataRequestMessage, IM
}
}
if(player instanceof EntityPlayerMP)
{
Mekanism.packetHandler.sendTo(new TileEntityMessage(Coord4D.get(tileEntity), ((ITileNetwork)tileEntity).getNetworkedData(new ArrayList())), (EntityPlayerMP)player);
}
Mekanism.packetHandler.sendTo(new TileEntityMessage(Coord4D.get(tileEntity), ((ITileNetwork)tileEntity).getNetworkedData(new ArrayList())), (EntityPlayerMP)player);
}
return null;