diff options
Diffstat (limited to 'nms-patches/WorldData.patch')
-rw-r--r-- | nms-patches/WorldData.patch | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/nms-patches/WorldData.patch b/nms-patches/WorldData.patch index 74f093fb..07e5410f 100644 --- a/nms-patches/WorldData.patch +++ b/nms-patches/WorldData.patch @@ -1,16 +1,26 @@ ---- ../work/decompile-8eb82bde/net/minecraft/server/WorldData.java 2015-01-13 20:36:38.880978444 +1100 -+++ src/main/java/net/minecraft/server/WorldData.java 2015-01-13 20:36:38.880978444 +1100 -@@ -1,6 +1,9 @@ +--- /home/matt/mc-dev-private//net/minecraft/server/WorldData.java 2015-03-01 00:59:18.411214060 +0000 ++++ src/main/java/net/minecraft/server/WorldData.java 2015-03-01 00:59:18.411214060 +0000 +@@ -1,6 +1,11 @@ package net.minecraft.server; import java.util.concurrent.Callable; ++// CraftBukkit start +import org.bukkit.Bukkit; +import org.bukkit.event.weather.ThunderChangeEvent; +import org.bukkit.event.weather.WeatherChangeEvent; ++// CraftBukkit end public class WorldData { -@@ -395,6 +398,18 @@ +@@ -41,6 +46,7 @@ + private int I; + private int J; + private GameRules K; ++ public WorldServer world; // CraftBukkit + + protected WorldData() { + this.c = WorldType.NORMAL; +@@ -395,6 +401,18 @@ } public void setThundering(boolean flag) { @@ -29,7 +39,7 @@ this.s = flag; } -@@ -411,6 +426,18 @@ +@@ -411,6 +429,18 @@ } public void setStorm(boolean flag) { @@ -48,9 +58,22 @@ this.q = flag; } -@@ -645,4 +672,12 @@ - static boolean q(WorldData worlddata) { - return worlddata.x; +@@ -556,6 +586,12 @@ + + public void setDifficulty(EnumDifficulty enumdifficulty) { + this.z = enumdifficulty; ++ // CraftBukkit start ++ PacketPlayOutServerDifficulty packet = new PacketPlayOutServerDifficulty(this.y(), this.z()); // PAIL: Rename ++ for (EntityPlayer player : (java.util.List<EntityPlayer>) (java.util.List) world.players) { ++ player.playerConnection.sendPacket(packet); ++ } ++ // CraftBukkit end + } + + public boolean z() { +@@ -664,4 +700,12 @@ + } + }); } + + // CraftBukkit start - Check if the name stored in NBT is the correct one |