Skip to content

Commit

Permalink
Add recipes for slate, amethyst, and quenched allay block sets
Browse files Browse the repository at this point in the history
  • Loading branch information
KyanBirb committed Dec 7, 2024
1 parent 6092b58 commit 9a97c5c
Show file tree
Hide file tree
Showing 137 changed files with 3,210 additions and 390 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import net.minecraft.resources.ResourceLocation;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.tags.ItemTags;
import net.minecraft.tags.TagKey;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.entity.npc.VillagerProfession;
import net.minecraft.world.item.DyeColor;
Expand All @@ -35,6 +36,7 @@
import net.minecraft.world.item.crafting.Ingredient;
import net.minecraft.world.item.crafting.SimpleCraftingRecipeSerializer;
import net.minecraft.world.level.block.Blocks;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -280,13 +282,6 @@ public void buildRecipes(Consumer<FinishedRecipe> recipes) {
packing(RecipeCategory.BUILDING_BLOCKS, HexItems.AMETHYST_DUST, HexBlocks.AMETHYST_DUST_BLOCK.asItem(), "amethyst_dust",
false, recipes);

ringAll(RecipeCategory.BUILDING_BLOCKS, HexBlocks.AMETHYST_TILES, 8, Blocks.AMETHYST_BLOCK, HexItems.AMETHYST_DUST)
.unlockedBy("has_item", hasItem(HexItems.AMETHYST_DUST)).save(recipes);

SingleItemRecipeBuilder.stonecutting(Ingredient.of(Blocks.AMETHYST_BLOCK), RecipeCategory.BUILDING_BLOCKS, HexBlocks.AMETHYST_TILES)
.unlockedBy("has_item", hasItem(Blocks.AMETHYST_BLOCK))
.save(recipes, modLoc("stonecutting/amethyst_tiles"));

ringAll(RecipeCategory.BUILDING_BLOCKS, HexBlocks.SCROLL_PAPER, 8, Items.PAPER, Items.AMETHYST_SHARD)
.unlockedBy("has_item", hasItem(Items.AMETHYST_SHARD)).save(recipes);

Expand Down Expand Up @@ -427,6 +422,37 @@ public void buildRecipes(Consumer<FinishedRecipe> recipes) {
.pattern("LPL")
.unlockedBy("enlightenment", enlightenment).save(recipes);

// Stone sets
stoneSet(recipes, HexBlocks.SLATE_BLOCK.asItem(), HexBlocks.SLATE_BRICKS.asItem(), HexBlocks.SLATE_BRICKS_SMALL.asItem(), HexBlocks.SLATE_TILES.asItem(), HexBlocks.SLATE_PILLAR.asItem());
stoneSet(recipes, Blocks.AMETHYST_BLOCK.asItem(), HexBlocks.AMETHYST_BRICKS.asItem(), HexBlocks.AMETHYST_BRICKS_SMALL.asItem(), HexBlocks.AMETHYST_TILES.asItem(), HexBlocks.AMETHYST_PILLAR.asItem());
stoneSet(recipes, HexBlocks.QUENCHED_ALLAY.asItem(), HexBlocks.QUENCHED_ALLAY_BRICKS.asItem(), HexBlocks.QUENCHED_ALLAY_BRICKS_SMALL.asItem(), HexBlocks.QUENCHED_ALLAY_TILES.asItem(), null);

// Stone sets in stonecutter
stoneCutterFromTag(recipes, HexTags.Items.SLATE_BLOCKS, HexBlocks.SLATE_BRICKS.asItem(), HexBlocks.SLATE_BRICKS_SMALL.asItem(), HexBlocks.SLATE_TILES.asItem(), HexBlocks.SLATE_PILLAR.asItem());
stoneCutterFromTag(recipes, HexTags.Items.AMETHYST_BLOCKS, HexBlocks.AMETHYST_BRICKS.asItem(), HexBlocks.AMETHYST_BRICKS_SMALL.asItem(), HexBlocks.AMETHYST_TILES.asItem(), HexBlocks.AMETHYST_PILLAR.asItem());
stoneCutterFromTag(recipes, HexTags.Items.QUENCHED_ALLAY_BLOCKS, HexBlocks.QUENCHED_ALLAY_BRICKS.asItem(), HexBlocks.QUENCHED_ALLAY_BRICKS_SMALL.asItem(), HexBlocks.QUENCHED_ALLAY_TILES.asItem());

// Slate & Amethyst block set
ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, HexBlocks.SLATE_AMETHYST_BRICKS.asItem(), 2)
.requires(HexBlocks.SLATE_BRICKS)
.requires(HexBlocks.AMETHYST_BRICKS)
.unlockedBy("has_item", has(HexBlocks.SLATE)).save(recipes);

ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, HexBlocks.SLATE_AMETHYST_BRICKS_SMALL.asItem(), 2)
.requires(HexBlocks.SLATE_BRICKS_SMALL)
.requires(HexBlocks.AMETHYST_BRICKS_SMALL)
.unlockedBy("has_item", has(HexBlocks.SLATE)).save(recipes);

ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, HexBlocks.SLATE_AMETHYST_TILES.asItem(), 2)
.requires(HexBlocks.SLATE_TILES)
.requires(HexBlocks.AMETHYST_TILES)
.unlockedBy("has_item", has(HexBlocks.SLATE)).save(recipes);

ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, HexBlocks.SLATE_AMETHYST_PILLAR.asItem(), 2)
.requires(HexBlocks.SLATE_PILLAR)
.requires(HexBlocks.AMETHYST_PILLAR)
.unlockedBy("has_item", has(HexBlocks.SLATE)).save(recipes);

new BrainsweepRecipeBuilder(StateIngredientHelper.of(Blocks.AMETHYST_BLOCK),
new VillagerIngredient(null, null, 3),
Blocks.BUDDING_AMETHYST.defaultBlockState(), MediaConstants.CRYSTAL_UNIT * 10)
Expand Down Expand Up @@ -570,4 +596,52 @@ private void specialRecipe(Consumer<FinishedRecipe> consumer, SimpleCraftingReci
var name = BuiltInRegistries.RECIPE_SERIALIZER.getKey(serializer);
SpecialRecipeBuilder.special(serializer).save(consumer, HexAPI.MOD_ID + ":dynamic" + name.getPath());
}

private void stoneSet(Consumer<FinishedRecipe> recipes, Item base, Item bricks, Item smallBricks, Item tiles, @Nullable Item pillar) {
// Bricks from base block
ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, bricks, 4)
.define('#', base)
.pattern("##")
.pattern("##")
.unlockedBy("has_item", hasItem(base))
.save(recipes);

// Bricks from small bricks
ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, bricks)
.requires(smallBricks)
.unlockedBy("has_item", hasItem(base))
.save(recipes, modLoc(bricks + "_from_" + smallBricks));

// Small bricks from bricks
ShapelessRecipeBuilder.shapeless(RecipeCategory.BUILDING_BLOCKS, smallBricks)
.requires(bricks)
.unlockedBy("has_item", hasItem(base))
.save(recipes, modLoc(smallBricks + "_from_" + bricks));

// Tiles from bricks
ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, tiles, 4)
.define('#', bricks)
.pattern("##")
.pattern("##")
.unlockedBy("has_item", hasItem(base))
.save(recipes);

// Pillar from base block
if (pillar != null) {
ShapedRecipeBuilder.shaped(RecipeCategory.BUILDING_BLOCKS, pillar, 2)
.define('#', base)
.pattern("#")
.pattern("#")
.unlockedBy("has_item", hasItem(base))
.save(recipes);
}
}

private void stoneCutterFromTag(Consumer<FinishedRecipe> recipes, TagKey<Item> tagKey, Item ...results) {
for (Item result : results) {
SingleItemRecipeBuilder.stonecutting(Ingredient.of(tagKey), RecipeCategory.BUILDING_BLOCKS, result)
.unlockedBy("has_item", hasItem(tagKey))
.save(recipes, modLoc("stonecutting/" + result));
}
}
}
Original file line number Diff line number Diff line change
@@ -1,58 +1,58 @@
// 1.20.1 2024-11-19T11:30:28.198417333 Hex Casting/Loot Tables
1dd4268edf7d6fa247013ab45541c7bfb915eef8 data/hexcasting/loot_tables/blocks/amethyst_bricks_small.json
601384d888edab27efe4a33027bb557eb7cb6ca2 data/hexcasting/loot_tables/blocks/edified_log_purple.json
2c9af74a82ca462e5986354966d5a0a1fd5a2083 data/hexcasting/loot_tables/blocks/slate_tiles.json
7c9c94d5b6b570d25eff32d4fa2ecc1e842e5231 data/hexcasting/loot_tables/blocks/quenched_allay_tiles.json
ecaeb4d5703a7aa206627ed38ee71aeb7e93d688 data/hexcasting/loot_tables/blocks/impetus/rightclick.json
a4e0194d8966a24531e43e04437cdb2a96456898 data/hexcasting/loot_tables/blocks/edified_tile.json
847bc3ead8a88a8f210a24e7732c28d50aa2f5dc data/hexcasting/loot_tables/blocks/edified_planks.json
92331eb19422730ffda0a3e52427a75aa1f7aff2 data/hexcasting/loot_tables/blocks/ancient_scroll_paper_lantern.json
4efd95d408d050c36ff21b18f3c37116491fef92 data/hexcasting/loot_tables/blocks/directrix/redstone.json
8c6c0486170537d73b923a2b9f83722107fc8716 data/hexcasting/loot_tables/blocks/edified_log_aventurine.json
ab86e126a704550d3f21c0b43f99fdc2665e4b09 data/hexcasting/loot_tables/blocks/slate_amethyst_tiles.json
7123b1a0469d7bd5bf8a2772182d222bf354df1a data/hexcasting/loot_tables/blocks/slate_bricks_small.json
b6c23fdde4f2c22c81f008604d5ff1c32ca8eb61 data/hexcasting/loot_tables/blocks/amethyst_tiles.json
b706c8a064f717c57104c48ea42aa860b45cf7a4 data/hexcasting/loot_tables/blocks/amethyst_dust_block.json
6eecc98b606d7ea5ec6f4c1fa4f63f7c1eba9223 data/hexcasting/loot_tables/blocks/slate_amethyst_bricks.json
b19ac49146149555038e6d2e06200d514df1ef43 data/hexcasting/loot_tables/blocks/akashic_bookshelf.json
9ff760d5db5628328ea9274c98e18a08f1ab983e data/hexcasting/loot_tables/blocks/slate_block.json
2ab674e834184b4e17dc002556d4473cac137445 data/hexcasting/loot_tables/blocks/edified_slab.json
df5496da8e48b61a171bc7a3936495c016cc002e data/hexcasting/loot_tables/blocks/directrix/empty.json
49940d1cb2599212e2837d7ed66c6c66e54f80f8 data/hexcasting/loot_tables/blocks/akashic_record.json
c81a5cb81141ab1fe09dd5dd3a0968b69dfffbd7 data/hexcasting/loot_tables/blocks/stripped_edified_log.json
10cb1b94596ac7131efe3bd5c36c1543ddba9302 data/hexcasting/loot_tables/blocks/impetus/redstone.json
499af9f15cf0a7f16fd2939e5d3af60a8089cc3e data/hexcasting/loot_tables/blocks/slate_bricks.json
147e0739a712a9050856cebcad1757b3f418f647 data/hexcasting/loot_tables/blocks/edified_trapdoor.json
2ad288784b0dc106ace2e6e0a40669f83476c414 data/hexcasting/loot_tables/blocks/slate.json
6c35afda4ca349f3506fe08f86f0afe58a6f2c44 data/hexcasting/loot_tables/blocks/quenched_allay.json
e6ff979aa47877c1b807075c448defd249cd3484 data/hexcasting/loot_tables/blocks/slate_amethyst_pillar.json
55f265961463a89c243ec8ac1970c70185f064a6 data/hexcasting/loot_tables/blocks/edified_button.json
c15d3ced89c882dfe552f84435fcdd560b729567 data/hexcasting/loot_tables/blocks/scroll_paper.json
1c6b077aae560e780be29e74ddcd4b0ca10ce3cf data/hexcasting/loot_tables/blocks/impetus/empty.json
dc4c6d270b8e93d05ac8ddeb1b9dd1d64828ac5d data/hexcasting/loot_tables/blocks/stripped_edified_wood.json
a62ffbcec2aa40172e05cd9fcd8e70e295d008e9 data/hexcasting/loot_tables/blocks/edified_fence_gate.json
cc7313cc33609fe1120baa7b4db631eaa29fbba1 data/hexcasting/loot_tables/blocks/citrine_edified_leaves.json
6920654f50532b5e557646e34edc4872339eb79f data/hexcasting/loot_tables/blocks/edified_log_amethyst.json
849afa706e7479d1c11bb40ae223ae5833e71286 data/hexcasting/loot_tables/blocks/scroll_paper_lantern.json
9905b767be7849e02a8e4ec4170af1bdde4e7fab data/hexcasting/loot_tables/blocks/edified_stairs.json
92528799c8ee13ff26c3c505e4dfb286c30f97c7 data/hexcasting/loot_tables/blocks/akashic_connector.json
45dc91d820caa5c421fe6f2afc7f71e45d6acd4d data/hexcasting/loot_tables/blocks/slate_pillar.json
1a1236e54c24b5aeff05919c73c76151da2cf115 data/hexcasting/loot_tables/blocks/amethyst_sconce.json
74159c21634679a6ab1dde1c181433db8b31c6ae data/hexcasting/loot_tables/blocks/edified_log_citrine.json
30f06db8c1ea74c9f4d95474e412336d065ac888 data/hexcasting/loot_tables/blocks/edified_door.json
95be0cf7f277257671631929462131b6d611119a data/hexcasting/loot_tables/inject/amethyst_cluster.json
bedbc2bd04f79372aedea64214ba2ea49cde9640 data/hexcasting/loot_tables/blocks/amethyst_edified_leaves.json
44658abcf122575878834d276ebcf5d8a6b7b398 data/hexcasting/loot_tables/blocks/aventurine_edified_leaves.json
cf6ff1ed1ee6fdbb05af16468a0a0ced79ac334e data/hexcasting/loot_tables/blocks/amethyst_bricks.json
45ae0ec668a07aa5b33d491377b2978f69f9f019 data/hexcasting/loot_tables/blocks/edified_panel.json
5f8d09e8c759d05cf9c2265ae28ea942cfbbe2be data/hexcasting/loot_tables/blocks/edified_pressure_plate.json
c426245d51f1e0fa0db7c4bfb454284d75506c9c data/hexcasting/loot_tables/blocks/quenched_allay_bricks.json
0b734693c926045b60fb515814b7a6695d0295fc data/hexcasting/loot_tables/blocks/impetus/look.json
d16fa9e366d48646686470c2d1f9bda4db3a1afa data/hexcasting/loot_tables/blocks/ancient_scroll_paper.json
2ac70e3c3600c88b2544d9755fc634216a7a523c data/hexcasting/loot_tables/blocks/edified_wood.json
509ecbb9731e75b63638c6012b2f986f131fd42f data/hexcasting/loot_tables/blocks/slate_amethyst_bricks_small.json
2902c4dae60875a1b2daf0a948a49a3419d8ec9d data/hexcasting/loot_tables/blocks/edified_log.json
434c2a6d2645e56e9a6ca56249ffa84645558e3b data/hexcasting/loot_tables/blocks/quenched_allay_bricks_small.json
65fe724d4c4ba8b0ab7d7a11bf37687413d9119d data/hexcasting/loot_tables/blocks/edified_fence.json
f1145860d80ff053970b1ad4f3b2f5d9f28e7c73 data/hexcasting/loot_tables/blocks/directrix/boolean.json
8ea8fd68719a960c2e132df441564a70c0e376a8 data/hexcasting/loot_tables/blocks/amethyst_pillar.json
// 1.20.1 2024-12-07T16:13:17.0572354 Hex Casting/Loot Tables
a62ffbcec2aa40172e05cd9fcd8e70e295d008e9 data\hexcasting\loot_tables\blocks\edified_fence_gate.json
7123b1a0469d7bd5bf8a2772182d222bf354df1a data\hexcasting\loot_tables\blocks\slate_bricks_small.json
1dd4268edf7d6fa247013ab45541c7bfb915eef8 data\hexcasting\loot_tables\blocks\amethyst_bricks_small.json
92528799c8ee13ff26c3c505e4dfb286c30f97c7 data\hexcasting\loot_tables\blocks\akashic_connector.json
55f265961463a89c243ec8ac1970c70185f064a6 data\hexcasting\loot_tables\blocks\edified_button.json
1a1236e54c24b5aeff05919c73c76151da2cf115 data\hexcasting\loot_tables\blocks\amethyst_sconce.json
4efd95d408d050c36ff21b18f3c37116491fef92 data\hexcasting\loot_tables\blocks\directrix\redstone.json
8ea8fd68719a960c2e132df441564a70c0e376a8 data\hexcasting\loot_tables\blocks\amethyst_pillar.json
dc4c6d270b8e93d05ac8ddeb1b9dd1d64828ac5d data\hexcasting\loot_tables\blocks\stripped_edified_wood.json
ecaeb4d5703a7aa206627ed38ee71aeb7e93d688 data\hexcasting\loot_tables\blocks\impetus\rightclick.json
ab86e126a704550d3f21c0b43f99fdc2665e4b09 data\hexcasting\loot_tables\blocks\slate_amethyst_tiles.json
0b734693c926045b60fb515814b7a6695d0295fc data\hexcasting\loot_tables\blocks\impetus\look.json
434c2a6d2645e56e9a6ca56249ffa84645558e3b data\hexcasting\loot_tables\blocks\quenched_allay_bricks_small.json
d16fa9e366d48646686470c2d1f9bda4db3a1afa data\hexcasting\loot_tables\blocks\ancient_scroll_paper.json
2ab674e834184b4e17dc002556d4473cac137445 data\hexcasting\loot_tables\blocks\edified_slab.json
5f8d09e8c759d05cf9c2265ae28ea942cfbbe2be data\hexcasting\loot_tables\blocks\edified_pressure_plate.json
74159c21634679a6ab1dde1c181433db8b31c6ae data\hexcasting\loot_tables\blocks\edified_log_citrine.json
1c6b077aae560e780be29e74ddcd4b0ca10ce3cf data\hexcasting\loot_tables\blocks\impetus\empty.json
8c6c0486170537d73b923a2b9f83722107fc8716 data\hexcasting\loot_tables\blocks\edified_log_aventurine.json
95be0cf7f277257671631929462131b6d611119a data\hexcasting\loot_tables\inject\amethyst_cluster.json
499af9f15cf0a7f16fd2939e5d3af60a8089cc3e data\hexcasting\loot_tables\blocks\slate_bricks.json
c81a5cb81141ab1fe09dd5dd3a0968b69dfffbd7 data\hexcasting\loot_tables\blocks\stripped_edified_log.json
9905b767be7849e02a8e4ec4170af1bdde4e7fab data\hexcasting\loot_tables\blocks\edified_stairs.json
847bc3ead8a88a8f210a24e7732c28d50aa2f5dc data\hexcasting\loot_tables\blocks\edified_planks.json
92331eb19422730ffda0a3e52427a75aa1f7aff2 data\hexcasting\loot_tables\blocks\ancient_scroll_paper_lantern.json
10cb1b94596ac7131efe3bd5c36c1543ddba9302 data\hexcasting\loot_tables\blocks\impetus\redstone.json
44658abcf122575878834d276ebcf5d8a6b7b398 data\hexcasting\loot_tables\blocks\aventurine_edified_leaves.json
df5496da8e48b61a171bc7a3936495c016cc002e data\hexcasting\loot_tables\blocks\directrix\empty.json
cf6ff1ed1ee6fdbb05af16468a0a0ced79ac334e data\hexcasting\loot_tables\blocks\amethyst_bricks.json
b6c23fdde4f2c22c81f008604d5ff1c32ca8eb61 data\hexcasting\loot_tables\blocks\amethyst_tiles.json
2902c4dae60875a1b2daf0a948a49a3419d8ec9d data\hexcasting\loot_tables\blocks\edified_log.json
45ae0ec668a07aa5b33d491377b2978f69f9f019 data\hexcasting\loot_tables\blocks\edified_panel.json
45dc91d820caa5c421fe6f2afc7f71e45d6acd4d data\hexcasting\loot_tables\blocks\slate_pillar.json
2ad288784b0dc106ace2e6e0a40669f83476c414 data\hexcasting\loot_tables\blocks\slate.json
c426245d51f1e0fa0db7c4bfb454284d75506c9c data\hexcasting\loot_tables\blocks\quenched_allay_bricks.json
30f06db8c1ea74c9f4d95474e412336d065ac888 data\hexcasting\loot_tables\blocks\edified_door.json
c15d3ced89c882dfe552f84435fcdd560b729567 data\hexcasting\loot_tables\blocks\scroll_paper.json
147e0739a712a9050856cebcad1757b3f418f647 data\hexcasting\loot_tables\blocks\edified_trapdoor.json
2c9af74a82ca462e5986354966d5a0a1fd5a2083 data\hexcasting\loot_tables\blocks\slate_tiles.json
7c9c94d5b6b570d25eff32d4fa2ecc1e842e5231 data\hexcasting\loot_tables\blocks\quenched_allay_tiles.json
849afa706e7479d1c11bb40ae223ae5833e71286 data\hexcasting\loot_tables\blocks\scroll_paper_lantern.json
6c35afda4ca349f3506fe08f86f0afe58a6f2c44 data\hexcasting\loot_tables\blocks\quenched_allay.json
cc7313cc33609fe1120baa7b4db631eaa29fbba1 data\hexcasting\loot_tables\blocks\citrine_edified_leaves.json
9ff760d5db5628328ea9274c98e18a08f1ab983e data\hexcasting\loot_tables\blocks\slate_block.json
e6ff979aa47877c1b807075c448defd249cd3484 data\hexcasting\loot_tables\blocks\slate_amethyst_pillar.json
6920654f50532b5e557646e34edc4872339eb79f data\hexcasting\loot_tables\blocks\edified_log_amethyst.json
2ac70e3c3600c88b2544d9755fc634216a7a523c data\hexcasting\loot_tables\blocks\edified_wood.json
b706c8a064f717c57104c48ea42aa860b45cf7a4 data\hexcasting\loot_tables\blocks\amethyst_dust_block.json
6eecc98b606d7ea5ec6f4c1fa4f63f7c1eba9223 data\hexcasting\loot_tables\blocks\slate_amethyst_bricks.json
65fe724d4c4ba8b0ab7d7a11bf37687413d9119d data\hexcasting\loot_tables\blocks\edified_fence.json
a4e0194d8966a24531e43e04437cdb2a96456898 data\hexcasting\loot_tables\blocks\edified_tile.json
b19ac49146149555038e6d2e06200d514df1ef43 data\hexcasting\loot_tables\blocks\akashic_bookshelf.json
49940d1cb2599212e2837d7ed66c6c66e54f80f8 data\hexcasting\loot_tables\blocks\akashic_record.json
509ecbb9731e75b63638c6012b2f986f131fd42f data\hexcasting\loot_tables\blocks\slate_amethyst_bricks_small.json
601384d888edab27efe4a33027bb557eb7cb6ca2 data\hexcasting\loot_tables\blocks\edified_log_purple.json
f1145860d80ff053970b1ad4f3b2f5d9f28e7c73 data\hexcasting\loot_tables\blocks\directrix\boolean.json
bedbc2bd04f79372aedea64214ba2ea49cde9640 data\hexcasting\loot_tables\blocks\amethyst_edified_leaves.json
Loading

0 comments on commit 9a97c5c

Please sign in to comment.