Skip to content

Commit

Permalink
Merge branch 'main' into scroll-tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
SamsTheNerd authored Feb 3, 2025
2 parents c04d6d2 + 1d3a855 commit 4940868
Show file tree
Hide file tree
Showing 79 changed files with 1,115 additions and 380 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ permissions:

jobs:
hexdoc:
uses: hexdoc-dev/hexdoc/.github/workflows/hexdoc.yml@main
uses: hexdoc-dev/actions/.github/workflows/hexdoc.yml@v1
permissions:
contents: write
pages: read
Expand All @@ -51,7 +51,7 @@ jobs:
id-token: write
steps:
- name: Download package artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: hexdoc-build
path: dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:
hexdoc:
# don't bother running the docs build when pushing to main - nothing necessary to cache here
if: github.event_name != 'push'
uses: hexdoc-dev/hexdoc/.github/workflows/hexdoc.yml@main
uses: hexdoc-dev/actions/.github/workflows/hexdoc.yml@v1
permissions:
contents: write
pages: read
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.1 2023-12-24T17:59:13.7584156 Item Models: hexcasting
// 1.20.1 2024-12-10T14:26:44.916295 Item Models: hexcasting
2fc68dcd6d73da3deaa6a33240dd9160a2b79592 assets/hexcasting/models/block/deco/quenched_allay_bricks_0.json
d59af7a48b20b210240b26115fb172d6202f9254 assets/hexcasting/models/block/deco/quenched_allay_bricks_1.json
a62eeebbca2d145c22f25725bd848ed4d673cefa assets/hexcasting/models/block/deco/quenched_allay_bricks_2.json
Expand All @@ -19,6 +19,22 @@ f2156b3a7041cf99891b528393db64c6b9ca1a4f assets/hexcasting/models/item/abacus.js
19730853397b109cfedd0c3bbda83d5de6cd15b9 assets/hexcasting/models/item/akashic_record.json
8c735feff09d46d00ed681311f46f61a50cfdc9b assets/hexcasting/models/item/amethyst_dust.json
fbb8706993fbc3246c56b9f3eb274ff8968b70f8 assets/hexcasting/models/item/amethyst_pillar.json
533a859174052a332de069b2ffeaf0106d132b9a assets/hexcasting/models/item/ancient_cypher.json
71a7968e43fbb872ee52315a3ee738d0b3fd1a69 assets/hexcasting/models/item/ancient_cypher_0_filled.json
0f0c627d7ed0e8a7e3666ca80ddc13b280d6ce9f assets/hexcasting/models/item/ancient_cypher_1.json
097b8ecfb34df710ca4b396d3a5df7722ecc3596 assets/hexcasting/models/item/ancient_cypher_1_filled.json
9fdde927e7e8b06221aef34a6a6b22d0b790f297 assets/hexcasting/models/item/ancient_cypher_2.json
93257ad393b751931539a5641d4430a4631e95f9 assets/hexcasting/models/item/ancient_cypher_2_filled.json
4af6234e24031ee0989282c8435fe07e85b02771 assets/hexcasting/models/item/ancient_cypher_3.json
41760f3c89d8dc94c515b0ab8220ecf996710a3c assets/hexcasting/models/item/ancient_cypher_3_filled.json
4df83ae775400ca2d480bfb3621abcf58d4d7352 assets/hexcasting/models/item/ancient_cypher_4.json
d21eb7093c0231015808a8b51b27857da1748431 assets/hexcasting/models/item/ancient_cypher_4_filled.json
e2b4e2ac4ad4fa4b490e1774a565a26fb840c474 assets/hexcasting/models/item/ancient_cypher_5.json
4555e5de80047ffa4e72a4a98eb51437a95e7291 assets/hexcasting/models/item/ancient_cypher_5_filled.json
420840b5761fcddbdd10186f3127bc7589badc46 assets/hexcasting/models/item/ancient_cypher_6.json
55c08581a2e8c7134d63b38226bddafff0fba3ae assets/hexcasting/models/item/ancient_cypher_6_filled.json
2731192f0c7a9a8d45ba4fcd8d1de60bade0b49e assets/hexcasting/models/item/ancient_cypher_7.json
7ba3015d79601f1c8238dbac4a45e525e3589f16 assets/hexcasting/models/item/ancient_cypher_7_filled.json
87e7ee44cdd0808a3dd72babfd1db716df2bcdfe assets/hexcasting/models/item/artifact.json
1cd1b4d002d1a9a044ceab7cca842e4a2b7bd2f4 assets/hexcasting/models/item/artifact_0_filled.json
4709e65d8e74cf45b3ba014bdf70373728cccc78 assets/hexcasting/models/item/artifact_1.json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"parent": "minecraft:item/generated",
"overrides": [
{
"model": "hexcasting:item/ancient_cypher",
"predicate": {
"hexcasting:has_patterns": -0.01,
"hexcasting:variant": 0.0
}
},
{
"model": "hexcasting:item/ancient_cypher_0_filled",
"predicate": {
"hexcasting:has_patterns": 0.99,
"hexcasting:variant": 0.0
}
},
{
"model": "hexcasting:item/ancient_cypher_1",
"predicate": {
"hexcasting:has_patterns": -0.01,
"hexcasting:variant": 1.0
}
},
{
"model": "hexcasting:item/ancient_cypher_1_filled",
"predicate": {
"hexcasting:has_patterns": 0.99,
"hexcasting:variant": 1.0
}
},
{
"model": "hexcasting:item/ancient_cypher_2",
"predicate": {
"hexcasting:has_patterns": -0.01,
"hexcasting:variant": 2.0
}
},
{
"model": "hexcasting:item/ancient_cypher_2_filled",
"predicate": {
"hexcasting:has_patterns": 0.99,
"hexcasting:variant": 2.0
}
},
{
"model": "hexcasting:item/ancient_cypher_3",
"predicate": {
"hexcasting:has_patterns": -0.01,
"hexcasting:variant": 3.0
}
},
{
"model": "hexcasting:item/ancient_cypher_3_filled",
"predicate": {
"hexcasting:has_patterns": 0.99,
"hexcasting:variant": 3.0
}
},
{
"model": "hexcasting:item/ancient_cypher_4",
"predicate": {
"hexcasting:has_patterns": -0.01,
"hexcasting:variant": 4.0
}
},
{
"model": "hexcasting:item/ancient_cypher_4_filled",
"predicate": {
"hexcasting:has_patterns": 0.99,
"hexcasting:variant": 4.0
}
},
{
"model": "hexcasting:item/ancient_cypher_5",
"predicate": {
"hexcasting:has_patterns": -0.01,
"hexcasting:variant": 5.0
}
},
{
"model": "hexcasting:item/ancient_cypher_5_filled",
"predicate": {
"hexcasting:has_patterns": 0.99,
"hexcasting:variant": 5.0
}
},
{
"model": "hexcasting:item/ancient_cypher_6",
"predicate": {
"hexcasting:has_patterns": -0.01,
"hexcasting:variant": 6.0
}
},
{
"model": "hexcasting:item/ancient_cypher_6_filled",
"predicate": {
"hexcasting:has_patterns": 0.99,
"hexcasting:variant": 6.0
}
},
{
"model": "hexcasting:item/ancient_cypher_7",
"predicate": {
"hexcasting:has_patterns": -0.01,
"hexcasting:variant": 7.0
}
},
{
"model": "hexcasting:item/ancient_cypher_7_filled",
"predicate": {
"hexcasting:has_patterns": 0.99,
"hexcasting:variant": 7.0
}
}
],
"textures": {
"layer0": "hexcasting:item/cad/0_ancient_cypher"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/0_ancient_cypher",
"layer1": "hexcasting:item/cad/0_ancient_cypher_overlay"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/1_ancient_cypher"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/1_ancient_cypher",
"layer1": "hexcasting:item/cad/1_ancient_cypher_overlay"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/2_ancient_cypher"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/2_ancient_cypher",
"layer1": "hexcasting:item/cad/2_ancient_cypher_overlay"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/3_ancient_cypher"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/3_ancient_cypher",
"layer1": "hexcasting:item/cad/3_ancient_cypher_overlay"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/4_ancient_cypher"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/4_ancient_cypher",
"layer1": "hexcasting:item/cad/4_ancient_cypher_overlay"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/5_ancient_cypher"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/5_ancient_cypher",
"layer1": "hexcasting:item/cad/5_ancient_cypher_overlay"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/6_ancient_cypher"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/6_ancient_cypher",
"layer1": "hexcasting:item/cad/6_ancient_cypher_overlay"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/7_ancient_cypher"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/cad/7_ancient_cypher",
"layer1": "hexcasting:item/cad/7_ancient_cypher_overlay"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import at.petrak.hexcasting.api.mod.HexConfig;
import at.petrak.hexcasting.api.pigment.FrozenPigment;
import at.petrak.hexcasting.api.utils.HexUtils;
import at.petrak.hexcasting.common.lib.HexAttributes;
import net.minecraft.core.BlockPos;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
Expand Down Expand Up @@ -247,6 +248,9 @@ public boolean isEnlightened() {
* positive.
*/
public long extractMedia(long cost, boolean simulate) {
if (this.getCastingEntity() != null){
cost = (long) (cost * this.getCastingEntity().getAttributeValue(HexAttributes.MEDIA_CONSUMPTION_MODIFIER));
}
for (var extractMediaComponent : preMediaExtract)
cost = extractMediaComponent.onExtractMedia(cost, simulate);
cost = extractMediaEnvironment(cost, simulate);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import at.petrak.hexcasting.api.casting.mishaps.MishapDisallowedSpell;
import at.petrak.hexcasting.api.mod.HexConfig;
import at.petrak.hexcasting.api.pigment.FrozenPigment;
import at.petrak.hexcasting.common.lib.HexAttributes;
import net.minecraft.core.BlockPos;
import net.minecraft.network.chat.Component;
import net.minecraft.resources.ResourceLocation;
Expand All @@ -29,8 +30,6 @@
import java.util.List;
import java.util.function.Predicate;

import static at.petrak.hexcasting.api.casting.eval.env.PlayerBasedCastEnv.SENTINEL_RADIUS;

public class CircleCastEnv extends CastingEnvironment {
protected final CircleExecutionState execState;

Expand Down Expand Up @@ -133,6 +132,7 @@ public long extractMediaEnvironment(long cost, boolean simulate) {
public boolean isVecInRangeEnvironment(Vec3 vec) {
var caster = this.execState.getCaster(this.world);
if (caster != null) {
double sentinelRadius = caster.getAttributeValue(HexAttributes.SENTINEL_RADIUS);
if (vec.distanceToSqr(caster.position()) <= caster.getBbHeight() * caster.getBbHeight()) {
return true;
}
Expand All @@ -141,7 +141,7 @@ public boolean isVecInRangeEnvironment(Vec3 vec) {
if (sentinel != null
&& sentinel.extendsRange()
&& caster.level().dimension() == sentinel.dimension()
&& vec.distanceToSqr(sentinel.position()) <= SENTINEL_RADIUS * SENTINEL_RADIUS + 0.00000000001
&& vec.distanceToSqr(sentinel.position()) <= sentinelRadius * sentinelRadius + 0.00000000001
) {
return true;
}
Expand Down
Loading

0 comments on commit 4940868

Please sign in to comment.