@@ -10,11 +10,11 @@
|
||||
|
||||
public static final int MAX_AGE = 7;
|
||||
@@ -76,7 +78,7 @@
|
||||
float f = a((Block) this, (IBlockAccess) worldserver, blockposition);
|
||||
float f = getGrowthSpeed(this, worldserver, blockposition);
|
||||
|
||||
if (random.nextInt((int) (25.0F / f) + 1) == 0) {
|
||||
- worldserver.setTypeAndData(blockposition, this.setAge(i + 1), 2);
|
||||
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, this.setAge(i + 1), 2); // CraftBukkit
|
||||
- worldserver.setBlock(blockposition, this.getStateForAge(i + 1), 2);
|
||||
+ CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, this.getStateForAge(i + 1), 2); // CraftBukkit
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,17 +22,17 @@
|
||||
i = j;
|
||||
}
|
||||
|
||||
- world.setTypeAndData(blockposition, this.setAge(i), 2);
|
||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, this.setAge(i), 2); // CraftBukkit
|
||||
- world.setBlock(blockposition, this.getStateForAge(i), 2);
|
||||
+ CraftEventFactory.handleBlockGrowEvent(world, blockposition, this.getStateForAge(i), 2); // CraftBukkit
|
||||
}
|
||||
|
||||
protected int a(World world) {
|
||||
protected int getBonemealAgeIncrease(World world) {
|
||||
@@ -149,7 +151,7 @@
|
||||
|
||||
@Override
|
||||
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
public void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
||||
- 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);
|
||||
+ if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.defaultBlockState(), !world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)).isCancelled()) { // CraftBukkit
|
||||
world.destroyBlock(blockposition, true, entity);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user