Package net.minecraftforge.common.util

Examples of net.minecraftforge.common.util.ForgeDirection


    return -1;
  }

  public boolean scanMiddleLayer(Coord4D current)
  {
    ForgeDirection left = MekanismUtils.getLeft(facing);
    ForgeDirection back = MekanismUtils.getBack(facing);

    for(int x = 0; x < 4; x++)
    {
      for(int z = 0; z < 4; z++)
      {
View Full Code Here


    {
      baseBlock.step(ForgeDirection.DOWN);
      height++;
    }

    ForgeDirection left = MekanismUtils.getLeft(facing);
    ForgeDirection right = MekanismUtils.getRight(facing);

    if(!scanBottomRow(baseBlock))
    {
      return false;
    };
View Full Code Here

   * @param start
   * @return
   */
  public boolean scanBottomRow(Coord4D start)
  {
    ForgeDirection back = MekanismUtils.getBack(facing);
    Coord4D current = start;

    for(int i = 1; i <= 4; i++)
    {
      TileEntity tile = current.getTileEntity(worldObj);
View Full Code Here

    if(!structured)
    {
      return null;
    }
   
    ForgeDirection right = MekanismUtils.getRight(facing);
    Coord4D startPoint = Coord4D.get(this).getFromSide(right);
    startPoint = isLeftOnFace ? startPoint.getFromSide(right) : startPoint;
   
    startPoint = startPoint.getFromSide(right.getOpposite()).getFromSide(MekanismUtils.getBack(facing));
    startPoint.translate(0, -(height-2), 0);
   
    return startPoint;
  }
View Full Code Here

   
    clearAround(transmitter);

    for(IGasHandler acceptor : acceptors)
    {
      ForgeDirection side = ForgeDirection.getOrientation(Arrays.asList(acceptors).indexOf(acceptor));

      if(side != null && acceptor != null && !(acceptor instanceof IGridTransmitter) && transmitter.canConnectToAcceptor(side, true))
      {
        possibleAcceptors.put(Coord4D.get((TileEntity)acceptor), acceptor);
        acceptorDirections.put(acceptor, ForgeDirection.getOrientation(Arrays.asList(acceptors).indexOf(acceptor)));
View Full Code Here

  {
    @Override
    public ItemStack dispenseStack(IBlockSource source, ItemStack stack)
    {
      Coord4D coord = new Coord4D(source.getXInt(), source.getYInt(), source.getZInt(), source.getWorld().provider.dimensionId);
      ForgeDirection side = ForgeDirection.getOrientation(BlockDispenser.func_149937_b(source.getBlockMetadata()).ordinal());

      List<EntityLivingBase> entities = source.getWorld().getEntitiesWithinAABB(EntityLivingBase.class, coord.getFromSide(side).getBoundingBox());
      boolean latched = false;
     
      for(EntityLivingBase entity : entities)
View Full Code Here

    else if(extremes == 1) {
      return SUBICON_HOUSING_FACE;
    }
    else {
      ForgeDirection[] dirsToCheck = StaticUtils.neighborsBySide[side];
      ForgeDirection dir;

      Block myBlock = blockAccess.getBlock(x, y, z);
      int iconIdx = -1;

      for(int i = 0; i < dirsToCheck.length; i++) {
View Full Code Here

          TileEntityTurbinePartStandard bearing = (TileEntityTurbinePartStandard)te;
          MultiblockTurbine turbine = bearing.getTurbine();
          if(turbine != null && turbine.getActive()) {
            // Spawn particles!
            int numParticles = Math.min(20, Math.max(1, turbine.getFluidConsumedLastTick() / 40));
            ForgeDirection inwardsDir = bearing.getOutwardsDir().getOpposite();
            CoordTriplet minCoord, maxCoord;
            minCoord = turbine.getMinimumCoord();
            maxCoord = turbine.getMaximumCoord();
            minCoord.x++; minCoord.y++; minCoord.z++;
            maxCoord.x--; maxCoord.y--; maxCoord.z--;
View Full Code Here

   * @param part The part whose sides we're checking
   * @param side The side to compare to the part
   * @return True if `side` is the outwards-facing face of `part`
   */
  private boolean isOutwardsSide(TileEntityReactorPart part, int side) {
    ForgeDirection outDir = part.getOutwardsDir();
    return outDir.ordinal() == side;
  }
View Full Code Here

    pumpDestination = null;
    if(worldObj.isRemote || isInlet()) {
      return;
    }

    ForgeDirection outDir = getOutwardsDir();
    if(outDir == ForgeDirection.UNKNOWN) {
      return;
    }
   
    TileEntity neighbor = worldObj.getTileEntity(xCoord + outDir.offsetX, yCoord + outDir.offsetY, zCoord + outDir.offsetZ);
View Full Code Here

TOP

Related Classes of net.minecraftforge.common.util.ForgeDirection

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.