make WorldSavedData implement NBTSerializable (#2745)

This commit is contained in:
Kina 2016-04-10 08:09:06 +09:00 committed by LexManos
parent 2a3774def3
commit 68cd48287b

View file

@ -0,0 +1,28 @@
--- ../src-base/minecraft/net/minecraft/world/WorldSavedData.java
+++ ../src-work/minecraft/net/minecraft/world/WorldSavedData.java
@@ -2,7 +2,7 @@
import net.minecraft.nbt.NBTTagCompound;
-public abstract class WorldSavedData
+public abstract class WorldSavedData implements net.minecraftforge.common.util.INBTSerializable<NBTTagCompound>
{
public final String field_76190_i;
private boolean field_76189_a;
@@ -30,4 +30,16 @@
{
return this.field_76189_a;
}
+
+ public void deserializeNBT(NBTTagCompound nbt)
+ {
+ this.func_76184_a(nbt);
+ }
+
+ public NBTTagCompound serializeNBT()
+ {
+ NBTTagCompound ret = new NBTTagCompound();
+ this.func_76187_b(ret);
+ return ret;
+ }
}