Package net.minecraftforge.common.util

Examples of net.minecraftforge.common.util.ForgeDirection


          finalVerts.add(vertex);
        }
      }

      for (int i = 0; i < allEdges.size(); i++) {
        ForgeDirection dir = allEdges.get(i);
        ForgeDirection dir2 = i + 1 < allEdges.size() ? allEdges.get(i + 1) : allEdges.get(0);
        if(needsCorner(dir, dir2, edges, face, par1Block, x, y, z, rb.blockAccess)) {

          Vertex v = new Vertex();
          v.uv = new Vector2f();
          v.xyz.set(ForgeDirectionOffsets.forDir(dir));
View Full Code Here


    }
    return itemstack.getItem() == inventory[slot].getItem();
  }

  public boolean isSideDisabled(int var1) {
    ForgeDirection dir = ForgeDirection.getOrientation(var1);
    IoMode mode = getIoMode(dir);
    if(mode == IoMode.DISABLED) {
      return true;
    }
    return false;
View Full Code Here

    if(sword == null || sword.getIconIndex() == null) {
      return;
    }

    ForgeDirection dir = ForgeDirection.getOrientation(facing);
    if(dir == ForgeDirection.SOUTH) {
      facing = 0;
    } else if(dir == ForgeDirection.WEST) {
      facing = -1;
    }
View Full Code Here

    GL11.glTranslatef(0.5F, 0, 0.5F);
    GL11.glRotatef(180F, 1F, 0F, 0F);
    GL11.glScalef(1.2f, 0.9f, 1.2f);

    ForgeDirection dir = ForgeDirection.getOrientation(facing);
    if(dir == ForgeDirection.SOUTH) {
      facing = 0;
    } else if(dir == ForgeDirection.WEST) {
      facing = -1;
    }
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

    int x = pos.blockX, y = pos.blockY, z = pos.blockZ;

    if(block instanceof AbstractMachineBlock<?>) {
      if(te != null && te instanceof AbstractMachineEntity) {
        AbstractMachineEntity machine = (AbstractMachineEntity) te;
        ForgeDirection side = accessor.getSide();
        IoMode mode = machine.getIoMode(side);
        currenttip.add(EnumChatFormatting.YELLOW
            + String.format(Lang.localize("gui.machine.side"), EnumChatFormatting.WHITE + Lang.localize("gui.machine.side." + side.name().toLowerCase())));
        currenttip.add(EnumChatFormatting.YELLOW + String.format(Lang.localize("gui.machine.ioMode"), mode.colorLocalisedName()));
      }
    }

    if(block instanceof IWailaInfoProvider) {
View Full Code Here

      return false;
    }

    if(ConduitUtil.isToolEquipped(entityPlayer)) {

      ForgeDirection faceHit = ForgeDirection.getOrientation(side);
      TileCapacitorBank tcb = (TileCapacitorBank) te;
      tcb.toggleIoModeForFace(faceHit);
      if(world.isRemote) {
        world.markBlockForUpdate(x, y, z);
      } else {
View Full Code Here

    TileEntity te = world.getTileEntity(x, y, z);
    if(!(te instanceof IFluidHandler)) {
      return false;
    }
    IFluidHandler fh = (IFluidHandler) te;
    ForgeDirection dir = ForgeDirection.getOrientation(side);
    if(!fh.canDrain(dir, EnderIO.fluidXpJuice)) {
      return false;
    }
    int currentXP = XpUtil.getPlayerXP(player);
    int nextLevelXP = XpUtil.getExperienceForLevel(player.experienceLevel + 1) + 1;
View Full Code Here

    TileEntity te = world.getTileEntity(x, y, z);
    if(!(te instanceof IFluidHandler)) {
      return false;
    }
    IFluidHandler fh = (IFluidHandler) te;
    ForgeDirection dir = ForgeDirection.getOrientation(side);
    if(!fh.canFill(dir, EnderIO.fluidXpJuice)) {
      return false;
    }

    int fluidVolume = XpUtil.experienceToLiquid(XpUtil.getPlayerXP(player));
View Full Code Here

    MovingObjectPosition hit = getClosestHit(Vec3.createVectorHelper(start.x, start.y, start.z), hits);   
    if(hit != null) {
      TileEntity te = world.getTileEntity(hit.blockX, hit.blockY, hit.blockZ);     
      if(te instanceof IIoConfigurable) {
        IIoConfigurable configuarble = (IIoConfigurable) te;
        ForgeDirection face = ForgeDirection.getOrientation(hit.sideHit);
        selection = new SelectedFace(configuarble, face);       
      }
    }
  }
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.