Zenith

Zenith

3M Downloads

[Bug] Anvil losts enchantments when damaged

Phoupraw opened this issue ยท 1 comments

commented

Steps to reproduce

  1. Enchanted an avnil.
  2. Place it.
  3. Use it until it's damaged.
  4. 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);
    }
}
commented

Fixed with 1.0.5