PneumaticCraft: Repressurized

PneumaticCraft: Repressurized

43M Downloads

Cannot open Amadron UI

HipHopHuman opened this issue ยท 10 comments

commented

Minecraft Version

1.16.5

Forge Version

36.2.4

Mod Version

1.16.5-2.14.3-251

Describe your problem, including steps to reproduce it

Preface: I'm fairly certain this isn't a common bug that you'll actually have to fix, because I was mucking around in KubeJS trying to add an Amadron trade and I somehow managed to "brick" my Amadron tablet. ๐Ÿ˜…

When I right click the Amadron tablet, nothing happens. The GUI doesn't open.

I was attempting to add an Amadron tablet trade, but got the syntax wrong. Ever since this happened, I have been unable to open the Amadron trade UI - a problem that unfortunately persists between /reloads, world restarts, world hops and game restarts. I think I corrupted some data somewhere, and am unable to restore the default Amadron behavior.

I have removed the problematic custom recipe as well, but the problem remains. Is there some way for me to factory reset my tablet? ๐Ÿ˜‚

The only helpful thing in the logs is this message each time I right click the tablet:

[08:55:11] [Server thread/FATAL] [minecraft/ThreadTaskExecutor]: Error executing task on Server
java.lang.NullPointerException: Cannot invoke "me.desht.pneumaticcraft.api.crafting.recipe.AmadronRecipe.getInput()" because "offer" is null
	at me.desht.pneumaticcraft.common.amadron.ShoppingBasket.cap(ShoppingBasket.java:109) ~[pneumaticcraft:1.16.5-2.14.3-251] {re:classloading}
	at me.desht.pneumaticcraft.common.inventory.ContainerAmadron.<init>(ContainerAmadron.java:109) ~[pneumaticcraft:1.16.5-2.14.3-251] {re:classloading}
	at me.desht.pneumaticcraft.common.item.ItemAmadronTablet$1.createMenu(ItemAmadronTablet.java:184) ~[pneumaticcraft:1.16.5-2.14.3-251] {re:classloading}
	at net.minecraftforge.fml.network.NetworkHooks.openGui(NetworkHooks.java:226) ~[forge:?] {re:classloading}
	at me.desht.pneumaticcraft.common.item.ItemAmadronTablet.openGui(ItemAmadronTablet.java:176) ~[pneumaticcraft:1.16.5-2.14.3-251] {re:classloading}
	at me.desht.pneumaticcraft.common.item.ItemAmadronTablet.func_77659_a(ItemAmadronTablet.java:52) ~[pneumaticcraft:1.16.5-2.14.3-251] {re:classloading}
	at net.minecraft.item.ItemStack.func_77957_a(ItemStack.java:217) ~[?:?] {re:mixin,re:classloading,xf:fml:forge:filled_map.4,xf:fml:forge:itemstack}
	at net.minecraft.server.management.PlayerInteractionManager.func_187250_a(PlayerInteractionManager.java:287) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:PlayerInteractionManagerMixin,pl:mixin:A}
	at net.minecraft.network.play.ServerPlayNetHandler.func_147346_a(ServerPlayNetHandler.java:982) ~[?:?] {re:classloading}
	at net.minecraft.network.play.client.CPlayerTryUseItemPacket.func_148833_a(SourceFile:31) ~[?:?] {re:classloading}
	at net.minecraft.network.play.client.CPlayerTryUseItemPacket.func_148833_a(SourceFile:9) ~[?:?] {re:classloading}
	at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) ~[?:?] {re:classloading}
	at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18) ~[?:?] {re:classloading}
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?] {re:mixin,re:computing_frames,re:classloading}
	at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:734) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
	at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:159) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:717) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
	at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:711) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213161_c(SourceFile:127) ~[?:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:697) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
	at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:646) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
	at net.minecraft.server.MinecraftServer.func_240783_a_(MinecraftServer.java:232) ~[?:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:kubejs-common.mixins.json:MinecraftServerMixin,pl:mixin:A}
	at java.lang.Thread.run(Thread.java:833) [?:?] {}

Any other comments?

Salmon tempura is delicious.

commented

Somehow you've managed to create an Amadron offer with a null input resource. Shouldn't be possible, though, since the deserializer for trade resources never returns null.

No idea why removing the recipe hasn't fixed it. Something must be corrupted somewhere. You haven't added anything to a custom datapack, or created a player offer (those are in your world save directory - the pneumaticcraft/AmadronPlayerOffers.cfg file) ?

commented

The .cfg file is empty, and there aren't any datapacks that were saved, but I'll keep poking around...

commented

So I've been combing through commits (I'm using Git to manage the pack assembly process) and there really are no persisted datapack changes. Idk what to do at this point so I'm just going to try deleting and re-installing PneumaticCraft, lol.

commented

Weirdly enough the problem just went away on it's own after a few hours.

commented

...and now the issue is back after a few hours and no changes. I'm so confused

EDIT: I just used grep to find any folder or file with pneumaticcraft in the name and deleted it, reinstalled the mod and now all seems to be in order... I hope.
EDIT 2: Problem came back...

commented

This isn't making a lot of sense... those fields just can't be null. If you back up to the previous non-dev version, is it still an issue?

I'm also adding some more fail-fast validation code to the next dev build, will let you know when that's pushed.

commented

This isn't making a lot of sense... those fields just can't be null. If you back up to the previous non-dev version, is it still an issue?

I'm also adding some more fail-fast validation code to the next dev build, will let you know when that's pushed.

I only managed to fix the issue by basically rebuilding my modpack from scratch (though automated, re-rolled every commit and then re-applied them in order, skipping the problematic Amadron changes, with a very concerning rebase that made me sweat a lot, lol).

commented

Build 254 adds more validation (checking resources are non-null when offer is created). If it crashes with this build, can you please attach any relevant stacktraces? Might help to track down where this is creeping in.

commented

Well it's been a couple hours since updating and no crashes so far. I'll keep an eye out

commented

OK, gonna close this for now. Feel free to reopen if it reoccurs...