Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fuzzy filter on export bus crashes when filter item is indestructable #5172

Closed
pengi opened this issue Apr 22, 2021 · 1 comment · Fixed by #5174
Closed

Fuzzy filter on export bus crashes when filter item is indestructable #5172

pengi opened this issue Apr 22, 2021 · 1 comment · Fixed by #5174
Assignees

Comments

@pengi
Copy link

pengi commented Apr 22, 2021

Describe the bug

When having a an item indestructable (from other mod) that is normally destructable as a filter for the export bus, and having a fuzzy card installed, an exception that crashes the server is raised when used.

Since the item is not exported from the system after crash, the server crashes immediately upon next start.

Running 8.3.0-beta.1

To Reproduce

  1. Install mods:
    -- Applied Energetics 2 - version 8.3.0-beta.1
    -- Apotheosis (version 4.5.1 for me, probably other mods providing the same functionality might work)
    -- Mekanism Generators (only for infinite power source)
  2. Run in creative
  3. Create a minimal ME system (infite power source + ME controller + ME interface + disk drive)
  4. Create a normal chest, connect an export bus + fuzzy card
  5. Create an indestructable pickaxe using /affixloot ANCIENT PICKAXE. Will create an unbreakable diamond pickaxe from the "Apotheosis" mod.
  6. Add the indestructable pickaxe to the export bus as filter
  7. Create a normal pickaxe and put in the ME system

What I see

  • System crashes with exception:
Caused by: java.lang.IllegalStateException: ItemStack#isDamageable() has to be true
	at com.google.common.base.Preconditions.checkState(Preconditions.java:444) ~[guava-21.0.jar:?]
	at appeng.util.item.FuzzyItemVariantList.makeLowerBound(FuzzyItemVariantList.java:148) ~[?:8.3.0-beta.1]
	at appeng.util.item.FuzzyItemVariantList.findFuzzy(FuzzyItemVariantList.java:51) ~[?:8.3.0-beta.1]
	at appeng.util.item.ItemList.findFuzzy(ItemList.java:64) ~[?:8.3.0-beta.1]
	at appeng.util.item.ItemList.findFuzzy(ItemList.java:37) ~[?:8.3.0-beta.1]
	at appeng.parts.automation.ExportBusPart.doBusWork(ExportBusPart.java:155) ~[?:8.3.0-beta.1]
	at appeng.parts.automation.ExportBusPart.tickingRequest(ExportBusPart.java:216) ~[?:8.3.0-beta.1]
	at appeng.me.cache.TickManagerCache.onUpdateTick(TickManagerCache.java:84) ~[?:8.3.0-beta.1]
	... 17 more

Expected behavior

Except the new pickaxe to be exported to the chest

Additional context

Log: https://pastebin.com/eddxiE8z

Environment

Crash report: https://pastebin.com/W90nRBWE

Notes

Probably caused by 0bdc408 when the makeLowerBound() function added a precondition rather than defaulting the damage value in case isDamageable() is false.

@shartte shartte self-assigned this Apr 22, 2021
shartte added a commit that referenced this issue Apr 23, 2021
…ave to check the item. ItemStacks can be made indestructible in various ways, while the decision to use a fuzzy item list is based on the base-item only.
shartte added a commit that referenced this issue Apr 23, 2021
…ave to check the item. ItemStacks can be made indestructible in various ways, while the decision to use a fuzzy item list is based on the base-item only.
shartte added a commit that referenced this issue Apr 23, 2021
…ave to check the item. ItemStacks can be made indestructible in various ways, while the decision to use a fuzzy item list is based on the base-item only.
shartte added a commit that referenced this issue Apr 23, 2021
…ave to check the item. ItemStacks can be made indestructible in various ways, while the decision to use a fuzzy item list is based on the base-item only. (#5174)
@pengi
Copy link
Author

pengi commented Apr 24, 2021

Oh, that was quick. Thanks :)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants