mirror of
https://github.com/Samsuik/Sakura.git
synced 2025-12-28 11:19:08 +00:00
reset block durability after being destroyed
This commit is contained in:
@@ -19,7 +19,13 @@ public final class DurableBlockManager {
|
||||
if (block == null) {
|
||||
this.durableBlocks.put(blockPos, block = new DurableBlock(material.durability()));
|
||||
}
|
||||
return block.damage();
|
||||
|
||||
final boolean destroyedBlock = block.damage();
|
||||
if (destroyedBlock) {
|
||||
this.durableBlocks.invalidate(blockPos);
|
||||
}
|
||||
|
||||
return destroyedBlock;
|
||||
}
|
||||
|
||||
public int durability(final BlockPos pos, final DurableMaterial material) {
|
||||
|
||||
Reference in New Issue
Block a user