mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 20:52:12 -07:00
do not call BlockGrowEvent on each age grow for cactus
this might be something we do in the future but it should be consistent with the rest too closes https://github.com/PaperMC/Paper/issues/12662
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
--- a/net/minecraft/world/level/block/CactusBlock.java
|
--- a/net/minecraft/world/level/block/CactusBlock.java
|
||||||
+++ b/net/minecraft/world/level/block/CactusBlock.java
|
+++ b/net/minecraft/world/level/block/CactusBlock.java
|
||||||
@@ -58,25 +_,29 @@
|
@@ -58,18 +_,22 @@
|
||||||
int ageValue = state.getValue(AGE);
|
int ageValue = state.getValue(AGE);
|
||||||
|
|
||||||
while (level.getBlockState(pos.below(i)).is(this)) {
|
while (level.getBlockState(pos.below(i)).is(this)) {
|
||||||
@@ -29,14 +29,6 @@
|
|||||||
BlockState blockState = state.setValue(AGE, 0);
|
BlockState blockState = state.setValue(AGE, 0);
|
||||||
level.setBlock(pos, blockState, 260);
|
level.setBlock(pos, blockState, 260);
|
||||||
level.neighborChanged(blockState, blockPos, this, null, false);
|
level.neighborChanged(blockState, blockPos, this, null, false);
|
||||||
}
|
|
||||||
|
|
||||||
if (ageValue < 15) {
|
|
||||||
- level.setBlock(pos, state.setValue(AGE, ageValue + 1), 260);
|
|
||||||
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state.setValue(AGE, ageValue + 1), 260); // Paper
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -124,7 +_,8 @@
|
@@ -124,7 +_,8 @@
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Reference in New Issue
Block a user