big giant patch! add spell scrolls and per-world patterns, and update mod ID

This commit is contained in:
gamma-delta 2022-01-22 21:53:59 -06:00
parent 4719f80546
commit 343d73aa6a
271 changed files with 1739 additions and 1597 deletions

View file

@ -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,

View file

@ -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

View file

@ -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"
}
]
}

View file

@ -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"
}
]
}

View file

@ -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"
}
]
}

View file

@ -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"
}
]
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/amethyst_dust"
"layer0": "hexcasting:item/amethyst_dust"
}
}

View file

@ -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"
}
]
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/artifact_filled"
"layer0": "hexcasting:item/artifact_filled"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/charged_amethyst"
"layer0": "hexcasting:item/charged_amethyst"
}
}

View file

@ -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"
}
]
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/cypher_filled"
"layer0": "hexcasting:item/cypher_filled"
}
}

View file

@ -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"
}
]
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_double"
"layer0": "hexcasting:item/focus_double"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_double_sealed"
"layer0": "hexcasting:item/focus_double_sealed"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_empty"
"layer0": "hexcasting:item/focus_empty"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_empty_sealed"
"layer0": "hexcasting:item/focus_empty_sealed"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_entity"
"layer0": "hexcasting:item/focus_entity"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_entity_sealed"
"layer0": "hexcasting:item/focus_entity_sealed"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_list"
"layer0": "hexcasting:item/focus_list"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_list_sealed"
"layer0": "hexcasting:item/focus_list_sealed"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_pattern"
"layer0": "hexcasting:item/focus_pattern"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_pattern_sealed"
"layer0": "hexcasting:item/focus_pattern_sealed"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_vec3"
"layer0": "hexcasting:item/focus_vec3"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_vec3_sealed"
"layer0": "hexcasting:item/focus_vec3_sealed"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_widget"
"layer0": "hexcasting:item/focus_widget"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/focus_widget_sealed"
"layer0": "hexcasting:item/focus_widget_sealed"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/lens"
"layer0": "hexcasting:item/lens"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/patchouli_book"
"layer0": "hexcasting:item/patchouli_book"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/scroll"
"layer0": "hexcasting:item/scroll"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/spellbook"
"layer0": "hexcasting:item/spellbook"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/sub_sandwich"
"layer0": "hexcasting:item/sub_sandwich"
}
}

View file

@ -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"
}
]
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/trinket_filled"
"layer0": "hexcasting:item/trinket_filled"
}
}

View file

@ -1,6 +1,6 @@
{
"parent": "minecraft:item/handheld",
"textures": {
"layer0": "hex:item/wand"
"layer0": "hexcasting:item/wand"
}
}

View file

@ -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"
]
}

View file

@ -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": {}
}
},

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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"
}
}
},

View file

@ -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"
}
}
},

View file

@ -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"
}
}
},

View file

@ -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"
}
}
},

View file

@ -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"
}
}
},

View file

@ -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"
}
}
},

View file

@ -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"
}
}
},

View file

@ -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,

View file

@ -19,5 +19,5 @@
}
],
"chargedChance": 0.95,
"type": "hex:amethyst_cluster"
"type": "hexcasting:amethyst_cluster"
}

View file

@ -6,5 +6,5 @@
}
],
"stddev": 2.0,
"type": "hex:scrolls"
"type": "hexcasting:scrolls"
}

View file

@ -6,5 +6,5 @@
}
],
"stddev": 1.0,
"type": "hex:scrolls"
"type": "hexcasting:scrolls"
}

View file

@ -6,5 +6,5 @@
}
],
"stddev": 1.0,
"type": "hex:scrolls"
"type": "hexcasting:scrolls"
}

View file

@ -6,5 +6,5 @@
}
],
"stddev": 1.0,
"type": "hex:scrolls"
"type": "hexcasting:scrolls"
}

View file

@ -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"
}
}

View file

@ -10,10 +10,10 @@
"tag": "forge:nuggets/iron"
},
"A": {
"item": "hex:amethyst_dust"
"item": "hexcasting:amethyst_dust"
}
},
"result": {
"item": "hex:cypher"
"item": "hexcasting:cypher"
}
}

View file

@ -13,10 +13,10 @@
"tag": "forge:dusts/glowstone"
},
"A": {
"item": "hex:charged_amethyst"
"item": "hexcasting:charged_amethyst"
}
},
"result": {
"item": "hex:focus"
"item": "hexcasting:focus"
}
}

View file

@ -10,10 +10,10 @@
"tag": "forge:glass"
},
"A": {
"item": "hex:amethyst_dust"
"item": "hexcasting:amethyst_dust"
}
},
"result": {
"item": "hex:lens"
"item": "hexcasting:lens"
}
}

View file

@ -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"
}
}

View file

@ -14,6 +14,6 @@
}
},
"result": {
"item": "hex:trinket"
"item": "hexcasting:trinket"
}
}

View file

@ -17,6 +17,6 @@
}
},
"result": {
"item": "hex:wand"
"item": "hexcasting:wand"
}
}

View file

@ -1,7 +0,0 @@
package at.petrak.hex.api
import at.petrak.hex.common.casting.CastingContext
interface RenderedSpell {
fun cast(ctx: CastingContext)
}

View file

@ -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<SpellDatum<*>>, ctx: CastingContext): List<SpellDatum<*>> {
val datum = args.getChecked<Any>(0)
return spellListOf(datum, datum)
}
}

View file

@ -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<SpellDatum<*>>, ctx: CastingContext): List<SpellDatum<*>> {
val e: Entity = args.getChecked(0)
return spellListOf(e.lookAngle)
}
}

View file

@ -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<SpellDatum<*>>, ctx: CastingContext): List<SpellDatum<*>> {
val a = args.getChecked<Any>(0)
val b = args.getChecked<Any>(1)
return spellListOf(b, a)
}
}

View file

@ -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<SpellDatum<*>>, ctx: CastingContext): List<SpellDatum<*>> {
val list = args.getChecked<List<SpellDatum<*>>>(0).toMutableList()
val datum = args[1]
list.add(datum)
return spellListOf(list)
}
}

View file

@ -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<SpellDatum<*>>, ctx: CastingContext): List<SpellDatum<*>> {
val v = args.getChecked<Vec3>(0)
return spellListOf(v.x, v.y, v.z)
}
}

View file

@ -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<CommandSourceStack> 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;
})
);
}
}

View file

@ -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;
}
}
}

View file

@ -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<Advancement> 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;
}
}

View file

@ -1,4 +1,4 @@
package at.petrak.hex;
package at.petrak.hexcasting;
import net.minecraft.world.item.Tier;
import net.minecraft.world.item.Tiers;

View file

@ -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)

View file

@ -1,4 +1,4 @@
package at.petrak.hex
package at.petrak.hexcasting
import net.minecraft.nbt.LongArrayTag
import net.minecraft.world.InteractionHand

View file

@ -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.

View file

@ -1,4 +1,4 @@
package at.petrak.hex.api
package at.petrak.hexcasting.api
/**
* What happens when an operator is through?

View file

@ -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.
*/

View file

@ -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

View file

@ -0,0 +1,7 @@
package at.petrak.hexcasting.api
import at.petrak.hexcasting.common.casting.CastingContext
interface RenderedSpell {
fun cast(ctx: CastingContext)
}

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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;
}
}

View file

@ -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;

View file

@ -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;

View file

@ -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<Vec2>,
drawLast: Boolean,

View file

@ -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;

View file

@ -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 }

View file

@ -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;

View file

@ -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;

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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);

View file

@ -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.

View file

@ -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

View file

@ -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

View file

@ -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<SpellDatum<*>>, ctx: CastingContext): List<SpellDatum<*>> {
val datum = args.getChecked<Any>(0)
return spellListOf(datum, datum)
}
}

Some files were not shown because too many files have changed in this diff Show more