Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-22 14:28:09 +01:00
30 Zeilen
1.4 KiB
Diff
30 Zeilen
1.4 KiB
Diff
--- a/net/minecraft/server/BlockCocoa.java
|
|
+++ b/net/minecraft/server/BlockCocoa.java
|
|
@@ -3,6 +3,8 @@
|
|
import java.util.Random;
|
|
import javax.annotation.Nullable;
|
|
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
|
+
|
|
public class BlockCocoa extends BlockFacingHorizontal implements IBlockFragilePlantElement {
|
|
|
|
public static final BlockStateInteger AGE = BlockProperties.T;
|
|
@@ -21,7 +23,7 @@
|
|
int i = ((Integer) iblockdata.get(BlockCocoa.AGE)).intValue();
|
|
|
|
if (i < 2) {
|
|
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(i + 1)), 2);
|
|
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(i + 1)), 2); // CraftBukkkit
|
|
}
|
|
}
|
|
|
|
@@ -109,7 +111,7 @@
|
|
}
|
|
|
|
public void b(World world, Random random, BlockPosition blockposition, IBlockData iblockdata) {
|
|
- world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(((Integer) iblockdata.get(BlockCocoa.AGE)).intValue() + 1)), 2);
|
|
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, (IBlockData) iblockdata.set(BlockCocoa.AGE, Integer.valueOf(((Integer) iblockdata.get(BlockCocoa.AGE)).intValue() + 1)), 2); // CraftBukkit
|
|
}
|
|
|
|
public TextureType c() {
|