Examples of ForgeDirection


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

Examples of net.minecraftforge.common.ForgeDirection

  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

Examples of net.minecraftforge.common.util.ForgeDirection

    if (pos != null) {
      Block block = player.worldObj.getBlock(pos.blockX, pos.blockY, pos.blockZ);
      if (block != null && block.isReplaceable(player.worldObj, pos.blockX, pos.blockY, pos.blockZ))
        pos.blockY--;

      ForgeDirection dir = ForgeDirection.getOrientation(pos.sideHit);
      int rotation = MathHelper.floor_double(player.rotationYaw * 4F / 360F + 0.5D) & 3;
      int range = (getSize(stack) ^ 1) / 2;

      boolean topOrBottom = dir == ForgeDirection.UP || dir == ForgeDirection.DOWN;

View Full Code Here

Examples of net.minecraftforge.common.util.ForgeDirection

    MovingObjectPosition block = ToolHandler.raytraceFromEntity(world, player, true, 4.5);
    if (block == null)
      return false;

    ForgeDirection direction = ForgeDirection.getOrientation(block.sideHit);
    int fortune = EnchantmentHelper.getFortuneModifier(player);
    boolean silk = EnchantmentHelper.getSilkTouchModifier(player);

    switch (ToolHandler.getMode(stack)) {
      case 0:
View Full Code Here

Examples of net.minecraftforge.common.util.ForgeDirection

    if (block == null)
      return false;

    Block blk = world.getBlock(x, y, z);

    ForgeDirection direction = ForgeDirection.getOrientation(block.sideHit);
    int fortune = EnchantmentHelper.getFortuneModifier(player);
    boolean silk = EnchantmentHelper.getSilkTouchModifier(player);
    if (ConfigHandler.bedrockDimensionID != 0 && blk == Blocks.bedrock && ((world.provider.isSurfaceWorld() && y < 5) || (y > 253 && world.provider instanceof WorldProviderBedrock))) {
      world.setBlock(x, y, z, ThaumicTinkerer.registry.getFirstBlockFromClass(BlockBedrockPortal.class));
    }
View Full Code Here

Examples of net.minecraftforge.common.util.ForgeDirection

          movingobjectposition.entityHit.attackEntityFrom(DamageSource.causePlayerDamage((EntityPlayer) getThrower()), 8 + potency);
        return;
      }

      Vector3 movementVec = new Vector3(motionX, motionY, motionZ);
      ForgeDirection dir = ForgeDirection.getOrientation(movingobjectposition.sideHit);
      Vector3 normalVector = new Vector3(dir.offsetX, dir.offsetY, dir.offsetZ).normalize();

      movementVector = normalVector.multiply(-2 * movementVec.dotProduct(normalVector)).add(movementVec);

      motionX = movementVector.x;
View Full Code Here

Examples of net.minecraftforge.common.util.ForgeDirection

      return false;
    MovingObjectPosition block = ToolHandler.raytraceFromEntity(world, player, true, 4.5);
    if (block == null)
      return false;

    ForgeDirection direction = ForgeDirection.getOrientation(block.sideHit);
    int fortune = EnchantmentHelper.getFortuneModifier(player);
    boolean silk = EnchantmentHelper.getSilkTouchModifier(player);

    switch (ToolHandler.getMode(stack)) {
      case 0:
View Full Code Here

Examples of net.minecraftforge.common.util.ForgeDirection

      player.playerNetServerHandler.setPlayerLocation(entity.posX + vec.x, entity.posY + vec.y, entity.posZ + vec.z, player.rotationYaw, player.rotationPitch);
    } else entity.setPosition(entity.posX + vec.x, entity.posY + vec.y, entity.posZ + vec.z);
  }

  public ChunkCoordinates getBlockTarget() {
    ForgeDirection dir = ForgeDirection.getOrientation(orientation);
    return new ChunkCoordinates(xCoord + dir.offsetX, yCoord + dir.offsetY, zCoord + dir.offsetZ);
  }
View Full Code Here

Examples of net.minecraftforge.common.util.ForgeDirection

  public boolean canExtractItem(int i, ItemStack itemstack, int j) {
    return true;
  }

  int drawEssentia() {
    ForgeDirection orientation = getOrientation();
    TileEntity te = ThaumcraftApiHelper.getConnectableTile(worldObj, xCoord, yCoord, zCoord, orientation);
    if (te != null) {
      IEssentiaTransport ic = (IEssentiaTransport) te;
      if (!ic.canOutputTo(orientation.getOpposite()))
        return 0;

      for (Aspect aspect : repairValues.keySet())
        if (ic.getSuctionType(orientation.getOpposite()) == aspect && ic.getSuctionAmount(orientation.getOpposite()) < getSuctionAmount(orientation) && ic.takeEssentia(aspect, 1, orientation.getOpposite()) == 1)
          return repairValues.get(aspect);
    }
    return 0;
  }
View Full Code Here

Examples of net.minecraftforge.common.util.ForgeDirection

  }

  @Override
  @SideOnly(Side.CLIENT)
  public IIcon getIcon(int side, int meta) {
    ForgeDirection orint = ForgeDirection.getOrientation(side);
    if(orint == ForgeDirection.NORTH) {
      meta = MathHelper.clamp_int(meta, 0, SkullType.values().length - 1);
      return SkullType.values()[meta].showEyes ? frontIconEyes : frontIcon;
    }
    if(orint == ForgeDirection.UP || orint == ForgeDirection.DOWN || orint == ForgeDirection.SOUTH) {
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.