From 962ecb1996f132060c491b4bc6b4205608785bf8 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Sat, 15 Mar 2025 10:42:45 +0700 Subject: [PATCH] Use nextDouble() because PRNG provides 64 bit numbers --- .../kotlin/ru/dbotthepony/mc/otm/entity/SpawnModifiers.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/SpawnModifiers.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/SpawnModifiers.kt index d7d1bb5d4..c40ff4f28 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/entity/SpawnModifiers.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/entity/SpawnModifiers.kt @@ -17,8 +17,8 @@ object WitheredSkeletonSpawnHandler { val entity = event.entity if (entity is WitherSkeleton) { - val giveHelmet = event.level.otmRandom.nextFloat() < ServerConfig.WITHER_SKELETON_HELMET_CHANCE - val giveSword = event.level.otmRandom.nextFloat() < ServerConfig.WITHER_SKELETON_SWORD_CHANCE + val giveHelmet = event.level.otmRandom.nextDouble() < ServerConfig.WITHER_SKELETON_HELMET_CHANCE + val giveSword = event.level.otmRandom.nextDouble() < ServerConfig.WITHER_SKELETON_SWORD_CHANCE if (giveHelmet) { if (!entity.hasItemInSlot(EquipmentSlot.HEAD))