Upgrade Aquatic

Upgrade Aquatic

26M Downloads

Sleeping Bags incompatibility

shimpey opened this issue ยท 3 comments

commented

Forge version: 1.16.4-35.1.37
Abnormals Core version: 1.16.4-3.0.6
Upgrade Aquatic version: 1.16.5-3.0.1

When trying to use a Sleeping Bag (Mod: https://www.curseforge.com/minecraft/mc-mods/sleeping-bags) server throws the following error:

[23Jan2021 22:07:47.582] [Server thread/FATAL] [net.minecraft.util.concurrent.ThreadTaskExecutor/]: Error executing task on Server
java.lang.NullPointerException: null
[23Jan2021 22:07:47.794] [Server thread/ERROR] [net.minecraftforge.eventbus.EventBus/EVENTBUS]: Exception caught during firing event: null
	Index: 1
	Listeners:
		0: NORMAL
		1: ASM: class com.minecraftabnormals.upgrade_aquatic.core.events.EntityEvents onPlayerSleep(Lnet/minecraftforge/event/entity/player/PlayerSleepInBedEvent;)V
java.lang.NullPointerException

This is preventing the use of the sleeping bags. Any possibility that you could fix this?

commented

Gonna need the full log

commented

Reopen if its still occuring and you have the logs

commented

Hi @bageldotjpg ,
I have the same Issue. The problem is that the sleeping-bags mod doesn't set the (optional) sleeping position in the sleep event in order to not set the spawn point, thus the NullPointerException in core/events/EntityEvents.java:153, where the position is queried. I would appreciate, if this was fixed (perhaps simply by prematurely returning from the onPlayerSleep method if it's unset?).

Here's the complete stacktrace:

[21Feb2021 20:56:09.547] [Server thread/FATAL] [net.minecraft.util.concurrent.ThreadTaskExecutor/]: Error executing task on Server
java.lang.NullPointerException: null
	at net.minecraft.world.World.func_189509_E(World.java:151) ~[?:?]
	at net.minecraft.world.World.func_180495_p(World.java:376) ~[?:?]
	at com.minecraftabnormals.upgrade_aquatic.core.events.EntityEvents.onPlayerSleep(EntityEvents.java:153) ~[upgrade_aquatic:3.0.1]
	at net.minecraftforge.eventbus.ASMEventHandler_505_EntityEvents_onPlayerSleep_PlayerSleepInBedEvent.invoke(.dynamic) ~[?:?]
	at net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:85) ~[eventbus-4.0.0.jar:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-4.0.0.jar:?]
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-4.0.0.jar:?]
	at net.minecraftforge.event.ForgeEventFactory.onPlayerSleepInBed(ForgeEventFactory.java:457) ~[forge:?]
	at de.maxhenkel.sleepingbags.items.ItemSleepingBag.trySleep(ItemSleepingBag.java:66) ~[sleeping_bags:1.16.4-1.0.1]
	at de.maxhenkel.sleepingbags.items.ItemSleepingBag.func_77659_a(ItemSleepingBag.java:56) ~[sleeping_bags:1.16.4-1.0.1]
	at net.minecraft.item.ItemStack.func_77957_a(ItemStack.java:214) ~[?:?]
	at net.minecraft.server.management.PlayerInteractionManager.func_187250_a(PlayerInteractionManager.java:287) ~[?:?]
	at net.minecraft.network.play.ServerPlayNetHandler.func_147346_a(ServerPlayNetHandler.java:982) ~[?:?]
	at net.minecraft.network.play.client.CPlayerTryUseItemPacket.func_148833_a(SourceFile:31) ~[?:?]
	at net.minecraft.network.play.client.CPlayerTryUseItemPacket.func_148833_a(SourceFile:9) ~[?:?]
	at net.minecraft.network.PacketThreadUtil.func_225383_a(SourceFile:21) ~[?:?]
	at net.minecraft.util.concurrent.TickDelayedTask.run(SourceFile:18) ~[?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213166_h(SourceFile:144) ~[?:?]
	at net.minecraft.util.concurrent.RecursiveEventLoop.func_213166_h(SourceFile:23) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:733) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_213166_h(MinecraftServer.java:159) ~[?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213168_p(SourceFile:118) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_213205_aW(MinecraftServer.java:716) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_213168_p(MinecraftServer.java:710) ~[?:?]
	at net.minecraft.util.concurrent.ThreadTaskExecutor.func_213160_bf(SourceFile:103) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_213202_o(MinecraftServer.java:695) ~[?:?]
	at net.minecraft.server.MinecraftServer.func_240802_v_(MinecraftServer.java:645) ~[?:?]
	at net.minecraft.server.MinecraftServer.lambda$startServer$0(MinecraftServer.java:232) ~[?:?]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_282]