SPIGOT-4900: Rearchitect multiworld support for better compat with new villager AI
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -465,7 +465,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
||||
// Let the server handle cross world teleports
|
||||
if (!location.getWorld().equals(getWorld())) {
|
||||
entity.teleportTo(((CraftWorld) location.getWorld()).getHandle().dimension, new BlockPosition(location.getX(), location.getY(), location.getZ()));
|
||||
entity.teleportTo(((CraftWorld) location.getWorld()).getHandle().getWorldProvider().getDimensionManager(), new BlockPosition(location.getX(), location.getY(), location.getZ()));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -651,7 +651,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
if (fromWorld == toWorld) {
|
||||
entity.playerConnection.teleport(to);
|
||||
} else {
|
||||
server.getHandle().moveToWorld(entity, toWorld.dimension, true, to, true);
|
||||
server.getHandle().moveToWorld(entity, toWorld.getWorldProvider().getDimensionManager(), true, to, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user