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 l’hôte distant // timeout
	at sun.nio.ch.SocketDispatcher.write0(Native Method) ~[?:1.8.0_212]
	at sun.nio.ch.SocketDispatcher.write(Unknown Source) ~[?:1.8.0_212]
	at sun.nio.ch.IOUtil.writeFromNativeBuffer(Unknown Source) ~[?:1.8.0_212]
	at sun.nio.ch.IOUtil.write(Unknown Source) ~[?:1.8.0_212]
	at sun.nio.ch.SocketChannelImpl.write(Unknown Source) ~[?:1.8.0_212]
	at io.netty.channel.socket.nio.NioSocketChannel.doWrite(NioSocketChannel.java:417) ~[NioSocketChannel.class:4.1.9.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush0(AbstractChannel.java:856) ~[AbstractChannel$AbstractUnsafe.class:4.1.9.Final]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.flush0(AbstractNioChannel.java:362) ~[AbstractNioChannel$AbstractNioUnsafe.class:4.1.9.Final]
	at io.netty.channel.AbstractChannel$AbstractUnsafe.flush(AbstractChannel.java:823) ~[AbstractChannel$AbstractUnsafe.class:4.1.9.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.flush(DefaultChannelPipeline.java:1296) ~[DefaultChannelPipeline$HeadContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.ChannelDuplexHandler.flush(ChannelDuplexHandler.java:117) ~[ChannelDuplexHandler.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115) ~[ChannelOutboundHandlerAdapter.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115) ~[ChannelOutboundHandlerAdapter.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.ChannelOutboundHandlerAdapter.flush(ChannelOutboundHandlerAdapter.java:115) ~[ChannelOutboundHandlerAdapter.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush(AbstractChannelHandlerContext.java:768) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.flush(AbstractChannelHandlerContext.java:749) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.flush(NetworkDispatcher.java:558) ~[NetworkDispatcher.class:?]
	at io.netty.channel.AbstractChannelHandlerContext.invokeFlush0(AbstractChannelHandlerContext.java:776) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:802) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:814) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:794) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.writeAndFlush(AbstractChannelHandlerContext.java:831) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.DefaultChannelPipeline.writeAndFlush(DefaultChannelPipeline.java:1032) ~[DefaultChannelPipeline.class:4.1.9.Final]
	at io.netty.channel.AbstractChannel.writeAndFlush(AbstractChannel.java:296) ~[AbstractChannel.class:4.1.9.Final]
	at net.minecraft.network.NetworkManager$4.run(NetworkManager.java:261) [NetworkManager$4.class:?]
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163) [AbstractEventExecutor.class:4.1.9.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:403) [SingleThreadEventExecutor.class:4.1.9.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:442) [NioEventLoop.class:4.1.9.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_212]
[04:21:16] [main/INFO] [FML]: Applying holder lookups
[04:21:16] [main/INFO] [FML]: Holder lookups applied
[04:21:39] [main/INFO] [minecraft/GuiConnecting]: Connecting to localhost, 25565
[04:21:40] [Netty Client IO #2/INFO] [FML]: Aborting client handshake "VANILLA"
[04:21:40] [Netty Client IO #2/INFO] [FML]: [Netty Client IO #2] Client side vanilla connection established
[04:22:05] [Netty Client IO #2/ERROR] [FML]: NetworkDispatcher exception
java.io.IOException: Une connexion existante a dû être fermée par l’hôte distant //timeout
	at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:1.8.0_212]
	at sun.nio.ch.SocketDispatcher.read(Unknown Source) ~[?:1.8.0_212]
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) ~[?:1.8.0_212]
	at sun.nio.ch.IOUtil.read(Unknown Source) ~[?:1.8.0_212]
	at sun.nio.ch.SocketChannelImpl.read(Unknown Source) ~[?:1.8.0_212]
	at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[PooledUnsafeDirectByteBuf.class:4.1.9.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1100) ~[AbstractByteBuf.class:4.1.9.Final]
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:372) ~[NioSocketChannel.class:4.1.9.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123) [AbstractNioByteChannel$NioByteUnsafe.class:4.1.9.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:624) [NioEventLoop.class:4.1.9.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:559) [NioEventLoop.class:4.1.9.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:476) [NioEventLoop.class:4.1.9.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438) [NioEventLoop.class:4.1.9.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_212]
[04:22:06] [main/INFO] [FML]: Applying holder lookups
[04:22:06] [main/INFO] [FML]: Holder lookups applied

 

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 l’hôte distant
	at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:1.8.0_212]
	at sun.nio.ch.SocketDispatcher.read(Unknown Source) ~[?:1.8.0_212]
	at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source) ~[?:1.8.0_212]
	at sun.nio.ch.IOUtil.read(Unknown Source) ~[?:1.8.0_212]
	at sun.nio.ch.SocketChannelImpl.read(Unknown Source) ~[?:1.8.0_212]
	at io.netty.buffer.PooledUnsafeDirectByteBuf.setBytes(PooledUnsafeDirectByteBuf.java:288) ~[PooledUnsafeDirectByteBuf.class:4.1.9.Final]
	at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:1100) ~[AbstractByteBuf.class:4.1.9.Final]
	at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:372) ~[NioSocketChannel.class:4.1.9.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123) [AbstractNioByteChannel$NioByteUnsafe.class:4.1.9.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:624) [NioEventLoop.class:4.1.9.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:559) [NioEventLoop.class:4.1.9.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:476) [NioEventLoop.class:4.1.9.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:438) [NioEventLoop.class:4.1.9.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_212]
[21:04:21] [main/INFO] [FML]: Applying holder lookups
[21:04:21] [main/INFO] [FML]: Holder lookups applied
[21:04:32] [main/INFO] [minecraft/GuiConnecting]: Connecting to localhost, 25565
[21:04:32] [Netty Client IO #2/INFO] [FML]: Aborting client handshake "VANILLA"
[21:04:32] [Netty Client IO #2/INFO] [FML]: [Netty Client IO #2] Client side vanilla connection established
[21:04:45] [main/INFO] [minecraft/Minecraft]: Stopping!
[21:04:52] [main/INFO] [minecraft/SoundManager]: SoundSystem shutting down...
[21:04:52] [main/WARN] [minecraft/SoundManager]: Author: Paul Lamb, www.paulscode.com
Java HotSpot(TM) 64-Bit Server VM warning: Using incremental CMS is deprecated and will likely be removed in a future release

 

edit : code edited, to use list instead of arrays, but still not work

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.

Announcements




  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • DAFTAR & LOGIN SIRITOGEL Siritogel adalah kumpulan kata yang mungkin baru saja dikenal oleh masyarakat, namun dengan perkembangan teknologi dan banyaknya informasi yang tersedia di internet, kalau kita siritogel (mencari informasi dengan cara yang cermat dan rinci) tentang situs slot gacor online, maka kita akan menemukan banyak hal yang menarik dan membahayakan sama sekali. Dalam artikel ini, kita akan mencoba menjelaskan apa itu situs slot gacor online dan bagaimana cara mengatasi dampaknya yang negatif.
    • This honestly might just work for you @SubscribeEvent public static void onScreenRender(ScreenEvent.Render.Post event) { final var player = Minecraft.getInstance().player; if(!hasMyEffect(player)) return; // TODO: You provide hasMyEffect float f = Mth.lerp(p_109094_, this.minecraft.player.oSpinningEffectIntensity, this.minecraft.player.spinningEffectIntensity); float f1 = ((Double)this.minecraft.options.screenEffectScale().get()).floatValue(); if(f <= 0F || f1 >= 1F) return; float p_282656_ = ?; final var p_282460_ = event.getGuiGraphics(); int i = p_282460_.guiWidth(); int j = p_282460_.guiHeight(); p_282460_.pose().pushPose(); float f = Mth.lerp(p_282656_, 2.0F, 1.0F); p_282460_.pose().translate((float)i / 2.0F, (float)j / 2.0F, 0.0F); p_282460_.pose().scale(f, f, f); p_282460_.pose().translate((float)(-i) / 2.0F, (float)(-j) / 2.0F, 0.0F); float f1 = 0.2F * p_282656_; float f2 = 0.4F * p_282656_; float f3 = 0.2F * p_282656_; RenderSystem.disableDepthTest(); RenderSystem.depthMask(false); RenderSystem.enableBlend(); RenderSystem.blendFuncSeparate(SourceFactor.ONE, DestFactor.ONE, SourceFactor.ONE, DestFactor.ONE); p_282460_.setColor(f1, f2, f3, 1.0F); p_282460_.blit(NAUSEA_LOCATION, 0, 0, -90, 0.0F, 0.0F, i, j, i, j); p_282460_.setColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.defaultBlendFunc(); RenderSystem.disableBlend(); RenderSystem.depthMask(true); RenderSystem.enableDepthTest(); p_282460_.pose().popPose(); }   Note: Most of this is directly copied from GameRenderer as you pointed out you found. The only thing you'll have to likely do is update the `oSpinningEffectIntensity` + `spinningEffectIntensity` variables on the player when your effect is applied. Which values should be there? Not 100% sure, might be a game of guess and check, but `handleNetherPortalClient` in LocalPlayer has some hard coded you might be able to start with.
    • Dalam dunia perjudian online yang berkembang pesat, mencari platform yang dapat memberikan kemenangan maksimal dan hasil terbaik adalah impian setiap penjudi. OLXTOTO, dengan bangga, mempersembahkan dirinya sebagai jawaban atas pencarian itu. Sebagai platform terbesar untuk kemenangan maksimal dan hasil optimal, OLXTOTO telah menciptakan gelombang besar di komunitas perjudian online. Satu dari banyak keunggulan yang dimiliki OLXTOTO adalah koleksi permainan yang luas dan beragam. Dari togel hingga slot online, dari live casino hingga permainan kartu klasik, OLXTOTO memiliki sesuatu untuk setiap pemain. Dibangun dengan teknologi terkini dan dikembangkan oleh para ahli industri, setiap permainan di platform ini dirancang untuk memberikan pengalaman yang tak tertandingi bagi para penjudi. Namun, keunggulan OLXTOTO tidak hanya terletak pada variasi permainan yang mereka tawarkan. Mereka juga menonjol karena komitmen mereka terhadap keamanan dan keadilan. Dengan sistem keamanan tingkat tinggi dan proses audit yang ketat, OLXTOTO memastikan bahwa setiap putaran permainan berjalan dengan adil dan transparan. Para pemain dapat merasa aman dan yakin bahwa pengalaman berjudi mereka di OLXTOTO tidak akan terganggu oleh masalah keamanan atau keadilan. Tak hanya itu, OLXTOTO juga terkenal karena layanan pelanggan yang luar biasa. Tim dukungan mereka selalu siap sedia untuk membantu para pemain dengan segala pertanyaan atau masalah yang mereka hadapi. Dengan respon cepat dan solusi yang efisien, OLXTOTO memastikan bahwa pengalaman berjudi para pemain tetap mulus dan menyenangkan. Dengan semua fitur dan keunggulan yang ditawarkannya, tidak mengherankan bahwa OLXTOTO telah menjadi pilihan utama bagi jutaan penjudi online di seluruh dunia. Jika Anda mencari platform yang dapat memberikan kemenangan maksimal dan hasil optimal, tidak perlu mencari lebih jauh dari OLXTOTO. Bergabunglah dengan OLXTOTO hari ini dan mulailah petualangan Anda menuju kemenangan besar dan hasil terbaik!
    • Selamat datang di OLXTOTO, situs slot gacor terpanas yang sedang booming di industri perjudian online. Jika Anda mencari pengalaman bermain yang luar biasa, maka OLXTOTO adalah tempat yang tepat untuk Anda. Dapatkan sensasi tidak biasa dengan variasi slot online terlengkap dan peluang memenangkan jackpot slot maxwin yang sering. Di sini, Anda akan merasakan keseruan yang luar biasa dalam bermain judi slot. DAFTAR OLXTOTO DISINI LOGIN OLXTOTO DISINI AKUN PRO OLXTOTO DISINI   Jackpot Slot Maxwin Sering Untuk Peluang Besar Di OLXTOTO, kami tidak hanya memberikan hadiah slot biasa, tapi juga memberikan kesempatan kepada pemain untuk memenangkan jackpot slot maxwin yang sering. Dengan demikian, Anda dapat meraih keberuntungan besar dan memenangkan ribuan rupiah sebagai hadiah jackpot slot maxwin kami. Jackpot slot maxwin merupakan peluang besar bagi para pemain judi slot untuk meraih keuntungan yang lebih besar. Dalam permainan kami, Anda tidak harus terpaku pada kemenangan biasa saja. Kami hadir dengan jackpot slot maxwin yang sering, sehingga Anda memiliki peluang yang lebih besar untuk meraih kemenangan besar dengan hadiah yang menggiurkan. Dalam permainan judi slot, pengalaman bermain bukan hanya tentang keseruan dan hiburan semata. Kami memahami bahwa para pemain juga menginginkan kesempatan untuk meraih keberuntungan besar. Oleh karena itu, OLXTOTO hadir dengan jackpot slot maxwin yang sering untuk memberikan peluang besar kepada para pemain kami. Peluang Besar Menang Jackpot Slot Maxwin Peluang menang jackpot slot maxwin di OLXTOTO sangatlah besar. Anda tidak perlu khawatir tentang batasan atau pembatasan dalam meraih jackpot tersebut. Kami ingin memberikan kesempatan kepada semua pemain kami untuk merasakan sensasi menang dalam jumlah yang luar biasa. Jackpot slot maxwin kami dibuka untuk semua pemain judi slot di OLXTOTO. Anda memiliki peluang yang sama dengan pemain lainnya untuk memenangkan hadiah jackpot yang besar. Kami percaya bahwa semua orang memiliki kesempatan untuk meraih keberuntungan besar, dan itulah mengapa kami menyediakan jackpot slot maxwin yang sering untuk memenuhi harapan dan keinginan Anda.   Kesimpulan OLXTOTO adalah situs slot gacor terbaik yang memberikan pengalaman bermain judi slot online yang tak terlupakan. Dengan variasi slot online terlengkap dan peluang memenangkan jackpot slot maxwin yang sering, OLXTOTO menjadi pilihan terbaik bagi para pemain yang mencari kesenangan dan kemenangan besar dalam perjudian online. Di samping itu, OLXTOTO juga menawarkan layanan pelanggan yang ramah dan responsif, siap membantu setiap pemain dalam mengatasi masalah teknis atau pertanyaan seputar perjudian online. Kami menjaga integritas game dan memberikan lingkungan bermain yang adil serta menjalankan kebijakan perlindungan pelanggan yang cermat. Bergabunglah dengan OLXTOTO sekarang dan nikmati pengalaman bermain slot online yang luar biasa. Jadilah bagian dari komunitas perjudian yang mengagumkan ini dan raih kesempatan untuk meraih kemenangan besar. Dapatkan akses mudah dan praktis ke situs OLXTOTO dan rasakan sensasi bermain judi slot yang tak terlupakan.  
    • OLXTOTO: Platform Maxwin dan Gacor Terbesar Sepanjang Masa Di dunia perjudian online yang begitu kompetitif, mencari platform yang dapat memberikan kemenangan maksimal (Maxwin) dan hasil terbaik (Gacor) adalah prioritas bagi para penjudi yang cerdas. Dalam upaya ini, OLXTOTO telah muncul sebagai pemain kunci yang mengubah lanskap perjudian online dengan menawarkan pengalaman tanpa tandingan.     Sejak diluncurkan, OLXTOTO telah menjadi sorotan industri perjudian online. Dikenal sebagai "Platform Maxwin dan Gacor Terbesar Sepanjang Masa", OLXTOTO telah menarik perhatian pemain dari seluruh dunia dengan reputasinya yang solid dan kinerja yang luar biasa. Salah satu fitur utama yang membedakan OLXTOTO dari pesaingnya adalah komitmen mereka untuk memberikan pengalaman berjudi yang unik dan memuaskan. Dengan koleksi game yang luas dan beragam, termasuk togel, slot online, live casino, dan banyak lagi, OLXTOTO menawarkan sesuatu untuk semua orang. Dibangun dengan teknologi terkini dan didukung oleh tim ahli yang berdedikasi, platform ini memastikan bahwa setiap pengalaman berjudi di OLXTOTO tidak hanya menghibur, tetapi juga menguntungkan. Namun, keunggulan OLXTOTO tidak hanya terletak pada permainan yang mereka tawarkan. Mereka juga terkenal karena keamanan dan keadilan yang mereka berikan kepada para pemain mereka. Dengan sistem keamanan tingkat tinggi dan audit rutin yang dilakukan oleh otoritas regulasi independen, para pemain dapat yakin bahwa setiap putaran permainan di OLXTOTO adalah adil dan transparan. Tidak hanya itu, OLXTOTO juga dikenal karena layanan pelanggan yang luar biasa. Dengan tim dukungan yang ramah dan responsif, para pemain dapat yakin bahwa setiap pertanyaan atau masalah mereka akan ditangani dengan cepat dan efisien. Dengan semua fitur dan keunggulan yang ditawarkannya, tidak mengherankan bahwa OLXTOTO telah menjadi platform pilihan bagi para penjudi online yang mencari kemenangan maksimal dan hasil terbaik. Jadi, jika Anda ingin bergabung dengan jutaan pemain yang telah merasakan keajaiban OLXTOTO, jangan ragu untuk mendaftar dan mulai bermain hari ini!  
  • Topics

×
×
  • Create New...

Important Information

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