Jump to content

Recommended Posts

Posted

My game crashes whenever I click on a inventory slot of any time(custom or other)

 

Crash Report

---- Minecraft Crash Report ----
// Would you like a cupcake?

Time: 4/27/16 6:55 PM
Description: Ticking memory connection

java.lang.IndexOutOfBoundsException: Index: 59, Size: 45
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at net.minecraft.inventory.Container.slotClick(Container.java:300)
at net.minecraft.network.NetHandlerPlayServer.processClickWindow(NetHandlerPlayServer.java:955)
at net.minecraft.network.play.client.C0EPacketClickWindow.processPacket(C0EPacketClickWindow.java:41)
at net.minecraft.network.play.client.C0EPacketClickWindow.processPacket(C0EPacketClickWindow.java:113)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Stacktrace:
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at net.minecraft.inventory.Container.slotClick(Container.java:300)
at net.minecraft.network.NetHandlerPlayServer.processClickWindow(NetHandlerPlayServer.java:955)
at net.minecraft.network.play.client.C0EPacketClickWindow.processPacket(C0EPacketClickWindow.java:41)
at net.minecraft.network.play.client.C0EPacketClickWindow.processPacket(C0EPacketClickWindow.java:113)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:241)

-- Ticking connection --
Details:
Connection: net.minecraft.network.NetworkManager@5df2deb8
Stacktrace:
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:726)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:614)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:485)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:752)

-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 10 (amd64) version 10.0
Java Version: 1.8.0_74, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 867235496 bytes (827 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.99.99 Minecraft Forge 10.13.4.1558 4 mods loaded, 4 mods active
States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
UCHIJAAAA	mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) 
UCHIJAAAA	FML{7.10.99.99} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
UCHIJAAAA	Forge{10.13.4.1558} [Minecraft Forge] (forgeSrc-1.7.10-10.13.4.1558-1.7.10.jar) 
UCHIJAAAA	ac{1.5.7} [Acsension] (bin) 
GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
Profiler Position: N/A (disabled)
Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Player Count: 1 / 8; [EntityPlayerMP['Player935'/331, l='New World', x=989.63, y=4.00, z=-783.32]]
Type: Integrated Server (map_client.txt)
Is Modded: Definitely; Client brand changed to 'fml,forge'

 

Container Class

package neg2013.acsension.inventory;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import neg2013.acsension.slot.CrusherInputSlot;
import neg2013.acsension.slot.CrusherOutputSlot;
import neg2013.acsension.slot.GenericSlot;
import neg2013.acsension.tile_entity.TECrusher;
import neg2013.acsension.tile_entity.TEDecomp;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;

public class DecompContainer extends Container{

private TEDecomp decomp;
private int slotId = -1;



private int nextId(){
	slotId++;
	return slotId;
}

public DecompContainer(InventoryPlayer invPlayer, TEDecomp decomp){

	this.decomp = decomp;



	// player inv
	//hot bar
	for(int x = 0; x < 9; x++){
		addSlotToContainer(new Slot(invPlayer, x, 8 + (18 * x), 146));
	}

	for(int x = 0; x < 9; x++){
		for(int y = 0; y < 3; y++){
			addSlotToContainer(new Slot(invPlayer, x + y * 9 + 9, 8 + 18 * x, 88 + 18 * y));

			addSlotToContainer(new GenericSlot(decomp, nextId(), 80, 15));			
			addSlotToContainer(new GenericSlot(decomp, nextId(), 60, 64));			
			addSlotToContainer(new GenericSlot(decomp, nextId(), 80, 64));			
			addSlotToContainer(new GenericSlot(decomp, nextId(), 100, 64));			


		}

	}
	// player inv

}






@Override
public boolean canInteractWith(EntityPlayer player) {

	return true;
}



}

 

Please just ask if youd like to see any other classes

Posted
addSlotToContainer(new GenericSlot(decomp, nextId(), 80, 15));

 

Oh god, ew.  This isn't that hard to math.

 

(x + y * 9) * 4 + n

where

n

is 0,1,2,3 depending on which of those four slots.

 

Also.  All of those slots are added to the same XY coordinates so they'd stack on top of each other and only the top 4 will be usable.

 

It also appears that your TE only has 45 slots and you're creating 84 slots.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

that bit of code does not draw them on top it draws them above so it makes the inventory I think

 

and how are there 80+ slots?

You add 5 slots per iteration of your for loops, and your for loops result in 27 iterations. 27 * 5 = 135 slots, plus the 8 you added for the hot bar. Move the 4 static (as in their position, not the Java keyword) slots outside of the loop:

for (int x = 0; x < 9; x++) {
	for (int y = 0; y < 3; y++) {
		// this line covers the regular player inventory
		addSlotToContainer(new Slot(invPlayer, x + y * 9 + 9, 8 + 18 * x, 88 + 18 * y));
		// and these 4 slots are added 27 times to the exact same location with a different id each time...
		//addSlotToContainer(new GenericSlot(decomp, nextId(), 80, 15));	
		//addSlotToContainer(new GenericSlot(decomp, nextId(), 60, 64));	
		//addSlotToContainer(new GenericSlot(decomp, nextId(), 80, 64));	
		//addSlotToContainer(new GenericSlot(decomp, nextId(), 100, 64));
}	
}
// moved outside of the loop they will work just fine
addSlotToContainer(new GenericSlot(decomp, nextId(), 80, 15));	
addSlotToContainer(new GenericSlot(decomp, nextId(), 60, 64));	
addSlotToContainer(new GenericSlot(decomp, nextId(), 80, 64));	
addSlotToContainer(new GenericSlot(decomp, nextId(), 100, 64));

Posted

I actually realized that and moved them this morning but it still has bugs like

 

you cant pick up a stack

 

if you pick it up using mouse wheel on creative you start being able to move the stacks around like a normal gui but after a few seconds the stacks start glitching around then it stops working again and then if you try to move them again using middle wheel it crashes

 

so ya its messed up

Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • I need to know what mod is doing this crash, i mean the mod xenon is doing the crash but i want to know who mod is incompatible with xenon, but please i need to know a solution if i need to replace xenon, i cant use optifine anymore and all the other mods i tried(sodium, lithium, vulkan, etc) doesn't work, it crash the game.
    • I have been trying to solve a consistent crashing issue on my brother's computer where it will crash during the "Scanning Mod Candidates" phase of the loading process that starts when you click the play button on the Minecraft launcher. The issue seems to stem from a missing library that it mentions in the log file I provide below. I might I'm missing the bigger issue here for a smaller one but hopefully someone can find what I'm missing. Here's all of the stuff that I've been able to figure out so far: 1. It has nothing to do with mods, the crash happened with a real modpack, and even when I made a custom modpack and launched it without putting ANY mods into it (That is where the log file comes from by the way). 2. I have tried to find this class like a file in the Minecraft folders, but I've had no luck finding it (I don't think it works like that, but since I really don't understand how it works, I just figured I'd try). 3. I haven't seen anyone else have this issue before. 4. I know that my modpack (with mods) does work since I've run it on my computer, and it works fantastic. For some reason my brother's computer can't seem to run anything through curseforge. 5. This is for Minecraft version 1.20.1, Minecraft launcher version 3.4.50-2.1.3, forge 47.3.0, and curseforge app version 1.256.0.21056 6. My brother is using a Dell laptop from 6 years ago running Windows 10 (If you think more info on this would help, please ask as I do have it. I'm just choosing not to put it here for now). 7. I have reinstalled the curseforge app and installed Minecraft version 1.20.1. I have not reinstalled Minecraft or forge 47.3.0 but I didn't know if that would help. 8. I had an error code of 1 Please let me know if there is anything else that I am missing that you would like me to add to this post/add in a comment! Lastly, many thanks in advance to whoever can help! ------------- LOG FILE (latest.log) ------------- (from /Users/<NAME OF USER>/cursforge/minecraft/Instances/<THE NAME OF MY EMPTY MODPACK>/logs/latest.log) (This was made after running an empty modpack with same versions for all apps) ("[REDACTED]" is not the actual text from the log, it is me replacing text I figured wouldn't be necessary for fixing and would hurt my privacy) https://pastebin.com/hxXvGGEK ------------- DEBUG.LOG (I realized that I should have put this here first after I had done all of the work on putting latest.log in) -------------------- (again, "[REDACTED]" is not the actual text from the log, it is me replacing text I figured wouldn't be necessary for fixing and would hurt my privacy) https://pastebin.com/Fmh8GHYs
    • Pastebin... https://pastebin.com/Y3iZ85L5   Brand new profile, does not point to a mod as far as I can tell, my fatal message just has something about mixins. Don't know much about reading logs like this, but am genuinely stuck, please help. Java updated, pc restarted.
    • I was playing minecraft, forge 47.3.0 and 1.20.1, but when i tried to play minecraft now only crashes, i need help please. here is the crash report: https://securelogger.net/files/e6640a4f-9ed0-4acc-8d06-2e500c77aaaf.txt
  • Topics

×
×
  • Create New...

Important Information

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