Examples of spawnEntityInWorld()


Examples of net.minecraft.world.WorldServer.spawnEntityInWorld()

      oldWorld.removePlayerEntityDangerously(player);
      player.isDead = false;

      if(player.isEntityAlive())
      {
        newWorld.spawnEntityInWorld(player);
        player.setLocationAndAngles(coord.xCoord+0.5, coord.yCoord+1, coord.zCoord+0.5, player.rotationYaw, player.rotationPitch);
        newWorld.updateEntityWithOptionalForce(player, false);
        player.setWorld(newWorld);
      }
View Full Code Here

Examples of net.minecraft.world.WorldServer.spawnEntityInWorld()

    if(entity.worldObj.provider.dimensionId != coord.dimensionId)
    {
      entity.worldObj.removeEntity(entity);
      entity.isDead = false;

      world.spawnEntityInWorld(entity);
      entity.setLocationAndAngles(coord.xCoord+0.5, coord.yCoord+1, coord.zCoord+0.5, entity.rotationYaw, entity.rotationPitch);
      world.updateEntityWithOptionalForce(entity, false);
      entity.setWorld(world);
      world.resetUpdateEntityTick();
View Full Code Here

Examples of net.minecraft.world.WorldServer.spawnEntityInWorld()

      Entity e = EntityList.createEntityByName(EntityList.getEntityString(entity), world);

      if(e != null)
      {
        e.copyDataFrom(entity, true);
        world.spawnEntityInWorld(e);
        teleporter.didTeleport.add(e);
      }

      entity.isDead = true;
    }
View Full Code Here

Examples of net.minecraft.world.WorldServer.spawnEntityInWorld()

        fromDimension = this.mcServer.worldServerForDimension(fromDimensionId);
        entityPlayerMP.dimension = toDimensionId;
        toDimension = this.mcServer.worldServerForDimension(toDimensionId);
        if (fromDimension == toDimension) {
          if (!toDimension.playerEntities.contains(entityPlayerMP)) {
            toDimension.spawnEntityInWorld(entityPlayerMP);
          }
          Log.severe("Can't transfer player to the dimension they are already in! " + entityPlayerMP + ", dimension: " + Log.name(toDimension));
          return;
        }
        entityPlayerMP.playerNetServerHandler.sendPacketToPlayer(new Packet9Respawn(entityPlayerMP.dimension, (byte) entityPlayerMP.worldObj.difficultySetting, toDimension.getWorldInfo().getTerrainType(), toDimension.getHeight(), entityPlayerMP.theItemInWorldManager.getGameType()));
View Full Code Here

Examples of net.minecraft.world.WorldServer.spawnEntityInWorld()

        }
        this.transferEntityToWorld(entityPlayerMP, fromDimensionId, fromDimension, toDimension, teleporter);
        entityPlayerMP.setWorld(toDimension);
        toDimension.theChunkProviderServer.loadChunk((int) entityPlayerMP.posX >> 4, (int) entityPlayerMP.posZ >> 4);
        if (!toDimension.playerEntities.contains(entityPlayerMP)) {
          toDimension.spawnEntityInWorld(entityPlayerMP);
        }
        entityPlayerMP.playerNetServerHandler.setPlayerLocation(entityPlayerMP.posX, entityPlayerMP.posY, entityPlayerMP.posZ, entityPlayerMP.rotationYaw, entityPlayerMP.rotationPitch);
        entityPlayerMP.theItemInWorldManager.setWorld(toDimension);
        this.updateTimeAndWeatherForPlayer(entityPlayerMP, toDimension);
        this.syncPlayerInventory(entityPlayerMP);
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.