Fixed a bunch of multiworld issues (entity tracking etc)

This commit is contained in:
Dinnerbone
2011-05-26 22:15:27 +01:00
parent 036f49ddbf
commit 1784e42d5f
5 changed files with 37 additions and 17 deletions

View File

@@ -173,11 +173,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
if (oldWorld != newWorld) {
entity.dimension = newWorld.dimension;
entity.netServerHandler.sendPacket(new Packet9Respawn((byte) entity.dimension));
entity.netServerHandler.sendPacket(new Packet9Respawn((byte) location.getWorld().getEnvironment().getId()));
oldWorld.removeEntity(entity);
entity.dead = false;
entity.setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
if (entity.Q()) {
oldWorld.entityJoinedWorld(entity, false);
newWorld.addEntity(entity);
entity.setPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
newWorld.entityJoinedWorld(entity, false);