Readding DifficultyChangeEvent hooks (#7240)

This commit is contained in:
ChampionAsh5357 2020-08-21 00:35:09 -04:00 committed by GitHub
parent 5037adede9
commit c6d512afe8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 0 deletions

View file

@ -62,3 +62,11 @@
if (p_217384_1_ == this.field_73037_M.field_71439_g) { 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_)); 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_;
}

View file

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