diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 0a438461c6..13b520c691 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -10,6 +10,7 @@ body: label: Modloader options: - Forge + - NeoForge - Fabric - Quilt validations: @@ -18,14 +19,14 @@ body: - type: input attributes: label: Minecraft version - placeholder: eg. 1.19.2 + placeholder: eg. 1.20.1 validations: required: true - type: input attributes: label: Hex Casting version - placeholder: eg. 0.11.1-7-pre-609 + placeholder: eg. 0.11.3 validations: required: true diff --git a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt index 1bbd83251d..6133b2b627 100644 --- a/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt +++ b/Common/src/main/java/at/petrak/hexcasting/api/casting/eval/vm/FrameForEach.kt @@ -46,7 +46,7 @@ data class FrameForEach( level: ServerLevel, harness: CastingVM ): CastResult { - // If this isn't the very first Thoth step (i.e. no Thoth computations run yet)... + // If this is the very first Thoth step (i.e. no Thoth computations run yet)... val (stack, newAcc) = if (baseStack == null) { // init stack to the harness stack... harness.image.stack.toList() to acc @@ -66,7 +66,7 @@ data class FrameForEach( Triple(data.car, harness.image.withUsedOp(), cont2) } else { // Else, dump our final list onto the stack. - Triple(ListIota(acc), harness.image, continuation) + Triple(ListIota(newAcc), harness.image, continuation) } val tStack = stack.toMutableList() tStack.add(stackTop) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/loot/AddPerWorldPatternToScrollFunc.java b/Common/src/main/java/at/petrak/hexcasting/common/loot/AddPerWorldPatternToScrollFunc.java index 30f60d176f..3b8afd744d 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/loot/AddPerWorldPatternToScrollFunc.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/loot/AddPerWorldPatternToScrollFunc.java @@ -1,5 +1,6 @@ package at.petrak.hexcasting.common.loot; +import at.petrak.hexcasting.api.HexAPI; import at.petrak.hexcasting.api.casting.ActionRegistryEntry; import at.petrak.hexcasting.api.mod.HexTags; import at.petrak.hexcasting.api.utils.HexUtils; @@ -50,7 +51,16 @@ public static ItemStack doStatic(ItemStack stack, RandomSource rand, ServerLevel } } var patternKey = perWorldKeys.get(rand.nextInt(perWorldKeys.size())); + var patternID = patternKey.location().toString(); var pat = PatternRegistryManifest.getCanonicalStrokesPerWorld(patternKey, overworld); + + if (pat == null) { + HexAPI.LOGGER.error("No per-world pattern found for action " + patternID + " while generating loot scroll! " + + "Try running '/hexcasting recalcPatterns' to generate the patterns for this world."); + stack.set(HexDataComponents.RECALC_WARNING, patternKey); + return stack; + } + stack.set(HexDataComponents.ACTION, patternKey); stack.set(HexDataComponents.PATTERN, pat); return stack; diff --git a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 index c79a8de197..e9a27a6e15 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 @@ -599,7 +599,7 @@ needs_purchase: "Purchase to show pattern", pattern_not_loaded: "Place in inventory to load pattern", "recalc_warning.line1": "The per-world pattern for %s has not been calculated yet!", - "recalc_warning.line2": "Please run /hexcasting recalcPatterns, then grab a new scroll.", + "recalc_warning.line2": "Please run /hexcasting recalcPatterns, then get a new scroll.", }, abacus: { diff --git a/Common/src/main/resources/assets/hexcasting/lang/zh_cn.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/zh_cn.flatten.json5 index af8f45aa74..b2824e929c 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/zh_cn.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/zh_cn.flatten.json5 @@ -397,7 +397,11 @@ }, circleActionDenyList: { "": "法术环禁用操作列表", - "@Tooltip": "法术环中被禁用操作的资源位置;试图执行此类操作会导致事故", + "@Tooltip": "法术环中被禁用操作的资源位置;试图执行此类操作会导致事故。例如,“hexcasting:get_caster”会禁用意识之精思。", + }, + costRescaleListRaw: { + "": "消耗倍数", + "@Tooltip": "资源位置与对应操作媒质消耗倍数的映射。例如,“hexcasting:add_motion 3”会让驱动的消耗变为3倍。", }, greaterTeleportSplatsItems: { "": "卓越传送散落物品", @@ -2103,10 +2107,10 @@ "2": "当然,也有其他种类的飞行法术。例如,将$(l:patterns/spells/basic#hexcasting:add_motion)$(action)驱动/$和$(l:patterns/spells/nadirs#hexcasting:potion/levitation)$(action)蓝阳西沉/$结合使用的类飞行技术自古代起就多有运用。$(br2)我还听说过一种能给予滑翔能力的,可以穿在背上的薄透翼膜。研究表明,被称为“$(l:patterns/great_spells/altiora)$(action)翱翔/$”的卓越法术也许能模仿这种翼膜的功用。", "range.1": "受范围限制的飞行法术。", - "range.2": "第二参数代表水平方向上的半径(以米计),在此范围内,法术能保持稳定。走出该范围就会结束该法术,滞空的物体会直接坠向地面。但只要一直待在这个范围内,法术的效果便会无限持续。此法术还会额外产生微量$(media)媒质/$用以标记安全区域中心点。$(br2)每米安全范围消耗大约 1 个$(l:items/amethyst)$(item)紫水晶粉/$。", + "range.2": "第二参数代表水平方向上的半径(以米计),在此范围内,法术能保持稳定。走出该范围就会结束该法术,滞空的物体会直接坠向地面。但只要一直待在这个范围内,法术的效果便会无限持续。此法术还会额外产生微量$(media)媒质/$用以标记安全区域中心点。$(br2)每米安全范围消耗大约 2 个$(l:items/amethyst)$(item)紫水晶粉/$,即便范围半径小于 1 米也仍会消耗 2 个$(l:items/amethyst)$(item)紫水晶粉/$。", "time.1": "受时间限制的飞行法术。", - "time.2": "第二参数代表持续时间(以秒计),在此限制内,法术能保持稳定。持续时间超过限制就会结束该法术,滞空的物体会直接坠向地面。$(br2)此法术相对较昂贵,每秒持续时间消耗大约 1 个$(l:items/amethyst)$(item)紫水晶碎片/$。我觉得它极其适合长途旅行。", + "time.2": "第二参数代表持续时间(以秒计),在此限制内,法术能保持稳定。持续时间超过限制就会结束该法术,滞空的物体会直接坠向地面。$(br2)每秒持续时间消耗大约 2 个$(l:items/amethyst)$(item)紫水晶粉/$。我觉得它极其适合长途旅行。", // Putting this in this category instead of elsewhere -- see sentinel chapter also containing some reflections/nonspells "can_fly.1": "检查玩家是否处于$(l:patterns/spells/flight#hexcasting:flight/range)隐士之飞行/$或$(l:patterns/spells/flight#hexcasting:flight/time)旅者之飞行/$的影响之下。", diff --git a/Fabric/build.gradle b/Fabric/build.gradle index 73a413448e..1e077ed838 100644 --- a/Fabric/build.gradle +++ b/Fabric/build.gradle @@ -25,8 +25,8 @@ pkSubproj { modrinthDependencies([ "paucal:dabyDTwJ", // 0.6.0-fabric "patchouli:1.20.1-80-fabric", - "fabric-language-kotlin:1.9.4+kotlin.1.8.21", - "inline:1.20.1-1.1.1-fabric", + "fabric-language-kotlin:1.13.7+kotlin.2.2.21", + "inline:1.20.1-1.2.2-fabric", "cloth-config:11.1.106+fabric", "cardinal-components-api:5.2.1", "fabric-api:0.84.0+1.20.1", diff --git a/Fabric/gradle.properties b/Fabric/gradle.properties index 3e4e03d1ca..1f90d104cf 100644 --- a/Fabric/gradle.properties +++ b/Fabric/gradle.properties @@ -1,8 +1,8 @@ platform=fabric -fabricVersion=0.85.0+1.20.1 +fabricVersion=0.92.8+1.21.1 fabricLoaderVersion=0.14.21 -fabricLanguageKotlinVersion=1.12.3+kotlin.2.0.21 +fabricLanguageKotlinVersion=1.13.7+kotlin.2.2.21 loom.platform=fabric @@ -20,5 +20,3 @@ modmenuVersion=7.0.1 sodiumVersion=mc1.20-0.4.10+build.27 lithiumVersion=mc1.21.1-0.15.1 #phosphorVersion=mc1.19.x-0.8.1 - - diff --git a/Fabric/src/main/resources/fabric.mod.json b/Fabric/src/main/resources/fabric.mod.json index de6446c006..1f5ad84f67 100644 --- a/Fabric/src/main/resources/fabric.mod.json +++ b/Fabric/src/main/resources/fabric.mod.json @@ -50,7 +50,7 @@ "java": ">=21", "fabricloader": ">=0.14", "fabric": ">=0.84", - "fabric-language-kotlin": ">=1.9.4+kotlin.1.8.21", + "fabric-language-kotlin": ">=1.13.7+kotlin.2.2.21", "cardinal-components-base": "~6.1.3", "cardinal-components-entity": "~6.1.3", "cardinal-components-item": "~6.1.3", diff --git a/build.gradle b/build.gradle index a95e196376..bf4ef690be 100644 --- a/build.gradle +++ b/build.gradle @@ -8,6 +8,11 @@ plugins { id 'com.gradleup.shadow' version '8.3.6' apply false id "org.jetbrains.kotlin.jvm" + id 'idea' + // This needs to be in the root + // https://github.com/FabricMC/fabric-loom/issues/612#issuecomment-1198444120 + // Also it looks like property lookups don't work this early + id 'fabric-loom' version '1.9+' apply false id("at.petra-k.pkpcpbp.PKPlugin") version "0.2.0-pre-104" id("at.petra-k.pkpcpbp.PKSubprojPlugin") version "0.2.0-pre-104" apply false diff --git a/gradle.properties b/gradle.properties index aec3c270e9..770f7b5d25 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,7 +9,7 @@ modName=Hex Casting jetbrainsAnnotationsVersion=23.0.0 minecraftVersion=1.21.1 -kotlinVersion=2.0.21 +kotlinVersion=2.2.21 modVersion=0.12.0-devel fabric_loader_version=0.16.14