[Bug] Anvil losts enchantments when damaged
Phoupraw opened this issue ยท 1 comments
Steps to reproduce
- Enchanted an avnil.
- Place it.
- Use it until it's damaged.
- Found its enchantment lost.
Potential Solution
//AnvilBlockMixin
@Override
public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) {
if (!newState.is(BlockTags.ANVIL)) {
super.onRemove(state, world, pos, newState, moved);
}
}