Crash when reforging an unregistered curios type
medsal15 opened this issue ยท 2 comments
No idea whether this is a duplicate of #5 or a separate issue, but my game crashed when I tried to reforge Greed Of Nidhoggur from L2 Hostility
The error is java.lang.RuntimeException: Failed to locate any affixes for greed_of_nidhoggur{null} with category LootCategory[curios:hostility_curse] and rarity LootRarity{apotheosis:mythic}.
@Daripher personally I'm doing this
@Mixin(value = LootController.class, remap = false)
public abstract class MixinLootController {
@Inject(method = "createLootItem(Lnet/minecraft/world/item/ItemStack;Lshadows/apotheosis/adventure/loot/LootCategory;Lshadows/apotheosis/adventure/loot/LootRarity;Lnet/minecraft/util/RandomSource;)Lnet/minecraft/world/item/ItemStack;", at = @At(value = "NEW", target = "(Ljava/lang/String;)Ljava/lang/RuntimeException;", shift = At.Shift.BEFORE), cancellable = true)
private static void stopException(final ItemStack stack, final LootCategory category, final LootRarity rarity, final RandomSource random, final CallbackInfoReturnable<ItemStack> callback) {
callback.setReturnValue(stack);
TrialAndError.LOG.error("Failed to locate any affixes for [{} | {}] with category {} and rarity {}.", stack.getItem(), stack.getTag(), category, rarity);
}
}