Skip to content

Commit 7149725

Browse files
committed
Readd dropped StemBlock BlockGrowEvent hunk
1 parent 4932672 commit 7149725

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

paper-server/patches/sources/net/minecraft/world/level/block/StemBlock.java.patch

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
--- a/net/minecraft/world/level/block/StemBlock.java
22
+++ b/net/minecraft/world/level/block/StemBlock.java
3-
@@ -83,7 +_,7 @@
3+
@@ -83,11 +_,11 @@
44
protected void randomTick(BlockState state, final ServerLevel level, final BlockPos pos, final RandomSource random) {
55
if (level.getRawBrightness(pos, 0) >= 9) {
66
float growthSpeed = CropBlock.getGrowthSpeed(this, level, pos);
@@ -9,6 +9,11 @@
99
int age = state.getValue(AGE);
1010
if (age < 7) {
1111
state = state.setValue(AGE, age + 1);
12+
- level.setBlock(pos, state, Block.UPDATE_CLIENTS);
13+
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(level, pos, state, Block.UPDATE_CLIENTS); // CraftBukkit
14+
} else {
15+
Direction direction = Direction.Plane.HORIZONTAL.getRandomDirection(random);
16+
BlockPos relative = pos.relative(direction);
1217
@@ -97,7 +_,11 @@
1318
Optional<Block> fruit = blocks.getOptional(this.fruit);
1419
Optional<Block> stem = blocks.getOptional(this.attachedStem);

0 commit comments

Comments
 (0)