use of mcjty.rftools.blocks.screens.network.PacketGetScreenData in project RFTools by McJty.
the class ScreenRenderer method updateScreenData.
private Map<Integer, IModuleData> updateScreenData(ScreenTileEntity screenTileEntity) {
long millis = System.currentTimeMillis();
if ((millis - screenTileEntity.lastTime > 500) && screenTileEntity.isNeedsServerData()) {
screenTileEntity.lastTime = millis;
GlobalCoordinate pos = new GlobalCoordinate(screenTileEntity.getPos(), screenTileEntity.getWorld().provider.getDimension());
RFToolsMessages.INSTANCE.sendToServer(new PacketGetScreenData(RFTools.MODID, pos, millis));
}
GlobalCoordinate key = new GlobalCoordinate(screenTileEntity.getPos(), screenTileEntity.getWorld().provider.getDimension());
Map<Integer, IModuleData> screenData = ScreenTileEntity.screenData.get(key);
if (screenData == null) {
screenData = Collections.emptyMap();
}
return screenData;
}
Aggregations