Package pneumaticCraft.common.tileentity

Examples of pneumaticCraft.common.tileentity.TileEntityPneumaticDoor


            float xMax = 1;
            float zMax = 1;
            TileEntity te = blockAccess.getTileEntity(x, y, z);
            int meta = blockAccess.getBlockMetadata(x, y, z);
            if(te instanceof TileEntityPneumaticDoor) {
                TileEntityPneumaticDoor door = (TileEntityPneumaticDoor)te;
                float cosinus = 13 / 16F - (float)Math.sin(Math.toRadians(door.rotation)) * 13 / 16F;
                float sinus = 13 / 16F - (float)Math.cos(Math.toRadians(door.rotation)) * 13 / 16F;
                if(door.rightGoing) {
                    switch(ForgeDirection.getOrientation(meta % 6)){
                        case NORTH:
View Full Code Here


    }

    private void updateDoorSide(TileEntityPneumaticDoorBase doorBase){
        TileEntity teDoor = doorBase.getWorldObj().getTileEntity(doorBase.xCoord + doorBase.orientation.offsetX, doorBase.yCoord, doorBase.zCoord + doorBase.orientation.offsetZ);
        if(teDoor instanceof TileEntityPneumaticDoor) {
            TileEntityPneumaticDoor door = (TileEntityPneumaticDoor)teDoor;
            if(doorBase.orientation.getRotation(ForgeDirection.UP) == ForgeDirection.getOrientation(door.getBlockMetadata() % 6) && door.rightGoing || doorBase.orientation.getRotation(ForgeDirection.DOWN) == ForgeDirection.getOrientation(door.getBlockMetadata() % 6) && !door.rightGoing) {
                door.rightGoing = !door.rightGoing;
                door.setRotation(0);
            }
        }
    }
View Full Code Here

TOP

Related Classes of pneumaticCraft.common.tileentity.TileEntityPneumaticDoor

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.