From 343d73aa6a59f5a6672b5eb433ea1c689654728d Mon Sep 17 00:00:00 2001 From: gamma-delta <29877714+gamma-delta@users.noreply.github.com> Date: Sat, 22 Jan 2022 21:53:59 -0600 Subject: [PATCH] big giant patch! add spell scrolls and per-world patterns, and update mod ID --- build.gradle | 16 +- src/generated/resources/.cache/cache | 112 +++++------ .../assets/hex/models/item/artifact.json | 20 -- .../assets/hex/models/item/cypher.json | 20 -- .../assets/hex/models/item/focus.json | 88 --------- .../assets/hex/models/item/trinket.json | 20 -- .../models/item/amethyst_dust.json | 2 +- .../hexcasting/models/item/artifact.json | 20 ++ .../models/item/artifact_filled.json | 2 +- .../models/item/charged_amethyst.json | 2 +- .../assets/hexcasting/models/item/cypher.json | 20 ++ .../models/item/cypher_filled.json | 2 +- .../assets/hexcasting/models/item/focus.json | 88 +++++++++ .../models/item/focus_double.json | 2 +- .../models/item/focus_double_sealed.json | 2 +- .../models/item/focus_empty.json | 2 +- .../models/item/focus_empty_sealed.json | 2 +- .../models/item/focus_entity.json | 2 +- .../models/item/focus_entity_sealed.json | 2 +- .../models/item/focus_list.json | 2 +- .../models/item/focus_list_sealed.json | 2 +- .../models/item/focus_pattern.json | 2 +- .../models/item/focus_pattern_sealed.json | 2 +- .../models/item/focus_vec3.json | 2 +- .../models/item/focus_vec3_sealed.json | 2 +- .../models/item/focus_widget.json | 2 +- .../models/item/focus_widget_sealed.json | 2 +- .../{hex => hexcasting}/models/item/lens.json | 2 +- .../models/item/patchouli_book.json | 2 +- .../models/item/scroll.json | 2 +- .../models/item/spellbook.json | 2 +- .../models/item/sub_sandwich.json | 2 +- .../hexcasting/models/item/trinket.json | 20 ++ .../models/item/trinket_filled.json | 2 +- .../{hex => hexcasting}/models/item/wand.json | 2 +- .../loot_modifiers/global_loot_modifiers.json | 14 +- .../advancements/aaa_wasteful_cast.json | 8 +- .../advancements/aab_big_cast.json | 10 +- .../advancements/enlightenment.json | 8 +- .../advancements/opened_eyes.json | 8 +- .../recipes/hexcasting}/artifact.json | 6 +- .../recipes/hexcasting}/cypher.json | 6 +- .../recipes/hexcasting}/focus.json | 6 +- .../recipes/hexcasting}/lens.json | 6 +- .../recipes/hexcasting}/spellbook.json | 6 +- .../recipes/hexcasting}/trinket.json | 6 +- .../recipes/hexcasting}/wand.json | 4 +- .../advancements/root.json | 4 +- .../loot_modifiers/amethyst_cluster.json | 2 +- .../loot_modifiers/scroll_bastion.json | 2 +- .../loot_modifiers/scroll_cartographer.json | 2 +- .../loot_modifiers/scroll_dungeon.json | 2 +- .../loot_modifiers/scroll_jungle.json | 2 +- .../loot_modifiers/scroll_shipwreck.json | 2 +- .../scroll_stronghold_library.json | 2 +- .../{hex => hexcasting}/recipes/artifact.json | 4 +- .../{hex => hexcasting}/recipes/cypher.json | 4 +- .../{hex => hexcasting}/recipes/focus.json | 4 +- .../{hex => hexcasting}/recipes/lens.json | 4 +- .../recipes/spellbook.json | 4 +- .../{hex => hexcasting}/recipes/trinket.json | 2 +- .../{hex => hexcasting}/recipes/wand.json | 2 +- .../java/at/petrak/hex/api/RenderedSpell.kt | 7 - .../common/casting/operators/OpDuplicate.kt | 17 -- .../common/casting/operators/OpEntityLook.kt | 17 -- .../hex/common/casting/operators/OpSwap.kt | 18 -- .../casting/operators/lists/OpAppend.kt | 17 -- .../operators/math/OpDeconstructVec.kt | 16 -- .../hex/common/command/ListPatsCommand.java | 28 --- .../petrak/hex/common/items/ItemScroll.java | 127 ------------ .../at/petrak/hex/datagen/Advancements.java | 122 ------------ .../petrak/{hex => hexcasting}/HexConfig.java | 2 +- .../at/petrak/{hex => hexcasting}/HexMod.kt | 35 ++-- .../at/petrak/{hex => hexcasting}/HexUtils.kt | 2 +- .../at/petrak/{hex => hexcasting}/README.md | 0 .../api/ConstManaOperator.kt | 6 +- .../api/OperationResult.kt | 2 +- .../{hex => hexcasting}/api/Operator.kt | 8 +- .../api/PatternRegistry.kt | 8 +- .../at/petrak/hexcasting/api/RenderedSpell.kt | 7 + .../{hex => hexcasting}/api/SimpleOperator.kt | 6 +- .../{hex => hexcasting}/api/SpellDatum.kt | 14 +- .../{hex => hexcasting}/api/SpellOperator.kt | 6 +- .../hexcasting/client/ClientTickCounter.java | 18 ++ .../client/HexTooltips.java | 4 +- .../client/RegisterClientStuff.java | 12 +- .../{hex => hexcasting}/client/RenderLib.kt | 13 +- .../client/ShiftScrollListener.java | 10 +- .../client/gui/GuiSpellcasting.kt | 35 ++-- .../common/advancement/OvercastTrigger.java | 4 +- .../common/advancement/SpendManaTrigger.java | 4 +- .../common/casting/CastException.kt | 4 +- .../common/casting/CastingContext.kt | 12 +- .../common/casting/CastingHarness.kt | 22 +-- .../common/casting/ManaHelper.kt | 6 +- .../common/casting/RegisterPatterns.java | 48 ++--- .../common/casting/Widget.kt | 8 +- .../casting/operators/OpBlockAxisRaycast.kt | 14 +- .../casting/operators/OpBlockRaycast.kt | 14 +- .../common/casting/operators/OpDuplicate.kt | 17 ++ .../common/casting/operators/OpEntityLook.kt | 17 ++ .../common/casting/operators/OpEntityPos.kt | 12 +- .../casting/operators/OpEntityRaycast.kt | 14 +- .../common/casting/operators/OpEval.kt | 16 +- .../common/casting/operators/OpEvalDelay.kt | 18 +- .../common/casting/operators/OpRead.kt | 12 +- .../common/casting/operators/OpSwap.kt | 18 ++ .../common/casting/operators/OpUndo.kt | 8 +- .../common/casting/operators/OpWrite.kt | 12 +- .../casting/operators/lists/OpAppend.kt | 17 ++ .../casting/operators/lists/OpConcat.kt | 12 +- .../casting/operators/lists/OpForEach.kt | 20 +- .../common/casting/operators/lists/OpIndex.kt | 12 +- .../casting/operators/math/MathOpUtils.kt | 6 +- .../common/casting/operators/math/OpAbsLen.kt | 10 +- .../common/casting/operators/math/OpAdd.kt | 10 +- .../casting/operators/math/OpConstructVec.kt | 12 +- .../operators/math/OpDeconstructVec.kt | 16 ++ .../casting/operators/math/OpDivCross.kt | 10 +- .../common/casting/operators/math/OpMulDot.kt | 10 +- .../casting/operators/math/OpPowProj.kt | 10 +- .../common/casting/operators/math/OpSub.kt | 10 +- .../operators/selectors/OpGetCaster.kt | 10 +- .../operators/selectors/OpGetEntitiesBy.kt | 14 +- .../operators/selectors/OpGetEntityAt.kt | 14 +- .../casting/operators/spells/OpAddMotion.kt | 16 +- .../casting/operators/spells/OpBlink.kt | 16 +- .../casting/operators/spells/OpBreakBlock.kt | 14 +- .../casting/operators/spells/OpExplode.kt | 12 +- .../operators/spells/OpMakePackagedSpell.kt | 20 +- .../casting/operators/spells/OpPlaceBlock.kt | 12 +- .../casting/operators/spells/OpPrint.kt | 12 +- .../operators/spells/great/OpFlight.kt | 22 +-- .../operators/spells/great/OpLightning.kt | 12 +- .../common/command/HexCommands.java | 2 +- .../common/command/ListPatsCommand.java | 63 ++++++ .../common/items/HexItems.java | 36 ++-- .../common/items/ItemDataHolder.java | 6 +- .../common/items/ItemFocus.java | 8 +- .../common/items/ItemManaBattery.java | 6 +- .../hexcasting/common/items/ItemScroll.java | 185 ++++++++++++++++++ .../common/items/ItemSpellbook.java | 6 +- .../common/items/ItemWand.java | 4 +- .../common/items/magic/ItemArtifact.java | 2 +- .../common/items/magic/ItemCypher.java | 2 +- .../common/items/magic/ItemPackagedSpell.java | 16 +- .../common/items/magic/ItemTrinket.java | 2 +- .../common/lib/HexSounds.java | 6 +- .../common/lib/HexStatistics.java | 4 +- .../common/lib/LibCapabilities.java | 6 +- .../common/lib/LibDamageSources.java | 2 +- .../common/lib/LibItemNames.java | 2 +- .../common/lib/RegisterHelper.java | 4 +- .../common/network/HexMessages.java | 4 +- .../common/network/MsgAddMotionAck.java | 2 +- .../common/network/MsgBlinkAck.java | 2 +- .../common/network/MsgNewSpellPatternAck.java | 6 +- .../common/network/MsgNewSpellPatternSyn.java | 14 +- .../common/network/MsgQuitSpellcasting.java | 4 +- .../common/network/MsgShiftScrollSyn.java | 4 +- .../hexcasting/datagen/Advancements.java | 120 ++++++++++++ .../datagen/DataGenerators.java | 4 +- .../datagen/ItemModels.java | 10 +- .../{hex => hexcasting}/datagen/Recipes.java | 4 +- .../lootmods/AmethystClusterModifier.java | 4 +- .../datagen/lootmods/HexLootModifiers.java | 4 +- .../lootmods/PatternScrollModifier.java | 30 +-- .../hexmath/EulerPathFinder.kt | 2 +- .../{hex => hexcasting}/hexmath/HexAngle.kt | 2 +- .../{hex => hexcasting}/hexmath/HexCoord.kt | 2 +- .../{hex => hexcasting}/hexmath/HexDir.kt | 2 +- .../{hex => hexcasting}/hexmath/HexPattern.kt | 4 +- .../interop/patchouli/PatternComponent.java | 25 ++- .../server/TickScheduler.kt | 2 +- src/main/resources/META-INF/mods.toml | 7 +- src/main/resources/assets/hex/lang/en_us.json | 37 ---- src/main/resources/assets/hex/sounds.json | 35 ---- .../assets/hexcasting/lang/en_us.json | 39 ++++ .../resources/assets/hexcasting/sounds.json | 35 ++++ .../{hex => hexcasting}/sounds/add_line.ogg | Bin .../sounds/add_pattern.ogg | Bin .../{hex => hexcasting}/sounds/cast_hex.ogg | Bin .../sounds/casting_ambiance.ogg | Bin .../textures/item/amethyst_dust.png | Bin .../textures/item/artifact.png | Bin .../textures/item/artifact_filled.png | Bin .../textures/item/artifact_filled.png.mcmeta | 0 .../textures/item/charged_amethyst.png | Bin .../textures/item/cypher.png | Bin .../textures/item/cypher_filled.png | Bin .../textures/item/focus_double.png | Bin .../textures/item/focus_double_sealed.png | Bin .../textures/item/focus_empty.png | Bin .../textures/item/focus_empty_sealed.png | Bin .../textures/item/focus_entity.png | Bin .../textures/item/focus_entity_sealed.png | Bin .../textures/item/focus_list.png | Bin .../textures/item/focus_list_sealed.png | Bin .../textures/item/focus_pattern.png | Bin .../textures/item/focus_pattern_sealed.png | Bin .../textures/item/focus_spell.png | Bin .../textures/item/focus_spell_sealed.png | Bin .../textures/item/focus_template.ase | Bin .../textures/item/focus_template_sealed.ase | Bin .../textures/item/focus_vec3.png | Bin .../textures/item/focus_vec3_sealed.png | Bin .../textures/item/focus_widget.png | Bin .../textures/item/focus_widget_sealed.png | Bin .../textures/item/lens.png | Bin .../textures/item/patchouli_book.png | Bin .../textures/item/scroll.png | Bin .../textures/item/spellbook.png | Bin .../textures/item/sub_sandwich.png | Bin .../textures/item/trinket.png | Bin .../textures/item/trinket_filled.png | Bin .../textures/item/wand.png | Bin .../hex/advancements/grant_patchi_book.json | 12 -- .../hex/loot_tables/grant_patchi_book.json | 20 -- .../thehexbook/en_us/categories/casting.json | 6 - .../thehexbook/en_us/categories/items.json | 6 - .../en_us/categories/patterns/spells.json | 6 - .../thehexbook/en_us/entries/casting/101.json | 80 -------- .../en_us/entries/patterns/readers_guide.json | 25 --- .../entries/patterns/spells/itempicking.json | 17 -- .../thehexbook/en_us/templates/pattern.json | 33 ---- .../en_us/templates/pattern_nosig.json | 28 --- .../data/hex/recipes/patchi_book.json | 12 -- .../advancements/grant_patchi_book.json | 12 ++ .../loot_tables/grant_patchi_book.json | 20 ++ .../patchouli_books/thehexbook/book.json | 4 +- .../thehexbook/en_us/categories/basics.json | 0 .../thehexbook/en_us/categories/casting.json | 6 + .../en_us/categories/greatwork.json | 0 .../thehexbook/en_us/categories/items.json | 6 + .../thehexbook/en_us/categories/patterns.json | 0 .../en_us/categories/patterns/spells.json | 6 + .../en_us/entries/basics/geodes.json | 4 +- .../en_us/entries/basics/media.json | 4 +- .../thehexbook/en_us/entries/casting/101.json | 83 ++++++++ .../en_us/entries/casting/influences.json | 4 +- .../en_us/entries/casting/mishaps.json | 4 +- .../en_us/entries/casting/naming.json | 4 +- .../entries/casting/patterns_as_iotas.json | 10 +- .../en_us/entries/casting/stack.json | 4 +- .../en_us/entries/casting/start_to_see.json | 4 +- .../en_us/entries/casting/vectors.json | 4 +- .../en_us/entries/greatwork/patterns.json | 8 +- .../en_us/entries/greatwork/the_work.json | 6 +- .../en_us/entries/items/amethyst.json | 8 +- .../thehexbook/en_us/entries/items/focus.json | 8 +- .../en_us/entries/items/hexcasting.json | 12 +- .../thehexbook/en_us/entries/items/lens.json | 8 +- .../en_us/entries/items/spellbook.json | 8 +- .../thehexbook/en_us/entries/items/staff.json | 8 +- .../en_us/entries/patterns/basics.json | 18 +- .../en_us/entries/patterns/consts.json | 12 +- .../en_us/entries/patterns/entities.json | 38 ++-- .../en_us/entries/patterns/lists.json | 10 +- .../en_us/entries/patterns/math.json | 20 +- .../en_us/entries/patterns/meta.json | 12 +- .../en_us/entries/patterns/numbers.json | 14 +- .../en_us/entries/patterns/readers_guide.json | 27 +++ .../en_us/entries/patterns/spells/basic.json | 24 ++- .../entries/patterns/spells/blockworks.json | 12 +- .../entries/patterns/spells/hexcasting.json | 15 +- .../entries/patterns/spells/itempicking.json | 18 ++ .../en_us/entries/patterns/stackmanip.json | 10 +- .../thehexbook/en_us/templates/pattern.json | 34 ++++ .../en_us/templates/pattern_nosig.json | 28 +++ .../data/hexcasting/recipes/patchi_book.json | 12 ++ src/test/java/EulerPathFinderTest.kt | 6 +- 271 files changed, 1739 insertions(+), 1597 deletions(-) delete mode 100644 src/generated/resources/assets/hex/models/item/artifact.json delete mode 100644 src/generated/resources/assets/hex/models/item/cypher.json delete mode 100644 src/generated/resources/assets/hex/models/item/focus.json delete mode 100644 src/generated/resources/assets/hex/models/item/trinket.json rename src/generated/resources/assets/{hex => hexcasting}/models/item/amethyst_dust.json (57%) create mode 100644 src/generated/resources/assets/hexcasting/models/item/artifact.json rename src/generated/resources/assets/{hex => hexcasting}/models/item/artifact_filled.json (56%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/charged_amethyst.json (55%) create mode 100644 src/generated/resources/assets/hexcasting/models/item/cypher.json rename src/generated/resources/assets/{hex => hexcasting}/models/item/cypher_filled.json (57%) create mode 100644 src/generated/resources/assets/hexcasting/models/item/focus.json rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_double.json (57%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_double_sealed.json (54%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_empty.json (58%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_empty_sealed.json (54%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_entity.json (57%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_entity_sealed.json (54%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_list.json (59%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_list_sealed.json (55%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_pattern.json (57%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_pattern_sealed.json (53%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_vec3.json (59%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_vec3_sealed.json (55%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_widget.json (57%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/focus_widget_sealed.json (54%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/lens.json (62%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/patchouli_book.json (56%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/scroll.json (61%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/spellbook.json (59%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/sub_sandwich.json (57%) create mode 100644 src/generated/resources/assets/hexcasting/models/item/trinket.json rename src/generated/resources/assets/{hex => hexcasting}/models/item/trinket_filled.json (56%) rename src/generated/resources/assets/{hex => hexcasting}/models/item/wand.json (62%) rename src/generated/resources/data/{hex => hexcasting}/advancements/aaa_wasteful_cast.json (65%) rename src/generated/resources/data/{hex => hexcasting}/advancements/aab_big_cast.json (62%) rename src/generated/resources/data/{hex => hexcasting}/advancements/enlightenment.json (73%) rename src/generated/resources/data/{hex => hexcasting}/advancements/opened_eyes.json (71%) rename src/generated/resources/data/{hex/advancements/recipes/hex => hexcasting/advancements/recipes/hexcasting}/artifact.json (82%) rename src/generated/resources/data/{hex/advancements/recipes/hex => hexcasting/advancements/recipes/hexcasting}/cypher.json (83%) rename src/generated/resources/data/{hex/advancements/recipes/hex => hexcasting/advancements/recipes/hexcasting}/focus.json (83%) rename src/generated/resources/data/{hex/advancements/recipes/hex => hexcasting/advancements/recipes/hexcasting}/lens.json (83%) rename src/generated/resources/data/{hex/advancements/recipes/hex => hexcasting/advancements/recipes/hexcasting}/spellbook.json (87%) rename src/generated/resources/data/{hex/advancements/recipes/hex => hexcasting/advancements/recipes/hexcasting}/trinket.json (83%) rename src/generated/resources/data/{hex/advancements/recipes/hex => hexcasting/advancements/recipes/hexcasting}/wand.json (89%) rename src/generated/resources/data/{hex => hexcasting}/advancements/root.json (90%) rename src/generated/resources/data/{hex => hexcasting}/loot_modifiers/amethyst_cluster.json (91%) rename src/generated/resources/data/{hex => hexcasting}/loot_modifiers/scroll_bastion.json (83%) rename src/generated/resources/data/{hex => hexcasting}/loot_modifiers/scroll_cartographer.json (84%) rename src/generated/resources/data/{hex => hexcasting}/loot_modifiers/scroll_dungeon.json (83%) rename src/generated/resources/data/{hex => hexcasting}/loot_modifiers/scroll_jungle.json (83%) rename src/generated/resources/data/{hex => hexcasting}/loot_modifiers/scroll_shipwreck.json (83%) rename src/generated/resources/data/{hex => hexcasting}/loot_modifiers/scroll_stronghold_library.json (83%) rename src/generated/resources/data/{hex => hexcasting}/recipes/artifact.json (93%) rename src/generated/resources/data/{hex => hexcasting}/recipes/cypher.json (72%) rename src/generated/resources/data/{hex => hexcasting}/recipes/focus.json (76%) rename src/generated/resources/data/{hex => hexcasting}/recipes/lens.json (72%) rename src/generated/resources/data/{hex => hexcasting}/recipes/spellbook.json (79%) rename src/generated/resources/data/{hex => hexcasting}/recipes/trinket.json (87%) rename src/generated/resources/data/{hex => hexcasting}/recipes/wand.json (90%) delete mode 100644 src/main/java/at/petrak/hex/api/RenderedSpell.kt delete mode 100644 src/main/java/at/petrak/hex/common/casting/operators/OpDuplicate.kt delete mode 100644 src/main/java/at/petrak/hex/common/casting/operators/OpEntityLook.kt delete mode 100644 src/main/java/at/petrak/hex/common/casting/operators/OpSwap.kt delete mode 100644 src/main/java/at/petrak/hex/common/casting/operators/lists/OpAppend.kt delete mode 100644 src/main/java/at/petrak/hex/common/casting/operators/math/OpDeconstructVec.kt delete mode 100644 src/main/java/at/petrak/hex/common/command/ListPatsCommand.java delete mode 100644 src/main/java/at/petrak/hex/common/items/ItemScroll.java delete mode 100644 src/main/java/at/petrak/hex/datagen/Advancements.java rename src/main/java/at/petrak/{hex => hexcasting}/HexConfig.java (98%) rename src/main/java/at/petrak/{hex => hexcasting}/HexMod.kt (64%) rename src/main/java/at/petrak/{hex => hexcasting}/HexUtils.kt (97%) rename src/main/java/at/petrak/{hex => hexcasting}/README.md (100%) rename src/main/java/at/petrak/{hex => hexcasting}/api/ConstManaOperator.kt (84%) rename src/main/java/at/petrak/{hex => hexcasting}/api/OperationResult.kt (85%) rename src/main/java/at/petrak/{hex => hexcasting}/api/Operator.kt (89%) rename src/main/java/at/petrak/{hex => hexcasting}/api/PatternRegistry.kt (97%) create mode 100644 src/main/java/at/petrak/hexcasting/api/RenderedSpell.kt rename src/main/java/at/petrak/{hex => hexcasting}/api/SimpleOperator.kt (85%) rename src/main/java/at/petrak/{hex => hexcasting}/api/SpellDatum.kt (95%) rename src/main/java/at/petrak/{hex => hexcasting}/api/SpellOperator.kt (80%) create mode 100644 src/main/java/at/petrak/hexcasting/client/ClientTickCounter.java rename src/main/java/at/petrak/{hex => hexcasting}/client/HexTooltips.java (88%) rename src/main/java/at/petrak/{hex => hexcasting}/client/RegisterClientStuff.java (88%) rename src/main/java/at/petrak/{hex => hexcasting}/client/RenderLib.kt (97%) rename src/main/java/at/petrak/{hex => hexcasting}/client/ShiftScrollListener.java (85%) rename src/main/java/at/petrak/{hex => hexcasting}/client/gui/GuiSpellcasting.kt (92%) rename src/main/java/at/petrak/{hex => hexcasting}/common/advancement/OvercastTrigger.java (97%) rename src/main/java/at/petrak/{hex => hexcasting}/common/advancement/SpendManaTrigger.java (96%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/CastException.kt (96%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/CastingContext.kt (94%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/CastingHarness.kt (94%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/ManaHelper.kt (95%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/RegisterPatterns.java (86%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/Widget.kt (64%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/OpBlockAxisRaycast.kt (72%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/OpBlockRaycast.kt (79%) create mode 100644 src/main/java/at/petrak/hexcasting/common/casting/operators/OpDuplicate.kt create mode 100644 src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityLook.kt rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/OpEntityPos.kt (61%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/OpEntityRaycast.kt (69%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/OpEval.kt (68%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/OpEvalDelay.kt (75%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/OpRead.kt (55%) create mode 100644 src/main/java/at/petrak/hexcasting/common/casting/operators/OpSwap.kt rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/OpUndo.kt (50%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/OpWrite.kt (51%) create mode 100644 src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpAppend.kt rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/lists/OpConcat.kt (51%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/lists/OpForEach.kt (75%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/lists/OpIndex.kt (57%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/math/MathOpUtils.kt (72%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/math/OpAbsLen.kt (58%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/math/OpAdd.kt (70%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/math/OpConstructVec.kt (53%) create mode 100644 src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDeconstructVec.kt rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/math/OpDivCross.kt (72%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/math/OpMulDot.kt (70%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/math/OpPowProj.kt (75%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/math/OpSub.kt (72%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/selectors/OpGetCaster.kt (50%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/selectors/OpGetEntitiesBy.kt (81%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/selectors/OpGetEntityAt.kt (63%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/spells/OpAddMotion.kt (73%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/spells/OpBlink.kt (79%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/spells/OpBreakBlock.kt (78%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/spells/OpExplode.kt (76%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/spells/OpMakePackagedSpell.kt (78%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/spells/OpPlaceBlock.kt (91%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/spells/OpPrint.kt (66%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/spells/great/OpFlight.kt (88%) rename src/main/java/at/petrak/{hex => hexcasting}/common/casting/operators/spells/great/OpLightning.kt (72%) rename src/main/java/at/petrak/{hex => hexcasting}/common/command/HexCommands.java (87%) create mode 100644 src/main/java/at/petrak/hexcasting/common/command/ListPatsCommand.java rename src/main/java/at/petrak/{hex => hexcasting}/common/items/HexItems.java (71%) rename src/main/java/at/petrak/{hex => hexcasting}/common/items/ItemDataHolder.java (74%) rename src/main/java/at/petrak/{hex => hexcasting}/common/items/ItemFocus.java (83%) rename src/main/java/at/petrak/{hex => hexcasting}/common/items/ItemManaBattery.java (91%) create mode 100644 src/main/java/at/petrak/hexcasting/common/items/ItemScroll.java rename src/main/java/at/petrak/{hex => hexcasting}/common/items/ItemSpellbook.java (96%) rename src/main/java/at/petrak/{hex => hexcasting}/common/items/ItemWand.java (90%) rename src/main/java/at/petrak/{hex => hexcasting}/common/items/magic/ItemArtifact.java (86%) rename src/main/java/at/petrak/{hex => hexcasting}/common/items/magic/ItemCypher.java (86%) rename src/main/java/at/petrak/{hex => hexcasting}/common/items/magic/ItemPackagedSpell.java (90%) rename src/main/java/at/petrak/{hex => hexcasting}/common/items/magic/ItemTrinket.java (86%) rename src/main/java/at/petrak/{hex => hexcasting}/common/lib/HexSounds.java (87%) rename src/main/java/at/petrak/{hex => hexcasting}/common/lib/HexStatistics.java (93%) rename src/main/java/at/petrak/{hex => hexcasting}/common/lib/LibCapabilities.java (88%) rename src/main/java/at/petrak/{hex => hexcasting}/common/lib/LibDamageSources.java (83%) rename src/main/java/at/petrak/{hex => hexcasting}/common/lib/LibItemNames.java (93%) rename src/main/java/at/petrak/{hex => hexcasting}/common/lib/RegisterHelper.java (90%) rename src/main/java/at/petrak/{hex => hexcasting}/common/network/HexMessages.java (95%) rename src/main/java/at/petrak/{hex => hexcasting}/common/network/MsgAddMotionAck.java (96%) rename src/main/java/at/petrak/{hex => hexcasting}/common/network/MsgBlinkAck.java (96%) rename src/main/java/at/petrak/{hex => hexcasting}/common/network/MsgNewSpellPatternAck.java (94%) rename src/main/java/at/petrak/{hex => hexcasting}/common/network/MsgNewSpellPatternSyn.java (90%) rename src/main/java/at/petrak/{hex => hexcasting}/common/network/MsgQuitSpellcasting.java (91%) rename src/main/java/at/petrak/{hex => hexcasting}/common/network/MsgShiftScrollSyn.java (95%) create mode 100644 src/main/java/at/petrak/hexcasting/datagen/Advancements.java rename src/main/java/at/petrak/{hex => hexcasting}/datagen/DataGenerators.java (88%) rename src/main/java/at/petrak/{hex => hexcasting}/datagen/ItemModels.java (93%) rename src/main/java/at/petrak/{hex => hexcasting}/datagen/Recipes.java (97%) rename src/main/java/at/petrak/{hex => hexcasting}/datagen/lootmods/AmethystClusterModifier.java (96%) rename src/main/java/at/petrak/{hex => hexcasting}/datagen/lootmods/HexLootModifiers.java (97%) rename src/main/java/at/petrak/{hex => hexcasting}/datagen/lootmods/PatternScrollModifier.java (69%) rename src/main/java/at/petrak/{hex => hexcasting}/hexmath/EulerPathFinder.kt (98%) rename src/main/java/at/petrak/{hex => hexcasting}/hexmath/HexAngle.kt (85%) rename src/main/java/at/petrak/{hex => hexcasting}/hexmath/HexCoord.kt (98%) rename src/main/java/at/petrak/{hex => hexcasting}/hexmath/HexDir.kt (95%) rename src/main/java/at/petrak/{hex => hexcasting}/hexmath/HexPattern.kt (98%) rename src/main/java/at/petrak/{hex => hexcasting}/interop/patchouli/PatternComponent.java (83%) rename src/main/java/at/petrak/{hex => hexcasting}/server/TickScheduler.kt (95%) delete mode 100644 src/main/resources/assets/hex/lang/en_us.json delete mode 100644 src/main/resources/assets/hex/sounds.json create mode 100644 src/main/resources/assets/hexcasting/lang/en_us.json create mode 100644 src/main/resources/assets/hexcasting/sounds.json rename src/main/resources/assets/{hex => hexcasting}/sounds/add_line.ogg (100%) rename src/main/resources/assets/{hex => hexcasting}/sounds/add_pattern.ogg (100%) rename src/main/resources/assets/{hex => hexcasting}/sounds/cast_hex.ogg (100%) rename src/main/resources/assets/{hex => hexcasting}/sounds/casting_ambiance.ogg (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/amethyst_dust.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/artifact.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/artifact_filled.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/artifact_filled.png.mcmeta (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/charged_amethyst.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/cypher.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/cypher_filled.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_double.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_double_sealed.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_empty.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_empty_sealed.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_entity.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_entity_sealed.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_list.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_list_sealed.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_pattern.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_pattern_sealed.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_spell.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_spell_sealed.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_template.ase (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_template_sealed.ase (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_vec3.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_vec3_sealed.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_widget.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/focus_widget_sealed.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/lens.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/patchouli_book.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/scroll.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/spellbook.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/sub_sandwich.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/trinket.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/trinket_filled.png (100%) rename src/main/resources/assets/{hex => hexcasting}/textures/item/wand.png (100%) delete mode 100644 src/main/resources/data/hex/advancements/grant_patchi_book.json delete mode 100644 src/main/resources/data/hex/loot_tables/grant_patchi_book.json delete mode 100644 src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/casting.json delete mode 100644 src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/items.json delete mode 100644 src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/patterns/spells.json delete mode 100644 src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/101.json delete mode 100644 src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/readers_guide.json delete mode 100644 src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/itempicking.json delete mode 100644 src/main/resources/data/hex/patchouli_books/thehexbook/en_us/templates/pattern.json delete mode 100644 src/main/resources/data/hex/patchouli_books/thehexbook/en_us/templates/pattern_nosig.json delete mode 100644 src/main/resources/data/hex/recipes/patchi_book.json create mode 100644 src/main/resources/data/hexcasting/advancements/grant_patchi_book.json create mode 100644 src/main/resources/data/hexcasting/loot_tables/grant_patchi_book.json rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/book.json (92%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/categories/basics.json (100%) create mode 100644 src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/casting.json rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/categories/greatwork.json (100%) create mode 100644 src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/items.json rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/categories/patterns.json (100%) create mode 100644 src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/patterns/spells.json rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/basics/geodes.json (94%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/basics/media.json (94%) create mode 100644 src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/101.json rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/casting/influences.json (92%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/casting/mishaps.json (93%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/casting/naming.json (94%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/casting/patterns_as_iotas.json (93%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/casting/stack.json (96%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/casting/start_to_see.json (95%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/casting/vectors.json (94%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/greatwork/patterns.json (90%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/greatwork/the_work.json (63%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/items/amethyst.json (90%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/items/focus.json (91%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/items/hexcasting.json (92%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/items/lens.json (82%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/items/spellbook.json (82%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/items/staff.json (80%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/patterns/basics.json (92%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/patterns/consts.json (89%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/patterns/entities.json (90%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/patterns/lists.json (87%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/patterns/math.json (93%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/patterns/meta.json (91%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/patterns/numbers.json (87%) create mode 100644 src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/readers_guide.json rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/patterns/spells/basic.json (80%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/patterns/spells/blockworks.json (78%) rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/patterns/spells/hexcasting.json (82%) create mode 100644 src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/itempicking.json rename src/main/resources/data/{hex => hexcasting}/patchouli_books/thehexbook/en_us/entries/patterns/stackmanip.json (85%) create mode 100644 src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern.json create mode 100644 src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern_nosig.json create mode 100644 src/main/resources/data/hexcasting/recipes/patchi_book.json diff --git a/build.gradle b/build.gradle index 7e6e9e37..f58f6186 100644 --- a/build.gradle +++ b/build.gradle @@ -17,9 +17,9 @@ apply plugin: 'maven-publish' apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.parchmentmc.librarian.forgegradle' -version = '0.1.1' -group = 'at.petra-k.hex' // http://maven.apache.org/guides/mini/guide-naming-conventions.html -archivesBaseName = 'hex' +version = '0.2.0' +group = 'at.petra-k.hexcasting' // http://maven.apache.org/guides/mini/guide-naming-conventions.html +archivesBaseName = 'hexcasting' // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) @@ -80,7 +80,7 @@ minecraft { property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" mods { - hex { + hexcasting { source sourceSets.main } } @@ -105,7 +105,7 @@ minecraft { property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" mods { - hex { + hexcasting { source sourceSets.main } } @@ -130,10 +130,10 @@ minecraft { property 'mixin.env.refMapRemappingFile', "${projectDir}/build/createSrgToMcp/output.srg" // Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources. - args '--mod', 'hex', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') + args '--mod', 'hexcasting', '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') mods { - hex { + hexcasting { source sourceSets.main } } @@ -199,7 +199,7 @@ dependencies { jar { manifest { attributes([ - "Specification-Title" : "hex", + "Specification-Title" : "hexcasting", "Specification-Vendor" : "petrak-at", "Specification-Version" : "1", // We are version 1 of ourselves "Implementation-Title" : project.name, diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index dad1b37f..97ced4d6 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -1,56 +1,56 @@ -72b0863df1de5bd50917aa626e6a27933cc7c485 assets/hex/models/item/amethyst_dust.json -a310c1d496f4930955d1484ff271487d811bafd4 assets/hex/models/item/artifact.json -007d82b95d0c976ef5e1f726542ae752111efb8b assets/hex/models/item/artifact_filled.json -c3bfbb78256d5698e5df065e5fcbb1fcddb0505a assets/hex/models/item/charged_amethyst.json -fcd283e7b444ffacb8ba71462d2a0aff383fe4a2 assets/hex/models/item/cypher.json -9dcb4967450238440e0db6b25e81a6d9704d4835 assets/hex/models/item/cypher_filled.json -17b322e41c7789c5e6e91b53f7821446d7de6714 assets/hex/models/item/focus.json -13e30c053b46626bdabf9fb24baaa16268856743 assets/hex/models/item/focus_double.json -9c86a114177b464f1f61939c19f860375b16dca8 assets/hex/models/item/focus_double_sealed.json -1bf03d6ad80d323bceb7c8ffabaa966a7bb6e55a assets/hex/models/item/focus_empty.json -824dbf6a1a9ad0ffb44d2460ca1478013bee24c2 assets/hex/models/item/focus_empty_sealed.json -1f428723bf0abf9a1dbaa293444fc00d7c4a4acf assets/hex/models/item/focus_entity.json -1cc85eed710d872510efbb735159e6fe97775ecf assets/hex/models/item/focus_entity_sealed.json -cbcff532ab24e5bf839cf157d7ffbc6697e84725 assets/hex/models/item/focus_list.json -2641b798c8f30e24dd286925f8d18469db30e294 assets/hex/models/item/focus_list_sealed.json -7e05daa433b610d240daf9aa174b159efaac56aa assets/hex/models/item/focus_pattern.json -529071067ebbdb51ef0e4be5331fab722e20152e assets/hex/models/item/focus_pattern_sealed.json -76f4af83258b403304aeaad0ace5e5915df7f213 assets/hex/models/item/focus_vec3.json -5f34ebe6bbc30e3ec2abc6cab37bed2b06b4523c assets/hex/models/item/focus_vec3_sealed.json -ce06bdaeaf73d59c85d67e4cd8b51f54160ebef0 assets/hex/models/item/focus_widget.json -ce4e0adeb8173c3454327102c3a1c30a4d497d32 assets/hex/models/item/focus_widget_sealed.json -6a8033bbece2ba057a09e8b48e498d5cb90e6429 assets/hex/models/item/lens.json -621c14c4fa54991c1707f9f6594bdfc2eb34e6c5 assets/hex/models/item/patchouli_book.json -b58e369f0bc9a8f13f72424445999c3abc051c3f assets/hex/models/item/scroll.json -a354a2dc83d220c43d4c9f156059cbd8255e9e19 assets/hex/models/item/spellbook.json -6e3f03ff2ea75a5cd768b38886624548c0b3f013 assets/hex/models/item/sub_sandwich.json -eaddd1e5ae74293d784748e56e4a238a7607e34c assets/hex/models/item/trinket.json -f0cce957861ee854cbd68984015da2c530c9ef6d assets/hex/models/item/trinket_filled.json -837e7ed749afa44bd3be4114c7d81f3b8fe47852 assets/hex/models/item/wand.json -60c5d593087dab587224ee4dcdadeb88f0e146ed data/forge/loot_modifiers/global_loot_modifiers.json -40eee88282c6d02518aab36a1da1d2f7d5c0a051 data/hex/advancements/aaa_wasteful_cast.json -f6d43f5b05b88aeebb1529aa700cc3dcc24bbc32 data/hex/advancements/aab_big_cast.json -7a7e26a15a44ce55b2258bb023ae1c8f0c9a7e95 data/hex/advancements/enlightenment.json -9e285fdc595c83e2b72c1ad363e8aafff8b642f1 data/hex/advancements/opened_eyes.json -912115e8811b07c3484f5ac781143c450d561023 data/hex/advancements/recipes/hex/artifact.json -33d503ee36d30d6fac2c96000faba800521130ac data/hex/advancements/recipes/hex/cypher.json -4a8e31487e2b1a74166af3e31e706b1534adbca7 data/hex/advancements/recipes/hex/focus.json -976b5bacb3b1bb1aff08e0b8121aea04f688caeb data/hex/advancements/recipes/hex/lens.json -45355d46a9b80f84cd9ef1bbe54fbf5db4fda380 data/hex/advancements/recipes/hex/spellbook.json -e27f5d32775d3965f03db2c6e58f6f5da78b62df data/hex/advancements/recipes/hex/trinket.json -2bcb08b33e9cbc9d17285c0eff9ce4f7f0f35159 data/hex/advancements/recipes/hex/wand.json -31e2e34bcb1ff2294af8a44ff9942d0bd8d9a765 data/hex/advancements/root.json -a46281d65532086be7fbb63beb8c515edf2baaee data/hex/loot_modifiers/amethyst_cluster.json -861e04461fa66d993fd37d24c3208920e808e61a data/hex/loot_modifiers/scroll_bastion.json -1daa9d8cb2a81c8fe6e37e7246b5396629c6e957 data/hex/loot_modifiers/scroll_cartographer.json -e6d7588243940fe85265bd61aa910fe1bad19a1b data/hex/loot_modifiers/scroll_dungeon.json -9460c6f7e465a6c46af76754d5992027c2cd259e data/hex/loot_modifiers/scroll_jungle.json -c4404543100692d45560f456257295cedf585a00 data/hex/loot_modifiers/scroll_shipwreck.json -618cb0716343700279a7ac203ad85b8f1ee52735 data/hex/loot_modifiers/scroll_stronghold_library.json -247829c255cc76b9f82d60ce057e8cf5bea0dc84 data/hex/recipes/artifact.json -b438e051fc58c58c93dddf88ea858cea6ae9fc13 data/hex/recipes/cypher.json -d31bc9597a6320a886a059579edc610b24ad225b data/hex/recipes/focus.json -b639864313a431ba3c892e7fca8d25f09c4be330 data/hex/recipes/lens.json -4d4890dd419f3bed4c0fa54788a070ecb3320a4f data/hex/recipes/spellbook.json -536d91fd2f55e1fdbcd2706d28bbf0be3daa5477 data/hex/recipes/trinket.json -c863bfe989585752fbdb4a0e5ed051b9f5f1e6d4 data/hex/recipes/wand.json +6d9d6d0407725fc19547612f34a584dea471dcc2 assets/hexcasting/models/item/amethyst_dust.json +f700bab02c149833e4739c4811b4ae23ac8eccf3 assets/hexcasting/models/item/artifact.json +a5cb961b1df523395c8a8292c7b2845a621de1ce assets/hexcasting/models/item/artifact_filled.json +b045365501445d7babcd6ca1e0a75747573b1f70 assets/hexcasting/models/item/charged_amethyst.json +02d08a231f59ad03e396d8a53db320ce7af379ab assets/hexcasting/models/item/cypher.json +55a0d253fd1ad75b7f5f2ccc8ab3f4f501f1d6f6 assets/hexcasting/models/item/cypher_filled.json +5ee629510cbd0058a5736be2bf426d3a1b6717a0 assets/hexcasting/models/item/focus.json +a2469a3b0bd221851594e6332dff4a49316063a9 assets/hexcasting/models/item/focus_double.json +1ef2a712e18c2ddc86dd1f70e17b7cf633bd68bc assets/hexcasting/models/item/focus_double_sealed.json +452b563ed63aeded208133100d6c69efb4eb1e2d assets/hexcasting/models/item/focus_empty.json +b6d4df44628ed856ce6ca85a5569e2b55aed2e71 assets/hexcasting/models/item/focus_empty_sealed.json +a7acc64c442a1b590efc1743e2da5c2f80bc95c5 assets/hexcasting/models/item/focus_entity.json +fcabe4af7bf0fd469b62ad9d33396b0b63a520f8 assets/hexcasting/models/item/focus_entity_sealed.json +cbf9d18d8c079c59b9eb8194151bbb7b2aa24356 assets/hexcasting/models/item/focus_list.json +b486f31b9b10ad6c2b2f7b9dbd604ca5125c811b assets/hexcasting/models/item/focus_list_sealed.json +576161e725c78f29f52aeb99ed07679c967ffcc8 assets/hexcasting/models/item/focus_pattern.json +a87ff6164f5c0182ba6a0a4c2337e2a13f93413e assets/hexcasting/models/item/focus_pattern_sealed.json +c5adfb1ceb637aca2ee807a8c13f41f558fbb7f2 assets/hexcasting/models/item/focus_vec3.json +e0e7632329c6fccd9a5d0ee7145fb9afb3996468 assets/hexcasting/models/item/focus_vec3_sealed.json +fa1353a35104e84914cad5f961908aa56f6f853d assets/hexcasting/models/item/focus_widget.json +3e6738ebcfe57a753baefa4b3cf03681e48227ed assets/hexcasting/models/item/focus_widget_sealed.json +b8537e32d4b1c2fc1cadd778e8c68cfda63ee4a7 assets/hexcasting/models/item/lens.json +3906a67f7695c16202caa98a4227a331154557a4 assets/hexcasting/models/item/patchouli_book.json +d9e5df8e95f47a16a209e1b41986c17102f6d2d3 assets/hexcasting/models/item/scroll.json +17c1a563c92e2e0a5670174b9e1bfc39c343e605 assets/hexcasting/models/item/spellbook.json +9ffc7227899c0e251d0b6468d0e30d65346cfd5e assets/hexcasting/models/item/sub_sandwich.json +43da04ec24298fd7206efd9cbfafa459bd9c5ee9 assets/hexcasting/models/item/trinket.json +f1167c8c9e8a0554065dab38de7b41e2efecfc84 assets/hexcasting/models/item/trinket_filled.json +802bdf1756b8162f5eeb8993d4040424c9e70ba3 assets/hexcasting/models/item/wand.json +a2cee8e7d2149294538d0d4d9e32d8235f194229 data/forge/loot_modifiers/global_loot_modifiers.json +9f3dc1058df067dc15b793f54315de461fa65bcf data/hexcasting/advancements/aaa_wasteful_cast.json +4f4c94021adfb296e3ef3dce1acc46f724f38f92 data/hexcasting/advancements/aab_big_cast.json +a165e3959b7d0c37bea586d0e94609b483255569 data/hexcasting/advancements/enlightenment.json +be61aff8b2fe07eddf05bed7f8b97bec9f1807f9 data/hexcasting/advancements/opened_eyes.json +af81f4442801d794920d6330d82cb1289a78f236 data/hexcasting/advancements/recipes/hexcasting/artifact.json +7e4de1f72dd75e3efea6e879e1be15fa4216bd4b data/hexcasting/advancements/recipes/hexcasting/cypher.json +0655dfb9f39d662b9b4084c6fa1881777ef5bcdb data/hexcasting/advancements/recipes/hexcasting/focus.json +0c792569bbaf3b30a78a378f6eb192cbd5e304a1 data/hexcasting/advancements/recipes/hexcasting/lens.json +cd3ca380294544b07e91ce85d97808c30ffa5d17 data/hexcasting/advancements/recipes/hexcasting/spellbook.json +e0954b5771ab64014fe3a0269db6ab0699e3e6f8 data/hexcasting/advancements/recipes/hexcasting/trinket.json +cfd93238a1774a30a9da7c6b84e66c2e1e22f243 data/hexcasting/advancements/recipes/hexcasting/wand.json +d31956749bebbcb3f0d3c37f89b569642ac8c2fb data/hexcasting/advancements/root.json +865ddd908e95e171f80e8f051987d68c52af987e data/hexcasting/loot_modifiers/amethyst_cluster.json +e04be385fa9daa422e41a38ddd70fdd065107968 data/hexcasting/loot_modifiers/scroll_bastion.json +6569766d1579114149eb0a1154d05ec3c964b2a3 data/hexcasting/loot_modifiers/scroll_cartographer.json +afecba3144e00505977a4ab4de7940f949ab7818 data/hexcasting/loot_modifiers/scroll_dungeon.json +0e8c8a56161586a4021487b27059ca151465af67 data/hexcasting/loot_modifiers/scroll_jungle.json +50e7ad657a0ab43f3bd632120e09f109791aaf34 data/hexcasting/loot_modifiers/scroll_shipwreck.json +7ffa361bd8a108b504fe450749b42997dc898e5e data/hexcasting/loot_modifiers/scroll_stronghold_library.json +2a8ed63d969c2a7ce3e49f87018374c4c5cb56d0 data/hexcasting/recipes/artifact.json +778be799ac42d719d5580b518bde936f45e2fffc data/hexcasting/recipes/cypher.json +91d690ba6ad40da05111aff1ea5804c859618986 data/hexcasting/recipes/focus.json +3a47933ad88386e7e70712d9db682f0a987afeda data/hexcasting/recipes/lens.json +4f06f5f4ae181c8bb6b993d7b6047cd9ca7afbce data/hexcasting/recipes/spellbook.json +0a06fc4cfcddf6c8e3a49fda782eca97187ed51d data/hexcasting/recipes/trinket.json +0521d57838cb3e9795fc02ce47aa58db3b0188f9 data/hexcasting/recipes/wand.json diff --git a/src/generated/resources/assets/hex/models/item/artifact.json b/src/generated/resources/assets/hex/models/item/artifact.json deleted file mode 100644 index 31572b67..00000000 --- a/src/generated/resources/assets/hex/models/item/artifact.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parent": "minecraft:item/handheld", - "textures": { - "layer0": "hex:item/artifact" - }, - "overrides": [ - { - "predicate": { - "hex:has_patterns": -0.01 - }, - "model": "hex:item/artifact" - }, - { - "predicate": { - "hex:has_patterns": 0.99 - }, - "model": "hex:item/artifact_filled" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/cypher.json b/src/generated/resources/assets/hex/models/item/cypher.json deleted file mode 100644 index 2a24b146..00000000 --- a/src/generated/resources/assets/hex/models/item/cypher.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parent": "minecraft:item/handheld", - "textures": { - "layer0": "hex:item/cypher" - }, - "overrides": [ - { - "predicate": { - "hex:has_patterns": -0.01 - }, - "model": "hex:item/cypher" - }, - { - "predicate": { - "hex:has_patterns": 0.99 - }, - "model": "hex:item/cypher_filled" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus.json b/src/generated/resources/assets/hex/models/item/focus.json deleted file mode 100644 index eb74dd71..00000000 --- a/src/generated/resources/assets/hex/models/item/focus.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "overrides": [ - { - "predicate": { - "hex:datatype": -0.01 - }, - "model": "hex:item/focus_empty" - }, - { - "predicate": { - "hex:datatype": 99.99 - }, - "model": "hex:item/focus_empty_sealed" - }, - { - "predicate": { - "hex:datatype": 0.99 - }, - "model": "hex:item/focus_entity" - }, - { - "predicate": { - "hex:datatype": 100.99 - }, - "model": "hex:item/focus_entity_sealed" - }, - { - "predicate": { - "hex:datatype": 1.99 - }, - "model": "hex:item/focus_double" - }, - { - "predicate": { - "hex:datatype": 101.99 - }, - "model": "hex:item/focus_double_sealed" - }, - { - "predicate": { - "hex:datatype": 2.99 - }, - "model": "hex:item/focus_vec3" - }, - { - "predicate": { - "hex:datatype": 102.99 - }, - "model": "hex:item/focus_vec3_sealed" - }, - { - "predicate": { - "hex:datatype": 3.99 - }, - "model": "hex:item/focus_widget" - }, - { - "predicate": { - "hex:datatype": 103.99 - }, - "model": "hex:item/focus_widget_sealed" - }, - { - "predicate": { - "hex:datatype": 4.99 - }, - "model": "hex:item/focus_list" - }, - { - "predicate": { - "hex:datatype": 104.99 - }, - "model": "hex:item/focus_list_sealed" - }, - { - "predicate": { - "hex:datatype": 5.99 - }, - "model": "hex:item/focus_pattern" - }, - { - "predicate": { - "hex:datatype": 105.99 - }, - "model": "hex:item/focus_pattern_sealed" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/trinket.json b/src/generated/resources/assets/hex/models/item/trinket.json deleted file mode 100644 index 6ad3c864..00000000 --- a/src/generated/resources/assets/hex/models/item/trinket.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "parent": "minecraft:item/handheld", - "textures": { - "layer0": "hex:item/trinket" - }, - "overrides": [ - { - "predicate": { - "hex:has_patterns": -0.01 - }, - "model": "hex:item/trinket" - }, - { - "predicate": { - "hex:has_patterns": 0.99 - }, - "model": "hex:item/trinket_filled" - } - ] -} \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/amethyst_dust.json b/src/generated/resources/assets/hexcasting/models/item/amethyst_dust.json similarity index 57% rename from src/generated/resources/assets/hex/models/item/amethyst_dust.json rename to src/generated/resources/assets/hexcasting/models/item/amethyst_dust.json index 65c4d543..37ad77cc 100644 --- a/src/generated/resources/assets/hex/models/item/amethyst_dust.json +++ b/src/generated/resources/assets/hexcasting/models/item/amethyst_dust.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/amethyst_dust" + "layer0": "hexcasting:item/amethyst_dust" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hexcasting/models/item/artifact.json b/src/generated/resources/assets/hexcasting/models/item/artifact.json new file mode 100644 index 00000000..88f6f697 --- /dev/null +++ b/src/generated/resources/assets/hexcasting/models/item/artifact.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "hexcasting:item/artifact" + }, + "overrides": [ + { + "predicate": { + "hexcasting:has_patterns": -0.01 + }, + "model": "hexcasting:item/artifact" + }, + { + "predicate": { + "hexcasting:has_patterns": 0.99 + }, + "model": "hexcasting:item/artifact_filled" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/artifact_filled.json b/src/generated/resources/assets/hexcasting/models/item/artifact_filled.json similarity index 56% rename from src/generated/resources/assets/hex/models/item/artifact_filled.json rename to src/generated/resources/assets/hexcasting/models/item/artifact_filled.json index ff1164b0..31d325bb 100644 --- a/src/generated/resources/assets/hex/models/item/artifact_filled.json +++ b/src/generated/resources/assets/hexcasting/models/item/artifact_filled.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/artifact_filled" + "layer0": "hexcasting:item/artifact_filled" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/charged_amethyst.json b/src/generated/resources/assets/hexcasting/models/item/charged_amethyst.json similarity index 55% rename from src/generated/resources/assets/hex/models/item/charged_amethyst.json rename to src/generated/resources/assets/hexcasting/models/item/charged_amethyst.json index f9789b9f..3dc73530 100644 --- a/src/generated/resources/assets/hex/models/item/charged_amethyst.json +++ b/src/generated/resources/assets/hexcasting/models/item/charged_amethyst.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/charged_amethyst" + "layer0": "hexcasting:item/charged_amethyst" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hexcasting/models/item/cypher.json b/src/generated/resources/assets/hexcasting/models/item/cypher.json new file mode 100644 index 00000000..38e46e75 --- /dev/null +++ b/src/generated/resources/assets/hexcasting/models/item/cypher.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "hexcasting:item/cypher" + }, + "overrides": [ + { + "predicate": { + "hexcasting:has_patterns": -0.01 + }, + "model": "hexcasting:item/cypher" + }, + { + "predicate": { + "hexcasting:has_patterns": 0.99 + }, + "model": "hexcasting:item/cypher_filled" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/cypher_filled.json b/src/generated/resources/assets/hexcasting/models/item/cypher_filled.json similarity index 57% rename from src/generated/resources/assets/hex/models/item/cypher_filled.json rename to src/generated/resources/assets/hexcasting/models/item/cypher_filled.json index bd7d0194..571e3ae6 100644 --- a/src/generated/resources/assets/hex/models/item/cypher_filled.json +++ b/src/generated/resources/assets/hexcasting/models/item/cypher_filled.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/cypher_filled" + "layer0": "hexcasting:item/cypher_filled" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hexcasting/models/item/focus.json b/src/generated/resources/assets/hexcasting/models/item/focus.json new file mode 100644 index 00000000..e3b6d55b --- /dev/null +++ b/src/generated/resources/assets/hexcasting/models/item/focus.json @@ -0,0 +1,88 @@ +{ + "overrides": [ + { + "predicate": { + "hexcasting:datatype": -0.01 + }, + "model": "hexcasting:item/focus_empty" + }, + { + "predicate": { + "hexcasting:datatype": 99.99 + }, + "model": "hexcasting:item/focus_empty_sealed" + }, + { + "predicate": { + "hexcasting:datatype": 0.99 + }, + "model": "hexcasting:item/focus_entity" + }, + { + "predicate": { + "hexcasting:datatype": 100.99 + }, + "model": "hexcasting:item/focus_entity_sealed" + }, + { + "predicate": { + "hexcasting:datatype": 1.99 + }, + "model": "hexcasting:item/focus_double" + }, + { + "predicate": { + "hexcasting:datatype": 101.99 + }, + "model": "hexcasting:item/focus_double_sealed" + }, + { + "predicate": { + "hexcasting:datatype": 2.99 + }, + "model": "hexcasting:item/focus_vec3" + }, + { + "predicate": { + "hexcasting:datatype": 102.99 + }, + "model": "hexcasting:item/focus_vec3_sealed" + }, + { + "predicate": { + "hexcasting:datatype": 3.99 + }, + "model": "hexcasting:item/focus_widget" + }, + { + "predicate": { + "hexcasting:datatype": 103.99 + }, + "model": "hexcasting:item/focus_widget_sealed" + }, + { + "predicate": { + "hexcasting:datatype": 4.99 + }, + "model": "hexcasting:item/focus_list" + }, + { + "predicate": { + "hexcasting:datatype": 104.99 + }, + "model": "hexcasting:item/focus_list_sealed" + }, + { + "predicate": { + "hexcasting:datatype": 5.99 + }, + "model": "hexcasting:item/focus_pattern" + }, + { + "predicate": { + "hexcasting:datatype": 105.99 + }, + "model": "hexcasting:item/focus_pattern_sealed" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_double.json b/src/generated/resources/assets/hexcasting/models/item/focus_double.json similarity index 57% rename from src/generated/resources/assets/hex/models/item/focus_double.json rename to src/generated/resources/assets/hexcasting/models/item/focus_double.json index d85ff3de..d8a107d0 100644 --- a/src/generated/resources/assets/hex/models/item/focus_double.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_double.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_double" + "layer0": "hexcasting:item/focus_double" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_double_sealed.json b/src/generated/resources/assets/hexcasting/models/item/focus_double_sealed.json similarity index 54% rename from src/generated/resources/assets/hex/models/item/focus_double_sealed.json rename to src/generated/resources/assets/hexcasting/models/item/focus_double_sealed.json index 401fae2b..d4580459 100644 --- a/src/generated/resources/assets/hex/models/item/focus_double_sealed.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_double_sealed.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_double_sealed" + "layer0": "hexcasting:item/focus_double_sealed" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_empty.json b/src/generated/resources/assets/hexcasting/models/item/focus_empty.json similarity index 58% rename from src/generated/resources/assets/hex/models/item/focus_empty.json rename to src/generated/resources/assets/hexcasting/models/item/focus_empty.json index 8db17800..c2d11b99 100644 --- a/src/generated/resources/assets/hex/models/item/focus_empty.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_empty.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_empty" + "layer0": "hexcasting:item/focus_empty" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_empty_sealed.json b/src/generated/resources/assets/hexcasting/models/item/focus_empty_sealed.json similarity index 54% rename from src/generated/resources/assets/hex/models/item/focus_empty_sealed.json rename to src/generated/resources/assets/hexcasting/models/item/focus_empty_sealed.json index fea3a815..c628a086 100644 --- a/src/generated/resources/assets/hex/models/item/focus_empty_sealed.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_empty_sealed.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_empty_sealed" + "layer0": "hexcasting:item/focus_empty_sealed" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_entity.json b/src/generated/resources/assets/hexcasting/models/item/focus_entity.json similarity index 57% rename from src/generated/resources/assets/hex/models/item/focus_entity.json rename to src/generated/resources/assets/hexcasting/models/item/focus_entity.json index 72e9ce8b..43c6acc5 100644 --- a/src/generated/resources/assets/hex/models/item/focus_entity.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_entity.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_entity" + "layer0": "hexcasting:item/focus_entity" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_entity_sealed.json b/src/generated/resources/assets/hexcasting/models/item/focus_entity_sealed.json similarity index 54% rename from src/generated/resources/assets/hex/models/item/focus_entity_sealed.json rename to src/generated/resources/assets/hexcasting/models/item/focus_entity_sealed.json index 3a0d62f1..ea1e58cc 100644 --- a/src/generated/resources/assets/hex/models/item/focus_entity_sealed.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_entity_sealed.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_entity_sealed" + "layer0": "hexcasting:item/focus_entity_sealed" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_list.json b/src/generated/resources/assets/hexcasting/models/item/focus_list.json similarity index 59% rename from src/generated/resources/assets/hex/models/item/focus_list.json rename to src/generated/resources/assets/hexcasting/models/item/focus_list.json index 9895060d..cf44f1b6 100644 --- a/src/generated/resources/assets/hex/models/item/focus_list.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_list.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_list" + "layer0": "hexcasting:item/focus_list" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_list_sealed.json b/src/generated/resources/assets/hexcasting/models/item/focus_list_sealed.json similarity index 55% rename from src/generated/resources/assets/hex/models/item/focus_list_sealed.json rename to src/generated/resources/assets/hexcasting/models/item/focus_list_sealed.json index af2ba010..dc534b50 100644 --- a/src/generated/resources/assets/hex/models/item/focus_list_sealed.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_list_sealed.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_list_sealed" + "layer0": "hexcasting:item/focus_list_sealed" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_pattern.json b/src/generated/resources/assets/hexcasting/models/item/focus_pattern.json similarity index 57% rename from src/generated/resources/assets/hex/models/item/focus_pattern.json rename to src/generated/resources/assets/hexcasting/models/item/focus_pattern.json index f16e28ab..8ce26817 100644 --- a/src/generated/resources/assets/hex/models/item/focus_pattern.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_pattern.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_pattern" + "layer0": "hexcasting:item/focus_pattern" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_pattern_sealed.json b/src/generated/resources/assets/hexcasting/models/item/focus_pattern_sealed.json similarity index 53% rename from src/generated/resources/assets/hex/models/item/focus_pattern_sealed.json rename to src/generated/resources/assets/hexcasting/models/item/focus_pattern_sealed.json index 289c6595..3a0f1bff 100644 --- a/src/generated/resources/assets/hex/models/item/focus_pattern_sealed.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_pattern_sealed.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_pattern_sealed" + "layer0": "hexcasting:item/focus_pattern_sealed" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_vec3.json b/src/generated/resources/assets/hexcasting/models/item/focus_vec3.json similarity index 59% rename from src/generated/resources/assets/hex/models/item/focus_vec3.json rename to src/generated/resources/assets/hexcasting/models/item/focus_vec3.json index 5eca0769..5558fb02 100644 --- a/src/generated/resources/assets/hex/models/item/focus_vec3.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_vec3.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_vec3" + "layer0": "hexcasting:item/focus_vec3" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_vec3_sealed.json b/src/generated/resources/assets/hexcasting/models/item/focus_vec3_sealed.json similarity index 55% rename from src/generated/resources/assets/hex/models/item/focus_vec3_sealed.json rename to src/generated/resources/assets/hexcasting/models/item/focus_vec3_sealed.json index eaf1f5f4..b60e289d 100644 --- a/src/generated/resources/assets/hex/models/item/focus_vec3_sealed.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_vec3_sealed.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_vec3_sealed" + "layer0": "hexcasting:item/focus_vec3_sealed" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_widget.json b/src/generated/resources/assets/hexcasting/models/item/focus_widget.json similarity index 57% rename from src/generated/resources/assets/hex/models/item/focus_widget.json rename to src/generated/resources/assets/hexcasting/models/item/focus_widget.json index ce4c74e7..b7cadeac 100644 --- a/src/generated/resources/assets/hex/models/item/focus_widget.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_widget.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_widget" + "layer0": "hexcasting:item/focus_widget" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/focus_widget_sealed.json b/src/generated/resources/assets/hexcasting/models/item/focus_widget_sealed.json similarity index 54% rename from src/generated/resources/assets/hex/models/item/focus_widget_sealed.json rename to src/generated/resources/assets/hexcasting/models/item/focus_widget_sealed.json index 9797d892..f45a348f 100644 --- a/src/generated/resources/assets/hex/models/item/focus_widget_sealed.json +++ b/src/generated/resources/assets/hexcasting/models/item/focus_widget_sealed.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/focus_widget_sealed" + "layer0": "hexcasting:item/focus_widget_sealed" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/lens.json b/src/generated/resources/assets/hexcasting/models/item/lens.json similarity index 62% rename from src/generated/resources/assets/hex/models/item/lens.json rename to src/generated/resources/assets/hexcasting/models/item/lens.json index a7ad8790..ad900a57 100644 --- a/src/generated/resources/assets/hex/models/item/lens.json +++ b/src/generated/resources/assets/hexcasting/models/item/lens.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/lens" + "layer0": "hexcasting:item/lens" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/patchouli_book.json b/src/generated/resources/assets/hexcasting/models/item/patchouli_book.json similarity index 56% rename from src/generated/resources/assets/hex/models/item/patchouli_book.json rename to src/generated/resources/assets/hexcasting/models/item/patchouli_book.json index e2e58614..7eb6342d 100644 --- a/src/generated/resources/assets/hex/models/item/patchouli_book.json +++ b/src/generated/resources/assets/hexcasting/models/item/patchouli_book.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/patchouli_book" + "layer0": "hexcasting:item/patchouli_book" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/scroll.json b/src/generated/resources/assets/hexcasting/models/item/scroll.json similarity index 61% rename from src/generated/resources/assets/hex/models/item/scroll.json rename to src/generated/resources/assets/hexcasting/models/item/scroll.json index eb2797d7..02b7ce7d 100644 --- a/src/generated/resources/assets/hex/models/item/scroll.json +++ b/src/generated/resources/assets/hexcasting/models/item/scroll.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/scroll" + "layer0": "hexcasting:item/scroll" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/spellbook.json b/src/generated/resources/assets/hexcasting/models/item/spellbook.json similarity index 59% rename from src/generated/resources/assets/hex/models/item/spellbook.json rename to src/generated/resources/assets/hexcasting/models/item/spellbook.json index a29143a3..9bdfd323 100644 --- a/src/generated/resources/assets/hex/models/item/spellbook.json +++ b/src/generated/resources/assets/hexcasting/models/item/spellbook.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/spellbook" + "layer0": "hexcasting:item/spellbook" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/sub_sandwich.json b/src/generated/resources/assets/hexcasting/models/item/sub_sandwich.json similarity index 57% rename from src/generated/resources/assets/hex/models/item/sub_sandwich.json rename to src/generated/resources/assets/hexcasting/models/item/sub_sandwich.json index e9be14bc..6eb886db 100644 --- a/src/generated/resources/assets/hex/models/item/sub_sandwich.json +++ b/src/generated/resources/assets/hexcasting/models/item/sub_sandwich.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/sub_sandwich" + "layer0": "hexcasting:item/sub_sandwich" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hexcasting/models/item/trinket.json b/src/generated/resources/assets/hexcasting/models/item/trinket.json new file mode 100644 index 00000000..fe6121b4 --- /dev/null +++ b/src/generated/resources/assets/hexcasting/models/item/trinket.json @@ -0,0 +1,20 @@ +{ + "parent": "minecraft:item/handheld", + "textures": { + "layer0": "hexcasting:item/trinket" + }, + "overrides": [ + { + "predicate": { + "hexcasting:has_patterns": -0.01 + }, + "model": "hexcasting:item/trinket" + }, + { + "predicate": { + "hexcasting:has_patterns": 0.99 + }, + "model": "hexcasting:item/trinket_filled" + } + ] +} \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/trinket_filled.json b/src/generated/resources/assets/hexcasting/models/item/trinket_filled.json similarity index 56% rename from src/generated/resources/assets/hex/models/item/trinket_filled.json rename to src/generated/resources/assets/hexcasting/models/item/trinket_filled.json index cb30e608..0352c57c 100644 --- a/src/generated/resources/assets/hex/models/item/trinket_filled.json +++ b/src/generated/resources/assets/hexcasting/models/item/trinket_filled.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/trinket_filled" + "layer0": "hexcasting:item/trinket_filled" } } \ No newline at end of file diff --git a/src/generated/resources/assets/hex/models/item/wand.json b/src/generated/resources/assets/hexcasting/models/item/wand.json similarity index 62% rename from src/generated/resources/assets/hex/models/item/wand.json rename to src/generated/resources/assets/hexcasting/models/item/wand.json index b4b041c8..bf8964da 100644 --- a/src/generated/resources/assets/hex/models/item/wand.json +++ b/src/generated/resources/assets/hexcasting/models/item/wand.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/handheld", "textures": { - "layer0": "hex:item/wand" + "layer0": "hexcasting:item/wand" } } \ No newline at end of file diff --git a/src/generated/resources/data/forge/loot_modifiers/global_loot_modifiers.json b/src/generated/resources/data/forge/loot_modifiers/global_loot_modifiers.json index 7a191086..2f9668cc 100644 --- a/src/generated/resources/data/forge/loot_modifiers/global_loot_modifiers.json +++ b/src/generated/resources/data/forge/loot_modifiers/global_loot_modifiers.json @@ -1,12 +1,12 @@ { "replace": false, "entries": [ - "hex:scroll_bastion", - "hex:amethyst_cluster", - "hex:scroll_dungeon", - "hex:scroll_stronghold_library", - "hex:scroll_jungle", - "hex:scroll_cartographer", - "hex:scroll_shipwreck" + "hexcasting:scroll_bastion", + "hexcasting:amethyst_cluster", + "hexcasting:scroll_dungeon", + "hexcasting:scroll_stronghold_library", + "hexcasting:scroll_jungle", + "hexcasting:scroll_cartographer", + "hexcasting:scroll_shipwreck" ] } \ No newline at end of file diff --git a/src/generated/resources/data/hex/advancements/aaa_wasteful_cast.json b/src/generated/resources/data/hexcasting/advancements/aaa_wasteful_cast.json similarity index 65% rename from src/generated/resources/data/hex/advancements/aaa_wasteful_cast.json rename to src/generated/resources/data/hexcasting/advancements/aaa_wasteful_cast.json index 668df307..3e7eecff 100644 --- a/src/generated/resources/data/hex/advancements/aaa_wasteful_cast.json +++ b/src/generated/resources/data/hexcasting/advancements/aaa_wasteful_cast.json @@ -1,14 +1,14 @@ { - "parent": "hex:root", + "parent": "hexcasting:root", "display": { "icon": { "item": "minecraft:glistering_melon_slice" }, "title": { - "translate": "advancement.hex:wasteful_cast" + "translate": "advancement.hexcasting:wasteful_cast" }, "description": { - "translate": "advancement.hex:wasteful_cast.desc" + "translate": "advancement.hexcasting:wasteful_cast.desc" }, "frame": "task", "show_toast": true, @@ -17,7 +17,7 @@ }, "criteria": { "waste_amt": { - "trigger": "hex:spend_mana", + "trigger": "hexcasting:spend_mana", "conditions": {} } }, diff --git a/src/generated/resources/data/hex/advancements/aab_big_cast.json b/src/generated/resources/data/hexcasting/advancements/aab_big_cast.json similarity index 62% rename from src/generated/resources/data/hex/advancements/aab_big_cast.json rename to src/generated/resources/data/hexcasting/advancements/aab_big_cast.json index a63181ee..a1a60d50 100644 --- a/src/generated/resources/data/hex/advancements/aab_big_cast.json +++ b/src/generated/resources/data/hexcasting/advancements/aab_big_cast.json @@ -1,14 +1,14 @@ { - "parent": "hex:root", + "parent": "hexcasting:root", "display": { "icon": { - "item": "hex:charged_amethyst" + "item": "hexcasting:charged_amethyst" }, "title": { - "translate": "advancement.hex:big_cast" + "translate": "advancement.hexcasting:big_cast" }, "description": { - "translate": "advancement.hex:big_cast.desc" + "translate": "advancement.hexcasting:big_cast.desc" }, "frame": "task", "show_toast": true, @@ -17,7 +17,7 @@ }, "criteria": { "cast_amt": { - "trigger": "hex:spend_mana", + "trigger": "hexcasting:spend_mana", "conditions": { "mana_spent": { "min": 6400000 diff --git a/src/generated/resources/data/hex/advancements/enlightenment.json b/src/generated/resources/data/hexcasting/advancements/enlightenment.json similarity index 73% rename from src/generated/resources/data/hex/advancements/enlightenment.json rename to src/generated/resources/data/hexcasting/advancements/enlightenment.json index c1b143e7..6262d68e 100644 --- a/src/generated/resources/data/hex/advancements/enlightenment.json +++ b/src/generated/resources/data/hexcasting/advancements/enlightenment.json @@ -1,14 +1,14 @@ { - "parent": "hex:opened_eyes", + "parent": "hexcasting:opened_eyes", "display": { "icon": { "item": "minecraft:music_disc_11" }, "title": { - "translate": "advancement.hex:enlightenment" + "translate": "advancement.hexcasting:enlightenment" }, "description": { - "translate": "advancement.hex:enlightenment.desc" + "translate": "advancement.hexcasting:enlightenment.desc" }, "frame": "challenge", "show_toast": true, @@ -17,7 +17,7 @@ }, "criteria": { "health_used": { - "trigger": "hex:overcast", + "trigger": "hexcasting:overcast", "conditions": { "health_used": { "min": 17.95 diff --git a/src/generated/resources/data/hex/advancements/opened_eyes.json b/src/generated/resources/data/hexcasting/advancements/opened_eyes.json similarity index 71% rename from src/generated/resources/data/hex/advancements/opened_eyes.json rename to src/generated/resources/data/hexcasting/advancements/opened_eyes.json index d8de82b6..c4c54cbb 100644 --- a/src/generated/resources/data/hex/advancements/opened_eyes.json +++ b/src/generated/resources/data/hexcasting/advancements/opened_eyes.json @@ -1,14 +1,14 @@ { - "parent": "hex:root", + "parent": "hexcasting:root", "display": { "icon": { "item": "minecraft:ender_eye" }, "title": { - "translate": "advancement.hex:opened_eyes" + "translate": "advancement.hexcasting:opened_eyes" }, "description": { - "translate": "advancement.hex:opened_eyes.desc" + "translate": "advancement.hexcasting:opened_eyes.desc" }, "frame": "task", "show_toast": true, @@ -17,7 +17,7 @@ }, "criteria": { "health_used": { - "trigger": "hex:overcast", + "trigger": "hexcasting:overcast", "conditions": { "mojang_i_am_begging_and_crying_please_add_an_entity_health_criterion": { "min": 0.1 diff --git a/src/generated/resources/data/hex/advancements/recipes/hex/artifact.json b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/artifact.json similarity index 82% rename from src/generated/resources/data/hex/advancements/recipes/hex/artifact.json rename to src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/artifact.json index 3a271c27..614c2f9f 100644 --- a/src/generated/resources/data/hex/advancements/recipes/hex/artifact.json +++ b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/artifact.json @@ -2,7 +2,7 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "hex:artifact" + "hexcasting:artifact" ] }, "criteria": { @@ -12,7 +12,7 @@ "items": [ { "items": [ - "hex:wand" + "hexcasting:wand" ] } ] @@ -21,7 +21,7 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "hex:artifact" + "recipe": "hexcasting:artifact" } } }, diff --git a/src/generated/resources/data/hex/advancements/recipes/hex/cypher.json b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/cypher.json similarity index 83% rename from src/generated/resources/data/hex/advancements/recipes/hex/cypher.json rename to src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/cypher.json index e3e64fdc..f55a3806 100644 --- a/src/generated/resources/data/hex/advancements/recipes/hex/cypher.json +++ b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/cypher.json @@ -2,7 +2,7 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "hex:cypher" + "hexcasting:cypher" ] }, "criteria": { @@ -12,7 +12,7 @@ "items": [ { "items": [ - "hex:wand" + "hexcasting:wand" ] } ] @@ -21,7 +21,7 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "hex:cypher" + "recipe": "hexcasting:cypher" } } }, diff --git a/src/generated/resources/data/hex/advancements/recipes/hex/focus.json b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/focus.json similarity index 83% rename from src/generated/resources/data/hex/advancements/recipes/hex/focus.json rename to src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/focus.json index c71a9034..80255270 100644 --- a/src/generated/resources/data/hex/advancements/recipes/hex/focus.json +++ b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/focus.json @@ -2,7 +2,7 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "hex:focus" + "hexcasting:focus" ] }, "criteria": { @@ -12,7 +12,7 @@ "items": [ { "items": [ - "hex:wand" + "hexcasting:wand" ] } ] @@ -21,7 +21,7 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "hex:focus" + "recipe": "hexcasting:focus" } } }, diff --git a/src/generated/resources/data/hex/advancements/recipes/hex/lens.json b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/lens.json similarity index 83% rename from src/generated/resources/data/hex/advancements/recipes/hex/lens.json rename to src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/lens.json index 0fe92f2f..30d1b55e 100644 --- a/src/generated/resources/data/hex/advancements/recipes/hex/lens.json +++ b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/lens.json @@ -2,7 +2,7 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "hex:lens" + "hexcasting:lens" ] }, "criteria": { @@ -12,7 +12,7 @@ "items": [ { "items": [ - "hex:wand" + "hexcasting:wand" ] } ] @@ -21,7 +21,7 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "hex:lens" + "recipe": "hexcasting:lens" } } }, diff --git a/src/generated/resources/data/hex/advancements/recipes/hex/spellbook.json b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/spellbook.json similarity index 87% rename from src/generated/resources/data/hex/advancements/recipes/hex/spellbook.json rename to src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/spellbook.json index 5f35f278..8049a509 100644 --- a/src/generated/resources/data/hex/advancements/recipes/hex/spellbook.json +++ b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/spellbook.json @@ -2,7 +2,7 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "hex:spellbook" + "hexcasting:spellbook" ] }, "criteria": { @@ -12,7 +12,7 @@ "items": [ { "items": [ - "hex:focus" + "hexcasting:focus" ] } ] @@ -33,7 +33,7 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "hex:spellbook" + "recipe": "hexcasting:spellbook" } } }, diff --git a/src/generated/resources/data/hex/advancements/recipes/hex/trinket.json b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/trinket.json similarity index 83% rename from src/generated/resources/data/hex/advancements/recipes/hex/trinket.json rename to src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/trinket.json index bd4f43d3..64dfa07e 100644 --- a/src/generated/resources/data/hex/advancements/recipes/hex/trinket.json +++ b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/trinket.json @@ -2,7 +2,7 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "hex:trinket" + "hexcasting:trinket" ] }, "criteria": { @@ -12,7 +12,7 @@ "items": [ { "items": [ - "hex:wand" + "hexcasting:wand" ] } ] @@ -21,7 +21,7 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "hex:trinket" + "recipe": "hexcasting:trinket" } } }, diff --git a/src/generated/resources/data/hex/advancements/recipes/hex/wand.json b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/wand.json similarity index 89% rename from src/generated/resources/data/hex/advancements/recipes/hex/wand.json rename to src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/wand.json index a4d1e9be..8c55d430 100644 --- a/src/generated/resources/data/hex/advancements/recipes/hex/wand.json +++ b/src/generated/resources/data/hexcasting/advancements/recipes/hexcasting/wand.json @@ -2,7 +2,7 @@ "parent": "minecraft:recipes/root", "rewards": { "recipes": [ - "hex:wand" + "hexcasting:wand" ] }, "criteria": { @@ -21,7 +21,7 @@ "has_the_recipe": { "trigger": "minecraft:recipe_unlocked", "conditions": { - "recipe": "hex:wand" + "recipe": "hexcasting:wand" } } }, diff --git a/src/generated/resources/data/hex/advancements/root.json b/src/generated/resources/data/hexcasting/advancements/root.json similarity index 90% rename from src/generated/resources/data/hex/advancements/root.json rename to src/generated/resources/data/hexcasting/advancements/root.json index 174ed849..d3ee9841 100644 --- a/src/generated/resources/data/hex/advancements/root.json +++ b/src/generated/resources/data/hexcasting/advancements/root.json @@ -4,10 +4,10 @@ "item": "minecraft:budding_amethyst" }, "title": { - "translate": "advancement.hex:root" + "translate": "advancement.hexcasting:root" }, "description": { - "translate": "advancement.hex:root.desc" + "translate": "advancement.hexcasting:root.desc" }, "frame": "task", "show_toast": true, diff --git a/src/generated/resources/data/hex/loot_modifiers/amethyst_cluster.json b/src/generated/resources/data/hexcasting/loot_modifiers/amethyst_cluster.json similarity index 91% rename from src/generated/resources/data/hex/loot_modifiers/amethyst_cluster.json rename to src/generated/resources/data/hexcasting/loot_modifiers/amethyst_cluster.json index 39e0599c..7e343ec0 100644 --- a/src/generated/resources/data/hex/loot_modifiers/amethyst_cluster.json +++ b/src/generated/resources/data/hexcasting/loot_modifiers/amethyst_cluster.json @@ -19,5 +19,5 @@ } ], "chargedChance": 0.95, - "type": "hex:amethyst_cluster" + "type": "hexcasting:amethyst_cluster" } \ No newline at end of file diff --git a/src/generated/resources/data/hex/loot_modifiers/scroll_bastion.json b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_bastion.json similarity index 83% rename from src/generated/resources/data/hex/loot_modifiers/scroll_bastion.json rename to src/generated/resources/data/hexcasting/loot_modifiers/scroll_bastion.json index 766124e1..f8899533 100644 --- a/src/generated/resources/data/hex/loot_modifiers/scroll_bastion.json +++ b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_bastion.json @@ -6,5 +6,5 @@ } ], "stddev": 2.0, - "type": "hex:scrolls" + "type": "hexcasting:scrolls" } \ No newline at end of file diff --git a/src/generated/resources/data/hex/loot_modifiers/scroll_cartographer.json b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_cartographer.json similarity index 84% rename from src/generated/resources/data/hex/loot_modifiers/scroll_cartographer.json rename to src/generated/resources/data/hexcasting/loot_modifiers/scroll_cartographer.json index eca55ff1..be832220 100644 --- a/src/generated/resources/data/hex/loot_modifiers/scroll_cartographer.json +++ b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_cartographer.json @@ -6,5 +6,5 @@ } ], "stddev": 1.0, - "type": "hex:scrolls" + "type": "hexcasting:scrolls" } \ No newline at end of file diff --git a/src/generated/resources/data/hex/loot_modifiers/scroll_dungeon.json b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_dungeon.json similarity index 83% rename from src/generated/resources/data/hex/loot_modifiers/scroll_dungeon.json rename to src/generated/resources/data/hexcasting/loot_modifiers/scroll_dungeon.json index d26c6647..f655f420 100644 --- a/src/generated/resources/data/hex/loot_modifiers/scroll_dungeon.json +++ b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_dungeon.json @@ -6,5 +6,5 @@ } ], "stddev": 1.0, - "type": "hex:scrolls" + "type": "hexcasting:scrolls" } \ No newline at end of file diff --git a/src/generated/resources/data/hex/loot_modifiers/scroll_jungle.json b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_jungle.json similarity index 83% rename from src/generated/resources/data/hex/loot_modifiers/scroll_jungle.json rename to src/generated/resources/data/hexcasting/loot_modifiers/scroll_jungle.json index 05a1131b..0fb94c70 100644 --- a/src/generated/resources/data/hex/loot_modifiers/scroll_jungle.json +++ b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_jungle.json @@ -6,5 +6,5 @@ } ], "stddev": 1.0, - "type": "hex:scrolls" + "type": "hexcasting:scrolls" } \ No newline at end of file diff --git a/src/generated/resources/data/hex/loot_modifiers/scroll_shipwreck.json b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_shipwreck.json similarity index 83% rename from src/generated/resources/data/hex/loot_modifiers/scroll_shipwreck.json rename to src/generated/resources/data/hexcasting/loot_modifiers/scroll_shipwreck.json index ed2f2cd9..48f5c5ef 100644 --- a/src/generated/resources/data/hex/loot_modifiers/scroll_shipwreck.json +++ b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_shipwreck.json @@ -6,5 +6,5 @@ } ], "stddev": 1.0, - "type": "hex:scrolls" + "type": "hexcasting:scrolls" } \ No newline at end of file diff --git a/src/generated/resources/data/hex/loot_modifiers/scroll_stronghold_library.json b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_stronghold_library.json similarity index 83% rename from src/generated/resources/data/hex/loot_modifiers/scroll_stronghold_library.json rename to src/generated/resources/data/hexcasting/loot_modifiers/scroll_stronghold_library.json index 6c1fbe20..537d0ef6 100644 --- a/src/generated/resources/data/hex/loot_modifiers/scroll_stronghold_library.json +++ b/src/generated/resources/data/hexcasting/loot_modifiers/scroll_stronghold_library.json @@ -6,5 +6,5 @@ } ], "stddev": 3.0, - "type": "hex:scrolls" + "type": "hexcasting:scrolls" } \ No newline at end of file diff --git a/src/generated/resources/data/hex/recipes/artifact.json b/src/generated/resources/data/hexcasting/recipes/artifact.json similarity index 93% rename from src/generated/resources/data/hex/recipes/artifact.json rename to src/generated/resources/data/hexcasting/recipes/artifact.json index 6817078c..044a6f28 100644 --- a/src/generated/resources/data/hex/recipes/artifact.json +++ b/src/generated/resources/data/hexcasting/recipes/artifact.json @@ -10,7 +10,7 @@ "tag": "forge:ingots/gold" }, "A": { - "item": "hex:charged_amethyst" + "item": "hexcasting:charged_amethyst" }, "D": [ { @@ -58,6 +58,6 @@ ] }, "result": { - "item": "hex:artifact" + "item": "hexcasting:artifact" } } \ No newline at end of file diff --git a/src/generated/resources/data/hex/recipes/cypher.json b/src/generated/resources/data/hexcasting/recipes/cypher.json similarity index 72% rename from src/generated/resources/data/hex/recipes/cypher.json rename to src/generated/resources/data/hexcasting/recipes/cypher.json index 888f6b7d..f3e54b4a 100644 --- a/src/generated/resources/data/hex/recipes/cypher.json +++ b/src/generated/resources/data/hexcasting/recipes/cypher.json @@ -10,10 +10,10 @@ "tag": "forge:nuggets/iron" }, "A": { - "item": "hex:amethyst_dust" + "item": "hexcasting:amethyst_dust" } }, "result": { - "item": "hex:cypher" + "item": "hexcasting:cypher" } } \ No newline at end of file diff --git a/src/generated/resources/data/hex/recipes/focus.json b/src/generated/resources/data/hexcasting/recipes/focus.json similarity index 76% rename from src/generated/resources/data/hex/recipes/focus.json rename to src/generated/resources/data/hexcasting/recipes/focus.json index 8303d8a8..4a19395a 100644 --- a/src/generated/resources/data/hex/recipes/focus.json +++ b/src/generated/resources/data/hexcasting/recipes/focus.json @@ -13,10 +13,10 @@ "tag": "forge:dusts/glowstone" }, "A": { - "item": "hex:charged_amethyst" + "item": "hexcasting:charged_amethyst" } }, "result": { - "item": "hex:focus" + "item": "hexcasting:focus" } } \ No newline at end of file diff --git a/src/generated/resources/data/hex/recipes/lens.json b/src/generated/resources/data/hexcasting/recipes/lens.json similarity index 72% rename from src/generated/resources/data/hex/recipes/lens.json rename to src/generated/resources/data/hexcasting/recipes/lens.json index d40f8b58..e5e4c59b 100644 --- a/src/generated/resources/data/hex/recipes/lens.json +++ b/src/generated/resources/data/hexcasting/recipes/lens.json @@ -10,10 +10,10 @@ "tag": "forge:glass" }, "A": { - "item": "hex:amethyst_dust" + "item": "hexcasting:amethyst_dust" } }, "result": { - "item": "hex:lens" + "item": "hexcasting:lens" } } \ No newline at end of file diff --git a/src/generated/resources/data/hex/recipes/spellbook.json b/src/generated/resources/data/hexcasting/recipes/spellbook.json similarity index 79% rename from src/generated/resources/data/hex/recipes/spellbook.json rename to src/generated/resources/data/hexcasting/recipes/spellbook.json index 2aa1bda1..c7a0e279 100644 --- a/src/generated/resources/data/hex/recipes/spellbook.json +++ b/src/generated/resources/data/hexcasting/recipes/spellbook.json @@ -13,13 +13,13 @@ "item": "minecraft:writable_book" }, "A": { - "item": "hex:charged_amethyst" + "item": "hexcasting:charged_amethyst" }, "F": { "item": "minecraft:chorus_fruit" } }, "result": { - "item": "hex:spellbook" + "item": "hexcasting:spellbook" } } \ No newline at end of file diff --git a/src/generated/resources/data/hex/recipes/trinket.json b/src/generated/resources/data/hexcasting/recipes/trinket.json similarity index 87% rename from src/generated/resources/data/hex/recipes/trinket.json rename to src/generated/resources/data/hexcasting/recipes/trinket.json index 24a43152..2eb7097c 100644 --- a/src/generated/resources/data/hex/recipes/trinket.json +++ b/src/generated/resources/data/hexcasting/recipes/trinket.json @@ -14,6 +14,6 @@ } }, "result": { - "item": "hex:trinket" + "item": "hexcasting:trinket" } } \ No newline at end of file diff --git a/src/generated/resources/data/hex/recipes/wand.json b/src/generated/resources/data/hexcasting/recipes/wand.json similarity index 90% rename from src/generated/resources/data/hex/recipes/wand.json rename to src/generated/resources/data/hexcasting/recipes/wand.json index 8ba9a352..17c48e63 100644 --- a/src/generated/resources/data/hex/recipes/wand.json +++ b/src/generated/resources/data/hexcasting/recipes/wand.json @@ -17,6 +17,6 @@ } }, "result": { - "item": "hex:wand" + "item": "hexcasting:wand" } } \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/api/RenderedSpell.kt b/src/main/java/at/petrak/hex/api/RenderedSpell.kt deleted file mode 100644 index bc23752e..00000000 --- a/src/main/java/at/petrak/hex/api/RenderedSpell.kt +++ /dev/null @@ -1,7 +0,0 @@ -package at.petrak.hex.api - -import at.petrak.hex.common.casting.CastingContext - -interface RenderedSpell { - fun cast(ctx: CastingContext) -} \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpDuplicate.kt b/src/main/java/at/petrak/hex/common/casting/operators/OpDuplicate.kt deleted file mode 100644 index 35efb24e..00000000 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpDuplicate.kt +++ /dev/null @@ -1,17 +0,0 @@ -package at.petrak.hex.common.casting.operators - -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext - -object OpDuplicate : ConstManaOperator { - override val argc: Int - get() = 1 - - override fun execute(args: List>, ctx: CastingContext): List> { - val datum = args.getChecked(0) - return spellListOf(datum, datum) - } -} \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpEntityLook.kt b/src/main/java/at/petrak/hex/common/casting/operators/OpEntityLook.kt deleted file mode 100644 index c90c815b..00000000 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpEntityLook.kt +++ /dev/null @@ -1,17 +0,0 @@ -package at.petrak.hex.common.casting.operators - -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext -import net.minecraft.world.entity.Entity - -object OpEntityLook : ConstManaOperator { - override val argc = 1 - - override fun execute(args: List>, ctx: CastingContext): List> { - val e: Entity = args.getChecked(0) - return spellListOf(e.lookAngle) - } -} \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpSwap.kt b/src/main/java/at/petrak/hex/common/casting/operators/OpSwap.kt deleted file mode 100644 index eaac1d0d..00000000 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpSwap.kt +++ /dev/null @@ -1,18 +0,0 @@ -package at.petrak.hex.common.casting.operators - -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext - -object OpSwap : ConstManaOperator { - override val argc: Int - get() = 2 - - override fun execute(args: List>, ctx: CastingContext): List> { - val a = args.getChecked(0) - val b = args.getChecked(1) - return spellListOf(b, a) - } -} \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/common/casting/operators/lists/OpAppend.kt b/src/main/java/at/petrak/hex/common/casting/operators/lists/OpAppend.kt deleted file mode 100644 index 6b856df8..00000000 --- a/src/main/java/at/petrak/hex/common/casting/operators/lists/OpAppend.kt +++ /dev/null @@ -1,17 +0,0 @@ -package at.petrak.hex.common.casting.operators.lists - -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext - -object OpAppend : ConstManaOperator { - override val argc = 2 - override fun execute(args: List>, ctx: CastingContext): List> { - val list = args.getChecked>>(0).toMutableList() - val datum = args[1] - list.add(datum) - return spellListOf(list) - } -} \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/common/casting/operators/math/OpDeconstructVec.kt b/src/main/java/at/petrak/hex/common/casting/operators/math/OpDeconstructVec.kt deleted file mode 100644 index 086e69a5..00000000 --- a/src/main/java/at/petrak/hex/common/casting/operators/math/OpDeconstructVec.kt +++ /dev/null @@ -1,16 +0,0 @@ -package at.petrak.hex.common.casting.operators.math - -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext -import net.minecraft.world.phys.Vec3 - -object OpDeconstructVec : ConstManaOperator { - override val argc = 1 - override fun execute(args: List>, ctx: CastingContext): List> { - val v = args.getChecked(0) - return spellListOf(v.x, v.y, v.z) - } -} \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/common/command/ListPatsCommand.java b/src/main/java/at/petrak/hex/common/command/ListPatsCommand.java deleted file mode 100644 index bcb47771..00000000 --- a/src/main/java/at/petrak/hex/common/command/ListPatsCommand.java +++ /dev/null @@ -1,28 +0,0 @@ -package at.petrak.hex.common.command; - -import at.petrak.hex.api.PatternRegistry; -import com.mojang.brigadier.CommandDispatcher; -import net.minecraft.commands.CommandSourceStack; -import net.minecraft.commands.Commands; -import net.minecraft.network.chat.TextComponent; - -public class ListPatsCommand { - public static void register(CommandDispatcher dispatcher) { - dispatcher.register(Commands.literal("hex:listPatterns") - .requires(dp -> dp.hasPermission(Commands.LEVEL_ADMINS)) - .executes(ctx -> { - var bob = new StringBuilder("Patterns in this world:"); - var lookup = PatternRegistry.getPerWorldPatterns(ctx.getSource().getLevel()); - lookup.forEach((sig, opId) -> { - bob.append('\n'); - bob.append(sig); - bob.append(": "); - bob.append(opId.toString()); - }); - ctx.getSource().sendSuccess(new TextComponent(bob.toString()), true); - - return 1; - }) - ); - } -} diff --git a/src/main/java/at/petrak/hex/common/items/ItemScroll.java b/src/main/java/at/petrak/hex/common/items/ItemScroll.java deleted file mode 100644 index dcb19ded..00000000 --- a/src/main/java/at/petrak/hex/common/items/ItemScroll.java +++ /dev/null @@ -1,127 +0,0 @@ -package at.petrak.hex.common.items; - -import at.petrak.hex.api.PatternRegistry; -import at.petrak.hex.hexmath.HexPattern; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.*; -import com.mojang.datafixers.util.Either; -import com.mojang.math.Matrix4f; -import net.minecraft.client.gui.Font; -import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; -import net.minecraft.client.renderer.GameRenderer; -import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.entity.ItemRenderer; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.inventory.tooltip.TooltipComponent; -import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.client.event.RenderTooltipEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; -import org.jetbrains.annotations.Nullable; - -public class ItemScroll extends Item { - public static final String TAG_OP_ID = "op_id"; - - public ItemScroll(Properties pProperties) { - super(pProperties); - } - - @SubscribeEvent - @OnlyIn(Dist.CLIENT) - public static void makeTooltip(RenderTooltipEvent.GatherComponents evt) { - ItemStack stack = evt.getItemStack(); - if (!stack.isEmpty() && stack.getItem() instanceof ItemScroll) { - var tooltip = evt.getTooltipElements(); - - var tag = stack.getOrCreateTag(); - ResourceLocation opId = null; - if (tag.contains(TAG_OP_ID)) { - opId = ResourceLocation.tryParse(tag.getString(TAG_OP_ID)); - } - - tooltip.add(Either.right(new TooltipGreeble(opId))); - } - } - - // https://github.com/VazkiiMods/Quark/blob/master/src/main/java/vazkii/quark/content/client/tooltip/MapTooltips.java - // yoink - public static class TooltipGreeble implements ClientTooltipComponent, TooltipComponent { - private static final ResourceLocation MAP_BG = new ResourceLocation( - "minecraft:textures/map/map_background.png"); - - @Nullable - private final ResourceLocation opId; - @Nullable - private final HexPattern pattern; - - public TooltipGreeble(@Nullable ResourceLocation opId) { - this.opId = opId; - if (this.opId != null) { - this.pattern = PatternRegistry.lookupPerWorldPattern(opId).getFirst(); - } else { - this.pattern = null; - } - } - - @Override - public void renderText(Font pFont, int pX, int pY, Matrix4f pMatrix4f, - MultiBufferSource.BufferSource pBufferSource) { - - } - - @Override - public void renderImage(Font font, int mouseX, int mouseY, PoseStack ps, ItemRenderer pItemRenderer, - int pBlitOffset) { - renderBG(ps, mouseX, mouseY); - - // renderText happens *before* renderImage for some asinine reason - if (this.pattern != null) { - ps.pushPose(); - ps.translate(mouseX, mouseY, 100); - - var text = this.pattern.toString(); - var tw = font.width(text); - font.drawShadow(ps, text, this.getWidth(font) / 2f - tw / 2f, 10, -1); - - ps.popPose(); - } - } - - private static void renderBG(PoseStack ps, int x, int y) { - RenderSystem.setShader(GameRenderer::getPositionTexShader); - RenderSystem.setShaderColor(1f, 1f, 1f, 1f); - RenderSystem.setShaderTexture(0, MAP_BG); - - ps.pushPose(); - ps.translate(x, y, -1); - RenderSystem.enableBlend(); - - // i wish i liked mobius front enough ot get to the TIS puzzles - BufferBuilder buffer = Tesselator.getInstance().getBuilder(); - Matrix4f neo = ps.last().pose(); - - float size = 128; - buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); - // can i rearrange this? - buffer.vertex(neo, 0, 0, 0.0F).uv(0.0F, 0.0F).endVertex(); - buffer.vertex(neo, 0, size, 0.0F).uv(0.0F, 1.0f).endVertex(); - buffer.vertex(neo, size, size, 0.0F).uv(1.0F, 1.0f).endVertex(); - buffer.vertex(neo, size, 0, 0.0F).uv(1.0F, 0.0F).endVertex(); - buffer.end(); - BufferUploader.end(buffer); - ps.popPose(); - } - - @Override - public int getWidth(Font pFont) { - return 128; - } - - @Override - public int getHeight() { - return 128; - } - } -} diff --git a/src/main/java/at/petrak/hex/datagen/Advancements.java b/src/main/java/at/petrak/hex/datagen/Advancements.java deleted file mode 100644 index 1397d8f9..00000000 --- a/src/main/java/at/petrak/hex/datagen/Advancements.java +++ /dev/null @@ -1,122 +0,0 @@ -package at.petrak.hex.datagen; - -import at.petrak.hex.HexMod; -import at.petrak.hex.common.advancement.OvercastTrigger; -import at.petrak.hex.common.advancement.SpendManaTrigger; -import at.petrak.hex.common.items.HexItems; -import net.minecraft.advancements.Advancement; -import net.minecraft.advancements.CriteriaTriggers; -import net.minecraft.advancements.DisplayInfo; -import net.minecraft.advancements.FrameType; -import net.minecraft.advancements.critereon.*; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.advancements.AdvancementProvider; -import net.minecraft.network.chat.TranslatableComponent; -import net.minecraft.resources.ResourceLocation; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.Items; -import net.minecraft.world.level.ItemLike; -import net.minecraft.world.level.block.Blocks; -import net.minecraftforge.common.data.ExistingFileHelper; - -import java.util.function.Consumer; - -public class Advancements extends AdvancementProvider { - public static Advancement ROOT; - public static Advancement BIG_CAST; - public static Advancement WASTEFUL_CAST; - public static Advancement OPENED_EYES; - public static Advancement ENLIGHTENMENT; - - public static final OvercastTrigger OVERCAST_TRIGGER = new OvercastTrigger(); - public static final SpendManaTrigger SPEND_MANA_TRIGGER = new SpendManaTrigger(); - - public Advancements(DataGenerator generatorIn, ExistingFileHelper fileHelperIn) { - super(generatorIn, fileHelperIn); - } - - @Override - protected void registerAdvancements(Consumer consumer, ExistingFileHelper fileHelper) { - ROOT = Advancement.Builder.advancement() - // what an ergonomic design decision - // i am so happy that data generators are the future - .display(new DisplayInfo(new ItemStack(Items.BUDDING_AMETHYST), - new TranslatableComponent("advancement.hex:root"), - new TranslatableComponent("advancement.hex:root.desc"), - new ResourceLocation("minecraft", "textures/block/calcite.png"), - FrameType.TASK, true, true, true)) - // the only thing making this vaguely tolerable is the knowledge the json files are worse somehow - .addCriterion("on_thingy", new TickTrigger.TriggerInstance(EntityPredicate.Composite.wrap( - EntityPredicate.Builder.entity() - .steppingOn(LocationPredicate.Builder.location() - .setBlock(BlockPredicate.Builder.block() - .of(Blocks.AMETHYST_BLOCK, Blocks.CALCITE) - .build()) - .setY(MinMaxBounds.Doubles.between(-64.0, 30.0)).build()) - .build()))) - .save(consumer, prefix("root")); // how the hell does one even read this - - // weird names so we have alphabetical parity - WASTEFUL_CAST = Advancement.Builder.advancement() - .display(simple(Items.GLISTERING_MELON_SLICE, "wasteful_cast", FrameType.TASK)) - .parent(ROOT) - .addCriterion("waste_amt", new SpendManaTrigger.Instance(EntityPredicate.Composite.ANY, - MinMaxBounds.Ints.ANY, - MinMaxBounds.Ints.atLeast(89_000))) - .save(consumer, prefix("aaa_wasteful_cast")); - BIG_CAST = Advancement.Builder.advancement() - .display(simple(HexItems.CHARGED_AMETHYST.get(), "big_cast", FrameType.TASK)) - .parent(ROOT) - .addCriterion("cast_amt", new SpendManaTrigger.Instance(EntityPredicate.Composite.ANY, - MinMaxBounds.Ints.atLeast(6_400_000), - MinMaxBounds.Ints.ANY)) - .save(consumer, prefix("aab_big_cast")); - - OPENED_EYES = Advancement.Builder.advancement() - .display(simple(Items.ENDER_EYE, "opened_eyes", FrameType.TASK)) - .parent(ROOT) - .addCriterion("health_used", - new OvercastTrigger.Instance(EntityPredicate.Composite.ANY, - MinMaxBounds.Ints.ANY, - MinMaxBounds.Doubles.ANY, - // you can't just kill yourself - MinMaxBounds.Doubles.atLeast(0.1))) - .save(consumer, prefix("opened_eyes")); - - ENLIGHTENMENT = Advancement.Builder.advancement() - .display(new DisplayInfo(new ItemStack(Items.MUSIC_DISC_11), - new TranslatableComponent("advancement.hex:enlightenment"), - new TranslatableComponent("advancement.hex:enlightenment.desc"), - null, - FrameType.CHALLENGE, true, true, true)) - .parent(OPENED_EYES) - .addCriterion("health_used", - new OvercastTrigger.Instance(EntityPredicate.Composite.ANY, - MinMaxBounds.Ints.ANY, - // add a little bit of slop here - MinMaxBounds.Doubles.atLeast(17.95), - MinMaxBounds.Doubles.between(0.1, 2.05))) - .save(consumer, prefix("enlightenment")); - -// super.registerAdvancements(consumer, fileHelper); - } - - public static void registerTriggers() { - CriteriaTriggers.register(OVERCAST_TRIGGER); - CriteriaTriggers.register(SPEND_MANA_TRIGGER); - } - - protected static DisplayInfo simple(ItemLike icon, String name, FrameType frameType) { - String expandedName = "advancement.hex:" + name; - return new DisplayInfo(new ItemStack(icon.asItem()), - new TranslatableComponent(expandedName), - new TranslatableComponent(expandedName + ".desc"), - null, frameType, true, true, false); - } - - private static String prefix(String name) { - return HexMod.MOD_ID + ":" + name; - } - - -} diff --git a/src/main/java/at/petrak/hex/HexConfig.java b/src/main/java/at/petrak/hexcasting/HexConfig.java similarity index 98% rename from src/main/java/at/petrak/hex/HexConfig.java rename to src/main/java/at/petrak/hexcasting/HexConfig.java index fbf42ab0..0eeb0fa6 100644 --- a/src/main/java/at/petrak/hex/HexConfig.java +++ b/src/main/java/at/petrak/hexcasting/HexConfig.java @@ -1,4 +1,4 @@ -package at.petrak.hex; +package at.petrak.hexcasting; import net.minecraft.world.item.Tier; import net.minecraft.world.item.Tiers; diff --git a/src/main/java/at/petrak/hex/HexMod.kt b/src/main/java/at/petrak/hexcasting/HexMod.kt similarity index 64% rename from src/main/java/at/petrak/hex/HexMod.kt rename to src/main/java/at/petrak/hexcasting/HexMod.kt index fbbda506..d843f654 100644 --- a/src/main/java/at/petrak/hex/HexMod.kt +++ b/src/main/java/at/petrak/hexcasting/HexMod.kt @@ -1,19 +1,20 @@ -package at.petrak.hex +package at.petrak.hexcasting -import at.petrak.hex.client.RegisterClientStuff -import at.petrak.hex.common.casting.RegisterPatterns -import at.petrak.hex.common.casting.operators.spells.great.OpFlight -import at.petrak.hex.common.command.HexCommands -import at.petrak.hex.common.items.HexItems -import at.petrak.hex.common.items.ItemScroll -import at.petrak.hex.common.lib.HexSounds -import at.petrak.hex.common.lib.HexStatistics -import at.petrak.hex.common.lib.LibCapabilities -import at.petrak.hex.common.network.HexMessages -import at.petrak.hex.datagen.Advancements -import at.petrak.hex.datagen.DataGenerators -import at.petrak.hex.datagen.lootmods.HexLootModifiers -import at.petrak.hex.server.TickScheduler +import at.petrak.hexcasting.client.ClientTickCounter +import at.petrak.hexcasting.client.RegisterClientStuff +import at.petrak.hexcasting.common.casting.RegisterPatterns +import at.petrak.hexcasting.common.casting.operators.spells.great.OpFlight +import at.petrak.hexcasting.common.command.HexCommands +import at.petrak.hexcasting.common.items.HexItems +import at.petrak.hexcasting.common.items.ItemScroll +import at.petrak.hexcasting.common.lib.HexSounds +import at.petrak.hexcasting.common.lib.HexStatistics +import at.petrak.hexcasting.common.lib.LibCapabilities +import at.petrak.hexcasting.common.network.HexMessages +import at.petrak.hexcasting.datagen.Advancements +import at.petrak.hexcasting.datagen.DataGenerators +import at.petrak.hexcasting.datagen.lootmods.HexLootModifiers +import at.petrak.hexcasting.server.TickScheduler import net.minecraftforge.common.ForgeConfigSpec import net.minecraftforge.eventbus.api.SubscribeEvent import net.minecraftforge.fml.common.Mod @@ -28,7 +29,8 @@ object HexMod { var CONFIG: HexConfig var CONFIG_SPEC: ForgeConfigSpec - const val MOD_ID = "hex" + // mumblemumble thanks shy mumble mumble + const val MOD_ID = "hexcasting" init { val (cfg, spec) = ForgeConfigSpec.Builder() @@ -53,6 +55,7 @@ object HexMod { evBus.register(HexCommands::class.java) evBus.register(TickScheduler) + evBus.register(ClientTickCounter::class.java) evBus.register(LibCapabilities::class.java) evBus.register(OpFlight) evBus.register(ItemScroll::class.java) diff --git a/src/main/java/at/petrak/hex/HexUtils.kt b/src/main/java/at/petrak/hexcasting/HexUtils.kt similarity index 97% rename from src/main/java/at/petrak/hex/HexUtils.kt rename to src/main/java/at/petrak/hexcasting/HexUtils.kt index 3402f546..d53867c9 100644 --- a/src/main/java/at/petrak/hex/HexUtils.kt +++ b/src/main/java/at/petrak/hexcasting/HexUtils.kt @@ -1,4 +1,4 @@ -package at.petrak.hex +package at.petrak.hexcasting import net.minecraft.nbt.LongArrayTag import net.minecraft.world.InteractionHand diff --git a/src/main/java/at/petrak/hex/README.md b/src/main/java/at/petrak/hexcasting/README.md similarity index 100% rename from src/main/java/at/petrak/hex/README.md rename to src/main/java/at/petrak/hexcasting/README.md diff --git a/src/main/java/at/petrak/hex/api/ConstManaOperator.kt b/src/main/java/at/petrak/hexcasting/api/ConstManaOperator.kt similarity index 84% rename from src/main/java/at/petrak/hex/api/ConstManaOperator.kt rename to src/main/java/at/petrak/hexcasting/api/ConstManaOperator.kt index 45ddf68c..a3a0c0eb 100644 --- a/src/main/java/at/petrak/hex/api/ConstManaOperator.kt +++ b/src/main/java/at/petrak/hexcasting/api/ConstManaOperator.kt @@ -1,7 +1,7 @@ -package at.petrak.hex.api +package at.petrak.hexcasting.api -import at.petrak.hex.common.casting.CastException -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.CastException +import at.petrak.hexcasting.common.casting.CastingContext /** * A SimpleOperator that always costs the same amount of mana. diff --git a/src/main/java/at/petrak/hex/api/OperationResult.kt b/src/main/java/at/petrak/hexcasting/api/OperationResult.kt similarity index 85% rename from src/main/java/at/petrak/hex/api/OperationResult.kt rename to src/main/java/at/petrak/hexcasting/api/OperationResult.kt index 890b8b3e..a110255b 100644 --- a/src/main/java/at/petrak/hex/api/OperationResult.kt +++ b/src/main/java/at/petrak/hexcasting/api/OperationResult.kt @@ -1,4 +1,4 @@ -package at.petrak.hex.api +package at.petrak.hexcasting.api /** * What happens when an operator is through? diff --git a/src/main/java/at/petrak/hex/api/Operator.kt b/src/main/java/at/petrak/hexcasting/api/Operator.kt similarity index 89% rename from src/main/java/at/petrak/hex/api/Operator.kt rename to src/main/java/at/petrak/hexcasting/api/Operator.kt index 6efa7426..feb612a4 100644 --- a/src/main/java/at/petrak/hex/api/Operator.kt +++ b/src/main/java/at/petrak/hexcasting/api/Operator.kt @@ -1,14 +1,14 @@ -package at.petrak.hex.api +package at.petrak.hexcasting.api -import at.petrak.hex.common.casting.CastException -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.CastException +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.world.phys.Vec3 /** * Manipulates the stack in some way, usually by popping some number of values off the stack * and pushing one new value. * For a more "traditional" pop arguments, push return experience, see - * [SimpleOperator][at.petrak.hex.common.casting.operators.SimpleOperator] + * [SimpleOperator][at.petrak.hexcasting.common.casting.operators.SimpleOperator] * * Implementors MUST NOT mutate the context. */ diff --git a/src/main/java/at/petrak/hex/api/PatternRegistry.kt b/src/main/java/at/petrak/hexcasting/api/PatternRegistry.kt similarity index 97% rename from src/main/java/at/petrak/hex/api/PatternRegistry.kt rename to src/main/java/at/petrak/hexcasting/api/PatternRegistry.kt index 1adb94c8..c312668a 100644 --- a/src/main/java/at/petrak/hex/api/PatternRegistry.kt +++ b/src/main/java/at/petrak/hexcasting/api/PatternRegistry.kt @@ -1,8 +1,8 @@ -package at.petrak.hex.api +package at.petrak.hexcasting.api -import at.petrak.hex.common.casting.CastException -import at.petrak.hex.hexmath.EulerPathFinder -import at.petrak.hex.hexmath.HexPattern +import at.petrak.hexcasting.common.casting.CastException +import at.petrak.hexcasting.hexmath.EulerPathFinder +import at.petrak.hexcasting.hexmath.HexPattern import net.minecraft.nbt.CompoundTag import net.minecraft.resources.ResourceLocation import net.minecraft.server.level.ServerLevel diff --git a/src/main/java/at/petrak/hexcasting/api/RenderedSpell.kt b/src/main/java/at/petrak/hexcasting/api/RenderedSpell.kt new file mode 100644 index 00000000..66d78cf7 --- /dev/null +++ b/src/main/java/at/petrak/hexcasting/api/RenderedSpell.kt @@ -0,0 +1,7 @@ +package at.petrak.hexcasting.api + +import at.petrak.hexcasting.common.casting.CastingContext + +interface RenderedSpell { + fun cast(ctx: CastingContext) +} \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/api/SimpleOperator.kt b/src/main/java/at/petrak/hexcasting/api/SimpleOperator.kt similarity index 85% rename from src/main/java/at/petrak/hex/api/SimpleOperator.kt rename to src/main/java/at/petrak/hexcasting/api/SimpleOperator.kt index df3bc1d8..4e348bf2 100644 --- a/src/main/java/at/petrak/hex/api/SimpleOperator.kt +++ b/src/main/java/at/petrak/hexcasting/api/SimpleOperator.kt @@ -1,7 +1,7 @@ -package at.petrak.hex.api +package at.petrak.hexcasting.api -import at.petrak.hex.common.casting.CastException -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.CastException +import at.petrak.hexcasting.common.casting.CastingContext /** * An operator that acts in the expected method of popping some arguments diff --git a/src/main/java/at/petrak/hex/api/SpellDatum.kt b/src/main/java/at/petrak/hexcasting/api/SpellDatum.kt similarity index 95% rename from src/main/java/at/petrak/hex/api/SpellDatum.kt rename to src/main/java/at/petrak/hexcasting/api/SpellDatum.kt index 0c2e8eb6..69ab25c2 100644 --- a/src/main/java/at/petrak/hex/api/SpellDatum.kt +++ b/src/main/java/at/petrak/hexcasting/api/SpellDatum.kt @@ -1,11 +1,11 @@ -package at.petrak.hex.api +package at.petrak.hexcasting.api -import at.petrak.hex.HexUtils -import at.petrak.hex.HexUtils.serializeToNBT -import at.petrak.hex.common.casting.CastException -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.casting.Widget -import at.petrak.hex.hexmath.HexPattern +import at.petrak.hexcasting.HexUtils +import at.petrak.hexcasting.HexUtils.serializeToNBT +import at.petrak.hexcasting.common.casting.CastException +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.Widget +import at.petrak.hexcasting.hexmath.HexPattern import net.minecraft.nbt.* import net.minecraft.world.entity.Entity import net.minecraft.world.phys.Vec3 diff --git a/src/main/java/at/petrak/hex/api/SpellOperator.kt b/src/main/java/at/petrak/hexcasting/api/SpellOperator.kt similarity index 80% rename from src/main/java/at/petrak/hex/api/SpellOperator.kt rename to src/main/java/at/petrak/hexcasting/api/SpellOperator.kt index 1ad27db3..b2e5ad15 100644 --- a/src/main/java/at/petrak/hex/api/SpellOperator.kt +++ b/src/main/java/at/petrak/hexcasting/api/SpellOperator.kt @@ -1,7 +1,7 @@ -package at.petrak.hex.api +package at.petrak.hexcasting.api -import at.petrak.hex.common.casting.CastException -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.CastException +import at.petrak.hexcasting.common.casting.CastingContext interface SpellOperator : Operator { val argc: Int diff --git a/src/main/java/at/petrak/hexcasting/client/ClientTickCounter.java b/src/main/java/at/petrak/hexcasting/client/ClientTickCounter.java new file mode 100644 index 00000000..7ca571e7 --- /dev/null +++ b/src/main/java/at/petrak/hexcasting/client/ClientTickCounter.java @@ -0,0 +1,18 @@ +package at.petrak.hexcasting.client; + +import net.minecraftforge.event.TickEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; + +// I can't find a better way to do this :( +public class ClientTickCounter { + private static long tickCount = 0; + + @SubscribeEvent + public static void onTick(TickEvent.ClientTickEvent evt) { + tickCount++; + } + + public static long getTickCount() { + return tickCount; + } +} diff --git a/src/main/java/at/petrak/hex/client/HexTooltips.java b/src/main/java/at/petrak/hexcasting/client/HexTooltips.java similarity index 88% rename from src/main/java/at/petrak/hex/client/HexTooltips.java rename to src/main/java/at/petrak/hexcasting/client/HexTooltips.java index c4381f17..3a6cdb7c 100644 --- a/src/main/java/at/petrak/hex/client/HexTooltips.java +++ b/src/main/java/at/petrak/hexcasting/client/HexTooltips.java @@ -1,6 +1,6 @@ -package at.petrak.hex.client; +package at.petrak.hexcasting.client; -import at.petrak.hex.common.items.ItemScroll; +import at.petrak.hexcasting.common.items.ItemScroll; import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; import net.minecraft.world.inventory.tooltip.TooltipComponent; import net.minecraftforge.client.MinecraftForgeClient; diff --git a/src/main/java/at/petrak/hex/client/RegisterClientStuff.java b/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java similarity index 88% rename from src/main/java/at/petrak/hex/client/RegisterClientStuff.java rename to src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java index f4ff1a7e..838592c4 100644 --- a/src/main/java/at/petrak/hex/client/RegisterClientStuff.java +++ b/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java @@ -1,10 +1,10 @@ -package at.petrak.hex.client; +package at.petrak.hexcasting.client; -import at.petrak.hex.HexMod; -import at.petrak.hex.api.SpellDatum; -import at.petrak.hex.common.items.HexItems; -import at.petrak.hex.common.items.ItemFocus; -import at.petrak.hex.common.items.magic.ItemPackagedSpell; +import at.petrak.hexcasting.HexMod; +import at.petrak.hexcasting.api.SpellDatum; +import at.petrak.hexcasting.common.items.HexItems; +import at.petrak.hexcasting.common.items.ItemFocus; +import at.petrak.hexcasting.common.items.magic.ItemPackagedSpell; import net.minecraft.client.renderer.item.ItemProperties; import net.minecraft.world.item.Item; import net.minecraftforge.eventbus.api.SubscribeEvent; diff --git a/src/main/java/at/petrak/hex/client/RenderLib.kt b/src/main/java/at/petrak/hexcasting/client/RenderLib.kt similarity index 97% rename from src/main/java/at/petrak/hex/client/RenderLib.kt rename to src/main/java/at/petrak/hexcasting/client/RenderLib.kt index d090ef8b..233b3671 100644 --- a/src/main/java/at/petrak/hex/client/RenderLib.kt +++ b/src/main/java/at/petrak/hexcasting/client/RenderLib.kt @@ -1,8 +1,8 @@ -package at.petrak.hex.client +package at.petrak.hexcasting.client -import at.petrak.hex.HexUtils -import at.petrak.hex.client.gui.SQRT_3 -import at.petrak.hex.hexmath.HexCoord +import at.petrak.hexcasting.HexUtils +import at.petrak.hexcasting.client.gui.SQRT_3 +import at.petrak.hexcasting.hexmath.HexCoord import com.mojang.blaze3d.vertex.DefaultVertexFormat import com.mojang.blaze3d.vertex.Tesselator import com.mojang.blaze3d.vertex.VertexFormat @@ -25,11 +25,10 @@ object RenderLib { */ val NOISE = PerlinNoise.create(XoroshiroRandomSource(9001L), listOf(0, 1, 2, 3, 4)) - /** * Draw a sequence of linePoints spanning the given points. * - * Please make sure to enable the right asinine shaders; see [GuiSpellcasting][at.petrak.hex.client.gui.GuiSpellcasting] + * Please make sure to enable the right asinine shaders; see [GuiSpellcasting][at.petrak.hexcasting.client.gui.GuiSpellcasting] */ @JvmStatic @JvmOverloads @@ -107,7 +106,7 @@ object RenderLib { * you have to do the conversion yourself.) */ @JvmStatic - fun drawPattern( + fun drawPatternFromPoints( mat: Matrix4f, points: List, drawLast: Boolean, diff --git a/src/main/java/at/petrak/hex/client/ShiftScrollListener.java b/src/main/java/at/petrak/hexcasting/client/ShiftScrollListener.java similarity index 85% rename from src/main/java/at/petrak/hex/client/ShiftScrollListener.java rename to src/main/java/at/petrak/hexcasting/client/ShiftScrollListener.java index 5219c973..83974565 100644 --- a/src/main/java/at/petrak/hex/client/ShiftScrollListener.java +++ b/src/main/java/at/petrak/hexcasting/client/ShiftScrollListener.java @@ -1,9 +1,9 @@ -package at.petrak.hex.client; +package at.petrak.hexcasting.client; -import at.petrak.hex.HexMod; -import at.petrak.hex.common.items.ItemSpellbook; -import at.petrak.hex.common.network.HexMessages; -import at.petrak.hex.common.network.MsgShiftScrollSyn; +import at.petrak.hexcasting.HexMod; +import at.petrak.hexcasting.common.items.ItemSpellbook; +import at.petrak.hexcasting.common.network.HexMessages; +import at.petrak.hexcasting.common.network.MsgShiftScrollSyn; import net.minecraft.client.Minecraft; import net.minecraft.client.player.LocalPlayer; import net.minecraft.world.InteractionHand; diff --git a/src/main/java/at/petrak/hex/client/gui/GuiSpellcasting.kt b/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt similarity index 92% rename from src/main/java/at/petrak/hex/client/gui/GuiSpellcasting.kt rename to src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt index de3c8abb..a96c7e17 100644 --- a/src/main/java/at/petrak/hex/client/gui/GuiSpellcasting.kt +++ b/src/main/java/at/petrak/hexcasting/client/gui/GuiSpellcasting.kt @@ -1,18 +1,18 @@ -package at.petrak.hex.client.gui +package at.petrak.hexcasting.client.gui -import at.petrak.hex.HexUtils -import at.petrak.hex.HexUtils.TAU -import at.petrak.hex.client.RenderLib -import at.petrak.hex.common.items.HexItems -import at.petrak.hex.common.items.ItemSpellbook -import at.petrak.hex.common.lib.HexSounds -import at.petrak.hex.common.network.HexMessages -import at.petrak.hex.common.network.MsgQuitSpellcasting -import at.petrak.hex.common.network.MsgShiftScrollSyn -import at.petrak.hex.hexmath.HexAngle -import at.petrak.hex.hexmath.HexCoord -import at.petrak.hex.hexmath.HexDir -import at.petrak.hex.hexmath.HexPattern +import at.petrak.hexcasting.HexUtils +import at.petrak.hexcasting.HexUtils.TAU +import at.petrak.hexcasting.client.RenderLib +import at.petrak.hexcasting.common.items.HexItems +import at.petrak.hexcasting.common.items.ItemSpellbook +import at.petrak.hexcasting.common.lib.HexSounds +import at.petrak.hexcasting.common.network.HexMessages +import at.petrak.hexcasting.common.network.MsgQuitSpellcasting +import at.petrak.hexcasting.common.network.MsgShiftScrollSyn +import at.petrak.hexcasting.hexmath.HexAngle +import at.petrak.hexcasting.hexmath.HexCoord +import at.petrak.hexcasting.hexmath.HexDir +import at.petrak.hexcasting.hexmath.HexPattern import com.mojang.blaze3d.systems.RenderSystem import com.mojang.blaze3d.vertex.PoseStack import net.minecraft.client.Minecraft @@ -167,7 +167,7 @@ class GuiSpellcasting(private val handOpenedWith: InteractionHand) : Screen(Text this.usedSpots.addAll(pat.positions(start)) HexMessages.getNetwork().sendToServer( - at.petrak.hex.common.network.MsgNewSpellPatternSyn( + at.petrak.hexcasting.common.network.MsgNewSpellPatternSyn( this.handOpenedWith, pat ) @@ -223,7 +223,6 @@ class GuiSpellcasting(private val handOpenedWith: InteractionHand) : Screen(Text // when right on top of the cursor, 1.0 // when at the full radius, 0! this is so we don't have dots suddenly appear/disappear. // we subtract size from delta so there's a little "island" of 100% bright points by the mouse - // TODO: this doesn't work great around the upper-right part of the screen val scaledDist = Mth.clamp( 1.0f - ((delta - this.hexSize()) / (radius.toFloat() * this.hexSize())), 0f, @@ -249,7 +248,7 @@ class GuiSpellcasting(private val handOpenedWith: InteractionHand) : Screen(Text ) } for (pat in alreadyPats) { - RenderLib.drawPattern(mat, pat, true, 127, 127, 255, 200) + RenderLib.drawPatternFromPoints(mat, pat, true, 127, 127, 255, 200) } // Now draw the currently WIP pattern @@ -268,7 +267,7 @@ class GuiSpellcasting(private val handOpenedWith: InteractionHand) : Screen(Text } points.add(mousePos) - RenderLib.drawPattern(mat, points, false, 100, 200, 255, 255) + RenderLib.drawPatternFromPoints(mat, points, false, 100, 200, 255, 255) } RenderSystem.setShader { prevShader } diff --git a/src/main/java/at/petrak/hex/common/advancement/OvercastTrigger.java b/src/main/java/at/petrak/hexcasting/common/advancement/OvercastTrigger.java similarity index 97% rename from src/main/java/at/petrak/hex/common/advancement/OvercastTrigger.java rename to src/main/java/at/petrak/hexcasting/common/advancement/OvercastTrigger.java index f6adac02..83cc6be7 100644 --- a/src/main/java/at/petrak/hex/common/advancement/OvercastTrigger.java +++ b/src/main/java/at/petrak/hexcasting/common/advancement/OvercastTrigger.java @@ -1,6 +1,6 @@ -package at.petrak.hex.common.advancement; +package at.petrak.hexcasting.common.advancement; -import at.petrak.hex.HexMod; +import at.petrak.hexcasting.HexMod; import com.google.gson.JsonObject; import net.minecraft.advancements.critereon.*; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/at/petrak/hex/common/advancement/SpendManaTrigger.java b/src/main/java/at/petrak/hexcasting/common/advancement/SpendManaTrigger.java similarity index 96% rename from src/main/java/at/petrak/hex/common/advancement/SpendManaTrigger.java rename to src/main/java/at/petrak/hexcasting/common/advancement/SpendManaTrigger.java index 977bb818..806fb6fe 100644 --- a/src/main/java/at/petrak/hex/common/advancement/SpendManaTrigger.java +++ b/src/main/java/at/petrak/hexcasting/common/advancement/SpendManaTrigger.java @@ -1,6 +1,6 @@ -package at.petrak.hex.common.advancement; +package at.petrak.hexcasting.common.advancement; -import at.petrak.hex.HexMod; +import at.petrak.hexcasting.HexMod; import com.google.gson.JsonObject; import net.minecraft.advancements.critereon.*; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/at/petrak/hex/common/casting/CastException.kt b/src/main/java/at/petrak/hexcasting/common/casting/CastException.kt similarity index 96% rename from src/main/java/at/petrak/hex/common/casting/CastException.kt rename to src/main/java/at/petrak/hexcasting/common/casting/CastException.kt index a449b8d6..dcddbb62 100644 --- a/src/main/java/at/petrak/hex/common/casting/CastException.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/CastException.kt @@ -1,6 +1,6 @@ -package at.petrak.hex.common.casting +package at.petrak.hexcasting.common.casting -import at.petrak.hex.hexmath.HexPattern +import at.petrak.hexcasting.hexmath.HexPattern import net.minecraft.core.BlockPos import net.minecraft.world.phys.Vec3 diff --git a/src/main/java/at/petrak/hex/common/casting/CastingContext.kt b/src/main/java/at/petrak/hexcasting/common/casting/CastingContext.kt similarity index 94% rename from src/main/java/at/petrak/hex/common/casting/CastingContext.kt rename to src/main/java/at/petrak/hexcasting/common/casting/CastingContext.kt index 835ada28..d4ec975e 100644 --- a/src/main/java/at/petrak/hex/common/casting/CastingContext.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/CastingContext.kt @@ -1,10 +1,10 @@ -package at.petrak.hex.common.casting +package at.petrak.hexcasting.common.casting -import at.petrak.hex.HexMod -import at.petrak.hex.HexUtils -import at.petrak.hex.api.Operator -import at.petrak.hex.common.items.ItemDataHolder -import at.petrak.hex.common.items.ItemSpellbook +import at.petrak.hexcasting.HexMod +import at.petrak.hexcasting.HexUtils +import at.petrak.hexcasting.api.Operator +import at.petrak.hexcasting.common.items.ItemDataHolder +import at.petrak.hexcasting.common.items.ItemSpellbook import net.minecraft.server.level.ServerLevel import net.minecraft.server.level.ServerPlayer import net.minecraft.world.InteractionHand diff --git a/src/main/java/at/petrak/hex/common/casting/CastingHarness.kt b/src/main/java/at/petrak/hexcasting/common/casting/CastingHarness.kt similarity index 94% rename from src/main/java/at/petrak/hex/common/casting/CastingHarness.kt rename to src/main/java/at/petrak/hexcasting/common/casting/CastingHarness.kt index 1de72c6b..2b319796 100644 --- a/src/main/java/at/petrak/hex/common/casting/CastingHarness.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/CastingHarness.kt @@ -1,15 +1,15 @@ -package at.petrak.hex.common.casting +package at.petrak.hexcasting.common.casting -import at.petrak.hex.HexMod -import at.petrak.hex.api.PatternRegistry -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.items.ItemWand -import at.petrak.hex.common.items.magic.ItemPackagedSpell -import at.petrak.hex.common.lib.HexStatistics -import at.petrak.hex.common.lib.LibDamageSources -import at.petrak.hex.datagen.Advancements -import at.petrak.hex.hexmath.HexPattern +import at.petrak.hexcasting.HexMod +import at.petrak.hexcasting.api.PatternRegistry +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.items.ItemWand +import at.petrak.hexcasting.common.items.magic.ItemPackagedSpell +import at.petrak.hexcasting.common.lib.HexStatistics +import at.petrak.hexcasting.common.lib.LibDamageSources +import at.petrak.hexcasting.datagen.Advancements +import at.petrak.hexcasting.hexmath.HexPattern import net.minecraft.nbt.CompoundTag import net.minecraft.nbt.ListTag import net.minecraft.nbt.Tag diff --git a/src/main/java/at/petrak/hex/common/casting/ManaHelper.kt b/src/main/java/at/petrak/hexcasting/common/casting/ManaHelper.kt similarity index 95% rename from src/main/java/at/petrak/hex/common/casting/ManaHelper.kt rename to src/main/java/at/petrak/hexcasting/common/casting/ManaHelper.kt index 75bf3679..e5a8b62f 100644 --- a/src/main/java/at/petrak/hex/common/casting/ManaHelper.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/ManaHelper.kt @@ -1,7 +1,7 @@ -package at.petrak.hex.common.casting +package at.petrak.hexcasting.common.casting -import at.petrak.hex.HexMod -import at.petrak.hex.common.items.HexItems +import at.petrak.hexcasting.HexMod +import at.petrak.hexcasting.common.items.HexItems import net.minecraft.util.Mth import net.minecraft.world.item.ItemStack import net.minecraft.world.item.Items diff --git a/src/main/java/at/petrak/hex/common/casting/RegisterPatterns.java b/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java similarity index 86% rename from src/main/java/at/petrak/hex/common/casting/RegisterPatterns.java rename to src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java index 41932302..7b82fd9d 100644 --- a/src/main/java/at/petrak/hex/common/casting/RegisterPatterns.java +++ b/src/main/java/at/petrak/hexcasting/common/casting/RegisterPatterns.java @@ -1,31 +1,31 @@ -package at.petrak.hex.common.casting; +package at.petrak.hexcasting.common.casting; -import at.petrak.hex.HexMod; -import at.petrak.hex.api.Operator; -import at.petrak.hex.api.PatternRegistry; -import at.petrak.hex.api.SpellDatum; -import at.petrak.hex.common.casting.operators.*; -import at.petrak.hex.common.casting.operators.lists.OpAppend; -import at.petrak.hex.common.casting.operators.lists.OpConcat; -import at.petrak.hex.common.casting.operators.lists.OpForEach; -import at.petrak.hex.common.casting.operators.lists.OpIndex; -import at.petrak.hex.common.casting.operators.math.*; -import at.petrak.hex.common.casting.operators.selectors.OpGetCaster; -import at.petrak.hex.common.casting.operators.selectors.OpGetEntitiesBy; -import at.petrak.hex.common.casting.operators.selectors.OpGetEntityAt; -import at.petrak.hex.common.casting.operators.spells.*; -import at.petrak.hex.common.casting.operators.spells.great.OpFlight; -import at.petrak.hex.common.casting.operators.spells.great.OpLightning; -import at.petrak.hex.common.items.magic.ItemArtifact; -import at.petrak.hex.common.items.magic.ItemCypher; -import at.petrak.hex.common.items.magic.ItemTrinket; -import at.petrak.hex.hexmath.HexDir; -import at.petrak.hex.hexmath.HexPattern; +import at.petrak.hexcasting.HexMod; +import at.petrak.hexcasting.api.Operator; +import at.petrak.hexcasting.api.PatternRegistry; +import at.petrak.hexcasting.api.SpellDatum; +import at.petrak.hexcasting.common.casting.operators.*; +import at.petrak.hexcasting.common.casting.operators.lists.OpAppend; +import at.petrak.hexcasting.common.casting.operators.lists.OpConcat; +import at.petrak.hexcasting.common.casting.operators.lists.OpForEach; +import at.petrak.hexcasting.common.casting.operators.lists.OpIndex; +import at.petrak.hexcasting.common.casting.operators.math.*; +import at.petrak.hexcasting.common.casting.operators.selectors.OpGetCaster; +import at.petrak.hexcasting.common.casting.operators.selectors.OpGetEntitiesBy; +import at.petrak.hexcasting.common.casting.operators.selectors.OpGetEntityAt; +import at.petrak.hexcasting.common.casting.operators.spells.*; +import at.petrak.hexcasting.common.casting.operators.spells.great.OpFlight; +import at.petrak.hexcasting.common.casting.operators.spells.great.OpLightning; +import at.petrak.hexcasting.common.items.magic.ItemArtifact; +import at.petrak.hexcasting.common.items.magic.ItemCypher; +import at.petrak.hexcasting.common.items.magic.ItemTrinket; +import at.petrak.hexcasting.hexmath.HexDir; +import at.petrak.hexcasting.hexmath.HexPattern; import net.minecraft.world.phys.Vec3; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; -import static at.petrak.hex.common.lib.RegisterHelper.prefix; +import static at.petrak.hexcasting.common.lib.RegisterHelper.prefix; public class RegisterPatterns { // I guess this means the client will have a big empty map for patterns @@ -94,7 +94,7 @@ public class RegisterPatterns { PatternRegistry.addRegularPatternPerWorld(HexPattern.FromAnglesSig("aawqaqwaa", HexDir.EAST), prefix("explode/fireball"), new OpExplode(true)); - PatternRegistry.addRegularPatternPerWorld(HexPattern.FromAnglesSig("waqwaeawa", HexDir.EAST), + PatternRegistry.addRegularPatternPerWorld(HexPattern.FromAnglesSig("waqwaeawq", HexDir.EAST), prefix("add_motion"), OpAddMotion.INSTANCE); PatternRegistry.addRegularPatternPerWorld(HexPattern.FromAnglesSig("aqwaeawq", HexDir.EAST), prefix("blink"), OpBlink.INSTANCE); diff --git a/src/main/java/at/petrak/hex/common/casting/Widget.kt b/src/main/java/at/petrak/hexcasting/common/casting/Widget.kt similarity index 64% rename from src/main/java/at/petrak/hex/common/casting/Widget.kt rename to src/main/java/at/petrak/hexcasting/common/casting/Widget.kt index 12979755..5c50d6a5 100644 --- a/src/main/java/at/petrak/hex/common/casting/Widget.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/Widget.kt @@ -1,8 +1,8 @@ -package at.petrak.hex.common.casting +package at.petrak.hexcasting.common.casting -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum /** * Miscellaneous spell datums used as markers, etc. diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpBlockAxisRaycast.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpBlockAxisRaycast.kt similarity index 72% rename from src/main/java/at/petrak/hex/common/casting/operators/OpBlockAxisRaycast.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/OpBlockAxisRaycast.kt index b9476141..e55a762d 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpBlockAxisRaycast.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpBlockAxisRaycast.kt @@ -1,11 +1,11 @@ -package at.petrak.hex.common.casting.operators +package at.petrak.hexcasting.common.casting.operators -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.casting.Widget +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.Widget import net.minecraft.world.level.ClipContext import net.minecraft.world.phys.HitResult import net.minecraft.world.phys.Vec3 diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpBlockRaycast.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpBlockRaycast.kt similarity index 79% rename from src/main/java/at/petrak/hex/common/casting/operators/OpBlockRaycast.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/OpBlockRaycast.kt index 53da838d..c951ef72 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpBlockRaycast.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpBlockRaycast.kt @@ -1,11 +1,11 @@ -package at.petrak.hex.common.casting.operators +package at.petrak.hexcasting.common.casting.operators -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.casting.Widget +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.Widget import net.minecraft.world.level.ClipContext import net.minecraft.world.phys.HitResult import net.minecraft.world.phys.Vec3 diff --git a/src/main/java/at/petrak/hexcasting/common/casting/operators/OpDuplicate.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpDuplicate.kt new file mode 100644 index 00000000..54046e68 --- /dev/null +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpDuplicate.kt @@ -0,0 +1,17 @@ +package at.petrak.hexcasting.common.casting.operators + +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext + +object OpDuplicate : ConstManaOperator { + override val argc: Int + get() = 1 + + override fun execute(args: List>, ctx: CastingContext): List> { + val datum = args.getChecked(0) + return spellListOf(datum, datum) + } +} \ No newline at end of file diff --git a/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityLook.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityLook.kt new file mode 100644 index 00000000..b511e200 --- /dev/null +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityLook.kt @@ -0,0 +1,17 @@ +package at.petrak.hexcasting.common.casting.operators + +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext +import net.minecraft.world.entity.Entity + +object OpEntityLook : ConstManaOperator { + override val argc = 1 + + override fun execute(args: List>, ctx: CastingContext): List> { + val e: Entity = args.getChecked(0) + return spellListOf(e.lookAngle) + } +} \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpEntityPos.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityPos.kt similarity index 61% rename from src/main/java/at/petrak/hex/common/casting/operators/OpEntityPos.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityPos.kt index dc3281c8..7210ecf6 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpEntityPos.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityPos.kt @@ -1,10 +1,10 @@ -package at.petrak.hex.common.casting.operators +package at.petrak.hexcasting.common.casting.operators -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.world.entity.Entity import net.minecraft.world.entity.player.Player diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpEntityRaycast.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityRaycast.kt similarity index 69% rename from src/main/java/at/petrak/hex/common/casting/operators/OpEntityRaycast.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityRaycast.kt index a9e58034..7d1c14e2 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpEntityRaycast.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEntityRaycast.kt @@ -1,11 +1,11 @@ -package at.petrak.hex.common.casting.operators +package at.petrak.hexcasting.common.casting.operators -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.casting.Widget +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.Widget import net.minecraft.world.entity.projectile.ProjectileUtil import net.minecraft.world.phys.AABB import net.minecraft.world.phys.Vec3 diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpEval.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEval.kt similarity index 68% rename from src/main/java/at/petrak/hex/common/casting/operators/OpEval.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/OpEval.kt index 6f6a7f70..392d6a14 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpEval.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEval.kt @@ -1,12 +1,12 @@ -package at.petrak.hex.common.casting.operators +package at.petrak.hexcasting.common.casting.operators -import at.petrak.hex.api.OperationResult -import at.petrak.hex.api.Operator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.casting.CastingHarness +import at.petrak.hexcasting.api.OperationResult +import at.petrak.hexcasting.api.Operator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.CastingHarness object OpEval : Operator { override fun modifyStack(stack: MutableList>, ctx: CastingContext): OperationResult { diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpEvalDelay.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEvalDelay.kt similarity index 75% rename from src/main/java/at/petrak/hex/common/casting/operators/OpEvalDelay.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/OpEvalDelay.kt index b9b466dc..badda74a 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpEvalDelay.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpEvalDelay.kt @@ -1,13 +1,13 @@ -package at.petrak.hex.common.casting.operators +package at.petrak.hexcasting.common.casting.operators -import at.petrak.hex.api.OperationResult -import at.petrak.hex.api.Operator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.casting.CastingHarness -import at.petrak.hex.server.TickScheduler +import at.petrak.hexcasting.api.OperationResult +import at.petrak.hexcasting.api.Operator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.CastingHarness +import at.petrak.hexcasting.server.TickScheduler import kotlin.math.max import kotlin.math.roundToInt diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpRead.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpRead.kt similarity index 55% rename from src/main/java/at/petrak/hex/common/casting/operators/OpRead.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/OpRead.kt index 6c772af6..cfa0aaa9 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpRead.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpRead.kt @@ -1,10 +1,10 @@ -package at.petrak.hex.common.casting.operators +package at.petrak.hexcasting.common.casting.operators -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.casting.Widget -import at.petrak.hex.common.items.ItemDataHolder +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.Widget +import at.petrak.hexcasting.common.items.ItemDataHolder object OpRead : ConstManaOperator { override val argc = 0 diff --git a/src/main/java/at/petrak/hexcasting/common/casting/operators/OpSwap.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpSwap.kt new file mode 100644 index 00000000..9917b6cc --- /dev/null +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpSwap.kt @@ -0,0 +1,18 @@ +package at.petrak.hexcasting.common.casting.operators + +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext + +object OpSwap : ConstManaOperator { + override val argc: Int + get() = 2 + + override fun execute(args: List>, ctx: CastingContext): List> { + val a = args.getChecked(0) + val b = args.getChecked(1) + return spellListOf(b, a) + } +} \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpUndo.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpUndo.kt similarity index 50% rename from src/main/java/at/petrak/hex/common/casting/operators/OpUndo.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/OpUndo.kt index 6e01df61..73370e52 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpUndo.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpUndo.kt @@ -1,8 +1,8 @@ -package at.petrak.hex.common.casting.operators +package at.petrak.hexcasting.common.casting.operators -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext object OpUndo : ConstManaOperator { override val argc = 1 diff --git a/src/main/java/at/petrak/hex/common/casting/operators/OpWrite.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpWrite.kt similarity index 51% rename from src/main/java/at/petrak/hex/common/casting/operators/OpWrite.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/OpWrite.kt index ea07402a..88b89b42 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/OpWrite.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/OpWrite.kt @@ -1,10 +1,10 @@ -package at.petrak.hex.common.casting.operators +package at.petrak.hexcasting.common.casting.operators -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.items.ItemDataHolder +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.items.ItemDataHolder object OpWrite : ConstManaOperator { override val argc = 1 diff --git a/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpAppend.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpAppend.kt new file mode 100644 index 00000000..a975ef23 --- /dev/null +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpAppend.kt @@ -0,0 +1,17 @@ +package at.petrak.hexcasting.common.casting.operators.lists + +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext + +object OpAppend : ConstManaOperator { + override val argc = 2 + override fun execute(args: List>, ctx: CastingContext): List> { + val list = args.getChecked>>(0).toMutableList() + val datum = args[1] + list.add(datum) + return spellListOf(list) + } +} \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/common/casting/operators/lists/OpConcat.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpConcat.kt similarity index 51% rename from src/main/java/at/petrak/hex/common/casting/operators/lists/OpConcat.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpConcat.kt index be851d81..0b43ba27 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/lists/OpConcat.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpConcat.kt @@ -1,10 +1,10 @@ -package at.petrak.hex.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.operators.lists -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext object OpConcat : ConstManaOperator { override val argc = 2 diff --git a/src/main/java/at/petrak/hex/common/casting/operators/lists/OpForEach.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpForEach.kt similarity index 75% rename from src/main/java/at/petrak/hex/common/casting/operators/lists/OpForEach.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpForEach.kt index 78a33277..c8bd653b 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/lists/OpForEach.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpForEach.kt @@ -1,14 +1,14 @@ -package at.petrak.hex.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.operators.lists -import at.petrak.hex.api.OperationResult -import at.petrak.hex.api.Operator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastException -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.casting.CastingHarness -import at.petrak.hex.hexmath.HexPattern +import at.petrak.hexcasting.api.OperationResult +import at.petrak.hexcasting.api.Operator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastException +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.CastingHarness +import at.petrak.hexcasting.hexmath.HexPattern object OpForEach : Operator { override fun modifyStack(stack: MutableList>, ctx: CastingContext): OperationResult { diff --git a/src/main/java/at/petrak/hex/common/casting/operators/lists/OpIndex.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpIndex.kt similarity index 57% rename from src/main/java/at/petrak/hex/common/casting/operators/lists/OpIndex.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpIndex.kt index 79474102..583f1c3c 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/lists/OpIndex.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/lists/OpIndex.kt @@ -1,10 +1,10 @@ -package at.petrak.hex.common.casting.operators.lists +package at.petrak.hexcasting.common.casting.operators.lists -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.casting.Widget +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.Widget import kotlin.math.roundToInt object OpIndex : ConstManaOperator { diff --git a/src/main/java/at/petrak/hex/common/casting/operators/math/MathOpUtils.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/MathOpUtils.kt similarity index 72% rename from src/main/java/at/petrak/hex/common/casting/operators/math/MathOpUtils.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/math/MathOpUtils.kt index 28362027..a5bfe6b3 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/math/MathOpUtils.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/MathOpUtils.kt @@ -1,7 +1,7 @@ -package at.petrak.hex.common.casting.operators.math +package at.petrak.hexcasting.common.casting.operators.math -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastException +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastException import com.mojang.datafixers.util.Either import net.minecraft.world.phys.Vec3 diff --git a/src/main/java/at/petrak/hex/common/casting/operators/math/OpAbsLen.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAbsLen.kt similarity index 58% rename from src/main/java/at/petrak/hex/common/casting/operators/math/OpAbsLen.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAbsLen.kt index 5f9ebadd..39de96e5 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/math/OpAbsLen.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAbsLen.kt @@ -1,9 +1,9 @@ -package at.petrak.hex.common.casting.operators.math +package at.petrak.hexcasting.common.casting.operators.math -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext import kotlin.math.absoluteValue object OpAbsLen : ConstManaOperator { diff --git a/src/main/java/at/petrak/hex/common/casting/operators/math/OpAdd.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAdd.kt similarity index 70% rename from src/main/java/at/petrak/hex/common/casting/operators/math/OpAdd.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAdd.kt index 0d28d178..95809a0f 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/math/OpAdd.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpAdd.kt @@ -1,9 +1,9 @@ -package at.petrak.hex.common.casting.operators.math +package at.petrak.hexcasting.common.casting.operators.math -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext object OpAdd : ConstManaOperator { override val argc: Int diff --git a/src/main/java/at/petrak/hex/common/casting/operators/math/OpConstructVec.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpConstructVec.kt similarity index 53% rename from src/main/java/at/petrak/hex/common/casting/operators/math/OpConstructVec.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpConstructVec.kt index 3a956a84..0cb3d27a 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/math/OpConstructVec.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpConstructVec.kt @@ -1,10 +1,10 @@ -package at.petrak.hex.common.casting.operators.math +package at.petrak.hexcasting.common.casting.operators.math -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.world.phys.Vec3 object OpConstructVec : ConstManaOperator { diff --git a/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDeconstructVec.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDeconstructVec.kt new file mode 100644 index 00000000..9ae3a43f --- /dev/null +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDeconstructVec.kt @@ -0,0 +1,16 @@ +package at.petrak.hexcasting.common.casting.operators.math + +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext +import net.minecraft.world.phys.Vec3 + +object OpDeconstructVec : ConstManaOperator { + override val argc = 1 + override fun execute(args: List>, ctx: CastingContext): List> { + val v = args.getChecked(0) + return spellListOf(v.x, v.y, v.z) + } +} \ No newline at end of file diff --git a/src/main/java/at/petrak/hex/common/casting/operators/math/OpDivCross.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDivCross.kt similarity index 72% rename from src/main/java/at/petrak/hex/common/casting/operators/math/OpDivCross.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDivCross.kt index 66f02812..c9799920 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/math/OpDivCross.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpDivCross.kt @@ -1,9 +1,9 @@ -package at.petrak.hex.common.casting.operators.math +package at.petrak.hexcasting.common.casting.operators.math -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.world.phys.Vec3 object OpDivCross : ConstManaOperator { diff --git a/src/main/java/at/petrak/hex/common/casting/operators/math/OpMulDot.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpMulDot.kt similarity index 70% rename from src/main/java/at/petrak/hex/common/casting/operators/math/OpMulDot.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpMulDot.kt index 0962c6bd..e05e7ba0 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/math/OpMulDot.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpMulDot.kt @@ -1,9 +1,9 @@ -package at.petrak.hex.common.casting.operators.math +package at.petrak.hexcasting.common.casting.operators.math -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext object OpMulDot : ConstManaOperator { override val argc: Int diff --git a/src/main/java/at/petrak/hex/common/casting/operators/math/OpPowProj.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpPowProj.kt similarity index 75% rename from src/main/java/at/petrak/hex/common/casting/operators/math/OpPowProj.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpPowProj.kt index 3d04d618..d3e75ffd 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/math/OpPowProj.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpPowProj.kt @@ -1,9 +1,9 @@ -package at.petrak.hex.common.casting.operators.math +package at.petrak.hexcasting.common.casting.operators.math -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.world.phys.Vec3 import kotlin.math.pow diff --git a/src/main/java/at/petrak/hex/common/casting/operators/math/OpSub.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpSub.kt similarity index 72% rename from src/main/java/at/petrak/hex/common/casting/operators/math/OpSub.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpSub.kt index 9138a25b..981a6317 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/math/OpSub.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/math/OpSub.kt @@ -1,9 +1,9 @@ -package at.petrak.hex.common.casting.operators.math +package at.petrak.hexcasting.common.casting.operators.math -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.world.phys.Vec3 object OpSub : ConstManaOperator { diff --git a/src/main/java/at/petrak/hex/common/casting/operators/selectors/OpGetCaster.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetCaster.kt similarity index 50% rename from src/main/java/at/petrak/hex/common/casting/operators/selectors/OpGetCaster.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetCaster.kt index 5504b9c1..4db3d267 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/selectors/OpGetCaster.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetCaster.kt @@ -1,9 +1,9 @@ -package at.petrak.hex.common.casting.operators.selectors +package at.petrak.hexcasting.common.casting.operators.selectors -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.world.entity.Entity object OpGetCaster : ConstManaOperator { diff --git a/src/main/java/at/petrak/hex/common/casting/operators/selectors/OpGetEntitiesBy.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntitiesBy.kt similarity index 81% rename from src/main/java/at/petrak/hex/common/casting/operators/selectors/OpGetEntitiesBy.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntitiesBy.kt index bd84ef1d..981448d5 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/selectors/OpGetEntitiesBy.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntitiesBy.kt @@ -1,11 +1,11 @@ -package at.petrak.hex.common.casting.operators.selectors +package at.petrak.hexcasting.common.casting.operators.selectors -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.MAX_DISTANCE -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.MAX_DISTANCE +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.util.Mth import net.minecraft.world.entity.Entity import net.minecraft.world.entity.LivingEntity diff --git a/src/main/java/at/petrak/hex/common/casting/operators/selectors/OpGetEntityAt.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntityAt.kt similarity index 63% rename from src/main/java/at/petrak/hex/common/casting/operators/selectors/OpGetEntityAt.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntityAt.kt index c9efea8b..1065031c 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/selectors/OpGetEntityAt.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/selectors/OpGetEntityAt.kt @@ -1,11 +1,11 @@ -package at.petrak.hex.common.casting.operators.selectors +package at.petrak.hexcasting.common.casting.operators.selectors -import at.petrak.hex.api.ConstManaOperator -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.Operator.Companion.spellListOf -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.casting.Widget +import at.petrak.hexcasting.api.ConstManaOperator +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.Operator.Companion.spellListOf +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.Widget import net.minecraft.world.entity.Entity import net.minecraft.world.phys.AABB import net.minecraft.world.phys.Vec3 diff --git a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpAddMotion.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpAddMotion.kt similarity index 73% rename from src/main/java/at/petrak/hex/common/casting/operators/spells/OpAddMotion.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpAddMotion.kt index ba6d5178..f5179835 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpAddMotion.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpAddMotion.kt @@ -1,12 +1,12 @@ -package at.petrak.hex.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.operators.spells -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.api.SpellOperator -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.network.HexMessages -import at.petrak.hex.common.network.MsgAddMotionAck +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.api.SpellOperator +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.network.HexMessages +import at.petrak.hexcasting.common.network.MsgAddMotionAck import net.minecraft.server.level.ServerPlayer import net.minecraft.world.entity.Entity import net.minecraft.world.phys.Vec3 diff --git a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpBlink.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBlink.kt similarity index 79% rename from src/main/java/at/petrak/hex/common/casting/operators/spells/OpBlink.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBlink.kt index f0dc4bc4..2a46be53 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpBlink.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBlink.kt @@ -1,12 +1,12 @@ -package at.petrak.hex.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.operators.spells -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.api.SpellOperator -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.network.HexMessages -import at.petrak.hex.common.network.MsgBlinkAck +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.api.SpellOperator +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.network.HexMessages +import at.petrak.hexcasting.common.network.MsgBlinkAck import net.minecraft.server.level.ServerPlayer import net.minecraft.world.entity.Entity import net.minecraft.world.phys.Vec3 diff --git a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpBreakBlock.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBreakBlock.kt similarity index 78% rename from src/main/java/at/petrak/hex/common/casting/operators/spells/OpBreakBlock.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBreakBlock.kt index ffff3e50..3af1ae4e 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpBreakBlock.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpBreakBlock.kt @@ -1,11 +1,11 @@ -package at.petrak.hex.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.operators.spells -import at.petrak.hex.HexMod -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.api.SpellOperator -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.HexMod +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.api.SpellOperator +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.core.BlockPos import net.minecraft.world.phys.Vec3 import net.minecraftforge.common.TierSortingRegistry diff --git a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpExplode.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpExplode.kt similarity index 76% rename from src/main/java/at/petrak/hex/common/casting/operators/spells/OpExplode.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpExplode.kt index a3a00741..cc568d83 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpExplode.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpExplode.kt @@ -1,10 +1,10 @@ -package at.petrak.hex.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.operators.spells -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.api.SpellOperator -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.api.SpellOperator +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.util.Mth import net.minecraft.world.level.Explosion import net.minecraft.world.phys.Vec3 diff --git a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpMakePackagedSpell.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt similarity index 78% rename from src/main/java/at/petrak/hex/common/casting/operators/spells/OpMakePackagedSpell.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt index a00499ce..5aa4bb1c 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpMakePackagedSpell.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpMakePackagedSpell.kt @@ -1,14 +1,14 @@ -package at.petrak.hex.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.operators.spells -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.api.SpellOperator -import at.petrak.hex.common.casting.CastException -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.casting.ManaHelper -import at.petrak.hex.common.items.magic.ItemPackagedSpell -import at.petrak.hex.hexmath.HexPattern +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.api.SpellOperator +import at.petrak.hexcasting.common.casting.CastException +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.casting.ManaHelper +import at.petrak.hexcasting.common.items.magic.ItemPackagedSpell +import at.petrak.hexcasting.hexmath.HexPattern import net.minecraft.nbt.ListTag import net.minecraft.world.entity.Entity import net.minecraft.world.entity.item.ItemEntity diff --git a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpPlaceBlock.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPlaceBlock.kt similarity index 91% rename from src/main/java/at/petrak/hex/common/casting/operators/spells/OpPlaceBlock.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPlaceBlock.kt index 96d87e06..5cf35dcc 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpPlaceBlock.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPlaceBlock.kt @@ -1,10 +1,10 @@ -package at.petrak.hex.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.operators.spells -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.api.SpellOperator -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.api.SpellOperator +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.core.BlockPos import net.minecraft.core.particles.BlockParticleOption import net.minecraft.core.particles.ParticleTypes diff --git a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpPrint.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPrint.kt similarity index 66% rename from src/main/java/at/petrak/hex/common/casting/operators/spells/OpPrint.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPrint.kt index 5a23647f..df71a43e 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/spells/OpPrint.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/OpPrint.kt @@ -1,10 +1,10 @@ -package at.petrak.hex.common.casting.operators.spells +package at.petrak.hexcasting.common.casting.operators.spells -import at.petrak.hex.api.OperationResult -import at.petrak.hex.api.Operator -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.OperationResult +import at.petrak.hexcasting.api.Operator +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.Util import net.minecraft.network.chat.TextComponent diff --git a/src/main/java/at/petrak/hex/common/casting/operators/spells/great/OpFlight.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpFlight.kt similarity index 88% rename from src/main/java/at/petrak/hex/common/casting/operators/spells/great/OpFlight.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpFlight.kt index 0dfab20b..392862af 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/spells/great/OpFlight.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpFlight.kt @@ -1,15 +1,15 @@ -package at.petrak.hex.common.casting.operators.spells.great +package at.petrak.hexcasting.common.casting.operators.spells.great -import at.petrak.hex.HexUtils -import at.petrak.hex.HexUtils.serializeToNBT -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.api.SpellOperator -import at.petrak.hex.common.casting.CastingContext -import at.petrak.hex.common.lib.LibCapabilities -import at.petrak.hex.common.network.HexMessages -import at.petrak.hex.common.network.MsgAddMotionAck +import at.petrak.hexcasting.HexUtils +import at.petrak.hexcasting.HexUtils.serializeToNBT +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.api.SpellOperator +import at.petrak.hexcasting.common.casting.CastingContext +import at.petrak.hexcasting.common.lib.LibCapabilities +import at.petrak.hexcasting.common.network.HexMessages +import at.petrak.hexcasting.common.network.MsgAddMotionAck import net.minecraft.core.Direction import net.minecraft.nbt.CompoundTag import net.minecraft.server.level.ServerPlayer diff --git a/src/main/java/at/petrak/hex/common/casting/operators/spells/great/OpLightning.kt b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpLightning.kt similarity index 72% rename from src/main/java/at/petrak/hex/common/casting/operators/spells/great/OpLightning.kt rename to src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpLightning.kt index 2e8350ee..a7626666 100644 --- a/src/main/java/at/petrak/hex/common/casting/operators/spells/great/OpLightning.kt +++ b/src/main/java/at/petrak/hexcasting/common/casting/operators/spells/great/OpLightning.kt @@ -1,10 +1,10 @@ -package at.petrak.hex.common.casting.operators.spells.great +package at.petrak.hexcasting.common.casting.operators.spells.great -import at.petrak.hex.api.Operator.Companion.getChecked -import at.petrak.hex.api.RenderedSpell -import at.petrak.hex.api.SpellDatum -import at.petrak.hex.api.SpellOperator -import at.petrak.hex.common.casting.CastingContext +import at.petrak.hexcasting.api.Operator.Companion.getChecked +import at.petrak.hexcasting.api.RenderedSpell +import at.petrak.hexcasting.api.SpellDatum +import at.petrak.hexcasting.api.SpellOperator +import at.petrak.hexcasting.common.casting.CastingContext import net.minecraft.world.entity.EntityType import net.minecraft.world.entity.LightningBolt import net.minecraft.world.phys.Vec3 diff --git a/src/main/java/at/petrak/hex/common/command/HexCommands.java b/src/main/java/at/petrak/hexcasting/common/command/HexCommands.java similarity index 87% rename from src/main/java/at/petrak/hex/common/command/HexCommands.java rename to src/main/java/at/petrak/hexcasting/common/command/HexCommands.java index c567a21b..89d07c56 100644 --- a/src/main/java/at/petrak/hex/common/command/HexCommands.java +++ b/src/main/java/at/petrak/hexcasting/common/command/HexCommands.java @@ -1,4 +1,4 @@ -package at.petrak.hex.common.command; +package at.petrak.hexcasting.common.command; import net.minecraftforge.event.RegisterCommandsEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; diff --git a/src/main/java/at/petrak/hexcasting/common/command/ListPatsCommand.java b/src/main/java/at/petrak/hexcasting/common/command/ListPatsCommand.java new file mode 100644 index 00000000..3d3d5a5b --- /dev/null +++ b/src/main/java/at/petrak/hexcasting/common/command/ListPatsCommand.java @@ -0,0 +1,63 @@ +package at.petrak.hexcasting.common.command; + +import at.petrak.hexcasting.api.PatternRegistry; +import at.petrak.hexcasting.common.items.HexItems; +import at.petrak.hexcasting.common.items.ItemScroll; +import at.petrak.hexcasting.hexmath.HexPattern; +import com.mojang.brigadier.CommandDispatcher; +import net.minecraft.commands.CommandSourceStack; +import net.minecraft.commands.Commands; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.item.ItemStack; + +public class ListPatsCommand { + public static void register(CommandDispatcher dispatcher) { + dispatcher.register(Commands.literal("hexcasting:listPatterns") + .requires(dp -> dp.hasPermission(Commands.LEVEL_ADMINS)) + .then(Commands.literal("list").executes(ctx -> { + var bob = new StringBuilder("Patterns in this world:"); + var lookup = PatternRegistry.getPerWorldPatterns(ctx.getSource().getLevel()); + lookup.forEach((sig, opId) -> { + bob.append('\n'); + bob.append(sig); + bob.append(": "); + bob.append(opId.toString()); + }); + ctx.getSource().sendSuccess(new TextComponent(bob.toString()), true); + + return lookup.size(); + })) + .then(Commands.literal("give").executes(ctx -> { + var sender = ctx.getSource().getEntity(); + if (sender instanceof ServerPlayer player) { + var lookup = PatternRegistry.getPerWorldPatterns(ctx.getSource().getLevel()); + + lookup.forEach((pattern, opId) -> { + var tag = new CompoundTag(); + tag.putString(ItemScroll.TAG_OP_ID, opId.toString()); + var prototypePat = PatternRegistry.lookupPerWorldPattern(opId).getFirst(); + tag.put(ItemScroll.TAG_PATTERN, + HexPattern.FromAnglesSig(pattern, prototypePat.startDir()).serializeToNBT()); + + var stack = new ItemStack(HexItems.SCROLL.get()); + stack.setTag(tag); + + var stackEntity = player.drop(stack, false); + if (stackEntity != null) { + stackEntity.setNoPickUpDelay(); + stackEntity.setOwner(player.getUUID()); + } + }); + + ctx.getSource().sendSuccess( + new TextComponent(String.format("Gave you all %d scrolls", lookup.size())), true); + return lookup.size(); + } + + return 0; + })) + ); + } +} diff --git a/src/main/java/at/petrak/hex/common/items/HexItems.java b/src/main/java/at/petrak/hexcasting/common/items/HexItems.java similarity index 71% rename from src/main/java/at/petrak/hex/common/items/HexItems.java rename to src/main/java/at/petrak/hexcasting/common/items/HexItems.java index 2b80d30a..5f49bc90 100644 --- a/src/main/java/at/petrak/hex/common/items/HexItems.java +++ b/src/main/java/at/petrak/hexcasting/common/items/HexItems.java @@ -1,10 +1,10 @@ -package at.petrak.hex.common.items; +package at.petrak.hexcasting.common.items; -import at.petrak.hex.HexMod; -import at.petrak.hex.common.items.magic.ItemArtifact; -import at.petrak.hex.common.items.magic.ItemCypher; -import at.petrak.hex.common.items.magic.ItemTrinket; -import at.petrak.hex.common.lib.LibItemNames; +import at.petrak.hexcasting.HexMod; +import at.petrak.hexcasting.common.items.magic.ItemArtifact; +import at.petrak.hexcasting.common.items.magic.ItemCypher; +import at.petrak.hexcasting.common.items.magic.ItemTrinket; +import at.petrak.hexcasting.common.lib.LibItemNames; import net.minecraft.core.NonNullList; import net.minecraft.world.food.FoodProperties; import net.minecraft.world.item.CreativeModeTab; @@ -16,7 +16,7 @@ import net.minecraftforge.registries.RegistryObject; public class HexItems { public static final DeferredRegister ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, HexMod.MOD_ID); - public static final CreativeModeTab TAB = new CreativeModeTab("hex") { + public static final CreativeModeTab TAB = new CreativeModeTab("hexcasting") { @Override public ItemStack makeIcon() { return new ItemStack(SPELLBOOK::get); @@ -29,28 +29,28 @@ public class HexItems { }; public static final RegistryObject WAND = ITEMS.register(LibItemNames.WAND, - () -> new ItemWand(unstackable())); + () -> new ItemWand(unstackable())); public static final RegistryObject FOCUS = ITEMS.register(LibItemNames.FOCUS, - () -> new ItemFocus(props())); + () -> new ItemFocus(props())); public static final RegistryObject SPELLBOOK = ITEMS.register(LibItemNames.SPELLBOOK, - () -> new ItemSpellbook(unstackable())); + () -> new ItemSpellbook(unstackable())); public static final RegistryObject CYPHER = ITEMS.register(LibItemNames.CYPHER, - () -> new ItemCypher(unstackable())); + () -> new ItemCypher(unstackable())); public static final RegistryObject TRINKET = ITEMS.register(LibItemNames.TRINKET, - () -> new ItemTrinket(unstackable())); + () -> new ItemTrinket(unstackable())); public static final RegistryObject ARTIFACT = ITEMS.register(LibItemNames.ARTIFACT, - () -> new ItemArtifact(unstackable())); + () -> new ItemArtifact(unstackable())); public static final RegistryObject AMETHYST_DUST = ITEMS.register(LibItemNames.AMETHYST_DUST, - () -> new Item(props())); + () -> new Item(props())); public static final RegistryObject CHARGED_AMETHYST = ITEMS.register(LibItemNames.CHARGED_AMETHYST, - () -> new Item(props())); + () -> new Item(props())); // I am very funny public static final RegistryObject SUBMARINE_SANDWICH = ITEMS.register(LibItemNames.SUBMARINE_SANDWICH, - () -> new Item(props().food(new FoodProperties.Builder().nutrition(4).build()))); + () -> new Item(props().food(new FoodProperties.Builder().nutrition(4).build()))); public static final RegistryObject SCRYING_LENS = ITEMS.register(LibItemNames.LENS, - () -> new Item(unstackable())); + () -> new Item(unstackable())); public static final RegistryObject SCROLL = ITEMS.register(LibItemNames.SCROLL, - () -> new ItemScroll(unstackable())); + () -> new ItemScroll(unstackable())); public static Item.Properties props() { return new Item.Properties().tab(TAB); diff --git a/src/main/java/at/petrak/hex/common/items/ItemDataHolder.java b/src/main/java/at/petrak/hexcasting/common/items/ItemDataHolder.java similarity index 74% rename from src/main/java/at/petrak/hex/common/items/ItemDataHolder.java rename to src/main/java/at/petrak/hexcasting/common/items/ItemDataHolder.java index b523be51..c705e42f 100644 --- a/src/main/java/at/petrak/hex/common/items/ItemDataHolder.java +++ b/src/main/java/at/petrak/hexcasting/common/items/ItemDataHolder.java @@ -1,7 +1,7 @@ -package at.petrak.hex.common.items; +package at.petrak.hexcasting.common.items; -import at.petrak.hex.api.SpellDatum; -import at.petrak.hex.common.casting.CastingContext; +import at.petrak.hexcasting.api.SpellDatum; +import at.petrak.hexcasting.common.casting.CastingContext; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.Item; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/at/petrak/hex/common/items/ItemFocus.java b/src/main/java/at/petrak/hexcasting/common/items/ItemFocus.java similarity index 83% rename from src/main/java/at/petrak/hex/common/items/ItemFocus.java rename to src/main/java/at/petrak/hexcasting/common/items/ItemFocus.java index 4b02adbb..695a0d4a 100644 --- a/src/main/java/at/petrak/hex/common/items/ItemFocus.java +++ b/src/main/java/at/petrak/hexcasting/common/items/ItemFocus.java @@ -1,8 +1,8 @@ -package at.petrak.hex.common.items; +package at.petrak.hexcasting.common.items; -import at.petrak.hex.HexMod; -import at.petrak.hex.api.SpellDatum; -import at.petrak.hex.common.casting.CastingContext; +import at.petrak.hexcasting.HexMod; +import at.petrak.hexcasting.api.SpellDatum; +import at.petrak.hexcasting.common.casting.CastingContext; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.Nullable; diff --git a/src/main/java/at/petrak/hex/common/items/ItemManaBattery.java b/src/main/java/at/petrak/hexcasting/common/items/ItemManaBattery.java similarity index 91% rename from src/main/java/at/petrak/hex/common/items/ItemManaBattery.java rename to src/main/java/at/petrak/hexcasting/common/items/ItemManaBattery.java index 4e1aa971..8e843397 100644 --- a/src/main/java/at/petrak/hex/common/items/ItemManaBattery.java +++ b/src/main/java/at/petrak/hexcasting/common/items/ItemManaBattery.java @@ -1,7 +1,7 @@ -package at.petrak.hex.common.items; +package at.petrak.hexcasting.common.items; -import at.petrak.hex.HexMod; -import at.petrak.hex.common.casting.ManaHelper; +import at.petrak.hexcasting.HexMod; +import at.petrak.hexcasting.common.casting.ManaHelper; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/at/petrak/hexcasting/common/items/ItemScroll.java b/src/main/java/at/petrak/hexcasting/common/items/ItemScroll.java new file mode 100644 index 00000000..37f172f1 --- /dev/null +++ b/src/main/java/at/petrak/hexcasting/common/items/ItemScroll.java @@ -0,0 +1,185 @@ +package at.petrak.hexcasting.common.items; + +import at.petrak.hexcasting.client.ClientTickCounter; +import at.petrak.hexcasting.client.RenderLib; +import at.petrak.hexcasting.hexmath.HexPattern; +import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.*; +import com.mojang.datafixers.util.Either; +import com.mojang.math.Matrix4f; +import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.screens.inventory.tooltip.ClientTooltipComponent; +import net.minecraft.client.renderer.GameRenderer; +import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.Mth; +import net.minecraft.world.inventory.tooltip.TooltipComponent; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.phys.Vec2; +import net.minecraftforge.api.distmarker.Dist; +import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.client.event.RenderTooltipEvent; +import net.minecraftforge.eventbus.api.SubscribeEvent; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.stream.Collectors; + +public class ItemScroll extends Item { + public static final String TAG_OP_ID = "op_id"; + public static final String TAG_PATTERN = "pattern"; + + public ItemScroll(Properties pProperties) { + super(pProperties); + } + + @Override + public Component getName(ItemStack pStack) { + var tag = pStack.getOrCreateTag(); + if (tag.contains(TAG_OP_ID)) { + return new TranslatableComponent("item.hexcasting.scroll.of", + I18n.get("hexcasting.spell." + ResourceLocation.tryParse(tag.getString(TAG_OP_ID)))); + } else if (tag.contains(TAG_PATTERN)) { + return new TranslatableComponent("item.hexcasting.scroll"); + } else { + return new TranslatableComponent("item.hexcasting.scroll.empty"); + } + } + + @SubscribeEvent + @OnlyIn(Dist.CLIENT) + public static void makeTooltip(RenderTooltipEvent.GatherComponents evt) { + ItemStack stack = evt.getItemStack(); + if (!stack.isEmpty() && stack.getItem() instanceof ItemScroll) { + var tooltip = evt.getTooltipElements(); + + var tag = stack.getOrCreateTag(); + HexPattern pattern = null; + if (tag.contains(TAG_PATTERN)) { + pattern = HexPattern.DeserializeFromNBT(tag.getCompound(TAG_PATTERN)); + } + + tooltip.add(Either.right(new TooltipGreeble(pattern))); + } + } + + // https://github.com/VazkiiMods/Quark/blob/master/src/main/java/vazkii/quark/content/client/tooltip/MapTooltips.java + // yoink + public static class TooltipGreeble implements ClientTooltipComponent, TooltipComponent { + private static final ResourceLocation MAP_BG = new ResourceLocation( + "minecraft:textures/map/map_background.png"); + private static final float SIZE = 96f; + + @Nullable + private final HexPattern pattern; + @Nullable + private final List zappyPoints; + @Nullable + private final List pathfinderDots; + private final float scale; + + public TooltipGreeble(@Nullable HexPattern pattern) { + this.pattern = pattern; + if (this.pattern != null) { + // Do two passes: one with a random size to find a good COM and one with the real calculations + + var com1 = this.pattern.getCenter(1); + var lines1 = this.pattern.toLines(1, com1.negated()); + + + var maxDist = -1f; + for (var dot : lines1) { + var dist = Mth.sqrt(dot.distanceToSqr(com1)); + if (dist > maxDist) { + maxDist = dist; + } + } + this.scale = Math.min(10, this.getHeight() / 2.1f / maxDist); + + var com2 = this.pattern.getCenter(this.scale); + var lines2 = this.pattern.toLines(this.scale, com2.negated()); + this.zappyPoints = RenderLib.makeZappy(lines2, 10f, 0.8f, 0f); + this.pathfinderDots = lines2.stream().distinct().collect(Collectors.toList()); + } else { + this.zappyPoints = null; + this.pathfinderDots = null; + this.scale = 0f; + } + } + + @Override + public void renderImage(Font font, int mouseX, int mouseY, PoseStack ps, ItemRenderer pItemRenderer, + int pBlitOffset) { + var width = this.getWidth(font); + var height = this.getHeight(); + + // far as i can tell "mouseX" and "mouseY" are actually the positions of the corner of the tooltip + ps.pushPose(); + ps.translate(mouseX, mouseY, 500); + RenderSystem.enableBlend(); + renderBG(ps); + + // renderText happens *before* renderImage for some asinine reason + if (this.pattern != null) { +// RenderSystem.disableBlend(); + ps.translate(0, 0, 100); + + RenderSystem.setShader(GameRenderer::getPositionColorShader); + RenderSystem.disableCull(); + RenderSystem.blendFunc(GlStateManager.SourceFactor.SRC_ALPHA, + GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA); + ps.translate(width / 2f, height / 2f, 1); + + var mat = ps.last().pose(); + RenderLib.drawLineSeq(mat, this.zappyPoints, 5f, 0, + 210, 200, 200, 255, null); + RenderLib.drawLineSeq(mat, this.zappyPoints, 2f, 0, + 200, 190, 190, 200, + ClientTickCounter.getTickCount() / 40f, 0.5f); + RenderLib.drawSpot(mat, this.zappyPoints.get(0), 2.5f, 1f, 0.1f, 0.15f, 0.6f); + + for (var dot : this.pathfinderDots) { + RenderLib.drawSpot(mat, dot, 1.5f, 0.82f, 0.8f, 0.8f, 0.5f); + } + } + + ps.popPose(); + } + + private static void renderBG(PoseStack ps) { + RenderSystem.setShader(GameRenderer::getPositionTexShader); + RenderSystem.setShaderColor(1f, 1f, 1f, 1f); + RenderSystem.setShaderTexture(0, MAP_BG); + + + // i wish i liked mobius front enough ot get to the TIS puzzles + BufferBuilder buffer = Tesselator.getInstance().getBuilder(); + Matrix4f neo = ps.last().pose(); + + buffer.begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX); + buffer.vertex(neo, 0, 0, 0.0F).uv(0.0F, 0.0F).endVertex(); + buffer.vertex(neo, 0, SIZE, 0.0F).uv(0.0F, 1.0f).endVertex(); + buffer.vertex(neo, SIZE, SIZE, 0.0F).uv(1.0F, 1.0f).endVertex(); + buffer.vertex(neo, SIZE, 0, 0.0F).uv(1.0F, 0.0F).endVertex(); + buffer.end(); + BufferUploader.end(buffer); + + + } + + @Override + public int getWidth(Font pFont) { + return (int) SIZE; + } + + @Override + public int getHeight() { + return (int) SIZE; + } + } +} diff --git a/src/main/java/at/petrak/hex/common/items/ItemSpellbook.java b/src/main/java/at/petrak/hexcasting/common/items/ItemSpellbook.java similarity index 96% rename from src/main/java/at/petrak/hex/common/items/ItemSpellbook.java rename to src/main/java/at/petrak/hexcasting/common/items/ItemSpellbook.java index 40782aea..53c72f7e 100644 --- a/src/main/java/at/petrak/hex/common/items/ItemSpellbook.java +++ b/src/main/java/at/petrak/hexcasting/common/items/ItemSpellbook.java @@ -1,7 +1,7 @@ -package at.petrak.hex.common.items; +package at.petrak.hexcasting.common.items; -import at.petrak.hex.api.SpellDatum; -import at.petrak.hex.common.casting.CastingContext; +import at.petrak.hexcasting.api.SpellDatum; +import at.petrak.hexcasting.common.casting.CastingContext; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TextComponent; diff --git a/src/main/java/at/petrak/hex/common/items/ItemWand.java b/src/main/java/at/petrak/hexcasting/common/items/ItemWand.java similarity index 90% rename from src/main/java/at/petrak/hex/common/items/ItemWand.java rename to src/main/java/at/petrak/hexcasting/common/items/ItemWand.java index 923816f2..899863bc 100644 --- a/src/main/java/at/petrak/hex/common/items/ItemWand.java +++ b/src/main/java/at/petrak/hexcasting/common/items/ItemWand.java @@ -1,6 +1,6 @@ -package at.petrak.hex.common.items; +package at.petrak.hexcasting.common.items; -import at.petrak.hex.client.gui.GuiSpellcasting; +import at.petrak.hexcasting.client.gui.GuiSpellcasting; import net.minecraft.client.Minecraft; import net.minecraft.stats.Stats; import net.minecraft.world.InteractionHand; diff --git a/src/main/java/at/petrak/hex/common/items/magic/ItemArtifact.java b/src/main/java/at/petrak/hexcasting/common/items/magic/ItemArtifact.java similarity index 86% rename from src/main/java/at/petrak/hex/common/items/magic/ItemArtifact.java rename to src/main/java/at/petrak/hexcasting/common/items/magic/ItemArtifact.java index e82a81d1..932f9461 100644 --- a/src/main/java/at/petrak/hex/common/items/magic/ItemArtifact.java +++ b/src/main/java/at/petrak/hexcasting/common/items/magic/ItemArtifact.java @@ -1,4 +1,4 @@ -package at.petrak.hex.common.items.magic; +package at.petrak.hexcasting.common.items.magic; public class ItemArtifact extends ItemPackagedSpell { public ItemArtifact(Properties pProperties) { diff --git a/src/main/java/at/petrak/hex/common/items/magic/ItemCypher.java b/src/main/java/at/petrak/hexcasting/common/items/magic/ItemCypher.java similarity index 86% rename from src/main/java/at/petrak/hex/common/items/magic/ItemCypher.java rename to src/main/java/at/petrak/hexcasting/common/items/magic/ItemCypher.java index 9032e6dc..48ce0cb4 100644 --- a/src/main/java/at/petrak/hex/common/items/magic/ItemCypher.java +++ b/src/main/java/at/petrak/hexcasting/common/items/magic/ItemCypher.java @@ -1,4 +1,4 @@ -package at.petrak.hex.common.items.magic; +package at.petrak.hexcasting.common.items.magic; public class ItemCypher extends ItemPackagedSpell { public ItemCypher(Properties pProperties) { diff --git a/src/main/java/at/petrak/hex/common/items/magic/ItemPackagedSpell.java b/src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedSpell.java similarity index 90% rename from src/main/java/at/petrak/hex/common/items/magic/ItemPackagedSpell.java rename to src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedSpell.java index 7ddf0390..e3022698 100644 --- a/src/main/java/at/petrak/hex/common/items/magic/ItemPackagedSpell.java +++ b/src/main/java/at/petrak/hexcasting/common/items/magic/ItemPackagedSpell.java @@ -1,10 +1,10 @@ -package at.petrak.hex.common.items.magic; +package at.petrak.hexcasting.common.items.magic; -import at.petrak.hex.HexMod; -import at.petrak.hex.common.casting.CastingContext; -import at.petrak.hex.common.casting.CastingHarness; -import at.petrak.hex.common.casting.ManaHelper; -import at.petrak.hex.hexmath.HexPattern; +import at.petrak.hexcasting.HexMod; +import at.petrak.hexcasting.common.casting.CastingContext; +import at.petrak.hexcasting.common.casting.CastingHarness; +import at.petrak.hexcasting.common.casting.ManaHelper; +import at.petrak.hexcasting.hexmath.HexPattern; import net.minecraft.Util; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.Tag; @@ -28,8 +28,8 @@ import java.util.List; * Item that holds a list of patterns in it ready to be cast */ public abstract class ItemPackagedSpell extends Item { - public static final String TAG_MANA = "hex:mana"; - public static final String TAG_START_MANA = "hex:start_mana"; + public static final String TAG_MANA = "hexcasting:mana"; + public static final String TAG_START_MANA = "hexcasting:start_mana"; public static final String TAG_PATTERNS = "patterns"; public static final ResourceLocation HAS_PATTERNS_PRED = new ResourceLocation(HexMod.MOD_ID, "has_patterns"); diff --git a/src/main/java/at/petrak/hex/common/items/magic/ItemTrinket.java b/src/main/java/at/petrak/hexcasting/common/items/magic/ItemTrinket.java similarity index 86% rename from src/main/java/at/petrak/hex/common/items/magic/ItemTrinket.java rename to src/main/java/at/petrak/hexcasting/common/items/magic/ItemTrinket.java index b1c8a869..7fb102e7 100644 --- a/src/main/java/at/petrak/hex/common/items/magic/ItemTrinket.java +++ b/src/main/java/at/petrak/hexcasting/common/items/magic/ItemTrinket.java @@ -1,4 +1,4 @@ -package at.petrak.hex.common.items.magic; +package at.petrak.hexcasting.common.items.magic; public class ItemTrinket extends ItemPackagedSpell { public ItemTrinket(Properties pProperties) { diff --git a/src/main/java/at/petrak/hex/common/lib/HexSounds.java b/src/main/java/at/petrak/hexcasting/common/lib/HexSounds.java similarity index 87% rename from src/main/java/at/petrak/hex/common/lib/HexSounds.java rename to src/main/java/at/petrak/hexcasting/common/lib/HexSounds.java index 26ae19f7..d53be7c9 100644 --- a/src/main/java/at/petrak/hex/common/lib/HexSounds.java +++ b/src/main/java/at/petrak/hexcasting/common/lib/HexSounds.java @@ -1,12 +1,12 @@ -package at.petrak.hex.common.lib; +package at.petrak.hexcasting.common.lib; -import at.petrak.hex.HexMod; +import at.petrak.hexcasting.HexMod; import net.minecraft.sounds.SoundEvent; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; -import static at.petrak.hex.common.lib.RegisterHelper.prefix; +import static at.petrak.hexcasting.common.lib.RegisterHelper.prefix; public class HexSounds { public static final DeferredRegister SOUNDS = DeferredRegister.create( diff --git a/src/main/java/at/petrak/hex/common/lib/HexStatistics.java b/src/main/java/at/petrak/hexcasting/common/lib/HexStatistics.java similarity index 93% rename from src/main/java/at/petrak/hex/common/lib/HexStatistics.java rename to src/main/java/at/petrak/hexcasting/common/lib/HexStatistics.java index f9815eb9..1850a7bb 100644 --- a/src/main/java/at/petrak/hex/common/lib/HexStatistics.java +++ b/src/main/java/at/petrak/hexcasting/common/lib/HexStatistics.java @@ -1,6 +1,6 @@ -package at.petrak.hex.common.lib; +package at.petrak.hexcasting.common.lib; -import at.petrak.hex.HexMod; +import at.petrak.hexcasting.HexMod; import net.minecraft.core.Registry; import net.minecraft.resources.ResourceLocation; import net.minecraft.stats.StatFormatter; diff --git a/src/main/java/at/petrak/hex/common/lib/LibCapabilities.java b/src/main/java/at/petrak/hexcasting/common/lib/LibCapabilities.java similarity index 88% rename from src/main/java/at/petrak/hex/common/lib/LibCapabilities.java rename to src/main/java/at/petrak/hexcasting/common/lib/LibCapabilities.java index c525dae0..1172d9ea 100644 --- a/src/main/java/at/petrak/hex/common/lib/LibCapabilities.java +++ b/src/main/java/at/petrak/hexcasting/common/lib/LibCapabilities.java @@ -1,7 +1,7 @@ -package at.petrak.hex.common.lib; +package at.petrak.hexcasting.common.lib; -import at.petrak.hex.HexMod; -import at.petrak.hex.common.casting.operators.spells.great.OpFlight; +import at.petrak.hexcasting.HexMod; +import at.petrak.hexcasting.common.casting.operators.spells.great.OpFlight; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.entity.Entity; diff --git a/src/main/java/at/petrak/hex/common/lib/LibDamageSources.java b/src/main/java/at/petrak/hexcasting/common/lib/LibDamageSources.java similarity index 83% rename from src/main/java/at/petrak/hex/common/lib/LibDamageSources.java rename to src/main/java/at/petrak/hexcasting/common/lib/LibDamageSources.java index 00d95724..b9cf3fd1 100644 --- a/src/main/java/at/petrak/hex/common/lib/LibDamageSources.java +++ b/src/main/java/at/petrak/hexcasting/common/lib/LibDamageSources.java @@ -1,4 +1,4 @@ -package at.petrak.hex.common.lib; +package at.petrak.hexcasting.common.lib; import net.minecraft.world.damagesource.DamageSource; diff --git a/src/main/java/at/petrak/hex/common/lib/LibItemNames.java b/src/main/java/at/petrak/hexcasting/common/lib/LibItemNames.java similarity index 93% rename from src/main/java/at/petrak/hex/common/lib/LibItemNames.java rename to src/main/java/at/petrak/hexcasting/common/lib/LibItemNames.java index dc34c969..51a656b3 100644 --- a/src/main/java/at/petrak/hex/common/lib/LibItemNames.java +++ b/src/main/java/at/petrak/hexcasting/common/lib/LibItemNames.java @@ -1,4 +1,4 @@ -package at.petrak.hex.common.lib; +package at.petrak.hexcasting.common.lib; public class LibItemNames { public static final String WAND = "wand"; diff --git a/src/main/java/at/petrak/hex/common/lib/RegisterHelper.java b/src/main/java/at/petrak/hexcasting/common/lib/RegisterHelper.java similarity index 90% rename from src/main/java/at/petrak/hex/common/lib/RegisterHelper.java rename to src/main/java/at/petrak/hexcasting/common/lib/RegisterHelper.java index 76f4318f..8b9ca987 100644 --- a/src/main/java/at/petrak/hex/common/lib/RegisterHelper.java +++ b/src/main/java/at/petrak/hexcasting/common/lib/RegisterHelper.java @@ -1,6 +1,6 @@ -package at.petrak.hex.common.lib; +package at.petrak.hexcasting.common.lib; -import at.petrak.hex.HexMod; +import at.petrak.hexcasting.HexMod; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.registries.IForgeRegistry; import net.minecraftforge.registries.IForgeRegistryEntry; diff --git a/src/main/java/at/petrak/hex/common/network/HexMessages.java b/src/main/java/at/petrak/hexcasting/common/network/HexMessages.java similarity index 95% rename from src/main/java/at/petrak/hex/common/network/HexMessages.java rename to src/main/java/at/petrak/hexcasting/common/network/HexMessages.java index f7e91f11..8dc8e6e5 100644 --- a/src/main/java/at/petrak/hex/common/network/HexMessages.java +++ b/src/main/java/at/petrak/hexcasting/common/network/HexMessages.java @@ -1,6 +1,6 @@ -package at.petrak.hex.common.network; +package at.petrak.hexcasting.common.network; -import at.petrak.hex.HexMod; +import at.petrak.hexcasting.HexMod; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.network.NetworkRegistry; import net.minecraftforge.network.simple.SimpleChannel; diff --git a/src/main/java/at/petrak/hex/common/network/MsgAddMotionAck.java b/src/main/java/at/petrak/hexcasting/common/network/MsgAddMotionAck.java similarity index 96% rename from src/main/java/at/petrak/hex/common/network/MsgAddMotionAck.java rename to src/main/java/at/petrak/hexcasting/common/network/MsgAddMotionAck.java index 0e6b9d24..e620917b 100644 --- a/src/main/java/at/petrak/hex/common/network/MsgAddMotionAck.java +++ b/src/main/java/at/petrak/hexcasting/common/network/MsgAddMotionAck.java @@ -1,4 +1,4 @@ -package at.petrak.hex.common.network; +package at.petrak.hexcasting.common.network; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; diff --git a/src/main/java/at/petrak/hex/common/network/MsgBlinkAck.java b/src/main/java/at/petrak/hexcasting/common/network/MsgBlinkAck.java similarity index 96% rename from src/main/java/at/petrak/hex/common/network/MsgBlinkAck.java rename to src/main/java/at/petrak/hexcasting/common/network/MsgBlinkAck.java index d0c388da..9e51c0e8 100644 --- a/src/main/java/at/petrak/hex/common/network/MsgBlinkAck.java +++ b/src/main/java/at/petrak/hexcasting/common/network/MsgBlinkAck.java @@ -1,4 +1,4 @@ -package at.petrak.hex.common.network; +package at.petrak.hexcasting.common.network; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; diff --git a/src/main/java/at/petrak/hex/common/network/MsgNewSpellPatternAck.java b/src/main/java/at/petrak/hexcasting/common/network/MsgNewSpellPatternAck.java similarity index 94% rename from src/main/java/at/petrak/hex/common/network/MsgNewSpellPatternAck.java rename to src/main/java/at/petrak/hexcasting/common/network/MsgNewSpellPatternAck.java index f737c008..73bbaa63 100644 --- a/src/main/java/at/petrak/hex/common/network/MsgNewSpellPatternAck.java +++ b/src/main/java/at/petrak/hexcasting/common/network/MsgNewSpellPatternAck.java @@ -1,7 +1,7 @@ -package at.petrak.hex.common.network; +package at.petrak.hexcasting.common.network; -import at.petrak.hex.client.gui.GuiSpellcasting; -import at.petrak.hex.common.lib.HexSounds; +import at.petrak.hexcasting.client.gui.GuiSpellcasting; +import at.petrak.hexcasting.common.lib.HexSounds; import io.netty.buffer.ByteBuf; import net.minecraft.client.Minecraft; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/at/petrak/hex/common/network/MsgNewSpellPatternSyn.java b/src/main/java/at/petrak/hexcasting/common/network/MsgNewSpellPatternSyn.java similarity index 90% rename from src/main/java/at/petrak/hex/common/network/MsgNewSpellPatternSyn.java rename to src/main/java/at/petrak/hexcasting/common/network/MsgNewSpellPatternSyn.java index a14fd7f9..766058c1 100644 --- a/src/main/java/at/petrak/hex/common/network/MsgNewSpellPatternSyn.java +++ b/src/main/java/at/petrak/hexcasting/common/network/MsgNewSpellPatternSyn.java @@ -1,11 +1,11 @@ -package at.petrak.hex.common.network; +package at.petrak.hexcasting.common.network; -import at.petrak.hex.common.casting.CastingContext; -import at.petrak.hex.common.casting.CastingHarness; -import at.petrak.hex.common.casting.CastingHarness.CastResult; -import at.petrak.hex.common.items.ItemWand; -import at.petrak.hex.common.lib.HexSounds; -import at.petrak.hex.hexmath.HexPattern; +import at.petrak.hexcasting.common.casting.CastingContext; +import at.petrak.hexcasting.common.casting.CastingHarness; +import at.petrak.hexcasting.common.casting.CastingHarness.CastResult; +import at.petrak.hexcasting.common.items.ItemWand; +import at.petrak.hexcasting.common.lib.HexSounds; +import at.petrak.hexcasting.hexmath.HexPattern; import io.netty.buffer.ByteBuf; import net.minecraft.Util; import net.minecraft.nbt.CompoundTag; diff --git a/src/main/java/at/petrak/hex/common/network/MsgQuitSpellcasting.java b/src/main/java/at/petrak/hexcasting/common/network/MsgQuitSpellcasting.java similarity index 91% rename from src/main/java/at/petrak/hex/common/network/MsgQuitSpellcasting.java rename to src/main/java/at/petrak/hexcasting/common/network/MsgQuitSpellcasting.java index b9b7845d..b74bc123 100644 --- a/src/main/java/at/petrak/hex/common/network/MsgQuitSpellcasting.java +++ b/src/main/java/at/petrak/hexcasting/common/network/MsgQuitSpellcasting.java @@ -1,6 +1,6 @@ -package at.petrak.hex.common.network; +package at.petrak.hexcasting.common.network; -import at.petrak.hex.common.items.ItemWand; +import at.petrak.hexcasting.common.items.ItemWand; import io.netty.buffer.ByteBuf; import net.minecraft.nbt.CompoundTag; import net.minecraft.server.level.ServerPlayer; diff --git a/src/main/java/at/petrak/hex/common/network/MsgShiftScrollSyn.java b/src/main/java/at/petrak/hexcasting/common/network/MsgShiftScrollSyn.java similarity index 95% rename from src/main/java/at/petrak/hex/common/network/MsgShiftScrollSyn.java rename to src/main/java/at/petrak/hexcasting/common/network/MsgShiftScrollSyn.java index 4dad7f84..cbca55c7 100644 --- a/src/main/java/at/petrak/hex/common/network/MsgShiftScrollSyn.java +++ b/src/main/java/at/petrak/hexcasting/common/network/MsgShiftScrollSyn.java @@ -1,6 +1,6 @@ -package at.petrak.hex.common.network; +package at.petrak.hexcasting.common.network; -import at.petrak.hex.common.items.ItemSpellbook; +import at.petrak.hexcasting.common.items.ItemSpellbook; import io.netty.buffer.ByteBuf; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.network.chat.TranslatableComponent; diff --git a/src/main/java/at/petrak/hexcasting/datagen/Advancements.java b/src/main/java/at/petrak/hexcasting/datagen/Advancements.java new file mode 100644 index 00000000..bedc7ea7 --- /dev/null +++ b/src/main/java/at/petrak/hexcasting/datagen/Advancements.java @@ -0,0 +1,120 @@ +package at.petrak.hexcasting.datagen; + +import at.petrak.hexcasting.HexMod; +import at.petrak.hexcasting.common.advancement.OvercastTrigger; +import at.petrak.hexcasting.common.advancement.SpendManaTrigger; +import at.petrak.hexcasting.common.items.HexItems; +import net.minecraft.advancements.Advancement; +import net.minecraft.advancements.CriteriaTriggers; +import net.minecraft.advancements.DisplayInfo; +import net.minecraft.advancements.FrameType; +import net.minecraft.advancements.critereon.*; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.advancements.AdvancementProvider; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.block.Blocks; +import net.minecraftforge.common.data.ExistingFileHelper; + +import java.util.function.Consumer; + +public class Advancements extends AdvancementProvider { + public static Advancement ROOT; + public static Advancement BIG_CAST; + public static Advancement WASTEFUL_CAST; + public static Advancement OPENED_EYES; + public static Advancement ENLIGHTENMENT; + + public static final OvercastTrigger OVERCAST_TRIGGER = new OvercastTrigger(); + public static final SpendManaTrigger SPEND_MANA_TRIGGER = new SpendManaTrigger(); + + public Advancements(DataGenerator generatorIn, ExistingFileHelper fileHelperIn) { + super(generatorIn, fileHelperIn); + } + + @Override + protected void registerAdvancements(Consumer consumer, ExistingFileHelper fileHelper) { + ROOT = Advancement.Builder.advancement() + // what an ergonomic design decision + // i am so happy that data generators are the future + .display(new DisplayInfo(new ItemStack(Items.BUDDING_AMETHYST), + new TranslatableComponent("advancement.hexcasting:root"), + new TranslatableComponent("advancement.hexcasting:root.desc"), + new ResourceLocation("minecraft", "textures/block/calcite.png"), + FrameType.TASK, true, true, true)) + // the only thing making this vaguely tolerable is the knowledge the json files are worse somehow + .addCriterion("on_thingy", new TickTrigger.TriggerInstance(EntityPredicate.Composite.wrap( + EntityPredicate.Builder.entity() + .steppingOn(LocationPredicate.Builder.location() + .setBlock(BlockPredicate.Builder.block() + .of(Blocks.AMETHYST_BLOCK, Blocks.CALCITE) + .build()) + .setY(MinMaxBounds.Doubles.between(-64.0, 30.0)).build()) + .build()))) + .save(consumer, prefix("root")); // how the hell does one even read this + + // weird names so we have alphabetical parity + WASTEFUL_CAST = Advancement.Builder.advancement() + .display(simple(Items.GLISTERING_MELON_SLICE, "wasteful_cast", FrameType.TASK)) + .parent(ROOT) + .addCriterion("waste_amt", new SpendManaTrigger.Instance(EntityPredicate.Composite.ANY, + MinMaxBounds.Ints.ANY, + MinMaxBounds.Ints.atLeast(89_000))) + .save(consumer, prefix("aaa_wasteful_cast")); + BIG_CAST = Advancement.Builder.advancement() + .display(simple(HexItems.CHARGED_AMETHYST.get(), "big_cast", FrameType.TASK)) + .parent(ROOT) + .addCriterion("cast_amt", new SpendManaTrigger.Instance(EntityPredicate.Composite.ANY, + MinMaxBounds.Ints.atLeast(6_400_000), + MinMaxBounds.Ints.ANY)) + .save(consumer, prefix("aab_big_cast")); + + OPENED_EYES = Advancement.Builder.advancement() + .display(simple(Items.ENDER_EYE, "opened_eyes", FrameType.TASK)) + .parent(ROOT) + .addCriterion("health_used", + new OvercastTrigger.Instance(EntityPredicate.Composite.ANY, + MinMaxBounds.Ints.ANY, + MinMaxBounds.Doubles.ANY, + // you can't just kill yourself + MinMaxBounds.Doubles.atLeast(0.1))) + .save(consumer, prefix("opened_eyes")); + + ENLIGHTENMENT = Advancement.Builder.advancement() + .display(new DisplayInfo(new ItemStack(Items.MUSIC_DISC_11), + new TranslatableComponent("advancement.hexcasting:enlightenment"), + new TranslatableComponent("advancement.hexcasting:enlightenment.desc"), + null, + FrameType.CHALLENGE, true, true, true)) + .parent(OPENED_EYES) + .addCriterion("health_used", + new OvercastTrigger.Instance(EntityPredicate.Composite.ANY, + MinMaxBounds.Ints.ANY, + // add a little bit of slop here + MinMaxBounds.Doubles.atLeast(17.95), + MinMaxBounds.Doubles.between(0.1, 2.05))) + .save(consumer, prefix("enlightenment")); + +// super.registerAdvancements(consumer, fileHelper); + } + + public static void registerTriggers() { + CriteriaTriggers.register(OVERCAST_TRIGGER); + CriteriaTriggers.register(SPEND_MANA_TRIGGER); + } + + protected static DisplayInfo simple(ItemLike icon, String name, FrameType frameType) { + String expandedName = "advancement.hexcasting:" + name; + return new DisplayInfo(new ItemStack(icon.asItem()), + new TranslatableComponent(expandedName), + new TranslatableComponent(expandedName + ".desc"), + null, frameType, true, true, false); + } + + private static String prefix(String name) { + return HexMod.MOD_ID + ":" + name; + } +} diff --git a/src/main/java/at/petrak/hex/datagen/DataGenerators.java b/src/main/java/at/petrak/hexcasting/datagen/DataGenerators.java similarity index 88% rename from src/main/java/at/petrak/hex/datagen/DataGenerators.java rename to src/main/java/at/petrak/hexcasting/datagen/DataGenerators.java index 2041bc8a..2647f4a0 100644 --- a/src/main/java/at/petrak/hex/datagen/DataGenerators.java +++ b/src/main/java/at/petrak/hexcasting/datagen/DataGenerators.java @@ -1,6 +1,6 @@ -package at.petrak.hex.datagen; +package at.petrak.hexcasting.datagen; -import at.petrak.hex.datagen.lootmods.HexLootModifiers; +import at.petrak.hexcasting.datagen.lootmods.HexLootModifiers; import net.minecraft.data.DataGenerator; import net.minecraftforge.common.data.ExistingFileHelper; import net.minecraftforge.eventbus.api.SubscribeEvent; diff --git a/src/main/java/at/petrak/hex/datagen/ItemModels.java b/src/main/java/at/petrak/hexcasting/datagen/ItemModels.java similarity index 93% rename from src/main/java/at/petrak/hex/datagen/ItemModels.java rename to src/main/java/at/petrak/hexcasting/datagen/ItemModels.java index 9e82a0da..71228267 100644 --- a/src/main/java/at/petrak/hex/datagen/ItemModels.java +++ b/src/main/java/at/petrak/hexcasting/datagen/ItemModels.java @@ -1,9 +1,9 @@ -package at.petrak.hex.datagen; +package at.petrak.hexcasting.datagen; -import at.petrak.hex.HexMod; -import at.petrak.hex.common.items.HexItems; -import at.petrak.hex.common.items.ItemFocus; -import at.petrak.hex.common.items.magic.ItemPackagedSpell; +import at.petrak.hexcasting.HexMod; +import at.petrak.hexcasting.common.items.HexItems; +import at.petrak.hexcasting.common.items.ItemFocus; +import at.petrak.hexcasting.common.items.magic.ItemPackagedSpell; import com.mojang.datafixers.util.Pair; import net.minecraft.data.DataGenerator; import net.minecraft.resources.ResourceLocation; diff --git a/src/main/java/at/petrak/hex/datagen/Recipes.java b/src/main/java/at/petrak/hexcasting/datagen/Recipes.java similarity index 97% rename from src/main/java/at/petrak/hex/datagen/Recipes.java rename to src/main/java/at/petrak/hexcasting/datagen/Recipes.java index 90337520..760eb1c8 100644 --- a/src/main/java/at/petrak/hex/datagen/Recipes.java +++ b/src/main/java/at/petrak/hexcasting/datagen/Recipes.java @@ -1,6 +1,6 @@ -package at.petrak.hex.datagen; +package at.petrak.hexcasting.datagen; -import at.petrak.hex.common.items.HexItems; +import at.petrak.hexcasting.common.items.HexItems; import net.minecraft.data.DataGenerator; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeProvider; diff --git a/src/main/java/at/petrak/hex/datagen/lootmods/AmethystClusterModifier.java b/src/main/java/at/petrak/hexcasting/datagen/lootmods/AmethystClusterModifier.java similarity index 96% rename from src/main/java/at/petrak/hex/datagen/lootmods/AmethystClusterModifier.java rename to src/main/java/at/petrak/hexcasting/datagen/lootmods/AmethystClusterModifier.java index c5df1d90..53334fe3 100644 --- a/src/main/java/at/petrak/hex/datagen/lootmods/AmethystClusterModifier.java +++ b/src/main/java/at/petrak/hexcasting/datagen/lootmods/AmethystClusterModifier.java @@ -1,6 +1,6 @@ -package at.petrak.hex.datagen.lootmods; +package at.petrak.hexcasting.datagen.lootmods; -import at.petrak.hex.common.items.HexItems; +import at.petrak.hexcasting.common.items.HexItems; import com.google.gson.JsonObject; import net.minecraft.resources.ResourceLocation; import net.minecraft.util.GsonHelper; diff --git a/src/main/java/at/petrak/hex/datagen/lootmods/HexLootModifiers.java b/src/main/java/at/petrak/hexcasting/datagen/lootmods/HexLootModifiers.java similarity index 97% rename from src/main/java/at/petrak/hex/datagen/lootmods/HexLootModifiers.java rename to src/main/java/at/petrak/hexcasting/datagen/lootmods/HexLootModifiers.java index 6d30e531..da15c044 100644 --- a/src/main/java/at/petrak/hex/datagen/lootmods/HexLootModifiers.java +++ b/src/main/java/at/petrak/hexcasting/datagen/lootmods/HexLootModifiers.java @@ -1,6 +1,6 @@ -package at.petrak.hex.datagen.lootmods; +package at.petrak.hexcasting.datagen.lootmods; -import at.petrak.hex.HexMod; +import at.petrak.hexcasting.HexMod; import net.minecraft.advancements.critereon.EnchantmentPredicate; import net.minecraft.advancements.critereon.ItemPredicate; import net.minecraft.advancements.critereon.MinMaxBounds; diff --git a/src/main/java/at/petrak/hex/datagen/lootmods/PatternScrollModifier.java b/src/main/java/at/petrak/hexcasting/datagen/lootmods/PatternScrollModifier.java similarity index 69% rename from src/main/java/at/petrak/hex/datagen/lootmods/PatternScrollModifier.java rename to src/main/java/at/petrak/hexcasting/datagen/lootmods/PatternScrollModifier.java index bf94f44f..80217150 100644 --- a/src/main/java/at/petrak/hex/datagen/lootmods/PatternScrollModifier.java +++ b/src/main/java/at/petrak/hexcasting/datagen/lootmods/PatternScrollModifier.java @@ -1,8 +1,9 @@ -package at.petrak.hex.datagen.lootmods; +package at.petrak.hexcasting.datagen.lootmods; -import at.petrak.hex.api.PatternRegistry; -import at.petrak.hex.common.items.HexItems; -import at.petrak.hex.common.items.ItemScroll; +import at.petrak.hexcasting.api.PatternRegistry; +import at.petrak.hexcasting.common.items.HexItems; +import at.petrak.hexcasting.common.items.ItemScroll; +import at.petrak.hexcasting.hexmath.HexPattern; import com.google.gson.JsonObject; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; @@ -30,26 +31,31 @@ public class PatternScrollModifier extends LootModifier { protected List doApply(List generatedLoot, LootContext context) { var rand = context.getRandom(); - var lookup = PatternRegistry.getPerWorldPatterns(context.getLevel()); - var allOpIds = lookup.values().stream().toList(); + var worldLookup = PatternRegistry.getPerWorldPatterns(context.getLevel()); + var allOpIds = worldLookup.keySet().stream().toList(); // Don't generate more than one of the same pattern - var seenPats = new HashSet(); + var seenPats = new HashSet(); var scrollAmt = rand.nextGaussian(0.0, this.countStddev); for (int i = 0; i < scrollAmt; i++) { - ResourceLocation opId; + String pattern; do { - opId = allOpIds.get(rand.nextInt(allOpIds.size())); - } while (seenPats.contains(opId)); + pattern = allOpIds.get(rand.nextInt(allOpIds.size())); + } while (seenPats.contains(pattern)); - seenPats.add(opId); + seenPats.add(pattern); + var opId = worldLookup.get(pattern); var tag = new CompoundTag(); tag.putString(ItemScroll.TAG_OP_ID, opId.toString()); + var prototypePat = PatternRegistry.lookupPerWorldPattern(opId).getFirst(); + tag.put(ItemScroll.TAG_PATTERN, + HexPattern.FromAnglesSig(pattern, prototypePat.startDir()).serializeToNBT()); + var stack = new ItemStack(HexItems.SCROLL.get()); stack.setTag(tag); generatedLoot.add(stack); - seenPats.add(opId); + seenPats.add(pattern); } return generatedLoot; diff --git a/src/main/java/at/petrak/hex/hexmath/EulerPathFinder.kt b/src/main/java/at/petrak/hexcasting/hexmath/EulerPathFinder.kt similarity index 98% rename from src/main/java/at/petrak/hex/hexmath/EulerPathFinder.kt rename to src/main/java/at/petrak/hexcasting/hexmath/EulerPathFinder.kt index b76268d1..73667c5e 100644 --- a/src/main/java/at/petrak/hex/hexmath/EulerPathFinder.kt +++ b/src/main/java/at/petrak/hexcasting/hexmath/EulerPathFinder.kt @@ -1,4 +1,4 @@ -package at.petrak.hex.hexmath +package at.petrak.hexcasting.hexmath import java.util.* import kotlin.random.Random diff --git a/src/main/java/at/petrak/hex/hexmath/HexAngle.kt b/src/main/java/at/petrak/hexcasting/hexmath/HexAngle.kt similarity index 85% rename from src/main/java/at/petrak/hex/hexmath/HexAngle.kt rename to src/main/java/at/petrak/hexcasting/hexmath/HexAngle.kt index 84941b2b..3d24ceae 100644 --- a/src/main/java/at/petrak/hex/hexmath/HexAngle.kt +++ b/src/main/java/at/petrak/hexcasting/hexmath/HexAngle.kt @@ -1,4 +1,4 @@ -package at.petrak.hex.hexmath +package at.petrak.hexcasting.hexmath enum class HexAngle { FORWARD, RIGHT, RIGHT_BACK, BACK, LEFT_BACK, LEFT; diff --git a/src/main/java/at/petrak/hex/hexmath/HexCoord.kt b/src/main/java/at/petrak/hexcasting/hexmath/HexCoord.kt similarity index 98% rename from src/main/java/at/petrak/hex/hexmath/HexCoord.kt rename to src/main/java/at/petrak/hexcasting/hexmath/HexCoord.kt index 94a93526..f7cd45a1 100644 --- a/src/main/java/at/petrak/hex/hexmath/HexCoord.kt +++ b/src/main/java/at/petrak/hexcasting/hexmath/HexCoord.kt @@ -1,4 +1,4 @@ -package at.petrak.hex.hexmath +package at.petrak.hexcasting.hexmath import java.lang.Integer.max import kotlin.math.abs diff --git a/src/main/java/at/petrak/hex/hexmath/HexDir.kt b/src/main/java/at/petrak/hexcasting/hexmath/HexDir.kt similarity index 95% rename from src/main/java/at/petrak/hex/hexmath/HexDir.kt rename to src/main/java/at/petrak/hexcasting/hexmath/HexDir.kt index 7e20f0fc..8ddcf77b 100644 --- a/src/main/java/at/petrak/hex/hexmath/HexDir.kt +++ b/src/main/java/at/petrak/hexcasting/hexmath/HexDir.kt @@ -1,4 +1,4 @@ -package at.petrak.hex.hexmath +package at.petrak.hexcasting.hexmath enum class HexDir { NORTH_EAST, EAST, SOUTH_EAST, SOUTH_WEST, WEST, NORTH_WEST; diff --git a/src/main/java/at/petrak/hex/hexmath/HexPattern.kt b/src/main/java/at/petrak/hexcasting/hexmath/HexPattern.kt similarity index 98% rename from src/main/java/at/petrak/hex/hexmath/HexPattern.kt rename to src/main/java/at/petrak/hexcasting/hexmath/HexPattern.kt index f43eb0e8..491b6bd3 100644 --- a/src/main/java/at/petrak/hex/hexmath/HexPattern.kt +++ b/src/main/java/at/petrak/hexcasting/hexmath/HexPattern.kt @@ -1,6 +1,6 @@ -package at.petrak.hex.hexmath +package at.petrak.hexcasting.hexmath -import at.petrak.hex.client.RenderLib +import at.petrak.hexcasting.client.RenderLib import net.minecraft.nbt.ByteArrayTag import net.minecraft.nbt.ByteTag import net.minecraft.nbt.CompoundTag diff --git a/src/main/java/at/petrak/hex/interop/patchouli/PatternComponent.java b/src/main/java/at/petrak/hexcasting/interop/patchouli/PatternComponent.java similarity index 83% rename from src/main/java/at/petrak/hex/interop/patchouli/PatternComponent.java rename to src/main/java/at/petrak/hexcasting/interop/patchouli/PatternComponent.java index f81beaba..3ab8ec43 100644 --- a/src/main/java/at/petrak/hex/interop/patchouli/PatternComponent.java +++ b/src/main/java/at/petrak/hexcasting/interop/patchouli/PatternComponent.java @@ -1,9 +1,9 @@ -package at.petrak.hex.interop.patchouli; +package at.petrak.hexcasting.interop.patchouli; -import at.petrak.hex.client.RenderLib; -import at.petrak.hex.hexmath.HexCoord; -import at.petrak.hex.hexmath.HexDir; -import at.petrak.hex.hexmath.HexPattern; +import at.petrak.hexcasting.client.RenderLib; +import at.petrak.hexcasting.hexmath.HexCoord; +import at.petrak.hexcasting.hexmath.HexDir; +import at.petrak.hexcasting.hexmath.HexPattern; import com.google.gson.Gson; import com.google.gson.JsonElement; import com.google.gson.annotations.SerializedName; @@ -30,11 +30,14 @@ public class PatternComponent implements ICustomComponent { public String patternsRaw; @SerializedName("hex_size") public String hexSizeRaw; + @SerializedName("stroke_order") + public String strokeOrderRaw; protected transient List patterns; protected transient int x, y; protected transient List pathfinderDots; protected transient float hexSize; + protected transient boolean strokeOrder; /** * Pass -1, -1 to center it. @@ -62,9 +65,16 @@ public class PatternComponent implements ICustomComponent { for (var pat : this.patterns) { RenderLib.drawLineSeq(mat, pat.zappyPoints, 5f, 0, 210, 200, 200, 255, null); - RenderLib.drawLineSeq(mat, pat.zappyPoints, 2f, 0, 200, 190, 190, 200, ctx.getTicksInBook() / 20f, 0.5f); - RenderLib.drawSpot(mat, pat.zappyPoints.get(0), 2.5f, 1f, 0.1f, 0.15f, 0.6f); + + if (this.strokeOrder) { + RenderLib.drawLineSeq(mat, pat.zappyPoints, 2f, 0, 200, 190, 190, 200, + ctx.getTicksInBook() / 20f, 0.5f); + RenderLib.drawSpot(mat, pat.zappyPoints.get(0), 2.5f, 1f, 0.1f, 0.15f, 0.6f); + } else { + RenderLib.drawLineSeq(mat, pat.zappyPoints, 2f, 0, 100, 95, 95, 200, + null); + } } for (var dot : this.pathfinderDots) { @@ -80,6 +90,7 @@ public class PatternComponent implements ICustomComponent { @Override public void onVariablesAvailable(UnaryOperator lookup) { this.hexSize = lookup.apply(IVariable.wrap(hexSizeRaw)).asNumber(10f).floatValue(); + this.strokeOrder = lookup.apply(IVariable.wrap(strokeOrderRaw)).asBoolean(true); var patsRaw = lookup.apply(IVariable.wrap(patternsRaw)).asListOrSingleton(); diff --git a/src/main/java/at/petrak/hex/server/TickScheduler.kt b/src/main/java/at/petrak/hexcasting/server/TickScheduler.kt similarity index 95% rename from src/main/java/at/petrak/hex/server/TickScheduler.kt rename to src/main/java/at/petrak/hexcasting/server/TickScheduler.kt index 118e6f62..5614cd79 100644 --- a/src/main/java/at/petrak/hex/server/TickScheduler.kt +++ b/src/main/java/at/petrak/hexcasting/server/TickScheduler.kt @@ -1,4 +1,4 @@ -package at.petrak.hex.server +package at.petrak.hexcasting.server import net.minecraftforge.event.TickEvent import net.minecraftforge.eventbus.api.SubscribeEvent diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 37574064..4cd14a33 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -5,15 +5,12 @@ license = "MIT" issueTrackerURL = "https://github.com/gamma-delta/HexMod/issues" [[mods]] -modId = "hex" +modId = "hexcasting" version = "${file.jarVersion}" displayName = "Hex" displayURL = "https://github.com/gamma-delta/HexMod" logoFile = "logo.png" -credits = ''' -- Alwinfy for visual effects and proofreading -- Kra3tor for sound effects -''' +credits = "Alwinfy for visual effects and proofreading; Kra3tor for sound effects" authors = "petrak@ (aka gamma-delta)" description = "Cast powerful Hexes on the fly by drawing patterns with a staff." diff --git a/src/main/resources/assets/hex/lang/en_us.json b/src/main/resources/assets/hex/lang/en_us.json deleted file mode 100644 index 22fc12c3..00000000 --- a/src/main/resources/assets/hex/lang/en_us.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "item.hex.wand": "Staff", - "item.hex.focus": "Focus", - "item.hex.spellbook": "Spellbook", - "item.hex.cypher": "Cypher", - "item.hex.trinket": "Trinket", - "item.hex.artifact": "Artifact", - "item.hex.amethyst_dust": "Amethyst Dust", - "item.hex.charged_amethyst": "Charged Amethyst", - "item.hex.lens": "Scrying Lens", - "item.hex.scroll": "Scroll", - "death.attack.hex.overcast": "%s's mind was consumed into energy", - "hex.spellbook.tooltip.page": "Selected Page %d/%d", - "hex.spelldata.desc.entity": "Entity %s", - "advancement.hex:root": "Hex ", - "advancement.hex:root.desc": "Enter an amethyst geode deep underground, a concentrated source of media.", - "advancement.hex:enlightenment": "Achieve Enlightenment", - "advancement.hex:enlightenment.desc": "Go nearly insane from casting a Hex from almost all of your health.", - "advancement.hex:wasteful_cast": "Waste Not...", - "advancement.hex:wasteful_cast.desc": "Waste a large amount of Media when casting a Hex.", - "advancement.hex:big_cast": "... Want Not", - "advancement.hex:big_cast.desc": "Cast a spell requiring a truly huge amount of Media.", - "advancement.hex:opened_eyes": "Opened Eyes", - "advancement.hex:opened_eyes.desc": "Have nature take just a §olittle§r of your mind as payment for a Hex.", - "stat.hex.mana_used": "Media consumed (in dusts)", - "stat.hex.mana_overcasted": "Media overcasted (in dusts)", - "itemGroup.hex": "Hex", - "hex.spell.hex:explode": "Explosion", - "hex.spell.hex:explode/fireball": "Fireball", - "hex.spell.hex:add_motion": "Add Motion", - "hex.spell.hex:blink": "Blink", - "hex.spell.hex:break_block": "Break Block", - "hex.spell.hex:place_block": "Place Block", - "hex.spell.hex:make_cypher": "Craft Cypher", - "hex.spell.hex:make_trinket": "Craft Trinket", - "hex.spell.hex:make_artifact": "Craft Artifact" -} diff --git a/src/main/resources/assets/hex/sounds.json b/src/main/resources/assets/hex/sounds.json deleted file mode 100644 index 8ec45f9b..00000000 --- a/src/main/resources/assets/hex/sounds.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "casting.start_pattern": { - "sounds": [ - { - "name": "hex:add_line", - "volume": 1.0, - "pitch": 0.8 - } - ] - }, - "casting.add_line": { - "sounds": [ - { - "name": "hex:add_line", - "volume": 0.8, - "pitch": 1.0 - } - ] - }, - "casting.add_pattern": { - "sounds": [ - "hex:add_pattern" - ] - }, - "casting.ambiance": { - "sounds": [ - "hex:casting_ambiance" - ] - }, - "casting.cast": { - "sounds": [ - "hex:cast_hex" - ] - } -} \ No newline at end of file diff --git a/src/main/resources/assets/hexcasting/lang/en_us.json b/src/main/resources/assets/hexcasting/lang/en_us.json new file mode 100644 index 00000000..b2f37f48 --- /dev/null +++ b/src/main/resources/assets/hexcasting/lang/en_us.json @@ -0,0 +1,39 @@ +{ + "item.hexcasting.wand": "Staff", + "item.hexcasting.focus": "Focus", + "item.hexcasting.spellbook": "Spellbook", + "item.hexcasting.cypher": "Cypher", + "item.hexcasting.trinket": "Trinket", + "item.hexcasting.artifact": "Artifact", + "item.hexcasting.amethyst_dust": "Amethyst Dust", + "item.hexcasting.charged_amethyst": "Charged Amethyst", + "item.hexcasting.lens": "Scrying Lens", + "item.hexcasting.scroll": "Scroll", + "item.hexcasting.scroll.of": "Scroll of %s", + "item.hexcasting.scroll.empty": "Empty Scroll", + "death.attack.hexcasting.overcast": "%s's mind was consumed into energy", + "hexcasting.spellbook.tooltip.page": "Selected Page %d/%d", + "hexcasting.spelldata.desc.entity": "Entity %s", + "advancement.hexcasting:root": "Hexcasting Research", + "advancement.hexcasting:root.desc": "Enter an amethyst geode deep underground, a concentrated source of media.", + "advancement.hexcasting:enlightenment": "Achieve Enlightenment", + "advancement.hexcasting:enlightenment.desc": "Go nearly insane from casting a hexcasting from almost all of your health.", + "advancement.hexcasting:wasteful_cast": "Waste Not...", + "advancement.hexcasting:wasteful_cast.desc": "Waste a large amount of Media when casting a hexcasting.", + "advancement.hexcasting:big_cast": "... Want Not", + "advancement.hexcasting:big_cast.desc": "Cast a spell requiring a truly huge amount of Media.", + "advancement.hexcasting:opened_eyes": "Opened Eyes", + "advancement.hexcasting:opened_eyes.desc": "Have nature take just a §olittle§r of your mind as payment for a hexcasting.", + "stat.hexcasting.mana_used": "Media consumed (in dusts)", + "stat.hexcasting.mana_overcasted": "Media overcasted (in dusts)", + "itemGroup.hexcasting": "hexcasting", + "hexcasting.spell.hexcasting:explode": "Explosion", + "hexcasting.spell.hexcasting:explode/fireball": "Fireball", + "hexcasting.spell.hexcasting:add_motion": "Impulse", + "hexcasting.spell.hexcasting:blink": "Blink", + "hexcasting.spell.hexcasting:break_block": "Break Block", + "hexcasting.spell.hexcasting:place_block": "Place Block", + "hexcasting.spell.hexcasting:make_cypher": "Craft Cypher", + "hexcasting.spell.hexcasting:make_trinket": "Craft Trinket", + "hexcasting.spell.hexcasting:make_artifact": "Craft Artifact" +} diff --git a/src/main/resources/assets/hexcasting/sounds.json b/src/main/resources/assets/hexcasting/sounds.json new file mode 100644 index 00000000..c861379b --- /dev/null +++ b/src/main/resources/assets/hexcasting/sounds.json @@ -0,0 +1,35 @@ +{ + "casting.start_pattern": { + "sounds": [ + { + "name": "hexcasting:add_line", + "volume": 1.0, + "pitch": 0.8 + } + ] + }, + "casting.add_line": { + "sounds": [ + { + "name": "hexcasting:add_line", + "volume": 0.8, + "pitch": 1.0 + } + ] + }, + "casting.add_pattern": { + "sounds": [ + "hexcasting:add_pattern" + ] + }, + "casting.ambiance": { + "sounds": [ + "hexcasting:casting_ambiance" + ] + }, + "casting.cast": { + "sounds": [ + "hexcasting:cast_hex" + ] + } +} \ No newline at end of file diff --git a/src/main/resources/assets/hex/sounds/add_line.ogg b/src/main/resources/assets/hexcasting/sounds/add_line.ogg similarity index 100% rename from src/main/resources/assets/hex/sounds/add_line.ogg rename to src/main/resources/assets/hexcasting/sounds/add_line.ogg diff --git a/src/main/resources/assets/hex/sounds/add_pattern.ogg b/src/main/resources/assets/hexcasting/sounds/add_pattern.ogg similarity index 100% rename from src/main/resources/assets/hex/sounds/add_pattern.ogg rename to src/main/resources/assets/hexcasting/sounds/add_pattern.ogg diff --git a/src/main/resources/assets/hex/sounds/cast_hex.ogg b/src/main/resources/assets/hexcasting/sounds/cast_hex.ogg similarity index 100% rename from src/main/resources/assets/hex/sounds/cast_hex.ogg rename to src/main/resources/assets/hexcasting/sounds/cast_hex.ogg diff --git a/src/main/resources/assets/hex/sounds/casting_ambiance.ogg b/src/main/resources/assets/hexcasting/sounds/casting_ambiance.ogg similarity index 100% rename from src/main/resources/assets/hex/sounds/casting_ambiance.ogg rename to src/main/resources/assets/hexcasting/sounds/casting_ambiance.ogg diff --git a/src/main/resources/assets/hex/textures/item/amethyst_dust.png b/src/main/resources/assets/hexcasting/textures/item/amethyst_dust.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/amethyst_dust.png rename to src/main/resources/assets/hexcasting/textures/item/amethyst_dust.png diff --git a/src/main/resources/assets/hex/textures/item/artifact.png b/src/main/resources/assets/hexcasting/textures/item/artifact.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/artifact.png rename to src/main/resources/assets/hexcasting/textures/item/artifact.png diff --git a/src/main/resources/assets/hex/textures/item/artifact_filled.png b/src/main/resources/assets/hexcasting/textures/item/artifact_filled.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/artifact_filled.png rename to src/main/resources/assets/hexcasting/textures/item/artifact_filled.png diff --git a/src/main/resources/assets/hex/textures/item/artifact_filled.png.mcmeta b/src/main/resources/assets/hexcasting/textures/item/artifact_filled.png.mcmeta similarity index 100% rename from src/main/resources/assets/hex/textures/item/artifact_filled.png.mcmeta rename to src/main/resources/assets/hexcasting/textures/item/artifact_filled.png.mcmeta diff --git a/src/main/resources/assets/hex/textures/item/charged_amethyst.png b/src/main/resources/assets/hexcasting/textures/item/charged_amethyst.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/charged_amethyst.png rename to src/main/resources/assets/hexcasting/textures/item/charged_amethyst.png diff --git a/src/main/resources/assets/hex/textures/item/cypher.png b/src/main/resources/assets/hexcasting/textures/item/cypher.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/cypher.png rename to src/main/resources/assets/hexcasting/textures/item/cypher.png diff --git a/src/main/resources/assets/hex/textures/item/cypher_filled.png b/src/main/resources/assets/hexcasting/textures/item/cypher_filled.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/cypher_filled.png rename to src/main/resources/assets/hexcasting/textures/item/cypher_filled.png diff --git a/src/main/resources/assets/hex/textures/item/focus_double.png b/src/main/resources/assets/hexcasting/textures/item/focus_double.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_double.png rename to src/main/resources/assets/hexcasting/textures/item/focus_double.png diff --git a/src/main/resources/assets/hex/textures/item/focus_double_sealed.png b/src/main/resources/assets/hexcasting/textures/item/focus_double_sealed.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_double_sealed.png rename to src/main/resources/assets/hexcasting/textures/item/focus_double_sealed.png diff --git a/src/main/resources/assets/hex/textures/item/focus_empty.png b/src/main/resources/assets/hexcasting/textures/item/focus_empty.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_empty.png rename to src/main/resources/assets/hexcasting/textures/item/focus_empty.png diff --git a/src/main/resources/assets/hex/textures/item/focus_empty_sealed.png b/src/main/resources/assets/hexcasting/textures/item/focus_empty_sealed.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_empty_sealed.png rename to src/main/resources/assets/hexcasting/textures/item/focus_empty_sealed.png diff --git a/src/main/resources/assets/hex/textures/item/focus_entity.png b/src/main/resources/assets/hexcasting/textures/item/focus_entity.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_entity.png rename to src/main/resources/assets/hexcasting/textures/item/focus_entity.png diff --git a/src/main/resources/assets/hex/textures/item/focus_entity_sealed.png b/src/main/resources/assets/hexcasting/textures/item/focus_entity_sealed.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_entity_sealed.png rename to src/main/resources/assets/hexcasting/textures/item/focus_entity_sealed.png diff --git a/src/main/resources/assets/hex/textures/item/focus_list.png b/src/main/resources/assets/hexcasting/textures/item/focus_list.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_list.png rename to src/main/resources/assets/hexcasting/textures/item/focus_list.png diff --git a/src/main/resources/assets/hex/textures/item/focus_list_sealed.png b/src/main/resources/assets/hexcasting/textures/item/focus_list_sealed.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_list_sealed.png rename to src/main/resources/assets/hexcasting/textures/item/focus_list_sealed.png diff --git a/src/main/resources/assets/hex/textures/item/focus_pattern.png b/src/main/resources/assets/hexcasting/textures/item/focus_pattern.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_pattern.png rename to src/main/resources/assets/hexcasting/textures/item/focus_pattern.png diff --git a/src/main/resources/assets/hex/textures/item/focus_pattern_sealed.png b/src/main/resources/assets/hexcasting/textures/item/focus_pattern_sealed.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_pattern_sealed.png rename to src/main/resources/assets/hexcasting/textures/item/focus_pattern_sealed.png diff --git a/src/main/resources/assets/hex/textures/item/focus_spell.png b/src/main/resources/assets/hexcasting/textures/item/focus_spell.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_spell.png rename to src/main/resources/assets/hexcasting/textures/item/focus_spell.png diff --git a/src/main/resources/assets/hex/textures/item/focus_spell_sealed.png b/src/main/resources/assets/hexcasting/textures/item/focus_spell_sealed.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_spell_sealed.png rename to src/main/resources/assets/hexcasting/textures/item/focus_spell_sealed.png diff --git a/src/main/resources/assets/hex/textures/item/focus_template.ase b/src/main/resources/assets/hexcasting/textures/item/focus_template.ase similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_template.ase rename to src/main/resources/assets/hexcasting/textures/item/focus_template.ase diff --git a/src/main/resources/assets/hex/textures/item/focus_template_sealed.ase b/src/main/resources/assets/hexcasting/textures/item/focus_template_sealed.ase similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_template_sealed.ase rename to src/main/resources/assets/hexcasting/textures/item/focus_template_sealed.ase diff --git a/src/main/resources/assets/hex/textures/item/focus_vec3.png b/src/main/resources/assets/hexcasting/textures/item/focus_vec3.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_vec3.png rename to src/main/resources/assets/hexcasting/textures/item/focus_vec3.png diff --git a/src/main/resources/assets/hex/textures/item/focus_vec3_sealed.png b/src/main/resources/assets/hexcasting/textures/item/focus_vec3_sealed.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_vec3_sealed.png rename to src/main/resources/assets/hexcasting/textures/item/focus_vec3_sealed.png diff --git a/src/main/resources/assets/hex/textures/item/focus_widget.png b/src/main/resources/assets/hexcasting/textures/item/focus_widget.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_widget.png rename to src/main/resources/assets/hexcasting/textures/item/focus_widget.png diff --git a/src/main/resources/assets/hex/textures/item/focus_widget_sealed.png b/src/main/resources/assets/hexcasting/textures/item/focus_widget_sealed.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/focus_widget_sealed.png rename to src/main/resources/assets/hexcasting/textures/item/focus_widget_sealed.png diff --git a/src/main/resources/assets/hex/textures/item/lens.png b/src/main/resources/assets/hexcasting/textures/item/lens.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/lens.png rename to src/main/resources/assets/hexcasting/textures/item/lens.png diff --git a/src/main/resources/assets/hex/textures/item/patchouli_book.png b/src/main/resources/assets/hexcasting/textures/item/patchouli_book.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/patchouli_book.png rename to src/main/resources/assets/hexcasting/textures/item/patchouli_book.png diff --git a/src/main/resources/assets/hex/textures/item/scroll.png b/src/main/resources/assets/hexcasting/textures/item/scroll.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/scroll.png rename to src/main/resources/assets/hexcasting/textures/item/scroll.png diff --git a/src/main/resources/assets/hex/textures/item/spellbook.png b/src/main/resources/assets/hexcasting/textures/item/spellbook.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/spellbook.png rename to src/main/resources/assets/hexcasting/textures/item/spellbook.png diff --git a/src/main/resources/assets/hex/textures/item/sub_sandwich.png b/src/main/resources/assets/hexcasting/textures/item/sub_sandwich.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/sub_sandwich.png rename to src/main/resources/assets/hexcasting/textures/item/sub_sandwich.png diff --git a/src/main/resources/assets/hex/textures/item/trinket.png b/src/main/resources/assets/hexcasting/textures/item/trinket.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/trinket.png rename to src/main/resources/assets/hexcasting/textures/item/trinket.png diff --git a/src/main/resources/assets/hex/textures/item/trinket_filled.png b/src/main/resources/assets/hexcasting/textures/item/trinket_filled.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/trinket_filled.png rename to src/main/resources/assets/hexcasting/textures/item/trinket_filled.png diff --git a/src/main/resources/assets/hex/textures/item/wand.png b/src/main/resources/assets/hexcasting/textures/item/wand.png similarity index 100% rename from src/main/resources/assets/hex/textures/item/wand.png rename to src/main/resources/assets/hexcasting/textures/item/wand.png diff --git a/src/main/resources/data/hex/advancements/grant_patchi_book.json b/src/main/resources/data/hex/advancements/grant_patchi_book.json deleted file mode 100644 index 772a9cd6..00000000 --- a/src/main/resources/data/hex/advancements/grant_patchi_book.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "criteria": { - "tick": { - "trigger": "minecraft:tick" - } - }, - "rewards": { - "loot": [ - "hex:grant_patchi_book" - ] - } -} \ No newline at end of file diff --git a/src/main/resources/data/hex/loot_tables/grant_patchi_book.json b/src/main/resources/data/hex/loot_tables/grant_patchi_book.json deleted file mode 100644 index 3e3d09d4..00000000 --- a/src/main/resources/data/hex/loot_tables/grant_patchi_book.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "type": "advancement_reward", - "pools": [ - { - "rolls": 1, - "entries": [ - { - "type": "item", - "name": "patchouli:guide_book", - "functions": [ - { - "function": "set_nbt", - "tag": "{\"patchouli:book\": \"hex:thehexbook\"}" - } - ] - } - ] - } - ] -} \ No newline at end of file diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/casting.json b/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/casting.json deleted file mode 100644 index cdf1978c..00000000 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/casting.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Hex Casting", - "icon": "hex:wand", - "description": "I've started to understand how the old masters cast their Hexes! It's a bit complicated, but I'm sure I can figure it out. Let's see...", - "sortnum": 1 -} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/items.json b/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/items.json deleted file mode 100644 index a0942a4e..00000000 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/items.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Items", - "icon": "hex:focus", - "description": "I devote this section to the magical and mysterious items I might encounter in my studies.$(br2)It seems like many of these items have uses when held alongside my staff. I suppose I will have to choose what goes in my other hand carefully.", - "sortnum": 2 -} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/patterns/spells.json b/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/patterns/spells.json deleted file mode 100644 index cedf232a..00000000 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/patterns/spells.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "Spells", - "icon": "minecraft:textures/item/enchanted_book.png", - "description": "Patterns and actions that perform a magical effect on the world.", - "parent": "hex:patterns" -} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/101.json b/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/101.json deleted file mode 100644 index cbda84c4..00000000 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/101.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "name": "Hexing 101", - "category": "hex:casting", - "icon": "hex:wand", - "advancement": "hex:root", - "priority": true, - "pages": [ - { - "type": "patchouli:text", - "text": "Casting a _Hex is quite difficult-- no wonder this art was lost to time! I'll have to re-read my notes carefully.$(br2)I can start a _Hex by pressing $(k:use) with a $(item)Staff/$ in my hand-- this will cause a hexagonal grid of dots to appear in front of me. Then I can click and drag from dot to dot to draw patterns in the _media of the grid; finishing a pattern will run its corresponding action (more on that later)." - }, - { - "type": "patchouli:text", - "text": "Once I've drawn enough patterns to cast a spell, the grid will disappear as the _media I've stored up is released. I can also press Escape if I want to quit early, if I don't mind the chance of a small mishap. (It seems that the more _media I've built up, the more likely I'll meet misfortune.)$(br2)So how do patterns work? In short:$(li)$(italic)Patterns/$ will execute...$(li)$(italic)Actions/$, which manipulate...$(li)$(italic)The Stack/$, which is a list of...$(li)$(italic)Iotas/$, which are simply units of information." - }, - { - "type": "patchouli:text", - "text": "First, $(thing)patterns/$. These are essential-- they're what I use to manipulate the _media around me. Certain patterns, when drawn, will cause $(thing)actions/$ to happen. Actions are what actually $(italic)do/$ the magic; all patterns influence _media in particular ways, and when those influences end up doing something useful, we call it an action.$(br2)_Media can be fickle; if I draw a pattern that is $(italic)not/$ a valid action, it'll usually cause a mishap." - }, - { - "type": "hex:pattern_nosig", - "header": "An Example", - "text": "It's interesting to note that the $(italic)rotation/$ of a pattern doesn't seem to matter at all. These two patterns both perform the $(action)Mind's Reflection/$, for example.", - "patterns": [{ - "startdir": "NORTH_EAST", - "signature": "qaq" - }, { - "startdir": "EAST", - "signature": "qaq", - "q": 2 - }] - }, - { - "type": "patchouli:text", - "text": "A _Hex is cast by drawing (valid) actions in sequence. Each action might do one of a few things:$(li)Gather some information about the environment, leaving it on the top of the stack;$(li)manipulate the info gathered (e.g. adding two numbers); or$(li)perform some magical effect, like summoning lightning or an explosion. (These actions are called \"spells.\")$(p)When I start casting a _Hex, it creates an empty stack. Actions manipulate the top of that stack." - }, - { - "type": "patchouli:text", - "text": "For example, the $(l:patterns/basic#OpGetCaster)$(action)Mind's Reflection/$ will create an iota representing $(italic)me/$, the caster, and add it to the top of the stack. The $(l:patterns/basic#OpentityPos)$(action)Compass Purification/$ will take the iota at the top the stack, if it represents an entity, and transform it into an iota representing that entity's location.$(br2)So, drawing those patterns in that order would result in an iota on the stack representing my position." - }, - { - "type": "patchouli:text", - "text": "$(thing)Iotas/$ can represent things like myself or my position, but there are several other types I can manipulate with $(thing)Actions$(0). Here's a comprehensive list:$(li)Numbers (which some legends called \"doubles\");$(li)Vectors, a collection of three numbers representing a position, movement, or direction in the world;" - }, - { - "type": "patchouli:text", - "text": "$(li)Entities, like myself, chickens, and minecarts;$(li)Influences, peculiar types of iota that seem to represent abstract ideas;$(li)Patterns themselves, used for crafting magic items and truly mind-boggling feats like $(italic)spells that cast other spells/$; and$(li)A list of several of the above, gathered into a single iota." - }, - { - "type": "patchouli:text", - "text": "Of course, there's no such thing as a free lunch. All spells, and certain other actions, require _media as payment.$(br2)The best I can figure, a _Hex is a little bit like a plan of action presented to Nature-- in this analogy, the _media is used to provide the arguments to back it up, so Nature will accept your plan and carry it out." - }, - { - "type": "patchouli:text", - "text": "That aside, it doesn't seem like anyone has done much research on exactly how $(italic)much/$ any particular piece of amethyst is valued. The best I can tell, an $(item)Amethyst Shard/$ is worth about five pieces of $(item)Amethyst Dust/$, and a $(item)Charged Amethyst Crystal/$ is worth about ten.$(br2)Strangely enough, it seems like no other form of amethyst is suitable to be used in the casting of a _Hex. I suspect that whole blocks or crystals are too solid to be easily unraveled into _media." - }, - { - "type": "patchouli:text", - "text": "It's also worth noting that each action will consume the _media it needs immediately, rather than all at once when the Hex finishes. Also, an action will always consume entire items-- an action that only requires one $(item)Amethyst Dust/$'s worth of _media will consume an entire $(item)Charged Amethyst Crystal/$, if that's all that's present in my inventory.$(br2)Thus, it might be a good idea to bring dust for spellcasting too-- waste not, want not..." - }, - { - "type": "patchouli:text", - "text": "I should also be careful to make sure I actually have enough Amethyst in my inventory-- if not, it seems Nature is happy to use my own mind as payment instead. The old texts describe the feeling as awful but strangely euphoric, \"[...] an effervescent dissolution into light and energy...\"$(br)Perhaps this is why all the old practitioners of the art went mad. I can't imagine burning pieces of my mind for power is $(italic)healthy/$." - }, - { - "type": "patchouli:text", - "text": "In any case, I think I could get one $(item)Charged Amethyst Crystal/$'s worth of mana from a healthy mind before I die of exertion-- not that I should make a habit of it.$(p)Even small amounts of damage, accumulated over time, can cause long-term issues, or so I've heard." - }, - { - "type": "patchouli:link", - "text": "I have also found an amusing tidbit on why so many practitioners of magic in general seem to go mad, which I may like as some light and flavorful reading not canonical to my world.$(br2)$(italic)Content Warning: some body horror and suggestive elements./$", - "link_text": "Goblin Punch", - "url": "https://goblinpunch.blogspot.com/2014/05/a-digression-about-wizards.html" - }, - { - "type": "patchouli:text", - "text": "Finally, it seems spells have a maximum range of influence, about 32 blocks from my position. Trying to affect anything outside of that will cause the spell to fail." - } - ] -} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/readers_guide.json b/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/readers_guide.json deleted file mode 100644 index dd9f8092..00000000 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/readers_guide.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "How to Read this Section", - "category": "hex:patterns", - "icon": "minecraft:knowledge_book", - "advancement": "hex:root", - "priority": true, - "pages": [ - { - "type": "patchouli:text", - "text": "I've decided to put all the valid patterns I've discovered in this section of my notebook. $(br2)When I first began my studies, I believed I would have to go on quests to the dungeons and ancient libraries of the world to discover these. However, a strange force guides my hand calling herself the \"mod developer,\" raving the strangest things about how she \"wants to get the mod out already\" and \"is sick of handwriting JSON\" and \"wonders how many levels of fourth-wall breaking we're on, anyway.\"" - }, - { - "type": "patchouli:text", - "text": "She's probably a delusion brought on by staring at hexagons too often, but I guess the patterns do work.$(p)Anyways, I've divided the actions into sections based on what they do, more or less. I've written down the stroke order of the patterns as well, shown as a point moving along the pattern. I've marked the start of the pattern with a red dot.$(br2)If an action is cast by multiple patterns, as is the case with some simple actions, I'll write them all side-by-side." - }, - { - "type": "patchouli:text", - "text": "I also write the types of iota that the action will consume or modify, a \"\u2192\", and the types of iota the action will create.$(p)For example, \"$(n)vector, number/$ \u2192 $(n)vector/$\" means the action will remove a vector and a number from the top of the stack, and then add a vector; or, put another way, will remove a number from the stack, and then modify the vector at the top of the stack. (The number needs to be on the top of the stack, with the vector right below it.)" - }, - { - "type": "patchouli:text", - "text": "\"\u2192 $(n)entity/$\" means it'll just push an entity. \"$(n)entity, vector/$ \u2192\" means it removes an entity and a vector, and doesn't push anything." - } - ] -} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/itempicking.json b/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/itempicking.json deleted file mode 100644 index e43c748e..00000000 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/itempicking.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "Working with Items", - "category": "hex:patterns/spells", - "icon": "minecraft:item_frame", - "priority": true, - "read_by_default": true, - "pages": [ - { - "type": "patchouli:text", - "text": "Certain spells, such as $(l:hex:patterns/spells/blockworks#OpPlaceBlock)$(action)Place Block/$, will consume additional items from my inventory. When this happens, the spell will first look for the item to use, and then draw from all such items in my inventory.$(br2)This process is called \"picking an item.\"" - }, - { - "type": "patchouli:text", - "text": "More specifically:$(li)First, the spell will search for the first valid item in my hotbar to the $(italic)right of my staff/$, wrapping around at the right-hand side, and starting at the first slot if my staff is in my off-hand.$(li)Second, the spell will draw that item from as $(italic)far back in my inventory/$ as possible, prioritizing the main inventory over the hotbar.$(br)This way, I can keep a \"chooser\" item on my hotbar to tell the spell what to use, and fill the rest of my inventory with that item to keep the spell well-stocked." - } - ] -} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/templates/pattern.json b/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/templates/pattern.json deleted file mode 100644 index 49e3691d..00000000 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/templates/pattern.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "components": [ - { - "type": "patchouli:header", - "text": "#header", - "x": -1, - "y": -1 - }, - { - "type": "patchouli:separator", - "x": -1, - "y": -1 - }, - { - "type": "patchouli:custom", - "class": "at.petrak.hex.interop.patchouli.PatternComponent", - "x": 58, - "y": 50, - "patterns": "#patterns", - "hex_size": "#hex_size" - }, - { - "type": "patchouli:text", - "text": "$(n)#input#/$ \u2192 $(n)#output#/$", - "y": 80 - }, - { - "type": "patchouli:text", - "text": "#text#", - "y": 89 - } - ] -} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/templates/pattern_nosig.json b/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/templates/pattern_nosig.json deleted file mode 100644 index 04049ac6..00000000 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/templates/pattern_nosig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "components": [ - { - "type": "patchouli:header", - "text": "#header", - "x": -1, - "y": -1 - }, - { - "type": "patchouli:separator", - "x": -1, - "y": -1 - }, - { - "type": "patchouli:custom", - "class": "at.petrak.hex.interop.patchouli.PatternComponent", - "x": 58, - "y": 50, - "patterns": "#patterns", - "hex_size": "#hex_size" - }, - { - "type": "patchouli:text", - "text": "#text#", - "y": 80 - } - ] -} diff --git a/src/main/resources/data/hex/recipes/patchi_book.json b/src/main/resources/data/hex/recipes/patchi_book.json deleted file mode 100644 index 66c36a3c..00000000 --- a/src/main/resources/data/hex/recipes/patchi_book.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "type": "patchouli:shapeless_book_recipe", - "ingredients": [ - { - "item": "minecraft:book" - }, - { - "item": "hex:amethyst_dust" - } - ], - "book": "hex:thehexbook" -} \ No newline at end of file diff --git a/src/main/resources/data/hexcasting/advancements/grant_patchi_book.json b/src/main/resources/data/hexcasting/advancements/grant_patchi_book.json new file mode 100644 index 00000000..e6ec5b1d --- /dev/null +++ b/src/main/resources/data/hexcasting/advancements/grant_patchi_book.json @@ -0,0 +1,12 @@ +{ + "criteria": { + "tick": { + "trigger": "minecraft:tick" + } + }, + "rewards": { + "loot": [ + "hexcasting:grant_patchi_book" + ] + } +} \ No newline at end of file diff --git a/src/main/resources/data/hexcasting/loot_tables/grant_patchi_book.json b/src/main/resources/data/hexcasting/loot_tables/grant_patchi_book.json new file mode 100644 index 00000000..a154e45b --- /dev/null +++ b/src/main/resources/data/hexcasting/loot_tables/grant_patchi_book.json @@ -0,0 +1,20 @@ +{ + "type": "advancement_reward", + "pools": [ + { + "rolls": 1, + "entries": [ + { + "type": "item", + "name": "patchouli:guide_book", + "functions": [ + { + "function": "set_nbt", + "tag": "{\"patchouli:book\": \"hexcasting:thehexbook\"}" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/book.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/book.json similarity index 92% rename from src/main/resources/data/hex/patchouli_books/thehexbook/book.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/book.json index ff8e4941..77ef0e8c 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/book.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/book.json @@ -2,7 +2,7 @@ "name": "Hex Notebook", "landing_text": "I seem to have discovered a new method of magical arts, in which one draws patterns strange and wild onto a hexagonal grid. It fascinates me. I've decided to start a journal of my thoughts and findings.", "version": 1, - "model": "hex:patchouli_book", + "model": "hexcasting:patchouli_book", "book_texture": "patchouli:textures/gui/book_purple.png", "macros": { "$(thing)": "$(#8d6acc)", @@ -12,4 +12,4 @@ "_Hex": "$(#b38ef3)Hex/$", "_Hexes": "$(#b38ef3)Hexes/$" } -} \ No newline at end of file +} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/basics.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/basics.json similarity index 100% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/basics.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/basics.json diff --git a/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/casting.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/casting.json new file mode 100644 index 00000000..5cdd88e5 --- /dev/null +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/casting.json @@ -0,0 +1,6 @@ +{ + "name": "Hex Casting", + "icon": "hexcasting:wand", + "description": "I've started to understand how the old masters cast their Hexes! It's a bit complicated, but I'm sure I can figure it out. Let's see...", + "sortnum": 1 +} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/greatwork.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/greatwork.json similarity index 100% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/greatwork.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/greatwork.json diff --git a/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/items.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/items.json new file mode 100644 index 00000000..dfd5f4d3 --- /dev/null +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/items.json @@ -0,0 +1,6 @@ +{ + "name": "Items", + "icon": "hexcasting:focus", + "description": "I devote this section to the magical and mysterious items I might encounter in my studies.$(br2)It seems like many of these items have uses when held alongside my staff. I suppose I will have to choose what goes in my other hand carefully.", + "sortnum": 2 +} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/patterns.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/patterns.json similarity index 100% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/categories/patterns.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/patterns.json diff --git a/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/patterns/spells.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/patterns/spells.json new file mode 100644 index 00000000..33099912 --- /dev/null +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/categories/patterns/spells.json @@ -0,0 +1,6 @@ +{ + "name": "Spells", + "icon": "minecraft:textures/item/enchanted_book.png", + "description": "Patterns and actions that perform a magical effect on the world.", + "parent": "hexcasting:patterns" +} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/basics/geodes.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/basics/geodes.json similarity index 94% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/basics/geodes.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/basics/geodes.json index 1594f039..2d28d1e9 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/basics/geodes.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/basics/geodes.json @@ -1,9 +1,9 @@ { "name": "Geodes", "icon": "minecraft:budding_amethyst", - "category": "hex:basics", + "category": "hexcasting:basics", "sortnum": 2, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:text", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/basics/media.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/basics/media.json similarity index 94% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/basics/media.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/basics/media.json index 0282bb38..b73d8e86 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/basics/media.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/basics/media.json @@ -1,7 +1,7 @@ { "name": "Media", - "icon": "hex:amethyst_dust", - "category": "hex:basics", + "icon": "hexcasting:amethyst_dust", + "category": "hexcasting:basics", "priority": true, "pages": [ { diff --git a/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/101.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/101.json new file mode 100644 index 00000000..fd187eb0 --- /dev/null +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/101.json @@ -0,0 +1,83 @@ +{ + "name": "Hexing 101", + "category": "hexcasting:casting", + "icon": "hexcasting:wand", + "advancement": "hexcasting:root", + "priority": true, + "pages": [ + { + "type": "patchouli:text", + "text": "Casting a _Hex is quite difficult-- no wonder this art was lost to time! I'll have to re-read my notes carefully.$(br2)I can start a _Hex by pressing $(k:use) with a $(item)Staff/$ in my hand-- this will cause a hexagonal grid of dots to appear in front of me. Then I can click and drag from dot to dot to draw patterns in the _media of the grid; finishing a pattern will run its corresponding action (more on that later)." + }, + { + "type": "patchouli:text", + "text": "Once I've drawn enough patterns to cast a spell, the grid will disappear as the _media I've stored up is released. I can also press Escape if I want to quit early, if I don't mind the chance of a small mishap. (It seems that the more _media I've built up, the more likely I'll meet misfortune.)$(br2)So how do patterns work? In short:$(li)$(italic)Patterns/$ will execute...$(li)$(italic)Actions/$, which manipulate...$(li)$(italic)The Stack/$, which is a list of...$(li)$(italic)Iotas/$, which are simply units of information." + }, + { + "type": "patchouli:text", + "text": "First, $(thing)patterns/$. These are essential-- they're what I use to manipulate the _media around me. Certain patterns, when drawn, will cause $(thing)actions/$ to happen. Actions are what actually $(italic)do/$ the magic; all patterns influence _media in particular ways, and when those influences end up doing something useful, we call it an action.$(br2)_Media can be fickle; if I draw a pattern that is $(italic)not/$ a valid action, it'll usually cause a mishap." + }, + { + "type": "hexcasting:pattern_nosig", + "header": "An Example", + "text": "It's interesting to note that the $(italic)rotation/$ of a pattern doesn't seem to matter at all. These two patterns both perform the $(action)Mind's Reflection/$, for example.", + "patterns": [ + { + "startdir": "NORTH_EAST", + "signature": "qaq" + }, + { + "startdir": "EAST", + "signature": "qaq", + "q": 2 + } + ] + }, + { + "type": "patchouli:text", + "text": "A _Hex is cast by drawing (valid) actions in sequence. Each action might do one of a few things:$(li)Gather some information about the environment, leaving it on the top of the stack;$(li)manipulate the info gathered (e.g. adding two numbers); or$(li)perform some magical effect, like summoning lightning or an explosion. (These actions are called \"spells.\")$(p)When I start casting a _Hex, it creates an empty stack. Actions manipulate the top of that stack." + }, + { + "type": "patchouli:text", + "text": "For example, the $(l:patterns/basics#OpGetCaster)$(action)Mind's Reflection/$ will create an iota representing $(italic)me/$, the caster, and add it to the top of the stack. The $(l:patterns/basics#OpentityPos)$(action)Compass Purification/$ will take the iota at the top the stack, if it represents an entity, and transform it into an iota representing that entity's location.$(br2)So, drawing those patterns in that order would result in an iota on the stack representing my position." + }, + { + "type": "patchouli:text", + "text": "$(thing)Iotas/$ can represent things like myself or my position, but there are several other types I can manipulate with $(thing)Actions$(0). Here's a comprehensive list:$(li)Numbers (which some legends called \"doubles\");$(li)Vectors, a collection of three numbers representing a position, movement, or direction in the world;" + }, + { + "type": "patchouli:text", + "text": "$(li)Entities, like myself, chickens, and minecarts;$(li)Influences, peculiar types of iota that seem to represent abstract ideas;$(li)Patterns themselves, used for crafting magic items and truly mind-boggling feats like $(italic)spells that cast other spells/$; and$(li)A list of several of the above, gathered into a single iota." + }, + { + "type": "patchouli:text", + "text": "Of course, there's no such thing as a free lunch. All spells, and certain other actions, require _media as payment.$(br2)The best I can figure, a _Hex is a little bit like a plan of action presented to Nature-- in this analogy, the _media is used to provide the arguments to back it up, so Nature will accept your plan and carry it out." + }, + { + "type": "patchouli:text", + "text": "That aside, it doesn't seem like anyone has done much research on exactly how $(italic)much/$ any particular piece of amethyst is valued. The best I can tell, an $(item)Amethyst Shard/$ is worth about five pieces of $(item)Amethyst Dust/$, and a $(item)Charged Amethyst Crystal/$ is worth about ten.$(br2)Strangely enough, it seems like no other form of amethyst is suitable to be used in the casting of a _Hex. I suspect that whole blocks or crystals are too solid to be easily unraveled into _media." + }, + { + "type": "patchouli:text", + "text": "It's also worth noting that each action will consume the _media it needs immediately, rather than all at once when the Hex finishes. Also, an action will always consume entire items-- an action that only requires one $(item)Amethyst Dust/$'s worth of _media will consume an entire $(item)Charged Amethyst Crystal/$, if that's all that's present in my inventory.$(br2)Thus, it might be a good idea to bring dust for spellcasting too-- waste not, want not..." + }, + { + "type": "patchouli:text", + "text": "I should also be careful to make sure I actually have enough Amethyst in my inventory-- if not, it seems Nature is happy to use my own mind as payment instead. The old texts describe the feeling as awful but strangely euphoric, \"[...] an effervescent dissolution into light and energy...\"$(br)Perhaps this is why all the old practitioners of the art went mad. I can't imagine burning pieces of my mind for power is $(italic)healthy/$." + }, + { + "type": "patchouli:text", + "text": "In any case, I think I could get one $(item)Charged Amethyst Crystal/$'s worth of mana from a healthy mind before I die of exertion-- not that I should make a habit of it.$(p)Even small amounts of damage, accumulated over time, can cause long-term issues, or so I've heard." + }, + { + "type": "patchouli:link", + "text": "I have also found an amusing tidbit on why so many practitioners of magic in general seem to go mad, which I may like as some light and flavorful reading not canonical to my world.$(br2)$(italic)Content Warning: some body horror and suggestive elements./$", + "link_text": "Goblin Punch", + "url": "https://goblinpunch.blogspot.com/2014/05/a-digression-about-wizards.html" + }, + { + "type": "patchouli:text", + "text": "Finally, it seems spells have a maximum range of influence, about 32 blocks from my position. Trying to affect anything outside of that will cause the spell to fail." + } + ] +} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/influences.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/influences.json similarity index 92% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/influences.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/influences.json index 74a3e921..84a21304 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/influences.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/influences.json @@ -1,9 +1,9 @@ { "name": "Influences", - "category": "hex:casting", + "category": "hexcasting:casting", "icon": "minecraft:spyglass", "sortnum": 3, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:text", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/mishaps.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/mishaps.json similarity index 93% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/mishaps.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/mishaps.json index 718dc933..87bcf2a9 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/mishaps.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/mishaps.json @@ -1,10 +1,10 @@ { "name": "Mishaps", - "category": "hex:casting", + "category": "hexcasting:casting", "icon": "minecraft:textures/mob_effect/poison.png", "priority": "true", "sortnum": 2, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:text", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/naming.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/naming.json similarity index 94% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/naming.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/naming.json index e46ebfca..6c4696c1 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/naming.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/naming.json @@ -1,9 +1,9 @@ { "name": "Naming Actions", - "category": "hex:casting", + "category": "hexcasting:casting", "icon": "minecraft:name_tag", "sortnum": 2, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:text", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/patterns_as_iotas.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/patterns_as_iotas.json similarity index 93% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/patterns_as_iotas.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/patterns_as_iotas.json index 42e961d9..4907d8b6 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/patterns_as_iotas.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/patterns_as_iotas.json @@ -1,9 +1,9 @@ { "name": "Patterns as Iotas", - "category": "hex:casting", + "category": "hexcasting:casting", "icon": "minecraft:emerald", "sortnum": 3, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:text", @@ -14,7 +14,7 @@ "text": "Fortunately, Nature has provided me with a set of $(l:casting/influences)influences/$ that I can use to work with patterns directly.$(br2)In short, $(action)Consideration/$ lets me add one pattern to the stack, and $(action)Introspection/$ and $(action)Retrospection/$ let me add a whole list." }, { - "type": "hex:pattern_nosig", + "type": "hexcasting:pattern_nosig", "header": "Consideration", "anchor": "OpEscape", "text": "To use $(action)Consideration/$, I draw it, then another arbitrary pattern. That second pattern is added to the stack.", @@ -28,7 +28,7 @@ "text": "I may find it helpful to think of this as \"escaping\" the pattern onto the stack, if I happen to be familiar with the term from computer science.$(br2)To be honest, I haven't found too much use for this pattern yet, but I imagine it could be helpful with advanced _Hexes casting other _Hexes." }, { - "type": "hex:pattern_nosig", + "type": "hexcasting:pattern_nosig", "header": "Introspection", "anchor": "OpOpenParen", "text": "Drawing $(action)Introspection/$ makes my drawing of patterns act differently, for a time. Until I draw $(action)Retrospection/$, any pattern I draw is saved to a list. Then, when I draw $(action)Retrospection/$, the list is pushed to the stack as a list iota.", @@ -38,7 +38,7 @@ } }, { - "type": "hex:pattern_nosig", + "type": "hexcasting:pattern_nosig", "header": "Retrospection", "anchor": "OpCloseParen", "text": "If I draw another $(action)Introspection/$, it will still be saved, but I'll then have to draw $(italic)two/$ $(action)Retrospection/$s to get back to normal casting.", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/stack.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/stack.json similarity index 96% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/stack.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/stack.json index 2397de44..d00ace9f 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/stack.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/stack.json @@ -1,9 +1,9 @@ { "name": "Stacks", - "category": "hex:casting", + "category": "hexcasting:casting", "icon": "minecraft:piston", "sortnum": 1, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:text", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/start_to_see.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/start_to_see.json similarity index 95% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/start_to_see.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/start_to_see.json index a9adea19..d83860cb 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/start_to_see.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/start_to_see.json @@ -1,10 +1,10 @@ { "name": "WHAT DID I SEE", - "category": "hex:casting", + "category": "hexcasting:casting", "icon": "minecraft:textures/mob_effect/blindness.png", "priority": true, "sortnum": 3, - "advancement": "hex:opened_eyes", + "advancement": "hexcasting:opened_eyes", "pages": [ { "type": "patchouli:text", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/vectors.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/vectors.json similarity index 94% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/vectors.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/vectors.json index 835b2275..5decf06c 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/casting/vectors.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/casting/vectors.json @@ -1,10 +1,10 @@ { "name": "A Primer on Vectors", - "category": "hex:casting", + "category": "hexcasting:casting", "icon": "minecraft:arrow", "priority": true, "sortnum": 1, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:link", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/greatwork/patterns.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/patterns.json similarity index 90% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/greatwork/patterns.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/patterns.json index bc0723f6..4d734983 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/greatwork/patterns.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/patterns.json @@ -1,13 +1,13 @@ { "name": "Great Spells", - "category": "hex:greatwork", + "category": "hexcasting:greatwork", "icon": "minecraft:textures/mob_effect/conduit_power.png", "sortnum": 0, - "advancement": "hex:enlightenment", + "advancement": "hexcasting:enlightenment", "entry_color": "54398a", "pages": [ { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Flight", "anchor": "OpFlight", "input": "entity, number, number", @@ -23,7 +23,7 @@ "text": "The entity (which must be a player) will receive the power of flight. The first number is the number of seconds they may fly for, and the second number is the radius of the zone they may fly in. If the recipient exits that zone, or their timer runs out while midair, the gravity that they spurned will get its revenge. Painfully.$(br2)It costs approximately 1 $(item)Amethyst Dust/$ multiplied by the radius, per second of flight." }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Smite", "anchor": "OpLightning", "input": "vector", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/greatwork/the_work.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/the_work.json similarity index 63% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/greatwork/the_work.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/the_work.json index f50d8d6c..2c65812f 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/greatwork/the_work.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/the_work.json @@ -1,9 +1,9 @@ { "name": "The Work", - "category": "hex:greatwork", + "category": "hexcasting:greatwork", "icon": "minecraft:nether_star", "priority": true, - "advancement": "hex:enlightenment", + "advancement": "hexcasting:enlightenment", "entry_color": "54398a", "pages": [ { @@ -12,7 +12,7 @@ }, { "type": "patchouli:text", - "text": "I have seen staccato-needle patterns and acrid-etched schematics written to the inside of my eyelids. They smolder there, dancing, taunting, aching. I am posessed by an intense need to draw them, create them, form them, liberate them from the gluey shackles of my mortal mind, present them in their Glory to the world so all can see them. All will see. All will see." + "text": "I have seen staccato-needle patterns and acrid-etched schematics written to the inside of my eyelids. They smolder there, dancing, taunting, aching. I am possessed by an intense need to draw them, create them, form them, liberate them from the gluey shackles of my mortal mind, present them in their Glory to the world so all can see them. All will see. All will see." } ] } diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/amethyst.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/amethyst.json similarity index 90% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/amethyst.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/amethyst.json index 6456420f..6405648e 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/amethyst.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/amethyst.json @@ -1,14 +1,14 @@ { "name": "Amethyst", "icon": "minecraft:amethyst_shard", - "category": "hex:items", + "category": "hexcasting:items", "priority": true, "sortnum": 0, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:spotlight", - "item": "hex:amethyst_dust", + "item": "hexcasting:amethyst_dust", "anchor": "dust", "link_recipe": true, "text": "It seems that I'll find three different forms of amethyst when breaking a crystal inside a geode. The smallest denomination seems to be a small pile of shimmering dust, worth a relatively small amount of _media." @@ -22,7 +22,7 @@ }, { "type": "patchouli:spotlight", - "item": "hex:charged_amethyst", + "item": "hexcasting:charged_amethyst", "anchor": "charged", "link_recipe": true, "text": "Finally, I'll rarely find a large crystal crackling with energy. This has about as much _media inside as ten units of $(item)Amethyst Dust/$s (or two $(item)Amethyst Shard/$s)." diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/focus.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/focus.json similarity index 91% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/focus.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/focus.json index e15da68b..e55eb5fa 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/focus.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/focus.json @@ -1,9 +1,9 @@ { "name": "Focus", - "icon": "hex:focus", - "category": "hex:items", + "icon": "hexcasting:focus", + "category": "hexcasting:items", "sortnum": 2, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:text", @@ -11,7 +11,7 @@ }, { "type": "patchouli:crafting", - "recipe": "hex:focus", + "recipe": "hexcasting:focus", "text": "$(italic)Poison apples, poison worms./$" }, { diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/hexcasting.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/hexcasting.json similarity index 92% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/hexcasting.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/hexcasting.json index a09ed8ef..08fa4eca 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/hexcasting.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/hexcasting.json @@ -1,9 +1,9 @@ { "name": "Hexcasting Items", - "category": "hex:items", - "icon": "hex:artifact{patterns:[]}", + "category": "hexcasting:items", + "icon": "hexcasting:artifact{patterns:[]}", "sortnum": 4, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:text", @@ -28,13 +28,13 @@ { "type": "patchouli:crafting", "anchor": "cypher_trinket", - "recipe": "hex:cypher", - "recipe2": "hex:trinket" + "recipe": "hexcasting:cypher", + "recipe2": "hexcasting:trinket" }, { "type": "patchouli:crafting", "anchor": "artifact", - "recipe": "hex:artifact", + "recipe": "hexcasting:artifact", "text": "$(italic)We have a saying in our field: \"Magic isn't\". It doesn't \"just work,\" it doesn't respond to your thoughts, you can't throw fireballs or create a roast dinner from thin air or turn a bunch of muggers into frogs and snails./$" } ] diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/lens.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/lens.json similarity index 82% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/lens.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/lens.json index 1d353abb..ce855921 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/lens.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/lens.json @@ -1,8 +1,8 @@ { "name": "Scrying Lens", - "icon": "hex:lens", - "category": "hex:items", - "advancement": "hex:root", + "icon": "hexcasting:lens", + "category": "hexcasting:items", + "advancement": "hexcasting:root", "sortnum": 1, "pages": [ { @@ -11,7 +11,7 @@ }, { "type": "patchouli:crafting", - "recipe": "hex:lens", + "recipe": "hexcasting:lens", "text": "$(italic)You must learn... to see what you are looking at./$" } ] diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/spellbook.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/spellbook.json similarity index 82% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/spellbook.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/spellbook.json index 56a09ea9..e851f873 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/spellbook.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/spellbook.json @@ -1,9 +1,9 @@ { "name": "Spellbook", - "category": "hex:items", - "icon": "hex:spellbook", + "category": "hexcasting:items", + "icon": "hexcasting:spellbook", "sortnum": 3, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:text", @@ -11,7 +11,7 @@ }, { "type": "patchouli:crafting", - "recipe": "hex:spellbook", + "recipe": "hexcasting:spellbook", "text": "$(italic)Wizards love words. Most of them read a great deal, and indeed one strong sign of a potential wizard is the inability to get to sleep without reading something first." } ] diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/staff.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/staff.json similarity index 80% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/staff.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/staff.json index 1b3ad94f..c230bcdd 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/items/staff.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/items/staff.json @@ -1,10 +1,10 @@ { "name": "Staff", - "icon": "hex:wand", - "category": "hex:items", + "icon": "hexcasting:wand", + "category": "hexcasting:items", "priority": true, "sortnum": 1, - "advancement": "hex:root", + "advancement": "hexcasting:root", "pages": [ { "type": "patchouli:text", @@ -12,7 +12,7 @@ }, { "type": "patchouli:crafting", - "recipe": "hex:wand", + "recipe": "hexcasting:wand", "text": "$(italic)Don't fight; flame, light; ignite; burn bright./$" } ] diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/basics.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/basics.json similarity index 92% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/basics.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/basics.json index b678f768..80e0db79 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/basics.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/basics.json @@ -1,13 +1,13 @@ { "name": "Basic Patterns", - "category": "hex:patterns", + "category": "hexcasting:patterns", "icon": "minecraft:wooden_pickaxe", "sortnum": 0, - "advancement": "hex:root", + "advancement": "hexcasting:root", "read_by_default": true, "pages": [ { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Mind's Reflection", "anchor": "OpGetCaster", "input": "", @@ -26,7 +26,7 @@ ] }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Compass Purification", "anchor": "OpEntityPos", "input": "entity", @@ -45,7 +45,7 @@ ] }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Alidade Purification", "anchor": "OpEntityLook", "input": "entity", @@ -65,7 +65,7 @@ ] }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Examine", "anchor": "OpPrint", "input": "any", @@ -84,7 +84,7 @@ ] }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Archer's Distillation", "anchor": "OpBlockRaycast", "input": "vector, vector", @@ -100,7 +100,7 @@ "text": "If it doesn't hit anything, the vectors will combine into Null.$(br2)For example, casting this with my own position and look vectors will return the coordinates of the block I am looking at." }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Architect's Distillation", "anchor": "OpBlockAxisRaycast", "input": "vector, vector", @@ -116,7 +116,7 @@ "text": "More specifically, it returns the $(italic)normal vector/$ of the face hit, or a vector with length 1 pointing perpendicular to the face.$(li)If I am looking at a floor, it will return (0, 1, 0).$(li)If I am looking at the south face of a block, it will return (0, 0, 1).$(br)" }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Scout's Distillation", "anchor": "OpEntityRaycast", "input": "vector, vector", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/consts.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/consts.json similarity index 89% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/consts.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/consts.json index bdf123e6..2eccec15 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/consts.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/consts.json @@ -1,13 +1,13 @@ { "name": "Constants", - "category": "hex:patterns", + "category": "hexcasting:patterns", "icon": "minecraft:bedrock", "sortnum": 3, - "advancement": "hex:root", + "advancement": "hexcasting:root", "read_by_default": true, "pages": [ { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Axial Reflection +X/-X", "input": "", "output": "vector", @@ -24,7 +24,7 @@ }] }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Axial Reflection +Y/-Y", "input": "", "output": "vector", @@ -41,7 +41,7 @@ }] }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Axial Reflection +Z/-Z", "input": "", "output": "vector", @@ -58,7 +58,7 @@ }] }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Nullary Reflection", "input": "", "output": "influence", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/entities.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/entities.json similarity index 90% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/entities.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/entities.json index 96ec8fff..871e1729 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/entities.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/entities.json @@ -1,13 +1,13 @@ { "name": "Entities", - "category": "hex:patterns", + "category": "hexcasting:patterns", "icon": "minecraft:pig_spawn_egg", "sortnum": 4, - "advancement": "hex:root", + "advancement": "hexcasting:root", "read_by_default": true, "pages": [ { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Entity Purification", "anchor": "OpGetEntityAt", "input": "vector", @@ -19,7 +19,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Entity Prfn.: Animal", "anchor": "OpGetEntityAtAnimal", "input": "vector", @@ -31,7 +31,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Entity Prfn.: Monster", "anchor": "OpGetEntityAtMonster", "input": "vector", @@ -43,7 +43,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Entity Prfn.: Item", "anchor": "OpGetEntityAtItem", "input": "vector", @@ -55,7 +55,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Entity Prfn.: Player", "anchor": "OpGetEntityAtPlayer", "input": "vector", @@ -67,7 +67,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Entity Prfn.: Living", "anchor": "OpGetEntityAtLiving", "input": "vector", @@ -79,7 +79,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Zone Dstln.: Animal", "anchor": "OpGetEntitiesByAnimal", "input": "vector, number", @@ -91,7 +91,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Zone Dstln.: Non-Animal", "anchor": "OpGetEntitiesByAnimalNot", "input": "vector, number", @@ -103,7 +103,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Zone Dstln.: Monster", "anchor": "OpGetEntitiesByMonster", "input": "vector, number", @@ -115,7 +115,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Zone Dstln.: Non-Monster", "anchor": "OpGetEntitiesByMonsterNot", "input": "vector, number", @@ -127,7 +127,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Zone Dstln.: Item", "anchor": "OpGetEntitiesByItem", "input": "vector, number", @@ -139,7 +139,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Zone Dstln.: Non-Item", "anchor": "OpGetEntitiesByItemNot", "input": "vector, number", @@ -151,7 +151,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Zone Dstln.: Player", "anchor": "OpGetEntitiesByPlayer", "input": "vector, number", @@ -163,7 +163,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Zone Dstln.: Non-Player", "anchor": "OpGetEntitiesByPkaterNot", "input": "vector, number", @@ -175,7 +175,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Zone Dstln.: Living", "anchor": "OpGetEntitiesByLiving", "input": "vector, number", @@ -187,7 +187,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Zone Dstln.: Non-Living", "anchor": "OpGetEntitiesByLivingNot", "input": "vector, number", @@ -199,7 +199,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Zone Dstln.: Any", "anchor": "OpGetEntitiesBy", "input": "vector, number", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/lists.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json similarity index 87% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/lists.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json index a0e5435d..3edf1e3f 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/lists.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/lists.json @@ -1,13 +1,13 @@ { "name": "List Manipulation", - "category": "hex:patterns", + "category": "hexcasting:patterns", "icon": "minecraft:oak_sign", "sortnum": 5, - "advancement": "hex:root", + "advancement": "hexcasting:root", "read_by_default": true, "pages": [ { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Selection Distillation", "anchor": "OpIndex", "input": "list, number", @@ -19,7 +19,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Integration Distillation", "anchor": "OpAppend", "input": "list, any", @@ -31,7 +31,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Combination Distillation", "anchor": "OpConcat", "input": "list, list", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/math.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json similarity index 93% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/math.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json index 4d08e24c..96e1986b 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/math.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/math.json @@ -1,9 +1,9 @@ { "name": "Math", - "category": "hex:patterns", + "category": "hexcasting:patterns", "icon": "minecraft:stick", "sortnum": 2, - "advancement": "hex:root", + "advancement": "hexcasting:root", "read_by_default": true, "pages": [ { @@ -14,7 +14,7 @@ "type": "patchouli:empty" }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Additive Distillation", "anchor": "OpAdd", "input": "num/vec, num/vec", @@ -30,7 +30,7 @@ "text": "As such:$(li)With two numbers at the top of the stack, combines them into their sum.$(li)With a number and a vector, removes the number from the stack and adds it to each element of the vector.$(li)With two vectors, combines them by summing corresponding components into a new vector (i.e. [1, 2, 3] + [0, 4, -1] = [1, 6, 2])." }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Subtractive Dstln.", "anchor": "OpSub", "input": "num/vec, num/vec", @@ -46,7 +46,7 @@ "text": "As such:$(li)With two numbers at the top of the stack, combines them into their difference.$(li)With a number and a vector, removes the number from the stack and subtracts it from each element of the vector.$(li)With two vectors, combines them by subtracting each component.$(br2)In all cases, the top of the stack or its components are subtracted $(italic)from/$ the second-from-the-top." }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Multiplicative Dstln.", "anchor": "OpMulDot", "input": "num/vec, num/vec", @@ -62,7 +62,7 @@ "text": "As such:$(li)With two numbers, combines them into their product.$(li)With a number and a vector, removes the number from the stack and multiplies each component of the vector by that number.$(li)With two vectors, combines them into their $(l:https://www.mathsisfun.com/algebra/vectors-dot-product.html)dot product/$." }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Division Dstln.", "anchor": "OpDivCross", "input": "num/vec, num/vec", @@ -78,7 +78,7 @@ "text": "As such:$(li)With two numbers, combines them into their quotient.$(li)With a number and a vector, removes the number and divides it by each element of the vector.$(li)With two vectors, combines them into their $(l:https://www.mathsisfun.com/algebra/vectors-cross-product.html)cross product/$.$(br2)In the first and second cases, the top of the stack or its components comprise the dividend, and the second-from-the-top or its components are the divisor.$(p)WARNING: Never divide by zero!" }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Length Dstln.", "anchor": "OpAbsLen", "input": "num/vec", @@ -94,7 +94,7 @@ "text": "Replaces a number with its absolute value, or a vector with its length." }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Power Distillation", "anchor": "OpPowProj", "input": "num/vec, num/vec", @@ -110,7 +110,7 @@ "text": "$(li)With two numbers, combines them by raising the first to the power of the second.$(li)With a number and a vector, removes the number and raises each component of the vector to the number's power.$(li)With two vectors, combines them into the $(l:https://en.wikipedia.org/wiki/Vector_projection)vector projection/$ of the top of the stack onto the second-from-the-top.$(br2)In the first and second cases, the first argument or its components are the base, and the second argument or its components are the exponent." }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Vector Exaltation", "anchor": "OpConstructVec", "input": "num, num, num", @@ -122,7 +122,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Vector Disintegration", "anchor": "OpDeconstructVec", "input": "vector", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/meta.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/meta.json similarity index 91% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/meta.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/meta.json index 50c629f1..8019cbe6 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/meta.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/meta.json @@ -1,13 +1,13 @@ { "name": "Meta-evaluation", - "category": "hex:patterns", + "category": "hexcasting:patterns", "icon": "minecraft:shulker_box", "sortnum": 6, - "advancement": "hex:root", + "advancement": "hexcasting:root", "read_by_default": true, "pages": [ { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Scribe's Gambit", "anchor": "OpWrite", "input": "any", @@ -19,7 +19,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Scribe's Reflection", "anchor": "OpRead", "input": "", @@ -31,7 +31,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Hermes' Gambit", "anchor": "OpEval", "input": "list of patterns", @@ -47,7 +47,7 @@ "text": "This can be $(italic)very/$ powerful in tandem with $(l:items/focus)$(item)Foci/$.$(br2)It also makes the bureaucracy of Nature a \"Turing-complete\" system, according to one esoteric scroll I found.$(br2)However, it seems there's a limit to how many times a _Hex can cast itself-- Nature doesn't look kindly on runaway spells!" }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Thoth's Gambit", "anchor": "OpEval", "input": "list of patterns, list", diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/numbers.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/numbers.json similarity index 87% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/numbers.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/numbers.json index 7f1b9044..539d72cb 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/numbers.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/numbers.json @@ -1,13 +1,13 @@ { "name": "Numbers", - "category": "hex:patterns", + "category": "hexcasting:patterns", "icon": "minecraft:comparator", "sortnum": 1, - "advancement": "hex:root", + "advancement": "hexcasting:root", "read_by_default": true, "pages": [ { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Numerical Reflection", "anchor": "Numbers", "input": "", @@ -28,7 +28,7 @@ "text": "First, I draw one of the two shapes shown on the other page. Next, the $(italic)angles/$ following will modify a running count starting at 0.$(li)Forward: Add 1$(li)Left: Add 5$(li)Right: Add 10$(li)Sharp Left: Multiply by 2$(li)Sharp Right: Divide by 2.$(br)The clockwise version of the pattern, on the right of the other page, will negate the value at the very end. (The left-hand counter-clockwise version keeps the number positive).$(p)Once I finish drawing, the number's pushed to the top of the stack." }, { - "type": "hex:pattern_nosig", + "type": "hexcasting:pattern_nosig", "header": "Example 1", "text": "This pattern pushes 10.", "patterns": { @@ -37,7 +37,7 @@ } }, { - "type": "hex:pattern_nosig", + "type": "hexcasting:pattern_nosig", "header": "Example 2", "text": "This pattern pushes 7: 5 + 1 + 1.", "patterns": { @@ -46,7 +46,7 @@ } }, { - "type": "hex:pattern_nosig", + "type": "hexcasting:pattern_nosig", "header": "Example 3", "text": "This pattern pushes -32: negate 1 + 5 + 10 * 2.", "patterns": { @@ -55,7 +55,7 @@ } }, { - "type": "hex:pattern_nosig", + "type": "hexcasting:pattern_nosig", "header": "Example 4", "text": "This pattern pushes 4.5: 5 / 2 + 1 + 1.", "patterns": { diff --git a/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/readers_guide.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/readers_guide.json new file mode 100644 index 00000000..52d279f5 --- /dev/null +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/readers_guide.json @@ -0,0 +1,27 @@ +{ + "name": "How to Read this Section", + "category": "hexcasting:patterns", + "icon": "minecraft:knowledge_book", + "advancement": "hexcasting:root", + "priority": true, + "pages": [ + { + "type": "patchouli:text", + "text": "I've divided all the valid patterns I've found into sections based on what they do, more or less. I've written down the stroke order of the patterns as well, if I managed to find it in my studies, with the start of the pattern marked with a red dot.$(br2)If an action is cast by multiple patterns, as is the case with some simple actions, I'll write them all side-by-side." + }, + { + "type": "patchouli:spotlight", + "item": "hexcasting:scroll", + "link_recipe": true, + "text": "For many patterns, however, I was $(italic)not/$ able to find the stroke order, just the shape. I suspect the order to draw them in are out there, locked away in the ancient libraries and dungeons of the world.$(br2)In such cases I just draw the pattern without any information on the order to draw it in." + }, + { + "type": "patchouli:text", + "text": "I also write the types of iota that the action will consume or modify, a \"\u2192\", and the types of iota the action will create.$(p)For example, \"$(n)vector, number/$ \u2192 $(n)vector/$\" means the action will remove a vector and a number from the top of the stack, and then add a vector; or, put another way, will remove a number from the stack, and then modify the vector at the top of the stack. (The number needs to be on the top of the stack, with the vector right below it.)" + }, + { + "type": "patchouli:text", + "text": "\"\u2192 $(n)entity/$\" means it'll just push an entity. \"$(n)entity, vector/$ \u2192\" means it removes an entity and a vector, and doesn't push anything." + } + ] +} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/basic.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/basic.json similarity index 80% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/basic.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/basic.json index 7903be7c..60c402d9 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/basic.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/basic.json @@ -1,18 +1,19 @@ { "name": "Basic Spells", - "category": "hex:patterns/spells", + "category": "hexcasting:patterns/spells", "icon": "minecraft:bookshelf", "sortnum": 0, - "advancement": "hex:root", + "advancement": "hexcasting:root", "read_by_default": true, "pages": [ { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Explosion", "anchor": "OpExplode", "input": "vector, number", "output": "", "text": "Remove a number and vector from the stack, then create an explosion at the given location with the given power.", + "stroke_order": false, "patterns": { "startdir": "EAST", "signature": "aawaawaa" @@ -23,43 +24,46 @@ "text": "A power of 3 is about as much as a Creeper's blast; 4 is about as much as a TNT blast. Nature refuses to give me a blast of more than 10 power, though.$(br2)Costs about one $(item)Amethyst Shard/$, plus an extra $(item)Amethyst Shard/$ per point of explosion power." }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Fireball", "anchor": "OpExplodeFire", "input": "vector, number", "output": "", + "stroke_order": false, "text": "Remove a number and vector from the stack, then create a fiery explosion at the given location with the given power.", "patterns": { "startdir": "EAST", - "signature": "ddwddwdd" + "signature": "aawqaqwaa" } }, { "type": "patchouli:text", - "text": "Costs three $(item)Amethyst Shards/$, plus about one extra $(item)Amethyst Shard/$ per point of explosion power. Otherwise, the same as $(l:hex:patterns/spells/basic#OpExplode)$(action)Explosion/$, except with fire." + "text": "Costs three $(item)Amethyst Shards/$, plus about one extra $(item)Amethyst Shard/$ per point of explosion power. Otherwise, the same as $(l:hexcasting:patterns/spells/basic#OpExplode)$(action)Explosion/$, except with fire." }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Impulse", "anchor": "OpAddMotion", "input": "entity, vector", "output": "", + "stroke_order": false, "text": "Remove an entity and direction from the stack, then give a push to the given entity in the given direction. The strength of the impulse is determined by the length of the vector.$(br)Costs units of $(item)Amethyst Dust/$ proportional to the square of the length of the vector; thus a push vector of length 5 would consume five $(item)Amethyst Shards$(0) or equivalent.", "patterns": { "startdir": "EAST", - "signature": "weeewdq" + "signature": "waqwaeawq" } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Blink", "anchor": "OpBlink", "input": "entity, number", "output": "", + "stroke_order": false, "text": "Remove an entity and length from the stack, then teleport the given entity along its look vector by the given length.$(br)Costs about 2 $(item)Amethyst Dust/$s times the square of the distance teleported-- thus, teleporting 5 blocks would cost five $(item)Charged Amethyst Crystals$(0) or equivalent.", "patterns": { "startdir": "EAST", - "signature": "wqqqwae" + "signature": "aqwaeawq" } } ] diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/blockworks.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/blockworks.json similarity index 78% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/blockworks.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/blockworks.json index ae244594..f4a2ad65 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/blockworks.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/blockworks.json @@ -1,30 +1,32 @@ { "name": "Blockworks", - "category": "hex:patterns/spells", + "category": "hexcasting:patterns/spells", "icon": "minecraft:cobblestone", "sortnum": 1, - "advancement": "hex:root", + "advancement": "hexcasting:root", "read_by_default": true, "pages": [ { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Place Block", "anchor": "OpPlaceBlock", "input": "vector", "output": "", "text": "Remove a location from the stack, then pick a block item and place it at the given location.$(br)Costs about 1 $(item)Amethyst Dust/$.", + "stroke_order": false, "patterns": { "startdir": "EAST", - "signature": "qaqqqqq" + "signature": "weeeeedqe" } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Break Block", "anchor": "OpBreakBlock", "input": "vector", "output": "", "text": "Remove a location from the stack, then break the block at the given location. This spell can break nearly anything a Diamond Pickaxe can break.$(br)Costs about 3 $(item)Amethyst Dust/$s.", + "stroke_order": false, "patterns": { "startdir": "SOUTH_EAST", "signature": "eeeeede" diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/hexcasting.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/hexcasting.json similarity index 82% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/hexcasting.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/hexcasting.json index 4eb864b7..b10bab60 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/spells/hexcasting.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/hexcasting.json @@ -1,9 +1,9 @@ { "name": "Crafting Hexcasting Items", - "category": "hex:patterns/spells", - "icon": "hex:artifact{patterns:[]}", + "category": "hexcasting:patterns/spells", + "icon": "hexcasting:artifact{patterns:[]}", "sortnum": 2, - "advancement": "hex:root", + "advancement": "hexcasting:root", "read_by_default": true, "pages": [ { @@ -11,24 +11,26 @@ "text": "These three spells each create an item that casts a _Hex.$(br)They all require me to hold the empty item in my off-hand, and require two things: the list of patterns to be cast, and an entity representing a dropped stack of $(item)Amethyst/$ to form the item's battery.$(br2)See $(l:items/hexcasting)this entry/$ for more information." }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Craft Cypher", "anchor": "OpMakePackagedSpellCypher", "input": "entity, list of patterns", "output": "", "text": "Costs about one $(item)Charged Amethyst/$.", + "stroke_order": false, "patterns": { "startdir": "EAST", "signature": "waqqqqq" } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Craft Trinket", "anchor": "OpMakePackagedSpellTrinket", "input": "entity, list of patterns", "output": "", "text": "Costs about five $(item)Charged Amethyst/$s.", + "stroke_order": false, "hex_size": 8, "patterns": { "startdir": "EAST", @@ -36,12 +38,13 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Craft Artifact", "anchor": "OpMakePackagedSpellArtifact", "input": "entity, list of patterns", "output": "", "text": "Costs about ten $(item)Charged Amethyst/$s.", + "stroke_order": false, "hex_size": 5, "patterns": { "startdir": "EAST", diff --git a/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/itempicking.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/itempicking.json new file mode 100644 index 00000000..79cd377f --- /dev/null +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/spells/itempicking.json @@ -0,0 +1,18 @@ +{ + "name": "Working with Items", + "category": "hexcasting:patterns/spells", + "icon": "minecraft:item_frame", + "advancement": "hexcasting:root", + "priority": true, + "read_by_default": true, + "pages": [ + { + "type": "patchouli:text", + "text": "Certain spells, such as $(l:hexcasting:patterns/spells/blockworks#OpPlaceBlock)$(action)Place Block/$, will consume additional items from my inventory. When this happens, the spell will first look for the item to use, and then draw from all such items in my inventory.$(br2)This process is called \"picking an item.\"" + }, + { + "type": "patchouli:text", + "text": "More specifically:$(li)First, the spell will search for the first valid item in my hotbar to the $(italic)right of my staff/$, wrapping around at the right-hand side, and starting at the first slot if my staff is in my off-hand.$(li)Second, the spell will draw that item from as $(italic)far back in my inventory/$ as possible, prioritizing the main inventory over the hotbar.$(br)This way, I can keep a \"chooser\" item on my hotbar to tell the spell what to use, and fill the rest of my inventory with that item to keep the spell well-stocked." + } + ] +} diff --git a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/stackmanip.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/stackmanip.json similarity index 85% rename from src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/stackmanip.json rename to src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/stackmanip.json index 754ca684..9ab1891e 100644 --- a/src/main/resources/data/hex/patchouli_books/thehexbook/en_us/entries/patterns/stackmanip.json +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/entries/patterns/stackmanip.json @@ -1,13 +1,13 @@ { "name": "Stack Manipulation", - "category": "hex:patterns", + "category": "hexcasting:patterns", "icon": "minecraft:piston", "sortnum": 3, - "advancement": "hex:root", + "advancement": "hexcasting:root", "read_by_default": true, "pages": [ { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Novice's Gambit", "anchor": "OpUndo", "input": "any", @@ -19,7 +19,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Gemini Decomposition", "anchor": "OpDuplicate", "input": "any", @@ -31,7 +31,7 @@ } }, { - "type": "hex:pattern", + "type": "hexcasting:pattern", "header": "Jester's Gambit", "anchor": "OpSwap", "input": "any, any", diff --git a/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern.json new file mode 100644 index 00000000..53f1a3f1 --- /dev/null +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern.json @@ -0,0 +1,34 @@ +{ + "components": [ + { + "type": "patchouli:header", + "text": "#header", + "x": -1, + "y": -1 + }, + { + "type": "patchouli:separator", + "x": -1, + "y": -1 + }, + { + "type": "patchouli:custom", + "class": "at.petrak.hexcasting.interop.patchouli.PatternComponent", + "x": 58, + "y": 50, + "patterns": "#patterns", + "hex_size": "#hex_size", + "stroke_order": "#stroke_order" + }, + { + "type": "patchouli:text", + "text": "$(n)#input#/$ \u2192 $(n)#output#/$", + "y": 80 + }, + { + "type": "patchouli:text", + "text": "#text#", + "y": 89 + } + ] +} diff --git a/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern_nosig.json b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern_nosig.json new file mode 100644 index 00000000..5a2261a5 --- /dev/null +++ b/src/main/resources/data/hexcasting/patchouli_books/thehexbook/en_us/templates/pattern_nosig.json @@ -0,0 +1,28 @@ +{ + "components": [ + { + "type": "patchouli:header", + "text": "#header", + "x": -1, + "y": -1 + }, + { + "type": "patchouli:separator", + "x": -1, + "y": -1 + }, + { + "type": "patchouli:custom", + "class": "at.petrak.hexcasting.interop.patchouli.PatternComponent", + "x": 58, + "y": 50, + "patterns": "#patterns", + "hex_size": "#hex_size" + }, + { + "type": "patchouli:text", + "text": "#text#", + "y": 80 + } + ] +} diff --git a/src/main/resources/data/hexcasting/recipes/patchi_book.json b/src/main/resources/data/hexcasting/recipes/patchi_book.json new file mode 100644 index 00000000..7847622d --- /dev/null +++ b/src/main/resources/data/hexcasting/recipes/patchi_book.json @@ -0,0 +1,12 @@ +{ + "type": "patchouli:shapeless_book_recipe", + "ingredients": [ + { + "item": "minecraft:book" + }, + { + "item": "hexcasting:amethyst_dust" + } + ], + "book": "hexcasting:thehexbook" +} \ No newline at end of file diff --git a/src/test/java/EulerPathFinderTest.kt b/src/test/java/EulerPathFinderTest.kt index 7e4a5d66..93e5bbe0 100644 --- a/src/test/java/EulerPathFinderTest.kt +++ b/src/test/java/EulerPathFinderTest.kt @@ -1,6 +1,6 @@ -import at.petrak.hex.hexmath.EulerPathFinder.findAltDrawing -import at.petrak.hex.hexmath.HexDir -import at.petrak.hex.hexmath.HexPattern.Companion.FromAnglesSig +import at.petrak.hexcasting.hexmath.EulerPathFinder.findAltDrawing +import at.petrak.hexcasting.hexmath.HexDir +import at.petrak.hexcasting.hexmath.HexPattern.Companion.FromAnglesSig import org.testng.annotations.Test internal class EulerPathFinderTest {