Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Author:
- Committer:
- Parent: a4f280230688e1d02946973d7f67a7e1746cc375 (Add I18n accessor, fix up some mod log messages, make the EnumExtender work.)
- Branch:
- Follows:
- Precedes:
- Local changes checked in to index but not committed
- --------- patches/minecraft/net/minecraft/world/chunk/Chunk.java.patch ---------
- index 434707fa0..4c162d650 100644
- @@ -17,3 +17,23 @@
- }
- public Chunk(World p_i48703_1_, ChunkPrimer p_i48703_2_, int p_i48703_3_, int p_i48703_4_) {
- +@@ -1164,4 +1165,19 @@
- + QUEUED,
- + CHECK;
- + }
- ++
- ++ // FORGE start
- ++
- ++ @java.lang.Deprecated
- ++ @javax.annotation.Nullable
- ++ public final NBTTagCompound writeCapsToNBT()
- ++ {
- ++ return this.serializeCaps();
- + }
- ++
- ++ @java.lang.Deprecated
- ++ public final void readCapsFromNBT(NBTTagCompound tag)
- ++ {
- ++ this.deserializeCaps(tag);
- ++ }
- ++}
- patches/minecraft/net/minecraft/world/chunk/storage/AnvilChunkLoader.java.patch
- index fad6efd86..88c6d519c 100644
- @@ -1,31 +1,32 @@
- --- a/net/minecraft/world/chunk/storage/AnvilChunkLoader.java
- +++ b/net/minecraft/world/chunk/storage/AnvilChunkLoader.java
- -@@ -445,7 +445,19 @@
- +@@ -445,7 +445,20 @@
- compound.setTag("Heightmaps", nbttagcompound2);
- compound.setTag("Structures", this.func_202160_a(chunkIn.x, chunkIn.z, chunkIn.func_201609_c(), chunkIn.func_201604_d()));
- +
- -+ if (chunkIn.getCapabilities() != null)
- ++ try
- + {
- -+ try
- ++ final NBTTagCompound capTag = chunkIn.writeCapsToNBT();
- ++ if (capTag != null)
- + {
- -+ compound.setTag("ForgeCaps", chunkIn.getCapabilities().serializeNBT());
- ++ compound.setTag("ForgeCaps", capTag);
- }
- -+ catch (Exception exception)
- -+ {
- -+ org.apache.logging.log4j.LogManager.getLogger().error("A capability provider has thrown an exception trying to write state. It will not persist. Report this to the mod author", exception);
- -+ }
- ++ }
- ++ catch (Exception exception)
- ++ {
- ++ org.apache.logging.log4j.LogManager.getLogger().error("A capability provider has thrown an exception trying to write state. It will not persist. Report this to the mod author", exception);
- + }
- + }
- private Chunk readChunkFromNBT(IWorld worldIn, NBTTagCompound compound) {
- int i = compound.getInteger("xPos");
- -@@ -511,6 +523,10 @@
- +@@ -511,6 +524,10 @@
- chunk.setModified(true);
- }
- -+ if (chunk.getCapabilities() != null && compound.hasKey("ForgeCaps")) {
- -+ chunk.getCapabilities().deserializeNBT(compound.getCompoundTag("ForgeCaps"));
- ++ if (compound.hasKey("ForgeCaps")) {
- ++ chunk.readCapsFromNBT(compound.getCompoundTag("ForgeCaps"));
- + }
- +
- return chunk;
Advertisement
Add Comment
Please, Sign In to add comment