Jump to content

[1.12.1 - 1.12.2] An already working method suddenly stop working out of nowhere


Recommended Posts

Posted
  On 9/16/2019 at 7:27 PM, diesieben07 said:

What exactly does not trigger? Have you used the debugger and checked why it does not trigger?

Expand  

the PickUpitem method doesn't work, i still can't use the debugger due to minecraft "not responding" and log stuck at 57% when loading world

Posted (edited)
  On 9/16/2019 at 7:33 PM, diesieben07 said:

What do you mean by "doesn't work"? Is not called at all? Does not behave as you expect?

Expand  

everything after (!event.getEntityPlayer().world.isRemote == true) doesn't work when picking up an item in MP

and only work in SG

Edited by Gess1t
Posted
  On 9/16/2019 at 7:39 PM, diesieben07 said:

The check is still wrong. You are still checking if isRemote is false (although in a roundabout way now). EntityItemPickupEvent is only fired on the (logical) server.

You are observing it to "work" in single player because single player is using an integrated server. This server fires the event, you then reach across logical sides into the logical client and do stuff there (because you are still checking for isRemote == false). You cannot use this event if you want your code to run on the logical client.

Expand  

maybe, but if isRemote is true, it doesn't do anything at all both on MP and SG

Posted
  On 9/16/2019 at 7:42 PM, diesieben07 said:

Yes. Because, like I said, the event is only fired on the server.

If you want to use this event, your mod must also be installed on the server.

Expand  

so i said previously that i needed my mod to be client-side only, and i know other mods do basicly the same thing, again client side and they aren't hitting that logical side thing a good example : InventorySpam

Posted (edited)

finally found they github checking out

https://github.com/gigaherz/InventorySpam/blob/master/src/main/java/gigaherz/inventoryspam/InventorySpam.java

 

i think they use that part to check for new items :

 

 

public class PlayerContainerHooks
  {
  private static PlayerContainer original;
  private static Runnable callback;
   
  public static void afterSetAll(PlayerContainer playerContainer, List<ItemStack> stacks)
  {
  if (playerContainer == original && callback != null)
  callback.run();
  }
   
  public static void setTarget(Container container, Runnable callback)
  {
  PlayerContainerHooks.original = (net.minecraft.inventory.container.PlayerContainer)container;
  PlayerContainerHooks.callback = callback;
  }
  }

 

what the mod does is basicly check the player inv for any new items every ticks, used it for a long time now, it work everywhere

maybe i could use that to trigger my check

 

it's also linked with a javascript file in the ressource folder :

 

https://github.com/gigaherz/InventorySpam/blob/master/src/main/resources/cm/playercontainer-setall-hook.js

 

EDIT: I'll try to reverse engineer it uding BON2 and bytecodeviewer like you recommanded to someone in the past

 

Eat more edits cause why not: sent a mail to gigaherz himself for authorization and details about how it work

Edited by Gess1t
Posted (edited)

deobf and decompiling was easy, reverse engineer it is something else, InventorySpam decompiled 1.12.2.zip-proycon.zip here is the decompiled code, the 3 class that i'm  interested in are ContainerWrapper.java /

ScrollingOverlay$ComparableItem.java / ScrollingOverlay.java

 

especially the line 236 to 422 in ScrollingOverlay.java , he's checking for new items every ticks, by copying every stacks in slots then he check them again for change, every ticks.

could probably be a good client side alternative to ItemPickupEvent.

what do you think about this??

Edited by Gess1t
Posted (edited)
  On 9/21/2019 at 10:07 AM, diesieben07 said:

Wtf? The mod is open source, you even linked to it above... Why on earth are you decompiling it?!

Expand  

simple: no 1.12 branch available on github, it stop at 1.11.2, check it by yourself

 

i wouldn't have done it if it was in fact available, but it's not.

Edited by Gess1t
  • 3 weeks later...
Posted (edited)

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?

e.entity.PNG.c2598df70aea7e922969c78412551a27.PNG

 

EDIT: something might have happened cause i see this :

629292797_Capturedcran(587).png.be79348e6c44e79d41bd62d8019d4b49.png

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;
						
					}
				}
				
			}
				
		}
					
	}				

}

 

Edited by Gess1t
Posted

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?

Posted
  On 10/16/2019 at 5:27 PM, Gess1t said:

the client crash cause of this line : 

 

Expand  

Hmm it crashed...why did it crash? If only it told us...

  Reveal hidden contents

 

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted (edited)
  On 10/16/2019 at 5:56 PM, Animefan8888 said:

Hmm it crashed...why did it crash? If only it told us...

  Reveal hidden contents

 

Expand  
  Reveal hidden contents

 

Minecraft crash report :

  Reveal hidden contents

 

debug.log

  Reveal hidden contents

 

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);

	
//}

 

Edited by Gess1t
Posted
  On 10/16/2019 at 5:27 PM, Gess1t said:

i can't see what's wrong here,

Expand  

Do you ever give your previous or now fields a value or do you assume that they automatically have the size you want?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted (edited)
  On 10/16/2019 at 5:27 PM, Gess1t said:

if(previous[e] != stack

Expand  

Also this will always most of the time be true. Use ItemStack#areItemStacksEqual or similar method name.

Edited by Animefan8888

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted (edited)
  On 10/16/2019 at 6:07 PM, Animefan8888 said:

Do you ever give your previous or now fields a value or do you assume that they automatically have the size you want?

Expand  

i don't only use it to store size but the itemstack infos in itself, should i reset it to null?

 

  On 10/16/2019 at 6:08 PM, Animefan8888 said:

Also this will always be true. Use ItemStack#areItemStacksEqual or similar method name.

Expand  

 

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?

Edited by Gess1t
Posted (edited)
  On 10/16/2019 at 6:08 PM, Animefan8888 said:

Also this will always most of the time be true. Use ItemStack#areItemStacksEqual or similar method name.

Expand  

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))

 

Edited by Gess1t
Posted
  On 10/16/2019 at 6:11 PM, Gess1t said:

should i reset it to null?

Expand  

No...The problem is that it is null you never give them any value. You need to give them a value. They dont automatically have a size/length.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted (edited)

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

 

  Reveal hidden contents


and in solo, the method doesn't even run

 

EDIT n°2: deleting the static, prevent the crash, not the timeout

Edited by Gess1t
Posted
  On 10/16/2019 at 6:36 PM, Gess1t said:

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?

Expand  

Post your code.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted (edited)
  On 10/17/2019 at 11:03 AM, Differentiation said:

Maybe he wants to be cool? Not conform with the rest? XD

Expand  

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)

Edited by Gess1t
Posted
  On 10/17/2019 at 12:03 PM, Gess1t said:

Code from the 1.12.2 version of InventorySpam by gigahertz

Expand  

No. I need to see the current state of your code.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Posted (edited)
  On 10/17/2019 at 2:18 PM, Animefan8888 said:

No. I need to see the current state of your code.

Expand  

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?

Edited by Gess1t
Posted (edited)

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

Edited by Gess1t
code and crash report edited
Posted
  On 10/19/2019 at 10:12 PM, Gess1t said:

So i tried to hardcode every slots as i obtain this mess: 

Expand  

For the love of god no...go back to using an array. You need to initialize your array. If you don't know how to do that please look it up. It's very basic Java and many other languages.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Guest
This topic is now closed to further replies.

Announcements




×
×
  • Create New...

Important Information

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