feat: adjust rhythm random to change per-second

This commit is contained in:
xtex 2023-07-30 10:17:38 +08:00
parent 726a0337c5
commit bdccd0c7f3
Signed by: xtex
GPG Key ID: B918086ED8045B91

View File

@ -33,7 +33,7 @@ class MusicPlayer(val seed: Long, val level: Level, val pos: BlockPos, val start
var notes = Composer(
noteRandom = Random(seed),
rhythmRandom = Random(startedAt / 20 * 15),
rhythmRandom = Random(startedAt / 20),
instrument = level.getBlockState(pos).getValue(BlockStateProperties.NOTEBLOCK_INSTRUMENT)
).composeMusic().toMutableList()
val totalTime = notes.sumOf { it.time }.toLong()