diff --git a/CHANGELOG.md b/CHANGELOG.md index eea7f33580..d401546f73 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,73 +4,88 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [UNRELEASED] + +### Added + +- Updated to Minecraft 1.21.1 ([#985](https://github.com/FallingColors/HexMod/pull/985)) @SuperKnux @slava110 + +### Fixed + +- Fixed Entity Iota comparison to use `equals` on entity IDs instead of reference equality ([#1101](https://github.com/FallingColors/HexMod/pull/1101)) @IridescentVoid +- Corrected field names of the codec for Pattern Iotas and add a graceful fallback for upgrading ([#1120](https://github.com/FallingColors/HexMod/pull/1120), [#1131](https://github.com/FallingColors/HexMod/pull/1131), [#1140](https://github.com/FallingColors/HexMod/pull/1140)) @Master-Bw3 @IridescentVoid + +### Internal + +- Removed APIs deprecated in `0.11.4` ([#1126](https://github.com/FallingColors/HexMod/pull/1126), [#1127](https://github.com/FallingColors/HexMod/pull/1127) [#1129](https://github.com/FallingColors/HexMod/pull/1129), [#1137](https://github.com/FallingColors/HexMod/pull/1137), [#1142](https://github.com/FallingColors/HexMod/pull/1142)) @s5bug + ## `0.11.3` - 2025-11-22 ### Added -- Added several new player attributes (ported from [Hexxy Attributes](https://modrinth.com/mod/hexxyattributes)), by beholderface in [#823](https://github.com/FallingColors/HexMod/pull/823). -- Added ancient cyphers, by Robotgiggle in [#838](https://github.com/FallingColors/HexMod/pull/838). -- Added the ability for wandering traders to sell ancient scrolls, by Robotgiggle in [#837](https://github.com/FallingColors/HexMod/pull/837). -- Added a creative tab for ancient scrolls, by Robotgiggle in [#837](https://github.com/FallingColors/HexMod/pull/837). -- Added a config option to disable Greater Teleport item splatting, by TheDrawingCoding-Gamer in [#841](https://github.com/FallingColors/HexMod/pull/841). -- Added loot tables to generate exactly one random scroll/cypher, by Robotgiggle in [#844](https://github.com/FallingColors/HexMod/pull/844). -- Added recipes for slate, amethyst, and quenched allay blocks, by KyanBirb in [#903](https://github.com/FallingColors/HexMod/pull/903). -- hexdoc: Added the ability to load patterns from a JSON file (instead of scraping them from source code with regex), by object-Object in [#911](https://github.com/FallingColors/HexMod/pull/911). -- Added a new Ancient Pigment and changed the appearance of the default pigment, by Robotgiggle in [#912](https://github.com/FallingColors/HexMod/pull/912). +- Added several new player attributes (ported from [Hexxy Attributes](https://modrinth.com/mod/hexxyattributes)) ([#823](https://github.com/FallingColors/HexMod/pull/823)) @beholderface +- Added ancient cyphers ([#838](https://github.com/FallingColors/HexMod/pull/838)) @Robotgiggle +- Added the ability for wandering traders to sell ancient scrolls ([#837](https://github.com/FallingColors/HexMod/pull/837)) @Robotgiggle +- Added a creative tab for ancient scrolls ([#837](https://github.com/FallingColors/HexMod/pull/837)) @Robotgiggle +- Added a config option to disable Greater Teleport item splatting ([#841](https://github.com/FallingColors/HexMod/pull/841)) @TheDrawingCoding-Gamer +- Added loot tables to generate exactly one random scroll/cypher ([#844](https://github.com/FallingColors/HexMod/pull/844)) @Robotgiggle +- Added recipes for slate, amethyst, and quenched allay blocks ([#903](https://github.com/FallingColors/HexMod/pull/903)) @KyanBirb +- hexdoc: Added the ability to load patterns from a JSON file (instead of scraping them from source code with regex) ([#911](https://github.com/FallingColors/HexMod/pull/911)) @object-Object +- Added a new Ancient Pigment and changed the appearance of the default pigment ([#912](https://github.com/FallingColors/HexMod/pull/912)) @Robotgiggle ### Changed -- Updated the spell circle documentation to clarify their new behavior in 0.11.x, by Robotgiggle in [#814](https://github.com/FallingColors/HexMod/pull/814). -- Added the recipes for bamboo and cherry staves to the notebook entry, by Robotgiggle in [#814](https://github.com/FallingColors/HexMod/pull/814). -- Renamed the eval limit mishap from "Delve Too Deep" to "Lost in Thought", and updated the description and error message to match, by Robotgiggle in [#814](https://github.com/FallingColors/HexMod/pull/814). -- Updated zh_cn translations, by ChuijkYahus in [#799](https://github.com/FallingColors/HexMod/pull/799), [#828](https://github.com/FallingColors/HexMod/pull/828), [#847](https://github.com/FallingColors/HexMod/pull/847), [#913](https://github.com/FallingColors/HexMod/pull/913), [#953](https://github.com/FallingColors/HexMod/pull/953), [#954](https://github.com/FallingColors/HexMod/pull/954), and [#971](https://github.com/FallingColors/HexMod/pull/971). -- Added apostrophes to Compass' Purification in the notebook, by kineticneticat in [#867](https://github.com/FallingColors/HexMod/pull/867). -- Updated the description of Ignite to clarify that it works on all entities, by Robotgiggle in [#844](https://github.com/FallingColors/HexMod/pull/844). -- Improved documentation of iota embedding, by Robotgiggle in [#862](https://github.com/FallingColors/HexMod/pull/862). -- Documented the behaviour of the Shepherd Directrix when no boolean is present on the stack, by Robotgiggle in [#862](https://github.com/FallingColors/HexMod/pull/862). -- Changed vectors in the notebook to use parentheses rather than square brackets, by Robotgiggle in [#862](https://github.com/FallingColors/HexMod/pull/862). -- Changed the rarity of several post-enlightenment items, by Robotgiggle in [#860](https://github.com/FallingColors/HexMod/pull/860). -- API: Changed the base class of `Mishap` from `Throwable` to `RuntimeException` to reduce the likelihood of server crashes, by navarchus in [#933](https://github.com/FallingColors/HexMod/pull/933). -- API: Added `@Throws` annotation to several `Action` methods to allow Java pattern implementations to throw mishaps, by navarchus in [#935](https://github.com/FallingColors/HexMod/pull/935). -- Improved the documentation for the media cube, by object-Object in [#843](https://github.com/FallingColors/HexMod/pull/843). -- Changed Greater Teleport to mishap when a passenger is immune to teleportation, by Robotgiggle in [#916](https://github.com/FallingColors/HexMod/pull/916). -- Re-added the slate limit for spell circles, by Stickia in [#909](https://github.com/FallingColors/HexMod/pull/909). -- Renamed Inverse Tangent Purification II to Inverse Tangent Distillation, by Robotgiggle in [#921](https://github.com/FallingColors/HexMod/pull/921). -- Massively improved ru_ru translations, by JustS-js and LedinecMing in [#832](https://github.com/FallingColors/HexMod/pull/832). -- Changed the invalid-pattern mishap to display the offending pattern, by Robotgiggle in [#951](https://github.com/FallingColors/HexMod/pull/951). -- Changed the invalid-iota mishap to display the type of the offending iota along with the iota itself, by Robotgiggle in [#951](https://github.com/FallingColors/HexMod/pull/951). -- Changed the disallowed-action mishap to properly display the offending action, by Robotgiggle in [#970](https://github.com/FallingColors/HexMod/pull/970). +- Updated the spell circle documentation to clarify their new behavior in 0.11.x ([#814](https://github.com/FallingColors/HexMod/pull/814)) @Robotgiggle +- Added the recipes for bamboo and cherry staves to the notebook entry ([#814](https://github.com/FallingColors/HexMod/pull/814)) @Robotgiggle +- Renamed the eval limit mishap from "Delve Too Deep" to "Lost in Thought", and updated the description and error message to match ([#814](https://github.com/FallingColors/HexMod/pull/814)) @Robotgiggle +- Updated zh_cn translations ([#799](https://github.com/FallingColors/HexMod/pull/799), [#828](https://github.com/FallingColors/HexMod/pull/828), [#847](https://github.com/FallingColors/HexMod/pull/847), [#913](https://github.com/FallingColors/HexMod/pull/913), [#953](https://github.com/FallingColors/HexMod/pull/953), [#954](https://github.com/FallingColors/HexMod/pull/954), [#971](https://github.com/FallingColors/HexMod/pull/971)) @ChuijkYahus +- Added apostrophes to Compass' Purification in the notebook ([#867](https://github.com/FallingColors/HexMod/pull/867)) @kineticneticat +- Updated the description of Ignite to clarify that it works on all entities ([#844](https://github.com/FallingColors/HexMod/pull/844)) @Robotgiggle +- Improved documentation of iota embedding ([#862](https://github.com/FallingColors/HexMod/pull/862)) @Robotgiggle +- Documented the behaviour of the Shepherd Directrix when no boolean is present on the stack ([#862](https://github.com/FallingColors/HexMod/pull/862)) @Robotgiggle +- Changed vectors in the notebook to use parentheses rather than square brackets ([#862](https://github.com/FallingColors/HexMod/pull/862)) @Robotgiggle +- Changed the rarity of several post-enlightenment items ([#860](https://github.com/FallingColors/HexMod/pull/860)) @Robotgiggle +- API: Changed the base class of `Mishap` from `Throwable` to `RuntimeException` to reduce the likelihood of server crashes ([#933](https://github.com/FallingColors/HexMod/pull/933)) @navarchus +- API: Added `@Throws` annotation to several `Action` methods to allow Java pattern implementations to throw mishaps ([#935](https://github.com/FallingColors/HexMod/pull/935)) @navarchus +- Improved the documentation for the media cube ([#843](https://github.com/FallingColors/HexMod/pull/843)) @object-Object +- Changed Greater Teleport to mishap when a passenger is immune to teleportation ([#916](https://github.com/FallingColors/HexMod/pull/916)) @Robotgiggle +- Re-added the slate limit for spell circles ([#909](https://github.com/FallingColors/HexMod/pull/909)) @Stickia +- Renamed Inverse Tangent Purification II to Inverse Tangent Distillation ([#921](https://github.com/FallingColors/HexMod/pull/921)) @Robotgiggle +- Massively improved ru_ru translations ([#832](https://github.com/FallingColors/HexMod/pull/832)) @JustS-js and LedinecMing +- Changed the invalid-pattern mishap to display the offending pattern ([#951](https://github.com/FallingColors/HexMod/pull/951)) @Robotgiggle +- Changed the invalid-iota mishap to display the type of the offending iota along with the iota itself ([#951](https://github.com/FallingColors/HexMod/pull/951)) @Robotgiggle +- Changed the disallowed-action mishap to properly display the offending action ([#970](https://github.com/FallingColors/HexMod/pull/970)) @Robotgiggle ### Fixed - Fixed missing dependency metadata on CurseForge/Modrinth. -- Fixed a freeze when rendering patterns in certain cases, by vgskye in [#800](https://github.com/FallingColors/HexMod/pull/800). -- Added a missing translation for `hexcasting.subtitles.casting.cast.fail`, by Robotgiggle in [#814](https://github.com/FallingColors/HexMod/pull/814). -- Fixed incorrect Amethyst Sconce block rotation, by Robotgiggle in [#814](https://github.com/FallingColors/HexMod/pull/814). -- Fixed Place Block not pulling items from the inventory when available, by garyantonyo in [#812](https://github.com/FallingColors/HexMod/pull/812). -- Fixed a broken link in A Primer On Vectors, by bearofbusiness in [#877](https://github.com/FallingColors/HexMod/pull/877). -- Fixed Impulse not increasing its cost for subsequent uses in one cast, by vgskye in [#853](https://github.com/FallingColors/HexMod/pull/853). -- Added a config option to enable commas between patterns in lists, by Robotgiggle in [#844](https://github.com/FallingColors/HexMod/pull/844). -- Fixed incorrect cost for Wayfarer's Flight, by Robotgiggle in [#844](https://github.com/FallingColors/HexMod/pull/844). -- Fixed a bug where some patterns would check for media requirements earlier than expected, by vgskye in [#855](https://github.com/FallingColors/HexMod/pull/855). -- Fixed some modded fake players being able to overcast infinitely for free, by vgskye in [#854](https://github.com/FallingColors/HexMod/pull/854). -- Fixed Negation Purification not working on numbers, by Robotgiggle in [#869](https://github.com/FallingColors/HexMod/pull/869). -- Added a missing translation for the `no_spell_circle` mishap, by Robotgiggle in [#862](https://github.com/FallingColors/HexMod/pull/862). -- Fixed allays sometimes becoming invulnerable when mindflayed, by navarchus in [#928](https://github.com/FallingColors/HexMod/pull/928). -- hexdoc: Improved the error message for missing patterns, by navarchus in [#931](https://github.com/FallingColors/HexMod/pull/931). -- Fixed incorrect rendering for rod variants of cyphers/trinkets/artifacts, by navarchus in [#936](https://github.com/FallingColors/HexMod/pull/936). -- Fixed several issues related to invalid/overlapping patterns, by object-Object in [#938](https://github.com/FallingColors/HexMod/pull/938). -- Fixed sticky teleportation (ie. teleporting passengers) not working (again), by Robotgiggle in [#916](https://github.com/FallingColors/HexMod/pull/916). -- Fixed Greater Teleport sometimes failing with a "moved wrongly" message, by Robotgiggle in [#916](https://github.com/FallingColors/HexMod/pull/916). -- Fixed incorrect face textures for the Empty and Shepherd Directrix, by Robotgiggle in [#921](https://github.com/FallingColors/HexMod/pull/921). -- Removed unnecessary error logs when activating a bound Cleric Impetus with its owner offline, by Robotgiggle in [#921](https://github.com/FallingColors/HexMod/pull/921). -- Fixed the Cleric Impetus becoming unbound when activated with its owner offline, by Robotgiggle in [#921](https://github.com/FallingColors/HexMod/pull/921). -- Fixed some directrices inadvertently accepting input from their output faces, by Robotgiggle in [#921](https://github.com/FallingColors/HexMod/pull/921). -- Added a missing translation for providing something other than an entity as the first input to Flay Mind, by Robotgiggle in [#921](https://github.com/FallingColors/HexMod/pull/921). -- Added several missing translations for config options, by Robotgiggle in [#921](https://github.com/FallingColors/HexMod/pull/921). -- Clarified the description of Division Distillation, by JustS-js in [#832](https://github.com/FallingColors/HexMod/pull/832). -- Fixed a bug where some patterns inconsistently checked the lower-north-west corner of blocks for ambit instead of the center, by YukkuriC in [#959](https://github.com/FallingColors/HexMod/pull/959). -- Fixed Erase Item cost not scaling with stack size, by PoolloverNathan in [#966](https://github.com/FallingColors/HexMod/pull/966). +- Fixed a freeze when rendering patterns in certain cases ([#800](https://github.com/FallingColors/HexMod/pull/800)) @vgskye +- Added a missing translation for `hexcasting.subtitles.casting.cast.fail` ([#814](https://github.com/FallingColors/HexMod/pull/814)) @Robotgiggle +- Fixed incorrect Amethyst Sconce block rotation ([#814](https://github.com/FallingColors/HexMod/pull/814)) @Robotgiggle +- Fixed Place Block not pulling items from the inventory when available ([#812](https://github.com/FallingColors/HexMod/pull/812)) @garyantonyo +- Fixed a broken link in A Primer On Vectors ([#877](https://github.com/FallingColors/HexMod/pull/877)) @bearofbusiness +- Fixed Impulse not increasing its cost for subsequent uses in one cast ([#853](https://github.com/FallingColors/HexMod/pull/853)) @vgskye +- Added a config option to enable commas between patterns in lists ([#844](https://github.com/FallingColors/HexMod/pull/844)) @Robotgiggle +- Fixed incorrect cost for Wayfarer's Flight ([#844](https://github.com/FallingColors/HexMod/pull/844)) @Robotgiggle +- Fixed a bug where some patterns would check for media requirements earlier than expected ([#855](https://github.com/FallingColors/HexMod/pull/855)) @vgskye +- Fixed some modded fake players being able to overcast infinitely for free ([#854](https://github.com/FallingColors/HexMod/pull/854)) @vgskye +- Fixed Negation Purification not working on numbers ([#869](https://github.com/FallingColors/HexMod/pull/869)) @Robotgiggle +- Added a missing translation for the `no_spell_circle` mishap ([#862](https://github.com/FallingColors/HexMod/pull/862)) @Robotgiggle +- Fixed allays sometimes becoming invulnerable when mindflayed ([#928](https://github.com/FallingColors/HexMod/pull/928)) @navarchus +- hexdoc: Improved the error message for missing patterns ([#931](https://github.com/FallingColors/HexMod/pull/931)) @navarchus +- Fixed incorrect rendering for rod variants of cyphers/trinkets/artifacts ([#936](https://github.com/FallingColors/HexMod/pull/936)) @navarchus +- Fixed several issues related to invalid/overlapping patterns ([#938](https://github.com/FallingColors/HexMod/pull/938)) @object-Object +- Fixed sticky teleportation (ie. teleporting passengers) not working (again) ([#916](https://github.com/FallingColors/HexMod/pull/916)) @Robotgiggle +- Fixed Greater Teleport sometimes failing with a "moved wrongly" message ([#916](https://github.com/FallingColors/HexMod/pull/916)) @Robotgiggle +- Fixed incorrect face textures for the Empty and Shepherd Directrix ([#921](https://github.com/FallingColors/HexMod/pull/921)) @Robotgiggle +- Removed unnecessary error logs when activating a bound Cleric Impetus with its owner offline ([#921](https://github.com/FallingColors/HexMod/pull/921)) @Robotgiggle +- Fixed the Cleric Impetus becoming unbound when activated with its owner offline ([#921](https://github.com/FallingColors/HexMod/pull/921)) @Robotgiggle +- Fixed some directrices inadvertently accepting input from their output faces ([#921](https://github.com/FallingColors/HexMod/pull/921)) @Robotgiggle +- Added a missing translation for providing something other than an entity as the first input to Flay Mind ([#921](https://github.com/FallingColors/HexMod/pull/921)) @Robotgiggle +- Added several missing translations for config options ([#921](https://github.com/FallingColors/HexMod/pull/921)) @Robotgiggle +- Clarified the description of Division Distillation ([#832](https://github.com/FallingColors/HexMod/pull/832)) @JustS-js +- Fixed a bug where some patterns inconsistently checked the lower-north-west corner of blocks for ambit instead of the center ([#959](https://github.com/FallingColors/HexMod/pull/959)) @YukkuriC +- Fixed Erase Item cost not scaling with stack size ([#966](https://github.com/FallingColors/HexMod/pull/966)) @PoolloverNathan ## Previous versions diff --git a/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpTypeEquality.kt b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpTypeEquality.kt new file mode 100644 index 0000000000..cd31212ca0 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/casting/actions/math/logic/OpTypeEquality.kt @@ -0,0 +1,17 @@ +package at.petrak.hexcasting.common.casting.actions.math.logic + +import at.petrak.hexcasting.api.casting.asActionResult +import at.petrak.hexcasting.api.casting.castables.ConstMediaAction +import at.petrak.hexcasting.api.casting.eval.CastingEnvironment +import at.petrak.hexcasting.api.casting.iota.Iota + +class OpTypeEquality(val invert: Boolean) : ConstMediaAction { + override val argc = 2 + + override fun execute(args: List, env: CastingEnvironment): List { + val lhs = args[0] + val rhs = args[1] + + return ((lhs.type == rhs.type) != invert).asActionResult + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java index 95918ef011..eb049a8e78 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/hex/HexActions.java @@ -29,6 +29,7 @@ import at.petrak.hexcasting.common.casting.actions.math.logic.OpBoolIf; import at.petrak.hexcasting.common.casting.actions.math.logic.OpCoerceToBool; import at.petrak.hexcasting.common.casting.actions.math.logic.OpEquality; +import at.petrak.hexcasting.common.casting.actions.math.logic.OpTypeEquality; import at.petrak.hexcasting.common.casting.actions.queryentity.*; import at.petrak.hexcasting.common.casting.actions.raycast.OpBlockAxisRaycast; import at.petrak.hexcasting.common.casting.actions.raycast.OpBlockRaycast; @@ -190,6 +191,10 @@ public class HexActions { new ActionRegistryEntry(HexPattern.fromAngles("ad", HexDir.EAST), new OpEquality(false))); public static final ActionRegistryEntry NOT_EQUALS = make("not_equals", new ActionRegistryEntry(HexPattern.fromAngles("da", HexDir.EAST), new OpEquality(true))); + public static final ActionRegistryEntry TYPE_EQUALS = make("type_equals", + new ActionRegistryEntry(HexPattern.fromAngles("wawdw", HexDir.EAST), new OpTypeEquality(false))); + public static final ActionRegistryEntry TYPE_NOT_EQUALS = make("type_not_equals", + new ActionRegistryEntry(HexPattern.fromAngles("wdwaw", HexDir.EAST), new OpTypeEquality(true))); public static final ActionRegistryEntry BOOL_COERCE = make("bool_coerce", new ActionRegistryEntry(HexPattern.fromAngles("aw", HexDir.NORTH_EAST), OpCoerceToBool.INSTANCE)); public static final ActionRegistryEntry IF = make("if", diff --git a/Common/src/main/java/at/petrak/hexcasting/common/misc/RegisterMisc.java b/Common/src/main/java/at/petrak/hexcasting/common/misc/RegisterMisc.java index 2559748264..052b65d2bb 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/misc/RegisterMisc.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/misc/RegisterMisc.java @@ -24,6 +24,12 @@ public static void register() { HexAPI.instance().registerSpecialVelocityGetter(EntityType.SPECTRAL_ARROW, RegisterMisc::arrowVelocitizer); // this is an arrow apparently HexAPI.instance().registerSpecialVelocityGetter(EntityType.TRIDENT, RegisterMisc::arrowVelocitizer); + HexAPI.instance().registerSpecialVelocityGetter(EntityType.ITEM, item -> { + // Items only tick movement every four ticks if stationary and on ground, but gravity is added every tick + // and only cleared by movement logic every four ticks + if (item.onGround() && item.getDeltaMovement().horizontalDistanceSqr() <= 1.0E-5F) return Vec3.ZERO; + return item.getDeltaMovement(); + }); HexAPI.instance().registerCustomBrainsweepingBehavior(EntityType.VILLAGER, villager -> { ((AccessorVillager) villager).hex$releaseAllPois(); diff --git a/Common/src/main/java/at/petrak/hexcasting/interop/patchouli/PatternProcessor.java b/Common/src/main/java/at/petrak/hexcasting/interop/patchouli/PatternProcessor.java index 3c474040fc..e6f2032aae 100644 --- a/Common/src/main/java/at/petrak/hexcasting/interop/patchouli/PatternProcessor.java +++ b/Common/src/main/java/at/petrak/hexcasting/interop/patchouli/PatternProcessor.java @@ -8,18 +8,24 @@ public class PatternProcessor implements IComponentProcessor { private String translationKey; + private boolean hasArgs = false; @Override public void setup(Level level, IVariableProvider vars) { - if (vars.has("header")) + if (vars.has("header")) { translationKey = vars.get("header", level.registryAccess()).asString(); - else { + } else { IVariable key = vars.get("op_id", level.registryAccess()); String opName = key.asString(); String prefix = "hexcasting.action."; boolean hasOverride = I18n.exists(prefix + "book." + opName); translationKey = prefix + (hasOverride ? "book." : "") + opName; + + if (vars.has("input") && !vars.get("input", level.registryAccess()).asString().isEmpty()) + hasArgs = true; + else if (vars.has("output") && !vars.get("output", level.registryAccess()).asString().isEmpty()) + hasArgs = true; } } @@ -27,6 +33,8 @@ public void setup(Level level, IVariableProvider vars) { public IVariable process(Level level, String key) { if (key.equals("translation_key")) { return IVariable.wrap(translationKey, level.registryAccess()); + } else if (key.equals("has_signature")) { + return IVariable.wrap(hasArgs, level.registryAccess()); } return null; 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 1470790f34..528f826464 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 @@ -810,6 +810,8 @@ less_eq: "Minimus Distillation II", equals: "Equality Distillation", not_equals: "Inequality Distillation", + type_equals: "Similarity Distillation", + type_not_equals: "Dissimilarity Distillation", not: "Negation Purification", bool_coerce: "Augur's Purification", if: "Augur's Exaltation", @@ -1723,7 +1725,7 @@ empty_directrix: "Firstly, a design for the cradle ... although, perhaps \"substrate\" would be more accurate a word. Without a mind guiding it, the output direction is determined by microscopic fluctuations in the _media wave and surroundings, making it effectively random.", directrix_redstone: "A $(l:greatwork/directrix)$(item)Mason Directrix/$ switches output side based on a redstone signal. Without a signal, the exit is the _media-color side; with a signal, the exit is the redstone-color side.", - directrix_boolean: "A $(l:greatwork/directrix)$(item)Shepherd Directrix/$ switches output side based on a boolean on the stack. A $(thing)True/$ makes the wave exit from the back, a $(thing)False/$ from the front. Failing to provide a boolean at all will cause a mishap." + directrix_boolean: "A $(l:greatwork/directrix)$(item)Shepherd Directrix/$ switches output side based on a boolean popped from the stack. A $(thing)True/$ makes the wave exit from the back, a $(thing)False/$ from the front. Failing to provide a boolean at all will cause a mishap." }, akashiclib: { @@ -1906,6 +1908,8 @@ if: "If the first argument is True, keeps the second and discards the third; otherwise discards the second and keeps the third.", equals: "If the first argument equals the second (within a small tolerance), return True. Otherwise, return False.", not_equals: "If the first argument does not equal the second (outside a small tolerance), return True. Otherwise, return False.", + type_equals: "If the type of the first argument matches the type of the second, return True. Otherwise, return False.", + type_not_equals: "If the type of the first argument does not match the type of the second, return True. Otherwise, return False.", greater: "If the first argument is greater than the second, return True. Otherwise, return False.", less: "If the first argument is less than the second, return True. Otherwise, return False.", greater_eq: "If the first argument is greater than or equal to the second, return True. Otherwise, return False.", 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 b2824e929c..be1815a523 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 @@ -399,8 +399,12 @@ "": "法术环禁用操作列表", "@Tooltip": "法术环中被禁用操作的资源位置;试图执行此类操作会导致事故。例如,“hexcasting:get_caster”会禁用意识之精思。", }, + globalCostScaling: { + "": "全局消耗倍数", + "@Tooltip": "除去#hexcasting:cannot_modify_cost标签下的操作,其余操作的媒质消耗均会乘以该数。若希望调整该标签下操作的消耗,请使用“操作消耗倍数”配置。", + }, costRescaleListRaw: { - "": "消耗倍数", + "": "操作消耗倍数", "@Tooltip": "资源位置与对应操作媒质消耗倍数的映射。例如,“hexcasting:add_motion 3”会让驱动的消耗变为3倍。", }, greaterTeleportSplatsItems: { @@ -920,6 +924,11 @@ "teleport/great": "卓越传送", brainsweep: "剥离意识", + escape: "考察", + open_paren: "内省", + close_paren: "反思", + undo: "消解", + eval: "赫尔墨斯之策略", "eval/cc": "伊里斯之策略", for_each: "托特之策略", @@ -991,13 +1000,6 @@ mask: "簿记员之策略:%s", }, - "rawhook.hexcasting:": { - open_paren: "内省", - close_paren: "反思", - escape: "考察", - undo: "消解", - }, - "iota.hexcasting:": { "null": { "": "Null", @@ -1046,7 +1048,7 @@ not_enough_args: "本应接受大于等于%s个参数,而实际栈高度为%s", no_args: "本应接受大于等于%s个参数,而实际为空栈", - too_many_close_parens: "在绘制反思前未先绘制内省", + needs_parens: "在绘制反思前未先绘制内省", wrong_dimension: "无法在%2$s中影响到%1$s", entity_too_far: "%s超出影响范围", @@ -1513,8 +1515,8 @@ "incorrect_block.title": "方块错误", incorrect_block: "该操作需在目标位置存在某种方块,而该位置实际存在的方块不合适。$(br2)产生亮绿色火花,并在对应位置产生一次爆炸。这种爆炸似乎不会伤害到我、世界或是任何其他事物。就是挺吓人的。", - "retrospection.title": "反思过急", - retrospection: "试图在绘制$(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)内省/$前绘制$(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)反思/$。$(br2)产生橙色火花,并压入一个$(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)反思/$对应的图案。", + "needs_parens.title": "内省缺失", + needs_parens: "试图在绘制$(l:patterns/patterns_as_iotas#hexcasting:open_paren)$(action)内省/$前绘制$(l:patterns/patterns_as_iotas#hexcasting:close_paren)$(action)反思/$或$(l:patterns/patterns_as_iotas#hexcasting:undo)$(action)消解/$。$(br2)产生橙色火花,并将我试图绘制的图案作为 iota 压栈。", "too_many_patterns.title": "陷入沉思", too_many_patterns: "试图在单个$(hex)咒术/$内运行过多图案,通常是因为不小心制造了死循环。$(br2)产生暗蓝色火花,并使我窒息。", diff --git a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json index 84680b4dec..f321377b43 100644 --- a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json +++ b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/logic.json @@ -79,6 +79,22 @@ "output": "bool", "text": "hexcasting.page.logic.not_equals" }, + { + "type": "hexcasting:pattern", + "op_id": "hexcasting:type_equals", + "anchor": "hexcasting:type_equals", + "input": "any, any", + "output": "bool", + "text": "hexcasting.page.logic.type_equals" + }, + { + "type": "hexcasting:pattern", + "op_id": "hexcasting:type_not_equals", + "anchor": "hexcasting:type_not_equals", + "input": "any, any", + "output": "bool", + "text": "hexcasting.page.logic.type_not_equals" + }, { "type": "hexcasting:pattern", "op_id": "hexcasting:greater", diff --git a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/templates/manual_pattern.json b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/templates/manual_pattern.json index 4c8ea5fa1d..38127a36cf 100644 --- a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/templates/manual_pattern.json +++ b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/templates/manual_pattern.json @@ -23,11 +23,19 @@ { "type": "patchouli:text", "text": "$(n)#input#/$ \u2192 $(n)#output#/$", + "guard": "#has_signature#", "y": 80 }, { "type": "patchouli:text", "text": "#text#", + "guard": "#has_signature->inv#", + "y": 80 + }, + { + "type": "patchouli:text", + "text": "#text#", + "guard": "#has_signature#", "y": 89 } ] diff --git a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern.json b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern.json index 9f5c0bb99d..5bc35d82a3 100644 --- a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern.json +++ b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern.json @@ -23,11 +23,19 @@ { "type": "patchouli:text", "text": "$(n)#input#/$ \u2192 $(n)#output#/$", + "guard": "#has_signature#", "y": 80 }, { "type": "patchouli:text", "text": "#text#", + "guard": "#has_signature->inv#", + "y": 80 + }, + { + "type": "patchouli:text", + "text": "#text#", + "guard": "#has_signature#", "y": 89 } ]