Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 73 additions & 6 deletions src/main/java/com/tcm/MineTale/registry/ModItems.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,84 @@ public class ModItems {
public static void initialize() {
System.out.println("Registered Mod Items for " + MineTale.MOD_ID);
}

// --- NATURAL MATERIALS & GATHERABLES ---
public static final Item PLANT_FIBER = register("plant_fiber", Item::new, new Item.Properties());
public static final Item TREE_SAP = register("tree_sap", Item::new, new Item.Properties());
public static final Item SAP_GLOB = register("sap_glob", Item::new, new Item.Properties());
public static final Item RUBBLE = register("rubble", Item::new, new Item.Properties());
public static final Item TREE_BARK = register("tree_bark", Item::new, new Item.Properties());
public static final Item MOSS = register("moss", Item::new, new Item.Properties());
public static final Item BLUE_CRYSTAL_SHARDS = register("blue_crystal_shards", Item::new, new Item.Properties());
public static final Item GREEN_CRYSTAL_SHARDS = register("green_crystal_shards", Item::new, new Item.Properties());
public static final Item YELLOW_CRYSTAL_SHARDS = register("yellow_crystal_shards", Item::new, new Item.Properties());

// --- MINERALS & REFINED METALS (Unique to Hytale) ---
public static final Item THORIUM_INGOT = register("thorium_ingot", Item::new, new Item.Properties());
public static final Item COBALT_INGOT = register("cobalt_ingot", Item::new, new Item.Properties());
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());

// --- MOB DROPS, HIDES & LEATHERS ---
public static final Item LIGHT_HIDE = register("light_hide", Item::new, new Item.Properties());
public static final Item MEDIUM_HIDE = register("medium_hide", Item::new, new Item.Properties());
public static final Item HEAVY_HIDE = register("heavy_hide", Item::new, new Item.Properties());
public static final Item SOFT_HIDE = register("soft_hide", Item::new, new Item.Properties());
public static final Item PRISMATIC_HIDE = register("prismatic_hide", Item::new, new Item.Properties());

public static final Item LIGHT_LEATHER = register("light_leather", Item::new, new Item.Properties());
public static final Item MEDIUM_LEATHER = register("medium_leather", Item::new, new Item.Properties());
public static final Item HEAVY_LEATHER = register("heavy_leather", Item::new, new Item.Properties());
public static final Item STORM_LEATHER = register("storm_leather", Item::new, new Item.Properties());
public static final Item PRISMATIC_LEATHER = register("prismatic_leather", Item::new, new Item.Properties());

public static final Item FERAN_RIB = register("feran_rib", Item::new, new Item.Properties());
public static final Item STURDY_CHITIN = register("sturdy_chitin", Item::new, new Item.Properties());
public static final Item VENOM_SAC = register("venom_sac", Item::new, new Item.Properties());
public static final Item BONE_FRAGMENT = register("bone_fragment", Item::new, new Item.Properties());

// --- FABRICS & TEXTILES ---
public static final Item LINEN_SCRAPS = register("linen_scraps", Item::new, new Item.Properties());
public static final Item BOLT_OF_LINEN = register("bolt_of_linen", Item::new, new Item.Properties());
public static final Item SHADOWEAVE_SCRAPS = register("shadoweave_scraps", Item::new, new Item.Properties());
public static final Item CINDERCLOTH_SCRAPS = register("cindercloth_scraps", Item::new, new Item.Properties());
public static final Item BOLT_OF_WOOL = register("bolt_of_wool", Item::new, new Item.Properties());
public static final Item YELLOW_CLOTH = register("yellow_cloth", Item::new, new Item.Properties());

// --- SEEDS & FARMING (Bags and Bulbs) ---
public static final Item LETTUCE = register("lettuce", Item::new, new Item.Properties());
Comment thread
The-Code-Monkey marked this conversation as resolved.
Outdated
public static final Item CHILLI_SEED_BAG = register("chilli_seed_bag", Item::new, new Item.Properties());
public static final Item CHILLI_SEED_BAG_ETERNAL = register("chilli_seed_bag_eternal", Item::new, new Item.Properties());
public static final Item SUNFLOWER_SEED_BAG = register("sunflower_seed_bag", Item::new, new Item.Properties());
public static final Item CORN_SEED_BAG = register("corn_seed_bag", Item::new, new Item.Properties());
public static final Item COTTON_SEED_BAG = register("cotton_seed_bag", Item::new, new Item.Properties());
public static final Item RICE_SEED_BAG = register("rice_seed_bag", Item::new, new Item.Properties());
public static final Item ONION_BULB = register("onion_bulb", Item::new, new Item.Properties());

// --- MAGICAL & ALCHEMICAL ---
public static final Item ESSENCE_OF_LIFE = register("essence_of_life", Item::new, new Item.Properties());
public static final Item ESSENCE_OF_FIRE = register("essence_of_fire", Item::new, new Item.Properties());
public static final Item ESSENCE_OF_ICE = register("essence_of_ice", Item::new, new Item.Properties());
public static final Item ESSENCE_OF_THE_VOID = register("essence_of_the_void", Item::new, new Item.Properties());
public static final Item VOID_HEART = register("void_heart", Item::new, new Item.Properties());

// --- FLORA COMPONENTS (Non-placeable petals) ---
public static final Item RED_PETALS = register("red_petals", Item::new, new Item.Properties());
public static final Item YELLOW_PETALS = register("yellow_petals", Item::new, new Item.Properties());
public static final Item GREEN_PETALS = register("green_petals", Item::new, new Item.Properties());
public static final Item WHITE_PETALS = register("white_petals", Item::new, new Item.Properties());
public static final Item AZURE_PETALS = register("azure_petals", Item::new, new Item.Properties());
public static final Item STORM_PETALS = register("storm_petals", Item::new, new Item.Properties());
public static final Item BLOOD_PETALS = register("blood_petals", Item::new, new Item.Properties());
public static final Item CYAN_PETALS = register("cyan_petals", Item::new, new Item.Properties());

// --- REGISTRATION LOGIC ---
public static <GenericItem extends Item> GenericItem register(String name, Function<Item.Properties, GenericItem> itemFactory, Item.Properties settings) {
// Create the item key.
ResourceKey<Item> itemKey = ResourceKey.create(Registries.ITEM, Identifier.fromNamespaceAndPath(MineTale.MOD_ID, name));

// Create the item instance.
GenericItem item = itemFactory.apply(settings.setId(itemKey));

// Register the item.
Registry.register(BuiltInRegistries.ITEM, itemKey, item);

return item;
}
}