diff --git a/patches/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java.patch b/patches/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java.patch index 1cd0deab2..5f941f5ab 100644 --- a/patches/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java.patch +++ b/patches/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java.patch @@ -1,5 +1,14 @@ --- ../src-base/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java +++ ../src-work/minecraft/net/minecraft/entity/ai/EntityAIHarvestFarmland.java +@@ -29,7 +29,7 @@ + { + if (this.field_179496_a <= 0) + { +- if (!this.field_179504_c.field_70170_p.func_82736_K().func_82766_b("mobGriefing")) ++ if (!net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.field_179504_c.field_70170_p, this.field_179504_c)) + { + return false; + } @@ -94,6 +94,12 @@ world.func_180501_a(blockpos, Blocks.field_185773_cZ.func_176223_P(), 3); flag = true; @@ -13,12 +22,3 @@ } if (flag) -@@ -29,7 +29,7 @@ - { - if (this.field_179496_a <= 0) - { -- if (!this.field_179504_c.field_70170_p.func_82736_K().func_82766_b("mobGriefing")) -+ if (!net.minecraftforge.event.ForgeEventFactory.getMobGriefingEvent(this.field_179504_c.field_70170_p, this.field_179504_c)) - { - return false; - } diff --git a/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch b/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch index 0f13b844e..e23c17f32 100644 --- a/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch +++ b/patches/minecraft/net/minecraft/server/MinecraftServer.java.patch @@ -275,7 +275,24 @@ } public CrashReport func_71230_b(CrashReport p_71230_1_) -@@ -1598,4 +1644,9 @@ +@@ -1411,6 +1457,16 @@ + @SideOnly(Side.SERVER) + public static void main(String[] p_main_0_) + { ++ //Forge: Copied from DedicatedServer.init as to run as early as possible, Old code left in place intentionally. ++ //Done in good faith with permission: https://github.com/MinecraftForge/MinecraftForge/issues/3659#issuecomment-390467028 ++ ServerEula eula = new ServerEula(new File("eula.txt")); ++ if (!eula.func_154346_a()) ++ { ++ field_147145_h.info("You need to agree to the EULA in order to run the server. Go to eula.txt for more info."); ++ eula.func_154348_b(); ++ return; ++ } ++ + Bootstrap.func_151354_b(); + + try +@@ -1598,4 +1654,9 @@ { return this.field_175590_aa; }