Add event

5 posts / 0 new
Last post
Offline
Last seen: 1 year 2 months ago
Joined: 03/15/2015 - 18:02
Gems: 0
Add event

Hello

I have a problem.

I made a multiool in MCreator with animated texture and with a right click event that opens a crafting GUI.

But everytime I finish the element it gives me an error in the console.

 

>Executing gradle command: build
>Microsoft Windows [Version 6.1.7601]
>Copyright (c) 2009 Microsoft Corporation. Alle Rechte vorbehalten.
>C:\Pylo\MCreator155>cd forge
>C:\Pylo\MCreator155\forge>SET "JAVA_HOME=C:\Pylo\MCreator155\jdk\"
>C:\Pylo\MCreator155\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe
>C:\Pylo\MCreator155\forge>SET PATH=%JAVA_HOME%\bin\;%PATH%
>C:\Pylo\MCreator155\forge>gradlew build
>****************************
> Powered By MCP:             
> Searge, ProfMobius, Fesh0r, 
> R4wk, ZeuX, IngisKahn, bspkrs
> MCP Data version : unknown
>****************************
>:compileApiJava UP-TO-DATE
>:processApiResources UP-TO-DATE
>:apiClasses UP-TO-DATE
>:sourceMainJava
>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_tool.java:128: error: cannot find symbol
>ModLoader.openGUI(entity, new GuiCrafting(entity.inventory, world, i, j, k)) ;
>^
>  symbol: variable ModLoader
>:compileJava FAILED
>1 error
>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.
>BUILD FAILED


Offline
Last seen: 1 year 8 months ago
Joined: 05/16/2014 - 13:42
Gems: 0
Simple the code you are using

Simple the code you are using is for Modloader not for Forge.
But I can't say you the code for forge sorry :/

Offline
Last seen: 1 year 2 months ago
Joined: 03/15/2015 - 18:02
Gems: 0
RE:Simple the code you are using

@JTK222 Thanks for the answer.
Im wondering why all other things like Items, Tools and blocks work but the only item with an Event doesnt.
Sorry if the spelling isnt correct i am from switzerland

Offline
Last seen: 1 year 2 months ago
Joined: 03/15/2015 - 18:02
Gems: 0
RE:RE:Simple the code you are using

@Sir_Arag0n
I found out that only the Event open crafting GUI doesnt work.
all other Event seem to work

Offline
Last seen: 1 year 8 months ago
Joined: 05/16/2014 - 13:42
Gems: 0
player.openWorkbenchGUI()

player.openWorkbenchGUI()
This should be the correct code for Forge
Try to replace your Modloader.openGui()

but I am not sure whats the name of the Player variable in the Item Rightclick event in MCreator