Fix Client/Server issues.
This commit is contained in:
parent
83ff761ec4
commit
4e32a77ac8
2 changed files with 9 additions and 5 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue