Package net.minecraft.util

Examples of net.minecraft.util.ChunkCoordinates


    super.writeEntityToNBT(par1nbtTagCompound);
    par1nbtTagCompound.setInteger(TAG_INVUL_TIME, getInvulTime());
    par1nbtTagCompound.setBoolean(TAG_AGGRO, isAggored());
    par1nbtTagCompound.setInteger(TAG_MOB_SPAWN_TICKS, getMobSpawnTicks());

    ChunkCoordinates source = getSource();
    par1nbtTagCompound.setInteger(TAG_SOURCE_X, source.posX);
    par1nbtTagCompound.setInteger(TAG_SOURCE_Y, source.posY);
    par1nbtTagCompound.setInteger(TAG_SOURCE_Z, source.posZ);
  }
View Full Code Here


    super.onLivingUpdate();

    if(!worldObj.isRemote && worldObj.difficultySetting == EnumDifficulty.PEACEFUL)
      setDead();

    ChunkCoordinates source = getSource();
   
    float range = 32F;
    List<EntityPlayer> players = worldObj.getEntitiesWithinAABB(EntityPlayer.class, AxisAlignedBB.getBoundingBox(source.posX + 0.5 - range, source.posY + 0.5 - range, source.posZ + 0.5 - range, source.posX + 0.5 + range, source.posY + 0.5 + range, source.posZ + 0.5 + range));

    range = 12F;
View Full Code Here

        if(worldObj.getCollidingBoundingBoxes(this, boundingBox).isEmpty() && !worldObj.isAnyLiquid(boundingBox))
          flag = true;

        // Prevent out of bounds teleporting
        ChunkCoordinates source = getSource();
        if(vazkii.botania.common.core.helper.MathHelper.pointDistanceSpace(posX, posY, posZ, source.posX, source.posY, source.posZ) > 12)
          flag = false;
      }
    }
View Full Code Here

                  exposed = true;
                  break;
                }

              if(exposed)
                coords.add(new ChunkCoordinates(xp, yp, zp));
            }
          }

      if(coords.isEmpty())
        return;

      Collections.shuffle(coords);
      ChunkCoordinates breakCoords = coords.get(0);
      Block block = supertile.getWorldObj().getBlock(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
      int meta = supertile.getWorldObj().getBlockMetadata(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
      supertile.getWorldObj().setBlockToAir(breakCoords.posX, breakCoords.posY, breakCoords.posZ);
      if(ConfigHandler.blockBreakParticles)
        supertile.getWorldObj().playAuxSFX(2001, breakCoords.posX, breakCoords.posY, breakCoords.posZ, Block.getIdFromBlock(block) + (meta << 12));
View Full Code Here

          for(int k = 2; k >= -2; k--) {
            int x = par4 + i + 1;
            int y = par5 + k + 1;
            int z = par6 + j + 1;
            if(par3World.isAirBlock(x, y, z) && (!par3World.provider.hasNoSky || y < 255) && ModBlocks.flower.canBlockStay(par3World, x, y, z))
              validCoords.add(new ChunkCoordinates(x, y, z));
          }
        }

      int flowerCount = Math.min(validCoords.size(), par3World.rand.nextBoolean() ? 3 : 4);
      for(int i = 0; i < flowerCount; i++) {
        ChunkCoordinates coords = validCoords.get(par3World.rand.nextInt(validCoords.size()));
        validCoords.remove(coords);
        par3World.setBlock(coords.posX, coords.posY, coords.posZ, ModBlocks.flower, par3World.rand.nextInt(16), 1 | 2);
      }
      par1ItemStack.stackSize--;
    } else {
View Full Code Here

  public void onUpdate() {
    setTicksExisted(getTicksExisted() + 1);
    superUpdate();

    if(!fake && !isDead) {
      ChunkCoordinates coords = getBurstSourceChunkCoordinates();
      TileEntity tile = worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ);
      if(tile != null && tile instanceof TileSpreader)
        ((TileSpreader) tile).canShootBurst = false;
    }
View Full Code Here

    NBTTagCompound lensCmp = new NBTTagCompound();
    if(stack != null)
      stack.writeToNBT(lensCmp);
    par1nbtTagCompound.setTag(TAG_LENS_STACK, lensCmp);

    ChunkCoordinates coords = getBurstSourceChunkCoordinates();
    par1nbtTagCompound.setInteger(TAG_SPREADER_X, coords.posX);
    par1nbtTagCompound.setInteger(TAG_SPREADER_Y, coords.posY);
    par1nbtTagCompound.setInteger(TAG_SPREADER_Z, coords.posZ);

    par1nbtTagCompound.setDouble(TAG_LAST_MOTION_X, motionX);
View Full Code Here

        return;

      if(BotaniaAPI.internalHandler.isBuildcraftPipe(tile))
        return;
     
      ChunkCoordinates coords = getBurstSourceChunkCoordinates();
      if(tile != null && (tile.xCoord != coords.posX || tile.yCoord != coords.posY || tile.zCoord != coords.posZ))
        collidedTile = tile;

      if(tile == null || tile.xCoord != coords.posX || tile.yCoord != coords.posY || tile.zCoord != coords.posZ) {
        if(!fake && !noParticles && (!worldObj.isRemote || tile instanceof IClientManaHandler) && tile != null && tile instanceof IManaReceiver && ((IManaReceiver) tile).canRecieveManaFromBursts()) {
View Full Code Here

  @Override
  public void setDead() {
    super.setDead();

    if(!fake) {
      ChunkCoordinates coords = getBurstSourceChunkCoordinates();
      TileEntity tile = worldObj.getTileEntity(coords.posX, coords.posY, coords.posZ);
      if(tile != null && tile instanceof TileSpreader)
        ((TileSpreader) tile).canShootBurst = true;
    } else setDeathTicksForFakeParticle();
  }
View Full Code Here

  public ChunkCoordinates getBurstSourceChunkCoordinates() {
    int x = dataWatcher.getWatchableObjectInt(coordsStart);
    int y = dataWatcher.getWatchableObjectInt(coordsStart + 1);
    int z = dataWatcher.getWatchableObjectInt(coordsStart + 2);

    return new ChunkCoordinates(x, y, z);
  }
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.