use of mcjty.rftoolscontrol.blocks.processor.ProcessorTileEntity in project RFToolsControl by McJty.
the class VariableScreenModule method getData.
@Override
public ModuleDataVariable 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;
}
if (varIdx < 0 || varIdx >= ProcessorTileEntity.MAXVARS) {
return null;
}
TileEntity te = world.getTileEntity(coordinate);
if (te instanceof ProcessorTileEntity) {
ProcessorTileEntity processor = (ProcessorTileEntity) te;
Parameter parameter = processor.getParameter(varIdx);
return new ModuleDataVariable(parameter);
}
return null;
}
use of mcjty.rftoolscontrol.blocks.processor.ProcessorTileEntity in project RFToolsControl by McJty.
the class CraftingStationTileEntity method getCraftableItems.
public ItemStackList getCraftableItems() {
ItemStackList items = ItemStackList.create();
for (BlockPos p : processorList) {
TileEntity te = getWorld().getTileEntity(p);
if (te instanceof ProcessorTileEntity) {
ProcessorTileEntity processor = (ProcessorTileEntity) te;
processor.getCraftableItems(items);
}
}
return items;
}
Aggregations