Package net.minecraft.world

Examples of net.minecraft.world.ChunkPosition


        while (var37.hasNext()) {
          ChunkCoordIntPair var36 = var37.next();

          if (par0WorldServer.theChunkProviderServer.chunkExists(var36.chunkXPos, var36.chunkZPos) && !eligibleChunksForSpawning.get(var36)) {
            ChunkPosition var38 = getRandomSpawningPointInChunk(par0WorldServer, var36.chunkXPos, var36.chunkZPos);
            int var13 = var38.x;
            int var14 = var38.y;
            int var15 = var38.z;

            if (!par0WorldServer.isBlockNormalCube(var13, var14, var15) && par0WorldServer.getBlockMaterial(var13, var14, var15) == var35.getCreatureMaterial()) {
View Full Code Here


    if (isChunkLoaded) {
      setChunkBlockTileEntity(x, y, z, tileEntity);
      worldObj.addTileEntity(tileEntity);
    } else {
      ChunkPosition chunkPosition = new ChunkPosition(x, y, z);
      tileEntity.setWorldObj(worldObj);

      Block block = Block.blocksList[getBlockID(x, y, z)];
      if (block != null && block.hasTileEntity(getBlockMetadata(x, y, z))) {
        TileEntity old = tileMap.put(chunkPosition, tileEntity);
View Full Code Here

    toInvalidate.clear();
    for (Map.Entry<ChunkPosition, TileEntity> entry : tileMap.entrySet()) {
      TileEntity tileEntity = entry.getValue();
      if ((!tileEntity.canUpdate() && tileEntity.isInvalid()) || tileEntity.getClass() == TileEntity.class) {
        tileEntity.invalidate();
        ChunkPosition position = entry.getKey();
        tileMap.remove(position);
        worldObj.loadedTileEntityList.remove(tileEntity);
        int x = position.x, y = position.y, z = position.z;
        int id = getBlockID(x, y, z);
        int meta = getBlockMetadata(x, y, z);
View Full Code Here

  }

  @Override
  @Declare
  public void setChunkBlockTileEntityWithoutValidate(int x, int y, int z, TileEntity tileEntity) {
    ChunkPosition var5 = new ChunkPosition(x, y, z);
    tileEntity.worldObj = worldObj;
    tileEntity.xCoord = xPosition * 16 + x;
    tileEntity.yCoord = y;
    tileEntity.zCoord = zPosition * 16 + z;

View Full Code Here

    }
  }

  @Override
  public TileEntity getChunkBlockTileEntity(int par1, int par2, int par3) {
    ChunkPosition position = new ChunkPosition(par1, par2, par3);
    TileEntity tileEntity = this.tileMap.get(position);

    if (tileEntity != null && tileEntity.isInvalid()) {
      tileMap.remove(position);
      worldObj.loadedTileEntityList.remove(tileEntity);
View Full Code Here

        update();
    }

    public void update(){
        entityItem.age += 4;
        ChunkPosition lastPos = pos;
        pos = drone.getTargetedBlock();
        if(pos != null) {
            if(lastPos == null) {
                oldPos = pos;
            } else if(!pos.equals(lastPos)) {
View Full Code Here

            radioButtons.add(radioButton);
            radioButton.otherChoices = radioButtons;
        }
        if(invSearchGui != null) {
            ProgWidgetArea area = (ProgWidgetArea)widget;
            ChunkPosition pos = invSearchGui.getSearchStack() != null ? ItemGPSTool.getGPSLocation(invSearchGui.getSearchStack()) : null;
            if(pos != null) {
                if(pointSearched == 0) {
                    area.x1 = pos.chunkPosX;
                    area.y1 = pos.chunkPosY;
                    area.z1 = pos.chunkPosZ;
View Full Code Here

        NBTTagCompound compound = gpsTool.stackTagCompound;
        int x = compound.getInteger("x");
        int y = compound.getInteger("y");
        int z = compound.getInteger("z");
        if(x != 0 || y != 0 || z != 0) {
            return new ChunkPosition(x, y, z);
        } else {
            return null;
        }
    }
View Full Code Here

        this.entity = entity;
    }

    @Override
    public int compare(Object arg0, Object arg1){
        ChunkPosition c1 = (ChunkPosition)arg0;
        ChunkPosition c2 = (ChunkPosition)arg1;
        return Double.compare(PneumaticCraftUtils.distBetween(c1.chunkPosX, c1.chunkPosY, c1.chunkPosZ, entity.posX, entity.posY, entity.posZ), PneumaticCraftUtils.distBetween(c2.chunkPosX, c2.chunkPosY, c2.chunkPosZ, entity.posX, entity.posY, entity.posZ));
    }
View Full Code Here

        }
        if(validDroneStacks.isEmpty()) return false;

        List<IInventory> inventories = new ArrayList<IInventory>();
        for(TileEntity te : (List<TileEntity>)drone.worldObj.loadedTileEntityList) {
            if(te instanceof IInventory && validArea.contains(new ChunkPosition(te.xCoord, te.yCoord, te.zCoord))) {
                inventories.add((IInventory)te);
            }
        }

        Collections.sort(inventories, closestTileEntitySorter);
View Full Code Here

TOP

Related Classes of net.minecraft.world.ChunkPosition

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.