use of mods.railcraft.common.blocks.machine.MultiBlockPattern in project Railcraft by Railcraft.
the class TileCokeOven method placeCokeOven.
public static void placeCokeOven(World world, BlockPos pos, int creosote, ItemStack input, ItemStack output) {
MultiBlockPattern pattern = TileCokeOven.patterns.get(0);
Map<Character, IBlockState> blockMapping = new HashMap<Character, IBlockState>();
blockMapping.put('B', EnumMachineAlpha.COKE_OVEN.getDefaultState());
blockMapping.put('W', EnumMachineAlpha.COKE_OVEN.getDefaultState());
TileEntity tile = pattern.placeStructure(world, pos, blockMapping);
if (tile instanceof TileCokeOven) {
TileCokeOven master = (TileCokeOven) tile;
master.tank.setFluid(Fluids.CREOSOTE.get(creosote));
master.inv.setInventorySlotContents(TileCokeOven.SLOT_INPUT, input);
master.inv.setInventorySlotContents(TileCokeOven.SLOT_OUTPUT, output);
}
}
Aggregations