SPIGOT-4900: Rearchitect multiworld support for better compat with new villager AI
By: md_5 <git@md-5.net>
This commit is contained in:
@@ -162,7 +162,7 @@
|
||||
+ this.world = world;
|
||||
+ this.setPosition(position.getX(), position.getY(), position.getZ());
|
||||
+ }
|
||||
+ this.dimension = ((WorldServer) this.world).dimension;
|
||||
+ this.dimension = ((WorldServer) this.world).getWorldProvider().getDimensionManager();
|
||||
+ this.playerInteractManager.a((WorldServer) world);
|
||||
}
|
||||
+ // CraftBukkit end
|
||||
@@ -409,13 +409,13 @@
|
||||
+ f1 = exit.getYaw();
|
||||
+ f = exit.getPitch();
|
||||
+ this.worldChangeInvuln = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
||||
+ dimensionmanager = worldserver1.dimension;
|
||||
+ dimensionmanager = worldserver1.getWorldProvider().getDimensionManager();
|
||||
+ // CraftBukkit end
|
||||
+
|
||||
+ // CraftBukkit start
|
||||
+ this.dimension = dimensionmanager;
|
||||
+
|
||||
+ this.playerConnection.sendPacket(new PacketPlayOutRespawn(worldserver1.worldProvider.getDimensionManager(), this.world.getWorldData().getType(), this.playerInteractManager.getGameMode()));
|
||||
+ this.playerConnection.sendPacket(new PacketPlayOutRespawn(worldserver1.worldProvider.getDimensionManager().getType(), this.world.getWorldData().getType(), this.playerInteractManager.getGameMode()));
|
||||
+ this.playerConnection.sendPacket(new PacketPlayOutServerDifficulty(this.world.getDifficulty(), this.world.getWorldData().isDifficultyLocked()));
|
||||
+ PlayerList playerlist = this.server.getPlayerList();
|
||||
+
|
||||
@@ -427,7 +427,14 @@
|
||||
this.setPositionRotation(d0, d1, d2, f1, f);
|
||||
worldserver.getMethodProfiler().exit();
|
||||
worldserver.getMethodProfiler().enter("placing");
|
||||
@@ -572,6 +814,7 @@
|
||||
@@ -566,12 +808,13 @@
|
||||
d0 = MathHelper.a(d0, d4, d6);
|
||||
d2 = MathHelper.a(d2, d5, d7);
|
||||
this.setPositionRotation(d0, d1, d2, f1, f);
|
||||
- if (dimensionmanager == DimensionManager.THE_END) {
|
||||
+ if (dimensionmanager.getType() == DimensionManager.THE_END) { // CraftBukkit - getType()
|
||||
int i = MathHelper.floor(this.locX);
|
||||
int j = MathHelper.floor(this.locY) - 1;
|
||||
int k = MathHelper.floor(this.locZ);
|
||||
boolean flag = true;
|
||||
boolean flag1 = false;
|
||||
|
||||
Reference in New Issue
Block a user