Skip to content

Commit 0c2de6b

Browse files
committed
jfyjf
1 parent 6ae8ea7 commit 0c2de6b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/kotlin/dev/sterner/api/revelation/ThoughtData.kt

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ package dev.sterner.api.revelation
22

33
import net.minecraft.nbt.CompoundTag
44
import net.minecraft.nbt.ListTag
5+
import net.minecraft.nbt.Tag
56
import net.minecraft.network.chat.Component
67

78
data class ThoughtData(var duration: Int, var delay: Int) {
89

910
companion object {
1011
fun readFromNbt(tag: CompoundTag): MutableMap<Component, ThoughtData> {
1112
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())
1314
for (i in 0 until thoughtsList.size) {
1415
val thoughtTag = thoughtsList.getCompound(i)
1516
val thought = Component.Serializer.fromJson(thoughtTag.getString("Text"))

src/main/kotlin/dev/sterner/common/components/VoidBoundRevelationComponent.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class VoidBoundRevelationComponent(private val player: Player) : AutoSyncedCompo
5959

6060
// Unlocks all knowledge without checking prerequisites
6161
fun unlockAllKnowledge() {
62-
KnowledgeType.values().forEach { knowledgeType ->
62+
KnowledgeType.entries.forEach { knowledgeType ->
6363
if (!hasKnowledge(knowledgeType)) {
6464
knowledgeDataSet.add(KnowledgeData(knowledgeType))
6565
}

0 commit comments

Comments
 (0)