aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0892-Make-Amethyst-throw-both-Spread-and-Grow-Events.patch
blob: 96b4aa8c41124690022cab4b879b96a837c87c34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jacob Litewski <jacob.litewski@gmail.com>
Date: Tue, 13 Jun 2023 19:16:39 -0400
Subject: [PATCH] Make Amethyst throw both Spread and Grow Events


diff --git a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
index 79f1fb45447350b5bedee8ce3efe6c150aa9772c..7f58c9f5935cd14ea1096de14633f653eb486d7e 100644
--- a/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/BuddingAmethystBlock.java
@@ -45,7 +45,13 @@ public class BuddingAmethystBlock extends AmethystBlock {
             if (block != null) {
                 BlockState iblockdata2 = (BlockState) ((BlockState) block.defaultBlockState().setValue(AmethystClusterBlock.FACING, enumdirection)).setValue(AmethystClusterBlock.WATERLOGGED, iblockdata1.getFluidState().getType() == Fluids.WATER);
 
+                // Paper start - Have Amethyst throw both spread and grow events
+                if (block == Blocks.SMALL_AMETHYST_BUD) {
                 org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition1, iblockdata2); // CraftBukkit
+                } else {
+                    org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, blockposition1, iblockdata2);
+                }
+                // Paper end - Have Amethyst throw both spread and grow events
             }
 
         }