Duplicate Elements is broken

Published by Seyden on Sat, 04/11/2020 - 18:55
Upvotes: 1
Issue description

Hello!

I have big problems with the duplicate element option which I use a lot. When I duplicate an element and change a little the new one, and then refresh the workspace (rebuild), the duplicated element goes back to where it was duplicated (the same as the element copied).

I use a lot the duplicate feature because when we create a new element, when we insert a _ in the name, it's removed automatically in the registery name. But when we duplicate an element, the _ doesn't disapear and stays in the registery name.

 

Issue comments

When I duplicate an element and change a little the new one, and then refresh the workspace (rebuild), the duplicated element goes back to where it was duplicated (the same as the element copied).

I did this:

  1. Made item
  2. Duplicated it
  3. Changed it a bit
  4. Rebuilt the workspace
  5. Changed duplicate remained

Am I missing any steps?

I use a lot the duplicate feature because when we create a new element, when we insert a _ in the name, it's removed automatically in the registery name. But when we duplicate an element, the _ doesn't disapear and stays in the registery name.

For this, I recommend you do the following:

  1. Make mod element
  2. Use registry ID edit button in workspace to set desired registry name
  3. Do references to the element (recipes, ...)

Yes I know that I can change the registery name with the option but I have to wait everytime to rebuild the mod. So my suggestion is to keep the _ in the name when we create a new element instead of removing it.

 

For the duplication yes I do that but for me it always return to the copied thing. It tested one more time and it looks like it works only when I duplicate a duplicated element. 

I created a video of a fresh new workspace : we can see that when we duplicate a duplicated element, the first duplicated element return to the state where it was the same as the first element.

Sorry for the bad quality of the video:

https://www.youtube.com/watch?v=E68_3Z_L-no&

Big thanks for the video, this helped me locate the bug. I will fix this bug in 2020.3.

Yes I know that I can change the registery name with the option but I have to wait everytime to rebuild the mod. So my suggestion is to keep the _ in the name when we create a new element instead of removing it.

I will make that MCreator 2020.3 upwards will generate snake-cased registry names from camel-cased mod element names for new mod elements.

Using _ in Java file names is against conventions.

You are welcome! I am glad I could help :) If you like what we do, consider donating to us to help us keep this project up.



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.