drop duplicate block update

This commit is contained in:
Lulu13022002
2024-12-19 22:12:09 +01:00
parent 1f86b55302
commit 25a7793b9c
7 changed files with 18 additions and 21 deletions

View File

@@ -692,7 +692,7 @@
if (killCredit != null) {
killCredit.awardKillScore(this, damageSource);
}
@@ -1373,68 +_,145 @@
@@ -1373,68 +_,142 @@
}
if (!this.level().isClientSide && this.hasCustomName()) {
@@ -764,11 +764,9 @@
BlockPos blockPos = this.blockPosition();
BlockState blockState = Blocks.WITHER_ROSE.defaultBlockState();
if (this.level().getBlockState(blockPos).isAir() && blockState.canSurvive(this.level(), blockPos)) {
this.level().setBlock(blockPos, blockState, 3);
- this.level().setBlock(blockPos, blockState, 3);
- var6 = true;
+ // CraftBukkit start - call EntityBlockFormEvent for Wither Rose
+ var6 = org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.level(), blockPos, blockState, 3, this);
+ // CraftBukkit end
+ var6 = org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.level(), blockPos, blockState, 3, this); // CraftBukkit - call EntityBlockFormEvent for Wither Rose
}
}