Trash Cans

Trash Cans

52M Downloads

[Crash - Neo] Crash Upon Filter Items Save

Closed this issue ยท 3 comments

commented

Version Info

  • Minecraft 1.21.1 + Neo 21.1.76
  • Trash Cans 1.0.18b
  • Core + Config Lib 1.1.8

Description

  • Crash happens upon breaking the Item Trash Can with item that has ANY enchantment (tested with Unbreaking, presumably applies to all enchantments in any levels). Empty filter or filter with non-enchanted items will not causes crash.
  • Crash happened in single-player mode.
  • Tested with a fresh Neoforge instance with no other mods but this mod and its dependencies.

Crash description
Full stack trace has been truncated to relevant parts.

IllegalStateException: Element Reference{ResourceKey[minecraft:enchantment / minecraft:efficiency]=Enchantment Efficiency} is not valid in current registry set
	at DataResult$Error.getOrThrow(DataResult.java:287)
	at DataResult.getOrThrow(DataResult.java:81)
	at DataComponentUtil.wrapEncodingExceptions(DataComponentUtil.java:24)
	at ItemStack.save(ItemStack.java:415)
	at ItemStack.saveOptional(ItemStack.java:429)
        * at TrashCanBlockEntity.writeData(TrashCanBlockEntity.java:320)
	* at com.supermartijn642.core.block.BaseBlockEntity.saveAdditional(BaseBlockEntity.java:70)
	at BlockEntity.saveWithoutMetadata(BlockEntity.java:114)
	at BlockEntity.saveWithFullMetadata(BlockEntity.java:101)
commented

Crash happens upon breaking the Item Trash Can with item that has ANY enchantment (tested with Unbreaking, presumably applies to all enchantments in any levels).

Empty filter or filter with non-enchanted items will not causes crash.

I am confused, does the crash happen when you break the trash can with an enchanted item or does the crash happen when you use an enchanted item in the filter?

commented

I mean crash happened when any enchanted item is in the filter slots

commented

Should be fixed now in version 1.0.18c of Trash Cans.
Thank you for reporting the issue!