Use nextDouble() because PRNG provides 64 bit numbers
This commit is contained in:
parent
42386e1fbe
commit
962ecb1996
@ -17,8 +17,8 @@ object WitheredSkeletonSpawnHandler {
|
|||||||
val entity = event.entity
|
val entity = event.entity
|
||||||
|
|
||||||
if (entity is WitherSkeleton) {
|
if (entity is WitherSkeleton) {
|
||||||
val giveHelmet = event.level.otmRandom.nextFloat() < ServerConfig.WITHER_SKELETON_HELMET_CHANCE
|
val giveHelmet = event.level.otmRandom.nextDouble() < ServerConfig.WITHER_SKELETON_HELMET_CHANCE
|
||||||
val giveSword = event.level.otmRandom.nextFloat() < ServerConfig.WITHER_SKELETON_SWORD_CHANCE
|
val giveSword = event.level.otmRandom.nextDouble() < ServerConfig.WITHER_SKELETON_SWORD_CHANCE
|
||||||
|
|
||||||
if (giveHelmet) {
|
if (giveHelmet) {
|
||||||
if (!entity.hasItemInSlot(EquipmentSlot.HEAD))
|
if (!entity.hasItemInSlot(EquipmentSlot.HEAD))
|
||||||
|
Loading…
Reference in New Issue
Block a user