From 62465571fde50f24d528e6af1e75f8f9dd4f9871 Mon Sep 17 00:00:00 2001 From: Andy Wilson Date: Sun, 15 Feb 2026 11:01:31 +0000 Subject: [PATCH 1/6] fix: remove logs that are already a version in the game --- .../java/com/tcm/MineTale/datagen/ModBlockTagProvider.java | 7 ------- .../java/com/tcm/MineTale/datagen/ModModelProvider.java | 7 ------- src/main/java/com/tcm/MineTale/item/ModCreativeTab.java | 7 ------- src/main/java/com/tcm/MineTale/registry/ModBlocks.java | 7 ------- 4 files changed, 28 deletions(-) diff --git a/src/client/java/com/tcm/MineTale/datagen/ModBlockTagProvider.java b/src/client/java/com/tcm/MineTale/datagen/ModBlockTagProvider.java index fa0b960..21e9aec 100644 --- a/src/client/java/com/tcm/MineTale/datagen/ModBlockTagProvider.java +++ b/src/client/java/com/tcm/MineTale/datagen/ModBlockTagProvider.java @@ -30,9 +30,6 @@ public ModBlockTagProvider(FabricDataOutput output, CompletableFuture Date: Sun, 15 Feb 2026 11:36:59 +0000 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`fea?= =?UTF-8?q?t/add-items`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @The-Code-Monkey. * https://github.com/CodeMonkeysMods/MineTale/pull/46#issuecomment-3904263976 The following files were modified: * `src/client/java/com/tcm/MineTale/datagen/ModModelProvider.java` --- .../com/tcm/MineTale/datagen/ModModelProvider.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/client/java/com/tcm/MineTale/datagen/ModModelProvider.java b/src/client/java/com/tcm/MineTale/datagen/ModModelProvider.java index 89d9631..461717e 100644 --- a/src/client/java/com/tcm/MineTale/datagen/ModModelProvider.java +++ b/src/client/java/com/tcm/MineTale/datagen/ModModelProvider.java @@ -31,13 +31,13 @@ public class ModModelProvider extends FabricModelProvider { .select(Direction.WEST, BlockModelGenerators.Y_ROT_270); /** - * Registers block state and model definitions for the mod's custom log blocks and furnace workbenches. - * - * Configures horizontal and vertical variants for each custom log block and registers the wood model for - * WILD_WISTERIA_LOG; registers blockstate variants and item models for the mod's furnace workbench blocks. - * - * @param blockStateModelGenerator generator used to create block state and model entries - */ + * Register block state and model definitions for the mod's custom log blocks and furnace workbenches. + * + * Generates horizontal/vertical variants and associated wood models for the mod's logs (including a wood model for + * WILD_WISTERIA_LOG) and registers blockstate variants and item models for the furnace workbench blocks. + * + * @param blockStateModelGenerator generator used to create block state and model entries + */ @Override public void generateBlockStateModels(BlockModelGenerators blockStateModelGenerator) { blockStateModelGenerator.woodProvider(ModBlocks.AMBER_LOG).logWithHorizontal(ModBlocks.AMBER_LOG); From 14dbd126a36d2da41e0d6c6bc27d0a92d3b4a095 Mon Sep 17 00:00:00 2001 From: Andy Wilson Date: Sun, 15 Feb 2026 11:33:44 +0000 Subject: [PATCH 3/6] feat: add ores in --- .../com/tcm/MineTale/item/ModCreativeTab.java | 54 +++--- .../com/tcm/MineTale/registry/ModBlocks.java | 157 +++++++++++++++++- 2 files changed, 177 insertions(+), 34 deletions(-) diff --git a/src/main/java/com/tcm/MineTale/item/ModCreativeTab.java b/src/main/java/com/tcm/MineTale/item/ModCreativeTab.java index e1c44cc..14c1139 100644 --- a/src/main/java/com/tcm/MineTale/item/ModCreativeTab.java +++ b/src/main/java/com/tcm/MineTale/item/ModCreativeTab.java @@ -17,33 +17,33 @@ public class ModCreativeTab { .title(Component.translatable("minetale.creative_tab.title")) .displayItems((params, output) -> { output.accept(ModBlocks.FURNACE_WORKBENCH_BLOCK_T1); - output.accept(ModBlocks.FURNACE_WORKBENCH_BLOCK_T2); - output.accept(ModBlocks.CAMPFIRE_WORKBENCH_BLOCK); - output.accept(ModBlocks.WORKBENCH_WORKBENCH_BLOCK); - output.accept(ModBlocks.ARMORERS_WORKBENCH_BLOCK); - output.accept(ModBlocks.AMBER_LOG); - output.accept(ModBlocks.BAMBOO_LOG); - output.accept(ModBlocks.BAMBOO_LOG_DECO); - output.accept(ModBlocks.BANYAN_LOG); - output.accept(ModBlocks.BEECH_LOG); - output.accept(ModBlocks.BOTTLETREE_LOG); - output.accept(ModBlocks.BURNT_LOG); - output.accept(ModBlocks.CAMPHOR_LOG); - output.accept(ModBlocks.CRYSTALWOOD_LOG); - output.accept(ModBlocks.FIRE_LOG); - output.accept(ModBlocks.GUMBOAB_LOG); - output.accept(ModBlocks.ICE_LOG); - output.accept(ModBlocks.MAPLE_LOG); - output.accept(ModBlocks.PALM_TREE_LOG); - output.accept(ModBlocks.PALO_LOG); - output.accept(ModBlocks.POISONED_LOG); - output.accept(ModBlocks.REDWOOD_LOG); - output.accept(ModBlocks.SALLOW_LOG); - output.accept(ModBlocks.SPIRAL_LOG); - output.accept(ModBlocks.STORMBARK_LOG); - output.accept(ModBlocks.STRIPPED_LOG); - output.accept(ModBlocks.WINDWILLOW_LOG); - output.accept(ModBlocks.WILD_WISTERIA_LOG); + // output.accept(ModBlocks.FURNACE_WORKBENCH_BLOCK_T2); + // output.accept(ModBlocks.CAMPFIRE_WORKBENCH_BLOCK); + // output.accept(ModBlocks.WORKBENCH_WORKBENCH_BLOCK); + // output.accept(ModBlocks.ARMORERS_WORKBENCH_BLOCK); + // output.accept(ModBlocks.AMBER_LOG); + // output.accept(ModBlocks.BAMBOO_LOG); + // output.accept(ModBlocks.BAMBOO_LOG_DECO); + // output.accept(ModBlocks.BANYAN_LOG); + // output.accept(ModBlocks.BEECH_LOG); + // output.accept(ModBlocks.BOTTLETREE_LOG); + // output.accept(ModBlocks.BURNT_LOG); + // output.accept(ModBlocks.CAMPHOR_LOG); + // output.accept(ModBlocks.CRYSTALWOOD_LOG); + // output.accept(ModBlocks.FIRE_LOG); + // output.accept(ModBlocks.GUMBOAB_LOG); + // output.accept(ModBlocks.ICE_LOG); + // output.accept(ModBlocks.MAPLE_LOG); + // output.accept(ModBlocks.PALM_TREE_LOG); + // output.accept(ModBlocks.PALO_LOG); + // output.accept(ModBlocks.POISONED_LOG); + // output.accept(ModBlocks.REDWOOD_LOG); + // output.accept(ModBlocks.SALLOW_LOG); + // output.accept(ModBlocks.SPIRAL_LOG); + // output.accept(ModBlocks.STORMBARK_LOG); + // output.accept(ModBlocks.STRIPPED_LOG); + // output.accept(ModBlocks.WINDWILLOW_LOG); + // output.accept(ModBlocks.WILD_WISTERIA_LOG); }) .build(); } diff --git a/src/main/java/com/tcm/MineTale/registry/ModBlocks.java b/src/main/java/com/tcm/MineTale/registry/ModBlocks.java index 4af3f74..d9b8ba8 100644 --- a/src/main/java/com/tcm/MineTale/registry/ModBlocks.java +++ b/src/main/java/com/tcm/MineTale/registry/ModBlocks.java @@ -1,5 +1,7 @@ package com.tcm.MineTale.registry; +import java.util.ArrayList; +import java.util.List; import java.util.function.Function; import com.tcm.MineTale.MineTale; @@ -7,6 +9,7 @@ import com.tcm.MineTale.block.workbenches.CampfireWorkbench; import com.tcm.MineTale.block.workbenches.FurnaceWorkbench; import com.tcm.MineTale.block.workbenches.WorkbenchWorkbench; +import com.tcm.MineTale.item.ModCreativeTab; import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents; import net.minecraft.core.Registry; @@ -15,19 +18,22 @@ import net.minecraft.resources.Identifier; import net.minecraft.resources.ResourceKey; import net.minecraft.world.item.BlockItem; -import net.minecraft.world.item.CreativeModeTabs; import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.RotatedPillarBlock; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.block.Blocks; import static net.minecraft.world.level.block.Blocks.logProperties; public class ModBlocks { + private static final List REGISTERED_BLOCKS = new ArrayList<>(); + //Workbenches public static final Block CAMPFIRE_WORKBENCH_BLOCK = register( "campfire_workbench_block", @@ -90,6 +96,129 @@ public class ModBlocks { public static final Block WILD_WISTERIA_LOG = register("wild_wisteria_log", RotatedPillarBlock::new, logProperties(MapColor.SAND, MapColor.DIRT, SoundType.WOOD), true); public static final Block WILD_WISTERIA_WOOD = register("wild_wisteria_wood", RotatedPillarBlock::new, BlockBehaviour.Properties.of().mapColor(MapColor.DIRT).instrument(NoteBlockInstrument.BASS).strength(2.0F).sound(SoundType.WOOD).ignitedByLava(), true); + // Ores + + /// 1. COPPER + public static final Block COPPER_ORE_BASALT = registerOreBlock("copper_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block COPPER_ORE_VOLCANIC = registerOreBlock("copper_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block COPPER_ORE_SHALE = registerOreBlock("copper_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block COPPER_ORE_SANDSTONE = registerOreBlock("copper_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 2. ONYXIUM + public static final Block ONYXIUM_ORE_BASALT = registerOreBlock("onyxium_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block ONYXIUM_ORE_VOLCANIC = registerOreBlock("onyxium_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block ONYXIUM_ORE_SHALE = registerOreBlock("onyxium_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block ONYXIUM_ORE_STONE = registerOreBlock("onyxium_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + public static final Block ONYXIUM_ORE_SANDSTONE = registerOreBlock("onyxium_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 3. THORIUM + public static final Block THORIUM_ORE_BASALT = registerOreBlock("thorium_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block THORIUM_ORE_VOLCANIC = registerOreBlock("thorium_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block THORIUM_ORE_SHALE = registerOreBlock("thorium_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block THORIUM_ORE_STONE = registerOreBlock("thorium_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + public static final Block THORIUM_ORE_SANDSTONE = registerOreBlock("thorium_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + public static final Block THORIUM_ORE_DRY_MUD = registerOreBlock("thorium_ore_dry_mud", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 4. ADAMANTITE + public static final Block ADAMANTITE_ORE_BASALT = registerOreBlock("adamantite_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block ADAMANTITE_ORE_VOLCANIC = registerOreBlock("adamantite_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block ADAMANTITE_ORE_SHALE = registerOreBlock("adamantite_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block ADAMANTITE_ORE_STONE = registerOreBlock("adamantite_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + public static final Block ADAMANTITE_ORE_SLATE = registerOreBlock("adamantite_ore_slate", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + public static final Block ADAMANTITE_ORE_MAGMA = registerOreBlock("adamantite_ore_magma", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 5. MITHRIL + public static final Block MITHRIL_ORE_BASALT = registerOreBlock("mithril_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block MITHRIL_ORE_VOLCANIC = registerOreBlock("mithril_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block MITHRIL_ORE_SLATE = registerOreBlock("mithril_ore_slate", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block MITHRIL_ORE_STONE = registerOreBlock("mithril_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + public static final Block MITHRIL_ORE_MAGMA = registerOreBlock("mithril_ore_magma", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 6. COBALT + public static final Block COBALT_ORE_BASALT = registerOreBlock("cobalt_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block COBALT_ORE_VOLCANIC = registerOreBlock("cobalt_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block COBALT_ORE_SHALE = registerOreBlock("cobalt_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block COBALT_ORE_STONE = registerOreBlock("cobalt_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + public static final Block COBALT_ORE_SANDSTONE = registerOreBlock("cobalt_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + public static final Block COBALT_ORE_SLATE = registerOreBlock("cobalt_ore_slate", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 7. IRON + public static final Block IRON_ORE_BASALT = registerOreBlock("iron_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block IRON_ORE_VOLCANIC = registerOreBlock("iron_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block IRON_ORE_SHALE = registerOreBlock("iron_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block IRON_ORE_SANDSTONE = registerOreBlock("iron_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + public static final Block IRON_ORE_SLATE = registerOreBlock("iron_ore_slate", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 8. GOLD + public static final Block GOLD_ORE_BASALT = registerOreBlock("gold_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block GOLD_ORE_VOLCANIC = registerOreBlock("gold_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block GOLD_ORE_SHALE = registerOreBlock("gold_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block GOLD_ORE_SANDSTONE = registerOreBlock("gold_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + public static final Block GOLD_ORE_CALCITE = registerOreBlock("gold_ore_calcite", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 9. RUBY - not implemented in hytale + // public static final Block RUBY_ORE_BASALT = registerOreBlock("ruby_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block RUBY_ORE_VOLCANIC = registerOreBlock("ruby_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block RUBY_ORE_SHALE = registerOreBlock("ruby_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block RUBY_ORE_STONE = registerOreBlock("ruby_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + // public static final Block RUBY_ORE_SANDSTONE = registerOreBlock("ruby_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 10. PRISMA - no implemented in hytale + // public static final Block THORIUM_ORE_BASALT = registerOreBlock("thorium_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_VOLCANIC = registerOreBlock("thorium_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SHALE = registerOreBlock("thorium_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_STONE = registerOreBlock("thorium_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SANDSTONE = registerOreBlock("thorium_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 11. SILVER + public static final Block SILVER_ORE_BASALT = registerOreBlock("silver_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block SILVER_ORE_VOLCANIC = registerOreBlock("silver_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block SILVER_ORE_SHALE = registerOreBlock("silver_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + public static final Block SILVER_ORE_STONE = registerOreBlock("silver_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + public static final Block SILVER_ORE_SANDSTONE = registerOreBlock("silver_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + public static final Block SILVER_ORE_SLATE = registerOreBlock("silver_ore_slate", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 12. SAPPHIRE - not implemented in hytale + // public static final Block THORIUM_ORE_BASALT = registerOreBlock("thorium_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_VOLCANIC = registerOreBlock("thorium_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SHALE = registerOreBlock("thorium_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_STONE = registerOreBlock("thorium_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SANDSTONE = registerOreBlock("thorium_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 13. TOPAZ - not implemented in hytale + // public static final Block THORIUM_ORE_BASALT = registerOreBlock("thorium_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_VOLCANIC = registerOreBlock("thorium_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SHALE = registerOreBlock("thorium_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_STONE = registerOreBlock("thorium_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SANDSTONE = registerOreBlock("thorium_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 14. ZEPHYR - not implemented in hytale + // public static final Block THORIUM_ORE_BASALT = registerOreBlock("thorium_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_VOLCANIC = registerOreBlock("thorium_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SHALE = registerOreBlock("thorium_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_STONE = registerOreBlock("thorium_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SANDSTONE = registerOreBlock("thorium_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 15. DIAMOND - not implemented in hytale + // public static final Block THORIUM_ORE_BASALT = registerOreBlock("thorium_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_VOLCANIC = registerOreBlock("thorium_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SHALE = registerOreBlock("thorium_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SANDSTONE = registerOreBlock("thorium_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 16. VOIDSTONE - not implemented in hytale + // public static final Block THORIUM_ORE_BASALT = registerOreBlock("thorium_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_VOLCANIC = registerOreBlock("thorium_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SHALE = registerOreBlock("thorium_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_STONE = registerOreBlock("thorium_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SANDSTONE = registerOreBlock("thorium_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + + /// 17. EMERALD - not implemented in hytale + // public static final Block THORIUM_ORE_BASALT = registerOreBlock("thorium_ore_basalt", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_VOLCANIC = registerOreBlock("thorium_ore_volcanic", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SHALE = registerOreBlock("thorium_ore_shale", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.BASALT, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_STONE = registerOreBlock("thorium_ore_stone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.STONE, Items.COPPER_ORE, 1); + // public static final Block THORIUM_ORE_SANDSTONE = registerOreBlock("thorium_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); + /** * Adds the mod's workbench and furnace blocks to the Functional Blocks creative tab. * @@ -98,12 +227,9 @@ public class ModBlocks { * message containing the mod ID. */ public static void initialize() { - ItemGroupEvents.modifyEntriesEvent(CreativeModeTabs.FUNCTIONAL_BLOCKS).register(entries -> { - entries.accept(CAMPFIRE_WORKBENCH_BLOCK); - entries.accept(WORKBENCH_WORKBENCH_BLOCK); - entries.accept(FURNACE_WORKBENCH_BLOCK_T1); - entries.accept(FURNACE_WORKBENCH_BLOCK_T2); - }); + ItemGroupEvents.modifyEntriesEvent(ModCreativeTab.MINETALE_CREATIVE_TAB_KEY).register(entries -> { + REGISTERED_BLOCKS.forEach(entries::accept); + }); System.out.println("Registered Mod Blocks for " + MineTale.MOD_ID); @@ -126,6 +252,23 @@ private static Block register(String name, Function blockFactory, BlockBehaviour.Properties settings, Block baseBlock, Item itemToDrop, int count) { + ResourceKey blockKey = keyOfBlock(name); + + Block block = blockFactory.apply(settings.requiresCorrectToolForDrops().setId(blockKey)); + + ResourceKey itemKey = keyOfItem(name); + + BlockItem blockItem = new BlockItem(block, new Item.Properties().setId(itemKey).useBlockDescriptionPrefix()); + Registry.register(BuiltInRegistries.ITEM, itemKey, blockItem); + + REGISTERED_BLOCKS.add(block); + return Registry.register(BuiltInRegistries.BLOCK, blockKey, block); } From 3187d5d512071f0da9caad2dccc6e08cf9d2f241 Mon Sep 17 00:00:00 2001 From: Andy Wilson Date: Sun, 15 Feb 2026 11:40:38 +0000 Subject: [PATCH 4/6] fix: remove items from creative tab file --- .../com/tcm/MineTale/item/ModCreativeTab.java | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/src/main/java/com/tcm/MineTale/item/ModCreativeTab.java b/src/main/java/com/tcm/MineTale/item/ModCreativeTab.java index 14c1139..451583d 100644 --- a/src/main/java/com/tcm/MineTale/item/ModCreativeTab.java +++ b/src/main/java/com/tcm/MineTale/item/ModCreativeTab.java @@ -15,36 +15,6 @@ public class ModCreativeTab { public static final CreativeModeTab MINETALE_CREATIVE_TAB = FabricItemGroup.builder() .icon(() -> new ItemStack(ModBlocks.FURNACE_WORKBENCH_BLOCK_T1)) .title(Component.translatable("minetale.creative_tab.title")) - .displayItems((params, output) -> { - output.accept(ModBlocks.FURNACE_WORKBENCH_BLOCK_T1); - // output.accept(ModBlocks.FURNACE_WORKBENCH_BLOCK_T2); - // output.accept(ModBlocks.CAMPFIRE_WORKBENCH_BLOCK); - // output.accept(ModBlocks.WORKBENCH_WORKBENCH_BLOCK); - // output.accept(ModBlocks.ARMORERS_WORKBENCH_BLOCK); - // output.accept(ModBlocks.AMBER_LOG); - // output.accept(ModBlocks.BAMBOO_LOG); - // output.accept(ModBlocks.BAMBOO_LOG_DECO); - // output.accept(ModBlocks.BANYAN_LOG); - // output.accept(ModBlocks.BEECH_LOG); - // output.accept(ModBlocks.BOTTLETREE_LOG); - // output.accept(ModBlocks.BURNT_LOG); - // output.accept(ModBlocks.CAMPHOR_LOG); - // output.accept(ModBlocks.CRYSTALWOOD_LOG); - // output.accept(ModBlocks.FIRE_LOG); - // output.accept(ModBlocks.GUMBOAB_LOG); - // output.accept(ModBlocks.ICE_LOG); - // output.accept(ModBlocks.MAPLE_LOG); - // output.accept(ModBlocks.PALM_TREE_LOG); - // output.accept(ModBlocks.PALO_LOG); - // output.accept(ModBlocks.POISONED_LOG); - // output.accept(ModBlocks.REDWOOD_LOG); - // output.accept(ModBlocks.SALLOW_LOG); - // output.accept(ModBlocks.SPIRAL_LOG); - // output.accept(ModBlocks.STORMBARK_LOG); - // output.accept(ModBlocks.STRIPPED_LOG); - // output.accept(ModBlocks.WINDWILLOW_LOG); - // output.accept(ModBlocks.WILD_WISTERIA_LOG); - }) .build(); } From 4249a40b2db56085d5b681963887b43e47e53e79 Mon Sep 17 00:00:00 2001 From: "coderabbitai[bot]" <136622811+coderabbitai[bot]@users.noreply.github.com> Date: Sun, 15 Feb 2026 19:17:33 +0000 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=93=9D=20Add=20docstrings=20to=20`fea?= =?UTF-8?q?t/add-items`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docstrings generation was requested by @The-Code-Monkey. * https://github.com/CodeMonkeysMods/MineTale/pull/46#issuecomment-3904263976 The following files were modified: * `src/main/java/com/tcm/MineTale/registry/ModBlocks.java` --- .../com/tcm/MineTale/registry/ModBlocks.java | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/tcm/MineTale/registry/ModBlocks.java b/src/main/java/com/tcm/MineTale/registry/ModBlocks.java index d9b8ba8..22ac439 100644 --- a/src/main/java/com/tcm/MineTale/registry/ModBlocks.java +++ b/src/main/java/com/tcm/MineTale/registry/ModBlocks.java @@ -220,11 +220,11 @@ public class ModBlocks { // public static final Block THORIUM_ORE_SANDSTONE = registerOreBlock("thorium_ore_sandstone", Block::new, BlockBehaviour.Properties.of().strength(2).requiresCorrectToolForDrops(), Blocks.SANDSTONE, Items.COPPER_ORE, 1); /** - * Adds the mod's workbench and furnace blocks to the Functional Blocks creative tab. + * Adds all mod-registered blocks to the MineTale creative tab and logs the action. * - * Registers CAMPFIRE_WORKBENCH_BLOCK, WORKBENCH_WORKBENCH_BLOCK, FURNACE_WORKBENCH_BLOCK_T1, - * and FURNACE_WORKBENCH_BLOCK_T2 to CreativeModeTabs.FUNCTIONAL_BLOCKS and prints a registration - * message containing the mod ID. + * Subscribes an entries-modification handler for ModCreativeTab.MINETALE_CREATIVE_TAB_KEY that + * inserts every block collected in REGISTERED_BLOCKS into the creative tab, then prints a + * registration message that includes the mod ID. */ public static void initialize() { ItemGroupEvents.modifyEntriesEvent(ModCreativeTab.MINETALE_CREATIVE_TAB_KEY).register(entries -> { @@ -235,7 +235,17 @@ public static void initialize() { System.out.println("Registered Mod Blocks for " + MineTale.MOD_ID); } - private static Block register(String name, Function blockFactory, BlockBehaviour.Properties settings, boolean shouldRegisterItem) { + /** + * Register a block under the mod's namespace, optionally create and register its corresponding BlockItem, + * and add the block to the internal list of registered blocks. + * + * @param name the registry name (path) to use for the block and item + * @param blockFactory factory that creates the Block from provided BlockBehaviour.Properties + * @param settings the BlockBehaviour.Properties to apply to the block; this method will set the block's registry ID on it + * @param shouldRegisterItem if `true`, a BlockItem for the block will be created and registered with the same name + * @return the registered Block instance + */ + private static Block register(String name, Function blockFactory, BlockBehaviour.Properties settings, boolean shouldRegisterItem) { // Create a registry key for the block ResourceKey blockKey = keyOfBlock(name); // Create the block instance @@ -257,6 +267,21 @@ private static Block register(String name, Function blockFactory, BlockBehaviour.Properties settings, Block baseBlock, Item itemToDrop, int count) { ResourceKey blockKey = keyOfBlock(name); From 52ff02c081a5edc10d2a796d86041a302a220f84 Mon Sep 17 00:00:00 2001 From: Andy Wilson Date: Sun, 15 Feb 2026 20:00:54 +0000 Subject: [PATCH 6/6] Remove steel ingot and add new ore items Removed the steel ingot item and added new ore items. --- src/main/java/com/tcm/MineTale/registry/ModItems.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/tcm/MineTale/registry/ModItems.java b/src/main/java/com/tcm/MineTale/registry/ModItems.java index 6ad928f..47aef66 100644 --- a/src/main/java/com/tcm/MineTale/registry/ModItems.java +++ b/src/main/java/com/tcm/MineTale/registry/ModItems.java @@ -44,7 +44,11 @@ public static void initialize() { public static final Item ADAMANTITE_INGOT = register("adamantite_ingot", Item::new, new Item.Properties()); public static final Item MITHRIL_INGOT = register("mithril_ingot", Item::new, new Item.Properties()); public static final Item BRONZE_INGOT = register("bronze_ingot", Item::new, new Item.Properties()); - public static final Item STEEL_INGOT = register("steel_ingot", Item::new, new Item.Properties()); + + public static final Item THORIUM_ORE = register("thorium_ore", Item::new, new Item.Properties()); + public static final Item COBALT_ORE = register("cobalt_ore", Item::new, new Item.Properties()); + public static final Item ADAMANTITE_ORE = register("adamantite_ore", Item::new, new Item.Properties()); + public static final Item MITHRIL_ORE = register("mithril_ore", Item::new, new Item.Properties()); // --- MOB DROPS, HIDES & LEATHERS --- public static final Item LIGHT_HIDE = register("light_hide", Item::new, new Item.Properties());