mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-13 17:37:58 -04:00
fix weighted model retrieving
Yes, that `.toInt()` was missing. It literally took me over one hour to debug. I attached a debugger to minecraft and it was a total mess.
This commit is contained in:
parent
175f6d0729
commit
7726de25c7
@ -40,7 +40,7 @@ class WeightedBlockRender(
|
||||
if (random == null) return models.first().model
|
||||
random.setSeed(position.positionHash)
|
||||
|
||||
var weightLeft = abs(random.nextLong() % totalWeight)
|
||||
var weightLeft = abs(random.nextLong().toInt() % totalWeight)
|
||||
|
||||
for ((weight, model) in models) {
|
||||
weightLeft -= weight
|
||||
|
Loading…
x
Reference in New Issue
Block a user