Make Amethyst throw both Spread and Grow Events
This commit is contained in:
@@ -1,11 +1,17 @@
|
||||
--- a/net/minecraft/world/level/block/BuddingAmethystBlock.java
|
||||
+++ b/net/minecraft/world/level/block/BuddingAmethystBlock.java
|
||||
@@ -45,7 +45,7 @@
|
||||
@@ -45,7 +45,13 @@
|
||||
if (block != null) {
|
||||
BlockState iblockdata2 = (BlockState) ((BlockState) block.defaultBlockState().setValue(AmethystClusterBlock.FACING, enumdirection)).setValue(AmethystClusterBlock.WATERLOGGED, iblockdata1.getFluidState().getType() == Fluids.WATER);
|
||||
|
||||
- world.setBlockAndUpdate(blockposition1, iblockdata2);
|
||||
+ // 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
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user