Package net.minecraft.src.buildcraft.api

Examples of net.minecraft.src.buildcraft.api.Orientations


        int meta = worldObj.getBlockMetadata(xCoord, yCoord, zCoord);
        int newMeta = 6;

        for (int i = meta + 1; i <= meta + 6; ++i) {
         
            Orientations o = Orientations.values() [i % 6];

            Position pos = new Position (xCoord, yCoord, zCoord, o);

            pos.moveForwards(1);

            TileEntity tile = worldObj.getBlockTileEntity((int) pos.x, (int) pos.y,
                              (int) pos.z);

            if (isInput (tile)) {
                newMeta = o.ordinal();
                break;
            }
        }

        if (newMeta != meta) {
View Full Code Here


        LinkedList<Orientations> theList = getRealPossibleMovements(a.getPosition());
        List<PowerReturn> needsPower = new LinkedList<PowerReturn>();

        if (theList.size() > 0) {
            for (int b = 0; b < theList.size(); b++) {
                Orientations newPos = theList.get(b);
                Position destPos = new Position(a.xCoord, a.yCoord, a.zCoord, newPos);
                destPos.moveForwards(1.0);
                TileEntity tile = worldObj.getBlockTileEntity((int)destPos.x, (int)destPos.y, (int)destPos.z);

                if (TileNeedsPower(tile)) {
                    needsPower.add(new PowerReturn(tile, newPos.reverse()));
                }

            }
        }
View Full Code Here

        for (int a = 0; a < pipeList.size(); a++) {
            LinkedList<Orientations> theList = getRealPossibleMovements(pipeList.get(a).getPosition());

            if (theList.size() > 0) {
                for (int b = 0; b < theList.size(); b++) {
                    Orientations newPos = theList.get(b);
                    Position destPos = new Position(pipeList.get(a).xCoord, pipeList.get(a).yCoord, pipeList.get(a).zCoord, newPos);
                    destPos.moveForwards(1.0);

                    //System.out.println(getPosition().toString() + " RequestEnergy: " + from.toString() + " - Val: " + is + " - Dest: " + destPos.toString());

                    TileEntity tile = worldObj.getBlockTileEntity((int)destPos.x, (int)destPos.y, (int)destPos.z);

                    if (tile instanceof TileGenericPipe) {
                        TileGenericPipe nearbyTile = (TileGenericPipe) tile;
                        PipeTransportPower nearbyTransport = (PipeTransportPower) nearbyTile.pipe.transport;
                        nearbyTransport.requestEnergy(newPos.reverse(), is);
                    }
                }
            }
        }
    }
View Full Code Here

TOP

Related Classes of net.minecraft.src.buildcraft.api.Orientations

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.