diff options
Diffstat (limited to 'nms-patches/WorldData.patch')
-rw-r--r-- | nms-patches/WorldData.patch | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/nms-patches/WorldData.patch b/nms-patches/WorldData.patch index d81876aa..568e11a8 100644 --- a/nms-patches/WorldData.patch +++ b/nms-patches/WorldData.patch @@ -1,7 +1,7 @@ --- a/net/minecraft/server/WorldData.java +++ b/net/minecraft/server/WorldData.java -@@ -5,6 +5,11 @@ - import java.util.Map; +@@ -11,6 +11,11 @@ + import java.util.Set; import java.util.Map.Entry; import javax.annotation.Nullable; +// CraftBukkit start @@ -12,15 +12,23 @@ public class WorldData { -@@ -49,6 +54,7 @@ - private int M; - private final Map<DimensionManager, NBTTagCompound> N; - private GameRules O; +@@ -62,6 +67,7 @@ + private final Map<DimensionManager, NBTTagCompound> S; + private NBTTagCompound T; + private final GameRules U; + public WorldServer world; // CraftBukkit protected WorldData() { this.f = WorldType.NORMAL; -@@ -437,6 +443,16 @@ +@@ -296,6 +302,7 @@ + nbttagcompound2.setBoolean("Snapshot", true); + nbttagcompound.set("Version", nbttagcompound2); + nbttagcompound.setInt("DataVersion", 1513); ++ if (org.bukkit.craftbukkit.util.CraftMagicNumbers.DATA_VERSION != 1513) throw new AssertionError(); // CraftBukkit - sentinel + nbttagcompound.setLong("RandomSeed", this.e); + nbttagcompound.setString("generatorName", this.f.name()); + nbttagcompound.setInt("generatorVersion", this.f.getVersion()); +@@ -466,6 +473,16 @@ } public void setThundering(boolean flag) { @@ -34,10 +42,10 @@ + } + } + // CraftBukkit end - this.v = flag; + this.y = flag; } -@@ -453,6 +469,16 @@ +@@ -482,6 +499,16 @@ } public void setStorm(boolean flag) { @@ -51,13 +59,13 @@ + } + } + // CraftBukkit end - this.t = flag; + this.w = flag; } -@@ -598,6 +624,12 @@ +@@ -631,6 +658,12 @@ public void setDifficulty(EnumDifficulty enumdifficulty) { - this.C = enumdifficulty; + this.F = enumdifficulty; + // CraftBukkit start + PacketPlayOutServerDifficulty packet = new PacketPlayOutServerDifficulty(this.getDifficulty(), this.isDifficultyLocked()); + for (EntityPlayer player : (java.util.List<EntityPlayer>) (java.util.List) world.players) { @@ -67,9 +75,9 @@ } public boolean isDifficultyLocked() { -@@ -716,4 +748,12 @@ - public void a(DimensionManager dimensionmanager, NBTTagCompound nbttagcompound) { - this.N.put(dimensionmanager, nbttagcompound); +@@ -712,4 +745,12 @@ + public void c(@Nullable NBTTagCompound nbttagcompound) { + this.T = nbttagcompound; } + + // CraftBukkit start - Check if the name stored in NBT is the correct one |