Skip to content

Commit

Permalink
fix troll crash
Browse files Browse the repository at this point in the history
  • Loading branch information
IAFEnvoy committed Dec 5, 2024
1 parent 41996c1 commit c12d343
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ public TrollType(String name, CustomArmorMaterial material, Predicate<RegistryEn

public static TrollType getBiomeType(RegistryEntry<Biome> biome) {
List<TrollType> types = TYPES.stream().filter(x -> x.allowSpawn(biome)).toList();
if (types.isEmpty()) RandomHelper.randomOne(TYPES);
return RandomHelper.randomOne(types);
return RandomHelper.randomOne(types.isEmpty() ? TYPES : types);
}

public static BuiltinWeapon getWeaponForType(TrollType troll) {
Expand Down

0 comments on commit c12d343

Please sign in to comment.