Update to Minecraft 1.9

This commit is contained in:
md_5
2016-03-01 08:32:46 +11:00
parent e1ebe524a7
commit aa008dff0f
305 changed files with 6684 additions and 6105 deletions

View File

@@ -1,8 +1,8 @@
--- a/net/minecraft/server/WorldData.java
+++ b/net/minecraft/server/WorldData.java
@@ -1,6 +1,11 @@
package net.minecraft.server;
@@ -5,6 +5,11 @@
import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.Callable;
+// CraftBukkit start
+import org.bukkit.Bukkit;
@@ -12,15 +12,15 @@
public class WorldData {
@@ -41,6 +46,7 @@
private int I;
private int J;
private GameRules K;
@@ -49,6 +54,7 @@
private int M;
private final Map<DimensionManager, NBTTagCompound> N;
private GameRules O;
+ public WorldServer world; // CraftBukkit
protected WorldData() {
this.c = WorldType.NORMAL;
@@ -395,6 +401,18 @@
this.f = WorldType.NORMAL;
@@ -441,6 +447,18 @@
}
public void setThundering(boolean flag) {
@@ -36,10 +36,10 @@
+ setThunderDuration(0); // Will force a time reset
+ }
+ // CraftBukkit end
this.s = flag;
this.v = flag;
}
@@ -411,6 +429,18 @@
@@ -457,6 +475,18 @@
}
public void setStorm(boolean flag) {
@@ -55,13 +55,13 @@
+ setWeatherDuration(0); // Will force a time reset
+ }
+ // CraftBukkit end
this.q = flag;
this.t = flag;
}
@@ -556,6 +586,12 @@
@@ -602,6 +632,12 @@
public void setDifficulty(EnumDifficulty enumdifficulty) {
this.z = enumdifficulty;
this.C = enumdifficulty;
+ // CraftBukkit start
+ PacketPlayOutServerDifficulty packet = new PacketPlayOutServerDifficulty(this.getDifficulty(), this.isDifficultyLocked());
+ for (EntityPlayer player : (java.util.List<EntityPlayer>) (java.util.List) world.players) {
@@ -71,15 +71,15 @@
}
public boolean isDifficultyLocked() {
@@ -664,4 +700,12 @@
}
});
@@ -720,4 +756,12 @@
public void a(DimensionManager dimensionmanager, NBTTagCompound nbttagcompound) {
this.N.put(dimensionmanager, nbttagcompound);
}
+
+ // CraftBukkit start - Check if the name stored in NBT is the correct one
+ public void checkName( String name ) {
+ if ( !this.n.equals( name ) ) {
+ this.n = name;
+ if ( !this.levelName.equals( name ) ) {
+ this.levelName = name;
+ }
+ }
+ // CraftBukkit end