mirror of
https://github.com/PaperMC/Paper.git
synced 2025-09-01 21:03:52 -07:00
Fixed a bunch of multiworld issues (entity tracking etc)
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user