Jump to content

Gess1t

Members
  • Posts

    65
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Gess1t's Achievements

Stone Miner

Stone Miner (3/8)

0

Reputation

  1. not as much java as i would need apparently for minecraft modding, know some C# for unity, and basics in python for school
  2. updated the github https://github.com/Mrcubix/Full-Inventory-Checker, with my actual code: package Gess.mod; import Gess.mod.proxy.iProxy; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.Container; import net.minecraft.inventory.ContainerPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.NonNullList; import net.minecraft.util.text.TextComponentString; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import util.Reference; @EventBusSubscriber @Mod(modid=Reference.MODID, name=Reference.MODNAME, version=Reference.VERSION) public class Main { public static Configuration config; //public static int time = 10; public static Main instance; //float lastMessageTime = 0; public boolean inventoryIsFull; public static final String CLIENT = "gess.mod.proxy.ClientProxy"; public static final String SERVER = "gess.mod.proxy.CommonProxy"; @SidedProxy(clientSide = Reference.CLIENT, serverSide = Reference.COMMON) public static iProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent e){ //File directory = event.getModConfigurationDirectory(); //config = new Configuration(new File(directory.getPath(), "FullInventoryChecker.cfg")); //Config.readConfig(); } @EventHandler public void init(FMLInitializationEvent e){} @EventHandler public void postInit(FMLPostInitializationEvent e){ // if (config.hasChanged()) // config.save(); //} } public void log() { System.out.println("Does PckUpItm actually output anything?"); } private EntityPlayer playerEntity; final EntityPlayer player = (EntityPlayer)Minecraft.getMinecraft().player; private boolean enabled = true; private NonNullList<ItemStack> previous; @SubscribeEvent public void PckUpItm(final TickEvent.ClientTickEvent event) { if(Minecraft.getMinecraft().player != null) { this.playerEntity = player; if (enabled == true) { NonNullList<ItemStack> previous = NonNullList.withSize(player.inventory.getSizeInventory(), ItemStack.EMPTY); enabled = false; } Main pui = new Main(); pui.log(); EntityPlayer player = Minecraft.getMinecraft().player; int g = 0; System.out.println("starting to count e"); for(int e=0; e < 36; e++) { System.out.println("checking slot " + e); ItemStack stack = player.inventory.getStackInSlot(e); if(ItemStack.areItemStacksEqual(previous.get(e), stack)) { previous.set(e,stack); if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); if(g > 34) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); return; } } } } } } @SubscribeEvent public static void chkInv(TickEvent.ClientTickEvent event) throws InterruptedException { if(Minecraft.getMinecraft().player != null) { int s = 0; for(int i=0; i < 37; i++) { if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(i).isEmpty() && Minecraft.getMinecraft() .player.inventory.getStackInSlot(i).getCount() == Minecraft.getMinecraft().player.inventory.getStackInSlot(i).getMaxStackSize()) { s++; if(s > 35) { if(Minecraft.getMinecraft().world.getTotalWorldTime() % 200 == 3L && event.phase == TickEvent.Phase.END) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); System.out.println("chkInv: Triggerred with s = " + s); return; } } } } return; } } } it still doesn't work, even when using NonNullList<ItemStack> previous = NonNullList.withSize(player.inventory.getSizeInventory(), ItemStack.EMPTY); so idk at this point same log as below: [21:01:37] [main/INFO] [GradleStart]: Extra: [] [21:01:37] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/[user]/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [21:01:38] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [21:01:38] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [21:01:38] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [21:01:38] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [21:01:38] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2768 for Minecraft 1.12.2 loading [21:01:38] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_212, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_212 [21:01:38] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected. Using default libraries directory. [21:01:38] [main/ERROR] [FML]: Full: C:\Users\[user]\.gradle\caches\modules-2\files-2.1\org.apache.maven\maven-artifact\3.5.3\7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4\maven-artifact-3.5.3.jar [21:01:38] [main/ERROR] [FML]: Trimmed: c:/users/[user]/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.3/ [21:01:38] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [21:01:38] [main/INFO] [FML]: Detected deobfuscated environment, loading log configs for colored console logs. 2019-10-20 21:01:40,811 main WARN Disabling terminal, you're running in an unsupported environment. [21:01:40] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin [21:01:40] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin [21:01:41] [main/INFO] [FML]: Searching D:\Modding\Minecraft\FullinventorycheckerRenewal\run\.\mods for mods [21:01:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [21:01:41] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [21:01:41] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [21:01:41] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [21:01:41] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [21:01:41] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [21:01:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [21:01:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [21:01:41] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [21:01:44] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [21:01:44] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [21:01:44] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [21:01:45] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [21:01:45] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [21:01:45] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [21:01:45] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [21:01:47] [main/INFO] [minecraft/Minecraft]: Setting user: Player431 [21:01:56] [main/WARN] [minecraft/GameSettings]: Skipping bad option: lastServer: [21:01:56] [main/INFO] [minecraft/Minecraft]: LWJGL Version: 2.9.4 [21:01:57] [main/INFO] [FML]: -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_212, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 852327856 bytes (812 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 431.60' Renderer: 'GeForce GT 1030/PCIe/SSE2' [21:01:57] [main/INFO] [FML]: MinecraftForge v14.23.5.2768 Initialized [21:01:57] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients. [21:01:58] [main/INFO] [FML]: Replaced 1036 ore ingredients [21:01:59] [main/INFO] [FML]: Searching D:\Modding\Minecraft\FullinventorycheckerRenewal\run\.\mods for mods [21:02:03] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load [21:02:04] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, fullinvchecker] at CLIENT [21:02:04] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, fullinvchecker] at SERVER [21:02:05] [Thread-3/INFO] [FML]: Using alternative sync timing : 200 frames of Display.update took 6157975628 nanos [21:02:05] [main/INFO] [minecraft/SimpleReloadableResourceManager]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Full Inventory Checker [21:02:06] [main/INFO] [FML]: Processing ObjectHolder annotations [21:02:06] [main/INFO] [FML]: Found 1168 ObjectHolder annotations [21:02:06] [main/INFO] [FML]: Identifying ItemStackHolder annotations [21:02:06] [main/INFO] [FML]: Found 0 ItemStackHolder annotations [21:02:06] [main/INFO] [FML]: Configured a dormant chunk cache size of 0 [21:02:06] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [21:02:06] [main/INFO] [FML]: Applying holder lookups [21:02:06] [main/INFO] [FML]: Holder lookups applied [21:02:06] [main/INFO] [FML]: Applying holder lookups [21:02:06] [main/INFO] [FML]: Holder lookups applied [21:02:06] [main/INFO] [FML]: Applying holder lookups [21:02:06] [main/INFO] [FML]: Holder lookups applied [21:02:06] [main/INFO] [FML]: Applying holder lookups [21:02:06] [main/INFO] [FML]: Holder lookups applied [21:02:06] [main/INFO] [FML]: Injecting itemstacks [21:02:06] [main/INFO] [FML]: Itemstack injection complete [21:02:07] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Found status: UP_TO_DATE Target: null [21:02:14] [Sound Library Loader/INFO] [minecraft/SoundManager]: Starting up SoundSystem... [21:02:14] [Thread-5/INFO] [minecraft/SoundManager]: Initializing LWJGL OpenAL [21:02:14] [Thread-5/INFO] [minecraft/SoundManager]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [21:02:14] [Thread-5/INFO] [minecraft/SoundManager]: OpenAL initialized. [21:02:15] [Sound Library Loader/INFO] [minecraft/SoundManager]: Sound engine started [21:02:26] [main/INFO] [FML]: Max texture size: 16384 [21:02:27] [main/INFO] [minecraft/TextureMap]: Created: 512x512 textures-atlas [21:02:33] [main/INFO] [FML]: Applying holder lookups [21:02:33] [main/INFO] [FML]: Holder lookups applied [21:02:33] [main/INFO] [FML]: Injecting itemstacks [21:02:33] [main/INFO] [FML]: Itemstack injection complete [21:02:33] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods [21:02:33] [main/WARN] [minecraft/GameSettings]: Skipping bad option: lastServer: [21:02:33] [main/INFO] [mojang/NarratorWindows]: Narrator library for x64 successfully loaded [21:02:36] [Realms Notification Availability checker #1/INFO] [mojang/RealmsClient]: Could not authorize you against Realms server: Invalid session id [21:03:52] [main/INFO] [minecraft/GuiConnecting]: Connecting to localhost, 25565 [21:03:52] [Server Connector #1/ERROR] [minecraft/GuiConnecting]: Couldn't connect to server java.lang.NullPointerException: group at io.netty.bootstrap.AbstractBootstrap.group(AbstractBootstrap.java:84) ~[AbstractBootstrap.class:?] at net.minecraft.network.NetworkManager.createNetworkManagerAndConnect(NetworkManager.java:367) ~[NetworkManager.class:?] at net.minecraft.client.multiplayer.GuiConnecting$1.run(GuiConnecting.java:68) [GuiConnecting$1.class:?] [21:03:54] [main/INFO] [minecraft/GuiConnecting]: Connecting to localhost, 25565 [21:03:55] [Netty Client IO #1/INFO] [FML]: Aborting client handshake "VANILLA" [21:03:55] [Netty Client IO #1/INFO] [FML]: [Netty Client IO #1] Client side vanilla connection established [21:04:20] [Netty Client IO #1/ERROR] [FML]: NetworkDispatcher exception java.io.IOException: Une connexion existante a dû être fermée par l’hôte distant at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:1.8.0_212] at sun.nio.ch.SocketDispatcher.read(Unknown Source) ~[?:1.8.0_212] at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) ~[?:1.8.0_212] at sun.nio.ch.IOUtil.read(Unknown Source) ~[?:1.8.0_212] at sun.nio.ch.SocketChannelImpl.read(Unknown Source) ~[?:1.8.0_212] at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[PooledUnsafeDirectByteBuf.class:4.1.9.Final] at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1100) ~[AbstractByteBuf.class:4.1.9.Final] at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:372) ~[NioSocketChannel.class:4.1.9.Final] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123) [AbstractNioByteChannel$NioByteUnsafe.class:4.1.9.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:624) [NioEventLoop.class:4.1.9.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:559) [NioEventLoop.class:4.1.9.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:476) [NioEventLoop.class:4.1.9.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438) [NioEventLoop.class:4.1.9.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final] at java.lang.Thread.run(Unknown Source) [?:1.8.0_212] [21:04:21] [main/INFO] [FML]: Applying holder lookups [21:04:21] [main/INFO] [FML]: Holder lookups applied [21:04:32] [main/INFO] [minecraft/GuiConnecting]: Connecting to localhost, 25565 [21:04:32] [Netty Client IO #2/INFO] [FML]: Aborting client handshake "VANILLA" [21:04:32] [Netty Client IO #2/INFO] [FML]: [Netty Client IO #2] Client side vanilla connection established [21:04:45] [main/INFO] [minecraft/Minecraft]: Stopping! [21:04:52] [main/INFO] [minecraft/SoundManager]: SoundSystem shutting down... [21:04:52] [main/WARN] [minecraft/SoundManager]: Author: Paul Lamb, www.paulscode.com Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release edit : code edited, to use list instead of arrays, but still not work
  3. for the first part, make it an if statement with a boolean i set to false when activated so it only run once, then for the second part, i apparently have to set it outside of if statement, but where, and how? it's not return ItemStack.EMPTY; cause it error and ask to edit void for ItemStack instead, whihch isn't what i want EDIT: so apparently i have to use NonNullList<ItemStack> previous = NonNullList.withSize(player.inventory.getSizeInventory(), ItemStack.EMPTY); as someone suggested me, but just using this line won"t work
  4. in theory, i should just have to do that : this.previous = new ItemStack[player.inventory.getSizeInventory()]; but it doesn't work package Gess.mod; import Gess.mod.proxy.iProxy; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.text.TextComponentString; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import util.Reference; @EventBusSubscriber @Mod(modid=Reference.MODID, name=Reference.MODNAME, version=Reference.VERSION) public class Main { public static Configuration config; //public static int time = 10; public static Main instance; //float lastMessageTime = 0; public boolean inventoryIsFull; public static final String CLIENT = "gess.mod.proxy.ClientProxy"; public static final String SERVER = "gess.mod.proxy.CommonProxy"; @SidedProxy(clientSide = Reference.CLIENT, serverSide = Reference.COMMON) public static iProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent e){ //File directory = event.getModConfigurationDirectory(); //config = new Configuration(new File(directory.getPath(), "FullInventoryChecker.cfg")); //Config.readConfig(); } @EventHandler public void init(FMLInitializationEvent e){} @EventHandler public void postInit(FMLPostInitializationEvent e){ // if (config.hasChanged()) // config.save(); //} } public void log() { System.out.println("Does PckUpItm actually output anything?"); } private ItemStack[] previous; private ItemStack[] now; private EntityPlayer playerEntity; final EntityPlayer player = (EntityPlayer)Minecraft.getMinecraft().player; @SubscribeEvent public void PckUpItm(TickEvent.ClientTickEvent event) { if(Minecraft.getMinecraft().player != null) { this.playerEntity = player; this.previous = new ItemStack[player.inventory.getSizeInventory()]; Main pui = new Main(); pui.log(); EntityPlayer player = Minecraft.getMinecraft().player; int g = 0; System.out.println("starting to count e"); for(int e=0; e < 36; e++) { System.out.println("checking slot " + e); ItemStack stack = player.inventory.getStackInSlot(e); if(ItemStack.areItemStacksEqual(previous[e], stack)) { if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); previous[e] = stack; System.out.println("Itemstack " + e + "copied"); if(g > 34) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); return; } } } } } } @SubscribeEvent public static void chkInv(TickEvent.ClientTickEvent event) throws InterruptedException { if(Minecraft.getMinecraft().player != null) { int s = 0; for(int i=0; i < 37; i++) { if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(i).isEmpty() && Minecraft.getMinecraft() .player.inventory.getStackInSlot(i).getCount() == Minecraft.getMinecraft().player.inventory.getStackInSlot(i).getMaxStackSize()) { s++; if(s > 35) { if(Minecraft.getMinecraft().world.getTotalWorldTime() % 200 == 3L && event.phase == TickEvent.Phase.END) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); System.out.println("chkInv: Triggerred with s = " + s); return; } } } } return; } } } log timeout: [04:19:47] [main/INFO] [GradleStart]: Extra: [] [04:19:47] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/[user]/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [04:19:47] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [04:19:47] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [04:19:47] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [04:19:47] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [04:19:47] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2768 for Minecraft 1.12.2 loading [04:19:47] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_212, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_212 [04:19:47] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected. Using default libraries directory. [04:19:47] [main/ERROR] [FML]: Full: C:\Users\[user]\.gradle\caches\modules-2\files-2.1\org.apache.maven\maven-artifact\3.5.3\7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4\maven-artifact-3.5.3.jar [04:19:47] [main/ERROR] [FML]: Trimmed: c:/users/[user]/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.3/ [04:19:48] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [04:19:48] [main/INFO] [FML]: Detected deobfuscated environment, loading log configs for colored console logs. 2019-10-20 04:19:49,484 main WARN Disabling terminal, you're running in an unsupported environment. [04:19:49] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin [04:19:49] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin [04:19:49] [main/INFO] [FML]: Searching D:\Modding\Minecraft\FullinventorycheckerRenewal\run\.\mods for mods [04:19:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [04:19:49] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [04:19:49] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [04:19:49] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [04:19:49] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [04:19:49] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [04:19:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [04:19:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [04:19:49] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [04:19:52] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [04:19:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [04:19:52] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [04:19:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [04:19:53] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [04:19:53] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [04:19:53] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [04:19:55] [main/INFO] [minecraft/Minecraft]: Setting user: Player62 [04:20:01] [main/WARN] [minecraft/GameSettings]: Skipping bad option: lastServer: [04:20:01] [main/INFO] [minecraft/Minecraft]: LWJGL Version: 2.9.4 [04:20:02] [main/INFO] [FML]: -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_212, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 852475544 bytes (812 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 431.60' Renderer: 'GeForce GT 1030/PCIe/SSE2' [04:20:03] [main/INFO] [FML]: MinecraftForge v14.23.5.2768 Initialized [04:20:03] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients. [04:20:03] [main/INFO] [FML]: Replaced 1036 ore ingredients [04:20:04] [main/INFO] [FML]: Searching D:\Modding\Minecraft\FullinventorycheckerRenewal\run\.\mods for mods [04:20:06] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load [04:20:07] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, fullinvchecker] at CLIENT [04:20:07] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, fullinvchecker] at SERVER [04:20:08] [main/INFO] [minecraft/SimpleReloadableResourceManager]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Full Inventory Checker [04:20:08] [main/INFO] [FML]: Processing ObjectHolder annotations [04:20:08] [main/INFO] [FML]: Found 1168 ObjectHolder annotations [04:20:08] [main/INFO] [FML]: Identifying ItemStackHolder annotations [04:20:08] [main/INFO] [FML]: Found 0 ItemStackHolder annotations [04:20:08] [main/INFO] [FML]: Configured a dormant chunk cache size of 0 [04:20:08] [main/INFO] [FML]: Applying holder lookups [04:20:08] [main/INFO] [FML]: Holder lookups applied [04:20:08] [main/INFO] [FML]: Applying holder lookups [04:20:08] [main/INFO] [FML]: Holder lookups applied [04:20:08] [main/INFO] [FML]: Applying holder lookups [04:20:08] [main/INFO] [FML]: Holder lookups applied [04:20:08] [main/INFO] [FML]: Applying holder lookups [04:20:08] [main/INFO] [FML]: Holder lookups applied [04:20:08] [main/INFO] [FML]: Injecting itemstacks [04:20:08] [main/INFO] [FML]: Itemstack injection complete [04:20:08] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [04:20:09] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Found status: UP_TO_DATE Target: null [04:20:09] [Thread-3/INFO] [FML]: Using alternative sync timing : 200 frames of Display.update took 5168364803 nanos [04:20:15] [Sound Library Loader/INFO] [minecraft/SoundManager]: Starting up SoundSystem... [04:20:15] [Thread-5/INFO] [minecraft/SoundManager]: Initializing LWJGL OpenAL [04:20:15] [Thread-5/INFO] [minecraft/SoundManager]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [04:20:15] [Thread-5/INFO] [minecraft/SoundManager]: OpenAL initialized. [04:20:16] [Sound Library Loader/INFO] [minecraft/SoundManager]: Sound engine started [04:20:25] [main/INFO] [FML]: Max texture size: 16384 [04:20:26] [main/INFO] [minecraft/TextureMap]: Created: 512x512 textures-atlas [04:20:29] [main/INFO] [FML]: Applying holder lookups [04:20:29] [main/INFO] [FML]: Holder lookups applied [04:20:29] [main/INFO] [FML]: Injecting itemstacks [04:20:29] [main/INFO] [FML]: Itemstack injection complete [04:20:29] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods [04:20:29] [main/WARN] [minecraft/GameSettings]: Skipping bad option: lastServer: [04:20:30] [main/INFO] [mojang/NarratorWindows]: Narrator library for x64 successfully loaded [04:20:32] [Realms Notification Availability checker #1/INFO] [mojang/RealmsClient]: Could not authorize you against Realms server: Invalid session id [04:20:49] [main/INFO] [minecraft/GuiConnecting]: Connecting to localhost, 25565 [04:20:49] [Netty Client IO #1/INFO] [FML]: Aborting client handshake "VANILLA" [04:20:49] [Netty Client IO #1/INFO] [FML]: [Netty Client IO #1] Client side vanilla connection established [04:21:15] [Netty Client IO #1/ERROR] [FML]: NetworkDispatcher exception java.io.IOException: Une connexion existante a dû être fermée par l’hôte distant // timeout at sun.nio.ch.SocketDispatcher.write0(Native Method) ~[?:1.8.0_212] at sun.nio.ch.SocketDispatcher.write(Unknown Source) ~[?:1.8.0_212] at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source) ~[?:1.8.0_212] at sun.nio.ch.IOUtil.write(Unknown Source) ~[?:1.8.0_212] at sun.nio.ch.SocketChannelImpl.write(Unknown Source) ~[?:1.8.0_212] at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:417) ~[NioSocketChannel.class:4.1.9.Final] at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:856) ~[AbstractChannel$AbstractUnsafe.class:4.1.9.Final] at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:362) ~[AbstractNioChannel$AbstractNioUnsafe.class:4.1.9.Final] at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:823) ~[AbstractChannel$AbstractUnsafe.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1296) ~[DefaultChannelPipeline$HeadContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.ChannelDuplexHandler.flush(ChannelDuplexHandler.java:117) ~[ChannelDuplexHandler.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115) ~[ChannelOutboundHandlerAdapter.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115) ~[ChannelOutboundHandlerAdapter.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115) ~[ChannelOutboundHandlerAdapter.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.flush(NetworkDispatcher.java:558) ~[NetworkDispatcher.class:?] at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:802) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[AbstractChannelHandlerContext.class:4.1.9.Final] at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032) ~[DefaultChannelPipeline.class:4.1.9.Final] at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296) ~[AbstractChannel.class:4.1.9.Final] at net.minecraft.network.NetworkManager$4.run(NetworkManager.java:261) [NetworkManager$4.class:?] at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [AbstractEventExecutor.class:4.1.9.Final] at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) [SingleThreadEventExecutor.class:4.1.9.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442) [NioEventLoop.class:4.1.9.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final] at java.lang.Thread.run(Unknown Source) [?:1.8.0_212] [04:21:16] [main/INFO] [FML]: Applying holder lookups [04:21:16] [main/INFO] [FML]: Holder lookups applied [04:21:39] [main/INFO] [minecraft/GuiConnecting]: Connecting to localhost, 25565 [04:21:40] [Netty Client IO #2/INFO] [FML]: Aborting client handshake "VANILLA" [04:21:40] [Netty Client IO #2/INFO] [FML]: [Netty Client IO #2] Client side vanilla connection established [04:22:05] [Netty Client IO #2/ERROR] [FML]: NetworkDispatcher exception java.io.IOException: Une connexion existante a dû être fermée par l’hôte distant //timeout at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:1.8.0_212] at sun.nio.ch.SocketDispatcher.read(Unknown Source) ~[?:1.8.0_212] at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) ~[?:1.8.0_212] at sun.nio.ch.IOUtil.read(Unknown Source) ~[?:1.8.0_212] at sun.nio.ch.SocketChannelImpl.read(Unknown Source) ~[?:1.8.0_212] at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[PooledUnsafeDirectByteBuf.class:4.1.9.Final] at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1100) ~[AbstractByteBuf.class:4.1.9.Final] at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:372) ~[NioSocketChannel.class:4.1.9.Final] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123) [AbstractNioByteChannel$NioByteUnsafe.class:4.1.9.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:624) [NioEventLoop.class:4.1.9.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:559) [NioEventLoop.class:4.1.9.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:476) [NioEventLoop.class:4.1.9.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438) [NioEventLoop.class:4.1.9.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final] at java.lang.Thread.run(Unknown Source) [?:1.8.0_212] [04:22:06] [main/INFO] [FML]: Applying holder lookups [04:22:06] [main/INFO] [FML]: Holder lookups applied
  5. the thing is : gigahertz never initialized his array, and it still work, and what do you want me to initialize it with?
  6. So i tried to hardcode every slots as i obtain this mess: package Gess.mod; import Gess.mod.proxy.iProxy; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.text.TextComponentString; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import util.Reference; @EventBusSubscriber @Mod(modid=Reference.MODID, name=Reference.MODNAME, version=Reference.VERSION) public class Main { public static Configuration config; //public static int time = 10; public static Main instance; //float lastMessageTime = 0; public boolean inventoryIsFull; public static final String CLIENT = "gess.mod.proxy.ClientProxy"; public static final String SERVER = "gess.mod.proxy.CommonProxy"; @SidedProxy(clientSide = Reference.CLIENT, serverSide = Reference.COMMON) public static iProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent e){ //File directory = event.getModConfigurationDirectory(); //config = new Configuration(new File(directory.getPath(), "FullInventoryChecker.cfg")); //Config.readConfig(); } @EventHandler public void init(FMLInitializationEvent e){} @EventHandler public void postInit(FMLPostInitializationEvent e){ // if (config.hasChanged()) // config.save(); //} } public void log() { System.out.println("Does PckUpItm actually output anything?"); } private ItemStack[] previous; private ItemStack slot0; private ItemStack slot1; private ItemStack slot2; private ItemStack slot3; private ItemStack slot4; private ItemStack slot5; private ItemStack slot6; private ItemStack slot7; private ItemStack slot8; private ItemStack slot9; private ItemStack slot10; private ItemStack slot11; private ItemStack slot12; private ItemStack slot13; private ItemStack slot14; private ItemStack slot15; private ItemStack slot16; private ItemStack slot17; private ItemStack slot18; private ItemStack slot19; private ItemStack slot20; private ItemStack slot21; private ItemStack slot22; private ItemStack slot23; private ItemStack slot24; private ItemStack slot25; private ItemStack slot26; private ItemStack slot27; private ItemStack slot28; private ItemStack slot29; private ItemStack slot30; private ItemStack slot31; private ItemStack slot32; private ItemStack slot33; private ItemStack slot34; private ItemStack slot35; private ItemStack[] now; @SubscribeEvent public void PckUpItm() { if(Minecraft.getMinecraft().player != null) { Main pui = new Main(); pui.log(); EntityPlayer player = Minecraft.getMinecraft().player; int g = 0; System.out.println("starting to count e"); for(int e=0; e < 36; e++) { System.out.println("checking slot " + e); ItemStack stack = player.inventory.getStackInSlot(e); if (e == 0) { if(ItemStack.areItemStacksEqual(slot0, stack) == false) { slot0 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 1) { if(ItemStack.areItemStacksEqual(slot1, stack) == false) { slot1 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 2) { if(ItemStack.areItemStacksEqual(slot2, stack) == false) { slot2 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 3) { if(ItemStack.areItemStacksEqual(slot3, stack) == false) { slot3 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 4) { if(ItemStack.areItemStacksEqual(slot4, stack) == false) { slot4 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 5) { if(ItemStack.areItemStacksEqual(slot5, stack) == false) { slot5 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 6) { if(ItemStack.areItemStacksEqual(slot6, stack) == false) { slot6 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 7) { if(ItemStack.areItemStacksEqual(slot7, stack) == false) { slot7 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 8) { if(ItemStack.areItemStacksEqual(slot8, stack) == false) { slot8 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 9) { if(ItemStack.areItemStacksEqual(slot9, stack) == false) { slot9 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 10) { if(ItemStack.areItemStacksEqual(slot10, stack) == false) { slot10 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 11) { if(ItemStack.areItemStacksEqual(slot11, stack) == false) { slot11 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 12) { if(ItemStack.areItemStacksEqual(slot12, stack) == false) { slot12 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 13) { if(ItemStack.areItemStacksEqual(slot13, stack) == false) { slot13 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 14) { if(ItemStack.areItemStacksEqual(slot14, stack) == false) { slot14 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 15) { if(ItemStack.areItemStacksEqual(slot15, stack) == false) { slot15 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 16) { if(ItemStack.areItemStacksEqual(slot16, stack) == false) { slot16 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 17) { if(ItemStack.areItemStacksEqual(slot17, stack) == false) { slot17 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 18) { if(ItemStack.areItemStacksEqual(slot18, stack) == false) { slot18 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 19) { if(ItemStack.areItemStacksEqual(slot19, stack) == false) { slot19 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 20) { if(ItemStack.areItemStacksEqual(slot20, stack) == false) { slot20 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 21) { if(ItemStack.areItemStacksEqual(slot21, stack) == false) { slot21 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 22) { if(ItemStack.areItemStacksEqual(slot22, stack) == false) { slot22 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 23) { if(ItemStack.areItemStacksEqual(slot23, stack) == false) { slot23 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 24) { if(ItemStack.areItemStacksEqual(slot24, stack) == false) { slot24 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 25) { if(ItemStack.areItemStacksEqual(slot25, stack) == false) { slot25 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 26) { if(ItemStack.areItemStacksEqual(slot26, stack) == false) { slot26 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 27) { if(ItemStack.areItemStacksEqual(slot27, stack) == false) { slot27 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 28) { if(ItemStack.areItemStacksEqual(slot28, stack) == false) { slot28 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 29) { if(ItemStack.areItemStacksEqual(slot29, stack) == false) { slot29 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 30) { if(ItemStack.areItemStacksEqual(slot30, stack) == false) { slot30 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 31) { if(ItemStack.areItemStacksEqual(slot31, stack) == false) { slot31 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 32) { if(ItemStack.areItemStacksEqual(slot32, stack) == false) { slot32 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 33) { if(ItemStack.areItemStacksEqual(slot33, stack) == false) { slot33 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 34) { if(ItemStack.areItemStacksEqual(slot34, stack) == false) { slot34 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if (e == 35) { if(ItemStack.areItemStacksEqual(slot35, stack) == false) { slot35 = stack; if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); System.out.println("Itemstack " + e + "copied"); } } } if(g == 35) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); return; } } } } @SubscribeEvent public static void chkInv(TickEvent.ClientTickEvent event) throws InterruptedException { if(Minecraft.getMinecraft().player != null) { int s = 0; Main m = new Main(); m.PckUpItm(); for(int i=0; i < 37; i++) { if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(i).isEmpty() && Minecraft.getMinecraft() .player.inventory.getStackInSlot(i).getCount() == Minecraft.getMinecraft().player.inventory.getStackInSlot(i).getMaxStackSize()) { s++; if(s > 35) { if(Minecraft.getMinecraft().world.getTotalWorldTime() % 200 == 3L && event.phase == TickEvent.Phase.END) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); System.out.println("chkInv: Triggerred with s = " + s); return; } } //else { //for(int t=0; i < 37; t++) { //if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(i).isEmpty() && Minecraft.getMinecraft().player.inventory.getStackInSlot(t).getItem() == ) { //} //} //} } } return; } } } //@SideOnly(Side.CLIENT) //public void TickhHandler(TickEvent.ClientTickEvent event) throws InterruptedException { //wait(200); //} First line explain perfectly what this mod became and the game crash when i force the method to work and when joining a world / server: [00:31:25] [main/INFO] [GradleStart]: Extra: [] [00:31:25] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/[user]/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [00:31:25] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [00:31:25] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [00:31:25] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [00:31:25] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [00:31:25] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2768 for Minecraft 1.12.2 loading [00:31:25] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_212, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_212 [00:31:25] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected. Using default libraries directory. [00:31:25] [main/ERROR] [FML]: Full: C:\Users\[user]\.gradle\caches\modules-2\files-2.1\org.apache.maven\maven-artifact\3.5.3\7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4\maven-artifact-3.5.3.jar [00:31:25] [main/ERROR] [FML]: Trimmed: c:/users/[user]/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.3/ [00:31:25] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [00:31:25] [main/INFO] [FML]: Detected deobfuscated environment, loading log configs for colored console logs. 2019-10-20 00:31:26,922 main WARN Disabling terminal, you're running in an unsupported environment. [00:31:26] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin [00:31:26] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin [00:31:26] [main/INFO] [FML]: Searching D:\Modding\Minecraft\FullinventorycheckerRenewal\run\.\mods for mods [00:31:26] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [00:31:26] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [00:31:26] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [00:31:26] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [00:31:26] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [00:31:26] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [00:31:26] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [00:31:26] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [00:31:26] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [00:31:29] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [00:31:29] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [00:31:29] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [00:31:29] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [00:31:29] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [00:31:29] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [00:31:29] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [00:31:30] [main/INFO] [minecraft/Minecraft]: Setting user: Player865 [00:31:35] [main/WARN] [minecraft/GameSettings]: Skipping bad option: lastServer: [00:31:35] [main/INFO] [minecraft/Minecraft]: LWJGL Version: 2.9.4 [00:31:36] [main/INFO] [FML]: -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_212, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 846860768 bytes (807 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 431.60' Renderer: 'GeForce GT 1030/PCIe/SSE2' [00:31:36] [main/INFO] [FML]: MinecraftForge v14.23.5.2768 Initialized [00:31:36] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients. [00:31:37] [main/INFO] [FML]: Replaced 1036 ore ingredients [00:31:38] [main/INFO] [FML]: Searching D:\Modding\Minecraft\FullinventorycheckerRenewal\run\.\mods for mods [00:31:40] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load [00:31:40] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, fullinvchecker] at CLIENT [00:31:40] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, fullinvchecker] at SERVER [00:31:41] [main/INFO] [minecraft/SimpleReloadableResourceManager]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Full Inventory Checker [00:31:41] [main/INFO] [FML]: Processing ObjectHolder annotations [00:31:41] [main/INFO] [FML]: Found 1168 ObjectHolder annotations [00:31:41] [main/INFO] [FML]: Identifying ItemStackHolder annotations [00:31:41] [main/INFO] [FML]: Found 0 ItemStackHolder annotations [00:31:41] [main/INFO] [FML]: Configured a dormant chunk cache size of 0 [00:31:41] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [00:31:41] [main/INFO] [FML]: Applying holder lookups [00:31:41] [main/INFO] [FML]: Holder lookups applied [00:31:41] [main/INFO] [FML]: Applying holder lookups [00:31:41] [main/INFO] [FML]: Holder lookups applied [00:31:41] [main/INFO] [FML]: Applying holder lookups [00:31:41] [main/INFO] [FML]: Holder lookups applied [00:31:41] [main/INFO] [FML]: Applying holder lookups [00:31:41] [main/INFO] [FML]: Holder lookups applied [00:31:41] [main/INFO] [FML]: Injecting itemstacks [00:31:41] [main/INFO] [FML]: Itemstack injection complete [00:31:42] [Thread-3/INFO] [FML]: Using alternative sync timing : 200 frames of Display.update took 4789231038 nanos [00:31:42] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Found status: UP_TO_DATE Target: null [00:31:47] [Sound Library Loader/INFO] [minecraft/SoundManager]: Starting up SoundSystem... [00:31:47] [Thread-5/INFO] [minecraft/SoundManager]: Initializing LWJGL OpenAL [00:31:47] [Thread-5/INFO] [minecraft/SoundManager]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [00:31:47] [Thread-5/INFO] [minecraft/SoundManager]: OpenAL initialized. [00:31:47] [Sound Library Loader/INFO] [minecraft/SoundManager]: Sound engine started [00:31:55] [main/INFO] [FML]: Max texture size: 16384 [00:31:56] [main/INFO] [minecraft/TextureMap]: Created: 512x512 textures-atlas [00:31:58] [main/INFO] [FML]: Applying holder lookups [00:31:58] [main/INFO] [FML]: Holder lookups applied [00:31:58] [main/INFO] [FML]: Injecting itemstacks [00:31:58] [main/INFO] [FML]: Itemstack injection complete [00:31:58] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods [00:31:59] [main/WARN] [minecraft/GameSettings]: Skipping bad option: lastServer: [00:31:59] [main/INFO] [mojang/NarratorWindows]: Narrator library for x64 successfully loaded [00:32:00] [Realms Notification Availability checker #1/INFO] [mojang/RealmsClient]: Could not authorize you against Realms server: Invalid session id [00:32:03] [main/INFO] [minecraft/GuiConnecting]: Connecting to localhost, 25565 [00:32:03] [Netty Client IO #1/INFO] [FML]: Aborting client handshake "VANILLA" [00:32:03] [Netty Client IO #1/INFO] [FML]: [Netty Client IO #1] Client side vanilla connection established [00:32:05] [main/INFO] [STDOUT]: [Gess.mod.Main:log:52]: Does PckUpItm actually output anything? [00:32:05] [main/INFO] [STDOUT]: [Gess.mod.Main:PckUpItm:103]: starting to count e [00:32:05] [main/INFO] [STDOUT]: [Gess.mod.Main:PckUpItm:105]: checking slot 0 [00:32:05] [main/ERROR] [FML]: Exception caught during firing event net.minecraftforge.fml.common.gameevent.TickEvent$ClientTickEvent@3928de1c: java.lang.NullPointerException: null at net.minecraft.item.ItemStack.areItemStacksEqual(ItemStack.java:495) ~[ItemStack.class:?] at Gess.mod.Main.PckUpItm(Main.java:108) ~[Main.class:?] at Gess.mod.Main.chkInv(Main.java:486) ~[Main.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_Main_chkInv_ClientTickEvent.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:344) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1834) [Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1187) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:441) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_212] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_212] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] [00:32:05] [main/ERROR] [FML]: Index: 1 Listeners: [00:32:05] [main/ERROR] [FML]: 0: NORMAL [00:32:05] [main/ERROR] [FML]: 1: ASM: class Gess.mod.Main chkInv(Lnet/minecraftforge/fml/common/gameevent/TickEvent$ClientTickEvent;)V [00:32:05] [main/ERROR] [FML]: 2: ASM: net.minecraftforge.common.ForgeInternalHandler@15c900be checkSettings(Lnet/minecraftforge/fml/common/gameevent/TickEvent$ClientTickEvent;)V [00:32:06] [main/INFO] [FML]: Applying holder lookups [00:32:06] [main/INFO] [FML]: Holder lookups applied [00:32:06] [main/FATAL] [minecraft/Minecraft]: Unreported exception thrown! java.lang.NullPointerException: null at net.minecraft.item.ItemStack.areItemStacksEqual(ItemStack.java:495) ~[ItemStack.class:?] at Gess.mod.Main.PckUpItm(Main.java:108) ~[Main.class:?] at Gess.mod.Main.chkInv(Main.java:486) ~[Main.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_Main_chkInv_ClientTickEvent.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) ~[EventBus.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:344) ~[FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1834) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1187) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:441) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_212] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_212] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] [00:32:06] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ---- // Would you like a cupcake? Time: 10/20/19 12:32 AM Description: Unexpected error java.lang.NullPointerException: Unexpected error at net.minecraft.item.ItemStack.areItemStacksEqual(ItemStack.java:495) at Gess.mod.Main.PckUpItm(Main.java:108) at Gess.mod.Main.chkInv(Main.java:486) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_Main_chkInv_ClientTickEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraftforge.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:344) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1834) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1187) at net.minecraft.client.Minecraft.run(Minecraft.java:441) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:25) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at net.minecraft.item.ItemStack.areItemStacksEqual(ItemStack.java:495) at Gess.mod.Main.PckUpItm(Main.java:108) at Gess.mod.Main.chkInv(Main.java:486) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_Main_chkInv_ClientTickEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraftforge.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:344) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Player865'/1491, l='MpServer', x=8.50, y=65.00, z=8.50]] Chunk stats: MultiplayerChunkCache: 19, 19 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (8,64,8), Chunk: (at 8,4,8 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 0 game time, 0 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 1 total; [EntityPlayerSP['Player865'/1491, l='MpServer', x=8.50, y=65.00, z=8.50]] Retry entities: 0 total; [] Server brand: vanilla Server type: Non-integrated multiplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:461) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2888) at net.minecraft.client.Minecraft.run(Minecraft.java:470) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:25) -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_212, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 882644536 bytes (841 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.42 Powered by Forge 14.23.5.2768 5 mods loaded, 5 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | State | ID | Version | Source | Signature | |:------ |:-------------- |:----------------------------------- |:-------------------------------- |:--------- | | UCHIJA | minecraft | 1.12.2 | minecraft.jar | None | | UCHIJA | mcp | 9.42 | minecraft.jar | None | | UCHIJA | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.5.2768.jar | None | | UCHIJA | forge | 14.23.5.2768 | forgeSrc-1.12.2-14.23.5.2768.jar | None | | UCHIJA | fullinvchecker | 0.3 - Compatible in 1.12.1 & 1.12.2 | bin | None | Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 431.60' Renderer: 'GeForce GT 1030/PCIe/SSE2' Launched Version: 1.12.2 LWJGL: 2.9.4 OpenGL: GeForce GT 1030/PCIe/SSE2 GL version 4.6.0 NVIDIA 431.60, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: English (US) Profiler Position: N/A (disabled) CPU: 4x Intel(R) Core(TM) i3-4150T CPU @ 3.00GHz [00:32:06] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# D:\Modding\Minecraft\FullinventorycheckerRenewal\run\.\crash-reports\crash-2019-10-20_00.32.06-client.txt AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release any idea? EDIT: code and crash report edited
  7. wasn't at home when writing those last msg, i wish i had a way to dev my mod in the cloud. package Gess.mod; import Gess.mod.proxy.iProxy; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.text.TextComponentString; import net.minecraft.world.World; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import util.Reference; @EventBusSubscriber @Mod(modid=Reference.MODID, name=Reference.MODNAME, version=Reference.VERSION) public class Main { public static Configuration config; //public static int time = 10; public static Main instance; //float lastMessageTime = 0; public boolean inventoryIsFull; public static final String CLIENT = "gess.mod.proxy.ClientProxy"; public static final String SERVER = "gess.mod.proxy.CommonProxy"; @SidedProxy(clientSide = Reference.CLIENT, serverSide = Reference.COMMON) public static iProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent e){ //File directory = event.getModConfigurationDirectory(); //config = new Configuration(new File(directory.getPath(), "FullInventoryChecker.cfg")); //Config.readConfig(); } @EventHandler public void init(FMLInitializationEvent e){} @EventHandler public void postInit(FMLPostInitializationEvent e){ // if (config.hasChanged()) // config.save(); //} } public Main() { } private ItemStack[] previous; private ItemStack[] now; @SubscribeEvent public void PckUpItm(TickEvent.ClientTickEvent event) { if(Minecraft.getMinecraft().player != null) { EntityPlayer player = Minecraft.getMinecraft().player; int g = 0; System.out.println("starting to count e"); for(int e=0; e < 36; e++) { System.out.println("checking slot " + e); ItemStack stack = player.inventory.getStackInSlot(e); if(ItemStack.areItemStacksEqual(previous[e], stack)) { if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); previous[e] = stack; System.out.println("Itemstack " + e + "copied"); if(g > 34) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); return; } } } } } } @SubscribeEvent public static void chkInv(TickEvent.ClientTickEvent event) throws InterruptedException { if(Minecraft.getMinecraft().player != null) { int s = 0; for(int i=0; i < 37; i++) { if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(i).isEmpty() && Minecraft.getMinecraft() .player.inventory.getStackInSlot(i).getCount() == Minecraft.getMinecraft().player.inventory.getStackInSlot(i).getMaxStackSize()) { s++; if(s > 35) { if(Minecraft.getMinecraft().world.getTotalWorldTime() % 200 == 3L && event.phase == TickEvent.Phase.END) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); System.out.println("chkInv: Triggerred with s = " + s); return; } } //else { //for(int t=0; i < 37; t++) { //if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(i).isEmpty() && Minecraft.getMinecraft().player.inventory.getStackInSlot(t).getItem() == ) { //} //} //} } } return; } } } //@SideOnly(Side.CLIENT) //public void TickhHandler(TickEvent.ClientTickEvent event) throws InterruptedException { //wait(200); //} another forum was helping me at the same time, but they gave up cause of that last timeout thing, they apparently don't know where it would come from =/ breaking new : if i initialize previous with null, it doesn't timeout anymore, meaning that where the issue come from, so should i hard code every slots to store a specific stack? if i force another method to call this one method, the game crash when joining the server, to the line if(ItemStack.areItemStacksEqual(previous[e], stack)) { so i think forge ignore this method cause of that previous thing, that's why i think i should hard code everything should i try the lastest 1.12.2 build with all the bug fixes?
  8. I had followed a tutorial for another mod before that one, it was using 1.12.1 version, since no stable version of 1.12.2 was available in forge mod builder (discovered it after rewatching the vid)
  9. Code from the 1.12.2 version of InventorySpam by gigahertz https://pastebin.com/WtPT3CYT
  10. thought it would have worked since it come from the 1.12.2 of inventoryspam (not available on github) that i reversed engineered, what should i initialize it with? EDIT: i can go on the server without it crashing now, however, i can't do anything cause i timeout around .5s after being able to move around and in solo, the method doesn't even run EDIT n°2: deleting the static, prevent the crash, not the timeout
  11. it still crash tbh : [20:22:18] [main/INFO] [GradleStart]: Extra: [] [20:22:18] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/[user]/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12.2, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker] [20:22:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [20:22:18] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker [20:22:18] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker [20:22:18] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker [20:22:18] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2768 for Minecraft 1.12.2 loading [20:22:18] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_212, running on Windows 8.1:amd64:6.3, installed at C:\Program Files\Java\jre1.8.0_212 [20:22:18] [main/ERROR] [FML]: Apache Maven library folder was not in the format expected. Using default libraries directory. [20:22:18] [main/ERROR] [FML]: Full: C:\Users\[user]\.gradle\caches\modules-2\files-2.1\org.apache.maven\maven-artifact\3.5.3\7dc72b6d6d8a6dced3d294ed54c2cc3515ade9f4\maven-artifact-3.5.3.jar [20:22:18] [main/ERROR] [FML]: Trimmed: c:/users/[user]/.gradle/caches/modules-2/files-2.1/org.apache.maven/maven-artifact/3.5.3/ [20:22:18] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation [20:22:18] [main/INFO] [FML]: Detected deobfuscated environment, loading log configs for colored console logs. 2019-10-16 20:22:20,837 main WARN Disabling terminal, you're running in an unsupported environment. [20:22:20] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin [20:22:20] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin [20:22:20] [main/INFO] [FML]: Searching D:\Modding\Minecraft\FullinventorycheckerRenewal\run\.\mods for mods [20:22:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker [20:22:20] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin [20:22:20] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin [20:22:20] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [20:22:20] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [20:22:20] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [20:22:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [20:22:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker [20:22:20] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [20:22:23] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing [20:22:23] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper [20:22:23] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker [20:22:24] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker [20:22:24] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker [20:22:24] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker [20:22:24] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main} [20:22:25] [main/INFO] [minecraft/Minecraft]: Setting user: Player811 [20:22:33] [main/WARN] [minecraft/GameSettings]: Skipping bad option: lastServer: [20:22:33] [main/INFO] [minecraft/Minecraft]: LWJGL Version: 2.9.4 [20:22:35] [main/INFO] [FML]: -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_212, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 923142352 bytes (880 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 431.60' Renderer: 'GeForce GT 1030/PCIe/SSE2' [20:22:35] [main/INFO] [FML]: MinecraftForge v14.23.5.2768 Initialized [20:22:35] [main/INFO] [FML]: Starts to replace vanilla recipe ingredients with ore ingredients. [20:22:35] [main/INFO] [FML]: Replaced 1036 ore ingredients [20:22:36] [main/INFO] [FML]: Searching D:\Modding\Minecraft\FullinventorycheckerRenewal\run\.\mods for mods [20:22:38] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load [20:22:38] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, fullinvchecker] at CLIENT [20:22:38] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, fullinvchecker] at SERVER [20:22:40] [main/INFO] [minecraft/SimpleReloadableResourceManager]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Full Inventory Checker [20:22:40] [Thread-3/INFO] [FML]: Using alternative sync timing : 200 frames of Display.update took 4063916432 nanos [20:22:40] [main/INFO] [FML]: Processing ObjectHolder annotations [20:22:40] [main/INFO] [FML]: Found 1168 ObjectHolder annotations [20:22:40] [main/INFO] [FML]: Identifying ItemStackHolder annotations [20:22:40] [main/INFO] [FML]: Found 0 ItemStackHolder annotations [20:22:40] [main/INFO] [FML]: Configured a dormant chunk cache size of 0 [20:22:40] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json [20:22:40] [main/INFO] [FML]: Applying holder lookups [20:22:40] [main/INFO] [FML]: Holder lookups applied [20:22:40] [main/INFO] [FML]: Applying holder lookups [20:22:40] [main/INFO] [FML]: Holder lookups applied [20:22:40] [main/INFO] [FML]: Applying holder lookups [20:22:40] [main/INFO] [FML]: Holder lookups applied [20:22:40] [main/INFO] [FML]: Applying holder lookups [20:22:40] [main/INFO] [FML]: Holder lookups applied [20:22:40] [main/INFO] [FML]: Injecting itemstacks [20:22:40] [main/INFO] [FML]: Itemstack injection complete [20:22:41] [Forge Version Check/INFO] [forge.VersionCheck]: [forge] Found status: UP_TO_DATE Target: null [20:22:47] [Sound Library Loader/INFO] [minecraft/SoundManager]: Starting up SoundSystem... [20:22:47] [Thread-5/INFO] [minecraft/SoundManager]: Initializing LWJGL OpenAL [20:22:47] [Thread-5/INFO] [minecraft/SoundManager]: (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [20:22:47] [Thread-5/INFO] [minecraft/SoundManager]: OpenAL initialized. [20:22:48] [Sound Library Loader/INFO] [minecraft/SoundManager]: Sound engine started [20:22:57] [main/INFO] [FML]: Max texture size: 16384 [20:22:58] [main/INFO] [minecraft/TextureMap]: Created: 512x512 textures-atlas [20:23:00] [main/INFO] [FML]: Applying holder lookups [20:23:00] [main/INFO] [FML]: Holder lookups applied [20:23:00] [main/INFO] [FML]: Injecting itemstacks [20:23:00] [main/INFO] [FML]: Itemstack injection complete [20:23:01] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods [20:23:01] [main/WARN] [minecraft/GameSettings]: Skipping bad option: lastServer: [20:23:01] [main/INFO] [mojang/NarratorWindows]: Narrator library for x64 successfully loaded [20:23:03] [Realms Notification Availability checker #1/INFO] [mojang/RealmsClient]: Could not authorize you against Realms server: Invalid session id [20:23:11] [main/INFO] [minecraft/GuiConnecting]: Connecting to localhost, 25565 [20:23:12] [Netty Client IO #1/INFO] [FML]: Aborting client handshake "VANILLA" [20:23:12] [Netty Client IO #1/INFO] [FML]: [Netty Client IO #1] Client side vanilla connection established [20:23:13] [main/INFO] [STDOUT]: [Gess.mod.Main:PckUpItm:66]: starting to count e [20:23:13] [main/INFO] [STDOUT]: [Gess.mod.Main:PckUpItm:68]: checking slot 0 [20:23:13] [main/ERROR] [FML]: Exception caught during firing event net.minecraftforge.fml.common.gameevent.TickEvent$ClientTickEvent@3b6585fb: java.lang.NullPointerException: null at Gess.mod.Main.PckUpItm(Main.java:70) ~[Main.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_Main_PckUpItm_ClientTickEvent.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:344) [FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1834) [Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1187) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:441) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_212] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_212] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] [20:23:13] [main/ERROR] [FML]: Index: 1 Listeners: [20:23:13] [main/ERROR] [FML]: 0: NORMAL [20:23:13] [main/ERROR] [FML]: 1: ASM: class Gess.mod.Main PckUpItm(Lnet/minecraftforge/fml/common/gameevent/TickEvent$ClientTickEvent;)V [20:23:13] [main/ERROR] [FML]: 2: ASM: class Gess.mod.Main chkInv(Lnet/minecraftforge/fml/common/gameevent/TickEvent$ClientTickEvent;)V [20:23:13] [main/ERROR] [FML]: 3: ASM: net.minecraftforge.common.ForgeInternalHandler@6e79cc31 checkSettings(Lnet/minecraftforge/fml/common/gameevent/TickEvent$ClientTickEvent;)V [20:23:14] [main/INFO] [FML]: Applying holder lookups [20:23:14] [main/INFO] [FML]: Holder lookups applied [20:23:15] [main/FATAL] [minecraft/Minecraft]: Unreported exception thrown! java.lang.NullPointerException: null at Gess.mod.Main.PckUpItm(Main.java:70) ~[Main.class:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_Main_PckUpItm_ClientTickEvent.invoke(.dynamic) ~[?:?] at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?] at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) ~[EventBus.class:?] at net.minecraftforge.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:344) ~[FMLCommonHandler.class:?] at net.minecraft.client.Minecraft.runTick(Minecraft.java:1834) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1187) ~[Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:441) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:118) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_212] at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_212] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_212] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_212] at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) [start/:?] at GradleStart.main(GradleStart.java:25) [start/:?] [20:23:16] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: ---- Minecraft Crash Report ---- // Sorry :( Time: 10/16/19 8:23 PM Description: Unexpected error java.lang.NullPointerException: Unexpected error at Gess.mod.Main.PckUpItm(Main.java:70) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_Main_PckUpItm_ClientTickEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraftforge.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:344) at net.minecraft.client.Minecraft.runTick(Minecraft.java:1834) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1187) at net.minecraft.client.Minecraft.run(Minecraft.java:441) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:25) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Client thread Stacktrace: at Gess.mod.Main.PckUpItm(Main.java:70) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_4_Main_PckUpItm_ClientTickEvent.invoke(.dynamic) at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) at net.minecraftforge.fml.common.FMLCommonHandler.onPreClientTick(FMLCommonHandler.java:344) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityPlayerSP['Player811'/2554, l='MpServer', x=8.50, y=65.00, z=8.50]] Chunk stats: MultiplayerChunkCache: 19, 19 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (8,64,8), Chunk: (at 8,4,8 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511) Level time: 0 game time, 0 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 1 total; [EntityPlayerSP['Player811'/2554, l='MpServer', x=8.50, y=65.00, z=8.50]] Retry entities: 0 total; [] Server brand: vanilla Server type: Non-integrated multiplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:461) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2888) at net.minecraft.client.Minecraft.run(Minecraft.java:470) at net.minecraft.client.main.Main.main(Main.java:118) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:97) at GradleStart.main(GradleStart.java:25) -- System Details -- Details: Minecraft Version: 1.12.2 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.8.0_212, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 881731616 bytes (840 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP 9.42 Powered by Forge 14.23.5.2768 5 mods loaded, 5 mods active States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored | State | ID | Version | Source | Signature | |:------ |:-------------- |:----------------------------------- |:-------------------------------- |:--------- | | UCHIJA | minecraft | 1.12.2 | minecraft.jar | None | | UCHIJA | mcp | 9.42 | minecraft.jar | None | | UCHIJA | FML | 8.0.99.99 | forgeSrc-1.12.2-14.23.5.2768.jar | None | | UCHIJA | forge | 14.23.5.2768 | forgeSrc-1.12.2-14.23.5.2768.jar | None | | UCHIJA | fullinvchecker | 0.3 - Compatible in 1.12.1 & 1.12.2 | bin | None | Loaded coremods (and transformers): GL info: ' Vendor: 'NVIDIA Corporation' Version: '4.6.0 NVIDIA 431.60' Renderer: 'GeForce GT 1030/PCIe/SSE2' Launched Version: 1.12.2 LWJGL: 2.9.4 OpenGL: GeForce GT 1030/PCIe/SSE2 GL version 4.6.0 NVIDIA 431.60, NVIDIA Corporation GL Caps: Using GL 1.3 multitexturing. Using GL 1.3 texture combiners. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Shaders are available because OpenGL 2.1 is supported. VBOs are available because OpenGL 1.5 is supported. Using VBOs: Yes Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: Current Language: English (US) Profiler Position: N/A (disabled) CPU: 4x Intel(R) Core(TM) i3-4150T CPU @ 3.00GHz [20:23:16] [main/INFO] [STDOUT]: [net.minecraft.init.Bootstrap:printToSYSOUT:629]: #@!@# Game crashed! Crash report saved to: #@!@# D:\Modding\Minecraft\FullinventorycheckerRenewal\run\.\crash-reports\crash-2019-10-16_20.23.15-client.txt AL lib: (EE) alc_cleanup: 1 device not closed Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release with : if(ItemStack.areItemStacksEqual(previous[e], stack))
  12. i don't only use it to store size but the itemstack infos in itself, should i reset it to null? why would it be always true? if a stack is different, it should be true yes, but if it's the same, it's false, isn't it? if i use your method, how should i make it more precise? i mean, will it consider 2 differents heads as the same?
  13. Minecraft crash report : debug.log : My code in it's actual state : package Gess.mod; import Gess.mod.proxy.iProxy; import net.minecraft.client.Minecraft; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.ItemStack; import net.minecraft.util.text.TextComponentString; import net.minecraft.world.World; import net.minecraftforge.common.config.Configuration; import net.minecraftforge.event.entity.EntityJoinWorldEvent; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPostInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.fml.common.gameevent.TickEvent; import util.Reference; @EventBusSubscriber @Mod(modid=Reference.MODID, name=Reference.MODNAME, version=Reference.VERSION) public class Main { public static Configuration config; //public static int time = 10; public static Main instance; //float lastMessageTime = 0; public boolean inventoryIsFull; public static final String CLIENT = "gess.mod.proxy.ClientProxy"; public static final String SERVER = "gess.mod.proxy.CommonProxy"; @SidedProxy(clientSide = Reference.CLIENT, serverSide = Reference.COMMON) public static iProxy proxy; @EventHandler public void preInit(FMLPreInitializationEvent e){ //File directory = event.getModConfigurationDirectory(); //config = new Configuration(new File(directory.getPath(), "FullInventoryChecker.cfg")); //Config.readConfig(); } @EventHandler public void init(FMLInitializationEvent e){} @EventHandler public void postInit(FMLPostInitializationEvent e){ // if (config.hasChanged()) // config.save(); //} } public Main() { } private static ItemStack[] previous; private static ItemStack[] now; @SubscribeEvent public static void PckUpItm(TickEvent.ClientTickEvent event) { if(Minecraft.getMinecraft().player != null) { EntityPlayer player = Minecraft.getMinecraft().player; int g = 0; System.out.println("starting to count e"); for(int e=0; e < 36; e++) { System.out.println("checking slot " + e); ItemStack stack = player.inventory.getStackInSlot(e); if(previous[e] != stack) { if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); previous[e] = stack; System.out.println("Itemstack " + e + "copied"); if(g > 34) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); return; } } } } } } @SubscribeEvent public static void chkInv(TickEvent.ClientTickEvent event) throws InterruptedException { if(Minecraft.getMinecraft().player != null) { int s = 0; for(int i=0; i < 37; i++) { if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(i).isEmpty() && Minecraft.getMinecraft() .player.inventory.getStackInSlot(i).getCount() == Minecraft.getMinecraft().player.inventory.getStackInSlot(i).getMaxStackSize()) { s++; if(s > 35) { if(Minecraft.getMinecraft().world.getTotalWorldTime() % 200 == 3L && event.phase == TickEvent.Phase.END) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); System.out.println("chkInv: Triggerred with s = " + s); return; } } //else { //for(int t=0; i < 37; t++) { //if(!Minecraft.getMinecraft().player.inventory.getStackInSlot(i).isEmpty() && Minecraft.getMinecraft().player.inventory.getStackInSlot(t).getItem() == ) { //} //} //} } } return; } } } //@SideOnly(Side.CLIENT) //public void TickhHandler(TickEvent.ClientTickEvent event) throws InterruptedException { //wait(200); //}
  14. so i fixed the first issue by redoing the setup, this time in the recommended 1.12.2 forge build. The issue with events is gone, now, i trying to debug my code, and when connecting to the server, the client crash cause of this line : if(previous[e] != stack) { i can't see what's wrong here, did someone cursed me with blindness 255 for infinity?
  15. hey, i'm back, to ask one question : i'm trying to make e.entity work, but "e" cannot be resolved, so i assume there is a way to make it work, but from what i saw in other mods, it just work, normally, so why isn't it working in mine? EDIT: something might have happened cause i see this : event.getEntityPlayer()or other such things related to minecraft doesn't work anymore event also doesn't work in any of my project anymore MOAR EDIT: using a method that compare items in inventory with a previous one, it doesn't work, like it doesn't even trigger : private ItemStack[] previous; private ItemStack[] now; @SubscribeEvent public void PckUpItm(TickEvent.ClientTickEvent event) { if(Minecraft.getMinecraft().player != null) { EntityPlayer player = Minecraft.getMinecraft().player; int g = 0; System.out.println("starting to count e"); for(int e=0; e < 36; e++) { System.out.println("checking slot " + e); ItemStack stack = player.inventory.getStackInSlot(e); if(previous[e] != stack) { if(!stack.isEmpty() && stack.getCount() == stack.getMaxStackSize()) { g++; System.out.println("g = " + g); previous[e] = stack; System.out.println("Itemstack " + e + "copied"); if(g > 34) { Minecraft.getMinecraft().player.sendMessage(new TextComponentString("Your inventory is full")); return; } } } } } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.