Examples of ChunkCoordinates


Examples of net.minecraft.util.ChunkCoordinates

    return false;
  }

  @Override
  public ChunkCoordinates getPlayerCoordinates() {
    return new ChunkCoordinates(0, 0, 0);
  }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

    @Override
    public int getRespawnDimension (EntityPlayerMP player)
    {
        if (PHNatura.canRespawnInNether)
        {
            ChunkCoordinates coords = player.getBedLocation(-1);
            if (coords != null)
                return -1;
        }
        return 0;
    }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

    Tessellator.renderingWorldRenderer = false;

    EntityPlayer player = Minecraft.getMinecraft().thePlayer;
    ItemStack stack = player.getCurrentEquippedItem();
    if(stack != null && stack.getItem() instanceof ICoordBoundItem) {
      ChunkCoordinates coords = ((ICoordBoundItem) stack.getItem()).getBinding(stack);
      if(coords != null)
        renderBlockOutlineAt(coords, Color.HSBtoRGB(ClientTickHandler.ticksInGame % 200 / 200F, 0.6F, 1F));
    }

    GL11.glEnable(GL11.GL_DEPTH_TEST);
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

      return Vector3.fromTileEntityCenter(tile);
    }

    public LightningBolt(World world, Vector3 sourcevec, TileEntity target, float ticksPerMeter, long seed, int colorOuter, int colorInner) {
      this(world, sourcevec, getFocalPoint(target), ticksPerMeter, seed, colorOuter, colorInner);
      this.target = new ChunkCoordinates(target.xCoord, target.yCoord, target.zCoord);
    }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

        for(int i = -range; i < range + 1; i++)
          for(int j = -range; j < range + 1; j++) {
            int x1 = x + i;
            int z1 = z + j;

            addIceBlock(player, new ChunkCoordinates(x1, y, z1));
          }
      }
    }
  }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

  public ChunkCoordinates getPoolCoords(ItemStack stack) {
    int x = ItemNBTHelper.getInt(stack, TAG_POS_X, 0);
    int y = ItemNBTHelper.getInt(stack, TAG_POS_Y, -1);
    int z = ItemNBTHelper.getInt(stack, TAG_POS_Z, 0);
    return new ChunkCoordinates(x, y, z);
  }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

  public IManaPool getManaPool(ItemStack stack) {
    MinecraftServer server = MinecraftServer.getServer();
    if(server == null)
      return new DummyPool();

    ChunkCoordinates coords = getPoolCoords(stack);
    if(coords.posY == -1)
      return null;

    int dim = getDimension(stack);
    World world = null;
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

                  int yp = y + j;
                  int zp = z + l;
                  Block blockAbove = supertile.getWorldObj().getBlock(xp, yp + 1, zp);

                  if(filter.equals(supertile.getWorldObj(), xp, yp, zp) && (blockAbove.isAir(supertile.getWorldObj(), xp, yp + 1, zp) || blockAbove.isReplaceable(supertile.getWorldObj(), xp, yp + 1, zp)))
                    validPositions.add(new ChunkCoordinates(xp, yp + 1, zp));
                }

            scanned = true;
          }


          if(!validPositions.isEmpty() && !supertile.getWorldObj().isRemote) {
            Block blockToPlace = null;
            if(stackItem instanceof ItemBlock)
              blockToPlace = ((ItemBlock) stackItem).field_150939_a;
            else if(stackItem instanceof ItemReed)
              blockToPlace = ReflectionHelper.getPrivateValue(ItemReed.class, (ItemReed) stackItem, LibObfuscation.REED_ITEM);
            if(blockToPlace != null) {
              if(blockToPlace instanceof ISpecialFlower)
                return;

              ChunkCoordinates coords = validPositions.get(supertile.getWorldObj().rand.nextInt(validPositions.size()));
              if(blockToPlace.canPlaceBlockAt(supertile.getWorldObj(), coords.posX, coords.posY, coords.posZ)) {
                supertile.getWorldObj().setBlock(coords.posX, coords.posY, coords.posZ, blockToPlace, stack.getItemDamage(), 1 | 2);
                if(ConfigHandler.blockBreakParticles)
                  supertile.getWorldObj().playAuxSFX(2001, coords.posX, coords.posY, coords.posZ, Block.getIdFromBlock(blockToPlace) + (stack.getItemDamage() << 12));
                validPositions.remove(coords);
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

    return swapper;
  }

  private static BlockSwapper swapperFromMeta(World world, int x, int y, int z, int meta) {
    switch(meta) {
    case 1 : return new BlockSwapper(world, new ChunkCoordinates(x, y, z),  Blocks.dirt, 2);
    case 2 : return new BlockSwapper(world, new ChunkCoordinates(x, y, z),  Blocks.mycelium, 0);
    default : return new BlockSwapper(world, new ChunkCoordinates(x, y, z),  Blocks.grass, 0);
    }
  }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

                  int x1 = x + k;
                  int z1 = z + l;
                  Block block1 = world.getBlock(x1, y, z1);
                  int meta1 = world.getBlockMetadata(x1, y, z1);
                  if(block1 == Blocks.dirt && meta1 == 0)
                    validCoords.add(new ChunkCoordinates(x1, y, z1));
                }

              if(!validCoords.isEmpty() && !world.isRemote) {
                ChunkCoordinates coords = validCoords.get(rand.nextInt(validCoords.size()));
                world.setBlock(coords.posX, coords.posY, coords.posZ, blockToSet, metaToSet, 1 | 2);
              }
            }
          }
        }
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.