
Crash when crafting new totem from three: "Tried getting a random ability for a rarity for which no abilities exist"
BartAlcorn opened this issue ยท 7 comments
Issue type:
Only keep the issue types that are applicable.
- ๐ Bug
Short description:
Place three ability totems in a crafting table, immediately crash as soon as third totem is placed. Not always, it obviously depends on if the RNG fails to find a new totem.
Expected behaviour:
A new, random totem is crafted. If the RNG can't find a totem, it should try again, not hard crash.
Actual behaviour:
Hard crash. Upon restart, the third/last totem that was being placed is gone. The two in the crafting table are on the ground, or sometimes in inventory.
Steps to reproduce the problem:
Random crash upon placing three totems in crafting table.
Versions:
Exact versions of the following mods, not just latest.
- This mod:
- CyclopsCore: CyclopsCore-1.12.2-0.11.5
- Minecraft: 1.12.2
- Forge: forge-1.12.2-14.23.2.2641
Log file:
java.lang.IllegalStateException: Tried getting a random ability for a rarity for which no abilities exist: RARE
at org.cyclops.everlastingabilities.ability.AbilityHelpers.getRandomAbility(AbilityHelpers.java:182)
at org.cyclops.everlastingabilities.ability.AbilityHelpers.getRandomTotem(AbilityHelpers.java:186)
at org.cyclops.everlastingabilities.recipe.TotemRecycleRecipe.func_77572_b(TotemRecycleRecipe.java:85)
Can gist post the entirety, if need be, but this should help.
Ah, ok, then some rarities probably have no ability registered for them. This should not be able to crash though, so I'll have to fix this.
Different error, still crashed:
java.util.NoSuchElementException: No value present
at java.util.Optional.get(Optional.java:135)
at org.cyclops.everlastingabilities.recipe.TotemRecycleRecipe.func_77572_b(TotemRecycleRecipe.java:94)
Still crashing.
Full crash report at : https://pastebin.com/au16aZQx
java.util.NoSuchElementException: No value present
at java.util.Optional.get(Optional.java:135)
at org.cyclops.everlastingabilities.item.ItemAbilityTotemConfig$1.func_186553_a(ItemAbilityTotemConfig.java:75)
at net.minecraft.world.storage.loot.LootEntryItem.func_186363_a(LootEntryItem.java:36)
at net.minecraft.world.storage.loot.LootPool.func_186452_a(LootPool.java:68)
at net.minecraft.world.storage.loot.LootPool.func_186449_b(LootPool.java:83)
at net.minecraft.world.storage.loot.LootTable.func_186462_a(LootTable.java:42)
at net.minecraft.world.storage.loot.LootTable.func_186460_a(LootTable.java:57)
at net.minecraft.entity.item.EntityMinecartContainer.func_184288_f(EntityMinecartContainer.java:281)
at net.minecraft.entity.item.EntityMinecartContainer.func_70301_a(EntityMinecartContainer.java:69)
Pastebin
@BartAlcorn Could you please try the latest dev build (see readme) and see if this works for you? If not, can you share your full config file, as I can not reproduce the issue myself.