Package net.minecraft.util

Examples of net.minecraft.util.ChunkCoordinates


  public boolean canCoordinateBeSpawn(int par1, int par2) {
    return false;
  }

  public ChunkCoordinates getEntrancePortalLocation() {
    return new ChunkCoordinates(50, 5, 0);
  }
View Full Code Here


        if (dim == paramEntityPlayer.dimension) {
          int x = ItemSkyPearl.getX(stackToCount);
          int y = ItemSkyPearl.getY(stackToCount);
          int z = ItemSkyPearl.getZ(stackToCount);

          if (wand.consumeAllVis(paramItemStack, paramEntityPlayer, getVisCost(), false, false) && TileWarpGate.teleportPlayer(paramEntityPlayer, new ChunkCoordinates(x, y, z)))
            wand.consumeAllVis(paramItemStack, paramEntityPlayer, getVisCost(), true, false);
        }
      }

      paramEntityPlayer.clearItemInUse();
View Full Code Here

    if (cooldown > 0) {
      pulseStored = true;
      return;
    }

    ChunkCoordinates endCoords = new ChunkCoordinates(x, y, z);
    ChunkCoordinates targetCoords = getBlockTarget();

    if (worldObj.blockExists(x, y, z)) {
      BlockData endData = new BlockData(endCoords);
      BlockData targetData = new BlockData(targetCoords);
View Full Code Here

    } 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

    swingMod = SWING_SPEED;
    swingProgress = 1;
  }

  public void swingHit() {
    ChunkCoordinates coords = getTargetLoc();
    ItemStack stack = getStackInSlot(0);
    Item item = stack.getItem();
    Block block = worldObj.getBlock(coords.posX, coords.posY, coords.posZ);

    player.setCurrentItemOrArmor(0, stack);
View Full Code Here

  }

  // Copied from ItemInWorldManager, seems to do the trick.
  private void stopBreaking() {
    isBreaking = false;
    ChunkCoordinates coords = getTargetLoc();
    worldObj.destroyBlockInWorldPartially(player.getEntityId(), coords.posX, coords.posY, coords.posZ, -1);
  }
View Full Code Here

  }

  // Copied from ItemInWorldManager, seems to do the trick.
  private void startBreaking(Block block, int meta) {
    int side = SIDES[(getBlockMetadata() & 7) - 2].getOpposite().ordinal();
    ChunkCoordinates coords = getTargetLoc();

    PlayerInteractEvent event = ForgeEventFactory.onPlayerInteract(player, Action.LEFT_CLICK_BLOCK, coords.posX, coords.posY, coords.posZ, side,worldObj);
    if (event.isCanceled()) {
      stopBreaking();
      return;
View Full Code Here

  private void continueBreaking() {
    ++curblockDamage;
    int var1;
    float var4;
    int var5;
    ChunkCoordinates coords = getTargetLoc();

    var1 = curblockDamage - initialDamage;
    Block block = worldObj.getBlock(coords.posX, coords.posY, coords.posZ);

    if (block == Blocks.air)
View Full Code Here

    return var6;
  }

  public boolean detect() {
    ChunkCoordinates coords = getTargetLoc();
    findEntities(coords);
    return !worldObj.isAirBlock(coords.posX, coords.posY, coords.posZ) || !detectedEntities.isEmpty();
  }
View Full Code Here

    AxisAlignedBB boundingBox = AxisAlignedBB.getBoundingBox(coords.posX, coords.posY, coords.posZ, coords.posX + 1, coords.posY + 1, coords.posZ + 1);
    detectedEntities = worldObj.getEntitiesWithinAABB(Entity.class, boundingBox);
  }

  public ChunkCoordinates getTargetLoc() {
    ChunkCoordinates coords = new ChunkCoordinates(xCoord, yCoord, zCoord);

    int meta = getBlockMetadata();
    if (meta == 0) {
            ThaumicTinkerer.log.error("Metadata of a Tool Dynamism tablet is in an invalid state. This is a critical error.");
      return coords;
View Full Code Here

TOP

Related Classes of net.minecraft.util.ChunkCoordinates

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.