Search in sources :

Example 1 with ModuleDataVectorArt

use of mcjty.rftoolscontrol.rftoolssupport.ModuleDataVectorArt in project RFToolsControl by McJty.

the class VectorArtScreenModule method getData.

@Override
public ModuleDataVectorArt 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;
        return new ModuleDataVectorArt(processor.getGfxOps(), processor.getOrderedOps());
    }
    return null;
}
Also used : ProcessorTileEntity(mcjty.rftoolscontrol.blocks.processor.ProcessorTileEntity) TileEntity(net.minecraft.tileentity.TileEntity) ProcessorTileEntity(mcjty.rftoolscontrol.blocks.processor.ProcessorTileEntity) ModuleDataVectorArt(mcjty.rftoolscontrol.rftoolssupport.ModuleDataVectorArt) Block(net.minecraft.block.Block) World(net.minecraft.world.World)

Aggregations

ProcessorTileEntity (mcjty.rftoolscontrol.blocks.processor.ProcessorTileEntity)1 ModuleDataVectorArt (mcjty.rftoolscontrol.rftoolssupport.ModuleDataVectorArt)1 Block (net.minecraft.block.Block)1 TileEntity (net.minecraft.tileentity.TileEntity)1 World (net.minecraft.world.World)1