From c6d512afe8d4a69fa707e7496f18eb40a65cce11 Mon Sep 17 00:00:00 2001 From: ChampionAsh5357 Date: Fri, 21 Aug 2020 00:35:09 -0400 Subject: [PATCH] Readding DifficultyChangeEvent hooks (#7240) --- .../net/minecraft/client/world/ClientWorld.java.patch | 8 ++++++++ .../net/minecraft/world/WorldSettings.java.patch | 10 ++++++++++ 2 files changed, 18 insertions(+) create mode 100644 patches/minecraft/net/minecraft/world/WorldSettings.java.patch diff --git a/patches/minecraft/net/minecraft/client/world/ClientWorld.java.patch b/patches/minecraft/net/minecraft/client/world/ClientWorld.java.patch index 8ed76c4d5..1ff4dd5d1 100644 --- a/patches/minecraft/net/minecraft/client/world/ClientWorld.java.patch +++ b/patches/minecraft/net/minecraft/client/world/ClientWorld.java.patch @@ -62,3 +62,11 @@ if (p_217384_1_ == this.field_73037_M.field_71439_g) { this.field_73037_M.func_147118_V().func_147682_a(new EntityTickableSound(p_217384_3_, p_217384_4_, p_217384_2_)); } +@@ -857,6 +874,7 @@ + } + + public void func_239156_a_(Difficulty p_239156_1_) { ++ net.minecraftforge.common.ForgeHooks.onDifficultyChange(p_239156_1_, this.field_239153_j_); + this.field_239153_j_ = p_239156_1_; + } + diff --git a/patches/minecraft/net/minecraft/world/WorldSettings.java.patch b/patches/minecraft/net/minecraft/world/WorldSettings.java.patch new file mode 100644 index 000000000..6e98ceae8 --- /dev/null +++ b/patches/minecraft/net/minecraft/world/WorldSettings.java.patch @@ -0,0 +1,10 @@ +--- a/net/minecraft/world/WorldSettings.java ++++ b/net/minecraft/world/WorldSettings.java +@@ -62,6 +62,7 @@ + } + + public WorldSettings func_234948_a_(Difficulty p_234948_1_) { ++ net.minecraftforge.common.ForgeHooks.onDifficultyChange(p_234948_1_, this.field_234944_d_); + return new WorldSettings(this.field_234943_a_, this.field_77172_b, this.field_77170_d, p_234948_1_, this.field_77168_f, this.field_234945_f_, this.field_234946_g_); + } +