@@ -1,7 +1,7 @@
|
||||
--- a/net/minecraft/server/WorldData.java
|
||||
+++ b/net/minecraft/server/WorldData.java
|
||||
@@ -11,6 +11,11 @@
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.Map.Entry;
|
||||
import javax.annotation.Nullable;
|
||||
+// CraftBukkit start
|
||||
@@ -12,31 +12,23 @@
|
||||
|
||||
public class WorldData {
|
||||
|
||||
@@ -64,6 +69,7 @@
|
||||
private final Map<DimensionManager, NBTTagCompound> T;
|
||||
private NBTTagCompound U;
|
||||
private final GameRules V;
|
||||
@@ -68,6 +73,7 @@
|
||||
private UUID X;
|
||||
private final GameRules Y;
|
||||
private final CustomFunctionCallbackTimerQueue<MinecraftServer> Z;
|
||||
+ public WorldServer world; // CraftBukkit
|
||||
|
||||
protected WorldData() {
|
||||
this.f = WorldType.NORMAL;
|
||||
@@ -304,6 +310,7 @@
|
||||
nbttagcompound2.setBoolean("Snapshot", false);
|
||||
nbttagcompound.set("Version", nbttagcompound2);
|
||||
nbttagcompound.setInt("DataVersion", 1631);
|
||||
+ if (org.bukkit.craftbukkit.util.CraftMagicNumbers.INSTANCE.getDataVersion() != 1631) throw new AssertionError(); // CraftBukkit - sentinel
|
||||
nbttagcompound.setLong("RandomSeed", this.e);
|
||||
nbttagcompound.setString("generatorName", this.f.b());
|
||||
nbttagcompound.setInt("generatorVersion", this.f.getVersion());
|
||||
@@ -389,6 +396,7 @@
|
||||
nbttagcompound.set("CustomBossEvents", this.U);
|
||||
@@ -419,6 +425,7 @@
|
||||
nbttagcompound.setString("WanderingTraderId", this.X.toString());
|
||||
}
|
||||
|
||||
+ nbttagcompound.setString("Bukkit.Version", Bukkit.getName() + "/" + Bukkit.getVersion() + "/" + Bukkit.getBukkitVersion()); // CraftBukkit
|
||||
}
|
||||
|
||||
public long getSeed() {
|
||||
@@ -478,6 +486,16 @@
|
||||
@@ -508,6 +515,16 @@
|
||||
}
|
||||
|
||||
public void setThundering(boolean flag) {
|
||||
@@ -53,7 +45,7 @@
|
||||
this.z = flag;
|
||||
}
|
||||
|
||||
@@ -494,6 +512,16 @@
|
||||
@@ -524,6 +541,16 @@
|
||||
}
|
||||
|
||||
public void setStorm(boolean flag) {
|
||||
@@ -70,22 +62,22 @@
|
||||
this.x = flag;
|
||||
}
|
||||
|
||||
@@ -643,6 +671,12 @@
|
||||
@@ -673,6 +700,12 @@
|
||||
|
||||
public void setDifficulty(EnumDifficulty enumdifficulty) {
|
||||
this.G = enumdifficulty;
|
||||
+ // CraftBukkit start
|
||||
+ PacketPlayOutServerDifficulty packet = new PacketPlayOutServerDifficulty(this.getDifficulty(), this.isDifficultyLocked());
|
||||
+ for (EntityPlayer player : (java.util.List<EntityPlayer>) (java.util.List) world.players) {
|
||||
+ for (EntityPlayer player : (java.util.List<EntityPlayer>) (java.util.List) world.getPlayers()) {
|
||||
+ player.playerConnection.sendPacket(packet);
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
}
|
||||
|
||||
public boolean isDifficultyLocked() {
|
||||
@@ -723,4 +757,12 @@
|
||||
public void c(@Nullable NBTTagCompound nbttagcompound) {
|
||||
this.U = nbttagcompound;
|
||||
@@ -777,4 +810,12 @@
|
||||
public void a(UUID uuid) {
|
||||
this.X = uuid;
|
||||
}
|
||||
+
|
||||
+ // CraftBukkit start - Check if the name stored in NBT is the correct one
|
||||
|
||||
Reference in New Issue
Block a user