Package net.minecraft.world.chunk

Examples of net.minecraft.world.chunk.Chunk.addEntity()


      if (worldObj instanceof WorldServer) {
        Chunk correctChunk = ((WorldServer) worldObj).theChunkProviderServer.getChunkIfExists(entityChunkX, entityChunkZ);
        if (correctChunk == this) {
          Log.severe("What?! This chunk isn't at the position it says it's at...: " + this + " was added at " + entityChunkX + ", " + entityChunkZ);
        } else if (correctChunk != null) {
          correctChunk.addEntity(par1Entity);
          return;
        }
      }
    }
View Full Code Here


          }

          chunk = getChunkIfExists(cX, cZ);
          if (chunk != null) {
            entity.addedToChunk = true;
            chunk.addEntity(entity);
          } else {
            entity.addedToChunk = false;
          }
          entity.chunk = chunk;
        }
View Full Code Here

        NBTTagCompound nbttagcompound2 = (NBTTagCompound) nbttaglist1.tagAt(l);
        Entity entity = EntityList.createEntityFromNBT(nbttagcompound2, world);
        chunk.hasEntities = true;

        if (entity != null) {
          chunk.addEntity(entity);

          for (NBTTagCompound nbttagcompound3 = nbttagcompound2; nbttagcompound3.hasKey("Riding"); nbttagcompound3 = nbttagcompound3.getCompoundTag("Riding")) {
            Entity entity2 = EntityList.createEntityFromNBT(nbttagcompound3.getCompoundTag("Riding"), world);

            if (entity2 != null) {
View Full Code Here

          for (NBTTagCompound nbttagcompound3 = nbttagcompound2; nbttagcompound3.hasKey("Riding"); nbttagcompound3 = nbttagcompound3.getCompoundTag("Riding")) {
            Entity entity2 = EntityList.createEntityFromNBT(nbttagcompound3.getCompoundTag("Riding"), world);

            if (entity2 != null) {
              chunk.addEntity(entity2);
              entity.mountEntity(entity2);
            }
          }
        }
      }
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.