Conversation
There was a problem hiding this comment.
Pull request overview
This pull request implements a belt upgrade system for the Utility Belt mod. The feature allows players to craft a new intermediate item (Belt Pouch) and use it to upgrade their utility belts in a smithing table, increasing the number of available slots from an initial size of 4 up to a configurable maximum of 6.
Changes:
- Added a new Belt Pouch item used both for crafting belts and upgrading them
- Refactored the belt inventory system to support dynamic sizing with configurable initial and maximum sizes
- Implemented smithing table integration for upgrading belts with pouches
Reviewed changes
Copilot reviewed 21 out of 40 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| gradle.properties | Version bump from 3.0.0-beta.1 to 3.0.0-beta.2 |
| datagen/src/main/java/io/github/jamalam360/utility_belt/datagen/Recipes.java | Added pouch crafting recipe, updated belt recipe to require pouches, and created smithing upgrade recipe |
| datagen/src/main/java/io/github/jamalam360/utility_belt/datagen/Models.java | Added model generation for the pouch item |
| common/src/main/resources/utility_belt.mixins.json | Registered SmithingMenuMixin for upgrade logic |
| common/src/main/resources/assets/utility_belt/textures/* | Added/updated texture files for pouch, belt, and GUI sprites |
| common/src/main/resources/assets/utility_belt/lang/en_us.json | Added translations for pouch, size tooltip, and reorganized config keys with client/common prefixes |
| common/src/main/java/io/github/jamalam360/utility_belt/state/ServerStateManager.java | Updated to use dynamic belt size from config when creating empty inventory |
| common/src/main/java/io/github/jamalam360/utility_belt/screen/UtilityBeltMenu.java | Refactored slot layout to support dynamic number of belt rows based on inventory size |
| common/src/main/java/io/github/jamalam360/utility_belt/mixin/SmithingMenuMixin.java | New mixin to handle belt upgrade logic, size validation, and inventory preservation |
| common/src/main/java/io/github/jamalam360/utility_belt/UtilityBeltItem.java | Added size component tracking and inventory resizing logic |
| common/src/main/java/io/github/jamalam360/utility_belt/UtilityBeltInventory.java | Removed fixed size constraint, added dynamic sizing with copyWithSize method |
| common/src/main/java/io/github/jamalam360/utility_belt/UtilityBelt.java | Added POUCH_ITEM, UTILITY_BELT_SIZE_COMPONENT_TYPE, and COMMON_CONFIG |
| common/src/main/java/io/github/jamalam360/utility_belt/CommonConfig.java | New configuration class for server-side settings (initial/max belt size) |
| common/src/generated/resources/data/utility_belt/recipe/* | Generated recipe JSON files for pouch, belt, and upgrade recipes |
| common/src/generated/resources/data/utility_belt/advancement/* | Generated advancement files for recipe unlocking |
| common/src/generated/resources/assets/utility_belt/models/item/pouch.json | Generated model file for pouch item |
| common/src/client/java/io/github/jamalam360/utility_belt/client/state/ClientStateManager.java | Updated to use dynamic belt size from config |
| common/src/client/java/io/github/jamalam360/utility_belt/client/screen/UtilityBeltScreen.java | Updated to render dynamic sized GUI with sprite-based backgrounds |
| common/src/client/java/io/github/jamalam360/utility_belt/client/render/BeltRenderer.java | Updated config reference from CONFIG to CLIENT_CONFIG |
| common/src/client/java/io/github/jamalam360/utility_belt/client/render/BeltHotbarRenderer.java | Refactored to render variable-sized hotbar with top/middle/bottom sprites |
| common/src/client/java/io/github/jamalam360/utility_belt/client/network/ClientNetworking.java | Updated config reference from CONFIG to CLIENT_CONFIG |
| common/src/client/java/io/github/jamalam360/utility_belt/client/mixin/MinecraftMixin.java | Updated config reference from CONFIG to CLIENT_CONFIG |
| common/src/client/java/io/github/jamalam360/utility_belt/client/UtilityBeltClient.java | Renamed CONFIG to CLIENT_CONFIG with "client" config category |
| common/src/client/java/io/github/jamalam360/utility_belt/client/ClientConfig.java | Renamed from Config class for clarity |
| README.md | Updated documentation with upgrade instructions and new crafting recipes |
Comments suppressed due to low confidence (1)
common/src/client/java/io/github/jamalam360/utility_belt/client/screen/UtilityBeltScreen.java:20
- The imageWidth and imageHeight fields need to be set in the constructor to reflect the dynamic GUI size based on the number of belt rows. The imageWidth should be 176 and imageHeight should be 16 + rows * 18 + 96 (top sprite + slot rows + bottom sprite). Without setting these values correctly, the screen won't be properly centered and mouse interactions may not align with the rendered GUI elements.
public UtilityBeltScreen(UtilityBeltMenu menu, Inventory inventory, Component title) {
super(menu, inventory, Component.translatable("container.utility_belt.utility_belt"));
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
common/src/main/java/io/github/jamalam360/utility_belt/mixin/SmithingMenuMixin.java
Show resolved
Hide resolved
common/src/client/java/io/github/jamalam360/utility_belt/client/render/BeltHotbarRenderer.java
Show resolved
Hide resolved
common/src/main/java/io/github/jamalam360/utility_belt/screen/UtilityBeltMenu.java
Show resolved
Hide resolved
common/src/main/java/io/github/jamalam360/utility_belt/screen/UtilityBeltMenu.java
Show resolved
Hide resolved
datagen/src/main/java/io/github/jamalam360/utility_belt/datagen/Recipes.java
Show resolved
Hide resolved
common/src/main/java/io/github/jamalam360/utility_belt/UtilityBeltInventory.java
Show resolved
Hide resolved
common/src/main/java/io/github/jamalam360/utility_belt/CommonConfig.java
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #34