SPIGOT-4900: Rearchitect multiworld support for better compat with new villager AI
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -55,9 +55,9 @@
|
||||
+ if (world == null) {
|
||||
+ /* All Maps which do not have their valid world loaded are set to a dimension which hopefully won't be reached.
|
||||
+ This is to prevent them being corrupted with the wrong map data. */
|
||||
+ this.map = new DimensionManager(127, null, null, null, false);
|
||||
+ this.map = new DimensionManager(127, null, null, null, false, DimensionManager.OVERWORLD);
|
||||
+ } else {
|
||||
+ this.map = world.getHandle().dimension;
|
||||
+ this.map = world.getHandle().getWorldProvider().getDimensionManager();
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
@@ -77,7 +77,7 @@
|
||||
+ if (this.uniqueId == null) {
|
||||
+ for (org.bukkit.World world : server.getWorlds()) {
|
||||
+ CraftWorld cWorld = (CraftWorld) world;
|
||||
+ if (cWorld.getHandle().dimension == this.map) {
|
||||
+ if (cWorld.getHandle().getWorldProvider().getDimensionManager() == this.map) {
|
||||
+ this.uniqueId = cWorld.getUID();
|
||||
+ break;
|
||||
+ }
|
||||
|
||||
Reference in New Issue
Block a user