SPIGOT-4900: Rearchitect multiworld support for better compat with new villager AI

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-05-12 11:15:48 +10:00
parent 8b207fdf78
commit b407bebd8d
22 changed files with 208 additions and 227 deletions

View File

@@ -23,7 +23,7 @@
public abstract class World implements IIBlockAccess, GeneratorAccess, AutoCloseable {
protected static final Logger LOGGER = LogManager.getLogger();
@@ -41,14 +57,87 @@
@@ -41,7 +57,51 @@
protected boolean tickingTileEntities;
private final WorldBorder worldBorder;
@@ -75,9 +75,8 @@
+ // CraftBukkit end
this.methodProfiler = gameprofilerfiller;
this.worldData = worlddata;
- this.worldProvider = dimensionmanager.getWorldProvider(this);
+ this.worldProvider = DimensionManager.a(env.getId()).getWorldProvider(this); // CraftBukkit
this.chunkProvider = (IChunkProvider) bifunction.apply(this, this.worldProvider);
this.worldProvider = dimensionmanager.getWorldProvider(this);
@@ -49,6 +109,35 @@
this.isClientSide = flag;
this.worldBorder = this.worldProvider.getWorldBorder();
this.c = Thread.currentThread();