use of mcjty.rftools.api.screens.data.IModuleDataString in project RFTools by McJty.
the class MachineInformationScreenModule method getData.
@Override
public IModuleDataString getData(IScreenDataHelper helper, World worldObj, long millis) {
World world = DimensionManager.getWorld(dim);
if (world == null) {
return null;
}
if (!RFToolsTools.chunkLoaded(world, coordinate)) {
return null;
}
TileEntity te = world.getTileEntity(coordinate);
if (!(te instanceof MachineInformation)) {
return null;
}
MachineInformation information = (MachineInformation) te;
String info;
if (tag < 0 || tag >= information.getTagCount()) {
info = "[BAD TAG]";
} else {
info = information.getData(tag, millis);
}
return helper.createString(info);
}
Aggregations