[Improvement] Resolve conflict between gem based armor and gem, while removing "armor" from the namespace

Started by purejosh on

Topic category: Feature requests and ideas for MCreator

Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
[Improvement] Resolve conflict between gem based armor and gem, while removing "armor" from the namespace
Fri, 02/09/2024 - 23:17 (edited)

Issue:

Cannot have armor named material_helmet and also use material for the base item, if you name the armor in a way that prevents it from saying material_armor_helmet in the java code.

Explanation:

I have a gem based armor. If I name that armor object "BlackDiamondArmor", it shows up in java code as black_diamond_armor_helmet. If my brain is used to typing namespace:material_helmet in Vanilla Minecraft, why would I willingly change my brain to sometimes type namespace:material_armor_helmet? It's a hard habit to break.

Now, you can create an armor item by the name "BlackDiamond" manually, which has the namespace:black_diamond_helmet as desired, but you now can no longer call your gem "BlackDiamond", due to MCreator conflicting the object names. For example, if you have a gem, let's say black_diamond, you cannot have the gem/base item AND the armor item in MCreator. This is because the gem would be called "BlackDiamond" / black_diamond, and the armor would be called "BlackDiamond" / black_diamond_helmet. From a Java standpoint, there's no issue, but MCreator refuses to allow it.

If the four items are broken into their own separate items, I can have "BlackDiamond" / black_diamond, "BlackDiamondHelmet" / black_diamond_helmet, which plays to the Vanilla standard much closer than using "armor" or "gem" in your objects, to prevent conflicts. 

If you're unable to work around the duplicate object name in MCreator, could you add an override to allow us to use the same object name for multiple items in MCreator, so long as their java names don't conflict? I'm not sure how that would be done, but I know that the conflict here appears to be only limited to the name in MCreator, not any java level conflicts.

Edited by purejosh on Fri, 02/09/2024 - 23:17
Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Since it appears to have…
Fri, 02/09/2024 - 22:17

Since it appears to have confused some people in Discord, I'll restate: 

I'm not saying the best fix is to split into four pieces. I'm just offering it as an idea, with backing arguments. The core issue in this post is the conflict between objects in MCreator and the output of the Java code. 

So long as the core issue, the object name of the gem based armor in MCreator conflicting with the object name of the gem itself, is fixed without adding "armor" to the code, that would satisfy my concerns. The vanilla standard uses diamond and diamond_helmet, and we should be able to emulate that. 

Joined Aug 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Edited, because the problem…
Fri, 02/09/2024 - 23:18

Edited, because the problem statement wasn't obvious enough. I'm offering no solutions, just a problem.