You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes I checked without Lithium it doesn't crush. I only have Nukacraft and it's 2 dependencies installed (GeckoLib and NTGL) and only when I add Lithium it starts crushing
Hi @Jetug! We hit the same crash on our NeoForge 1.21.1 server pack and I dug into it a bit — the evidence points to a slot-count mismatch in the chassis menu itself rather than Lithium. Sharing in case it saves you some time:
What the crash actually is
The client dies while applying a container_set_content packet:
java.lang.ArrayIndexOutOfBoundsException: Index 7 out of bounds for length 7
at NonNullList.set → SimpleContainer.setItem → Slot.set
at AbstractContainerMenu.initializeContents
at ClientPacketListener.handleContainerContent
That is vanilla container sync writing an item into chassis slot #7 of a 7-slot container. Lithium's mixins only show up in the frame annotations (pl:mixin:APP:lithium.mixins.json:...) because they patch NonNullList/AbstractContainerMenu — the failing write itself is unpatched vanilla logic with no length check.
The mismatch (from the menu code you attached)
Server side, ChassisMenu wraps the live chassis.inventory as the menu container, and that inventory is sized from the chassis config. In our case the power armor frame resolves to 8 slots (part ids 0–7).
Client side, PowerArmorMenu's network constructor hard-codes the backing container: new SimpleContainer(SIZE) with SIZE = 7, and createSlots() only adds the 7 armor-part slots — with one of them (fusion core, id 7) landing past the end of that 7-slot container. Meanwhile createSlot silently skips any part whose getId(...) returns null, so the client slot set can also diverge from the server's without any log line.
Net effect: the server syncs 8 chassis slots, the client container only has 7, and vanilla's sync has no length validation → the crash you saw.
Why it looks Lithium-related
Honestly I'm not 100% sure why your repro needed Lithium — a 7-vs-8 mismatch like this should crash on vanilla too, since broadcastFullState runs on menu open either way. Lithium may only change when the full sync packet gets sent. Worth a quick re-test without it; I suspect it reproduces either way and Lithium just got blamed for being in the stack trace.
Suggested fix direction (NukaCraft / chassis_core side)
Don't hard-code SIZE = 7 on the client — send the resolved inventory size (or the part→index map) through the FriendlyByteBuf extraData so both sides wrap identically-sized containers, or
Build both menus from the same deterministic part list, and
Log instead of silently skipping in createSlot when a part id is missing.
Happy to test a dev build — our pack runs NukaCraft 1.19.10-alpha, NTGL 3.2.0, Lithium 0.15.4, NeoForge 21.1.248. Thanks for the great mod!
Activity
2No2Name commentedon Jul 29, 2026
From the log it is unclear why lithium should be causing this packet handling. Have you confirmed this does not happen without lithium?
Jetug commentedon Jul 29, 2026
Yes I checked without Lithium it doesn't crush. I only have Nukacraft and it's 2 dependencies installed (GeckoLib and NTGL) and only when I add Lithium it starts crushing
E-R-Butch commentedon Sep 28, 2026
Hi @Jetug! We hit the same crash on our NeoForge 1.21.1 server pack and I dug into it a bit — the evidence points to a slot-count mismatch in the chassis menu itself rather than Lithium. Sharing in case it saves you some time:
What the crash actually is
The client dies while applying a
container_set_contentpacket:That is vanilla container sync writing an item into chassis slot #7 of a 7-slot container. Lithium's mixins only show up in the frame annotations (
pl:mixin:APP:lithium.mixins.json:...) because they patchNonNullList/AbstractContainerMenu— the failing write itself is unpatched vanilla logic with no length check.The mismatch (from the menu code you attached)
ChassisMenuwraps the livechassis.inventoryas the menu container, and that inventory is sized from the chassis config. In our case the power armor frame resolves to 8 slots (part ids 0–7).PowerArmorMenu's network constructor hard-codes the backing container:new SimpleContainer(SIZE)withSIZE = 7, andcreateSlots()only adds the 7 armor-part slots — with one of them (fusion core, id 7) landing past the end of that 7-slot container. MeanwhilecreateSlotsilently skips any part whosegetId(...)returns null, so the client slot set can also diverge from the server's without any log line.Why it looks Lithium-related
Honestly I'm not 100% sure why your repro needed Lithium — a 7-vs-8 mismatch like this should crash on vanilla too, since
broadcastFullStateruns on menu open either way. Lithium may only change when the full sync packet gets sent. Worth a quick re-test without it; I suspect it reproduces either way and Lithium just got blamed for being in the stack trace.Suggested fix direction (NukaCraft / chassis_core side)
SIZE = 7on the client — send the resolved inventory size (or the part→index map) through theFriendlyByteBufextraData so both sides wrap identically-sized containers, orcreateSlotwhen a part id is missing.Happy to test a dev build — our pack runs NukaCraft 1.19.10-alpha, NTGL 3.2.0, Lithium 0.15.4, NeoForge 21.1.248. Thanks for the great mod!