NullPointerException while loading StartingEquipmentPower
RaymondBlaze opened this issue ยท 0 comments
Hi there! I'm recently working on a forge port of Origins: Classes, and I found that Apoli could not load this power below properly:
{
"type": "apoli:starting_equipment",
"stacks": [
{
"item": "minecraft:compass"
},
{
"item": "minecraft:clock"
},
{
"item": "minecraft:map",
"amount": 9
}
]
}
A NullPointerException would be thrown as the player is about login to the world.
I read the stack trace and found the problem occurs while handling S2CLoginDynamicRegistriesPacket
, and debug run helped me to locate the problem in SerializableType: POSITIONED_ITEM_STACK
's field tag
. It seemed like there's something wrong with this Codec, causing it to pass a null value to the encoder. I'm not quite familiar with the Codec system, so I can't give a possible solution here ;)
I've tested it both in dev env and run env, with and without my mod didn't influence the result.