Status
Works as designed
Issue description
I was making my new mod when the recompilation failed with this error:
C:\Pylo\Old\MCreator178internetfix\forge\build\sources\main\java\mod\mcreator\mcreator_lavawand.java:112: error: cannot find symbol
if ((inventoryName.getStackInSlot(slotID) != null) && inventoryName.getStackInSlot(slotID).getItem() == mcreator_mana.block) {
^
symbol: variable slotID
location: class Itemlavawand
C:\Pylo\Old\MCreator178internetfix\forge\build\sources\main\java\mod\mcreator\mcreator_lavawand.java:112: error: cannot find symbol
if ((inventoryName.getStackInSlot(slotID) != null) && inventoryName.getStackInSlot(slotID).getItem() == mcreator_mana.block) {
^
symbol: variable inventoryName
location: class Itemlavawand
C:\Pylo\Old\MCreator178internetfix\forge\build\sources\main\java\mod\mcreator\mcreator_lavawand.java:112: error: cannot find symbol
if ((inventoryName.getStackInSlot(slotID) != null) && inventoryName.getStackInSlot(slotID).getItem() == mcreator_mana.block) {
^
symbol: variable slotID
location: class Itemlavawand
C:\Pylo\Old\MCreator178internetfix\forge\build\sources\main\java\mod\mcreator\mcreator_lavawand.java:112: error: cannot find symbol
if ((inventoryName.getStackInSlot(slotID) != null) && inventoryName.getStackInSlot(slotID).getItem() == mcreator_mana.block) {
^
symbol: variable inventoryName
location: class Itemlavawand
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Pylo\Old\MCreator178internetfix\forge\build\sources\main\java\mod\mcreator\mcreator_steelGun.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
I only made an item (lavic wand) that when rightclicked on a block, it checks if there is air on it, if you have another item (mana), if true, it makes lava on that block and removes 1 mana from the inventory.
Can you help me?
You created an event with a condition if the slot contains, but instead of specifying the slot ID as a number, you left it at slotID. Remove this event and create it again with proper slot ID.
We will make it hard to make such mistakes with a future improved event editor. You can find first screenshots of it on Pylo's Twitter or Facebook page.