Implement new breaker API

This commit is contained in:
fullwall 2022-04-30 05:58:47 +08:00
parent 97da84c192
commit e4cd18b6e4
2 changed files with 2 additions and 2 deletions

View File

@ -94,7 +94,7 @@ public abstract class AbstractBlockBreaker extends BlockBreaker {
int tickDifference = currentTick - startDigTick;
float damage = getDamage(tickDifference);
if (damage >= 1F) {
entity.getWorld().getBlockAt(x, y, z).breakNaturally(getItemStack());
configuration.blockBreaker().accept(entity.getWorld().getBlockAt(x, y, z), getItemStack());
return BehaviorStatus.SUCCESS;
}
int modifiedDamage = (int) (damage * 10.0F);

View File

@ -203,7 +203,7 @@ citizens.commands.npc.remove.removed-all=You permanently removed all NPCs.
citizens.commands.npc.remove.removed=You permanently removed [[{0}]].
citizens.commands.npc.rename.renamed=You renamed [[{0}]] to [[{1}]].
citizens.commands.npc.respawn.delay-set=Respawn delay set to [[{0}]] ticks.
citizens.commands.npc.respawn.describe=Respawn delay is currently [[{0}]].
citizens.commands.npc.respawn.describe=Respawn delay is currently [[{0}]] ticks.
citizens.commands.npc.select.already-selected=You already have that NPC selected.
citizens.commands.npc.script.invalid-file=Unknown or unavailable script ''[[{0}]]''.
citizens.commands.npc.scoreboard.added-tags=Added these tags: [[{0}]].