Update to Minecraft 1.14.3-pre4

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-06-21 20:00:00 +10:00
parent 0297d9de8a
commit a8155d2399
109 changed files with 660 additions and 622 deletions

View File

@@ -35,15 +35,15 @@
}
public void a(int i, int j, int k, boolean flag, boolean flag1, DimensionManager dimensionmanager) {
@@ -47,7 +66,31 @@
@@ -48,7 +67,30 @@
@Override
public void a(NBTTagCompound nbttagcompound) {
- this.map = DimensionManager.a(nbttagcompound.getInt("dimension"));
int i = nbttagcompound.getInt("dimension");
- DimensionManager dimensionmanager = DimensionManager.a(i);
+ // CraftBukkit start
+ int dimension = nbttagcompound.getInt("dimension");
+ DimensionManager dimensionmanager = null;
+
+ if (dimension >= CraftWorld.CUSTOM_DIMENSION_OFFSET) {
+ if (i >= CraftWorld.CUSTOM_DIMENSION_OFFSET) {
+ long least = nbttagcompound.getLong("UUIDLeast");
+ long most = nbttagcompound.getLong("UUIDMost");
+
@@ -55,20 +55,19 @@
+ 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, DimensionManager.OVERWORLD);
+ dimensionmanager = new DimensionManager(127, null, null, null, false, DimensionManager.OVERWORLD);
+ } else {
+ this.map = world.getHandle().getWorldProvider().getDimensionManager();
+ dimensionmanager = world.getHandle().getWorldProvider().getDimensionManager();
+ }
+ }
+ } else {
+ this.map = DimensionManager.a(dimension);
+ dimensionmanager = DimensionManager.a(i);
+ }
+
+ // CraftBukkit end
this.centerX = nbttagcompound.getInt("xCenter");
this.centerZ = nbttagcompound.getInt("zCenter");
this.scale = (byte) MathHelper.clamp(nbttagcompound.getByte("scale"), 0, 4);
@@ -81,6 +124,25 @@
if (dimensionmanager == null) {
throw new IllegalArgumentException("Invalid map dimension: " + i);
@@ -88,6 +130,25 @@
@Override
public NBTTagCompound b(NBTTagCompound nbttagcompound) {
@@ -94,7 +93,7 @@
nbttagcompound.setInt("dimension", this.map.getDimensionID());
nbttagcompound.setInt("xCenter", this.centerX);
nbttagcompound.setInt("zCenter", this.centerZ);
@@ -372,12 +434,25 @@
@@ -379,12 +440,25 @@
@Nullable
public Packet<?> a(ItemStack itemstack) {