Package pneumaticCraft.common.tileentity

Examples of pneumaticCraft.common.tileentity.TileEntityPressureChamberValve


    }

    @Override
    @SideOnly(Side.CLIENT)
    public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
        TileEntityPressureChamberValve valve = (TileEntityPressureChamberValve)world.getTileEntity(x, y, z);
        boolean formed = valve.accessoryValves != null && valve.accessoryValves.size() > 0;
        if((world.getBlockMetadata(x, y, z) | 1) == (side | 1)) {
            return textures[formed ? 1 : 0];
        } else {
            return textures[formed ? 3 : 2];
View Full Code Here


    @Override
    @SideOnly(Side.CLIENT)
    public IIcon getIcon(IBlockAccess world, int x, int y, int z, int side){
        if(world.getBlockMetadata(x, y, z) > 5) return getConnectedIcon(world, x, y, z, side);
        TileEntityPressureChamberWall te = (TileEntityPressureChamberWall)world.getTileEntity(x, y, z);
        TileEntityPressureChamberValve core = te.getCore();
        if(core == null) {
            return textures[0];
        } else {
            boolean xMid = x != core.multiBlockX && x != core.multiBlockX + core.multiBlockSize - 1;
            boolean yMid = y != core.multiBlockY && y != core.multiBlockY + core.multiBlockSize - 1;
View Full Code Here

    @Override
    public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int par6, float par7, float par8, float par9){
        if(world.isRemote) return true;
        TileEntity te = world.getTileEntity(x, y, z);
        if(te instanceof TileEntityPressureChamberWall) {
            TileEntityPressureChamberValve valve = ((TileEntityPressureChamberWall)te).getCore();
            if(valve != null) {
                return valve.getBlockType().onBlockActivated(world, valve.xCoord, valve.yCoord, valve.zCoord, player, par6, par7, par8, par9);

            }
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of pneumaticCraft.common.tileentity.TileEntityPressureChamberValve

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.