mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-25 01:25:03 +01:00
49b5ee78bb
By: Doc <nachito94@msn.com>
29 lines
1.3 KiB
Diff
29 lines
1.3 KiB
Diff
--- a/net/minecraft/world/level/block/BlockCactus.java
|
|
+++ b/net/minecraft/world/level/block/BlockCactus.java
|
|
@@ -22,6 +22,8 @@
|
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
|
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
|
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
|
+
|
|
public class BlockCactus extends Block {
|
|
|
|
public static final MapCodec<BlockCactus> CODEC = simpleCodec(BlockCactus::new);
|
|
@@ -64,7 +66,7 @@
|
|
int j = (Integer) iblockdata.getValue(BlockCactus.AGE);
|
|
|
|
if (j == 15) {
|
|
- worldserver.setBlockAndUpdate(blockposition1, this.defaultBlockState());
|
|
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition1, this.defaultBlockState()); // CraftBukkit
|
|
IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockCactus.AGE, 0);
|
|
|
|
worldserver.setBlock(blockposition, iblockdata1, 4);
|
|
@@ -119,7 +121,7 @@
|
|
|
|
@Override
|
|
public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
|
- entity.hurt(world.damageSources().cactus(), 1.0F);
|
|
+ entity.hurt(world.damageSources().cactus().directBlock(world, blockposition), 1.0F); // CraftBukkit
|
|
}
|
|
|
|
@Override
|