The Vanilla Experience (Mod) (Forge)

The Vanilla Experience (Mod) (Forge)

118k Downloads

stack refill -- index -1 out of bounds

JesseRussell411 opened this issue ยท 2 comments

commented

Information

Minecraft version: 1.21.1
Modloader: Fabric
Fabric loader version: 0.16.10
Environment: Singleplayer

Mod name: stack refill
Mod version: 1.21.1-4.6

Description

I was throwing eggs, and the game crashed at the last one. I think I had more in my inventory.

Crash report

---- Minecraft Crash Report ----
// Don't do that.

Time: 2025-03-02 22:34:08
Description: Unexpected error

java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 10
	at java.base/java.util.ArrayList.add(ArrayList.java:484)
	at java.base/java.util.ArrayList.add(ArrayList.java:496)
	at knot//com.natamus.stackrefill_common_fabric.events.RefillEvent.onItemRightClick(RefillEvent.java:265)
	at knot//com.natamus.stackrefill.ModFabric.lambda$loadEvents$4(ModFabric.java:55)
	at knot//net.fabricmc.fabric.api.event.player.UseItemCallback.lambda$static$0(UseItemCallback.java:42)
	at knot//net.minecraft.class_636.handler$zmk000$fabric-events-interaction-v0$interactItem(class_636.java:1210)
	at knot//net.minecraft.class_636.method_2919(class_636.java:375)
	at knot//net.minecraft.class_310.method_1583(class_310.java:1872)
	at knot//net.minecraft.class_310.method_1508(class_310.java:2119)
	at knot//net.minecraft.class_310.method_1574(class_310.java:1938)
	at knot//net.minecraft.class_310.method_1523(class_310.java:1246)
	at knot//net.minecraft.class_310.method_1514(class_310.java:882)
	at knot//net.minecraft.client.main.Main.main(Main.java:256)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)


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

-- Head --
Thread: Render thread
Stacktrace:
	at java.base/java.util.ArrayList.add(ArrayList.java:484)
	at java.base/java.util.ArrayList.add(ArrayList.java:496)
	at knot//com.natamus.stackrefill_common_fabric.events.RefillEvent.onItemRightClick(RefillEvent.java:265)
	at knot//com.natamus.stackrefill.ModFabric.lambda$loadEvents$4(ModFabric.java:55)
	at knot//net.fabricmc.fabric.api.event.player.UseItemCallback.lambda$static$0(UseItemCallback.java:42)
	at knot//net.minecraft.class_636.handler$zmk000$fabric-events-interaction-v0$interactItem(class_636.java:1210)
	at knot//net.minecraft.class_636.method_2919(class_636.java:375)
	at knot//net.minecraft.class_310.method_1583(class_310.java:1872)
	at knot//net.minecraft.class_310.method_1508(class_310.java:2119)

-- Uptime --
Details:
	JVM uptime: 2712.024s
	Wall uptime: 2701.931s
	High-res time: 2698.704s
	Client ticks: 53770 ticks / 2688.500s
Stacktrace:
	at knot//net.minecraft.class_310.method_1587(class_310.java:2501)
	at knot//net.minecraft.class_310.method_54580(class_310.java:949)
	at knot//net.minecraft.class_310.method_1514(class_310.java:905)
	at knot//net.minecraft.client.main.Main.main(Main.java:256)
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

-- Affected level --
Details:
	All players: 1 total; [class_746['playerinfinity'/71, l='ClientLevel', x=-107.30, y=70.00, z=-1275.70]]
	Chunk stats: 361, 201
	Level dimension: minecraft:overworld
	Level spawn location: World: (144,71,0), Section: (at 0,7,0 in 9,4,0; chunk contains blocks 144,-64,0 to 159,319,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,-64,0 to 511,319,511)
	Level time: 6518444 game time, 1838699 day time
	Server brand: fabric
	Server type: Integrated singleplayer server
	Tracked entity count: 1606

-- Last reload --
Details:
	Reload number: 1
	Reload reason: initial
	Finished: Yes
	Packs: vanilla, fabric, alternate-current, badoptimizations, bagofholding, chunky, cloth-config, constantmusic, controlify, controlling, distanthorizons, eatinganimationid, entityculling, fabric-api, fabric-api-base, fabric-api-lookup-api-v1, fabric-biome-api-v1, fabric-block-api-v1, fabric-block-view-api-v2, fabric-blockrenderlayer-v1, fabric-client-tags-api-v1, fabric-command-api-v1, fabric-command-api-v2, fabric-commands-v0, fabric-content-registries-v0, fabric-convention-tags-v1, fabric-convention-tags-v2, fabric-crash-report-info-v1, fabric-data-attachment-api-v1, fabric-data-generation-api-v1, fabric-dimensions-v1, fabric-entity-events-v1, fabric-events-interaction-v0, fabric-game-rule-api-v1, fabric-item-api-v1, fabric-item-group-api-v1, fabric-key-binding-api-v1, fabric-keybindings-v0, fabric-lifecycle-events-v1, fabric-loot-api-v2, fabric-loot-api-v3, fabric-message-api-v1, fabric-model-loading-api-v1, fabric-networking-api-v1, fabric-object-builder-api-v1, fabric-particles-v1, fabric-recipe-api-v1, fabric-registry-sync-v0, fabric-renderer-api-v1, fabric-renderer-indigo, fabric-renderer-registries-v1, fabric-rendering-data-attachment-v1, fabric-rendering-fluids-v1, fabric-rendering-v0, fabric-rendering-v1, fabric-resource-conditions-api-v1, fabric-resource-loader-v0, fabric-screen-api-v1, fabric-screen-handler-api-v1, fabric-sound-api-v1, fabric-transfer-api-v1, fabric-transitive-access-wideners-v1, fabricloader, firstperson, forgeconfigapiport, freecam, iris, iteminteractions, kanos_config, lithium, modernfix, noclip, noisium, notenoughanimations, pehkui, personalplayer, purediscstrailstales, purediscstrickytrials, realisticbees, searchables, shouldersurfing, sodium, vanillazoom, worldedit, yet_another_config_lib_v3, minecraft:supporteatinganimation, programmer_art, sodium_programmer_art, file/classical-style-v1-4-4.zip

-- System Details --
Details:
	Minecraft Version: 1.21.1
	Minecraft Version ID: 1.21.1
	Operating System: Windows 11 (amd64) version 10.0
	Java Version: 21.0.3, Microsoft
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft
	Memory: 316150512 bytes (301 MiB) / 3523215360 bytes (3360 MiB) up to 4294967296 bytes (4096 MiB)
	CPUs: 16
	Processor Vendor: AuthenticAMD
	Processor Name: AMD Ryzen 7 5700                               
	Identifier: AuthenticAMD Family 25 Model 80 Stepping 0
	Microarchitecture: Zen 3
	Frequency (GHz): 3.69
	Number of physical packages: 1
	Number of physical CPUs: 8
	Number of logical CPUs: 16
	Graphics card #0 name: NVIDIA GeForce RTX 3080 Ti
	Graphics card #0 vendor: NVIDIA
	Graphics card #0 VRAM (MiB): 12288.00
	Graphics card #0 deviceId: VideoController1
	Graphics card #0 versionInfo: 32.0.15.6094
	Graphics card #1 name: NVIDIA GeForce RTX 3080 Ti
	Graphics card #1 vendor: NVIDIA
	Graphics card #1 VRAM (MiB): 12288.00
	Graphics card #1 deviceId: VideoController2
	Graphics card #1 versionInfo: 32.0.15.6094
	Memory slot #0 capacity (MiB): 32768.00
	Memory slot #0 clockSpeed (GHz): 2.13
	Memory slot #0 type: DDR4
	Memory slot #1 capacity (MiB): 32768.00
	Memory slot #1 clockSpeed (GHz): 2.13
	Memory slot #1 type: DDR4
	Memory slot #2 capacity (MiB): 32768.00
	Memory slot #2 clockSpeed (GHz): 2.13
	Memory slot #2 type: DDR4
	Memory slot #3 capacity (MiB): 32768.00
	Memory slot #3 clockSpeed (GHz): 2.13
	Memory slot #3 type: DDR4
	Virtual memory max (MiB): 139157.13
	Virtual memory used (MiB): 48231.83
	Swap memory total (MiB): 8192.00
	Swap memory used (MiB): 37.51
	Space in storage for jna.tmpdir (MiB): available: 772825.38, total: 3814561.00
	Space in storage for org.lwjgl.system.SharedLibraryExtractPath (MiB): available: 772825.38, total: 3814561.00
	Space in storage for io.netty.native.workdir (MiB): available: 772825.38, total: 3814561.00
	Space in storage for java.io.tmpdir (MiB): available: 772825.38, total: 3814561.00
	Space in storage for workdir (MiB): available: 772825.38, total: 3814561.00
	JVM Flags: 4 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx4096m -Xms256m
	Fabric Mods: 
		alternate-current: Alternate Current 1.9.0
		atg: Attack Through Grass 2.0.1
		badoptimizations: BadOptimizations 2.2.1
		bagofholding: Bag Of Holding 21.1.0
			iteminteractions: Item Interactions 21.1.0
		betteranimationscollection: Better Animations Collection 21.1.0
		chunky: Chunky 1.4.16
		collective: Collective 7.93
		configurabledespawntimer: Configurable Despawn Timer 4.3
		constantmusic: Constant Music 1.0.5
		controlify: Controlify 2.0.2+1.21-fabric
			mixinextras: MixinExtras 0.5.0-beta.4
		controlling: Controlling 19.0.4
		cyclepaintings: Cycle Paintings 3.7
		deathbackup: Death Backup 3.5
		despawningeggshatch: Despawning Eggs Hatch 4.5
		distanthorizons: Distant Horizons 2.2.1-a
			fabric-api-base: Fabric API Base 0.4.42+6573ed8c90
			fabric-key-binding-api-v1: Fabric Key Binding API (v1) 1.0.47+0af3f5a790
		eatinganimationid: Eating Animation 1.21+1.9.72
		edibles: Edibles 4.5
		entityculling: EntityCulling 1.7.2
		extractpoison: Extract Poison 3.5
		fabric-api: Fabric API 0.115.1+1.21.1
			fabric-api-lookup-api-v1: Fabric API Lookup API (v1) 1.6.70+b559734419
			fabric-biome-api-v1: Fabric Biome API (v1) 13.0.31+d527f9fd19
			fabric-block-api-v1: Fabric Block API (v1) 1.0.22+0af3f5a719
			fabric-block-view-api-v2: Fabric BlockView API (v2) 1.0.10+6573ed8c19
			fabric-blockrenderlayer-v1: Fabric BlockRenderLayer Registration (v1) 1.1.52+0af3f5a719
			fabric-client-tags-api-v1: Fabric Client Tags 1.1.15+6573ed8c19
			fabric-command-api-v1: Fabric Command API (v1) 1.2.49+f71b366f19
			fabric-command-api-v2: Fabric Command API (v2) 2.2.28+6ced4dd919
			fabric-commands-v0: Fabric Commands (v0) 0.2.66+df3654b319
			fabric-content-registries-v0: Fabric Content Registries (v0) 8.0.18+b559734419
			fabric-convention-tags-v1: Fabric Convention Tags 2.1.3+7f945d5b19
			fabric-convention-tags-v2: Fabric Convention Tags (v2) 2.10.0+9465b64419
			fabric-crash-report-info-v1: Fabric Crash Report Info (v1) 0.2.29+0af3f5a719
			fabric-data-attachment-api-v1: Fabric Data Attachment API (v1) 1.4.1+9ed317f519
			fabric-data-generation-api-v1: Fabric Data Generation API (v1) 20.2.26+16c4ae2519
			fabric-dimensions-v1: Fabric Dimensions API (v1) 4.0.0+6fc22b9919
			fabric-entity-events-v1: Fabric Entity Events (v1) 1.7.0+2122d82819
			fabric-events-interaction-v0: Fabric Events Interaction (v0) 0.7.13+ba9dae0619
			fabric-game-rule-api-v1: Fabric Game Rule API (v1) 1.0.53+6ced4dd919
			fabric-item-api-v1: Fabric Item API (v1) 11.1.1+d5debaed19
			fabric-item-group-api-v1: Fabric Item Group API (v1) 4.1.6+6823f7cd19
			fabric-keybindings-v0: Fabric Key Bindings (v0) 0.2.45+df3654b319
			fabric-lifecycle-events-v1: Fabric Lifecycle Events (v1) 2.5.0+01d9a51c19
			fabric-loot-api-v2: Fabric Loot API (v2) 3.0.15+3f89f5a519
			fabric-loot-api-v3: Fabric Loot API (v3) 1.0.3+3f89f5a519
			fabric-message-api-v1: Fabric Message API (v1) 6.0.13+6573ed8c19
			fabric-model-loading-api-v1: Fabric Model Loading API (v1) 2.0.0+fe474d6b19
			fabric-networking-api-v1: Fabric Networking API (v1) 4.3.0+c7469b2119
			fabric-object-builder-api-v1: Fabric Object Builder API (v1) 15.2.1+40875a9319
			fabric-particles-v1: Fabric Particles (v1) 4.0.2+6573ed8c19
			fabric-recipe-api-v1: Fabric Recipe API (v1) 5.0.14+248df81c19
			fabric-registry-sync-v0: Fabric Registry Sync (v0) 5.2.0+34f5d91419
			fabric-renderer-api-v1: Fabric Renderer API (v1) 3.4.0+c705a49c19
			fabric-renderer-indigo: Fabric Renderer - Indigo 1.7.0+c705a49c19
			fabric-renderer-registries-v1: Fabric Renderer Registries (v1) 3.2.68+df3654b319
			fabric-rendering-data-attachment-v1: Fabric Rendering Data Attachment (v1) 0.3.48+73761d2e19
			fabric-rendering-fluids-v1: Fabric Rendering Fluids (v1) 3.1.6+1daea21519
			fabric-rendering-v0: Fabric Rendering (v0) 1.1.71+df3654b319
			fabric-rendering-v1: Fabric Rendering (v1) 5.0.5+df16efd019
			fabric-resource-conditions-api-v1: Fabric Resource Conditions API (v1) 4.3.0+8dc279b119
			fabric-resource-loader-v0: Fabric Resource Loader (v0) 1.3.1+5b5275af19
			fabric-screen-api-v1: Fabric Screen API (v1) 2.0.25+8b68f1c719
			fabric-screen-handler-api-v1: Fabric Screen Handler API (v1) 1.3.88+b559734419
			fabric-sound-api-v1: Fabric Sound API (v1) 1.0.23+6573ed8c19
			fabric-transfer-api-v1: Fabric Transfer API (v1) 5.4.2+c24bd99419
			fabric-transitive-access-wideners-v1: Fabric Transitive Access Wideners (v1) 6.2.0+45b9699719
		fabricloader: Fabric Loader 0.16.10
		firstperson: FirstPerson 2.4.8
		fishontheline: Fish On The Line 3.5
		followersteleporttoo: Followers Teleport Too 2.7
		forgeconfigapiport: Forge Config API Port 21.1.3
			com_electronwill_night-config_core: core 3.8.0
			com_electronwill_night-config_toml: toml 3.8.0
		freecam: Freecam (Modrinth Edition) 1.3.0+mc1.21
		furnacerecycle: Furnace Recycle 2.5
		grassseeds: Grass Seeds 3.4
		inventorytotem: Inventory Totem 3.4
		iris: Iris 1.8.8+mc1.21.1
			io_github_douira_glsl-transformer: glsl-transformer 2.0.1
			org_anarres_jcpp: jcpp 1.4.14
			org_antlr_antlr4-runtime: antlr4-runtime 4.13.1
		java: OpenJDK 64-Bit Server VM 21
		lithium: Lithium 0.14.8+mc1.21.1
		minecraft: Minecraft 1.21.1
		mineralchance: Mineral Chance 3.8
		modernfix: ModernFix 5.20.2+mc1.21.1
		moveboats: Move Boats 3.5
		moveminecarts: Move Minecarts 3.7
		no-double-tap-sprint: Disable Double Tap to Sprint 1.0.0
		no-telemetry: No Telemetry 1.9.0
		noclip: noclip 1.3.2+1.21-fabric
			cloth-config: Cloth Config v15 15.0.140
				cloth-basic-math: cloth-basic-math 0.6.1
		noisium: Noisium 2.3.0+mc1.21-1.21.1
		notenoughanimations: NotEnoughAnimations 1.9.2
		nutritiousmilk: Nutritious Milk 3.5
		pehkui: Pehkui 3.8.3+1.14.4-1.21
			kanos_config: Kanos Config 0.4.1+1.14.4-1.19.4
		personalplayer: Personal Disc Player 1.21-1.2.1
		purediscstrailstales: Pure Discs - Trails & Tales 2.0.1
		purediscstrickytrials: Pure Discs - Tricky Trials 2.0.0
		puzzleslib: Puzzles Lib 21.1.27
		realisticbees: Realistic Bees 4.1
		recast: Recast 3.6
		searchables: Searchables 1.0.2
		shouldersurfing: Shoulder Surfing Reloaded 4.9.2
		sodium: Sodium 0.6.9+mc1.21.1
		stackrefill: Stack Refill 4.6
		treeharvester: Tree Harvester 9.1
		vanillazoom: Vanilla Zoom 2.8
		weakerspiderwebs: Weaker Spiderwebs 3.8
		worldedit: WorldEdit 7.3.8+6939-7d32b45
		yet_another_config_lib_v3: YetAnotherConfigLib 3.6.2+1.21-fabric
			com_twelvemonkeys_common_common-image: common-image 3.12.0
			com_twelvemonkeys_common_common-io: common-io 3.12.0
			com_twelvemonkeys_common_common-lang: common-lang 3.12.0
			com_twelvemonkeys_imageio_imageio-core: imageio-core 3.12.0
			com_twelvemonkeys_imageio_imageio-metadata: imageio-metadata 3.12.0
			com_twelvemonkeys_imageio_imageio-webp: imageio-webp 3.12.0
			org_quiltmc_parsers_gson: gson 0.2.1
			org_quiltmc_parsers_json: json 0.2.1
	Loaded Shaderpack: BSL_v8.4.02.1.zip
		Profile: HIGH (+2 options changed by user)
	Launched Version: fabric-loader-0.16.10-1.21.1
	Launcher name: minecraft-launcher
	Backend library: LWJGL version 3.3.3-snapshot
	Backend API: NVIDIA GeForce RTX 3080 Ti/PCIe/SSE2 GL version 3.2.0 NVIDIA 560.94, NVIDIA Corporation
	Window size: 2560x1351
	GFLW Platform: win32
	GL Caps: Using framebuffer using OpenGL 3.2
	GL debug messages: 
	Is Modded: Definitely; Client brand changed to 'fabric'; Server brand changed to 'fabric'
	Universe: 400921fb54442d18
	Type: Integrated Server (map_client.txt)
	Graphics mode: fancy
	Render Distance: 6/6 chunks
	Resource Packs: vanilla, fabric, alternate-current, badoptimizations (incompatible), bagofholding, chunky, cloth-config, constantmusic (incompatible), controlify, controlling (incompatible), distanthorizons (incompatible), eatinganimationid, entityculling, fabric-api, fabric-api-base, fabric-api-lookup-api-v1, fabric-biome-api-v1, fabric-block-api-v1, fabric-block-view-api-v2, fabric-blockrenderlayer-v1, fabric-client-tags-api-v1, fabric-command-api-v1, fabric-command-api-v2, fabric-commands-v0, fabric-content-registries-v0, fabric-convention-tags-v1, fabric-convention-tags-v2, fabric-crash-report-info-v1, fabric-data-attachment-api-v1, fabric-data-generation-api-v1, fabric-dimensions-v1, fabric-entity-events-v1, fabric-events-interaction-v0, fabric-game-rule-api-v1, fabric-item-api-v1, fabric-item-group-api-v1, fabric-key-binding-api-v1, fabric-keybindings-v0, fabric-lifecycle-events-v1, fabric-loot-api-v2, fabric-loot-api-v3, fabric-message-api-v1, fabric-model-loading-api-v1, fabric-networking-api-v1, fabric-object-builder-api-v1, fabric-particles-v1, fabric-recipe-api-v1, fabric-registry-sync-v0, fabric-renderer-api-v1, fabric-renderer-indigo, fabric-renderer-registries-v1, fabric-rendering-data-attachment-v1, fabric-rendering-fluids-v1, fabric-rendering-v0, fabric-rendering-v1, fabric-resource-conditions-api-v1, fabric-resource-loader-v0, fabric-screen-api-v1, fabric-screen-handler-api-v1, fabric-sound-api-v1, fabric-transfer-api-v1, fabric-transitive-access-wideners-v1, fabricloader, firstperson, forgeconfigapiport, freecam, iris, iteminteractions, kanos_config, lithium, modernfix (incompatible), noclip, noisium, notenoughanimations, pehkui, personalplayer, purediscstrailstales, purediscstrickytrials, realisticbees (incompatible), searchables (incompatible), shouldersurfing, sodium, vanillazoom (incompatible), worldedit (incompatible), yet_another_config_lib_v3 (incompatible), minecraft:supporteatinganimation, programmer_art, sodium_programmer_art, file/classical-style-v1-4-4.zip (incompatible)
	Current Language: en_us
	Locale: en_US
	System encoding: Cp1252
	File encoding: UTF-8
	CPU: 16x AMD Ryzen 7 5700 
	Server Running: true
	Player Count: 1 / 8; [class_3222['playerinfinity'/71, l='ServerLevel[A whole new world!]', x=-107.30, y=70.00, z=-1275.70]]
	Active Data Packs: vanilla, fabric, bagofholding (incompatible), collective, fabric-convention-tags-v2, furnacerecycle, personalplayer, purediscstrailstales, purediscstrickytrials
	Available Data Packs: bagofholding (incompatible), bundle, collective, fabric, fabric-convention-tags-v2, furnacerecycle, personalplayer, purediscstrailstales, purediscstrickytrials, trade_rebalance, vanilla
	Enabled Feature Flags: minecraft:vanilla
	World Generation: Stable
	World Seed: -4724945035044309629
commented

If i had to guess, I'd say this was caused by writing to the array from multiple threads at the same time. I don't know how else you get an index out of bounds error in the add method.