mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 07:20:24 +01:00
Make Amethyst throw both Spread and Grow Events
This commit is contained in:
parent
9fe671127a
commit
1b118883f2
1 changed files with 7 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue