use of mcjty.rftoolscontrol.rftoolssupport.ModuleDataLog in project RFToolsControl by McJty.
the class ConsoleScreenModule method getData.
@Override
public ModuleDataLog getData(IScreenDataHelper h, World worldObj, long millis) {
World world = DimensionManager.getWorld(dim);
if (world == null) {
return null;
}
if (!WorldTools.chunkLoaded(world, coordinate)) {
return null;
}
Block block = world.getBlockState(coordinate).getBlock();
if (block != ModBlocks.processorBlock) {
return null;
}
TileEntity te = world.getTileEntity(coordinate);
if (te instanceof ProcessorTileEntity) {
ProcessorTileEntity processor = (ProcessorTileEntity) te;
List<String> lastMessages = processor.getLastMessages(12);
return new ModuleDataLog(lastMessages);
}
return null;
}
Aggregations