Errors with creating potion affects upon item holding

1 post / 0 new
Offline
Last seen: 2 years 1 month ago
Joined: 01/02/2015 - 01:11
Gems: 0
Errors with creating potion affects upon item holding
Hi, I keep running into an error and I can't seem to figure out why. I need a little help please, I've played with the events, but I can't seem to make this work. I want to make it to where when in hand, this item will give the user regeneration. I'm not entirely certain which events are appropriate and was hoping for some assistance. I've attached gyazos as well as the error report, thanks in advance :D
 
 
>===================================================================================================================
>Executing gradle command: build
>Microsoft Windows [Version 6.3.9600]
>(c) 2013 Microsoft Corporation. All rights reserved.
>C:\Pylo\MCreator154>cd forge
>C:\Pylo\MCreator154\forge>SET "JAVA_HOME=C:\Pylo\MCreator154\jdk\"
>C:\Pylo\MCreator154\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe
>C:\Pylo\MCreator154\forge>SET PATH=%JAVA_HOME%\bin\;%PATH%
>C:\Pylo\MCreator154\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\MCreator154\forge\build\sources\java\mod\mcreator\mcreator_gekisen.java:149: error: cannot find symbol
>if(entity.inventory.getCurrentItem()!=null&&entity.inventory.getCurrentItem().getItem() == mcreator_gekisen.block){
>         ^
>  symbol:   variable inventory
>  location: variable entity of type Entity
>C:\Pylo\MCreator154\forge\build\sources\java\mod\mcreator\mcreator_gekisen.java:149: error: cannot find symbol
>if(entity.inventory.getCurrentItem()!=null&&entity.inventory.getCurrentItem().getItem() == mcreator_gekisen.block){
>                                                  ^
>  symbol:   variable inventory
>  location: variable entity of type Entity
>C:\Pylo\MCreator154\forge\build\sources\java\mod\mcreator\mcreator_gekisen.java:150: error: cannot find symbol
>entity.addPotionEffect(new PotionEffect(10, 15, 3));
>      ^
>  symbol:   method addPotionEffect(PotionEffect)
>  location: variable entity of type Entity
>3 errors
>: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 --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
>BUILD FAILED
>Total time: 17.02 secs
>C:\Pylo\MCreator154\forge>
>Task completed with return code 0 in 17949 milliseconds
 
Edited by: Calantor on 01/06/2015 - 01:46