Update to Minecraft 1.14.1

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-05-14 10:00:00 +10:00
parent 1825747f6d
commit 788fd7eedc
60 changed files with 322 additions and 587 deletions

View File

@@ -1,9 +1,9 @@
--- a/net/minecraft/server/TileEntity.java
+++ b/net/minecraft/server/TileEntity.java
@@ -3,9 +3,18 @@
import javax.annotation.Nullable;
@@ -4,9 +4,18 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.util.Supplier;
+// CraftBukkit start
+import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
+import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry;
@@ -19,7 +19,7 @@
private static final Logger LOGGER = LogManager.getLogger();
private final TileEntityTypes<?> b;
@Nullable
@@ -35,6 +44,12 @@
@@ -37,6 +46,12 @@
public void load(NBTTagCompound nbttagcompound) {
this.position = new BlockPosition(nbttagcompound.getInt("x"), nbttagcompound.getInt("y"), nbttagcompound.getInt("z"));
@@ -32,7 +32,7 @@
}
public NBTTagCompound save(NBTTagCompound nbttagcompound) {
@@ -51,12 +66,24 @@
@@ -53,12 +68,24 @@
nbttagcompound.setInt("x", this.position.getX());
nbttagcompound.setInt("y", this.position.getY());
nbttagcompound.setInt("z", this.position.getZ());
@@ -57,7 +57,7 @@
String s = nbttagcompound.getString("id");
return (TileEntity) IRegistry.BLOCK_ENTITY_TYPE.getOptional(new MinecraftKey(s)).map((tileentitytypes) -> {
@@ -68,6 +95,7 @@
@@ -70,6 +97,7 @@
}
}).map((tileentity) -> {
try {
@@ -65,9 +65,9 @@
tileentity.load(nbttagcompound);
return tileentity;
} catch (Throwable throwable) {
@@ -157,4 +185,13 @@
public TileEntityTypes<?> q() {
return this.b;
@@ -168,4 +196,13 @@
}, this::getPosition});
}
}
+
+ // CraftBukkit start - add method