Update to Minecraft 1.13.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2018-08-26 12:00:00 +10:00
parent 034c12d001
commit f578d94680
182 changed files with 1891 additions and 1879 deletions

View File

@@ -16,9 +16,9 @@
public class WorldMap extends PersistentBase {
public int centerX;
@@ -21,8 +30,18 @@
private final Map<String, MapIconBanner> k = Maps.newHashMap();
@@ -22,8 +31,18 @@
public Map<String, MapIcon> decorations = Maps.newLinkedHashMap();
private final Map<String, WorldMapFrame> l = Maps.newHashMap();
+ // CraftBukkit start
+ public final CraftMapView mapView;
@@ -34,25 +34,16 @@
+ // CraftBukkit end
}
public void a(int i, int j, int k, boolean flag, boolean flag1, int l) {
@@ -31,7 +50,7 @@
this.map = (byte) l;
this.track = flag;
this.unlimitedTracking = flag1;
- this.d();
+ this.c(); // CraftBukkit - typo
}
public void a(double d0, double d1, int i) {
@@ -44,7 +63,30 @@
public void a(int i, int j, int k, boolean flag, boolean flag1, DimensionManager dimensionmanager) {
@@ -45,7 +64,31 @@
}
public void a(NBTTagCompound nbttagcompound) {
- this.map = nbttagcompound.getByte("dimension");
- this.map = DimensionManager.a(nbttagcompound.getInt("dimension"));
+ // CraftBukkit start
+ byte dimension = nbttagcompound.getByte("dimension");
+ int dimension = nbttagcompound.getInt("dimension");
+
+ if (dimension >= 10) {
+ if (dimension >= CraftWorld.CUSTOM_DIMENSION_OFFSET) {
+ long least = nbttagcompound.getLong("UUIDLeast");
+ long most = nbttagcompound.getLong("UUIDMost");
+
@@ -64,24 +55,25 @@
+ 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. */
+ dimension = 127;
+ this.map = new DimensionManager(127, null, null, null);
+ } else {
+ dimension = (byte) world.getHandle().dimension;
+ this.map = world.getHandle().dimension;
+ }
+ }
+ } else {
+ this.map = DimensionManager.a(dimension);
+ }
+
+ this.map = dimension;
+ // CraftBukkit end
this.centerX = nbttagcompound.getInt("xCenter");
this.centerZ = nbttagcompound.getInt("zCenter");
this.scale = (byte) MathHelper.clamp(nbttagcompound.getByte("scale"), 0, 4);
@@ -67,6 +109,25 @@
@@ -77,6 +120,25 @@
}
public NBTTagCompound b(NBTTagCompound nbttagcompound) {
+ // CraftBukkit start
+ if (this.map >= 10) {
+ if (this.map.getDimensionID() >= CraftWorld.CUSTOM_DIMENSION_OFFSET) {
+ if (this.uniqueId == null) {
+ for (org.bukkit.World world : server.getWorlds()) {
+ CraftWorld cWorld = (CraftWorld) world;
@@ -99,10 +91,10 @@
+ }
+ }
+ // CraftBukkit end
nbttagcompound.setByte("dimension", this.map);
nbttagcompound.setInt("dimension", this.map.getDimensionID());
nbttagcompound.setInt("xCenter", this.centerX);
nbttagcompound.setInt("zCenter", this.centerZ);
@@ -315,12 +376,25 @@
@@ -357,12 +419,25 @@
@Nullable
public Packet<?> a(ItemStack itemstack) {