ForgeEssentials

ForgeEssentials

339k Downloads

FE1190+ can't sleep in Openblocks sleep bag

AnrDaemon opened this issue ยท 8 comments

commented

When trying to use OB sleeping bag I got instant kick with internal server error, and it keeps kicking me upon login.

[17:55:11] [Server thread/ERROR] [FML/]: Exception caught during firing event net.minecraftforge.event.entity.player.PlayerSleepInBedEvent@3bbe2f:
java.lang.NullPointerException
    at com.forgeessentials.scripting.ScriptEventHandler.playerSleep(ScriptEventHandler.java:126) ~[ScriptEventHandler.class:?]
    at cpw.mods.fml.common.eventhandler.ASMEventHandler_294_ScriptEventHandler_playerSleep_PlayerSleepInBedEvent.invoke(.dynamic) ~[?:?]
    at cpw.mods.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:54) ~[ASMEventHandler.class:?]
    at cpw.mods.fml.common.eventhandler.EventBus.post(EventBus.java:140) [EventBus.class:?]
    at openblocks.common.item.ItemSleepingBag.vanillaCanSleep(ItemSleepingBag.java:136) [ItemSleepingBag.class:?]
    at openblocks.common.item.ItemSleepingBag.canPlayerSleep(ItemSleepingBag.java:156) [ItemSleepingBag.class:?]
    at openblocks.common.item.ItemSleepingBag.onArmorTick(ItemSleepingBag.java:110) [ItemSleepingBag.class:?]
    at net.minecraft.entity.player.InventoryPlayer.func_70429_k(InventoryPlayer.java:319) [yx.class:?]
    at net.minecraft.entity.player.EntityPlayer.func_70636_d(EntityPlayer.java:538) [yz.class:?]
    at net.minecraft.entity.player.EntityPlayerMP.localOnLivingUpdate(EntityPlayerMP.java) [mw.class:?]
    at api.player.server.ServerPlayerAPI.onLivingUpdate(Unknown Source) [ServerPlayerAPI.class:?]
    at net.minecraft.entity.player.EntityPlayerMP.func_70636_d(EntityPlayerMP.java) [mw.class:?]
    at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:1611) [sv.class:?]
    at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:288) [yz.class:?]
    at net.minecraft.entity.player.EntityPlayerMP.localOnUpdateEntity(EntityPlayerMP.java:295) [mw.class:?]
    at api.player.server.ServerPlayerAPI.onUpdateEntity(Unknown Source) [ServerPlayerAPI.class:?]
    at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java) [mw.class:?]
    at net.minecraft.network.NetHandlerPlayServer.func_147347_a(NetHandlerPlayServer.java:303) [nh.class:?]
    at net.minecraft.network.play.client.C03PacketPlayer.func_148833_a(SourceFile:137) [jd.class:?]
    at net.minecraft.network.play.client.C03PacketPlayer$C06PacketPlayerPosLook.func_148833_a(SourceFile:20) [jf.class:?]
    at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:212) [ej.class:?]
    at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:165) [nc.class:?]
    at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:659) [MinecraftServer.class:?]
    at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334) [lt.class:?]
    at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427) [MinecraftServer.class:?]
    at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685) [li.class:?]
[17:55:12] [Server thread/ERROR] [FML/]: Index: 3 Listeners:
[17:55:12] [Server thread/ERROR] [FML/]: 0: HIGHEST
[17:55:12] [Server thread/ERROR] [FML/]: 1: ASM: com.forgeessentials.protection.ProtectionEventHandler@1e0dd9d playerSleepInBedEventHigh(Lnet/minecraftforge/event/entity/player/PlayerSleepInBedEvent;)V
[17:55:12] [Server thread/ERROR] [FML/]: 2: NORMAL
[17:55:12] [Server thread/ERROR] [FML/]: 3: ASM: com.forgeessentials.scripting.ScriptEventHandler@14bae13 playerSleep(Lnet/minecraftforge/event/entity/player/PlayerSleepInBedEvent;)V
commented

xD. So it is a recent bug. I will try to work on a permanent solution asap.

commented

Yes, it was working for as long as I recall, but stopped after upgrading the server to 1190/1191.

commented

Well, it should be fixed now. It was due to a miss understanding of how the sleep event worked.

commented

I'll test in a few. Gimme a moment to break some more stuff first.

commented

Works as expected. Thanks!

commented

I will look into fixing this asap. Probably something to do with our /bed hook.

A player on my server was crashing after using an openblocks bag so it might have been this.

commented

Btw, the solution for fixing this issue is editing your player.dat file with nbtexplorer and moving the bed from slot 102 (chest plate) to its old slot (an nbt tag inside the bed item tag).

commented

I've "solved" it by booting server with a previous modpack. (FE 1187)
Thanks for your help!