From 51d08ad8abe59ad52e4436b1b041216f29fa1f94 Mon Sep 17 00:00:00 2001 From: cpw Date: Thu, 17 Oct 2019 23:56:04 -0400 Subject: [PATCH] Fix clientside chunk load event spam. Was an offset patch.. Also fire unload on the client side too. Signed-off-by: cpw --- .../ClientChunkProvider.java.patch | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/patches/minecraft/net/minecraft/client/multiplayer/ClientChunkProvider.java.patch b/patches/minecraft/net/minecraft/client/multiplayer/ClientChunkProvider.java.patch index 898c60945..437385573 100644 --- a/patches/minecraft/net/minecraft/client/multiplayer/ClientChunkProvider.java.patch +++ b/patches/minecraft/net/minecraft/client/multiplayer/ClientChunkProvider.java.patch @@ -1,10 +1,18 @@ --- a/net/minecraft/client/multiplayer/ClientChunkProvider.java +++ b/net/minecraft/client/multiplayer/ClientChunkProvider.java -@@ -72,6 +72,7 @@ - if (this.field_217256_d.func_217183_b(p_212849_1_, p_212849_2_)) { - Chunk chunk = this.field_217256_d.func_217192_a(this.field_217256_d.func_217191_a(p_212849_1_, p_212849_2_)); - if (func_217249_a(chunk, p_212849_1_, p_212849_2_)) { -+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkEvent.Load(chunk)); - return chunk; +@@ -61,6 +61,7 @@ + int i = this.field_217256_d.func_217191_a(p_73234_1_, p_73234_2_); + Chunk chunk = this.field_217256_d.func_217192_a(i); + if (func_217249_a(chunk, p_73234_1_, p_73234_2_)) { ++ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkEvent.Unload(chunk)); + this.field_217256_d.func_217190_a(i, chunk, (Chunk)null); } + +@@ -113,6 +114,7 @@ + worldlightmanager.func_215566_a(SectionPos.func_218154_a(p_217250_2_, j, p_217250_3_), ChunkSection.func_222628_a(chunksection)); + } + ++ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkEvent.Load(chunk)); + return chunk; } + }