Emojiful

Emojiful

19M Downloads

[4.0.3] Crash when sleeping in a Vampirism coffin

Gronglegrowth opened this issue ยท 5 comments

commented

This crash appears to have produced two logs, so I will send both.
Client crashlog: crash-2022-11-29_11.18.50-client.txt
Server crashlog: crash-2022-11-29_11.18.38-server.txt

commented

Not sure why this is happening yet.
Vampirism displays a sleep screen that is a subclass of InBedChatScreen https://github.com/TeamLapen/Vampirism/blob/a63b012ad0029dd70a751bcd037848d12ad2b3fe/src/main/java/de/teamlapen/vampirism/client/gui/screens/SleepInMultiplayerModScreen.java#L10

I assume Emojiful then replaces this screen by its own one:

Minecraft.getInstance().setScreen(new EmojifulBedChatScreen());

However, I do not see a reason why ChatScreen#input should be null

commented

There might be another problem that is somehow triggering this:
Vampirism does replace any InBedChatScreen instance with its own when ticking a player that is sleeping in a coffin.
So we replace the screen every tick when Emojiful is installed (and Emojiful changes it back), I think
https://github.com/TeamLapen/Vampirism/blob/4370ca18a1b32aae263aa202069e09c6e60cc93d/src/main/java/de/teamlapen/vampirism/proxy/ClientProxy.java#L160
Maybe Vampirism can a) move its logic to the event or b) make sure to only replace the exact vanilla class screen

commented

Forgot to mention it here:
Vampirism does not replace the vanilla screen with its own instance/subclass anymore. Instead it tries to modify the text of the button in the event Init.Post event (we only want to change "bed" to "coffin"). TeamLapen/Vampirism@ec26319. Hence, this issue should hopefully be resolved.

commented

Maybe Emojiful could switch to a Mixin? Alternatively it could only switch the screen if it's the vanilla class only.
I'd say the Vampirism Screen should take preference to the Emojiful one, unless you don't touch chat at all.

commented

I think this is fixed already