Package net.minecraft.src.buildcraft.api

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


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


        if (meta > 5) {
            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

            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

        for (int l = 0; l < 6; ++l) {
            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

        teleportPipes.removeAll(toRemove);
    }
 
  public Position getPosition() {
        return new Position (xCoord, yCoord, zCoord);
  }
View Full Code Here

    public LinkedList<OilReturn> getPossibleLiquidMovements(Position pos) {
        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

        return false;
    }
   
    public Position getPosition() {
        return new Position (xCoord, yCoord, zCoord);
    }
View Full Code Here

        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

    public LinkedList<Orientations> getRealPossibleMovements(Position pos) {
        LinkedList<Orientations> result = new LinkedList<Orientations>();

        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

    public int getDistance(int x, int y, int z) {
        return (int) Math.sqrt(((xCoord - x) * (xCoord - x)) + ((yCoord - y) * (yCoord - y)) + ((zCoord - z) * (zCoord - z)));
    }
   
    public Position getPosition() {
        return new Position (xCoord, yCoord, zCoord);
    }
View Full Code Here

TOP

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

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.