Examples of moveForwards()


Examples of net.minecraft.src.buildcraft.api.Position.moveForwards()

         
            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)) {
View Full Code Here

Examples of net.minecraft.src.buildcraft.api.Position.moveForwards()

            switchSource();
        }
        else {
            Position pos = new Position(xCoord, yCoord, zCoord,
                                        Orientations.values()[meta]);
            pos.moveForwards(1);

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

            if (!isInput(tile)) {
View Full Code Here

Examples of net.minecraft.src.buildcraft.api.Position.moveForwards()

            if (nextMetadata > 5) {
                nextMetadata = 0;
            }

            Position pos = new Position(xCoord, yCoord, zCoord, Orientations.values()[nextMetadata]);
            pos.moveForwards(1.0);

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

            if (tile instanceof TileGenericPipe) {
                if (((TileGenericPipe) tile).pipe.logic instanceof PipeLogicWood || ((TileGenericPipe) tile).pipe.logic instanceof PipeLogicAdvancedWood) {
View Full Code Here

Examples of net.minecraft.src.buildcraft.api.Position.moveForwards()

            if (nextMetadata > 5) {
                nextMetadata = 0;
            }

            Position pos = new Position(xCoord, yCoord, zCoord, Orientations.values()[nextMetadata]);
            pos.moveForwards(1.0);

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

            if (tile instanceof TileGenericPipe) {
                if (((TileGenericPipe) tile).pipe.logic instanceof PipeLogicWood || ((TileGenericPipe) tile).pipe.logic instanceof PipeLogicAdvancedWood) {
View Full Code Here

Examples of net.minecraft.src.buildcraft.api.Position.moveForwards()

        LinkedList<OilReturn> result = new LinkedList<OilReturn>();

        for (int o = 0; o <= 5; ++o) {
            Position newPos = new Position(pos);
            newPos.orientation = Orientations.values()[o];
            newPos.moveForwards(1.0);

            if (canReceiveLiquid2(newPos)) {

                //For better handling in future
                //int space = BuildCraftCore.OIL_BUCKET_QUANTITY / 4 - sideToCenter[((Orientations.values()[o]).reverse()).ordinal()] - centerToSide[((Orientations.values()[o]).reverse()).ordinal()] + flowRate;
View Full Code Here

Examples of net.minecraft.src.buildcraft.api.Position.moveForwards()

        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

Examples of net.minecraft.src.buildcraft.api.Position.moveForwards()

        for (int o = 0; o < 6; ++o) {
            if (Orientations.values()[o] != pos.orientation.reverse() && container.pipe.outputOpen(Orientations.values()[o])) {
                Position newPos = new Position(pos);
                newPos.orientation = Orientations.values()[o];
                newPos.moveForwards(1.0);

                if (canReceivePower(newPos)) {
                    result.add(newPos.orientation);
                }
            }
View Full Code Here

Examples of net.minecraft.src.buildcraft.api.Position.moveForwards()

            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);
View Full Code Here

Examples of net.minecraft.src.buildcraft.api.Position.moveForwards()

        for (int o = 0; o < 6; ++o) {
            if (container.pipe.outputOpen(Orientations.values()[o])) {
                Position newPos = new Position(pos);
                newPos.orientation = Orientations.values()[o];
                newPos.moveForwards(1.0);

                if (canReceivePipeObjects(newPos, item)) {
                    result.add(newPos.orientation);
                }
            }
View Full Code Here

Examples of net.minecraft.src.buildcraft.api.Position.moveForwards()

            return;
        }

        Position pos = new Position(xCoord, yCoord, zCoord,
                                    Orientations.values()[meta]);
        pos.moveForwards(1);
        int blockId = w.getBlockId((int) pos.x, (int) pos.y, (int) pos.z);
        TileEntity tile = w.getBlockTileEntity((int) pos.x, (int) pos.y,
                                               (int) pos.z);

        if (tile == null
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.