mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 00:47:38 +01:00
SPIGOT-5901: Improve multiworld support
This commit is contained in:
parent
b0c6dfe1ae
commit
75a2fb8e0b
@ -49,7 +49,7 @@
|
||||
public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, PlayerInteractManager playerinteractmanager) {
|
||||
super(worldserver, worldserver.getSpawn(), gameprofile);
|
||||
this.spawnDimension = World.OVERWORLD;
|
||||
@@ -66,7 +101,51 @@
|
||||
@@ -66,12 +101,56 @@
|
||||
this.advancementDataPlayer = minecraftserver.getPlayerList().f(this);
|
||||
this.G = 1.0F;
|
||||
this.b(worldserver);
|
||||
@ -101,6 +101,12 @@
|
||||
|
||||
private void b(WorldServer worldserver) {
|
||||
BlockPosition blockposition = worldserver.getSpawn();
|
||||
|
||||
- if (worldserver.getDimensionManager().hasSkyLight() && worldserver.getMinecraftServer().getSaveData().getGameType() != EnumGamemode.ADVENTURE) {
|
||||
+ if (worldserver.getDimensionManager().hasSkyLight() && worldserver.worldDataServer.getGameType() != EnumGamemode.ADVENTURE) { // CraftBukkit
|
||||
int i = Math.max(0, this.server.a(worldserver));
|
||||
int j = MathHelper.floor(worldserver.getWorldBorder().b((double) blockposition.getX(), (double) blockposition.getZ()));
|
||||
|
||||
@@ -137,11 +216,20 @@
|
||||
if (nbttagcompound.hasKeyOfType("recipeBook", 10)) {
|
||||
this.recipeBook.a(nbttagcompound.getCompound("recipeBook"), this.server.getCraftingManager());
|
||||
|
@ -655,7 +655,12 @@
|
||||
}
|
||||
|
||||
public int getPlayerCount() {
|
||||
@@ -747,27 +1035,50 @@
|
||||
@@ -743,31 +1031,54 @@
|
||||
entityplayer.playerInteractManager.a(this.u, EnumGamemode.NOT_SET);
|
||||
}
|
||||
|
||||
- entityplayer.playerInteractManager.b(worldserver.getMinecraftServer().getSaveData().getGameType());
|
||||
+ entityplayer.playerInteractManager.b(worldserver.worldDataServer.getGameType()); // CraftBukkit
|
||||
}
|
||||
|
||||
public void shutdown() {
|
||||
|
@ -73,7 +73,15 @@
|
||||
this.portalTravelAgent = new PortalTravelAgent(this);
|
||||
this.N();
|
||||
this.O();
|
||||
@@ -97,8 +131,42 @@
|
||||
@@ -91,14 +125,48 @@
|
||||
iworlddataserver.setGameType(minecraftserver.getGamemode());
|
||||
}
|
||||
|
||||
- this.structureManager = new StructureManager(this, minecraftserver.getSaveData().getGeneratorSettings());
|
||||
+ this.structureManager = new StructureManager(this, this.worldDataServer.getGeneratorSettings()); // CraftBukkit
|
||||
if (this.getDimensionManager().isCreateDragonBattle()) {
|
||||
- this.dragonBattle = new EnderDragonBattle(this, minecraftserver.getSaveData().getGeneratorSettings().getSeed(), minecraftserver.getSaveData().B());
|
||||
+ this.dragonBattle = new EnderDragonBattle(this, this.worldDataServer.getGeneratorSettings().getSeed(), this.worldDataServer.B()); // CraftBukkit
|
||||
} else {
|
||||
this.dragonBattle = null;
|
||||
}
|
||||
@ -301,7 +309,7 @@
|
||||
if (iprogressupdate != null) {
|
||||
iprogressupdate.a(new ChatMessage("menu.savingLevel"));
|
||||
}
|
||||
@@ -626,6 +740,14 @@
|
||||
@@ -626,11 +740,19 @@
|
||||
|
||||
chunkproviderserver.save(flag);
|
||||
}
|
||||
@ -316,6 +324,12 @@
|
||||
}
|
||||
|
||||
private void ag() {
|
||||
if (this.dragonBattle != null) {
|
||||
- this.server.getSaveData().a(this.dragonBattle.a());
|
||||
+ this.worldDataServer.a(this.dragonBattle.a()); // CraftBukkit
|
||||
}
|
||||
|
||||
this.getChunkProvider().getWorldPersistentData().a();
|
||||
@@ -691,11 +813,24 @@
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user