Package net.minecraftforge.common.util

Examples of net.minecraftforge.common.util.ForgeDirection.ordinal()


  protected void actionPerformed(GuiButton b) {
    ForgeDirection dir = ForgeDirection.values()[b.id];
    EntityClientPlayerMP player = Minecraft.getMinecraft().thePlayer;
    BlockCoord loc = cb.getLocation();
    PacketHandler.INSTANCE.sendToServer(new PacketOpenConduitUI(cb.getEntity(), dir));
    player.openGui(EnderIO.instance, GuiHandler.GUI_ID_EXTERNAL_CONNECTION_BASE + dir.ordinal(), player.worldObj, loc.x, loc.y, loc.z);
  }

  @Override
  public void initGui() {
    GuiButton b;
View Full Code Here


    ForgeDirection dir = ForgeDirection.getOrientation(facing).getOpposite();

    Coord4D eject = Coord4D.get(this).translate(dir.offsetX, 1, dir.offsetZ);
    Coord4D pull = Coord4D.get(this).translate(0, 1, 0);

    if((location.equals(eject) && side == dir.ordinal()) || (location.equals(pull) && side == 1))
    {
      if(EJECT_INV == null)
      {
        EJECT_INV = new int[27];
View Full Code Here

   * @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;
  }
 
  private boolean isReactorAssembled(TileEntityReactorPart part) {
    MultiblockReactor reactor = part.getReactorController();
    return reactor != null && reactor.isAssembled();
View Full Code Here

    if(world.isSideSolid(pos1.x, pos1.y, pos1.z, orientation.getOpposite()))
    {
      return new PartGlowPanel(col, orientation);
    }
   
    if(world.getTileEntity(pos.x, pos.y, pos.z) instanceof TileMultipart && ((TileMultipart) world.getTileEntity(pos.x, pos.y, pos.z)).partMap(orientation.ordinal()) instanceof HollowMicroblock)
    {
      return new PartGlowPanel(col, orientation);
    }

    return null;
View Full Code Here

        {
          if(inventory instanceof ISidedInventory)
          {
            ISidedInventory sidedInventory = (ISidedInventory)inventory;

            if(sidedInventory.getAccessibleSlotsFromSide(forgeSide.ordinal()) != null)
            {
              if(sidedInventory.getAccessibleSlotsFromSide(forgeSide.ordinal()).length > 0)
              {
                connectable[side] = true;
              }
View Full Code Here

          {
            ISidedInventory sidedInventory = (ISidedInventory)inventory;

            if(sidedInventory.getAccessibleSlotsFromSide(forgeSide.ordinal()) != null)
            {
              if(sidedInventory.getAccessibleSlotsFromSide(forgeSide.ordinal()).length > 0)
              {
                connectable[side] = true;
              }
            }
          }
View Full Code Here

        if (tileAt instanceof EnergyStorageTile)
        {
            if (((EnergyStorageTile) tileAt).getModeFromDirection(direction.getOpposite()) != null)
            {
                return direction.ordinal();
            }
            else
            {
                return -1;
            }
View Full Code Here

                return -1;
            }
        }
       
        if (EnergyUtil.otherModCanReceive(tileAt, direction.getOpposite()))
          return direction.ordinal();

        for (ForgeDirection adjacentDir : ForgeDirection.VALID_DIRECTIONS)
        {
            if (adjacentDir == direction) continue;
          tileAt = world.getTileEntity(x + adjacentDir.offsetX, y + adjacentDir.offsetY, z + adjacentDir.offsetZ);
View Full Code Here

      {
        selectedSide = of;
        break;
      }

      int channels = channelsOnSide[selectedSide.ordinal()];
      IIcon def = getTexture( getCableColor() );
      IIcon off = new OffsetIcon( def, 0, -12 );

      IIcon firstIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
      IIcon firstOffset = new OffsetIcon( firstIcon, 0, -12 );
View Full Code Here

      {
        selectedSide = of;
        break;
      }

      int channels = channelsOnSide[selectedSide.ordinal()];
      IIcon def = getTexture( getCableColor() );
      IIcon off = new OffsetIcon( def, 0, -12 );

      IIcon firstTaughtIcon = new TaughtIcon( getChannelTex( channels, false ).getIcon(), -0.2f );
      IIcon firstOffsetIcon = new OffsetIcon( firstTaughtIcon, 0, -12 );
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.