Skip to content

Reduce unnecessary complexity to equipment system refactor#11706

Open
Thodor12 wants to merge 6 commits into
version/mainfrom
fix/weird_equipment_registry_behaviour
Open

Reduce unnecessary complexity to equipment system refactor#11706
Thodor12 wants to merge 6 commits into
version/mainfrom
fix/weird_equipment_registry_behaviour

Conversation

@Thodor12

@Thodor12 Thodor12 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • I have read and accept the Contributing Guidelines
  • I have tested and confirmed my changes are working on the most recent commit of this pull request
  • I have used AI in the creation of this pull request

Related issues

Supersedes #11647

Changes proposed in this pull request

  • Instead of the hefty logic introduced by this PR which rewrites near all the equipment registry code, we need only introduce a small interception in the querying of equipment level to catch custom equipment levels.
  • Undone all of the previous work, replaced by a light intermediate catch

Review please

@Thodor12

Thodor12 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Unrelated, but we should maybe consider dropping the integrated Tinkers compat after this change, considering custom levels could now be populated via this

@Thodor12 Thodor12 linked an issue Jun 8, 2026 that may be closed by this pull request
5 tasks
@Thodor12

Thodor12 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor Author

Closes #11707
Closes #11705

@muellerjp

Copy link
Copy Markdown
Contributor

I see you are arguing here for runtime evaluation instead of on init registering of the levels. Which is a way to account for poor config handling mods like the issue with MoreVanillaShields.

One thing i would like to keep functionality wise is the ability to register custom weapons which do not implement DEFAULT_SWORD_ACTIONS. So if we can keep the spirit of registerWeaponRecognizer i would be happy.

Reverting the sword registration code is unnecessary, as its still the identical code to vanillaToolLevel. Because its functionally irrelevant and readability is somewhat subjective, i will not die on that hill.

What we are losing with removing the on-init registration is a clear log output which mods / items where registered unsuccessfully. This is and would be a real help for modders and modpack creators.

@Thodor12

Copy link
Copy Markdown
Contributor Author

One thing i would like to keep functionality wise is the ability to register custom weapons which do not implement DEFAULT_SWORD_ACTIONS. So if we can keep the spirit of registerWeaponRecognizer i would be happy.

You still can, I check for custom tools prior to the default tool "is equipment" check. Which means a custom set tool is not privy against those conditions. (up to you to make sure that is correct/valid).

Reverting the sword registration code is unnecessary, as its still the identical code to vanillaToolLevel. Because its functionally irrelevant and readability is somewhat subjective, i will not die on that hill.

Weapons need to remain as is because they have a different leveling curve as tools, which I hinted at in your PR but didn't seem to be fixed.

What we are losing with removing the on-init registration is a clear log output which mods / items where registered unsuccessfully. This is and would be a real help for modders and modpack creators.

All valid tools are still locatable in JEI

# Conflicts:
#	src/main/java/com/minecolonies/api/equipment/ModEquipmentTypes.java
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Minecolonies 1327 update causes modpack load failure

2 participants