Add event

Started by Sir_Arag0n on Mon, 03/16/2015 - 14:35
Last seen on 22:15, 13. Jun 2017
Joined Mar 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Add event
Mon, 03/16/2015 - 14:35

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:              > http://mcp.ocean-labs.de/    > 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
Last seen on 18:57, 28. Aug 2015
Joined May 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Simple the code you are using
Mon, 03/16/2015 - 14:40

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

Last seen on 22:15, 13. Jun 2017
Joined Mar 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:Simple the code you are using
Mon, 03/16/2015 - 20:10

@#1 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

Last seen on 22:15, 13. Jun 2017
Joined Mar 2015
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
RE:RE:Simple the code you are using
Mon, 03/16/2015 - 20:22

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

Last seen on 18:57, 28. Aug 2015
Joined May 2014
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
player.openWorkbenchGUI()
Tue, 03/17/2015 - 06:53

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