Prevent anvil damage restore
This commit is contained in:
parent
5e2335b255
commit
38a09c0aef
5 changed files with 60 additions and 4 deletions
|
@ -48,7 +48,10 @@ public class EndAnvilBlock extends AnvilBlock implements BlockPatterned {
|
|||
|
||||
@Override
|
||||
public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) {
|
||||
return Collections.singletonList(new ItemStack(this));
|
||||
ItemStack stack = new ItemStack(this);
|
||||
int level = state.getValue(getDestructionProperty());
|
||||
stack.getOrCreateTag().putInt("level", level);
|
||||
return Collections.singletonList(stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue