Change getWorld function name to prevent inheritance change in Chunk

This commit is contained in:
LexManos 2018-12-18 16:11:03 -08:00
parent c1225f3876
commit a992a4325b
3 changed files with 18 additions and 17 deletions

View File

@ -17,33 +17,34 @@
} }
public Chunk(World p_i48703_1_, ChunkPrimer p_i48703_2_, int p_i48703_3_, int p_i48703_4_) { public Chunk(World p_i48703_1_, ChunkPrimer p_i48703_2_, int p_i48703_3_, int p_i48703_4_) {
@@ -1164,4 +1165,29 @@ @@ -1164,4 +1165,30 @@
QUEUED, QUEUED,
CHECK; CHECK;
} }
+ +
+ // FORGE start
+
+ /** + /**
+ * <strong>FOR INTERNAL USE ONLY</strong> + * <strong>FOR INTERNAL USE ONLY</strong>
+ * <p> + * <p>
+ * Only public for use in {@link AnvilChunkLoader}. + * Only public for use in {@link AnvilChunkLoader}.
+ */ + */
+ @java.lang.Deprecated + @java.lang.Deprecated
+ @javax.annotation.Nullable + @javax.annotation.Nullable
+ public final NBTTagCompound writeCapsToNBT() + public final NBTTagCompound writeCapsToNBT() {
+ { + return this.serializeCaps();
+ return this.serializeCaps(); + }
} +
+
+ /** + /**
+ * <strong>FOR INTERNAL USE ONLY</strong> + * <strong>FOR INTERNAL USE ONLY</strong>
+ * <p> + * <p>
+ * Only public for use in {@link AnvilChunkLoader}. + * Only public for use in {@link AnvilChunkLoader}.
+ */ + */
+ @java.lang.Deprecated + @java.lang.Deprecated
+ public final void readCapsFromNBT(NBTTagCompound tag) + public final void readCapsFromNBT(NBTTagCompound tag) {
+ { + this.deserializeCaps(tag);
+ this.deserializeCaps(tag);
+ } + }
+} +
+ @Override
+ public World getWorldForge() {
+ return func_177412_p();
+ }
}

View File

@ -6,7 +6,7 @@
BitSet func_205749_a(GenerationStage.Carving p_205749_1_); BitSet func_205749_a(GenerationStage.Carving p_205749_1_);
+ +
+ @Nullable + @Nullable
+ default net.minecraft.world.IWorld getWorld() { + default net.minecraft.world.IWorld getWorldForge() {
+ return null; + return null;
+ } + }
} }

View File

@ -38,7 +38,7 @@ public class ChunkEvent extends WorldEvent
public ChunkEvent(IChunk chunk) public ChunkEvent(IChunk chunk)
{ {
super(chunk.getWorld()); super(chunk.getWorldForge());
this.chunk = chunk; this.chunk = chunk;
} }