Examples of moveForwards()


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

            Position entityPos = new Position(pos.x + 0.5, pos.y
                                              + Utils.getPipeFloorOf(stack), pos.z + 0.5,
                                              pos.orientation.reverse());

            entityPos.moveForwards(0.5);

            EntityPassiveItem entity = new EntityPassiveItem(w, entityPos.x,
                    entityPos.y, entityPos.z, stack);

            ((PipeTransportItems) transport).entityEntering(entity,
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()) {
                Position newPos = new Position(pos);
                newPos.orientation = Orientations.values()[o];
                newPos.moveForwards(1.0);

                TileEntity entity = worldObj.getBlockTileEntity((int) newPos.x, (int) newPos.y, (int) newPos.z);

                if (entity instanceof IInventory) {
                    if (new StackUtil(item.item).checkAvailableSlot((IInventory) entity, false, newPos.orientation.reverse())) {
View Full Code Here

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


        //System.out.println("NewOris Size: " + newOris.size() + " - PO Size: " + possibleOrientations.size() + " - Level: " + Level);
        if (newOris.size() > 0) {
            Position destPos =  new Position(pos.x, pos.y, pos.z, newOris.get( (new Random()) .nextInt(newOris.size()) ) );
            destPos.moveForwards(1.0);
            StackUtil utils = new StackUtil(item.item);
            TileEntity tile = worldObj.getBlockTileEntity((int) destPos.x, (int) destPos.y, (int) destPos.z);

            if (!APIProxy.isClient(worldObj)) {
                if (utils.checkAvailableSlot((IInventory) tile, true, destPos.orientation.reverse()) && utils.items.stackSize == 0) {
View Full Code Here

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

        int total = 0;
        int ret[] = new int[2];

        for (int i = 0; i < 6; ++i) {
            Position p = new Position(xCoord, yCoord, zCoord, Orientations.values()[i]);
            p.moveForwards(1);

            if (canRec(p)) {
                ret[0]++;
                ret[1] += ((PipeTransportLiquids)this.transport).side[i].average;
            }
View Full Code Here

Examples of powercrystals.core.position.BlockPosition.moveForwards()

    Map<ForgeDirection, IPipeEntry> pipes = new LinkedHashMap<ForgeDirection, IPipeEntry>();
    for(ForgeDirection direction : directionstocheck)
    {
      BlockPosition bp = new BlockPosition(x, y, z);
      bp.orientation = direction;
      bp.moveForwards(1);
      TileEntity te = world.getBlockTileEntity(bp.x, bp.y, bp.z);
      if(te instanceof IPipeEntry)
      {
        pipes.put(direction, (IPipeEntry)te);
      }
View Full Code Here

Examples of powercrystals.core.position.BlockPosition.moveForwards()

    Map<ForgeDirection, IInventory> chests = new LinkedHashMap<ForgeDirection, IInventory>();
    for(ForgeDirection direction : directionstocheck)
    {
      BlockPosition bp = new BlockPosition(x, y, z);
      bp.orientation = direction;
      bp.moveForwards(1);
      TileEntity te = world.getBlockTileEntity(bp.x, bp.y, bp.z);
      if(te instanceof IInventory)
      {
        chests.put(direction, checkForDoubleChest(world, te, bp));
      }
View Full Code Here

Examples of powercrystals.core.position.BlockPosition.moveForwards()

    {
      if(!Arrays.areEqual(lastOuput[i], _buffers[i + 6]))
      {
        BlockPosition bp = new BlockPosition(this);
        bp.orientation = ForgeDirection.VALID_DIRECTIONS[i];
        bp.moveForwards(1);
        Block b = Block.blocksList[worldObj.getBlockId(bp.x, bp.y, bp.z)];
        if(b instanceof IRedNetNetworkContainer)
        {
          ((IRedNetNetworkContainer)b).updateNetwork(worldObj, bp.x, bp.y, bp.z);
        }
View Full Code Here

Examples of powercrystals.core.position.BlockPosition.moveForwards()

 
  public RedNetConnectionType getConnectionState(ForgeDirection side)
  {
    BlockPosition bp = new BlockPosition(this);
    bp.orientation = side;
    bp.moveForwards(1);
   
    int blockId = worldObj.getBlockId(bp.x, bp.y, bp.z);
    Block b = Block.blocksList[blockId];
   
    if(b == null) // block doesn't exist (air) - never connect
View Full Code Here

Examples of powercrystals.core.position.BlockPosition.moveForwards()

 
  private TileEntityLaserDrill getDrill()
  {
    BlockPosition bp = new BlockPosition(this);
    bp.orientation = getDirectionFacing();
    bp.moveForwards(1);
   
    if(!worldObj.isAirBlock(bp.x, bp.y, bp.z))
    {
      return null;
    }
View Full Code Here

Examples of powercrystals.core.position.BlockPosition.moveForwards()

    if(!worldObj.isAirBlock(bp.x, bp.y, bp.z))
    {
      return null;
    }
   
    bp.moveForwards(1);
   
    TileEntity te = worldObj.getBlockTileEntity(bp.x, bp.y, bp.z);
    if(te instanceof TileEntityLaserDrill)
    {
      return ((TileEntityLaserDrill)te);
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.