Package net.minecraftforge.common

Examples of net.minecraftforge.common.ForgeDirection


      GL11.glPushMatrix();
      GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);

      FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
      ForgeDirection d = ForgeDirection.getOrientation(tileentity.blockMetadata);
      GL11.glTranslated(x + 0.5D, y + 0.5D, z + 0.5D);
      GL11.glTranslated(d.offsetX * 0.76D, d.offsetY * 0.76D, d.offsetZ * 0.76D);
      if (d == ForgeDirection.UP)
      {
        GL11.glScalef(1.0F, -1.0F, 1.0F);
View Full Code Here


  public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z, Block block, int modelId, RenderBlocks renderer)
  {
    renderer.renderStandardBlock(block, x, y, z);

    Tessellator ts = Tessellator.instance;
    ForgeDirection face = ForgeDirection.getOrientation(world.getBlockMetadata(x, y, z));
    BlockTerminalFluid terminalBlock = (BlockTerminalFluid) block;
    int[] color =
    { 0, 0, 0 };
    TileEntity blockTE = world.getBlockTileEntity(x, y, z);
    if (blockTE instanceof TileEntityTerminalFluid)
View Full Code Here

   * @return The ItemStack remained after place attempt
   */
  public ItemStack tryPlaceInPosition(ItemStack itemStack, Vector3 position, ForgeDirection dir)
  {
    TileEntity tileEntity = position.getTileEntity(this.worldObj);
    ForgeDirection direction = dir.getOpposite();

    if (tileEntity != null && itemStack != null)
    {
      /** Try to put items into a chest. */
      if (tileEntity instanceof TileMultiBlockPart)
      {
        Vector3 mainBlockPosition = ((TileMultiBlockPart) tileEntity).getMainBlock();

        if (mainBlockPosition != null)
        {
          if (!(mainBlockPosition.getTileEntity(this.worldObj) instanceof TileMultiBlockPart))
          {
            return tryPlaceInPosition(itemStack, mainBlockPosition, direction);
          }
        }
      }
      else if (tileEntity instanceof TileEntityChest)
      {
        TileEntityChest[] chests = { (TileEntityChest) tileEntity, null };

        /** Try to find a double chest. */
        for (int i = 2; i < 6; i++)
        {
          ForgeDirection searchDirection = ForgeDirection.getOrientation(i);
          Vector3 searchPosition = position.clone();
          searchPosition.translate(searchDirection);

          if (searchPosition.getTileEntity(this.worldObj) != null)
          {
View Full Code Here

    if (recur)
    {
      for (int i = 0; i < 6; i++)
      {
        ForgeDirection direction = ForgeDirection.getOrientation(i);
        Vector3 vector = new Vector3(tileEntity);
        vector.translate(direction);
        TileEntity checkTile = vector.getTileEntity(tileEntity.worldObj);

        if (checkTile != null)
View Full Code Here

    }
    else
    {
      for (int i = 0; i < 6; i++)
      {
        ForgeDirection checkDir = ForgeDirection.getOrientation(i);
        count += this.getModuleCount(module, this.getSlotsBasedOnDirection(checkDir));
      }
    }

    return count;
View Full Code Here

          return (Vector3) this.cache.get(cacheID);
        }
      }
    }

    ForgeDirection direction = this.getDirection();

    if (direction == ForgeDirection.UP || direction == ForgeDirection.DOWN)
    {
      direction = ForgeDirection.NORTH;
    }
View Full Code Here

      xScalePos = this.getModuleCount(ModularForceFieldSystem.itemModuleScale, this.getSlotsBasedOnDirection(ForgeDirection.EAST));
      yScalePos = this.getModuleCount(ModularForceFieldSystem.itemModuleScale, this.getSlotsBasedOnDirection(ForgeDirection.UP));
    }
    else
    {
      ForgeDirection direction = this.getDirection();

      if (direction == ForgeDirection.UP || direction == ForgeDirection.DOWN)
      {
        direction = ForgeDirection.NORTH;
      }
View Full Code Here

      xScaleNeg = this.getModuleCount(ModularForceFieldSystem.itemModuleScale, this.getSlotsBasedOnDirection(ForgeDirection.WEST));
      yScaleNeg = this.getModuleCount(ModularForceFieldSystem.itemModuleScale, this.getSlotsBasedOnDirection(ForgeDirection.DOWN));
    }
    else
    {
      ForgeDirection direction = this.getDirection();

      if (direction == ForgeDirection.UP || direction == ForgeDirection.DOWN)
      {
        direction = ForgeDirection.NORTH;
      }
View Full Code Here

    {
      horizontalRotation = this.getModuleCount(ModularForceFieldSystem.itemModuleRotate, this.getSlotsBasedOnDirection(ForgeDirection.EAST)) - this.getModuleCount(ModularForceFieldSystem.itemModuleRotate, this.getSlotsBasedOnDirection(ForgeDirection.WEST)) + this.getModuleCount(ModularForceFieldSystem.itemModuleRotate, this.getSlotsBasedOnDirection(ForgeDirection.SOUTH)) - this.getModuleCount(ModularForceFieldSystem.itemModuleRotate, this.getSlotsBasedOnDirection(ForgeDirection.NORTH));
    }
    else
    {
      ForgeDirection direction = this.getDirection();
      horizontalRotation = this.getModuleCount(ModularForceFieldSystem.itemModuleRotate, this.getSlotsBasedOnDirection(VectorHelper.getOrientationFromSide(direction, ForgeDirection.EAST))) - this.getModuleCount(ModularForceFieldSystem.itemModuleRotate, this.getSlotsBasedOnDirection(VectorHelper.getOrientationFromSide(direction, ForgeDirection.WEST))) + this.getModuleCount(ModularForceFieldSystem.itemModuleRotate, this.getSlotsBasedOnDirection(VectorHelper.getOrientationFromSide(direction, ForgeDirection.SOUTH))) - this.getModuleCount(ModularForceFieldSystem.itemModuleRotate, this.getSlotsBasedOnDirection(VectorHelper.getOrientationFromSide(direction, ForgeDirection.NORTH)));
    }

    horizontalRotation *= 2;

View Full Code Here

  @Override
  public Set<Vector3> getExteriorPoints(IFieldInteraction projector)
  {
    Set<Vector3> fieldBlocks = new HashSet<Vector3>();
    ForgeDirection direction = projector.getDirection();
    Vector3 posScale = projector.getPositiveScale();
    Vector3 negScale = projector.getNegativeScale();

    for (float x = -negScale.intX(); x <= posScale.intX(); x += 0.5f)
    {
View Full Code Here

TOP

Related Classes of net.minecraftforge.common.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.