@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/BlockCrops.java
|
||||
+++ b/net/minecraft/world/level/block/BlockCrops.java
|
||||
@@ -18,6 +18,8 @@
|
||||
@@ -21,6 +21,8 @@
|
||||
import net.minecraft.world.phys.shapes.VoxelShape;
|
||||
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
+
|
||||
public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement {
|
||||
|
||||
public static final BlockStateInteger AGE = BlockProperties.ai;
|
||||
@@ -72,7 +74,7 @@
|
||||
public static final int MAX_AGE = 7;
|
||||
@@ -76,7 +78,7 @@
|
||||
float f = a((Block) this, (IBlockAccess) worldserver, blockposition);
|
||||
|
||||
if (random.nextInt((int) (25.0F / f) + 1) == 0) {
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -87,7 +89,7 @@
|
||||
@@ -91,7 +93,7 @@
|
||||
i = j;
|
||||
}
|
||||
|
||||
@@ -27,12 +27,12 @@
|
||||
}
|
||||
|
||||
protected int a(World world) {
|
||||
@@ -145,7 +147,7 @@
|
||||
@@ -149,7 +151,7 @@
|
||||
|
||||
@Override
|
||||
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
- if (entity instanceof EntityRavager && world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
||||
+ if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // CraftBukkit
|
||||
- if (entity instanceof EntityRavager && world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
|
||||
+ if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), !world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { // CraftBukkit
|
||||
world.a(blockposition, true, entity);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user