Block name IDs got messed up recently with export

Started by Ultimate Immersion on

Topic category: Troubleshooting, bugs, and solutions

Joined Jun 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Block name IDs got messed up recently with export
Mon, 08/30/2021 - 17:36 (edited)

Hey,

the way MCR handles IDs became a huge issue. All lowercase IDs generate no underscore between words which is ok. Typing name in capitals creates underscore in between automatically, same as if you place underscore between words yourself. It would be ok if recently (in about a week time) this change didn't hit both Forge and Fabric - I believe gradle in general by forcefully downloading updated packages without a user updating MCR at all. That also happened with sudden J11 update which resulted in Fabric plugin being unusable until recently. Users have no control about these downloads, they just get pushed next time gradle compile is executed or MCR is launched. In my case last week I exported a mod with no issues, didn't use MCR for a week and today when I launched it this happened along with a full code regeneration and compiling when I opened the workspace. So no changes were made on my side.

Now at least in my case about 40% of IDs have newly generated names with _ in between the words while before they were written as one word and loading into the map results in block disappearance since IDs are changed. Furthermore the old names remain in the exported files together with new ones even after complete gradle cache wipeout.

 

This is how blockstates are generated now:

https://pasteboard.co/Kijh5Ag.png

 

Same thing happens in models/block and models/item while models/custom remain unchanged.

 

This is my ID name for barstool02 (also name that was exported since two years when I created it) and in workspace it's written Barstool02 same as alt when I hover over it while in above screenshot it newly exports as barstool_02. MCR/exported mod ignores old names and only loads new ones but they're still present in the export.

 

https://pasteboard.co/KijjTzc.png

 

In most of my false cases I can't really tell which name is which and how to fix this, unless I duplicate one by one and change the name as MCR now generates them.

 

Any idea why this is happening suddenly?

Edited by Ultimate Immersion on Mon, 08/30/2021 - 17:36
Underscore names are…
Wed, 09/01/2021 - 08:13

Underscore names are standard so we changed this system. It is indicated in the release notes too.

More was covered here: https://github.com/MCreator/MCreator/issues/1667

This is a breaking change in 2021.2 that we did not forsee the impact of. Unfortunately, this will stay so. We will add a release note for this.

To fix breaking worlds of existing worlds, you can do this, however:

For example aede_planks_block had registry name aedeplanksblock in 2021.1. So you can use "ID" button to manually set registry names of these blocks to match the names from the 2021.1.