From 96332ba7dae076aeae8af6cb9ed9fe31d5133319 Mon Sep 17 00:00:00 2001 From: JR1811 Date: Fri, 20 Oct 2023 08:34:58 +0200 Subject: [PATCH 1/3] fixed asset files --- .../07ff412db5499c029f934b8a0c05caecd667a51a | 4 ++-- .../5a9530de498852a784d0acd4174a91642817b254 | 6 +++--- .../d380053783a5710f3d3b0020baf87cc4ff3b8607 | 4 ++-- .../assets/referencemod/lang/en_us.json | 17 ++++++++++++++++- .../provider/EnglishTranslationProvider.java | 8 ++++++-- .../fabric/referencemod/item/ModItems.java | 2 +- .../blockstates/condensed_dirt.json | 2 +- .../blockstates/condensed_oak_log.json | 6 +++--- .../blockstates/prismarine_lamp.json | 4 ++-- .../models/block/condensed_dirt.json | 2 +- .../models/block/condensed_oak_log.json | 4 ++-- .../block/condensed_oak_log_horizontal.json | 4 ++-- .../models/block/prismarine_lamp.json | 2 +- .../block/prismarine_lamp_activated.json | 2 +- .../models/item/condensed_dirt.json | 2 +- .../models/item/condensed_oak_log.json | 2 +- .../referencemod/models/item/guidite_axe.json | 2 +- .../models/item/guidite_boots.json | 2 +- .../models/item/guidite_chestplate.json | 2 +- .../models/item/guidite_helmet.json | 2 +- .../referencemod/models/item/guidite_hoe.json | 2 +- .../models/item/guidite_leggings.json | 2 +- .../models/item/guidite_pickaxe.json | 2 +- .../models/item/guidite_shovel.json | 2 +- .../models/item/guidite_sword.json | 2 +- .../models/item/lightning_stick.json | 2 +- .../assets/referencemod/models/item/poop.json | 2 +- .../models/item/prismarine_lamp.json | 2 +- .../resources/assets/referencemod/sounds.json | 8 ++++++++ .../referencemod/sounds/metal_whistle.ogg | Bin 0 -> 10205 bytes 30 files changed, 65 insertions(+), 38 deletions(-) create mode 100644 reference-mod/src/main/resources/assets/referencemod/sounds.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/sounds/metal_whistle.ogg diff --git a/reference-mod/src/main/generated/.cache/07ff412db5499c029f934b8a0c05caecd667a51a b/reference-mod/src/main/generated/.cache/07ff412db5499c029f934b8a0c05caecd667a51a index 0386a94..76c294a 100644 --- a/reference-mod/src/main/generated/.cache/07ff412db5499c029f934b8a0c05caecd667a51a +++ b/reference-mod/src/main/generated/.cache/07ff412db5499c029f934b8a0c05caecd667a51a @@ -1,2 +1,2 @@ -// 1.20.1 2023-07-20T19:02:04.606533057 Reference Mod/Tags for minecraft:block -6112b2bee4639cef8ed9aa51b42ea9e4b20c54f3 data/referencemod/tags/blocks/awesome_blocks.json +// 1.20.1 2023-10-20T08:08:43.6780804 Reference Mod/Tags for minecraft:block +6112b2bee4639cef8ed9aa51b42ea9e4b20c54f3 data\referencemod\tags\blocks\awesome_blocks.json diff --git a/reference-mod/src/main/generated/.cache/5a9530de498852a784d0acd4174a91642817b254 b/reference-mod/src/main/generated/.cache/5a9530de498852a784d0acd4174a91642817b254 index 3d941a2..f5cc3e8 100644 --- a/reference-mod/src/main/generated/.cache/5a9530de498852a784d0acd4174a91642817b254 +++ b/reference-mod/src/main/generated/.cache/5a9530de498852a784d0acd4174a91642817b254 @@ -1,3 +1,3 @@ -// 1.20.1 2023-07-20T19:02:04.607454972 Reference Mod/Block Loot Tables -92553f71dfe9db9fa01651953449e473dc22cc96 data/referencemod/loot_tables/blocks/condensed_oak_log.json -ae172abac3d98aabf9709f0a46ec02c79cc3bd0f data/referencemod/loot_tables/blocks/condensed_dirt.json +// 1.20.1 2023-10-20T08:08:43.6800751 Reference Mod/Block Loot Tables +92553f71dfe9db9fa01651953449e473dc22cc96 data\referencemod\loot_tables\blocks\condensed_oak_log.json +ae172abac3d98aabf9709f0a46ec02c79cc3bd0f data\referencemod\loot_tables\blocks\condensed_dirt.json diff --git a/reference-mod/src/main/generated/.cache/d380053783a5710f3d3b0020baf87cc4ff3b8607 b/reference-mod/src/main/generated/.cache/d380053783a5710f3d3b0020baf87cc4ff3b8607 index 13edd3c..c56d0b2 100644 --- a/reference-mod/src/main/generated/.cache/d380053783a5710f3d3b0020baf87cc4ff3b8607 +++ b/reference-mod/src/main/generated/.cache/d380053783a5710f3d3b0020baf87cc4ff3b8607 @@ -1,2 +1,2 @@ -// 1.20.1 2023-07-20T19:02:04.607279483 Reference Mod/Language (en_us) -9cf66e577eec42de052be9e79029810fa89ef396 assets/referencemod/lang/en_us.json +// 1.20.1 2023-10-20T08:08:43.6800751 Reference Mod/Language (en_us) +19806ef3e865705e197a3e3a2d4b29a4a86d22fd assets\referencemod\lang\en_us.json diff --git a/reference-mod/src/main/generated/assets/referencemod/lang/en_us.json b/reference-mod/src/main/generated/assets/referencemod/lang/en_us.json index 2745b94..aa15084 100644 --- a/reference-mod/src/main/generated/assets/referencemod/lang/en_us.json +++ b/reference-mod/src/main/generated/assets/referencemod/lang/en_us.json @@ -1,3 +1,18 @@ { - "block.referencemod.prismarine_lamp": "Prismarine Lamp" + "block.referencemod.condensed_dirt": "Condensed Dirt", + "block.referencemod.prismarine_lamp": "Prismarine Lamp", + "block.referencemod.test_block": "Test Block", + "item.referencemod.guidite_axe": "Guidite Axe", + "item.referencemod.guidite_boots": "Guidite Boots", + "item.referencemod.guidite_chestplate": "Guidite Chestplate", + "item.referencemod.guidite_helmet": "Guidite Helmet", + "item.referencemod.guidite_hoe": "Guidite Hoe", + "item.referencemod.guidite_leggings": "Guidite Leggings", + "item.referencemod.guidite_pickaxe": "Guidite Pickaxe", + "item.referencemod.guidite_shovel": "Guidite Shovel", + "item.referencemod.guidite_sword": "Guidite Sword", + "item.referencemod.lightning_stick": "Lightning Stick", + "item.referencemod.poop": "Poop", + "itemGroup.referencemod": "Fabric Community Wiki Items", + "sound.referencemod.metal_whistle": "Metal Whistle Sound" } \ No newline at end of file diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/EnglishTranslationProvider.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/EnglishTranslationProvider.java index b7b2641..2a3a8fa 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/EnglishTranslationProvider.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/EnglishTranslationProvider.java @@ -1,6 +1,8 @@ package dev.mineblock11.fabric.referencemod.datagen.provider; +import dev.mineblock11.fabric.referencemod.MyMod; import dev.mineblock11.fabric.referencemod.block.ModBlocks; +import dev.mineblock11.fabric.referencemod.util.helper.LoggerUtil; import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; import net.fabricmc.fabric.api.datagen.v1.provider.FabricLanguageProvider; @@ -17,12 +19,14 @@ public EnglishTranslationProvider(FabricDataOutput dataOutput) { @Override public void generateTranslations(TranslationBuilder translationBuilder) { translationBuilder.add(ModBlocks.PRISMARINE_LAMP, "Prismarine Lamp"); + translationBuilder.add(ModBlocks.TEST_BLOCK, "Test Block"); + translationBuilder.add(String.format("sound.%s.metal_whistle", MyMod.MOD_ID), "Metal Whistle Sound"); try { - Optional path = dataOutput.getModContainer().findPath("assets/mod_id/lang/en_us.unmerged.json"); + Optional path = dataOutput.getModContainer().findPath("assets/referencemod/lang/en_us.unmerged.json"); translationBuilder.add(path.get()); } catch (Exception e) { - LOGGER.info("Failed to merge language file: " + e); + LoggerUtil.devLogger("Failed to merge language file", true, e); } } } diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/item/ModItems.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/item/ModItems.java index d17d2f2..95bdc36 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/item/ModItems.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/item/ModItems.java @@ -52,7 +52,7 @@ public class ModItems { public static final ItemGroup MY_MOD_ITEMGROUP = FabricItemGroup.builder() .icon(() -> new ItemStack(ModItems.GUIDITE_SWORD)) - .displayName(Text.translatable("itemGroup.")) + .displayName(Text.translatable("itemGroup.referencemod")) .build(); diff --git a/reference-mod/src/main/resources/assets/referencemod/blockstates/condensed_dirt.json b/reference-mod/src/main/resources/assets/referencemod/blockstates/condensed_dirt.json index 0629020..6d6c04e 100644 --- a/reference-mod/src/main/resources/assets/referencemod/blockstates/condensed_dirt.json +++ b/reference-mod/src/main/resources/assets/referencemod/blockstates/condensed_dirt.json @@ -1,5 +1,5 @@ { "variants": { - "": { "model": "mod_id:block/condensed_dirt" } + "": { "model": "referencemod:block/condensed_dirt" } } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/blockstates/condensed_oak_log.json b/reference-mod/src/main/resources/assets/referencemod/blockstates/condensed_oak_log.json index 328db3c..b3b9bb1 100644 --- a/reference-mod/src/main/resources/assets/referencemod/blockstates/condensed_oak_log.json +++ b/reference-mod/src/main/resources/assets/referencemod/blockstates/condensed_oak_log.json @@ -1,15 +1,15 @@ { "variants": { "axis=x": { - "model": "mod_id:block/condensed_oak_log_horizontal", + "model": "referencemod:block/condensed_oak_log_horizontal", "x": 90, "y": 90 }, "axis=y": { - "model": "mod_id:block/condensed_oak_log" + "model": "referencemod:block/condensed_oak_log" }, "axis=z": { - "model": "mod_id:block/condensed_oak_log_horizontal", + "model": "referencemod:block/condensed_oak_log_horizontal", "x": 90 } } diff --git a/reference-mod/src/main/resources/assets/referencemod/blockstates/prismarine_lamp.json b/reference-mod/src/main/resources/assets/referencemod/blockstates/prismarine_lamp.json index 99ed8dd..9ab1377 100644 --- a/reference-mod/src/main/resources/assets/referencemod/blockstates/prismarine_lamp.json +++ b/reference-mod/src/main/resources/assets/referencemod/blockstates/prismarine_lamp.json @@ -1,10 +1,10 @@ { "variants": { "activated=false": { - "model": "mod_id:block/prismarine_lamp" + "model": "referencemod:block/prismarine_lamp" }, "activated=true": { - "model": "mod_id:block/prismarine_lamp_activated" + "model": "referencemod:block/prismarine_lamp_activated" } } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_dirt.json b/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_dirt.json index a0ce19a..6d1ec3e 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_dirt.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_dirt.json @@ -1,6 +1,6 @@ { "parent": "block/cube_all", "textures": { - "all": "mod_id:block/condensed_dirt" + "all": "referencemod:block/condensed_dirt" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_oak_log.json b/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_oak_log.json index f89932d..91eded5 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_oak_log.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_oak_log.json @@ -1,7 +1,7 @@ { "parent": "block/cube_column", "textures": { - "end": "mod_id:block/condensed_oak_log_top", - "side": "mod_id:block/condensed_oak_log" + "end": "referencemod:block/condensed_oak_log_top", + "side": "referencemod:block/condensed_oak_log" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_oak_log_horizontal.json b/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_oak_log_horizontal.json index 4f65951..46766b9 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_oak_log_horizontal.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/condensed_oak_log_horizontal.json @@ -1,7 +1,7 @@ { "parent": "block/cube_column_horizontal", "textures": { - "end": "mod_id:block/condensed_oak_log_top", - "side": "mod_id:block/condensed_oak_log" + "end": "referencemod:block/condensed_oak_log_top", + "side": "referencemod:block/condensed_oak_log" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/prismarine_lamp.json b/reference-mod/src/main/resources/assets/referencemod/models/block/prismarine_lamp.json index 4fbf4a4..b036ea0 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/block/prismarine_lamp.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/prismarine_lamp.json @@ -1,6 +1,6 @@ { "parent": "block/cube_all", "textures": { - "all": "mod_id:block/prismarine_lamp" + "all": "referencemod:block/prismarine_lamp" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/prismarine_lamp_activated.json b/reference-mod/src/main/resources/assets/referencemod/models/block/prismarine_lamp_activated.json index 4214593..9469e14 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/block/prismarine_lamp_activated.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/prismarine_lamp_activated.json @@ -1,6 +1,6 @@ { "parent": "block/cube_all", "textures": { - "all": "mod_id:block/prismarine_lamp_activated" + "all": "referencemod:block/prismarine_lamp_activated" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/condensed_dirt.json b/reference-mod/src/main/resources/assets/referencemod/models/item/condensed_dirt.json index 2484bba..91482fd 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/condensed_dirt.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/condensed_dirt.json @@ -1,3 +1,3 @@ { - "parent": "mod_id:block/condensed_dirt" + "parent": "referencemod:block/condensed_dirt" } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/condensed_oak_log.json b/reference-mod/src/main/resources/assets/referencemod/models/item/condensed_oak_log.json index 7a4de7d..502b362 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/condensed_oak_log.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/condensed_oak_log.json @@ -1,3 +1,3 @@ { - "parent": "mod_id:block/condensed_oak_log" + "parent": "referencemod:block/condensed_oak_log" } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_axe.json b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_axe.json index 2b45f36..593238c 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_axe.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_axe.json @@ -1,6 +1,6 @@ { "parent": "item/handheld", "textures": { - "layer0": "mod_id:item/guidite_axe" + "layer0": "referencemod:item/guidite_axe" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_boots.json b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_boots.json index e533f63..3ee608a 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_boots.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_boots.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "mod_id:item/guidite_boots" + "layer0": "referencemod:item/guidite_boots" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_chestplate.json b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_chestplate.json index 15f24ed..c46b3d9 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_chestplate.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_chestplate.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "mod_id:item/guidite_chestplate" + "layer0": "referencemod:item/guidite_chestplate" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_helmet.json b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_helmet.json index 1c6b587..9eca1e6 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_helmet.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_helmet.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "mod_id:item/guidite_helmet" + "layer0": "referencemod:item/guidite_helmet" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_hoe.json b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_hoe.json index 1347caa..e33b1e3 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_hoe.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_hoe.json @@ -1,6 +1,6 @@ { "parent": "item/handheld", "textures": { - "layer0": "mod_id:item/guidite_hoe" + "layer0": "referencemod:item/guidite_hoe" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_leggings.json b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_leggings.json index 363ca84..847fa5e 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_leggings.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_leggings.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "mod_id:item/guidite_leggings" + "layer0": "referencemod:item/guidite_leggings" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_pickaxe.json b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_pickaxe.json index 8524d57..9b00cce 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_pickaxe.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_pickaxe.json @@ -1,6 +1,6 @@ { "parent": "item/handheld", "textures": { - "layer0": "mod_id:item/guidite_pickaxe" + "layer0": "referencemod:item/guidite_pickaxe" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_shovel.json b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_shovel.json index 8f9edf2..5ca1d36 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_shovel.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_shovel.json @@ -1,6 +1,6 @@ { "parent": "item/handheld", "textures": { - "layer0": "mod_id:item/guidite_shovel" + "layer0": "referencemod:item/guidite_shovel" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_sword.json b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_sword.json index 65a8a09..13814a0 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_sword.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/guidite_sword.json @@ -1,6 +1,6 @@ { "parent": "item/handheld", "textures": { - "layer0": "mod_id:item/guidite_sword" + "layer0": "referencemod:item/guidite_sword" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/lightning_stick.json b/reference-mod/src/main/resources/assets/referencemod/models/item/lightning_stick.json index bd5bf1c..135feeb 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/lightning_stick.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/lightning_stick.json @@ -1,6 +1,6 @@ { "parent": "item/handheld", "textures": { - "layer0": "mod_id:item/lightning_stick" + "layer0": "referencemod:item/lightning_stick" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/poop.json b/reference-mod/src/main/resources/assets/referencemod/models/item/poop.json index c36ec26..e6ad263 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/poop.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/poop.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "mod_id:item/poop" + "layer0": "referencemod:item/poop" } } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/item/prismarine_lamp.json b/reference-mod/src/main/resources/assets/referencemod/models/item/prismarine_lamp.json index 7a30d1b..105b6e7 100644 --- a/reference-mod/src/main/resources/assets/referencemod/models/item/prismarine_lamp.json +++ b/reference-mod/src/main/resources/assets/referencemod/models/item/prismarine_lamp.json @@ -1,3 +1,3 @@ { - "parent": "mod_id:block/prismarine_lamp" + "parent": "referencemod:block/prismarine_lamp" } \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/sounds.json b/reference-mod/src/main/resources/assets/referencemod/sounds.json new file mode 100644 index 0000000..2da1602 --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/sounds.json @@ -0,0 +1,8 @@ +{ + "metal_whistle": { + "subtitle": "sound.referencemod.metal_whistle", + "sounds": [ + "referencemod:metal_whistle" + ] + } +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/sounds/metal_whistle.ogg b/reference-mod/src/main/resources/assets/referencemod/sounds/metal_whistle.ogg new file mode 100644 index 0000000000000000000000000000000000000000..fd18a451f92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sX6gnRlk!*MVMVzV!%j zXiDQ#m!3&nU_%g^mc08S4m)95)|O?9>{7n`s&r|o193k*0HFKM@g)! zR`06ih&7-c5wF8yByaAGY^+B>d`YwwWkW+`9M34 zIh1|w;Y8zu>cOrH6V=mvlCfb!A}#}X*vHnDE`o*C61#8 z08ORot;|P9fkykt6A7hpyDj%;zP#W}!BI!M6$+iL_#ySXUD_}#(7^XjiOUrgt&jet z$A9Tv;QXeO2dwpi+J6^^wj7`Cu2pj4#OShv8xlN1s?I)J&rUkXYX~2_#PG+I8H7vl zx2%|a_vU@<0MmAN*N(3a5^b~7Fd8P4#wDt`0@Ly0^8p+E1Qwl_3$jH z_Bqde&AL4i>VotUx?Uv1L2vZ9!dhUnFEvLoAIm<_au X(3DKs^pBIOC5czMrsO&F&@}%8v&V}Z literal 0 HcmV?d00001 From 52ba5403fd7035ab214cc1be1a5eae9d9d65ae95 Mon Sep 17 00:00:00 2001 From: JR1811 Date: Fri, 20 Oct 2023 08:36:08 +0200 Subject: [PATCH 2/3] fixed event registration and LoggerUtil output --- .../fabric/referencemod/MyMod.java | 2 +- .../fabric/referencemod/MyModClient.java | 2 ++ .../fabric/referencemod/event/ModEvents.java | 9 ++++++-- .../referencemod/util/helper/LoggerUtil.java | 22 +++++++++++++++++-- 4 files changed, 30 insertions(+), 5 deletions(-) diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyMod.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyMod.java index ffde229..34682e3 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyMod.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyMod.java @@ -22,7 +22,7 @@ public void onInitialize() { ModBlockEntities.registerBlockEntityTypes(); ModItems.initialize(); ModSounds.initializeSounds(); - ModEvents.registerAllEvents(); + ModEvents.registerCommonEvents(); ModParticles.initialize(); TextUtil.initializeAllTextFunctions(); diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyModClient.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyModClient.java index 7ab44e0..4852180 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyModClient.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyModClient.java @@ -1,5 +1,6 @@ package dev.mineblock11.fabric.referencemod; +import dev.mineblock11.fabric.referencemod.event.ModEvents; import dev.mineblock11.fabric.referencemod.particle.ModParticles; import dev.mineblock11.fabric.referencemod.particle.custom.MyParticle; import dev.mineblock11.fabric.referencemod.util.helper.LoggerUtil; @@ -12,6 +13,7 @@ public class MyModClient implements ClientModInitializer { @Override public void onInitializeClient() { + ModEvents.registerClientEvents(); ParticleFactoryRegistry.getInstance().register(ModParticles.MY_PARTICLE, MyParticle.Factory::new); LoggerUtil.devLogger("All client classes have been initialized"); diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/event/ModEvents.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/event/ModEvents.java index 72b970d..3a11354 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/event/ModEvents.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/event/ModEvents.java @@ -22,11 +22,16 @@ public class ModEvents { - public static void registerAllEvents() { - LoggerUtil.devLogger("Initializing Events"); + public static void registerCommonEvents() { + LoggerUtil.devLogger("Initializing Common Events"); attackedEntityEvent(); playerDiedEvent(); + } + + public static void registerClientEvents() { + LoggerUtil.devLogger("Initializing Client Events"); + simpleHudRenderEvent(); advancedHudRenderEvent(); worldRenderEvent(); diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/util/helper/LoggerUtil.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/util/helper/LoggerUtil.java index 89aacda..bb72a2f 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/util/helper/LoggerUtil.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/util/helper/LoggerUtil.java @@ -24,6 +24,18 @@ public static void devLogger(String input) { devLogger(input, false, null); } + /** + * This method will print error text to the console. + * It uses the {@link MyMod#LOGGER LOGGER} and prints only, + * if the instance has been launched in a developer environment.

+ * This method is an overload method of {@link #devLogger(String, boolean, Exception)} + * + * @param input String, which will be displayed in the console + */ + public static void devLogger(String input, Exception exception) { + devLogger(input, true, exception); + } + /** * This method will print normal text or text with error highlighting to the console. * It uses the {@link MyMod#LOGGER LOGGER} and prints only, @@ -38,7 +50,13 @@ public static void devLogger(String input, boolean isError, @Nullable Exception String outputText = "DEV - [" + input + "]"; if (!isError) MyMod.LOGGER.info(outputText); - if (exception == null) MyMod.LOGGER.error(outputText); - else MyMod.LOGGER.error(outputText, exception); + else { + if (exception == null) { + MyMod.LOGGER.error(outputText); + return; + } + + MyMod.LOGGER.error(outputText, exception); + } } } From 491c839d30c75fcd30de05a26cd022214a8d940b Mon Sep 17 00:00:00 2001 From: JR1811 Date: Sun, 22 Oct 2023 03:54:19 +0200 Subject: [PATCH 3/3] small cleanup, fixed datagen and added new block for blockstate datagen topic --- reference-mod/build.gradle | 10 + .../07ff412db5499c029f934b8a0c05caecd667a51a | 2 +- .../5a9530de498852a784d0acd4174a91642817b254 | 2 +- .../8380c5332bc7862f3bd469de6c4a2dbb12b58221 | 3 + .../d380053783a5710f3d3b0020baf87cc4ff3b8607 | 4 +- .../blockstates/advanced_test_block.json | 184 ++++++++++++++++++ .../assets/referencemod/lang/en_us.json | 4 + .../models/item/advanced_test_block.json | 6 + .../fabric/referencemod/MyMod.java | 4 +- .../fabric/referencemod/MyModClient.java | 8 +- .../fabric/referencemod/block/ModBlocks.java | 34 ++-- .../block/custom/AdvancedTestBlock.java | 166 ++++++++++++++++ .../referencemod/datagen/MyModDatagen.java | 4 +- .../provider/EnglishTranslationProvider.java | 9 + .../datagen/provider/MyModelProvider.java | 62 ++++++ .../fabric/referencemod/event/ModEvents.java | 4 +- .../referencemod/particle/ModParticles.java | 6 + .../referencemod/util/MyModProperties.java | 15 ++ .../models/block/advanced_test_block.json | 73 +++++++ .../block/advanced_test_block_a0b1.json | 31 +++ .../block/advanced_test_block_a0b2.json | 32 +++ .../block/advanced_test_block_a0b3.json | 31 +++ .../block/advanced_test_block_a1b1.json | 46 +++++ .../block/advanced_test_block_a1b2.json | 47 +++++ .../block/advanced_test_block_a1b3.json | 46 +++++ .../block/advanced_test_block_a2b1.json | 60 ++++++ .../block/advanced_test_block_a2b2.json | 61 ++++++ .../block/advanced_test_block_a2b3.json | 60 ++++++ .../block/advanced_test_block_a3b1.json | 74 +++++++ .../block/advanced_test_block_a3b2.json | 75 +++++++ .../block/advanced_test_block_a3b3.json | 74 +++++++ .../block/advanced_test_block_arrow.png | Bin 0 -> 184 bytes .../block/advanced_test_block_border.png | Bin 0 -> 122 bytes 33 files changed, 1208 insertions(+), 29 deletions(-) create mode 100644 reference-mod/src/main/generated/.cache/8380c5332bc7862f3bd469de6c4a2dbb12b58221 create mode 100644 reference-mod/src/main/generated/assets/referencemod/blockstates/advanced_test_block.json create mode 100644 reference-mod/src/main/generated/assets/referencemod/models/item/advanced_test_block.json create mode 100644 reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/block/custom/AdvancedTestBlock.java create mode 100644 reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/MyModelProvider.java create mode 100644 reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/util/MyModProperties.java create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b1.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b2.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b3.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b1.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b2.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b3.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b1.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b2.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b3.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b1.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b2.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b3.json create mode 100644 reference-mod/src/main/resources/assets/referencemod/textures/block/advanced_test_block_arrow.png create mode 100644 reference-mod/src/main/resources/assets/referencemod/textures/block/advanced_test_block_border.png diff --git a/reference-mod/build.gradle b/reference-mod/build.gradle index 820a49d..d751fde 100644 --- a/reference-mod/build.gradle +++ b/reference-mod/build.gradle @@ -21,6 +21,16 @@ loom { } } +sourceSets { + main { + resources { + srcDirs += [ + 'src/main/generated' + ] + } + } +} + repositories { // Add repositories to retrieve artifacts from in here. // You should only use this when depending on other mods because diff --git a/reference-mod/src/main/generated/.cache/07ff412db5499c029f934b8a0c05caecd667a51a b/reference-mod/src/main/generated/.cache/07ff412db5499c029f934b8a0c05caecd667a51a index 76c294a..106b16f 100644 --- a/reference-mod/src/main/generated/.cache/07ff412db5499c029f934b8a0c05caecd667a51a +++ b/reference-mod/src/main/generated/.cache/07ff412db5499c029f934b8a0c05caecd667a51a @@ -1,2 +1,2 @@ -// 1.20.1 2023-10-20T08:08:43.6780804 Reference Mod/Tags for minecraft:block +// 1.20.1 2023-10-23T23:33:46.9158136 Reference Mod/Tags for minecraft:block 6112b2bee4639cef8ed9aa51b42ea9e4b20c54f3 data\referencemod\tags\blocks\awesome_blocks.json diff --git a/reference-mod/src/main/generated/.cache/5a9530de498852a784d0acd4174a91642817b254 b/reference-mod/src/main/generated/.cache/5a9530de498852a784d0acd4174a91642817b254 index f5cc3e8..f5af657 100644 --- a/reference-mod/src/main/generated/.cache/5a9530de498852a784d0acd4174a91642817b254 +++ b/reference-mod/src/main/generated/.cache/5a9530de498852a784d0acd4174a91642817b254 @@ -1,3 +1,3 @@ -// 1.20.1 2023-10-20T08:08:43.6800751 Reference Mod/Block Loot Tables +// 1.20.1 2023-10-23T23:33:46.9383231 Reference Mod/Block Loot Tables 92553f71dfe9db9fa01651953449e473dc22cc96 data\referencemod\loot_tables\blocks\condensed_oak_log.json ae172abac3d98aabf9709f0a46ec02c79cc3bd0f data\referencemod\loot_tables\blocks\condensed_dirt.json diff --git a/reference-mod/src/main/generated/.cache/8380c5332bc7862f3bd469de6c4a2dbb12b58221 b/reference-mod/src/main/generated/.cache/8380c5332bc7862f3bd469de6c4a2dbb12b58221 new file mode 100644 index 0000000..c86a3ba --- /dev/null +++ b/reference-mod/src/main/generated/.cache/8380c5332bc7862f3bd469de6c4a2dbb12b58221 @@ -0,0 +1,3 @@ +// 1.20.1 2023-10-23T23:33:46.9317712 Reference Mod/Model Definitions +6b1219ee7bbffb00ce64bc3e76e5c2b659c7cb36 assets\referencemod\blockstates\advanced_test_block.json +65c1d03dfa1df874200d3ed6e7d8b984496a8187 assets\referencemod\models\item\advanced_test_block.json diff --git a/reference-mod/src/main/generated/.cache/d380053783a5710f3d3b0020baf87cc4ff3b8607 b/reference-mod/src/main/generated/.cache/d380053783a5710f3d3b0020baf87cc4ff3b8607 index c56d0b2..97aa8dd 100644 --- a/reference-mod/src/main/generated/.cache/d380053783a5710f3d3b0020baf87cc4ff3b8607 +++ b/reference-mod/src/main/generated/.cache/d380053783a5710f3d3b0020baf87cc4ff3b8607 @@ -1,2 +1,2 @@ -// 1.20.1 2023-10-20T08:08:43.6800751 Reference Mod/Language (en_us) -19806ef3e865705e197a3e3a2d4b29a4a86d22fd assets\referencemod\lang\en_us.json +// 1.20.1 2023-10-23T23:33:46.9317712 Reference Mod/Language (en_us) +02e0348a43ce83856bc06f60fa055b8bcc7b940d assets\referencemod\lang\en_us.json diff --git a/reference-mod/src/main/generated/assets/referencemod/blockstates/advanced_test_block.json b/reference-mod/src/main/generated/assets/referencemod/blockstates/advanced_test_block.json new file mode 100644 index 0000000..3fb8535 --- /dev/null +++ b/reference-mod/src/main/generated/assets/referencemod/blockstates/advanced_test_block.json @@ -0,0 +1,184 @@ +{ + "variants": { + "arrows=0,facing=east,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a0b2", + "y": 90 + }, + "arrows=0,facing=east,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a0b3", + "y": 90 + }, + "arrows=0,facing=east,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a0b1", + "y": 90 + }, + "arrows=0,facing=north,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a0b2" + }, + "arrows=0,facing=north,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a0b3" + }, + "arrows=0,facing=north,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a0b1" + }, + "arrows=0,facing=south,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a0b2", + "y": 180 + }, + "arrows=0,facing=south,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a0b3", + "y": 180 + }, + "arrows=0,facing=south,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a0b1", + "y": 180 + }, + "arrows=0,facing=west,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a0b2", + "y": 270 + }, + "arrows=0,facing=west,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a0b3", + "y": 270 + }, + "arrows=0,facing=west,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a0b1", + "y": 270 + }, + "arrows=1,facing=east,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a1b2", + "y": 90 + }, + "arrows=1,facing=east,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a1b3", + "y": 90 + }, + "arrows=1,facing=east,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a1b1", + "y": 90 + }, + "arrows=1,facing=north,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a1b2" + }, + "arrows=1,facing=north,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a1b3" + }, + "arrows=1,facing=north,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a1b1" + }, + "arrows=1,facing=south,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a1b2", + "y": 180 + }, + "arrows=1,facing=south,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a1b3", + "y": 180 + }, + "arrows=1,facing=south,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a1b1", + "y": 180 + }, + "arrows=1,facing=west,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a1b2", + "y": 270 + }, + "arrows=1,facing=west,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a1b3", + "y": 270 + }, + "arrows=1,facing=west,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a1b1", + "y": 270 + }, + "arrows=2,facing=east,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a2b2", + "y": 90 + }, + "arrows=2,facing=east,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a2b3", + "y": 90 + }, + "arrows=2,facing=east,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a2b1", + "y": 90 + }, + "arrows=2,facing=north,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a2b2" + }, + "arrows=2,facing=north,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a2b3" + }, + "arrows=2,facing=north,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a2b1" + }, + "arrows=2,facing=south,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a2b2", + "y": 180 + }, + "arrows=2,facing=south,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a2b3", + "y": 180 + }, + "arrows=2,facing=south,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a2b1", + "y": 180 + }, + "arrows=2,facing=west,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a2b2", + "y": 270 + }, + "arrows=2,facing=west,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a2b3", + "y": 270 + }, + "arrows=2,facing=west,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a2b1", + "y": 270 + }, + "arrows=3,facing=east,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a3b2", + "y": 90 + }, + "arrows=3,facing=east,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a3b3", + "y": 90 + }, + "arrows=3,facing=east,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a3b1", + "y": 90 + }, + "arrows=3,facing=north,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a3b2" + }, + "arrows=3,facing=north,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a3b3" + }, + "arrows=3,facing=north,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a3b1" + }, + "arrows=3,facing=south,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a3b2", + "y": 180 + }, + "arrows=3,facing=south,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a3b3", + "y": 180 + }, + "arrows=3,facing=south,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a3b1", + "y": 180 + }, + "arrows=3,facing=west,hitbox_size=big": { + "model": "referencemod:block/advanced_test_block_a3b2", + "y": 270 + }, + "arrows=3,facing=west,hitbox_size=full": { + "model": "referencemod:block/advanced_test_block_a3b3", + "y": 270 + }, + "arrows=3,facing=west,hitbox_size=small": { + "model": "referencemod:block/advanced_test_block_a3b1", + "y": 270 + } + } +} \ No newline at end of file diff --git a/reference-mod/src/main/generated/assets/referencemod/lang/en_us.json b/reference-mod/src/main/generated/assets/referencemod/lang/en_us.json index aa15084..394183f 100644 --- a/reference-mod/src/main/generated/assets/referencemod/lang/en_us.json +++ b/reference-mod/src/main/generated/assets/referencemod/lang/en_us.json @@ -1,4 +1,8 @@ { + "block.referencemod.advanced_test_block": "Advanced Test Block", + "block.referencemod.advanced_test_block.subtitle": "§3[SHIFT]§r to expand Tooltip window!", + "block.referencemod.advanced_test_block.subtitle.shift_0": "§3[Interact]§r with this block to cycle between arrows", + "block.referencemod.advanced_test_block.subtitle.shift_1": "§3[Sneak + Interact]§r with this block to change the VoxelShape", "block.referencemod.condensed_dirt": "Condensed Dirt", "block.referencemod.prismarine_lamp": "Prismarine Lamp", "block.referencemod.test_block": "Test Block", diff --git a/reference-mod/src/main/generated/assets/referencemod/models/item/advanced_test_block.json b/reference-mod/src/main/generated/assets/referencemod/models/item/advanced_test_block.json new file mode 100644 index 0000000..080cff2 --- /dev/null +++ b/reference-mod/src/main/generated/assets/referencemod/models/item/advanced_test_block.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "minecraft:item/barrier" + } +} \ No newline at end of file diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyMod.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyMod.java index 34682e3..e44ded8 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyMod.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyMod.java @@ -22,10 +22,10 @@ public void onInitialize() { ModBlockEntities.registerBlockEntityTypes(); ModItems.initialize(); ModSounds.initializeSounds(); - ModEvents.registerCommonEvents(); + ModEvents.registerCommon(); ModParticles.initialize(); TextUtil.initializeAllTextFunctions(); - LoggerUtil.devLogger("All classes have been initialized"); + LoggerUtil.devLogger("All common classes have been initialized"); } } diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyModClient.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyModClient.java index 4852180..c0372ec 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyModClient.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/MyModClient.java @@ -1,20 +1,20 @@ package dev.mineblock11.fabric.referencemod; +import dev.mineblock11.fabric.referencemod.block.ModBlocks; import dev.mineblock11.fabric.referencemod.event.ModEvents; import dev.mineblock11.fabric.referencemod.particle.ModParticles; -import dev.mineblock11.fabric.referencemod.particle.custom.MyParticle; import dev.mineblock11.fabric.referencemod.util.helper.LoggerUtil; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.api.EnvType; import net.fabricmc.api.Environment; -import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry; @Environment(EnvType.CLIENT) public class MyModClient implements ClientModInitializer { @Override public void onInitializeClient() { - ModEvents.registerClientEvents(); - ParticleFactoryRegistry.getInstance().register(ModParticles.MY_PARTICLE, MyParticle.Factory::new); + ModEvents.registerClient(); + ModBlocks.initializeClientRendering(); + ModParticles.initializeClient(); LoggerUtil.devLogger("All client classes have been initialized"); } diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/block/ModBlocks.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/block/ModBlocks.java index 7651a0f..c7c1a4b 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/block/ModBlocks.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/block/ModBlocks.java @@ -1,12 +1,15 @@ package dev.mineblock11.fabric.referencemod.block; import dev.mineblock11.fabric.referencemod.MyMod; +import dev.mineblock11.fabric.referencemod.block.custom.AdvancedTestBlock; import dev.mineblock11.fabric.referencemod.block.custom.PrismarineLampBlock; import dev.mineblock11.fabric.referencemod.block.custom.TestBlock; import dev.mineblock11.fabric.referencemod.util.helper.LoggerUtil; +import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; import net.minecraft.block.AbstractBlock; import net.minecraft.block.Block; import net.minecraft.block.PillarBlock; +import net.minecraft.client.render.RenderLayer; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; import net.minecraft.registry.Registries; @@ -15,26 +18,23 @@ import net.minecraft.util.Identifier; public class ModBlocks { + public static final Block CONDENSED_DIRT = register("condensed_dirt", true, + new Block(AbstractBlock.Settings.create().sounds(BlockSoundGroup.GRASS))); - public static final Block CONDENSED_DIRT = register( - new Block( - AbstractBlock.Settings.create().sounds(BlockSoundGroup.GRASS) - ), "condensed_dirt", true); + public static final PillarBlock CONDENSED_OAK_LOG = register("condensed_oak_log", true, + new PillarBlock(AbstractBlock.Settings.create().sounds(BlockSoundGroup.WOOD))); - public static final Block TEST_BLOCK = register( - new TestBlock(AbstractBlock.Settings.create()), "test_block", true - ); + public static final PrismarineLampBlock PRISMARINE_LAMP = register("prismarine_lamp", true, + new PrismarineLampBlock()); - public static final PillarBlock CONDENSED_OAK_LOG = register( - new PillarBlock( - AbstractBlock.Settings.create().sounds(BlockSoundGroup.WOOD) - ), "condensed_oak_log", true); + public static final Block TEST_BLOCK = register("test_block", true, + new TestBlock(AbstractBlock.Settings.create())); - public static final PrismarineLampBlock PRISMARINE_LAMP = register( - new PrismarineLampBlock(), "prismarine_lamp", true - ); + public static final Block ADVANCED_TEST_BLOCK = register("advanced_test_block", true, + new AdvancedTestBlock(AbstractBlock.Settings.create().nonOpaque())); - public static T register(T block, String name, boolean registerItem) { + + public static T register( String name, boolean registerItem, T block) { Identifier id = new Identifier(MyMod.MOD_ID, name); if (registerItem) { @@ -48,4 +48,8 @@ public static T register(T block, String name, boolean registe public static void initialize() { LoggerUtil.devLogger("Initializing Blocks"); } + + public static void initializeClientRendering() { + BlockRenderLayerMap.INSTANCE.putBlock(ADVANCED_TEST_BLOCK, RenderLayer.getCutout()); + } } diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/block/custom/AdvancedTestBlock.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/block/custom/AdvancedTestBlock.java new file mode 100644 index 0000000..3fbb192 --- /dev/null +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/block/custom/AdvancedTestBlock.java @@ -0,0 +1,166 @@ +package dev.mineblock11.fabric.referencemod.block.custom; + +import dev.mineblock11.fabric.referencemod.util.MyModProperties; +import dev.mineblock11.fabric.referencemod.util.helper.LoggerUtil; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.ShapeContext; +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.client.item.TooltipContext; +import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.item.ItemStack; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.DirectionProperty; +import net.minecraft.state.property.EnumProperty; +import net.minecraft.state.property.IntProperty; +import net.minecraft.state.property.Properties; +import net.minecraft.text.Text; +import net.minecraft.util.*; +import net.minecraft.util.hit.BlockHitResult; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.util.math.Vec3d; +import net.minecraft.util.shape.VoxelShape; +import net.minecraft.util.shape.VoxelShapes; +import net.minecraft.world.BlockView; +import net.minecraft.world.World; +import org.jetbrains.annotations.Nullable; + +import java.util.List; + +@SuppressWarnings("deprecation") +public class AdvancedTestBlock extends Block { + public static final int MAX_ARROWS_COUNT = 3; + + // Blockstate properties + public static final DirectionProperty FACING = Properties.HORIZONTAL_FACING; + public static final IntProperty ARROWS = MyModProperties.ARROWS; // custom Block-state Property + public static final EnumProperty BOXES = MyModProperties.HITBOX_SIZE; // custom Block-state Property + + + public AdvancedTestBlock(Settings settings) { + super(settings); + this.getDefaultState().with(FACING, Direction.NORTH).with(ARROWS, 0).with(BOXES, HitBoxVariant.FULL); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + builder.add(FACING, ARROWS, BOXES); + } + + @Override + public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { + Direction direction = state.get(FACING); + return switch (state.get(BOXES)) { + case SMALL -> HitBoxVariant.SMALL.getShape(direction); + case BIG -> HitBoxVariant.BIG.getShape(direction); + case FULL -> HitBoxVariant.FULL.getShape(direction); + }; + } + + @Nullable + @Override + public BlockState getPlacementState(ItemPlacementContext ctx) { + return this.getDefaultState().with(FACING, ctx.getHorizontalPlayerFacing()).with(ARROWS, 1).with(BOXES, HitBoxVariant.SMALL); + } + + @Override + public BlockState rotate(BlockState state, BlockRotation rotation) { + return state.with(FACING, rotation.rotate(state.get(FACING))); + } + + @Override + public BlockState mirror(BlockState state, BlockMirror mirror) { + return state.rotate(mirror.getRotation(state.get(FACING))); + } + + @Override + public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) { + if (!world.isClient()) { + world.setBlockState(pos, player.isSneaking() ? state.cycle(BOXES) : state.cycle(ARROWS), Block.NOTIFY_ALL); + world.updateNeighborsAlways(pos, this); + } + return ActionResult.SUCCESS; + } + + @Override + public void appendTooltip(ItemStack stack, @Nullable BlockView world, List tooltip, TooltipContext options) { + super.appendTooltip(stack, world, tooltip, options); + if (Screen.hasShiftDown()) { + tooltip.add(Text.translatable(this.getTranslationKey().concat(".subtitle.shift_0"))); + tooltip.add(Text.translatable(this.getTranslationKey().concat(".subtitle.shift_1"))); + } else { + tooltip.add(Text.translatable(this.getTranslationKey().concat(".subtitle"))); + } + } + + // Example enum for blockstate and voxelshape management + public enum HitBoxVariant implements StringIdentifiable { + SMALL(0, "small"), + BIG(1, "big"), + FULL(2, "full"); + + private final int id; + private final String shapeName; + + HitBoxVariant(int id, String shapeName) { + this.id = id; + this.shapeName = shapeName; + } + + public int getId() { + return this.id; + } + + public static HitBoxVariant fromId(int id) { + for (HitBoxVariant entry : HitBoxVariant.values()) { + if (entry.getId() == id) return entry; + } + LoggerUtil.devLogger("Couldn't find VoxelShape entry. Using fallback value!", true, null); + return HitBoxVariant.FULL; + } + + @Override + public String asString() { + return this.shapeName; + } + + public VoxelShape getShape(Direction direction) { + if (this.equals(FULL)) return VoxelShapes.fullCube(); + + CornerPoints cornerPoints = CornerPoints.facing(this, direction); + Vec3d start = cornerPoints.startPoint; + Vec3d end = cornerPoints.endPoint; + + return VoxelShapes.cuboid(start.x, start.y, start.z, end.x, end.y, end.z); + } + + private record CornerPoints(Vec3d startPoint, Vec3d endPoint) { + private static final double MIN = 0; + private static final double MAX = 1; + + private static CornerPoints full() { + return new CornerPoints(new Vec3d(MIN, MIN, MIN), new Vec3d(MAX, MAX, MAX)); + } + + private static CornerPoints facing(HitBoxVariant variant, Direction direction) { + if (variant.equals(BIG)) { + return switch (direction) { + case EAST -> new CornerPoints(new Vec3d(0, 0, 0.5), new Vec3d(1, 1, 1)); + case SOUTH -> new CornerPoints(new Vec3d(0, 0, 0), new Vec3d(0.5, 1, 1)); + case WEST -> new CornerPoints(new Vec3d(0, 0, 0), new Vec3d(1, 1, 0.5)); + default -> new CornerPoints(new Vec3d(0.5, 0, 0), new Vec3d(1, 1, 1)); + }; + } else if (variant.equals(SMALL)) { + return switch (direction) { + case EAST -> new CornerPoints(new Vec3d(0.5625, 0, 0), new Vec3d(1, 0.25, 0.5)); + case SOUTH -> new CornerPoints(new Vec3d(0.5, 0, 0.5625), new Vec3d(1, 0.25, 1)); + case WEST -> new CornerPoints(new Vec3d(0, 0, 0.5), new Vec3d(0.4375, 0.25, 1)); + default -> new CornerPoints(new Vec3d(0, 0, 0), new Vec3d(0.5, 0.25, 0.4375)); + }; + } else return CornerPoints.full(); + } + } + } +} diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/MyModDatagen.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/MyModDatagen.java index a1d4017..447626c 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/MyModDatagen.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/MyModDatagen.java @@ -9,11 +9,11 @@ public class MyModDatagen implements DataGeneratorEntrypoint { @Override public void onInitializeDataGenerator(FabricDataGenerator fabricDataGenerator) { LoggerUtil.devLogger("Initializing Datagen"); - final FabricDataGenerator.Pack pack = fabricDataGenerator.createPack(); - // ... + final FabricDataGenerator.Pack pack = fabricDataGenerator.createPack(); pack.addProvider(EnglishTranslationProvider::new); + pack.addProvider(MyModelProvider::new); pack.addProvider(MyBlockTagProvider::new); pack.addProvider(MyBlockLootTableProvider::new); } diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/EnglishTranslationProvider.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/EnglishTranslationProvider.java index 2a3a8fa..ba9b6e2 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/EnglishTranslationProvider.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/EnglishTranslationProvider.java @@ -20,6 +20,15 @@ public EnglishTranslationProvider(FabricDataOutput dataOutput) { public void generateTranslations(TranslationBuilder translationBuilder) { translationBuilder.add(ModBlocks.PRISMARINE_LAMP, "Prismarine Lamp"); translationBuilder.add(ModBlocks.TEST_BLOCK, "Test Block"); + + translationBuilder.add(ModBlocks.ADVANCED_TEST_BLOCK, "Advanced Test Block"); + translationBuilder.add(String.format("%s.subtitle", ModBlocks.ADVANCED_TEST_BLOCK.getTranslationKey()), + "§3[SHIFT]§r to expand Tooltip window!"); + translationBuilder.add(String.format("%s.subtitle.shift_0", ModBlocks.ADVANCED_TEST_BLOCK.getTranslationKey()), + "§3[Interact]§r with this block to cycle between arrows"); + translationBuilder.add(String.format("%s.subtitle.shift_1", ModBlocks.ADVANCED_TEST_BLOCK.getTranslationKey()), + "§3[Sneak + Interact]§r with this block to change the VoxelShape"); + translationBuilder.add(String.format("sound.%s.metal_whistle", MyMod.MOD_ID), "Metal Whistle Sound"); try { diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/MyModelProvider.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/MyModelProvider.java new file mode 100644 index 0000000..e154a1c --- /dev/null +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/datagen/provider/MyModelProvider.java @@ -0,0 +1,62 @@ +package dev.mineblock11.fabric.referencemod.datagen.provider; + +import dev.mineblock11.fabric.referencemod.MyMod; +import dev.mineblock11.fabric.referencemod.block.ModBlocks; +import dev.mineblock11.fabric.referencemod.util.MyModProperties; +import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput; +import net.fabricmc.fabric.api.datagen.v1.provider.FabricModelProvider; +import net.minecraft.block.Blocks; +import net.minecraft.data.client.*; +import net.minecraft.state.property.Properties; +import net.minecraft.util.Identifier; + +public class MyModelProvider extends FabricModelProvider { + public MyModelProvider(FabricDataOutput output) { + super(output); + } + + @Override + public void generateBlockStateModels(BlockStateModelGenerator blockStateModelGenerator) { + blockStateModelGenerator.blockStateCollector + .accept(VariantsBlockStateSupplier.create(ModBlocks.ADVANCED_TEST_BLOCK) + .coordinate(horizontalFacingMap()) + .coordinate(arrowsAndBoxesMap()) + ); + } + + @Override + public void generateItemModels(ItemModelGenerator itemModelGenerator) { + itemModelGenerator.register(ModBlocks.ADVANCED_TEST_BLOCK.asItem(), Blocks.BARRIER.asItem(), Models.GENERATED); + } + + /** + * Creates BlocksState entries for cardinal directions + * + * @return Map of Rotation axis and the rotation values + */ + private BlockStateVariantMap horizontalFacingMap() { + return BlockStateVariantMap.create(Properties.HORIZONTAL_FACING).register(direction -> switch (direction) { + case EAST -> BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R90); + case SOUTH -> BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R180); + case WEST -> BlockStateVariant.create().put(VariantSettings.Y, VariantSettings.Rotation.R270); + default -> BlockStateVariant.create(); + }); + } + + /** + * Creates BlocksState entries. It considers the custom Arrows and Boxes BlockState Properties at the same time. + * + * @return Map of Model and the Identifier of the model + */ + private BlockStateVariantMap arrowsAndBoxesMap() { + return BlockStateVariantMap.create(MyModProperties.ARROWS, MyModProperties.HITBOX_SIZE) + .register((arrows, boxes) -> switch (boxes) { + case SMALL -> BlockStateVariant.create().put(VariantSettings.MODEL, + new Identifier(MyMod.MOD_ID, String.format("block/advanced_test_block_a%sb1", arrows))); + case BIG -> BlockStateVariant.create().put(VariantSettings.MODEL, + new Identifier(MyMod.MOD_ID, String.format("block/advanced_test_block_a%sb2", arrows))); + case FULL -> BlockStateVariant.create().put(VariantSettings.MODEL, + new Identifier(MyMod.MOD_ID, String.format("block/advanced_test_block_a%sb3", arrows))); + }); + } +} diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/event/ModEvents.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/event/ModEvents.java index 3a11354..2a90e39 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/event/ModEvents.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/event/ModEvents.java @@ -22,14 +22,14 @@ public class ModEvents { - public static void registerCommonEvents() { + public static void registerCommon() { LoggerUtil.devLogger("Initializing Common Events"); attackedEntityEvent(); playerDiedEvent(); } - public static void registerClientEvents() { + public static void registerClient() { LoggerUtil.devLogger("Initializing Client Events"); simpleHudRenderEvent(); diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/particle/ModParticles.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/particle/ModParticles.java index e32c3b8..bb30e54 100644 --- a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/particle/ModParticles.java +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/particle/ModParticles.java @@ -1,7 +1,9 @@ package dev.mineblock11.fabric.referencemod.particle; import dev.mineblock11.fabric.referencemod.MyMod; +import dev.mineblock11.fabric.referencemod.particle.custom.MyParticle; import dev.mineblock11.fabric.referencemod.util.helper.LoggerUtil; +import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry; import net.fabricmc.fabric.api.particle.v1.FabricParticleTypes; import net.minecraft.particle.DefaultParticleType; import net.minecraft.registry.Registries; @@ -14,4 +16,8 @@ public static void initialize() { LoggerUtil.devLogger("Initializing Particles"); Registry.register(Registries.PARTICLE_TYPE, new Identifier(MyMod.MOD_ID, "my_particle"), MY_PARTICLE); } + + public static void initializeClient() { + ParticleFactoryRegistry.getInstance().register(MY_PARTICLE, MyParticle.Factory::new); + } } diff --git a/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/util/MyModProperties.java b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/util/MyModProperties.java new file mode 100644 index 0000000..96cf0c4 --- /dev/null +++ b/reference-mod/src/main/java/dev/mineblock11/fabric/referencemod/util/MyModProperties.java @@ -0,0 +1,15 @@ +package dev.mineblock11.fabric.referencemod.util; + +import dev.mineblock11.fabric.referencemod.block.custom.AdvancedTestBlock; +import net.minecraft.state.property.EnumProperty; +import net.minecraft.state.property.IntProperty; + +public class MyModProperties { + public static final IntProperty ARROWS; + public static final EnumProperty HITBOX_SIZE; + + static { + ARROWS = IntProperty.of("arrows", 0, AdvancedTestBlock.MAX_ARROWS_COUNT); + HITBOX_SIZE = EnumProperty.of("hitbox_size", AdvancedTestBlock.HitBoxVariant.class); + } +} diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block.json new file mode 100644 index 0000000..cdaf6b9 --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block.json @@ -0,0 +1,73 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "textures": { + "0": "referencemod:block/advanced_test_block_arrow", + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_0", + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "name": "arrow_0", + "from": [1, 2, 1], + "to": [9, 2, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#0"} + } + }, + { + "name": "arrow_1", + "from": [6, 5, 7], + "to": [6, 13, 15], + "rotation": {"angle": 0, "axis": "y", "origin": [6, 9, 11]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 8, 8], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"} + } + }, + { + "name": "arrow_2", + "from": [9, 7, 0], + "to": [17, 7, 8], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 7, 4]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "rotation": 90, "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b1.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b1.json new file mode 100644 index 0000000..0fe48cb --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b1.json @@ -0,0 +1,31 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_0", + "from": [0, 0, 0], + "to": [8, 4, 7], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b2.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b2.json new file mode 100644 index 0000000..8ae5796 --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b2.json @@ -0,0 +1,32 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_1", + "from": [8, 0, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 0]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b3.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b3.json new file mode 100644 index 0000000..990c867 --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a0b3.json @@ -0,0 +1,31 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_2", + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b1.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b1.json new file mode 100644 index 0000000..8b6a456 --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b1.json @@ -0,0 +1,46 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "0": "referencemod:block/advanced_test_block_arrow", + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_0", + "from": [0, 0, 0], + "to": [8, 4, 7], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "name": "arrow_0", + "from": [1, 2, 1], + "to": [9, 2, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b2.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b2.json new file mode 100644 index 0000000..cb8b6b4 --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b2.json @@ -0,0 +1,47 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "0": "referencemod:block/advanced_test_block_arrow", + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_1", + "from": [8, 0, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 0]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "name": "arrow_0", + "from": [1, 2, 1], + "to": [9, 2, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b3.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b3.json new file mode 100644 index 0000000..7fd47b9 --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a1b3.json @@ -0,0 +1,46 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "0": "referencemod:block/advanced_test_block_arrow", + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_2", + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "name": "arrow_0", + "from": [1, 2, 1], + "to": [9, 2, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b1.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b1.json new file mode 100644 index 0000000..2e2278a --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b1.json @@ -0,0 +1,60 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "0": "referencemod:block/advanced_test_block_arrow", + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_0", + "from": [0, 0, 0], + "to": [8, 4, 7], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "name": "arrow_0", + "from": [1, 2, 1], + "to": [9, 2, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#0"} + } + }, + { + "name": "arrow_1", + "from": [6, 5, 7], + "to": [6, 13, 15], + "rotation": {"angle": 0, "axis": "z", "origin": [6, 9, 11]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 8, 8], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b2.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b2.json new file mode 100644 index 0000000..87699a9 --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b2.json @@ -0,0 +1,61 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "0": "referencemod:block/advanced_test_block_arrow", + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_1", + "from": [8, 0, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 0]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "name": "arrow_0", + "from": [1, 2, 1], + "to": [9, 2, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#0"} + } + }, + { + "name": "arrow_1", + "from": [6, 5, 7], + "to": [6, 13, 15], + "rotation": {"angle": 0, "axis": "z", "origin": [6, 9, 11]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 8, 8], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b3.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b3.json new file mode 100644 index 0000000..01b6f3c --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a2b3.json @@ -0,0 +1,60 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "0": "referencemod:block/advanced_test_block_arrow", + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_2", + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "name": "arrow_0", + "from": [1, 2, 1], + "to": [9, 2, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#0"} + } + }, + { + "name": "arrow_1", + "from": [6, 5, 7], + "to": [6, 13, 15], + "rotation": {"angle": 0, "axis": "z", "origin": [6, 9, 11]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 8, 8], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b1.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b1.json new file mode 100644 index 0000000..aa5efd4 --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b1.json @@ -0,0 +1,74 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "0": "referencemod:block/advanced_test_block_arrow", + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_0", + "from": [0, 0, 0], + "to": [8, 4, 7], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "name": "arrow_0", + "from": [1, 2, 1], + "to": [9, 2, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#0"} + } + }, + { + "name": "arrow_1", + "from": [6, 5, 7], + "to": [6, 13, 15], + "rotation": {"angle": 0, "axis": "z", "origin": [6, 9, 11]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 8, 8], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"} + } + }, + { + "name": "arrow_2", + "from": [9, 7, 0], + "to": [17, 7, 8], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 7, 4]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "rotation": 90, "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b2.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b2.json new file mode 100644 index 0000000..7b4aab6 --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b2.json @@ -0,0 +1,75 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "0": "referencemod:block/advanced_test_block_arrow", + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_1", + "from": [8, 0, 0], + "to": [16, 16, 16], + "rotation": {"angle": 0, "axis": "y", "origin": [8, 0, 0]}, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "name": "arrow_0", + "from": [1, 2, 1], + "to": [9, 2, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#0"} + } + }, + { + "name": "arrow_1", + "from": [6, 5, 7], + "to": [6, 13, 15], + "rotation": {"angle": 0, "axis": "z", "origin": [6, 9, 11]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 8, 8], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"} + } + }, + { + "name": "arrow_2", + "from": [9, 7, 0], + "to": [17, 7, 8], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 7, 4]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "rotation": 90, "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b3.json b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b3.json new file mode 100644 index 0000000..5484d9d --- /dev/null +++ b/reference-mod/src/main/resources/assets/referencemod/models/block/advanced_test_block_a3b3.json @@ -0,0 +1,74 @@ +{ + "credit": "Made with Blockbench by ShiroJR", + "ambientocclusion": false, + "textures": { + "0": "referencemod:block/advanced_test_block_arrow", + "1": "referencemod:block/advanced_test_block_border", + "particle": "referencemod:block/advanced_test_block_arrow" + }, + "elements": [ + { + "name": "step_2", + "from": [0, 0, 0], + "to": [16, 16, 16], + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#1"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#1"} + } + }, + { + "name": "arrow_0", + "from": [1, 2, 1], + "to": [9, 2, 9], + "rotation": {"angle": 0, "axis": "y", "origin": [1, 2, 1]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "texture": "#0"} + } + }, + { + "name": "arrow_1", + "from": [6, 5, 7], + "to": [6, 13, 15], + "rotation": {"angle": 0, "axis": "z", "origin": [6, 9, 11]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "rotation": 90, "texture": "#0"}, + "east": {"uv": [0, 0, 8, 8], "rotation": 180, "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "west": {"uv": [0, 0, 8, 8], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 0], "rotation": 270, "texture": "#0"} + } + }, + { + "name": "arrow_2", + "from": [9, 7, 0], + "to": [17, 7, 8], + "rotation": {"angle": -45, "axis": "z", "origin": [13, 7, 4]}, + "faces": { + "north": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "east": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "south": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "west": {"uv": [0, 0, 8, 0], "texture": "#0"}, + "up": {"uv": [0, 0, 8, 8], "rotation": 270, "texture": "#0"}, + "down": {"uv": [0, 0, 8, 8], "rotation": 90, "texture": "#0"} + } + } + ], + "groups": [ + { + "name": "base", + "origin": [8, 8, 8], + "color": 0, + "children": [0, 1, 2, 3] + } + ] +} \ No newline at end of file diff --git a/reference-mod/src/main/resources/assets/referencemod/textures/block/advanced_test_block_arrow.png b/reference-mod/src/main/resources/assets/referencemod/textures/block/advanced_test_block_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..16dc3e634d3754db516e7b54dde07a9a728aa2e7 GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=ffJdQTU}kcif|Qx5VrDDb$hE#AN< zY{)LWk+1rJ=c1N?>|3uM?l*o|TPMBZ*cG$30Heb6dz@$tE#T0dAx}yX z^1iy`$|Sp{M2QRqj=a08ud8RtrAqGg^em{mr#y3(du=HnP$R>QefiFnbDs-)%1AcH S^xxPF67zKRb6Mw<&;$VB=q23% literal 0 HcmV?d00001