From 896e785994e825443b5b04b8eac41c2535c5ab7b Mon Sep 17 00:00:00 2001 From: Draco18s Date: Tue, 1 Oct 2019 21:52:24 -0500 Subject: [PATCH] Patch Sweet Berry Bush to have Crop Growth Event Hook (#6094) --- .../minecraft/block/SweetBerryBushBlock.java.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 patches/minecraft/net/minecraft/block/SweetBerryBushBlock.java.patch diff --git a/patches/minecraft/net/minecraft/block/SweetBerryBushBlock.java.patch b/patches/minecraft/net/minecraft/block/SweetBerryBushBlock.java.patch new file mode 100644 index 000000000..087d46583 --- /dev/null +++ b/patches/minecraft/net/minecraft/block/SweetBerryBushBlock.java.patch @@ -0,0 +1,13 @@ +--- a/net/minecraft/block/SweetBerryBushBlock.java ++++ b/net/minecraft/block/SweetBerryBushBlock.java +@@ -47,8 +47,9 @@ + public void func_196267_b(BlockState p_196267_1_, World p_196267_2_, BlockPos p_196267_3_, Random p_196267_4_) { + super.func_196267_b(p_196267_1_, p_196267_2_, p_196267_3_, p_196267_4_); + int i = p_196267_1_.func_177229_b(field_220125_a); +- if (i < 3 && p_196267_4_.nextInt(5) == 0 && p_196267_2_.func_201669_a(p_196267_3_.func_177984_a(), 0) >= 9) { ++ if (i < 3 && p_196267_2_.func_201669_a(p_196267_3_.func_177984_a(), 0) >= 9 && net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_196267_2_, p_196267_3_, p_196267_1_, p_196267_4_.nextInt(5) == 0)) { + p_196267_2_.func_180501_a(p_196267_3_, p_196267_1_.func_206870_a(field_220125_a, Integer.valueOf(i + 1)), 2); ++ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_196267_2_, p_196267_3_, p_196267_1_); + } + + }