From 1eab918242e6d370fd86b4bb03834d8348a8fae5 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Tue, 8 Sep 2026 17:36:53 -0400 Subject: [PATCH 01/11] Add neural staff --- .../hexcasting/models/item/staff/neural.json | 6 ++++ .../hexcasting/models/staff/neural.json | 16 +++++++++ .../recipes/tools/staff/neural.json | 32 ++++++++++++++++++ .../data/hexcasting/recipe/staff/neural.json | 24 +++++++++++++ .../data/hexcasting/tags/item/staves.json | 3 +- .../client/RegisterClientStuff.java | 1 + .../hexcasting/common/lib/HexItems.java | 1 + .../datagen/recipe/HexplatRecipes.java | 9 +++++ .../datagen/tag/HexItemTagProvider.java | 2 +- .../hexcasting/lang/en_us.flatten.json5 | 1 + .../entries/greatwork/fanciful_staves.json | 4 +++ .../hexcasting/textures/item/staff/neural.png | Bin 0 -> 863 bytes .../recipes/tools/staff/neural.json | 32 ++++++++++++++++++ .../data/hexcasting/recipe/staff/neural.json | 24 +++++++++++++ .../data/hexcasting/tags/item/staves.json | 3 +- .../hexcasting/models/item/staff/neural.json | 6 ++++ .../hexcasting/models/staff/neural.json | 16 +++++++++ .../recipes/tools/staff/neural.json | 32 ++++++++++++++++++ .../data/hexcasting/recipe/staff/neural.json | 24 +++++++++++++ .../data/hexcasting/tags/item/staves.json | 3 +- .../forge/datagen/xplat/HexItemModels.java | 1 + 21 files changed, 236 insertions(+), 4 deletions(-) create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/staff/neural.json create mode 100644 Common/src/generated/resources/assets/hexcasting/models/staff/neural.json create mode 100644 Common/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json create mode 100644 Common/src/generated/resources/data/hexcasting/recipe/staff/neural.json create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/staff/neural.png create mode 100644 Fabric/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json create mode 100644 Fabric/src/generated/resources/data/hexcasting/recipe/staff/neural.json create mode 100644 Neoforge/src/generated/resources/assets/hexcasting/models/item/staff/neural.json create mode 100644 Neoforge/src/generated/resources/assets/hexcasting/models/staff/neural.json create mode 100644 Neoforge/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json create mode 100644 Neoforge/src/generated/resources/data/hexcasting/recipe/staff/neural.json diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/staff/neural.json b/Common/src/generated/resources/assets/hexcasting/models/item/staff/neural.json new file mode 100644 index 0000000000..9d11027240 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/staff/neural.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld_rod", + "textures": { + "layer0": "hexcasting:item/staff/neural" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/assets/hexcasting/models/staff/neural.json b/Common/src/generated/resources/assets/hexcasting/models/staff/neural.json new file mode 100644 index 0000000000..4890c91a60 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/staff/neural.json @@ -0,0 +1,16 @@ +{ + "overrides": [ + { + "model": "hexcasting:item/neural_staff", + "predicate": { + "hexcasting:funny_level": 0.0 + } + }, + { + "model": "hexcasting:item/cherry_staff", + "predicate": { + "hexcasting:funny_level": 2.0 + } + } + ] +} \ No newline at end of file diff --git a/Common/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json b/Common/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json new file mode 100644 index 0000000000..c3502060e1 --- /dev/null +++ b/Common/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "hexcasting:charged_amethyst" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "hexcasting:staff/neural" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "hexcasting:staff/neural" + ] + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/data/hexcasting/recipe/staff/neural.json b/Common/src/generated/resources/data/hexcasting/recipe/staff/neural.json new file mode 100644 index 0000000000..6397db86d8 --- /dev/null +++ b/Common/src/generated/resources/data/hexcasting/recipe/staff/neural.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "key": { + "A": { + "item": "hexcasting:charged_amethyst" + }, + "B": { + "item": "minecraft:bone" + }, + "F": { + "item": "hexcasting:neural_fiber" + } + }, + "pattern": [ + " FA", + " BF", + "B " + ], + "result": { + "count": 1, + "id": "hexcasting:staff/neural" + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/data/hexcasting/tags/item/staves.json b/Common/src/generated/resources/data/hexcasting/tags/item/staves.json index 29f4595c62..c3b2e7c4f8 100644 --- a/Common/src/generated/resources/data/hexcasting/tags/item/staves.json +++ b/Common/src/generated/resources/data/hexcasting/tags/item/staves.json @@ -13,6 +13,7 @@ "hexcasting:staff/cherry", "hexcasting:staff/bamboo", "hexcasting:staff/quenched", - "hexcasting:staff/mindsplice" + "hexcasting:staff/mindsplice", + "hexcasting:staff/neural" ] } \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java b/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java index 70b12989bc..0bc3caeaef 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java +++ b/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java @@ -114,6 +114,7 @@ public static void init() { registerWandOverrides(HexItems.STAFF_EDIFIED.get()); // purposely skip quenched registerWandOverrides(HexItems.STAFF_MINDSPLICE.get()); + registerWandOverrides(HexItems.STAFF_NEURAL.get()); registerGaslight4(HexItems.STAFF_QUENCHED.get()); registerGaslight4(HexBlocks.QUENCHED_ALLAY.get().asItem()); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java index f4f21daf35..0071da917b 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java @@ -72,6 +72,7 @@ public static void registerItemsForCreativeTab(ResourceKey tabK public static final Supplier STAFF_QUENCHED = make("staff/quenched", () -> new ItemStaff(unstackable().rarity(Rarity.UNCOMMON))); // mindsplice staffaratus public static final Supplier STAFF_MINDSPLICE = make("staff/mindsplice", () -> new ItemStaff(unstackable().rarity(Rarity.UNCOMMON))); + public static final Supplier STAFF_NEURAL = make("staff/neural", () -> new ItemStaff(unstackable().rarity(Rarity.UNCOMMON))); public static final Supplier SCRYING_LENS = make("lens", () -> new ItemLens( IXplatAbstractions.INSTANCE.addEquipSlotFabric(EquipmentSlot.HEAD) diff --git a/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java b/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java index 3162c2ecab..edf414dc89 100644 --- a/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java +++ b/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java @@ -102,6 +102,15 @@ public void buildRecipes(RecipeOutput recipes) { staffRecipe(recipes, HexItems.STAFF_EDIFIED.get(), HexBlocks.EDIFIED_PLANKS.get().asItem()); staffRecipe(recipes, HexItems.STAFF_QUENCHED.get(), HexItems.QUENCHED_SHARD.get()); staffRecipe(recipes, HexItems.STAFF_MINDSPLICE.get(), Ingredient.of(HexTags.Items.MINDFLAYED_CIRCLE_COMPONENTS)); + ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, HexItems.STAFF_NEURAL.get()) + .define('F', HexItems.NEURAL_FIBER.get()) + .define('B', Items.BONE) + .define('A', HexItems.CHARGED_AMETHYST.get()) + .pattern(" FA") + .pattern(" BF") + .pattern("B ") + .unlockedBy("has_item", hasItem(HexItems.CHARGED_AMETHYST.get())) + .save(recipes); ShapelessRecipeBuilder.shapeless(RecipeCategory.TOOLS, HexItems.THOUGHT_KNOT.get()) .requires(HexItems.AMETHYST_DUST.get()) diff --git a/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexItemTagProvider.java b/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexItemTagProvider.java index 2f97a1209e..48f06f52d4 100644 --- a/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexItemTagProvider.java +++ b/Common/src/main/java/at/petrak/hexcasting/datagen/tag/HexItemTagProvider.java @@ -40,7 +40,7 @@ protected void addTags(HolderLookup.Provider provider) { HexItems.STAFF_JUNGLE.get(), HexItems.STAFF_ACACIA.get(), HexItems.STAFF_DARK_OAK.get(), HexItems.STAFF_CRIMSON.get(), HexItems.STAFF_WARPED.get(), HexItems.STAFF_MANGROVE.get(), HexItems.STAFF_CHERRY.get(),HexItems.STAFF_BAMBOO.get(), - HexItems.STAFF_QUENCHED.get(), HexItems.STAFF_MINDSPLICE.get()); + HexItems.STAFF_QUENCHED.get(), HexItems.STAFF_MINDSPLICE.get(), HexItems.STAFF_NEURAL.get()); add(tag(HexTags.Items.PHIAL_BASE), Items.GLASS_BOTTLE); diff --git a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 index eff6c008f5..257f6443ac 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 @@ -18,6 +18,7 @@ edified: "Edified Staff", quenched: "Quenched Shard Staff", mindsplice: "Mindsplice Staff", + neural: "Neural Staff", }, amethyst_dust: "Amethyst Dust", diff --git a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/fanciful_staves.json b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/fanciful_staves.json index d283b0c651..25d3b0073c 100644 --- a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/fanciful_staves.json +++ b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/fanciful_staves.json @@ -14,6 +14,10 @@ "type": "patchouli:crafting", "recipe": "hexcasting:staff/quenched", "recipe2": "hexcasting:staff/mindsplice" + }, + { + "type": "patchouli:crafting", + "recipe": "hexcasting:staff/neural" } ] } diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/staff/neural.png b/Common/src/main/resources/assets/hexcasting/textures/item/staff/neural.png new file mode 100644 index 0000000000000000000000000000000000000000..b0544f35903b415a9dd40dec517788323071a7aa GIT binary patch literal 863 zcmV-l1EBngP)EX>4Tx04R}tk-tmBKpe$iQ^g_`2Rn$0WT;LSii$W&6^me@v=v%)FuC*>G-*gu zTpR`0f`dO6s}3&Cx;nTDg5VDj{{V4PbdeIjmlRsWcyQc@clRE5?*O4uVXD~`1ys#4 zQt_CW&8><(uLxii0)`Qln5ieyiy3&1uY36TdKckY-sk=teM;VBfKMczW4d7xZxGLH zS~}-_;t(rI3h_Ddgh3Z1e&o9B@*C%(!vfC?8JW~PafnzfcCg&RtYoOf)5Kv#)hJ)c zx~y>C;;dF`taVTR!eCxoNpqd%2;x{m0!fIFQ9~IOScuT7kzyi6`!NsykmFC1OD0zt zj2sK7LWSh`!T;cQw`O5#(oG7+fbJLD{ul##c7bNyw!e>UyLkfmpMfi_?XNa~*-z5z zZ7qBR^lt+f*KJMS11@)f!6#iZBuDbo6bc34{fxdT2MpW-y=!i7t$mz602%6P`35*R z1jdV$z3%buKxc3No@w>>1Guwt!`H%rGXMYp24YJ`L;$q_pa6|)6`tk*000SaNLh0L z01FcU01FcV0GgZ_00007bV*G`2kHnO11l`OQ`Y(b000?uMObu0Z*6U5Zgc=ca%Ew3 zWn>_CX>@2HM@dakSAh-}0003tNkl|&9t6ki;0Q@g- zx~7Zkw&mzJBk^cj1~P|j86MnyY-srVKKeQ_9!<-_#4G?ap|IDmT}t`8EgntF&z}d@ ptepB#Z~(x(s{j?wvsW7b9bZ)jpq)f7z1{!-002ovPDHLkV1iV`c~<}c literal 0 HcmV?d00001 diff --git a/Fabric/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json b/Fabric/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json new file mode 100644 index 0000000000..c3502060e1 --- /dev/null +++ b/Fabric/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "hexcasting:charged_amethyst" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "hexcasting:staff/neural" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "hexcasting:staff/neural" + ] + } +} \ No newline at end of file diff --git a/Fabric/src/generated/resources/data/hexcasting/recipe/staff/neural.json b/Fabric/src/generated/resources/data/hexcasting/recipe/staff/neural.json new file mode 100644 index 0000000000..6397db86d8 --- /dev/null +++ b/Fabric/src/generated/resources/data/hexcasting/recipe/staff/neural.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "key": { + "A": { + "item": "hexcasting:charged_amethyst" + }, + "B": { + "item": "minecraft:bone" + }, + "F": { + "item": "hexcasting:neural_fiber" + } + }, + "pattern": [ + " FA", + " BF", + "B " + ], + "result": { + "count": 1, + "id": "hexcasting:staff/neural" + } +} \ No newline at end of file diff --git a/Fabric/src/generated/resources/data/hexcasting/tags/item/staves.json b/Fabric/src/generated/resources/data/hexcasting/tags/item/staves.json index 29f4595c62..c3b2e7c4f8 100644 --- a/Fabric/src/generated/resources/data/hexcasting/tags/item/staves.json +++ b/Fabric/src/generated/resources/data/hexcasting/tags/item/staves.json @@ -13,6 +13,7 @@ "hexcasting:staff/cherry", "hexcasting:staff/bamboo", "hexcasting:staff/quenched", - "hexcasting:staff/mindsplice" + "hexcasting:staff/mindsplice", + "hexcasting:staff/neural" ] } \ No newline at end of file diff --git a/Neoforge/src/generated/resources/assets/hexcasting/models/item/staff/neural.json b/Neoforge/src/generated/resources/assets/hexcasting/models/item/staff/neural.json new file mode 100644 index 0000000000..9d11027240 --- /dev/null +++ b/Neoforge/src/generated/resources/assets/hexcasting/models/item/staff/neural.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/handheld_rod", + "textures": { + "layer0": "hexcasting:item/staff/neural" + } +} \ No newline at end of file diff --git a/Neoforge/src/generated/resources/assets/hexcasting/models/staff/neural.json b/Neoforge/src/generated/resources/assets/hexcasting/models/staff/neural.json new file mode 100644 index 0000000000..4890c91a60 --- /dev/null +++ b/Neoforge/src/generated/resources/assets/hexcasting/models/staff/neural.json @@ -0,0 +1,16 @@ +{ + "overrides": [ + { + "model": "hexcasting:item/neural_staff", + "predicate": { + "hexcasting:funny_level": 0.0 + } + }, + { + "model": "hexcasting:item/cherry_staff", + "predicate": { + "hexcasting:funny_level": 2.0 + } + } + ] +} \ No newline at end of file diff --git a/Neoforge/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json b/Neoforge/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json new file mode 100644 index 0000000000..c3502060e1 --- /dev/null +++ b/Neoforge/src/generated/resources/data/hexcasting/advancement/recipes/tools/staff/neural.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "hexcasting:charged_amethyst" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "hexcasting:staff/neural" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "hexcasting:staff/neural" + ] + } +} \ No newline at end of file diff --git a/Neoforge/src/generated/resources/data/hexcasting/recipe/staff/neural.json b/Neoforge/src/generated/resources/data/hexcasting/recipe/staff/neural.json new file mode 100644 index 0000000000..6397db86d8 --- /dev/null +++ b/Neoforge/src/generated/resources/data/hexcasting/recipe/staff/neural.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "key": { + "A": { + "item": "hexcasting:charged_amethyst" + }, + "B": { + "item": "minecraft:bone" + }, + "F": { + "item": "hexcasting:neural_fiber" + } + }, + "pattern": [ + " FA", + " BF", + "B " + ], + "result": { + "count": 1, + "id": "hexcasting:staff/neural" + } +} \ No newline at end of file diff --git a/Neoforge/src/generated/resources/data/hexcasting/tags/item/staves.json b/Neoforge/src/generated/resources/data/hexcasting/tags/item/staves.json index 29f4595c62..c3b2e7c4f8 100644 --- a/Neoforge/src/generated/resources/data/hexcasting/tags/item/staves.json +++ b/Neoforge/src/generated/resources/data/hexcasting/tags/item/staves.json @@ -13,6 +13,7 @@ "hexcasting:staff/cherry", "hexcasting:staff/bamboo", "hexcasting:staff/quenched", - "hexcasting:staff/mindsplice" + "hexcasting:staff/mindsplice", + "hexcasting:staff/neural" ] } \ No newline at end of file diff --git a/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java b/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java index ab0e8b6a27..e7fde49041 100644 --- a/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java +++ b/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java @@ -104,6 +104,7 @@ protected void registerModels() { buildStaff(HexItems.STAFF_BAMBOO.get(), "bamboo"); buildStaff(HexItems.STAFF_EDIFIED.get(), "edified"); buildStaff(HexItems.STAFF_MINDSPLICE.get(), "mindsplice"); + buildStaff(HexItems.STAFF_NEURAL.get(), "neural"); // again, doesn't like paths with slashes in them, so we do it manually buildFourVariantGaslight("item/staff/quenched", "item/staff/quenched", (name, path) -> From dc8d196cebc7506c7aca79c284f4fed3b0ce9f32 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Tue, 8 Sep 2026 17:38:19 -0400 Subject: [PATCH 02/11] Implement neural mesh (placeholder model/texture) --- .../hexcasting/models/item/neural_mesh.json | 6 + .../client/RegisterClientStuff.java | 1 + .../common/blocks/BlockNeuralMesh.java | 27 ++++ .../hexcasting/common/lib/HexBlocks.java | 14 +- .../hexcasting/blockstates/neural_mesh.json | 150 ++++++++++++++++++ .../hexcasting/models/block/neural_mesh.json | 18 +++ .../hexcasting/textures/block/neural_mesh.png | Bin 0 -> 5662 bytes .../hexcasting/models/item/neural_mesh.json | 6 + .../forge/datagen/xplat/HexItemModels.java | 4 + 9 files changed, 222 insertions(+), 4 deletions(-) create mode 100644 Common/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json create mode 100644 Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java create mode 100644 Common/src/main/resources/assets/hexcasting/blockstates/neural_mesh.json create mode 100644 Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json create mode 100644 Common/src/main/resources/assets/hexcasting/textures/block/neural_mesh.png create mode 100644 Neoforge/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json b/Common/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json new file mode 100644 index 0000000000..02633ca951 --- /dev/null +++ b/Common/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:block/neural_mesh" + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java b/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java index 0bc3caeaef..c819d3fc3a 100644 --- a/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java +++ b/Common/src/main/java/at/petrak/hexcasting/client/RegisterClientStuff.java @@ -129,6 +129,7 @@ public static void init() { x.setRenderLayer(HexBlocks.EDIFIED_TRAPDOOR.get(), RenderType.cutout()); x.setRenderLayer(HexBlocks.AKASHIC_BOOKSHELF.get(), RenderType.cutout()); x.setRenderLayer(HexBlocks.SCONCE.get(), RenderType.cutout()); + x.setRenderLayer(HexBlocks.NEURAL_MESH.get(), RenderType.cutout()); x.setRenderLayer(HexBlocks.AMETHYST_EDIFIED_LEAVES.get(), RenderType.cutoutMipped()); x.setRenderLayer(HexBlocks.AVENTURINE_EDIFIED_LEAVES.get(), RenderType.cutoutMipped()); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java new file mode 100644 index 0000000000..c57284bce2 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java @@ -0,0 +1,27 @@ +package at.petrak.hexcasting.common.blocks; + +import com.mojang.serialization.MapCodec; + +import net.minecraft.world.level.block.GlowLichenBlock; +import net.minecraft.world.level.block.MultifaceBlock; +import net.minecraft.world.level.block.MultifaceSpreader; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BooleanProperty; + +public class BlockNeuralMesh extends MultifaceBlock { + public static final MapCodec CODEC = simpleCodec(BlockNeuralMesh::new); + private final MultifaceSpreader spreader = new MultifaceSpreader(this); + + public MapCodec codec() { + return CODEC; + } + + public BlockNeuralMesh(BlockBehaviour.Properties arg) { + super(arg); + } + + public MultifaceSpreader getSpreader() { + return this.spreader; + } +} diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java index 4f9fd2f54e..1d93e3c645 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java @@ -1,10 +1,7 @@ package at.petrak.hexcasting.common.lib; import at.petrak.hexcasting.api.block.circle.BlockAbstractImpetus; -import at.petrak.hexcasting.common.blocks.BlockConjured; -import at.petrak.hexcasting.common.blocks.BlockConjuredLight; -import at.petrak.hexcasting.common.blocks.BlockFlammable; -import at.petrak.hexcasting.common.blocks.BlockQuenchedAllay; +import at.petrak.hexcasting.common.blocks.*; import at.petrak.hexcasting.common.blocks.akashic.BlockAkashicBookshelf; import at.petrak.hexcasting.common.blocks.akashic.BlockAkashicLigature; import at.petrak.hexcasting.common.blocks.akashic.BlockAkashicRecord; @@ -197,6 +194,15 @@ private static BlockBehaviour.Properties quenched() { HexItems.props().rarity(Rarity.UNCOMMON) ); + public static final Supplier NEURAL_MESH = blockItem("neural_mesh", () -> + new BlockNeuralMesh(BlockBehaviour.Properties.of() + .noCollission() + .strength(0.2F) + .sound(SoundType.GLOW_LICHEN) + .pushReaction(PushReaction.DESTROY) + ) + ); + // Decoration?! public static final Supplier QUENCHED_ALLAY_TILES = blockItem("quenched_allay_tiles", () -> new BlockQuenchedAllay(quenched())); public static final Supplier QUENCHED_ALLAY_BRICKS = blockItem("quenched_allay_bricks", () -> new BlockQuenchedAllay(quenched())); diff --git a/Common/src/main/resources/assets/hexcasting/blockstates/neural_mesh.json b/Common/src/main/resources/assets/hexcasting/blockstates/neural_mesh.json new file mode 100644 index 0000000000..71cd44e549 --- /dev/null +++ b/Common/src/main/resources/assets/hexcasting/blockstates/neural_mesh.json @@ -0,0 +1,150 @@ +{ + "multipart": [ + { + "apply": { + "model": "hexcasting:block/neural_mesh" + }, + "when": { + "north": "true" + } + }, + { + "apply": { + "model": "hexcasting:block/neural_mesh" + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + }, + { + "apply": { + "model": "hexcasting:block/neural_mesh", + "uvlock": true, + "y": 90 + }, + "when": { + "east": "true" + } + }, + { + "apply": { + "model": "hexcasting:block/neural_mesh", + "uvlock": true, + "y": 90 + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + }, + { + "apply": { + "model": "hexcasting:block/neural_mesh", + "uvlock": true, + "y": 180 + }, + "when": { + "south": "true" + } + }, + { + "apply": { + "model": "hexcasting:block/neural_mesh", + "uvlock": true, + "y": 180 + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + }, + { + "apply": { + "model": "hexcasting:block/neural_mesh", + "uvlock": true, + "y": 270 + }, + "when": { + "west": "true" + } + }, + { + "apply": { + "model": "hexcasting:block/neural_mesh", + "uvlock": true, + "y": 270 + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + }, + { + "apply": { + "model": "hexcasting:block/neural_mesh", + "uvlock": true, + "x": 270 + }, + "when": { + "up": "true" + } + }, + { + "apply": { + "model": "hexcasting:block/neural_mesh", + "uvlock": true, + "x": 270 + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + }, + { + "apply": { + "model": "hexcasting:block/neural_mesh", + "uvlock": true, + "x": 90 + }, + "when": { + "down": "true" + } + }, + { + "apply": { + "model": "hexcasting:block/neural_mesh", + "uvlock": true, + "x": 90 + }, + "when": { + "down": "false", + "east": "false", + "north": "false", + "south": "false", + "up": "false", + "west": "false" + } + } + ] +} \ No newline at end of file diff --git a/Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json b/Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json new file mode 100644 index 0000000000..cb6b66b6c1 --- /dev/null +++ b/Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json @@ -0,0 +1,18 @@ +{ + "ambientocclusion": false, + "textures": { + "particle": "hexcasting:block/neural_mesh", + "neural_mesh": "hexcasting:block/neural_mesh" + }, + "render_type": "cutout", + "elements": [ + { + "from": [ 0, 0, 0.1 ], + "to": [ 16, 16, 0.1 ], + "faces": { + "north": { "uv": [ 16, 0, 0, 16 ], "texture": "#neural_mesh" }, + "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#neural_mesh" } + } + } + ] +} \ No newline at end of file diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/neural_mesh.png b/Common/src/main/resources/assets/hexcasting/textures/block/neural_mesh.png new file mode 100644 index 0000000000000000000000000000000000000000..9ad672f7b4c241df066367cb9b1734b098dcb7af GIT binary patch literal 5662 zcmeHLXH*ku7Y;=!qJnhf(-2vTm}F8&qezt+KnM_u%8;2rfRK;`60jk5te_yEpkSl9 zDhMJ9EQ$?RP*hx91w@b)7qG3^fNug8Jl~%49nabQXU>_-%=Qv-=?yE5ng;Fj~VX-CtpcE|>3AnsC7%fQ_!f05=~C0YG_rO}mG+@+ zuPAIQ;nM?3Zjy5b!Qln|fArFqHI-G)KAMH z+tGJq^gy(c|9`X&1{^5@bS>v-i{@|Qgq@!{R2}A?c&fKbd*Q0vbDOcX!9QJ=4s_K; z0>wFHnVwxGIx|tFV+%?)`LGLwDh28z_J&zYU3!IAa`(4ep%y>$`>W)}_N*%N*2_UmR9*zlB*>UGW;d zC!%QY8|COA+D8pmP4A2vyCTNgDollYO{GSrWALs}Jwtd`BCqn-)Z#O&O|xz5pFT}%Pnqv-`LW-s zD{`=9>eiO<)lM2)uTb)1^i&!KAKyt1jJP4e59_E2w z(q0tO`^)r~Gaw#cbD_`jCO>j>G-s=Ii%i@5RC7#hc~#4sB7=NU-oAu(dfyV^O{?Q| zFWPN}Rz4>P{Vej#e(Oq`Y0{*+S1WH`keg~#4z1+Su0m*+m;HJj(s}b|aTV8bAB;r{ z!dZ?Z7S%P~UKS^t)BQ?o^J2=%>Ngn8b~V|4tXsh8TkaDxD2}0v&E*n zF*<5+^@~M5L$b#W@ODPx%-jz>16!-wb`+iiC>1Ac0xh7qdhf5;Q?~q6f3hFHuOiS; zvUs)Q;;qA>feOn*mX(*zxui66ps9AfD9kru#hP?cP4&w=o96e{1@0|r2`oNYc76|)PY8dv0+92mp&;F-(VM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?XIe4;M!k?b`YPlkFD(P2>IVH>N6jjW~EJy_!~O+wBk` zIf3@IP$fOn-oE6JvziU-s{ge2>2~Dy=A^cr<#jeTXCE)o7_j*5UG}Pu*KTo^(W0f< ztFjO8heb>Mi!?5v6+PFSqL#Hepk(1=#3y94XC9TB-kM_<)yV;t0Q}_LTK%K_2HJ@o zxroVhlQ$j7QIgCL&(u(WvyFOVRTbOWfzO9RogMn}Z#os=x0!^H>+2UXjQ~2{`%=u{ zadV$LT2)mwBcr>m4el?dsgwu;_GEGdQ;Axwd(6^zXJ1#BEY~3{_cSY9Vr05fYEg2{ u{C5A*J9Q6fK5*@9LvC#Ta65a~N2LSNAH)B&JgS6fgz|9parxOPBJIBgRD~7* literal 0 HcmV?d00001 diff --git a/Neoforge/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json b/Neoforge/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json new file mode 100644 index 0000000000..02633ca951 --- /dev/null +++ b/Neoforge/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "hexcasting:block/neural_mesh" + } +} \ No newline at end of file diff --git a/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java b/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java index e7fde49041..4f29d07021 100644 --- a/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java +++ b/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java @@ -81,6 +81,10 @@ protected void registerModels() { .translation(-2.5f, 0f, -8f) .scale(0.4f); + singleTexture(getPath(HexBlocks.NEURAL_MESH.get()), + ResourceLocation.withDefaultNamespace("item/generated"), + "layer0", modLoc("block/neural_mesh")); + buildRobes(HexItems.ROBES_HOOD.get(), "hood", HexItems.ROBES_HOOD.get().numVariants()); buildRobes(HexItems.ROBES_TUNIC.get(), "tunic", HexItems.ROBES_HOOD.get().numVariants()); buildRobes(HexItems.ROBES_LEGS.get(), "legs", HexItems.ROBES_HOOD.get().numVariants()); From b8a10c22cfdeee7fc2c0c419c0fb36629a004e60 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Tue, 8 Sep 2026 17:38:54 -0400 Subject: [PATCH 03/11] Proper model/texture --- .../hexcasting/models/item/neural_mesh.json | 2 +- .../hexcasting/common/lib/HexBlocks.java | 2 +- .../hexcasting/blockstates/neural_mesh.json | 10 ------- .../hexcasting/models/block/neural_mesh.json | 26 ++++++++++++++++-- .../hexcasting/textures/block/neural_mesh.png | Bin 5662 -> 7121 bytes .../hexcasting/textures/item/neural_mesh.png | Bin 0 -> 6227 bytes .../hexcasting/models/item/neural_mesh.json | 2 +- .../forge/datagen/xplat/HexItemModels.java | 4 +-- 8 files changed, 27 insertions(+), 19 deletions(-) create mode 100644 Common/src/main/resources/assets/hexcasting/textures/item/neural_mesh.png diff --git a/Common/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json b/Common/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json index 02633ca951..4f9fe9bf8a 100644 --- a/Common/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json +++ b/Common/src/generated/resources/assets/hexcasting/models/item/neural_mesh.json @@ -1,6 +1,6 @@ { "parent": "minecraft:item/generated", "textures": { - "layer0": "hexcasting:block/neural_mesh" + "layer0": "hexcasting:item/neural_mesh" } } \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java index 1d93e3c645..bc7f3c17f3 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java @@ -198,7 +198,7 @@ private static BlockBehaviour.Properties quenched() { new BlockNeuralMesh(BlockBehaviour.Properties.of() .noCollission() .strength(0.2F) - .sound(SoundType.GLOW_LICHEN) + .sound(SoundType.DEEPSLATE_TILES) .pushReaction(PushReaction.DESTROY) ) ); diff --git a/Common/src/main/resources/assets/hexcasting/blockstates/neural_mesh.json b/Common/src/main/resources/assets/hexcasting/blockstates/neural_mesh.json index 71cd44e549..f5b66df718 100644 --- a/Common/src/main/resources/assets/hexcasting/blockstates/neural_mesh.json +++ b/Common/src/main/resources/assets/hexcasting/blockstates/neural_mesh.json @@ -24,7 +24,6 @@ { "apply": { "model": "hexcasting:block/neural_mesh", - "uvlock": true, "y": 90 }, "when": { @@ -34,7 +33,6 @@ { "apply": { "model": "hexcasting:block/neural_mesh", - "uvlock": true, "y": 90 }, "when": { @@ -49,7 +47,6 @@ { "apply": { "model": "hexcasting:block/neural_mesh", - "uvlock": true, "y": 180 }, "when": { @@ -59,7 +56,6 @@ { "apply": { "model": "hexcasting:block/neural_mesh", - "uvlock": true, "y": 180 }, "when": { @@ -74,7 +70,6 @@ { "apply": { "model": "hexcasting:block/neural_mesh", - "uvlock": true, "y": 270 }, "when": { @@ -84,7 +79,6 @@ { "apply": { "model": "hexcasting:block/neural_mesh", - "uvlock": true, "y": 270 }, "when": { @@ -99,7 +93,6 @@ { "apply": { "model": "hexcasting:block/neural_mesh", - "uvlock": true, "x": 270 }, "when": { @@ -109,7 +102,6 @@ { "apply": { "model": "hexcasting:block/neural_mesh", - "uvlock": true, "x": 270 }, "when": { @@ -124,7 +116,6 @@ { "apply": { "model": "hexcasting:block/neural_mesh", - "uvlock": true, "x": 90 }, "when": { @@ -134,7 +125,6 @@ { "apply": { "model": "hexcasting:block/neural_mesh", - "uvlock": true, "x": 90 }, "when": { diff --git a/Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json b/Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json index cb6b66b6c1..1c6b45d6ea 100644 --- a/Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json +++ b/Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json @@ -1,7 +1,7 @@ { "ambientocclusion": false, "textures": { - "particle": "hexcasting:block/neural_mesh", + "particle": "hexcasting:block/slate", "neural_mesh": "hexcasting:block/neural_mesh" }, "render_type": "cutout", @@ -10,8 +10,28 @@ "from": [ 0, 0, 0.1 ], "to": [ 16, 16, 0.1 ], "faces": { - "north": { "uv": [ 16, 0, 0, 16 ], "texture": "#neural_mesh" }, - "south": { "uv": [ 0, 0, 16, 16 ], "texture": "#neural_mesh" } + "north": { "uv": [ 8, 0, 0, 8 ], "texture": "#neural_mesh" }, + "south": { "uv": [ 0, 0, 8, 8 ], "texture": "#neural_mesh" } + } + }, + { + "from": [ 0, 0, 0.3 ], + "to": [ 16, 16, 0.3 ], + "faces": { + "north": { "uv": [ 16, 0, 8, 8 ], "texture": "#neural_mesh" }, + "south": { "uv": [ 8, 0, 16, 8 ], "texture": "#neural_mesh" } + } + }, + { + "from": [3, 3, 0], + "to": [13, 13, 1], + "faces": { + "north": {"uv": [1.5, 9.5, 6.5, 14.5], "texture": "#neural_mesh"}, + "south": {"uv": [1.5, 9.5, 6.5, 14.5], "texture": "#neural_mesh"}, + "east": {"uv": [6, 9.5, 6.5, 14.5], "texture": "#neural_mesh"}, + "west": {"uv": [1.5, 9.5, 2, 14.5], "texture": "#neural_mesh"}, + "up": {"uv": [1.5, 9.5, 6.5, 10], "texture": "#neural_mesh"}, + "down": {"uv": [1.5, 14, 6.5, 14.5], "texture": "#neural_mesh"} } } ] diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/neural_mesh.png b/Common/src/main/resources/assets/hexcasting/textures/block/neural_mesh.png index 9ad672f7b4c241df066367cb9b1734b098dcb7af..acbb754539014d8c243086608053f09ff9f0f713 100644 GIT binary patch delta 3491 zcmV;U4P5e`EYUZAiBL{Q4GJ0x0000DNk~Le0000W0000W2nGNE0CReJ^Z)<~H+oc9 zbW&k=AaHVTW@&6?Aar?fWgumEX=VTbc-pO)X?7zy4ut>n6mx{+0)jja*Z1ZIbNupMP)nFaDy};F4&`HRp?ezf@BVjYhfdzji+Tm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r%ATLxzMIazO{M-0Ad{@`+@Lb_n79c**5`d33 zLt)Sy4*F*gp~yZA0{J?i|L7s~hPH8NPf*AU70^NZFpw)+{4)fD{@tG+Dqzo~!=R%< zHpqcYg-}$pe}r_Txq5u}kWvuD;_zp@AhQ2qDPl2ykoAwTNi{R+{5%lI{X6bItiRijx>D?T^ib*WXm(VDG(LsFqq7*4nMX1mBoW8}fF$FwL?jNNW03&J2ts+ClHUtGsrj$l0hZ|NL(O}fFu)0bR>qzAdvw&0i-j5 zpCH@?ET}61_Rph|LNOpH&p=>C&0uT`K z1l~Lzn~IPQ3NH2hu6Bhc6ax?ec7O z27%D}@wH*U$yxuQ8L)JKNFp;ZNHU0nDu^Xvp=Q7nk=Rv4G8U>Q78m%XpT46Dc}$TQ z5P&v85RVX7P=n5J1z+~HRHiemeYY0}gVH)clp!%>|*}ObokYtT5OKNfh}`zCsvm zu7>oQ1v{Fh1qtOvG*^51KE+uINR)-sfm-M=-9fXn@h08l95f5o02bVd);#~{@m#H> zpqsIsfx9(~PQ0`!BgyK^$j37IsmXX*zhqR-F5Q#Ko3r^{jcXgTGiS{`YU>%dy1UUK zaW%auY@pYpYX5M3MR&(U<;3UV_US*Ow-ePrUI4@=wucuz2kF;z$^FUcVYJx zDqkyG8|H7`8b4eWB@wrl&(&eq&}#H`Xs?tI)+(?br7K!WKC1hw$qd-OeEiOK}Zl>rqW NMzeRbD_kA0 Date: Tue, 1 Sep 2026 16:58:36 -0400 Subject: [PATCH 04/11] Better texture, add recipe for mesh --- .../recipes/redstone/neural_mesh.json | 32 ++++++++++++++++++ .../data/hexcasting/recipe/neural_mesh.json | 24 +++++++++++++ .../common/blocks/BlockNeuralMesh.java | 7 ++++ .../hexcasting/common/lib/HexBlocks.java | 20 ++++++----- .../hexcasting/common/lib/HexItems.java | 2 ++ .../datagen/recipe/HexplatRecipes.java | 3 ++ .../hexcasting/textures/block/neural_mesh.png | Bin 7121 -> 7248 bytes .../hexcasting/textures/item/neural_mesh.png | Bin 6227 -> 913 bytes .../hexcasting/textures/item/staff/neural.png | Bin 863 -> 865 bytes .../recipes/redstone/neural_mesh.json | 32 ++++++++++++++++++ .../data/hexcasting/recipe/neural_mesh.json | 24 +++++++++++++ .../recipes/redstone/neural_mesh.json | 32 ++++++++++++++++++ .../data/hexcasting/recipe/neural_mesh.json | 24 +++++++++++++ .../forge/datagen/xplat/HexItemModels.java | 2 +- 14 files changed, 192 insertions(+), 10 deletions(-) create mode 100644 Common/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json create mode 100644 Common/src/generated/resources/data/hexcasting/recipe/neural_mesh.json create mode 100644 Fabric/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json create mode 100644 Fabric/src/generated/resources/data/hexcasting/recipe/neural_mesh.json create mode 100644 Neoforge/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json create mode 100644 Neoforge/src/generated/resources/data/hexcasting/recipe/neural_mesh.json diff --git a/Common/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json b/Common/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json new file mode 100644 index 0000000000..5a76172263 --- /dev/null +++ b/Common/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "hexcasting:neural_fiber" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "hexcasting:neural_mesh" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "hexcasting:neural_mesh" + ] + } +} \ No newline at end of file diff --git a/Common/src/generated/resources/data/hexcasting/recipe/neural_mesh.json b/Common/src/generated/resources/data/hexcasting/recipe/neural_mesh.json new file mode 100644 index 0000000000..b1ae10c52c --- /dev/null +++ b/Common/src/generated/resources/data/hexcasting/recipe/neural_mesh.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "C": { + "item": "hexcasting:neural_fiber" + }, + "D": { + "item": "hexcasting:neural_fiber" + }, + "I": { + "item": "minecraft:bone_block" + } + }, + "pattern": [ + "DCD", + "CIC", + "DCD" + ], + "result": { + "count": 1, + "id": "hexcasting:neural_mesh" + } +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java index c57284bce2..65644e400e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java @@ -1,7 +1,9 @@ package at.petrak.hexcasting.common.blocks; +import at.petrak.hexcasting.common.lib.HexItems; import com.mojang.serialization.MapCodec; +import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.block.GlowLichenBlock; import net.minecraft.world.level.block.MultifaceBlock; import net.minecraft.world.level.block.MultifaceSpreader; @@ -24,4 +26,9 @@ public BlockNeuralMesh(BlockBehaviour.Properties arg) { public MultifaceSpreader getSpreader() { return this.spreader; } + + @Override + protected boolean canBeReplaced(BlockState blockState, BlockPlaceContext blockPlaceContext) { + return blockPlaceContext.getItemInHand().is(HexItems.NEURAL_MESH.get()); + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java index bc7f3c17f3..0138f0f232 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java @@ -142,10 +142,19 @@ private static BlockBehaviour.Properties quenched() { .isViewBlocking(HexBlocks::never)), new Item.Properties()); - // "no" item because we add it manually + // "no" item because we add them manually in HexItems + // these must be registered before anything that references HexItems to avoid initializer errors public static final Supplier SLATE = blockNoItem("slate", () -> new BlockSlate(slateish() .pushReaction(PushReaction.DESTROY))); + public static final Supplier NEURAL_MESH = blockNoItem("neural_mesh", () -> + new BlockNeuralMesh(BlockBehaviour.Properties.of() + .noCollission() + .strength(0.2F) + .sound(SoundType.CANDLE) + .pushReaction(PushReaction.DESTROY) + ) + ); public static final Supplier IMPETUS_EMPTY = blockItem("impetus/empty", () -> new BlockEmptyImpetus(slateish() @@ -194,14 +203,7 @@ private static BlockBehaviour.Properties quenched() { HexItems.props().rarity(Rarity.UNCOMMON) ); - public static final Supplier NEURAL_MESH = blockItem("neural_mesh", () -> - new BlockNeuralMesh(BlockBehaviour.Properties.of() - .noCollission() - .strength(0.2F) - .sound(SoundType.DEEPSLATE_TILES) - .pushReaction(PushReaction.DESTROY) - ) - ); + // Decoration?! public static final Supplier QUENCHED_ALLAY_TILES = blockItem("quenched_allay_tiles", () -> new BlockQuenchedAllay(quenched())); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java index 0071da917b..b01ba152ac 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java @@ -105,6 +105,8 @@ public static void registerItemsForCreativeTab(ResourceKey tabK public static final Supplier NEURAL_FIBER = make("neural_fiber", () -> new Item(props().rarity(Rarity.UNCOMMON))); + public static final Supplier NEURAL_MESH = make("neural_mesh", () -> new BlockItem(HexBlocks.NEURAL_MESH.get(), props())); + public static final Supplier ROBES_HOOD = make("robes/hood", () -> new ItemRobes(ArmorItem.Type.HELMET, unstackable() .rarity(Rarity.UNCOMMON) diff --git a/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java b/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java index edf414dc89..781538297e 100644 --- a/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java +++ b/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java @@ -270,6 +270,9 @@ public void buildRecipes(RecipeOutput recipes) { .pattern(" S ") .unlockedBy("has_item", hasItem(Items.AMETHYST_SHARD)).save(recipes); + ring(RecipeCategory.REDSTONE, HexItems.NEURAL_MESH.get(), 1, HexItems.NEURAL_FIBER.get(), Blocks.BONE_BLOCK) + .unlockedBy("has_item", hasItem(HexItems.NEURAL_FIBER.get())).save(recipes); + ShapedRecipeBuilder.shaped(RecipeCategory.COMBAT, HexItems.ROBES_HOOD.get()) .define('F', HexItems.NEURAL_FIBER.get()) .define('B', Items.BONE) diff --git a/Common/src/main/resources/assets/hexcasting/textures/block/neural_mesh.png b/Common/src/main/resources/assets/hexcasting/textures/block/neural_mesh.png index acbb754539014d8c243086608053f09ff9f0f713..253dac0c12eb793c4ae0e591387e10f226564e38 100644 GIT binary patch delta 3636 zcmV-44$JY;H_$kcB!9qqR9JLUVRs;Ka&Km7Y-J#Hd2nSQWq4_3004N}#hGc68#@k! z|ML`cgyI5%JPy~0xxpNNKCnu1cYAsEdlNCOkcz6JxMU_0pzYRw{=MD5_=_=Smqbgh zIbZyxnrdh?%60#>^Xad2KF?ox9`XItefNG4xD~m^`)kQh|9{tg{~qAJG+Odupfa8Z z{quvGp7G0;~fA?KM zZwm9o5LWc@;xoo@FCf}GyVz*d^9dYu654X^g!tMLfcyxj_g`g2+m@Ps*y$51@0S1Z zefO2E6rL{e3xCM@ef{Bm=jF?T_?{=J6+YkZ_3HPEzMyaKy=U2H&+MY54AlAA z)N3oJMLz~fHg$06<0%kQ9YIAejuacEC5yw~E-wDlV9%zsvxd3w4A&tRUP{PD~E=@0g{ zQ1JdLZ>(5X2nIIGFy`!&ZZP8a1F9T=U$3u!#%qK@F_bMtD!}%8h%Ww{6U0Mwq@!@X zW6BM%*A)X`>` zapE5{Pn~7f*_K~OX{9AAFI{ET)izSw(e1Ql=YOrc?7G{VwTIU4UVp%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J;zehdV-X58hHR{%3e zuwGY1_5c7;JFMnTmkJ-_)tWI6Y^qg zAVv9+fW1{`x9>QXfYoejCCslc~~WNpR9OUIzpt(LbO{b;ePZUuPQ)& z#n4Xkx?U;rP4iLp8mfexBXy5XP5U=W&)d`}524&!#Y%Y?Z3pJk&OH8CL;TLw{pk;X z9%$`g`G2>g9OBK2gvqiA4K%*V%b~7pA=C(+^yMDKImh91(|P^o?zJeV2SS4q4h5mr zn(`ou#|?Zc<*TK;UwZvtU3&+34iOWRObzo#;pQL~X?;?tRf;53ixU!|yK(lXn^>j4 zlbuPb;V_M=aFQI(Juz=bnW5)+xIl^}Uu_UNYJZ=|F+8$}e+jtz`^>!Xvg-_Wi9PWZG1$Ap)o5O6! zN631ZNaHloh^0Vb-v&tqFU$&x0(xk>+JKRB?vtFK>c;&EVc!wxJ}`I)#6xV89F4cl zKYyuonwhH|Bv7j-JCo`t_|UPuAR(hTJHnYc%mHQ>=NcVY+UCf9Fu6@yjx%2gE4Ama zp0O0NElibqz-`@?ai zKZ4-Iqz=Z(v)b{j;wMLjaM$%6XSJ>v7gUbQK&SW^gMof1w&nENhWn#^d~ zZ9SvNBhIt!3fu!EIb&utIWajmEjTe_FfBATHZ(0^Vl*=?G&eOdHe_LDVKFf@lkE;4 zBR69-H)LgIW-Vi4H!v+UGd4LbIc795Eo3-mHaKHpH#IpplP?b_Brr5EHaKQwHZ3qX zV=*l>IbmZhI5symEiz(bVKg%^F*h_YG?RM|U<)-eIW;#nI59OdFq7sFa|kdrIyE&q zH8+!C5GDvPG&(gkIyEEBGaFlaT6xP=aeS jpl0Ib%JYZq`v1mXDqbw~;&Wr?00000NkvXXu0mjfy{Vb$ diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/neural_mesh.png b/Common/src/main/resources/assets/hexcasting/textures/item/neural_mesh.png index c8ce70173ed9f042d77b34c44003e249ec27fbc6..1a3069b70e567deed3f7aa27005beeb48479e9e4 100644 GIT binary patch delta 459 zcmV;+0W|*8Fp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tGsrj$l0hZ|NL(O}fFu)0bR>qzAdvw&0i-j5 zpCH@?ET}61_Rph|LNOpH&p=>C&0uT`K z1l~Lzn~IPQ3NH2hu6Bhc6ax?ec7O z27%D}@wH*U$yxuQ8L)JKNFp;ZNHU0nDu^Xvp=Q7nk=Rv4G8U>Q78m%XpT46Dc}$TQ z5P&v85RVX7P=n5J1z+~HRHiemeYY0}gVH)clp!%>|*}ObokYtT5OKNfh}`zCsvm zu7>oQ1v{Fh1qtOvG*^51KE+uINR)-sfm-M=-9fXn@h08l95f5o02bVd);#~{@m#H> zpqsIsfx9(~PQ0`!BgyK^$j37IsmXX*zhqR-F5Q#Ko3r^{jcXgTGiS{`YU>%dy1UUK zaW%auY@pYpYX5M3MR&(U<;3UV_US*Ow-ePrUI4@=wucuz2kF;z$^FUcVYJx zDqkyG8|H7`8b4eWB@wrl&(&eq&}#H`Xs?tI)+(?br7K!WKC1hw$qd-OeEiOK}Zl>rqW NMzeRbD_kA0*|{lk5Q~e>h1*K~y-)y^=9V0$~)#e^+jefkwtbO$kvEEmBKU(9#VG z(h>!?xI{}s5EW8`;owjWPI8N&i_j7TEeCQa*b;3C2d5-Ns}9|3@`yk$4SLh#@qXX; z{_p+akD>ggDHcsjI5>3D*58AH-29Y`9wip-yF75L6%oH0XV-n zWAc3;0NZJhEytC0iBq>@%PnV(0VVQ;p_Z}M={=ScaPShg0EKSV=Fc%7Y4ZDSezuUBkEO=(K~y-)y^=9V0$~)#e^+jefkuW69-}k-$ zdw=+2XuoMn#Bvf2PLns2nx3hNqZ+8U1~-*Me_qejq*HCm-bPuvf4O`|Rg#xi#d)vg@n~8GO)`gV86MnyY-srVKKeQ_9!<-_#4G?ap|IDmT}t`8EgntF&z}d@ ptepB#Z~(x(s{j?wvsW7b9bZ)jpq)f7z1{!-002ovPDHLkV1ia@vRVKD diff --git a/Fabric/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json b/Fabric/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json new file mode 100644 index 0000000000..5a76172263 --- /dev/null +++ b/Fabric/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "hexcasting:neural_fiber" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "hexcasting:neural_mesh" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "hexcasting:neural_mesh" + ] + } +} \ No newline at end of file diff --git a/Fabric/src/generated/resources/data/hexcasting/recipe/neural_mesh.json b/Fabric/src/generated/resources/data/hexcasting/recipe/neural_mesh.json new file mode 100644 index 0000000000..b1ae10c52c --- /dev/null +++ b/Fabric/src/generated/resources/data/hexcasting/recipe/neural_mesh.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "C": { + "item": "hexcasting:neural_fiber" + }, + "D": { + "item": "hexcasting:neural_fiber" + }, + "I": { + "item": "minecraft:bone_block" + } + }, + "pattern": [ + "DCD", + "CIC", + "DCD" + ], + "result": { + "count": 1, + "id": "hexcasting:neural_mesh" + } +} \ No newline at end of file diff --git a/Neoforge/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json b/Neoforge/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json new file mode 100644 index 0000000000..5a76172263 --- /dev/null +++ b/Neoforge/src/generated/resources/data/hexcasting/advancement/recipes/redstone/neural_mesh.json @@ -0,0 +1,32 @@ +{ + "parent": "minecraft:recipes/root", + "criteria": { + "has_item": { + "conditions": { + "items": [ + { + "items": "hexcasting:neural_fiber" + } + ] + }, + "trigger": "minecraft:inventory_changed" + }, + "has_the_recipe": { + "conditions": { + "recipe": "hexcasting:neural_mesh" + }, + "trigger": "minecraft:recipe_unlocked" + } + }, + "requirements": [ + [ + "has_the_recipe", + "has_item" + ] + ], + "rewards": { + "recipes": [ + "hexcasting:neural_mesh" + ] + } +} \ No newline at end of file diff --git a/Neoforge/src/generated/resources/data/hexcasting/recipe/neural_mesh.json b/Neoforge/src/generated/resources/data/hexcasting/recipe/neural_mesh.json new file mode 100644 index 0000000000..b1ae10c52c --- /dev/null +++ b/Neoforge/src/generated/resources/data/hexcasting/recipe/neural_mesh.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "redstone", + "key": { + "C": { + "item": "hexcasting:neural_fiber" + }, + "D": { + "item": "hexcasting:neural_fiber" + }, + "I": { + "item": "minecraft:bone_block" + } + }, + "pattern": [ + "DCD", + "CIC", + "DCD" + ], + "result": { + "count": 1, + "id": "hexcasting:neural_mesh" + } +} \ No newline at end of file diff --git a/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java b/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java index 993dc46916..607ad63a59 100644 --- a/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java +++ b/Neoforge/src/main/java/at/petrak/hexcasting/forge/datagen/xplat/HexItemModels.java @@ -81,7 +81,7 @@ protected void registerModels() { .translation(-2.5f, 0f, -8f) .scale(0.4f); - simpleItem(modLoc("neural_mesh")); + simpleItem(HexItems.NEURAL_MESH.get()); buildRobes(HexItems.ROBES_HOOD.get(), "hood", HexItems.ROBES_HOOD.get().numVariants()); buildRobes(HexItems.ROBES_TUNIC.get(), "tunic", HexItems.ROBES_HOOD.get().numVariants()); From 50a02a5d59c4074f71fe1a88405cd3d5e45aeb03 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Wed, 2 Sep 2026 00:34:45 -0400 Subject: [PATCH 05/11] Neural mesh functionality & loot table --- .../loot_table/blocks/neural_mesh.json | 106 ++++++++++++++++++ .../common/blocks/BlockNeuralMesh.java | 51 ++++++++- .../hexcasting/common/lib/HexBlocks.java | 1 + .../hexcasting/datagen/HexLootTables.java | 15 +++ .../mixin/MixinBuddingAmethystBlock.java | 43 +++++++ .../hexcasting/lang/en_us.flatten.json5 | 3 + .../hexcasting/textures/item/staff/neural.png | Bin 865 -> 889 bytes Common/src/main/resources/hexplat.mixins.json | 2 +- .../loot_table/blocks/neural_mesh.json | 106 ++++++++++++++++++ .../loot_table/blocks/neural_mesh.json | 106 ++++++++++++++++++ 10 files changed, 429 insertions(+), 4 deletions(-) create mode 100644 Common/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json create mode 100644 Common/src/main/java/at/petrak/hexcasting/mixin/MixinBuddingAmethystBlock.java create mode 100644 Fabric/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json create mode 100644 Neoforge/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json diff --git a/Common/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json b/Common/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json new file mode 100644 index 0000000000..49ecc8425a --- /dev/null +++ b/Common/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json @@ -0,0 +1,106 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": true, + "count": -1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "down": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "up": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "north": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "south": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "west": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "east": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + } + ], + "name": "hexcasting:neural_mesh" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "hexcasting:blocks/neural_mesh" +} \ No newline at end of file diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java index 65644e400e..e88c471d07 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java @@ -1,12 +1,19 @@ package at.petrak.hexcasting.common.blocks; +import at.petrak.hexcasting.common.lib.HexBlocks; import at.petrak.hexcasting.common.lib.HexItems; import com.mojang.serialization.MapCodec; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; -import net.minecraft.world.level.block.GlowLichenBlock; -import net.minecraft.world.level.block.MultifaceBlock; -import net.minecraft.world.level.block.MultifaceSpreader; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelAccessor; +import net.minecraft.world.level.block.*; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BooleanProperty; @@ -31,4 +38,42 @@ public MultifaceSpreader getSpreader() { protected boolean canBeReplaced(BlockState blockState, BlockPlaceContext blockPlaceContext) { return blockPlaceContext.getItemInHand().is(HexItems.NEURAL_MESH.get()); } + + @Override + protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource) { + for (var dir : availableFaces(blockState)) { + BlockPos targetPos = blockPos.relative(dir); + BlockState targetState = serverLevel.getBlockState(targetPos); + if (targetState.is(Blocks.BUDDING_AMETHYST) && randomSource.nextDouble() < 0.5) { + targetState.randomTick(serverLevel, targetPos, randomSource); + } + } + } + + @Override + protected BlockState updateShape(BlockState blockState, Direction direction, BlockState blockState2, LevelAccessor levelAccessor, BlockPos blockPos, BlockPos blockPos2) { + if (!hasAnyFace(blockState)) { + return Blocks.AIR.defaultBlockState(); + } else { + if (hasFace(blockState, direction) && !canAttachTo(levelAccessor, direction, blockPos2, blockState2)) { + var resultState = removeFace(blockState, getFaceProperty(direction)); + if (resultState.is(HexBlocks.NEURAL_MESH.get())) { + if (!levelAccessor.isClientSide() && levelAccessor instanceof Level level) { + var pos = blockPos.getCenter(); + var entity = new ItemEntity(level, pos.x, pos.y, pos.z, new ItemStack(HexItems.NEURAL_MESH.get())); + entity.setDefaultPickUpDelay(); + level.addFreshEntity(entity); + } + } + return resultState; + } + return blockState; + } + } + + // this is private in MultifaceBlock so here's a reimpl + private static BlockState removeFace(BlockState blockState, BooleanProperty booleanProperty) { + BlockState blockState2 = (BlockState)blockState.setValue(booleanProperty, false); + return hasAnyFace(blockState2) ? blockState2 : Blocks.AIR.defaultBlockState(); + } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java index 0138f0f232..850474c7f2 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java @@ -150,6 +150,7 @@ private static BlockBehaviour.Properties quenched() { public static final Supplier NEURAL_MESH = blockNoItem("neural_mesh", () -> new BlockNeuralMesh(BlockBehaviour.Properties.of() .noCollission() + .randomTicks() .strength(0.2F) .sound(SoundType.CANDLE) .pushReaction(PushReaction.DESTROY) diff --git a/Common/src/main/java/at/petrak/hexcasting/datagen/HexLootTables.java b/Common/src/main/java/at/petrak/hexcasting/datagen/HexLootTables.java index 713b16d052..5df6d75005 100644 --- a/Common/src/main/java/at/petrak/hexcasting/datagen/HexLootTables.java +++ b/Common/src/main/java/at/petrak/hexcasting/datagen/HexLootTables.java @@ -8,6 +8,7 @@ import at.petrak.hexcasting.xplat.IXplatAbstractions; import at.petrak.paucal.api.datagen.PaucalLootTableSubProvider; import net.minecraft.advancements.critereon.*; +import net.minecraft.core.Direction; import net.minecraft.core.HolderLookup; import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceKey; @@ -16,7 +17,9 @@ import net.minecraft.world.item.enchantment.Enchantments; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.DoorBlock; +import net.minecraft.world.level.block.MultifaceBlock; import net.minecraft.world.level.block.SlabBlock; +import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.DoubleBlockHalf; import net.minecraft.world.level.block.state.properties.SlabType; import net.minecraft.world.level.storage.loot.LootPool; @@ -85,6 +88,18 @@ protected void makeLootTables(Map blockTables, )); blockTables.put(HexBlocks.EDIFIED_DOOR.get(), LootTable.lootTable().withPool(doorPool)); + var meshEntry = LootItem.lootTableItem(HexBlocks.NEURAL_MESH.get()) + .apply(SetItemCountFunction.setCount(ConstantValue.exactly(-1), true)); + for (var dir : Direction.values()) { + meshEntry.apply(SetItemCountFunction.setCount(ConstantValue.exactly(1), true) + .when(new LootItemBlockStatePropertyCondition.Builder(HexBlocks.NEURAL_MESH.get()).setProperties( + StatePropertiesPredicate.Builder.properties().hasProperty(MultifaceBlock.getFaceProperty(dir), true) + )) + ); + } + var meshPool = LootPool.lootPool().setRolls(ConstantValue.exactly(1)).add(meshEntry); + blockTables.put(HexBlocks.NEURAL_MESH.get(), LootTable.lootTable().withPool(meshPool)); + var silkTouchCond = MatchTool.toolMatches( ItemPredicate.Builder.item().withSubPredicate( ItemSubPredicates.ENCHANTMENTS, diff --git a/Common/src/main/java/at/petrak/hexcasting/mixin/MixinBuddingAmethystBlock.java b/Common/src/main/java/at/petrak/hexcasting/mixin/MixinBuddingAmethystBlock.java new file mode 100644 index 0000000000..6543707280 --- /dev/null +++ b/Common/src/main/java/at/petrak/hexcasting/mixin/MixinBuddingAmethystBlock.java @@ -0,0 +1,43 @@ +package at.petrak.hexcasting.mixin; + +import at.petrak.hexcasting.common.lib.HexBlocks; +import com.llamalad7.mixinextras.sugar.Local; +import com.llamalad7.mixinextras.sugar.ref.LocalRef; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; +import net.minecraft.world.level.block.BuddingAmethystBlock; +import net.minecraft.world.level.block.MultifaceBlock; +import net.minecraft.world.level.block.state.BlockState; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(BuddingAmethystBlock.class) +public class MixinBuddingAmethystBlock { + // This prevents neural mesh from slowing down budding by taking up potential growth faces. + // If it tries to grow a face with mesh on it, this makes it try to pick another random face + // which does not have mesh on it. If all faces have mesh, the loop ends and nothing happens. + @Inject(method = "randomTick", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/server/level/ServerLevel;getBlockState(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/level/block/state/BlockState;"), require = 1) + private void rerollFaceIfNeuralMesh( + BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource, + CallbackInfo ci, + @Local LocalRef targetDir, @Local(ordinal = 1) LocalRef targetPos, @Local(ordinal = 1) LocalRef targetState + ) { + if (targetState.get().is(HexBlocks.NEURAL_MESH.get()) + && MultifaceBlock.availableFaces(targetState.get()).contains(targetDir.get().getOpposite())) { + for (var checkDir : Direction.allShuffled(randomSource)) { + BlockPos checkPos = blockPos.relative(checkDir); + BlockState checkState = serverLevel.getBlockState(checkPos); + if (!checkState.is(HexBlocks.NEURAL_MESH.get())) { + targetDir.set(checkDir); + targetPos.set(checkPos); + targetState.set(checkState); + return; + } + } + } + } +} diff --git a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 index 257f6443ac..2ece04499a 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 @@ -64,6 +64,7 @@ jeweler_hammer: "Jeweler's Hammer", sub_sandwich: "Submarine Sandwich", neural_fiber: "Neural Fiber", + neural_mesh: "Neural Mesh", robes: { hood: "Grand Caster Hood", @@ -137,6 +138,8 @@ conjured_light: "Conjured Light", conjured_block: "Conjured Block", + neural_mesh: "Neural Mesh", + directrix: { empty: "Empty Directrix", redstone: "Mason Directrix", diff --git a/Common/src/main/resources/assets/hexcasting/textures/item/staff/neural.png b/Common/src/main/resources/assets/hexcasting/textures/item/staff/neural.png index ad8273fca8135cca741c54d69e032a23a6344d6f..6592f9e493ddc3296d345dcac435d431a85ad860 100644 GIT binary patch delta 394 zcmV;50d@Z22KffCy8#J*06_qaV35=clf(fa2m%BjGTxTYe3R?}D1T5%L_t(I%cYVr zNJ3E*hQC)rLz5I53PMh~l!Oh^Tbu+J9Wt2$;aWqThVX4_=09By=ezg+&pj}ul)p4Z{aJC^mdRIQN=|D?$7o~p+FaZo zkLPn*L%#2xP5N-ncz83(C5O}h43=2vfkO)m2; zisduY{?H7??Q?0p8iY=4czr+5 zIR^k+2iKz`wE8urUMq>$7evpb&HCw87hv=cxUH(B0y+8o=x0eHsY%2Wmx-36UMq>) zs!AfM2|y~4lZoKL%Y%8it*VUO#E2&@YfCG?5$sO0L9Z5Q^=rz=3nHGlJiauC4s)z+ ow^bFRb8p(7Sc#IHMnP`jQ{`u07*qoM6N<$f(ELxw*UYD delta 370 zcmV-&0ge9o2H^&@5p>ZY_AAvRQ zvMTxFtv7yO4f#YtUf&$HQbCqiHvu@mIAijC9{}5FkS)iRzHl$MOhX*IF5OOBEYlFT z+7!3i^mZ^%f@K;qqb_ir%Xzh{hZcbU1x`0I((Sb6_#`P>L{FEY%wd^^2lpNu8UDVH zflkySx-3o2127i~dkwpVgumOgh%P^W9$K?w*GGZ_0Ok7%P~kFlqwwGH1(YSAD*sBB Q`~Uy|07*qoM6N<$f|wJf%K!iX diff --git a/Common/src/main/resources/hexplat.mixins.json b/Common/src/main/resources/hexplat.mixins.json index 8037e24e39..ca9b69e663 100644 --- a/Common/src/main/resources/hexplat.mixins.json +++ b/Common/src/main/resources/hexplat.mixins.json @@ -5,8 +5,8 @@ "refmap": "hexcasting.mixins.refmap.json", "package": "at.petrak.hexcasting.mixin", "mixins": [ - "MixinLivingEntity", "MixinAbstractVillager", + "MixinBuddingAmethystBlock", "MixinLivingEntity", "MixinMob", "MixinRaider", diff --git a/Fabric/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json b/Fabric/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json new file mode 100644 index 0000000000..49ecc8425a --- /dev/null +++ b/Fabric/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json @@ -0,0 +1,106 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": true, + "count": -1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "down": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "up": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "north": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "south": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "west": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "east": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + } + ], + "name": "hexcasting:neural_mesh" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "hexcasting:blocks/neural_mesh" +} \ No newline at end of file diff --git a/Neoforge/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json b/Neoforge/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json new file mode 100644 index 0000000000..49ecc8425a --- /dev/null +++ b/Neoforge/src/generated/resources/data/hexcasting/loot_table/blocks/neural_mesh.json @@ -0,0 +1,106 @@ +{ + "pools": [ + { + "bonus_rolls": 0.0, + "entries": [ + { + "type": "minecraft:item", + "functions": [ + { + "add": true, + "count": -1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "down": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "up": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "north": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "south": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "west": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + }, + { + "add": true, + "conditions": [ + { + "block": "hexcasting:neural_mesh", + "condition": "minecraft:block_state_property", + "properties": { + "east": "true" + } + } + ], + "count": 1.0, + "function": "minecraft:set_count" + } + ], + "name": "hexcasting:neural_mesh" + } + ], + "rolls": 1.0 + } + ], + "random_sequence": "hexcasting:blocks/neural_mesh" +} \ No newline at end of file From 554d9e7b0cc8e30ace8ff4d39078419c37cfff10 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Fri, 4 Sep 2026 15:15:33 -0400 Subject: [PATCH 06/11] Rebalance mesh speed boost --- .../common/blocks/BlockNeuralMesh.java | 13 ++--- .../hexcasting/common/lib/HexBlocks.java | 1 - .../hexcasting/common/lib/HexItems.java | 6 ++- .../mixin/MixinBuddingAmethystBlock.java | 53 ++++++++++--------- 4 files changed, 38 insertions(+), 35 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java index e88c471d07..c37408064f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java @@ -44,7 +44,7 @@ protected void randomTick(BlockState blockState, ServerLevel serverLevel, BlockP for (var dir : availableFaces(blockState)) { BlockPos targetPos = blockPos.relative(dir); BlockState targetState = serverLevel.getBlockState(targetPos); - if (targetState.is(Blocks.BUDDING_AMETHYST) && randomSource.nextDouble() < 0.5) { + if (targetState.is(Blocks.BUDDING_AMETHYST)) { targetState.randomTick(serverLevel, targetPos, randomSource); } } @@ -57,13 +57,8 @@ protected BlockState updateShape(BlockState blockState, Direction direction, Blo } else { if (hasFace(blockState, direction) && !canAttachTo(levelAccessor, direction, blockPos2, blockState2)) { var resultState = removeFace(blockState, getFaceProperty(direction)); - if (resultState.is(HexBlocks.NEURAL_MESH.get())) { - if (!levelAccessor.isClientSide() && levelAccessor instanceof Level level) { - var pos = blockPos.getCenter(); - var entity = new ItemEntity(level, pos.x, pos.y, pos.z, new ItemStack(HexItems.NEURAL_MESH.get())); - entity.setDefaultPickUpDelay(); - level.addFreshEntity(entity); - } + if (resultState.is(HexBlocks.NEURAL_MESH.get()) && levelAccessor instanceof Level level) { + popResource(level, blockPos, new ItemStack(HexItems.NEURAL_MESH.get())); } return resultState; } @@ -73,7 +68,7 @@ protected BlockState updateShape(BlockState blockState, Direction direction, Blo // this is private in MultifaceBlock so here's a reimpl private static BlockState removeFace(BlockState blockState, BooleanProperty booleanProperty) { - BlockState blockState2 = (BlockState)blockState.setValue(booleanProperty, false); + BlockState blockState2 = blockState.setValue(booleanProperty, false); return hasAnyFace(blockState2) ? blockState2 : Blocks.AIR.defaultBlockState(); } } diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java index 850474c7f2..447a8ab55f 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexBlocks.java @@ -205,7 +205,6 @@ private static BlockBehaviour.Properties quenched() { ); - // Decoration?! public static final Supplier QUENCHED_ALLAY_TILES = blockItem("quenched_allay_tiles", () -> new BlockQuenchedAllay(quenched())); public static final Supplier QUENCHED_ALLAY_BRICKS = blockItem("quenched_allay_bricks", () -> new BlockQuenchedAllay(quenched())); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java index b01ba152ac..37045eb505 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexItems.java @@ -105,7 +105,11 @@ public static void registerItemsForCreativeTab(ResourceKey tabK public static final Supplier NEURAL_FIBER = make("neural_fiber", () -> new Item(props().rarity(Rarity.UNCOMMON))); - public static final Supplier NEURAL_MESH = make("neural_mesh", () -> new BlockItem(HexBlocks.NEURAL_MESH.get(), props())); + public static final Supplier NEURAL_MESH = make("neural_mesh", () -> + new BlockItem(HexBlocks.NEURAL_MESH.get(), props() + .rarity(Rarity.UNCOMMON) + ) + ); public static final Supplier ROBES_HOOD = make("robes/hood", () -> new ItemRobes(ArmorItem.Type.HELMET, unstackable() diff --git a/Common/src/main/java/at/petrak/hexcasting/mixin/MixinBuddingAmethystBlock.java b/Common/src/main/java/at/petrak/hexcasting/mixin/MixinBuddingAmethystBlock.java index 6543707280..2e01fc5656 100644 --- a/Common/src/main/java/at/petrak/hexcasting/mixin/MixinBuddingAmethystBlock.java +++ b/Common/src/main/java/at/petrak/hexcasting/mixin/MixinBuddingAmethystBlock.java @@ -1,43 +1,48 @@ package at.petrak.hexcasting.mixin; import at.petrak.hexcasting.common.lib.HexBlocks; -import com.llamalad7.mixinextras.sugar.Local; -import com.llamalad7.mixinextras.sugar.ref.LocalRef; +import com.llamalad7.mixinextras.injector.wrapoperation.Operation; +import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; import net.minecraft.util.RandomSource; import net.minecraft.world.level.block.BuddingAmethystBlock; -import net.minecraft.world.level.block.MultifaceBlock; import net.minecraft.world.level.block.state.BlockState; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; @Mixin(BuddingAmethystBlock.class) public class MixinBuddingAmethystBlock { - // This prevents neural mesh from slowing down budding by taking up potential growth faces. - // If it tries to grow a face with mesh on it, this makes it try to pick another random face - // which does not have mesh on it. If all faces have mesh, the loop ends and nothing happens. - @Inject(method = "randomTick", at = @At(value = "INVOKE_ASSIGN", target = "Lnet/minecraft/server/level/ServerLevel;getBlockState(Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/level/block/state/BlockState;"), require = 1) - private void rerollFaceIfNeuralMesh( - BlockState blockState, ServerLevel serverLevel, BlockPos blockPos, RandomSource randomSource, - CallbackInfo ci, - @Local LocalRef targetDir, @Local(ordinal = 1) LocalRef targetPos, @Local(ordinal = 1) LocalRef targetState + // When combined with the extra random ticks provided by the neural mesh blocks themselves, this results + // in an overall speed boost equivalent to each mesh block providing 5 extra random ticks whenever it + // receives a single random tick. We do it this way (rather than actually ticking the budding block five + // times per mesh tick) to avoid sudden jumps in growth progress. + @WrapOperation( + method = "randomTick", + at = @At(value = "INVOKE", target = "Lnet/minecraft/util/RandomSource;nextInt(I)I", ordinal = 0) + ) + private int increaseSuccessChanceWithMesh( + RandomSource instance, int originalArg, Operation original, + BlockState selfState, ServerLevel serverLevel, BlockPos selfPos, RandomSource randomSource ) { - if (targetState.get().is(HexBlocks.NEURAL_MESH.get()) - && MultifaceBlock.availableFaces(targetState.get()).contains(targetDir.get().getOpposite())) { - for (var checkDir : Direction.allShuffled(randomSource)) { - BlockPos checkPos = blockPos.relative(checkDir); - BlockState checkState = serverLevel.getBlockState(checkPos); - if (!checkState.is(HexBlocks.NEURAL_MESH.get())) { - targetDir.set(checkDir); - targetPos.set(checkPos); - targetState.set(checkState); - return; - } + int meshCount = 0; + for (Direction dir : Direction.values()) { + BlockPos checkPos = selfPos.relative(dir); + if (serverLevel.getBlockState(checkPos).is(HexBlocks.NEURAL_MESH.get())) { + meshCount++; } } + if (meshCount == 0) + return original.call(instance, originalArg); + boolean success = switch (meshCount) { + case 1 -> (randomSource.nextDouble() < 0.6); + case 2 -> (randomSource.nextDouble() < 11.0/15.0); + case 3 -> (randomSource.nextDouble() < 0.8); + case 4 -> (randomSource.nextDouble() < 0.84); + case 5 -> (randomSource.nextDouble() < 13.0/15.0); + default -> false; + }; + return success ? 0 : -1; } } From ec83592cda594cefe862435e35d55be5ce46e874 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Mon, 7 Sep 2026 01:31:56 -0400 Subject: [PATCH 07/11] Make the neural staff recipe consistent with other staves --- .../data/hexcasting/recipe/staff/neural.json | 14 +++++++------- .../hexcasting/datagen/recipe/HexplatRecipes.java | 10 +--------- .../data/hexcasting/recipe/staff/neural.json | 14 +++++++------- .../data/hexcasting/recipe/staff/neural.json | 14 +++++++------- 4 files changed, 22 insertions(+), 30 deletions(-) diff --git a/Common/src/generated/resources/data/hexcasting/recipe/staff/neural.json b/Common/src/generated/resources/data/hexcasting/recipe/staff/neural.json index 6397db86d8..a4288d0288 100644 --- a/Common/src/generated/resources/data/hexcasting/recipe/staff/neural.json +++ b/Common/src/generated/resources/data/hexcasting/recipe/staff/neural.json @@ -5,17 +5,17 @@ "A": { "item": "hexcasting:charged_amethyst" }, - "B": { - "item": "minecraft:bone" + "S": { + "item": "minecraft:stick" }, - "F": { - "item": "hexcasting:neural_fiber" + "W": { + "item": "hexcasting:neural_mesh" } }, "pattern": [ - " FA", - " BF", - "B " + " SA", + " WS", + "S " ], "result": { "count": 1, diff --git a/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java b/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java index 781538297e..ac7a5a5857 100644 --- a/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java +++ b/Common/src/main/java/at/petrak/hexcasting/datagen/recipe/HexplatRecipes.java @@ -102,15 +102,7 @@ public void buildRecipes(RecipeOutput recipes) { staffRecipe(recipes, HexItems.STAFF_EDIFIED.get(), HexBlocks.EDIFIED_PLANKS.get().asItem()); staffRecipe(recipes, HexItems.STAFF_QUENCHED.get(), HexItems.QUENCHED_SHARD.get()); staffRecipe(recipes, HexItems.STAFF_MINDSPLICE.get(), Ingredient.of(HexTags.Items.MINDFLAYED_CIRCLE_COMPONENTS)); - ShapedRecipeBuilder.shaped(RecipeCategory.TOOLS, HexItems.STAFF_NEURAL.get()) - .define('F', HexItems.NEURAL_FIBER.get()) - .define('B', Items.BONE) - .define('A', HexItems.CHARGED_AMETHYST.get()) - .pattern(" FA") - .pattern(" BF") - .pattern("B ") - .unlockedBy("has_item", hasItem(HexItems.CHARGED_AMETHYST.get())) - .save(recipes); + staffRecipe(recipes, HexItems.STAFF_NEURAL.get(), HexItems.NEURAL_MESH.get()); ShapelessRecipeBuilder.shapeless(RecipeCategory.TOOLS, HexItems.THOUGHT_KNOT.get()) .requires(HexItems.AMETHYST_DUST.get()) diff --git a/Fabric/src/generated/resources/data/hexcasting/recipe/staff/neural.json b/Fabric/src/generated/resources/data/hexcasting/recipe/staff/neural.json index 6397db86d8..a4288d0288 100644 --- a/Fabric/src/generated/resources/data/hexcasting/recipe/staff/neural.json +++ b/Fabric/src/generated/resources/data/hexcasting/recipe/staff/neural.json @@ -5,17 +5,17 @@ "A": { "item": "hexcasting:charged_amethyst" }, - "B": { - "item": "minecraft:bone" + "S": { + "item": "minecraft:stick" }, - "F": { - "item": "hexcasting:neural_fiber" + "W": { + "item": "hexcasting:neural_mesh" } }, "pattern": [ - " FA", - " BF", - "B " + " SA", + " WS", + "S " ], "result": { "count": 1, diff --git a/Neoforge/src/generated/resources/data/hexcasting/recipe/staff/neural.json b/Neoforge/src/generated/resources/data/hexcasting/recipe/staff/neural.json index 6397db86d8..a4288d0288 100644 --- a/Neoforge/src/generated/resources/data/hexcasting/recipe/staff/neural.json +++ b/Neoforge/src/generated/resources/data/hexcasting/recipe/staff/neural.json @@ -5,17 +5,17 @@ "A": { "item": "hexcasting:charged_amethyst" }, - "B": { - "item": "minecraft:bone" + "S": { + "item": "minecraft:stick" }, - "F": { - "item": "hexcasting:neural_fiber" + "W": { + "item": "hexcasting:neural_mesh" } }, "pattern": [ - " FA", - " BF", - "B " + " SA", + " WS", + "S " ], "result": { "count": 1, From 8c737cc4ca61586ea292a83812700f0687ecb59d Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Tue, 8 Sep 2026 17:43:42 -0400 Subject: [PATCH 08/11] Add neural mesh to fiber entry --- .../resources/assets/hexcasting/lang/en_us.flatten.json5 | 1 + .../thehexbook/en_us/entries/greatwork/neural_fiber.json | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 index 2ece04499a..75b93de437 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 @@ -1808,6 +1808,7 @@ "1": "Mind and body-- I can bridge the gap! $(l:greatwork/brainsweeping)$(action)Flay Mind/$ was built to sever but I understand it now, I can TWIST it, force the mind not $(o)out/$ but $(o)in/$, so long as the flesh is made ready to accept it -- $(l:items/potions)Clarity/$ should do the job. The mind can be folded into itself, crystallized in flesh and bone and nerve, until there is only ONE, mind-and-body superimposed in a single hybrid substrate.", "2": "Viscera suffused with micro-fractal splinters of cognition, living and thinking and-- USELESS! Nothing but a mass of meat and _media, in the end.$(br2)But the nerves... the nerves become conduits, skeins of thought reified in shimmering fiber. These I can USE. Free them from the flesh and they are $(o)mine/$.$(br2)I could weave them into myself -- more $(o)space/$ to think in -- no. I am not being rational.", "3": "The process itself is simple: apply $(l:items/potions)Clarity/$ to render the body receptive, cast $(l:greatwork/brainsweeping)$(action)Flay Mind/$ with the $(l:patterns/basics#hexcasting:entity_pos/eye)$(action)subject’s own head/$ as the destination, then dissect to harvest the fiber. Any villager will do, though a more developed mind will provide a higher yield.$(br2)I wonder... does it understand, even excised? Does it feel?", + mesh: "The fibers have a natural affinity for bone. Woven into such a frame, I can affix them to $(thing)Budding Amethyst/$ to provide additional paths for the flow of media, accelerating growth. However, covering too many faces seems to reduce overall production efficiency.", }, caster_robes: { diff --git a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/neural_fiber.json b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/neural_fiber.json index 55eede5e9f..2ea6b1c99d 100644 --- a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/neural_fiber.json +++ b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/greatwork/neural_fiber.json @@ -19,6 +19,11 @@ "item": "hexcasting:neural_fiber", "text": "hexcasting.page.neural_fiber.3", "link_recipe": true + }, + { + "type": "patchouli:crafting", + "recipe": "hexcasting:neural_mesh", + "text": "hexcasting.page.neural_fiber.mesh" } ] } \ No newline at end of file From ece89b894461a19d21475f8667639d600d4769d4 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Tue, 8 Sep 2026 02:59:33 -0400 Subject: [PATCH 09/11] Assorted cleanup --- .../at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java | 6 ++---- .../java/at/petrak/hexcasting/mixin/MixinLivingEntity.java | 4 ++-- .../assets/hexcasting/models/block/neural_mesh.json | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java b/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java index c37408064f..76e97d16ee 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/blocks/BlockNeuralMesh.java @@ -3,12 +3,10 @@ import at.petrak.hexcasting.common.lib.HexBlocks; import at.petrak.hexcasting.common.lib.HexItems; import com.mojang.serialization.MapCodec; - import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.server.level.ServerLevel; import net.minecraft.util.RandomSource; -import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.Level; @@ -20,7 +18,6 @@ public class BlockNeuralMesh extends MultifaceBlock { public static final MapCodec CODEC = simpleCodec(BlockNeuralMesh::new); - private final MultifaceSpreader spreader = new MultifaceSpreader(this); public MapCodec codec() { return CODEC; @@ -30,8 +27,9 @@ public BlockNeuralMesh(BlockBehaviour.Properties arg) { super(arg); } + @Override public MultifaceSpreader getSpreader() { - return this.spreader; + throw new UnsupportedOperationException("Neural mesh is not capable of spreading"); } @Override diff --git a/Common/src/main/java/at/petrak/hexcasting/mixin/MixinLivingEntity.java b/Common/src/main/java/at/petrak/hexcasting/mixin/MixinLivingEntity.java index 38d215f17c..e10238f190 100644 --- a/Common/src/main/java/at/petrak/hexcasting/mixin/MixinLivingEntity.java +++ b/Common/src/main/java/at/petrak/hexcasting/mixin/MixinLivingEntity.java @@ -35,11 +35,11 @@ private void dropCrystallizedLoot(CallbackInfo ci) { } @Inject(method = "increaseAirSupply", at = @At("HEAD"), cancellable = true) - private void forgetToBreathe(int i, CallbackInfoReturnable cir) { + private void forgetToBreathe(int currentAir, CallbackInfoReturnable cir) { var self = (LivingEntity) (Object) this; var inst = self.getEffect(HexMobEffects.DISSOCIATION); if (inst != null && DissociationEffect.shouldPreventBreathing(inst.getDuration(), inst.getAmplifier())) { - cir.setReturnValue(i); + cir.setReturnValue(currentAir); } } } diff --git a/Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json b/Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json index 1c6b45d6ea..0d4d773748 100644 --- a/Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json +++ b/Common/src/main/resources/assets/hexcasting/models/block/neural_mesh.json @@ -1,7 +1,7 @@ { "ambientocclusion": false, "textures": { - "particle": "hexcasting:block/slate", + "particle": "hexcasting:item/neural_mesh", "neural_mesh": "hexcasting:block/neural_mesh" }, "render_type": "cutout", From bd58d9412293a88d25d998828425653f187efd38 Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Tue, 8 Sep 2026 17:44:53 -0400 Subject: [PATCH 10/11] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57563dd97e..93c2f233bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Updated to Minecraft 1.21.1 ([#985](https://github.com/FallingColors/HexMod/pull/985)) @SuperKnux @slava110 - Added Neural Fiber, a new endgame material harvested from villagers using a modified mindflaying process ([#1296](https://github.com/FallingColors/HexMod/pull/1296)) @Robotgiggle @Falkory220 +- Added Neural Mesh, a multipart block which can be attached to Budding Amethyst to make it grow faster ([#1296](https://github.com/FallingColors/HexMod/pull/1292)) @Robotgiggle - Added Grand Caster Robes, a hex-based armor set with a variety of abilities ([#1296](https://github.com/FallingColors/HexMod/pull/1296)) @Robotgiggle @Falkory220 - Provides defense values midway between iron and diamond - Provides the scrying lens effect, increased ambit, and a casting cost discount From 62ea667937f6ec1c0e2c1c6a4c77e8fd5266020b Mon Sep 17 00:00:00 2001 From: Robotgiggle Date: Tue, 8 Sep 2026 18:20:36 -0400 Subject: [PATCH 11/11] Fix PR link in changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93c2f233bd..1b8a26df37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). - Updated to Minecraft 1.21.1 ([#985](https://github.com/FallingColors/HexMod/pull/985)) @SuperKnux @slava110 - Added Neural Fiber, a new endgame material harvested from villagers using a modified mindflaying process ([#1296](https://github.com/FallingColors/HexMod/pull/1296)) @Robotgiggle @Falkory220 -- Added Neural Mesh, a multipart block which can be attached to Budding Amethyst to make it grow faster ([#1296](https://github.com/FallingColors/HexMod/pull/1292)) @Robotgiggle +- Added Neural Mesh, a multipart block which can be attached to Budding Amethyst to make it grow faster ([#1297](https://github.com/FallingColors/HexMod/pull/1297)) @Robotgiggle - Added Grand Caster Robes, a hex-based armor set with a variety of abilities ([#1296](https://github.com/FallingColors/HexMod/pull/1296)) @Robotgiggle @Falkory220 - Provides defense values midway between iron and diamond - Provides the scrying lens effect, increased ambit, and a casting cost discount