Skip to content

Commit

Permalink
Update DialogueNode.kt
Browse files Browse the repository at this point in the history
  • Loading branch information
HollowHorizon committed Feb 6, 2024
1 parent 46f1278 commit cf944a1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package ru.hollowhorizon.hollowengine.common.scripting.story.nodes.dialogues

import dev.ftb.mods.ftbteams.data.Team
import kotlinx.serialization.Serializable
import net.minecraft.client.Minecraft
import net.minecraft.nbt.CompoundTag
import net.minecraft.network.chat.Component
import net.minecraft.server.level.ServerPlayer
Expand Down Expand Up @@ -63,6 +64,7 @@ class DialogueSayPacket(
@Serializable
class DialogueChoicePacket(val choices: List<String>) : HollowPacketV3<DialogueChoicePacket> {
override fun handle(player: Player, data: DialogueChoicePacket) {
if(Minecraft.getInstance().screen !is DialogueScreen) DialogueScreen.open()
DialogueScreen.updateChoices(data.choices.map { it.mcText })
}

Expand Down

0 comments on commit cf944a1

Please sign in to comment.