When I try to use some events it doesn't work!!!!!

3 posts / 0 new
Last post
Lenare's picture
Offline
Last seen: 1 year 6 days ago
Joined: 07/08/2015 - 04:01
Gems: 0
When I try to use some events it doesn't work!!!!!

For instance, I tried to use the event trigger when I eat some food I want it to give the player an item. But when I compile it it gives an error: 

Spoiler: Highlight to view
===================================================================================================================================
Executing gradle command: clean build
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Pylo\MCreator157>cd forge
C:\Pylo\MCreator157\forge>SET "JAVA_HOME=C:\Pylo\MCreator157\jdk\"
C:\Pylo\MCreator157\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe
C:\Pylo\MCreator157\forge>SET PATH=%JAVA_HOME%\bin\;%PATH%
C:\Pylo\MCreator157\forge>gradlew clean build
****************************
 Powered By MCP:             
 http://mcp.ocean-labs.de/   
 Searge, ProfMobius, Fesh0r, 
 R4wk, ZeuX, IngisKahn, bspkrs
 MCP Data version : snapshot_20141130
****************************
:clean
:downloadClient SKIPPED
:downloadServer SKIPPED
:getVersionJson
:extractUserDev UP-TO-DATE
:mergeJars SKIPPED
:applyBinPatches SKIPPED
:downloadMcpTools SKIPPED
:extractMcpData UP-TO-DATE
:genSrgs SKIPPED
:deobfBinJar SKIPPED
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator157\forge\build\sources\java\mod\mcreator\mcreator_bucketChocolateIceCream.java:127: error: cannot find symbol
int j = (int)(entity.prevPosY + (entity.posY - entity.prevPosY) * (double)var4 + 1.62D - (double)entity.yOffset);
                                                                                                       ^
  symbol:   variable yOffset
  location: variable entity of type EntityPlayer
1 error
:compileJava FAILED
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 --stTotal time: 44.694 secs
acktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
C:\Pylo\MCreator157\forge>
Task completed with return code 0 in 46524 milliseconds

Is the yOffset variable not defined on the player? What even is the yOffset variable?



Lenare's picture
Offline
Last seen: 1 year 6 days ago
Joined: 07/08/2015 - 04:01
Gems: 0
I fixed this by viewing the

I fixed this by viewing the source and replacing entity.yOffset with entity.getYOffset() YAY!

Offline
Last seen: 4 months 3 weeks ago
Joined: 10/11/2015 - 23:58
Gems: 0
thanks xd  

thanks xd