From 508bd94b5d5ee8bd7fb88d0b36a2f52a73ea084e Mon Sep 17 00:00:00 2001 From: way-zer Date: Fri, 24 Nov 2023 12:19:48 +0800 Subject: [PATCH] =?UTF-8?q?ContentsPatch=20=E5=90=8E=E5=90=91=E5=85=BC?= =?UTF-8?q?=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/cf/wayzer/contentsTweaker/ModMain.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/cf/wayzer/contentsTweaker/ModMain.kt b/src/main/kotlin/cf/wayzer/contentsTweaker/ModMain.kt index 13f93f6..44abf71 100644 --- a/src/main/kotlin/cf/wayzer/contentsTweaker/ModMain.kt +++ b/src/main/kotlin/cf/wayzer/contentsTweaker/ModMain.kt @@ -22,7 +22,10 @@ class ModMain : Mod() { Events.on(WorldLoadBeginEvent::class.java) { if (ContentsTweaker.worldInReset) return@on Call.serverPacketReliable("ContentsLoader|version", Vars.mods.getMod(javaClass).meta.version) - Vars.state.map.tags.get("ContentsPatch")?.split(";")?.forEach { name -> + val list = Vars.state.map.tags.get("ContentsPatch")?.split(";") + ?: Vars.state.rules.tags.get("ContentsPatch")?.split(";") + ?: return@on + list.forEach { name -> if (name.isBlank()) return@forEach val patch = Vars.state.map.tags.get("CT@$name") ?: return@forEach Call.serverPacketReliable("ContentsLoader|requestPatch", name)