use of mods.railcraft.common.blocks.machine.MultiBlockPattern in project Railcraft by Railcraft.
the class TileBoilerFireboxSolid method placeSolidBoiler.
public static void placeSolidBoiler(World world, BlockPos pos, int width, int height, boolean highPressure, int water, List<ItemStack> fuel) {
for (MultiBlockPattern pattern : TileBoiler.patterns) {
if (pattern.getPatternHeight() - 3 == height && pattern.getPatternWidthX() - 2 == width) {
Map<Character, IBlockState> blockMapping = new HashMap<Character, IBlockState>();
blockMapping.put('F', EnumMachineBeta.BOILER_FIREBOX_SOLID.getDefaultState());
blockMapping.put('H', highPressure ? EnumMachineBeta.BOILER_TANK_HIGH_PRESSURE.getDefaultState() : EnumMachineBeta.BOILER_TANK_LOW_PRESSURE.getDefaultState());
TileEntity tile = pattern.placeStructure(world, pos, blockMapping);
if (tile instanceof TileBoilerFireboxSolid) {
TileBoilerFireboxSolid master = (TileBoilerFireboxSolid) tile;
master.tankWater.setFluid(Fluids.WATER.get(water));
InventoryMapper masterFuel = InventoryMapper.make(master.inventory, SLOT_BURN, 4);
for (ItemStack stack : fuel) {
InvTools.moveItemStack(stack, masterFuel);
}
}
return;
}
}
}
use of mods.railcraft.common.blocks.machine.MultiBlockPattern in project Railcraft by Railcraft.
the class TileTankWater method placeWaterTank.
public static void placeWaterTank(World world, BlockPos pos, int water) {
MultiBlockPattern pattern = TileTankWater.patterns.get(0);
Map<Character, IBlockState> blockMapping = new HashMap<Character, IBlockState>();
blockMapping.put('B', EnumMachineAlpha.TANK_WATER.getDefaultState());
TileEntity tile = pattern.placeStructure(world, pos, blockMapping);
if (tile instanceof TileTankWater) {
TileTankWater master = (TileTankWater) tile;
master.tank.setFluid(Fluids.WATER.get(water));
}
}
use of mods.railcraft.common.blocks.machine.MultiBlockPattern in project Railcraft by Railcraft.
the class TileFluxTransformer method placeFluxTransformer.
public static void placeFluxTransformer(World world, BlockPos pos) {
MultiBlockPattern pattern = TileFluxTransformer.patterns.get(0);
Map<Character, IBlockState> blockMapping = new HashMap<Character, IBlockState>();
blockMapping.put('B', EnumMachineEpsilon.FLUX_TRANSFORMER.getDefaultState());
pattern.placeStructure(world, pos, blockMapping);
}
use of mods.railcraft.common.blocks.machine.MultiBlockPattern in project Railcraft by Railcraft.
the class TileTankBase method placeSteelTank.
public static void placeSteelTank(World world, BlockPos pos, int patternIndex, FluidStack fluid) {
MultiBlockPattern pattern = TileTankBase.patterns.get(patternIndex);
Map<Character, IBlockState> blockMapping = new HashMap<Character, IBlockState>();
blockMapping.put('B', EnumMachineBeta.TANK_STEEL_WALL.getDefaultState());
blockMapping.put('W', EnumMachineBeta.TANK_STEEL_GAUGE.getDefaultState());
TileEntity tile = pattern.placeStructure(world, pos, blockMapping);
if (tile instanceof TileTankBase) {
TileTankBase master = (TileTankBase) tile;
master.tank.setFluid(fluid);
}
}
use of mods.railcraft.common.blocks.machine.MultiBlockPattern in project Railcraft by Railcraft.
the class TileBlastFurnace method placeBlastFurnace.
public static void placeBlastFurnace(World world, BlockPos pos, ItemStack input, ItemStack output, ItemStack fuel) {
MultiBlockPattern pattern = TileBlastFurnace.patterns.get(0);
Map<Character, IBlockState> blockMapping = new HashMap<Character, IBlockState>();
blockMapping.put('B', EnumMachineAlpha.BLAST_FURNACE.getDefaultState());
blockMapping.put('W', EnumMachineAlpha.BLAST_FURNACE.getDefaultState());
TileEntity tile = pattern.placeStructure(world, pos, blockMapping);
if (tile instanceof TileBlastFurnace) {
TileBlastFurnace master = (TileBlastFurnace) tile;
master.inv.setInventorySlotContents(TileBlastFurnace.SLOT_INPUT, input);
master.inv.setInventorySlotContents(TileBlastFurnace.SLOT_OUTPUT, output);
master.inv.setInventorySlotContents(TileBlastFurnace.SLOT_FUEL, fuel);
}
}
Aggregations