Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#839 and it's the same but it's cherry picked so it's not #844

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import at.petrak.hexcasting.api.casting.SpellList;
import at.petrak.hexcasting.api.utils.HexUtils;
import at.petrak.hexcasting.common.lib.hex.HexIotaTypes;
import at.petrak.hexcasting.api.mod.HexConfig;
import net.minecraft.ChatFormatting;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.ListTag;
Expand Down Expand Up @@ -131,10 +132,13 @@ public Component display(Tag tag) {
out.append(IotaType.getDisplay(csub));

// only add a comma between 2 non-patterns (commas don't look good with Inline patterns)
// TODO: maybe add a config? maybe add a method on IotaType to allow it to opt out of commas
if (i < list.size() - 1 && (IotaType.getTypeFromTag(csub) != PatternIota.TYPE
|| IotaType.getTypeFromTag(HexUtils.downcast(list.get(i+1), CompoundTag.TYPE)) != PatternIota.TYPE)) {
out.append(", ");
// TODO: maybe add a method on IotaType to allow it to opt out of commas?
if (i < list.size() - 1) {
var thisIotaNeedsComma = IotaType.getTypeFromTag(csub) != PatternIota.TYPE;
var nextIotaNeedsComma = IotaType.getTypeFromTag(HexUtils.downcast(list.get(i+1), CompoundTag.TYPE)) != PatternIota.TYPE;
var alwaysShowCommas = HexConfig.client().alwaysShowListCommas();
if (thisIotaNeedsComma || nextIotaNeedsComma || alwaysShowCommas)
out.append(", ");
}
}
return Component.translatable("hexcasting.tooltip.list_contents", out).withStyle(ChatFormatting.DARK_PURPLE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,14 @@ public interface ClientConfigAccess {

boolean clickingTogglesDrawing();

boolean alwaysShowListCommas();

boolean DEFAULT_CTRL_TOGGLES_OFF_STROKE_ORDER = false;
boolean DEFAULT_INVERT_SPELLBOOK_SCROLL = false;
boolean DEFAULT_INVERT_ABACUS_SCROLL = false;
double DEFAULT_GRID_SNAP_THRESHOLD = 0.5;
boolean DEFAULT_CLICKING_TOGGLES_DRAWING = false;
boolean DEFAULT_ALWAYS_SHOW_LIST_COMMAS = false;
}

public interface ServerConfigAccess {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public class HexLootHandler {
// if you manage to find one of these things you deserve a lot of scrolls
new ScrollInjection(new ResourceLocation("minecraft", "chests/woodland_mansion"), 5),
new ScrollInjection(new ResourceLocation("minecraft", "chests/stronghold_library"), 5)

// you can use the table hexcasting:random_scroll to get exactly 1 scroll and nothing else
);

public static final ImmutableList<ResourceLocation> DEFAULT_LORE_INJECTS = ImmutableList.of(
Expand All @@ -69,6 +71,7 @@ public class HexLootHandler {
new ResourceLocation("minecraft", "chests/desert_pyramid"),
new ResourceLocation("minecraft", "chests/ancient_city"),
new ResourceLocation("minecraft", "chests/nether_bridge")
// you can use the table hexcasting:random_cypher to get exactly 1 cypher and nothing else
);

public static int getScrollCount(int range, RandomSource random) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@
"": "Clicking Toggles Drawing",
"@Tooltip": "Whether you click to start and stop drawing instead of clicking and dragging to draw",
},
alwaysShowListCommas: {
"": "Always Show List Commas",
"@Tooltip": "Whether all iota types should be comma-separated when displayed in lists (by default, pattern iotas do not use commas)",
},
},

server: {
Expand Down Expand Up @@ -1968,7 +1972,7 @@
conjure_light: "Conjure a magical light that softly glows with my pigment at the given position. Costs about one $(l:items/amethyst)$(item)Amethyst Dust/$.",
bonemeal: "Encourage a plant or sapling at the target position to grow, as if $(item)Bonemeal/$ was applied. Costs a bit more than one $(l:items/amethyst)$(item)Amethyst Dust/$.",
edify: "Forcibly infuse _media into the sapling at the target position, causing it to grow into an $(l:items/edified)$(thing)Edified Tree/$. Costs about one $(l:items/amethyst)$(item)Charged Amethyst/$.",
ignite: "Start a fire on top of the given location, as if a $(item)Fire Charge/$ was applied, or sets fire to a creature. Costs about one $(l:items/amethyst)$(item)Amethyst Dust/$.",
ignite: "Start a fire on top of the given location, as if a $(item)Fire Charge/$ was applied, or set fire to an entity. Costs about one $(l:items/amethyst)$(item)Amethyst Dust/$.",
extinguish: "Extinguish blocks in a large area. Costs about six $(l:items/amethyst)$(item)Amethyst Dust/$.",
},

Expand Down Expand Up @@ -2018,7 +2022,7 @@
"range.2": "The second argument is a horizontal radius, in meters, in which the spell is stable. Moving outside of that radius will end the spell, dropping me out of the sky. As long as I stay inside the safe zone, however, the spell lasts indefinitely. An additional shimmer of _media marks the origin point of the safe zone. $(br2)Costs about 1 $(l:items/amethyst)$(item)Amethyst Dust/$ per meter of safety.",

"time.1": "A flight limited in its duration.",
"time.2": "The second argument is an amount of time in seconds for which the spell is stable. After that time, the spell ends and I am dropped from the sky. $(br2)It is relatively expensive at about 1 $(l:items/amethyst)$(item)Charged Crystal/$ per second of flight; I believe it is best suited for travel.",
"time.2": "The second argument is an amount of time in seconds for which the spell is stable. After that time, the spell ends and I am dropped from the sky. $(br2)It is relatively expensive at about 1 $(l:items/amethyst)$(item)Amethyst Shard/$ per second of flight; I believe it is best suited for travel.",

// Putting this in this category instead of elsewhere -- see sentinel chapter also containing some reflections/nonspells
"can_fly.1": "Returns whether the given player is under the effects of $(l:patterns/spells/flight#hexcasting:flight/range)Anchorite's/$ or $(l:patterns/spells/flight#hexcasting:flight/time)Wayfarer's Flight/$.",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"pools": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"pools": []
}
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
// 1.20.1 2025-01-23T15:50:44.3944222 Hex Casting/Loot Tables
4efd95d408d050c36ff21b18f3c37116491fef92 data\hexcasting\loot_tables\blocks\directrix\redstone.json
c81a5cb81141ab1fe09dd5dd3a0968b69dfffbd7 data\hexcasting\loot_tables\blocks\stripped_edified_log.json
a62ffbcec2aa40172e05cd9fcd8e70e295d008e9 data\hexcasting\loot_tables\blocks\edified_fence_gate.json
8ea8fd68719a960c2e132df441564a70c0e376a8 data\hexcasting\loot_tables\blocks\amethyst_pillar.json
9905b767be7849e02a8e4ec4170af1bdde4e7fab data\hexcasting\loot_tables\blocks\edified_stairs.json
0b734693c926045b60fb515814b7a6695d0295fc data\hexcasting\loot_tables\blocks\impetus\look.json
ab86e126a704550d3f21c0b43f99fdc2665e4b09 data\hexcasting\loot_tables\blocks\slate_amethyst_tiles.json
2c9af74a82ca462e5986354966d5a0a1fd5a2083 data\hexcasting\loot_tables\blocks\slate_tiles.json
bedbc2bd04f79372aedea64214ba2ea49cde9640 data\hexcasting\loot_tables\blocks\amethyst_edified_leaves.json
45dc91d820caa5c421fe6f2afc7f71e45d6acd4d data\hexcasting\loot_tables\blocks\slate_pillar.json
6c35afda4ca349f3506fe08f86f0afe58a6f2c44 data\hexcasting\loot_tables\blocks\quenched_allay.json
2902c4dae60875a1b2daf0a948a49a3419d8ec9d data\hexcasting\loot_tables\blocks\edified_log.json
95be0cf7f277257671631929462131b6d611119a data\hexcasting\loot_tables\inject\amethyst_cluster.json
// 1.20.1 2025-02-03T19:54:42.4538323 Hex Casting/Loot Tables
b19ac49146149555038e6d2e06200d514df1ef43 data\hexcasting\loot_tables\blocks\akashic_bookshelf.json
c426245d51f1e0fa0db7c4bfb454284d75506c9c data\hexcasting\loot_tables\blocks\quenched_allay_bricks.json
6920654f50532b5e557646e34edc4872339eb79f data\hexcasting\loot_tables\blocks\edified_log_amethyst.json
6eecc98b606d7ea5ec6f4c1fa4f63f7c1eba9223 data\hexcasting\loot_tables\blocks\slate_amethyst_bricks.json
2ad288784b0dc106ace2e6e0a40669f83476c414 data\hexcasting\loot_tables\blocks\slate.json
49940d1cb2599212e2837d7ed66c6c66e54f80f8 data\hexcasting\loot_tables\blocks\akashic_record.json
d16fa9e366d48646686470c2d1f9bda4db3a1afa data\hexcasting\loot_tables\blocks\ancient_scroll_paper.json
cc7313cc33609fe1120baa7b4db631eaa29fbba1 data\hexcasting\loot_tables\blocks\citrine_edified_leaves.json
b6c23fdde4f2c22c81f008604d5ff1c32ca8eb61 data\hexcasting\loot_tables\blocks\amethyst_tiles.json
df5496da8e48b61a171bc7a3936495c016cc002e data\hexcasting\loot_tables\blocks\directrix\empty.json
92528799c8ee13ff26c3c505e4dfb286c30f97c7 data\hexcasting\loot_tables\blocks\akashic_connector.json
434c2a6d2645e56e9a6ca56249ffa84645558e3b data\hexcasting\loot_tables\blocks\quenched_allay_bricks_small.json
601384d888edab27efe4a33027bb557eb7cb6ca2 data\hexcasting\loot_tables\blocks\edified_log_purple.json
45ae0ec668a07aa5b33d491377b2978f69f9f019 data\hexcasting\loot_tables\blocks\edified_panel.json
55f265961463a89c243ec8ac1970c70185f064a6 data\hexcasting\loot_tables\blocks\edified_button.json
7123b1a0469d7bd5bf8a2772182d222bf354df1a data\hexcasting\loot_tables\blocks\slate_bricks_small.json
509ecbb9731e75b63638c6012b2f986f131fd42f data\hexcasting\loot_tables\blocks\slate_amethyst_bricks_small.json
74159c21634679a6ab1dde1c181433db8b31c6ae data\hexcasting\loot_tables\blocks\edified_log_citrine.json
1dd4268edf7d6fa247013ab45541c7bfb915eef8 data\hexcasting\loot_tables\blocks\amethyst_bricks_small.json
499af9f15cf0a7f16fd2939e5d3af60a8089cc3e data\hexcasting\loot_tables\blocks\slate_bricks.json
30f06db8c1ea74c9f4d95474e412336d065ac888 data\hexcasting\loot_tables\blocks\edified_door.json
7c9c94d5b6b570d25eff32d4fa2ecc1e842e5231 data\hexcasting\loot_tables\blocks\quenched_allay_tiles.json
65fe724d4c4ba8b0ab7d7a11bf37687413d9119d data\hexcasting\loot_tables\blocks\edified_fence.json
cf6ff1ed1ee6fdbb05af16468a0a0ced79ac334e data\hexcasting\loot_tables\blocks\amethyst_bricks.json
8c6c0486170537d73b923a2b9f83722107fc8716 data\hexcasting\loot_tables\blocks\edified_log_aventurine.json
dc4c6d270b8e93d05ac8ddeb1b9dd1d64828ac5d data\hexcasting\loot_tables\blocks\stripped_edified_wood.json
2ab674e834184b4e17dc002556d4473cac137445 data\hexcasting\loot_tables\blocks\edified_slab.json
e6ff979aa47877c1b807075c448defd249cd3484 data\hexcasting\loot_tables\blocks\slate_amethyst_pillar.json
cc7313cc33609fe1120baa7b4db631eaa29fbba1 data\hexcasting\loot_tables\blocks\citrine_edified_leaves.json
847bc3ead8a88a8f210a24e7732c28d50aa2f5dc data\hexcasting\loot_tables\blocks\edified_planks.json
49940d1cb2599212e2837d7ed66c6c66e54f80f8 data\hexcasting\loot_tables\blocks\akashic_record.json
7123b1a0469d7bd5bf8a2772182d222bf354df1a data\hexcasting\loot_tables\blocks\slate_bricks_small.json
95be0cf7f277257671631929462131b6d611119a data\hexcasting\loot_tables\inject\amethyst_cluster.json
d16fa9e366d48646686470c2d1f9bda4db3a1afa data\hexcasting\loot_tables\blocks\ancient_scroll_paper.json
2902c4dae60875a1b2daf0a948a49a3419d8ec9d data\hexcasting\loot_tables\blocks\edified_log.json
b706c8a064f717c57104c48ea42aa860b45cf7a4 data\hexcasting\loot_tables\blocks\amethyst_dust_block.json
c81a5cb81141ab1fe09dd5dd3a0968b69dfffbd7 data\hexcasting\loot_tables\blocks\stripped_edified_log.json
0b734693c926045b60fb515814b7a6695d0295fc data\hexcasting\loot_tables\blocks\impetus\look.json
6c35afda4ca349f3506fe08f86f0afe58a6f2c44 data\hexcasting\loot_tables\blocks\quenched_allay.json
9ff760d5db5628328ea9274c98e18a08f1ab983e data\hexcasting\loot_tables\blocks\slate_block.json
f1145860d80ff053970b1ad4f3b2f5d9f28e7c73 data\hexcasting\loot_tables\blocks\directrix\boolean.json
ecaeb4d5703a7aa206627ed38ee71aeb7e93d688 data\hexcasting\loot_tables\blocks\impetus\rightclick.json
44658abcf122575878834d276ebcf5d8a6b7b398 data\hexcasting\loot_tables\blocks\aventurine_edified_leaves.json
4efd95d408d050c36ff21b18f3c37116491fef92 data\hexcasting\loot_tables\blocks\directrix\redstone.json
434c2a6d2645e56e9a6ca56249ffa84645558e3b data\hexcasting\loot_tables\blocks\quenched_allay_bricks_small.json
bedbc2bd04f79372aedea64214ba2ea49cde9640 data\hexcasting\loot_tables\blocks\amethyst_edified_leaves.json
ab86e126a704550d3f21c0b43f99fdc2665e4b09 data\hexcasting\loot_tables\blocks\slate_amethyst_tiles.json
6eecc98b606d7ea5ec6f4c1fa4f63f7c1eba9223 data\hexcasting\loot_tables\blocks\slate_amethyst_bricks.json
2ac70e3c3600c88b2544d9755fc634216a7a523c data\hexcasting\loot_tables\blocks\edified_wood.json
92331eb19422730ffda0a3e52427a75aa1f7aff2 data\hexcasting\loot_tables\blocks\ancient_scroll_paper_lantern.json
c426245d51f1e0fa0db7c4bfb454284d75506c9c data\hexcasting\loot_tables\blocks\quenched_allay_bricks.json
dc4c6d270b8e93d05ac8ddeb1b9dd1d64828ac5d data\hexcasting\loot_tables\blocks\stripped_edified_wood.json
1dd4268edf7d6fa247013ab45541c7bfb915eef8 data\hexcasting\loot_tables\blocks\amethyst_bricks_small.json
849afa706e7479d1c11bb40ae223ae5833e71286 data\hexcasting\loot_tables\blocks\scroll_paper_lantern.json
b6c23fdde4f2c22c81f008604d5ff1c32ca8eb61 data\hexcasting\loot_tables\blocks\amethyst_tiles.json
10cb1b94596ac7131efe3bd5c36c1543ddba9302 data\hexcasting\loot_tables\blocks\impetus\redstone.json
147e0739a712a9050856cebcad1757b3f418f647 data\hexcasting\loot_tables\blocks\edified_trapdoor.json
5f8d09e8c759d05cf9c2265ae28ea942cfbbe2be data\hexcasting\loot_tables\blocks\edified_pressure_plate.json
ecaeb4d5703a7aa206627ed38ee71aeb7e93d688 data\hexcasting\loot_tables\blocks\impetus\rightclick.json
45ae0ec668a07aa5b33d491377b2978f69f9f019 data\hexcasting\loot_tables\blocks\edified_panel.json
e6ff979aa47877c1b807075c448defd249cd3484 data\hexcasting\loot_tables\blocks\slate_amethyst_pillar.json
65fe724d4c4ba8b0ab7d7a11bf37687413d9119d data\hexcasting\loot_tables\blocks\edified_fence.json
a4e0194d8966a24531e43e04437cdb2a96456898 data\hexcasting\loot_tables\blocks\edified_tile.json
509ecbb9731e75b63638c6012b2f986f131fd42f data\hexcasting\loot_tables\blocks\slate_amethyst_bricks_small.json
601384d888edab27efe4a33027bb557eb7cb6ca2 data\hexcasting\loot_tables\blocks\edified_log_purple.json
1a1236e54c24b5aeff05919c73c76151da2cf115 data\hexcasting\loot_tables\blocks\amethyst_sconce.json
5f8d09e8c759d05cf9c2265ae28ea942cfbbe2be data\hexcasting\loot_tables\blocks\edified_pressure_plate.json
147e0739a712a9050856cebcad1757b3f418f647 data\hexcasting\loot_tables\blocks\edified_trapdoor.json
55f265961463a89c243ec8ac1970c70185f064a6 data\hexcasting\loot_tables\blocks\edified_button.json
f1145860d80ff053970b1ad4f3b2f5d9f28e7c73 data\hexcasting\loot_tables\blocks\directrix\boolean.json
2ab674e834184b4e17dc002556d4473cac137445 data\hexcasting\loot_tables\blocks\edified_slab.json
c15d3ced89c882dfe552f84435fcdd560b729567 data\hexcasting\loot_tables\blocks\scroll_paper.json
92331eb19422730ffda0a3e52427a75aa1f7aff2 data\hexcasting\loot_tables\blocks\ancient_scroll_paper_lantern.json
b706c8a064f717c57104c48ea42aa860b45cf7a4 data\hexcasting\loot_tables\blocks\amethyst_dust_block.json
2ac70e3c3600c88b2544d9755fc634216a7a523c data\hexcasting\loot_tables\blocks\edified_wood.json
8c6c0486170537d73b923a2b9f83722107fc8716 data\hexcasting\loot_tables\blocks\edified_log_aventurine.json
6920654f50532b5e557646e34edc4872339eb79f data\hexcasting\loot_tables\blocks\edified_log_amethyst.json
9905b767be7849e02a8e4ec4170af1bdde4e7fab data\hexcasting\loot_tables\blocks\edified_stairs.json
30f06db8c1ea74c9f4d95474e412336d065ac888 data\hexcasting\loot_tables\blocks\edified_door.json
2ad288784b0dc106ace2e6e0a40669f83476c414 data\hexcasting\loot_tables\blocks\slate.json
92528799c8ee13ff26c3c505e4dfb286c30f97c7 data\hexcasting\loot_tables\blocks\akashic_connector.json
8ea8fd68719a960c2e132df441564a70c0e376a8 data\hexcasting\loot_tables\blocks\amethyst_pillar.json
45dc91d820caa5c421fe6f2afc7f71e45d6acd4d data\hexcasting\loot_tables\blocks\slate_pillar.json
10cb1b94596ac7131efe3bd5c36c1543ddba9302 data\hexcasting\loot_tables\blocks\impetus\redstone.json
499af9f15cf0a7f16fd2939e5d3af60a8089cc3e data\hexcasting\loot_tables\blocks\slate_bricks.json
2c9af74a82ca462e5986354966d5a0a1fd5a2083 data\hexcasting\loot_tables\blocks\slate_tiles.json
cf6ff1ed1ee6fdbb05af16468a0a0ced79ac334e data\hexcasting\loot_tables\blocks\amethyst_bricks.json
7c9c94d5b6b570d25eff32d4fa2ecc1e842e5231 data\hexcasting\loot_tables\blocks\quenched_allay_tiles.json
a62ffbcec2aa40172e05cd9fcd8e70e295d008e9 data\hexcasting\loot_tables\blocks\edified_fence_gate.json
1c6b077aae560e780be29e74ddcd4b0ca10ce3cf data\hexcasting\loot_tables\blocks\impetus\empty.json
847bc3ead8a88a8f210a24e7732c28d50aa2f5dc data\hexcasting\loot_tables\blocks\edified_planks.json
Loading
Loading