Mod Broke Upon Updating Versions

Status
Works as designed
Type
Product/platform
MCreator/Windows
Priority
Normal
Issue description

Several items from my mod just randomly stopped working when I updated versions. Any reasons this could be? (I would attach file but it's too big)

Issue comments

Most of the food elements in my mod became errors, despite me not changing any code in them at all between versions. It's the randomest of the items, too. Raw Bacon works, but cooked bacon doesn't. Cheese becomes an error, bread slice becomes an error (and toast doesn't), etc etc etc. Half of these items don't have any special properties or anything.

Became what errors?

Provide logs of these errors and put them on pastebin and link here.

 

Here's every error involved with the cheese food item alone:
C:\Users\Flamingtorpedo\MCreatorWorkspaces\flamingtorpedosawesomemod\build\sources\main\java\net\mcreator\flamingtorpedosawesomemod\item\ItemCheese.java:28: error: no suitable method found for add(()->new It[...]tom())       elements.items.add(() -> new ItemFoodCustom());
                    ^
    method Collection.add(Supplier<Item>) is not applicable
      (argument mismatch; bad return type in lambda expression
          ItemFoodCustom cannot be converted to Item)
    method List.add(Supplier<Item>) is not applicable
      (argument mismatch; bad return type in lambda expression
          ItemFoodCustom cannot be converted to Item)
C:\Users\Flamingtorpedo\MCreatorWorkspaces\flamingtorpedosawesomemod\build\sources\main\java\net\mcreator\flamingtorpedosawesomemod\item\ItemCheese.java:38: error: constructor ItemFood in class ItemFood cannot be applied to given types;          super(4, 0.300000011920929f, false);
         ^
  required: ElementsFlamingtorpedosAwesomeMod
  found: int,float,boolean
  reason: actual and formal argument lists differ in length
C:\Users\Flamingtorpedo\MCreatorWorkspaces\flamingtorpedosawesomemod\build\sources\main\java\net\mcreator\flamingtorpedosawesomemod\item\ItemCheese.java:39: error: cannot find symbol          setUnlocalizedName("cheese");
         ^
  symbol:   method setUnlocalizedName(String)
  location: class ItemFoodCustom
C:\Users\Flamingtorpedo\MCreatorWorkspaces\flamingtorpedosawesomemod\build\sources\main\java\net\mcreator\flamingtorpedosawesomemod\item\ItemCheese.java:40: error: cannot find symbol          setRegistryName("cheese");
         ^
  symbol:   method setRegistryName(String)
  location: class ItemFoodCustom
C:\Users\Flamingtorpedo\MCreatorWorkspaces\flamingtorpedosawesomemod\build\sources\main\java\net\mcreator\flamingtorpedosawesomemod\item\ItemCheese.java:41: error: cannot find symbol          setCreativeTab(TabNomNoms.tab);
         ^
  symbol:   method setCreativeTab(CreativeTabs)
  location: class ItemFoodCustom
C:\Users\Flamingtorpedo\MCreatorWorkspaces\flamingtorpedosawesomemod\build\sources\main\java\net\mcreator\flamingtorpedosawesomemod\item\ItemCheese.java:42: error: cannot find symbol          setMaxStackSize(64);
         ^
  symbol:   method setMaxStackSize(int)
  location: class ItemFoodCustom
C:\Users\Flamingtorpedo\MCreatorWorkspaces\flamingtorpedosawesomemod\build\sources\main\java\net\mcreator\flamingtorpedosawesomemod\item\ItemCheese.java:45: error: method does not override or implement a method from a supertype       @Override
      ^
C:\Users\Flamingtorpedo\MCreatorWorkspaces\flamingtorpedosawesomemod\build\sources\main\java\net\mcreator\flamingtorpedosawesomemod\item\ItemCheesePizza.java:28: error: no suitable method found for add(()->new It[...]tom())       elements.items.add(() -> new ItemFoodCustom());
                    ^
    method Collection.add(Supplier<Item>) is not applicable
      (argument mismatch; bad return type in lambda expression
          ItemFoodCustom cannot be converted to Item)
    method List.add(Supplier<Item>) is not applicable
      (argument mismatch; bad return type in lambda expression
          ItemFoodCustom cannot be converted to Item)
C:\Users\Flamingtorpedo\MCreatorWorkspaces\flamingtorpedosawesomemod\build\sources\main\java\net\mcreator\flamingtorpedosawesomemod\item\ItemCheesePizza.java:38: error: constructor ItemFood in class ItemFood cannot be applied to given types;          super(6, 0.300000011920929f, false);
         ^
  required: ElementsFlamingtorpedosAwesomeMod
  found: int,float,boolean
  reason: actual and formal argument lists differ in length

Did you even read the page I linked?

If this page did not explain to you things, you should not be using the code locking system in the first place.

Use code lock feature only if you know at least some Java and Forge basics. Without this knowledge, changing code will likely result in build errors you will not be able to understand without this knowledge.

How else am I supposed to have giant items in my mod? If I don't lock the code it just makes it small again. And the items that don't work aren't locked items.

items that don't work aren't locked items.

Because they reference them in code. As I said:

Use code lock feature only if you know at least some Java and Forge basics. Without this knowledge, changing code will likely result in build errors you will not be able to understand without this knowledge.

How else am I supposed to have giant items in my mod?

I see you still did not read the page:

  1. Keep the files locked and manually apply needed changes
  2. Unlock the files so MCreator can update them for you, but this will overwrite all your changes in these files, so you need to lock them back after updating and re-apply the changes

I did unlock the files, but it still won't work. I tried deleting my gradle folder to see if that would work, but no matter what I tried, the folder wouldn't delete.

you could for example add a option to only lock resource files (json files)

This is planned :)

No, not yet, but i'm fairly sure the next version is planning to do just that

What do you mean?

I did. I unlocked every last thing.

Open a forum topic, include a compile log linked to Pastebin. The issue tracker is not for outdated versions.



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.