Started by
Tazgirl
on
Topic category: Troubleshooting, bugs, and solutions
I've had a couple projects have issues when switching them to the Neoforge generator as it always produces an error when registering variables and accessing them. Tried a couple fixes but nothing prevents the error besides deleting all variables and scripts referencing variables:
Accessing variables error:
symbol: variable PLAYER_VARIABLES
location: class SimplelifecrystalModVariables
C:\Users\Migra\MCreatorWorkspaces\simplelifecrystal\src\main\java\net\mcreator\simplelifecrystal\procedures\LifeCrystalItemPlayerFinishesUsingItemProcedure.java:23: error: cannot find symbol _vars.NumberOfLifeCrystalsUsed = entity.getData(SimplelifecrystalModVariables.PLAYER_VARIABLES).NumberOfLifeCrystalsUsed + 1;
^
symbol: variable PLAYER_VARIABLES
location: class SimplelifecrystalModVariables
C:\Users\Migra\MCreatorWorkspaces\simplelifecrystal\src\main\java\net\mcreator\simplelifecrystal\procedures\PlayerUpdateHealthProcedure.java:33: error: cannot find symbol .setBaseValue((20 + (double) LifeCrystalConfigConfiguration.AMOUNT.get() * entity.getData(SimplelifecrystalModVariables.PLAYER_VARIABLES).NumberOfLifeCrystalsUsed));
^
symbol: variable PLAYER_VARIABLES
location: class SimplelifecrystalModVariables
C:\Users\Migra\MCreatorWorkspaces\simplelifecrystal\src\main\java\net\mcreator\simplelifecrystal\SimplelifecrystalMod.java:47: error: cannot find symbol SimplelifecrystalModVariables.ATTACHMENT_TYPES.register(modEventBus);
^
symbol: variable ATTACHMENT_TYPES
location: class SimplelifecrystalModVariables
Registering variables error:
symbol: class Capability
location: class SimplelifecrystalModVariables
C:\Users\Migra\MCreatorWorkspaces\simplelifecrystal\src\main\java\net\mcreator\simplelifecrystal\network\SimplelifecrystalModVariables.java:87: error: cannot find symbol private static class PlayerVariablesProvider implements ICapabilitySerializable<Tag> {
^
symbol: class ICapabilitySerializable
location: class SimplelifecrystalModVariables
C:\Users\Migra\MCreatorWorkspaces\simplelifecrystal\src\main\java\net\mcreator\simplelifecrystal\network\SimplelifecrystalModVariables.java:89: error: cannot find symbol public static void onAttachCapabilities(AttachCapabilitiesEvent<Entity> event) {
^
symbol: class AttachCapabilitiesEvent
location: class PlayerVariablesProvider
C:\Users\Migra\MCreatorWorkspaces\simplelifecrystal\src\main\java\net\mcreator\simplelifecrystal\network\SimplelifecrystalModVariables.java:95: error: cannot find symbol private final LazyOptional<PlayerVariables> instance = LazyOptional.of(() -> playerVariables);
^
symbol: class LazyOptional
location: class PlayerVariablesProvider
C:\Users\Migra\MCreatorWorkspaces\simplelifecrystal\src\main\java\net\mcreator\simplelifecrystal\network\SimplelifecrystalModVariables.java:98: error: cannot find symbol public <T> LazyOptional<T> getCapability(Capability<T> cap, Direction side) {
^
If you are not using any plugins, I recommend opening a bug report at https://github.com/MCreator/MCreator/issues as soon as possible
I would also recommend trying to regenerate workspace files
I will try and recreate it in a no plugin workspace then open one
Nevermind, it is apparently a plugin error at some point though I cant figure out where or which
Only plugin that messes with global variables is kleiders custom renderer I believe
File manager adds variables too afaik