Examples of ChunkCoordinates


Examples of net.minecraft.util.ChunkCoordinates

  }

  // 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

Examples of net.minecraft.util.ChunkCoordinates

  }

  // 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

Examples of net.minecraft.util.ChunkCoordinates

  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

Examples of net.minecraft.util.ChunkCoordinates

    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

Examples of net.minecraft.util.ChunkCoordinates

    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

Examples of net.minecraft.util.ChunkCoordinates

  }

  @Override
  public ChunkCoordinates getPlayerCoordinates() {
    return new ChunkCoordinates(tablet.xCoord, tablet.yCoord, tablet.zCoord);
  }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

    if (stack != null && ItemSkyPearl.isAttuned(stack)) {
      int x = ItemSkyPearl.getX(stack);
      int y = ItemSkyPearl.getY(stack);
      int z = ItemSkyPearl.getZ(stack);

      if (teleportPlayer(player, new ChunkCoordinates(x, y, z)))
        teleportedThisTick = true;
    }
  }
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

  private void renderPlayerLook(EntityPlayer player, ItemStack stack) {
    ChunkCoordinates[] coords = ItemPlacementMirror.getBlocksToPlace(stack, player);
    if (ItemPlacementMirror.hasBlocks(stack, player, coords)) {
      ItemStack block = new ItemStack(ItemPlacementMirror.getBlock(stack), 1, ItemPlacementMirror.getBlockMeta(stack));
      ChunkCoordinates lastCoords = new ChunkCoordinates(0, 0, 0);

      GL11.glPushMatrix();
      GL11.glEnable(GL11.GL_BLEND);
      GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

      if (entity != null) {
        entity.copyDataFrom(e, true);

        if (j == 1 && par1 == 1) {
          ChunkCoordinates chunkcoordinates = worldserver1.getSpawnPoint();
          chunkcoordinates.posY = e.worldObj.getTopSolidOrLiquidBlock(chunkcoordinates.posX, chunkcoordinates.posZ);
          entity.setLocationAndAngles((double) chunkcoordinates.posX, (double) chunkcoordinates.posY, (double) chunkcoordinates.posZ, entity.rotationYaw, entity.rotationPitch);
        }

        worldserver1.spawnEntityInWorld(entity);
View Full Code Here

Examples of net.minecraft.util.ChunkCoordinates

  }

  private Object[] getHomeImplementation() {
    if (golem == null)
      return new String[]{ };
    ChunkCoordinates home = golem.getHomePosition();
    return new Integer[]{ home.posX, home.posY, home.posZ, golem.homeFacing };
  }
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.