Package mods.railcraft.common.blocks.machine

Examples of mods.railcraft.common.blocks.machine.MultiBlockPattern


        if (Game.isHost(worldObj))
            worldObj.createExplosion(null, xCoord, yCoord, zCoord, 5f + 0.1f * getNumTanks(), true);
    }

    public int getNumTanks() {
        MultiBlockPattern pattern = getPattern();
        return ((BoilerPattern) pattern).numTanks;
    }
View Full Code Here


        MultiBlockPattern pattern = getPattern();
        return ((BoilerPattern) pattern).numTanks;
    }

    public float getMaxHeat() {
        MultiBlockPattern pattern = getPattern();
        return ((BoilerPattern) pattern).maxHeat;
    }
View Full Code Here

        MultiBlockPattern pattern = getPattern();
        return ((BoilerPattern) pattern).maxHeat;
    }

    public int getTicksPerConversion() {
        MultiBlockPattern pattern = getPattern();
        return ((BoilerPattern) pattern).ticksPerCycle;
    }
View Full Code Here

        MultiBlockPattern pattern = getPattern();
        return ((BoilerPattern) pattern).ticksPerCycle;
    }

    public int getSteamCapacityPerTank() {
        MultiBlockPattern pattern = getPattern();
        return ((BoilerPattern) pattern).steamCapacity;
    }
View Full Code Here

* @author CovertJaguar <http://www.railcraft.info>
*/
public class TileRockCrusher extends TileMultiBlockInventory implements IPowerReceptor, IHasWork, ISidedInventory {

    public static void placeRockCrusher(World world, int x, int y, int z, int patternIndex, List<ItemStack> input, List<ItemStack> output) {
        MultiBlockPattern pattern = TileRockCrusher.patterns.get(patternIndex);
        Map<Character, Integer> blockMapping = new HashMap<Character, Integer>();
        blockMapping.put('B', EnumMachineAlpha.ROCK_CRUSHER.ordinal());
        blockMapping.put('D', EnumMachineAlpha.ROCK_CRUSHER.ordinal());
        blockMapping.put('a', EnumMachineAlpha.ROCK_CRUSHER.ordinal());
        blockMapping.put('b', EnumMachineAlpha.ROCK_CRUSHER.ordinal());
        blockMapping.put('c', EnumMachineAlpha.ROCK_CRUSHER.ordinal());
        blockMapping.put('d', EnumMachineAlpha.ROCK_CRUSHER.ordinal());
        blockMapping.put('e', EnumMachineAlpha.ROCK_CRUSHER.ordinal());
        blockMapping.put('f', EnumMachineAlpha.ROCK_CRUSHER.ordinal());
        blockMapping.put('h', EnumMachineAlpha.ROCK_CRUSHER.ordinal());
        TileEntity tile = pattern.placeStructure(world, x, y, z, RailcraftBlocks.getBlockMachineAlpha(), blockMapping);
        if (tile instanceof TileRockCrusher) {
            TileRockCrusher master = (TileRockCrusher) tile;
            for (int slot = 0; slot < 9; slot++) {
                if (input != null && slot < input.size())
                    master.inv.setInventorySlotContents(TileRockCrusher.SLOT_INPUT + slot, input.get(slot));
View Full Code Here

* @author CovertJaguar <http://www.railcraft.info>
*/
public abstract class TileTankBase extends TileMultiBlock implements ITankTile {

    public static void placeIronTank(World world, int x, int y, int z, int patternIndex, FluidStack fluid) {
        MultiBlockPattern pattern = TileTankBase.patterns.get(patternIndex);
        Map<Character, Integer> blockMapping = new HashMap<Character, Integer>();
        blockMapping.put('B', EnumMachineBeta.TANK_IRON_WALL.ordinal());
        blockMapping.put('W', EnumMachineBeta.TANK_IRON_GAUGE.ordinal());
        TileEntity tile = pattern.placeStructure(world, x, y, z, RailcraftBlocks.getBlockMachineBeta(), blockMapping);
        if (tile instanceof TileTankBase) {
            TileTankBase master = (TileTankBase) tile;
            master.tank.setFluid(fluid);
        }
    }
View Full Code Here

            master.tank.setFluid(fluid);
        }
    }

    public static void placeSteelTank(World world, int x, int y, int z, int patternIndex, FluidStack fluid) {
        MultiBlockPattern pattern = TileTankBase.patterns.get(patternIndex);
        Map<Character, Integer> blockMapping = new HashMap<Character, Integer>();
        blockMapping.put('B', EnumMachineBeta.TANK_STEEL_WALL.ordinal());
        blockMapping.put('W', EnumMachineBeta.TANK_STEEL_GAUGE.ordinal());
        TileEntity tile = pattern.placeStructure(world, x, y, z, RailcraftBlocks.getBlockMachineBeta(), blockMapping);
        if (tile instanceof TileTankBase) {
            TileTankBase master = (TileTankBase) tile;
            master.tank.setFluid(fluid);
        }
    }
View Full Code Here

    private static MultiBlockPattern buildPattern(char[][][] map, int xOffset, int yOffset, int zOffset, AxisAlignedBB entityCheck) {
        if (!RailcraftConfig.allowTankStacking()) {
            entityCheck.offset(0, 1, 0);
            yOffset = 1;
        }
        return new MultiBlockPattern(map, xOffset, yOffset, zOffset, entityCheck);
    }
View Full Code Here

TOP

Related Classes of mods.railcraft.common.blocks.machine.MultiBlockPattern

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.