Readding DifficultyChangeEvent hooks (#7240)

This commit is contained in:
ChampionAsh5357 authored and GitHub committed 2020-08-20 21:35:09 -07:00
1 parent 5037adede9
commit c6d512afe8
2 files changed
+18

No files matched your search

@@ -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_;
}
@@ -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_);
}