@@ -1,15 +1,15 @@
|
||||
--- a/net/minecraft/server/TileEntity.java
|
||||
+++ b/net/minecraft/server/TileEntity.java
|
||||
@@ -4,9 +4,18 @@
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
@@ -5,8 +5,18 @@
|
||||
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;
|
||||
+import org.bukkit.inventory.InventoryHolder;
|
||||
+// CraftBukkit end
|
||||
|
||||
+
|
||||
public abstract class TileEntity {
|
||||
|
||||
+ // CraftBukkit start - data containers
|
||||
@@ -19,7 +19,7 @@
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private final TileEntityTypes<?> tileType;
|
||||
@Nullable
|
||||
@@ -38,6 +47,14 @@
|
||||
@@ -38,6 +48,14 @@
|
||||
|
||||
public void load(IBlockData iblockdata, NBTTagCompound nbttagcompound) {
|
||||
this.position = new BlockPosition(nbttagcompound.getInt("x"), nbttagcompound.getInt("y"), nbttagcompound.getInt("z"));
|
||||
@@ -34,7 +34,7 @@
|
||||
}
|
||||
|
||||
public NBTTagCompound save(NBTTagCompound nbttagcompound) {
|
||||
@@ -54,6 +71,11 @@
|
||||
@@ -54,6 +72,11 @@
|
||||
nbttagcompound.setInt("x", this.position.getX());
|
||||
nbttagcompound.setInt("y", this.position.getY());
|
||||
nbttagcompound.setInt("z", this.position.getZ());
|
||||
@@ -46,7 +46,7 @@
|
||||
return nbttagcompound;
|
||||
}
|
||||
}
|
||||
@@ -169,4 +191,13 @@
|
||||
@@ -169,4 +192,13 @@
|
||||
}, this::getPosition});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user