Fixed bow, crossbow, trident, armors and maces stacking up to 64. Fix…#179
Fixed bow, crossbow, trident, armors and maces stacking up to 64. Fix…#179RenanOSX wants to merge 2 commits intoAllTheMods:1.21.xfrom
Conversation
…ed armor leggings with higher defense than chestplate for all armor types.
There was a problem hiding this comment.
Pull request overview
This PR fixes two issues with the mod's custom items: (1) armor pieces, maces, bows, crossbows, and tridents were incorrectly stacking up to 64 instead of 1, and (2) leggings had higher defense values than chestplates for all three armor types, which is contrary to standard Minecraft armor balance.
Key Changes:
- Added
.stacksTo(1)to all armor items (helmet, chestplate, leggings, boots) for three armor types (Allthemodium, Vibranium, Unobtainium) - Added
.stacksTo(1)to maces, bow, crossbow, and trident items - Swapped defense values between chestplate and leggings for all three armor types to follow the standard pattern (chestplate > leggings)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main/java/com/thevortex/allthemodium/registry/ModRegistry.java | Added .stacksTo(1) to armor items, maces, bow, crossbow, and trident to prevent incorrect stacking; removed extraneous blank lines |
| src/main/java/com/thevortex/allthemodium/registry/ArmorRegistries.java | Corrected armor defense values by swapping chestplate and leggings values for all three armor types (Allthemodium, Vibranium, Unobtainium); removed trailing space from closing brace |
| README.md | Added documentation noting the fix for gear items stacking issue |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| public static final DeferredHolder<Item,SwordItem> ATM_SWORD = ITEMS.register("allthemodium_sword", () -> new SwordItem(ATMTier.ALLTHEMODIUM, (new Item.Properties()).rarity(Rarity.EPIC).fireResistant().component(DataComponents.UNBREAKABLE, new Unbreakable(true)).attributes(SwordItem.createAttributes(ATMTier.ALLTHEMODIUM, 5, -1.4F)))); | ||
| public static final DeferredHolder<Item,SwordItem> VIB_SWORD = ITEMS.register("vibranium_sword", () -> new SwordItem(ATMTier.VIBRANIUM, (new Item.Properties()).rarity(Rarity.EPIC).fireResistant().component(DataComponents.UNBREAKABLE, new Unbreakable(true)).attributes(SwordItem.createAttributes(ATMTier.VIBRANIUM, 10, -0.4F)))); | ||
| public static final DeferredHolder<Item,SwordItem> UNO_SWORD = ITEMS.register("unobtainium_sword", () -> new SwordItem(ATMTier.UNOBTAINIUM, (new Item.Properties()).rarity(Rarity.EPIC).fireResistant().component(DataComponents.UNBREAKABLE, new Unbreakable(true)).attributes(SwordItem.createAttributes(ATMTier.UNOBTAINIUM, 15, 0.4F)))); |
There was a problem hiding this comment.
The swords (lines 479-481) and pickaxes (lines 483-485) are missing .stacksTo(1) in their properties. While tools with durability typically default to stack size 1, these items are marked as unbreakable, and explicit .stacksTo(1) should be added for consistency with the maces, bow, crossbow, and trident that are being fixed in this PR. The same issue applies to axes (487-489), shovels (491-493), hoes (495-497), and the alloy tools (513-517), though those are outside the changed region.
Fixed bow, crossbow, trident, armors and maces stacking up to 64. Fixed armor leggings with higher defense than chestplate for all armor types.