From a8bd5e7ece81fce01b9ccf473862d51d3c9b1005 Mon Sep 17 00:00:00 2001 From: Philipp Date: Tue, 15 Oct 2019 23:33:07 +0200 Subject: [PATCH] Add onCropsGrow event to KelpTopBlock (#6171) --- .../net/minecraft/block/KelpTopBlock.java.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/minecraft/net/minecraft/block/KelpTopBlock.java.patch diff --git a/patches/minecraft/net/minecraft/block/KelpTopBlock.java.patch b/patches/minecraft/net/minecraft/block/KelpTopBlock.java.patch new file mode 100644 index 000000000..6698b2f24 --- /dev/null +++ b/patches/minecraft/net/minecraft/block/KelpTopBlock.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/block/KelpTopBlock.java ++++ b/net/minecraft/block/KelpTopBlock.java +@@ -57,8 +57,9 @@ + } else { + BlockPos blockpos = p_196267_3_.func_177984_a(); + BlockState blockstate = p_196267_2_.func_180495_p(blockpos); +- if (blockstate.func_177230_c() == Blocks.field_150355_j && p_196267_1_.func_177229_b(field_203163_a) < 25 && p_196267_4_.nextDouble() < 0.14D) { ++ if (blockstate.func_177230_c() == Blocks.field_150355_j && p_196267_1_.func_177229_b(field_203163_a) < 25 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, blockpos, p_196267_1_, p_196267_4_.nextDouble() < 0.14D)) { + p_196267_2_.func_175656_a(blockpos, p_196267_1_.func_177231_a(field_203163_a)); ++ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + } + + }