Search in sources :

Example 1 with MultiblockShapeInfo

use of gregtech.integration.jei.multiblock.MultiblockShapeInfo in project GregTech by GregTechCE.

the class LargeTurbineInfo method getMatchingShapes.

@Override
public List<MultiblockShapeInfo> getMatchingShapes() {
    MetaTileEntityHolder holder = new MetaTileEntityHolder();
    holder.setMetaTileEntity(MetaTileEntities.ROTOR_HOLDER[2]);
    holder.getMetaTileEntity().setFrontFacing(EnumFacing.WEST);
    ItemStack rotorStack = MetaItems.TURBINE_ROTOR.getStackForm();
    // noinspection ConstantConditions
    TurbineRotorBehavior.getInstanceFor(rotorStack).setPartMaterial(rotorStack, Materials.Darmstadtium);
    ((MetaTileEntityRotorHolder) holder.getMetaTileEntity()).getRotorInventory().setStackInSlot(0, rotorStack);
    MultiblockShapeInfo.Builder shapeInfo = MultiblockShapeInfo.builder().aisle("CCCC", "CIOC", "CCCC").aisle("CCCC", "R##D", "CCCC").aisle("CCCC", "CSCC", "CCCC").where('S', turbine, EnumFacing.SOUTH).where('C', turbine.turbineType.casingState).where('R', new BlockInfo(MetaBlocks.MACHINE.getDefaultState(), holder)).where('D', MetaTileEntities.ENERGY_OUTPUT_HATCH[GTValues.EV], EnumFacing.EAST).where('#', Blocks.AIR.getDefaultState()).where('I', MetaTileEntities.FLUID_IMPORT_HATCH[GTValues.HV], EnumFacing.NORTH);
    if (turbine.turbineType.hasOutputHatch) {
        shapeInfo.where('O', MetaTileEntities.FLUID_EXPORT_HATCH[GTValues.EV], EnumFacing.NORTH);
    } else {
        shapeInfo.where('O', turbine.turbineType.casingState);
    }
    return Lists.newArrayList(shapeInfo.build());
}
Also used : MetaTileEntityHolder(gregtech.api.metatileentity.MetaTileEntityHolder) BlockInfo(gregtech.api.util.BlockInfo) MultiblockShapeInfo(gregtech.integration.jei.multiblock.MultiblockShapeInfo) ItemStack(net.minecraft.item.ItemStack)

Aggregations

MetaTileEntityHolder (gregtech.api.metatileentity.MetaTileEntityHolder)1 BlockInfo (gregtech.api.util.BlockInfo)1 MultiblockShapeInfo (gregtech.integration.jei.multiblock.MultiblockShapeInfo)1 ItemStack (net.minecraft.item.ItemStack)1