Jump to content

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


Gess1t

Recommended Posts

4 minutes ago, Animefan8888 said:

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.

the thing is : gigahertz never initialized his array, and it still work, and what do you want me to initialize it with?

Link to comment
Share on other sites

Just now, Gess1t said:

and what do you want me to initialize it with?

It's meant to represent the player's inventory right? Then you should initialize it to have the same size as the inventory.

 

Just now, Gess1t said:

gigahertz never initialized his array

If his mod worked at all then he must have done it at some point.

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.

Link to comment
Share on other sites

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 lhô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 lhô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

 

Edited by Gess1t
Link to comment
Share on other sites

19 minutes ago, Gess1t said:

this.previous = new ItemStack[player.inventory.getSizeInventory()];

You're making it a new array every time that method is called therefore it is never the "previous" inventory. It is always an "empty" inventory. You only need to initialize it once. You also need to make sure that none of the values are null, but instead ItemStack.EMPTY.

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.

Link to comment
Share on other sites

8 hours ago, Animefan8888 said:

You're making it a new array every time that method is called therefore it is never the "previous" inventory. It is always an "empty" inventory. You only need to initialize it once. You also need to make sure that none of the values are null, but instead ItemStack.EMPTY.

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

Edited by Gess1t
Link to comment
Share on other sites

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 lhô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

Edited by Gess1t
Link to comment
Share on other sites

Do you know Java or any other programming language?

  • Like 1

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Spoiler

Logs (Most issues require logs to diagnose):

Spoiler

Please post logs using one of the following sites (Thank you Lumber Wizard for the list):

https://gist.github.com/100MB Requires member (Free)

https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$)

https://hastebin.com/: 400KB

Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads.

 

What to provide:

...for Crashes and Runtime issues:

Minecraft 1.14.4 and newer:

Post debug.log

Older versions:

Please update...

 

...for Installer Issues:

Post your installer log, found in the same place you ran the installer

This log will be called either installer.log or named the same as the installer but with .log on the end

Note for Windows users:

Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension

 

Where to get it:

Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs.

 

Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch:

Spoiler
  1. Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge)
  2. Make a launcher profile targeting this version of Forge.
  3. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it).
  4. Now launch the pack through that profile and follow the "Mojang Launcher" instructions above.

Video:

Spoiler

 

 

 

or alternately, 

 

Fallback ("No logs are generated"):

If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft

 

Server Not Starting:

Spoiler

If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output.

 

Reporting Illegal/Inappropriate Adfocus Ads:

Spoiler

Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad.

Lex will need the Ad ID contained in that URL to report it to Adfocus' support team.

 

Posting your mod as a GitHub Repo:

Spoiler

When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub.

When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository.

 

  1. Open a command prompt (CMD, Powershell, Terminal, etc).
  2. Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in).
  3. Run the following commands:
    1. git init
    2. git remote add origin [Your Repository's URL]
      • In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git
    3. git fetch
    4. git checkout --track origin/master
    5. git stage *
    6. git commit -m "[Your commit message]"
    7. git push
  4. Navigate to GitHub and you should now see most of the files.
    • note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from)
  5. Now you can share your GitHub link with those who you are asking for help.

[Workaround line, please ignore]

 

Link to comment
Share on other sites

In that case, locking.

Learn Java

  • Like 1

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

Spoiler

Logs (Most issues require logs to diagnose):

Spoiler

Please post logs using one of the following sites (Thank you Lumber Wizard for the list):

https://gist.github.com/100MB Requires member (Free)

https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$)

https://hastebin.com/: 400KB

Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads.

 

What to provide:

...for Crashes and Runtime issues:

Minecraft 1.14.4 and newer:

Post debug.log

Older versions:

Please update...

 

...for Installer Issues:

Post your installer log, found in the same place you ran the installer

This log will be called either installer.log or named the same as the installer but with .log on the end

Note for Windows users:

Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension

 

Where to get it:

Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs.

 

Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch:

Spoiler
  1. Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge)
  2. Make a launcher profile targeting this version of Forge.
  3. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it).
  4. Now launch the pack through that profile and follow the "Mojang Launcher" instructions above.

Video:

Spoiler

 

 

 

or alternately, 

 

Fallback ("No logs are generated"):

If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft

 

Server Not Starting:

Spoiler

If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output.

 

Reporting Illegal/Inappropriate Adfocus Ads:

Spoiler

Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad.

Lex will need the Ad ID contained in that URL to report it to Adfocus' support team.

 

Posting your mod as a GitHub Repo:

Spoiler

When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub.

When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository.

 

  1. Open a command prompt (CMD, Powershell, Terminal, etc).
  2. Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in).
  3. Run the following commands:
    1. git init
    2. git remote add origin [Your Repository's URL]
      • In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git
    3. git fetch
    4. git checkout --track origin/master
    5. git stage *
    6. git commit -m "[Your commit message]"
    7. git push
  4. Navigate to GitHub and you should now see most of the files.
    • note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from)
  5. Now you can share your GitHub link with those who you are asking for help.

[Workaround line, please ignore]

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • https://hastebin.com/share/naxelamixe.perl is the crash log 
    • my bad, i shared a very old LOG, now must be the right one, im sorry.
    • Hello TileEntity, thanks for your help, is just that i do not have terraria mod installed, i can give you mi list of mods.   EpicFight-20.7.4.jar handcrafted-forge-1.20.1-3.0.6.jar resourcefullib-forge-1.20.1-2.1.25.jar thedragonlib-1.20.1-1.0.0.jar tameablebeasts-1.20.1-5.1.jar geckolib-forge-1.20.1-4.4.6.jar mythicmounts-20.1-7.4.2-forge.jar Patchouli-1.20.1-84-FORGE.jar morevillagers-forge-1.20.1-5.0.0.jar balm-forge-1.20.1-7.3.4-all.jar trashslot-forge-1.20-15.1.0.jar peacefulrecipes 1.20.jar ferritecore-6.0.1-forge.jar darkmining-forge-1.20.1-1.1.0.jar ParCool-1.20.1-3.2.1.2-R.jar minecolonies-1.20.1-1.1.563-RELEASE.jar towntalk-1.20.1-1.1.0.jar structurize-1.20.1-1.0.733-RELEASE.jar blockui-1.20.1-1.0.156-RELEASE.jar domum_ornamentum-1.20.1-1.0.186-RELEASE-universal.jar multipiston-1.20-1.2.43-RELEASE.jar svmm-1.20.1-1.3.0.3.jar InsaneLib-1.13.5-mc1.20.1.jar Satako-7.0.16-1.20.1.jar Bountiful-6.0.3+1.20.1-forge.jar Kambrik-6.1.1+1.20.1-forge.jar kotlinforforge-4.11.0-all.jar kubejs-forge-2001.6.5-build.7.jar rhino-forge-2001.2.2-build.18.jar superbosses-1.2.0-1.20.1.jar lootjs-forge-1.20.1-2.12.0.jar MobsPropertiesRandomness-4.10.8-mc1.20.1.jar Pehkui-3.8.2+1.20.1-forge.jar lostcities-1.20-7.1.8.jar yuushya-1.20.1-forge-2.1.1.jar architectury-9.2.14-forge.jar artifacts-forge-9.5.11.jar curios-forge-5.9.1+1.20.1.jar cloth-config-11.1.118-forge.jar mcdar-4.0.3.jar mcdw-9.0.4.jar mcda-5.0.2.jar Connector-1.0.0-beta.43+1.20.1.jar ConnectorExtras-1.10.1+1.20.1.jar fabric-api-0.92.2+1.11.8+1.20.1.jar immersive_armors-1.6.1+1.20.1-forge.jar cosmeticarmorreworked-1.20.1-v1a.jar K-Turrets-3.0.25-1.20.1.jar M'TEG-1.0.1-1.20.1.jar JustEnoughGuns-0.4.0-1.20.1.jar framework-forge-1.20.1-0.7.6.jar JustEnoughResources-1.20.1-1.4.0.247.jar modernfix-forge-5.18.1+mc1.20.1.jar corpse-forge-1.20.1-1.0.12.jar randombonemealflowers-1.20.1-4.5.jar collective-1.20.1-7.61.jar treeharvester-1.20.1-8.7.jar ImprovableSkills-1.20.1-20.1.8.jar HammerLib-1.20.1-20.1.30.jar easy_mob_farm_1.20.1-7.1.0.jar easy-piglins-forge-1.20.1-1.0.5.jar easy_villagers-1.20.1-1.0.17.jar the_bumblezone-7.4.5+1.20.1-forge.jar productivebees-1.20.1-12.5.3.jar XaerosWorldMap_1.38.8_Forge_1.20.jar Xaeros_Minimap_24.2.0_Forge_1.20.jar jei-1.20.1-forge-15.3.0.8.jar Rats-1.20.1-8.1.2.jar citadel-2.5.4-1.20.1.jar Animation_Overhaul-forge-1.20.x-1.3.1.jar Necronomicon-Forge-1.4.2.jar invtweaks-1.20.1-1.1.0.jar sophisticatedbackpacks-1.20.1-3.20.5.1044.jar sophisticatedcore-1.20.1-0.6.22.611.jar travelersbackpack-forge-1.20.1-9.1.14.jar BetterThirdPerson-Forge-1.20-1.9.0.jar  
    • ill be asleep by the time you respond so mention like a lot of thing to do so when i wake i can try them
  • Topics

×
×
  • Create New...

Important Information

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