File tree 2 files changed +3
-2
lines changed
src/main/kotlin/dev/sterner
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -2,14 +2,15 @@ package dev.sterner.api.revelation
2
2
3
3
import net.minecraft.nbt.CompoundTag
4
4
import net.minecraft.nbt.ListTag
5
+ import net.minecraft.nbt.Tag
5
6
import net.minecraft.network.chat.Component
6
7
7
8
data class ThoughtData (var duration : Int , var delay : Int ) {
8
9
9
10
companion object {
10
11
fun readFromNbt (tag : CompoundTag ): MutableMap <Component , ThoughtData > {
11
12
val thoughtsQueue = mutableMapOf<Component , ThoughtData >()
12
- val thoughtsList = tag.getList(" ThoughtsQueue" , 10 ) // 10 = CompoundTag type
13
+ val thoughtsList = tag.getList(" ThoughtsQueue" , Tag . TAG_COMPOUND .toInt())
13
14
for (i in 0 until thoughtsList.size) {
14
15
val thoughtTag = thoughtsList.getCompound(i)
15
16
val thought = Component .Serializer .fromJson(thoughtTag.getString(" Text" ))
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ class VoidBoundRevelationComponent(private val player: Player) : AutoSyncedCompo
59
59
60
60
// Unlocks all knowledge without checking prerequisites
61
61
fun unlockAllKnowledge () {
62
- KnowledgeType .values() .forEach { knowledgeType ->
62
+ KnowledgeType .entries .forEach { knowledgeType ->
63
63
if (! hasKnowledge(knowledgeType)) {
64
64
knowledgeDataSet.add(KnowledgeData (knowledgeType))
65
65
}
You can’t perform that action at this time.
0 commit comments