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.
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
Here's a pastebin version:
https://pastebin.com/yn8EmAeR
Yes. Check this page for explanation: https://mcreator.net/wiki/locking-code
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.
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:
- Keep the files locked and manually apply needed changes
- 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
https://cdn.discordapp.com/attachments/659145367270457354/7195470530715…
it does this EVERY time I try
Upon further looking, it appears every broken items is a food item