Bryce792 / ApotheoticAdditions

Apotheosis Addon
5 stars 5 forks source link

Severe crash attempting to spawn apothetic boss #6

Closed franciscogolen closed 8 months ago

franciscogolen commented 8 months ago

crash-2024-01-17_17.09.31-server (1).txt

I believe this can be caused by a malformed boss json where the min rarity is greater than the max rarity.

Because the line that ends up crashing here is public static LootRarity random(RandomSource rand, float luck, @Nullable LootRarity min, @Nullable LootRarity max) { List<Wrapper> list = LIST.stream().filter(r -> r.clamp(min, max) == r).map(r -> r.wrap(luck)).toList(); return WeightedRandom.getRandomItem(rand, list).map(Wrapper::getData).get(); }

The invalid min/max bounds cause filter(r -> r.clamp(min, max) == r) to filter the list to an empty list

latest mod version minecraft 1.19.2