Add various mod items to ModItems registry#41
Conversation
📝 WalkthroughWalkthroughAdded many new item declarations to the ModItems registry and wired their registration to automatically add them to the ModCreativeTab via ItemGroupEvents.modifyEntriesEvent; also added numerous English translation entries in ModLangProvider. No public method signatures were changed. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/main/java/com/tcm/MineTale/registry/ModItems.java`:
- Line 66: The LETTUCE item is registered with default Item.Properties() so it
isn't edible; if it should be consumable, update the registration for LETTUCE to
supply a Food object via Item.Properties().food(...) (e.g., create a
Food.Builder with the desired nutrition/saturation/effects and pass it into the
LETTUCE registration), otherwise leave it as-is if it is only a crafting
ingredient; locate the LETTUCE constant and modify its Item.Properties() call in
the register("lettuce", Item::new, ...) invocation accordingly.
🧹 Nitpick comments (2)
src/main/java/com/tcm/MineTale/registry/ModItems.java (2)
75-80: Consider adding rarity or stack-size limits to magical/unique items.Items like
ESSENCE_OF_THE_VOIDandVOID_HEARTare semantically rare or powerful. You may want to set.rarity(Rarity.RARE)or.stacksTo(16)on their properties to reflect that in-game. Fine to defer if this is a placeholder pass.
67-73: Seed bags and bulbs may need planting behavior.These are all plain
Iteminstances. If any seed bag orONION_BULBshould be plantable on farmland, they'd typically extend or configure anItemNameBlockItem(or similar) linked to a crop block. Fine to defer if crop blocks aren't implemented yet.
Automatically add registered items to the creative tab.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/client/java/com/tcm/MineTale/datagen/ModLangProvider.java (1)
19-23:⚠️ Potential issue | 🟡 MinorAdd missing translation for
workbench_workbench_block.
ModBlocks.WORKBENCH_WORKBENCH_BLOCKis registered and added to the creative tab (line 22 in ModCreativeTab.java), but lacks a corresponding translation entry in ModLangProvider.java. Add the translation forblock.minetale.workbench_workbench_block.
🤖 Fix all issues with AI agents
In `@src/main/java/com/tcm/MineTale/registry/ModItems.java`:
- Around line 103-106: The current code in ModItems registers an
ItemGroupEvents.modifyEntriesEvent listener per item (using
entries.accept(item)), which creates ~58 listeners; instead, in ModItems.collect
all item Instances into a List (e.g., a private static List<Item> items or
similar during each item registration) and then in ModItems.initialize()
register a single
ItemGroupEvents.modifyEntriesEvent(ModCreativeTab.MINETALE_CREATIVE_TAB_KEY)
listener that iterates the list and calls entries.accept(item) for each item;
update any per-item registration sites to add the created Item to that list (not
register the event), and remove the per-item ItemGroupEvents.register calls so
only the single bulk listener in initialize() remains.
Summary by CodeRabbit
New Features
Documentation / Localization