Inventory read not working

Status
Works as designed
Issue description

I want an item that can read from the inventory that doesn't do this

Executing gradle command: build Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\Pylo\MCreator173>cd forge C:\Pylo\MCreator173\forge>SET "JAVA_HOME=C:\Pylo\MCreator173\jdk64\" C:\Pylo\MCreator173\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe C:\Pylo\MCreator173\forge>SET PATH=%JAVA_HOME%\bin\;%PATH% C:\Pylo\MCreator173\forge>gradlew -Dorg.gradle.jvmargs="-Xms625m -Xmx2048m" build To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.0/userguide/gradle_daemon.html. ****************************  Powered By MCP:               http://modcoderpack.com/      Searge, ProfMobius, Fesh0r,   R4wk, ZeuX, IngisKahn, bspkrs  MCP Data version : unknown **************************** :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\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:100: error: cannot find symbol if(entity.inventory.hasItem(new ItemStack(Items.bucket).getItem())){          ^   symbol:   variable inventory   location: variable entity of type Entity C:\Pylo\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:116: error: cannot find symbol if(entity.inventory.hasItem(new ItemStack(Items.glass_bottle).getItem())){          ^   symbol:   variable inventory   location: variable entity of type Entity 2 errors :compileJava FAILED FAILURE: Build failed with an exception. BUILD FAILED * What went wrong: Total time: 25.779 secs 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. C:\Pylo\MCreator173\forge> Task completed with return code 0 in 26620 milliseconds     Executing gradle command: build Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\Pylo\MCreator173>cd forge C:\Pylo\MCreator173\forge>SET "JAVA_HOME=C:\Pylo\MCreator173\jdk64\" C:\Pylo\MCreator173\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe C:\Pylo\MCreator173\forge>SET PATH=%JAVA_HOME%\bin\;%PATH% C:\Pylo\MCreator173\forge>gradlew -Dorg.gradle.jvmargs="-Xms625m -Xmx2048m" build To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.0/userguide/gradle_daemon.html. ****************************  Powered By MCP:               http://modcoderpack.com/      Searge, ProfMobius, Fesh0r,   R4wk, ZeuX, IngisKahn, bspkrs  MCP Data version : unknown **************************** :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 UP-TO-DATE C:\Pylo\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:100: error: cannot find symbol if(entity.inventory.hasItem(new ItemStack(Items.bucket).getItem())){          ^   symbol:   variable inventory   location: variable entity of type Entity C:\Pylo\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:116: error: cannot find symbol if(entity.inventory.hasItem(new ItemStack(Items.glass_bottle).getItem())){          ^   symbol:   variable inventory   location: variable entity of type Entity 2 errors :compileJava FAILED BUILD FAILED FAILURE: Build failed with a* What went wrong: n exception. Execution failed for task ':compileJava'. Total time: 24.414 secs > 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. C:\Pylo\MCreator173\forge> Task completed with return code 0 in 25265 milliseconds     Executing gradle command: build Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\Pylo\MCreator173>cd forge C:\Pylo\MCreator173\forge>SET "JAVA_HOME=C:\Pylo\MCreator173\jdk64\" C:\Pylo\MCreator173\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe C:\Pylo\MCreator173\forge>SET PATH=%JAVA_HOME%\bin\;%PATH% C:\Pylo\MCreator173\forge>gradlew -Dorg.gradle.jvmargs="-Xms625m -Xmx2048m" build To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.0/userguide/gradle_daemon.html. ****************************  Powered By MCP:               http://modcoderpack.com/      Searge, ProfMobius, Fesh0r,   R4wk, ZeuX, IngisKahn, bspkrs  MCP Data version : unknown **************************** :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\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:97: error: cannot find symbol if(entity.inventory.hasItem(new ItemStack(Items.glass_bottle).getItem())){          ^   symbol:   variable inventory   location: variable entity of type Entity :compileJava FAILED 1 error FAILURE: Build failed with an exception. BUILD FAILED * WhatExecution failed for task ':compileJava'.  went wrong: > Compilation failed; see the compiler error output for details. Total time: 26.095 secs * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. C:\Pylo\MCreator173\forge> Task completed with return code 0 in 27075 milliseconds     Executing gradle command: build Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\Pylo\MCreator173>cd forge C:\Pylo\MCreator173\forge>SET "JAVA_HOME=C:\Pylo\MCreator173\jdk64\" C:\Pylo\MCreator173\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe C:\Pylo\MCreator173\forge>SET PATH=%JAVA_HOME%\bin\;%PATH% C:\Pylo\MCreator173\forge>gradlew -Dorg.gradle.jvmargs="-Xms625m -Xmx2048m" build To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.0/userguide/gradle_daemon.html. ****************************  Powered By MCP:               http://modcoderpack.com/      Searge, ProfMobius, Fesh0r,   R4wk, ZeuX, IngisKahn, bspkrs  MCP Data version : unknown **************************** :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 UP-TO-DATE C:\Pylo\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:97: error: cannot find symbol if(entity.inventory.hasItem(new ItemStack(Items.glass_bottle).getItem())){          ^   symbol:   variable inventory   location: variable entity of type Entity :compileJava FAILED 1 error FAILURE: Build failed with an exception. * What went wrong: BUILD FAILED Execution failed for task ':compileJava'. > Compilation failed; see the compiler error output for details. Total tRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. ime: 23.74 secs * Try: C:\Pylo\MCreator173\forge> Task completed with return code 0 in 24623 milliseconds     Executing gradle command: build Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\Pylo\MCreator173>cd forge C:\Pylo\MCreator173\forge>SET "JAVA_HOME=C:\Pylo\MCreator173\jdk64\" C:\Pylo\MCreator173\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe C:\Pylo\MCreator173\forge>SET PATH=%JAVA_HOME%\bin\;%PATH% C:\Pylo\MCreator173\forge>gradlew -Dorg.gradle.jvmargs="-Xms625m -Xmx2048m" build To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.0/userguide/gradle_daemon.html. ****************************  Powered By MCP:               http://modcoderpack.com/      Searge, ProfMobius, Fesh0r,   R4wk, ZeuX, IngisKahn, bspkrs  MCP Data version : unknown **************************** :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\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:98: error: cannot find symbol if(entity.inventory.hasItem(new ItemStack(Items.glass_bottle).getItem())){          ^   symbol:   variable inventory   location: variable entity of type Entity 1 error FAILURE: Build failed with an exception. :compileJava FAILED * What went wrong: BUILD FAILED Execution failed for task ':compileJava'. > Compilation failed; see the compiler error output for details. Total time: 26.285 secs * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. C:\Pylo\MCreator173\forge> Task completed with return code 0 in 27124 milliseconds     Executing gradle command: build Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\Pylo\MCreator173>cd forge C:\Pylo\MCreator173\forge>SET "JAVA_HOME=C:\Pylo\MCreator173\jdk64\" C:\Pylo\MCreator173\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe C:\Pylo\MCreator173\forge>SET PATH=%JAVA_HOME%\bin\;%PATH% C:\Pylo\MCreator173\forge>gradlew -Dorg.gradle.jvmargs="-Xms625m -Xmx2048m" build To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.0/userguide/gradle_daemon.html. ****************************  Powered By MCP:               http://modcoderpack.com/      Searge, ProfMobius, Fesh0r,   R4wk, ZeuX, IngisKahn, bspkrs  MCP Data version : unknown **************************** :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\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:90: error: cannot find symbol if(entity.inventory.getCurrentItem()!=null&&entity.inventory.getCurrentItem().getItem() == Items.bucket){          ^   symbol:   variable inventory   location: variable entity of type Entity C:\Pylo\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:90: error: cannot find symbol if(entity.inventory.getCurrentItem()!=null&&entity.inventory.getCurrentItem().getItem() == Items.bucket){                                                   ^   symbol:   variable inventory   location: variable entity of type Entity C:\Pylo\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:106: error: cannot find symbol if(entity.inventory.getCurrentItem()!=null&&entity.inventory.getCurrentItem().getItem() == Items.glass_bottle){          ^ :compileJava FAILED BUILD FAILED   symbol:   variable inventory Total time: 25.234 secs   location: variable entity of type Entity C:\Pylo\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:106: error: cannot find symbol if(entity.inventory.getCurrentItem()!=null&&entity.inventory.getCurrentItem().getItem() == Items.glass_bottle){                                                   ^   symbol:   variable inventory   location: variable entity of type Entity 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. C:\Pylo\MCreator173\forge> Task completed with return code 0 in 26751 milliseconds     Executing gradle command: build Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved. C:\Pylo\MCreator173>cd forge C:\Pylo\MCreator173\forge>SET "JAVA_HOME=C:\Pylo\MCreator173\jdk64\" C:\Pylo\MCreator173\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe C:\Pylo\MCreator173\forge>SET PATH=%JAVA_HOME%\bin\;%PATH% C:\Pylo\MCreator173\forge>gradlew -Dorg.gradle.jvmargs="-Xms625m -Xmx2048m" build To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: http://gradle.org/docs/2.0/userguide/gradle_daemon.html. ****************************  Powered By MCP:               http://modcoderpack.com/      Searge, ProfMobius, Fesh0r,   R4wk, ZeuX, IngisKahn, bspkrs  MCP Data version : unknown **************************** :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\MCreator173\forge\build\sources\java\mod\mcreator\mcreator_utilityItem.java:86: error: cannot find symbol          if (entity.isUsingItem()) {                    ^ :compileJava FAILED   symbol:   method isUsingItem()   location: variable entity of type Entity 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. BUILD FRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. AILED * Try: Total time: 24.357 secs C:\Pylo\MCreator173\forge> Task completed with return code 0 in 25233 milliseconds

 

Issue comments

Not all events provide entity dependency. In 1.7.3 there is no checking for this and you can get such errors. Use one of the event triggers that have the entity as one of the dependencies.