-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6c61b49
commit 6dfe2d0
Showing
11 changed files
with
53 additions
and
24 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
api/src/main/kotlin/com/possible_triangle/skygrid/api/xml/DeserializationException.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
package com.possible_triangle.skygrid.api.xml | ||
|
||
import nl.adaptivity.xmlutil.serialization.XmlSerialException | ||
import kotlinx.serialization.SerializationException | ||
|
||
class DeserializationException( | ||
val location: String?, | ||
val field: String, | ||
val candidates: Collection<Any> = emptyList(), | ||
) : | ||
XmlSerialException("Unknown field $field at $location") | ||
SerializationException("Unknown field $field at $location") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
common/src/main/kotlin/com/possible_triangle/skygrid/extensions/SourcedRandom.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.possible_triangle.skygrid.extensions | ||
|
||
import net.minecraft.util.RandomSource | ||
import net.minecraft.world.level.levelgen.XoroshiroRandomSource | ||
import kotlin.random.Random | ||
|
||
class SourcedRandom(private val source: RandomSource) : Random { | ||
|
||
override fun nextBits(bitCount: Int) = when(source) { | ||
is XoroshiroRandomSource -> source.nextBits | ||
} | ||
|
||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters