Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with SpongeForge #56

Open
Neonit opened this issue Sep 9, 2018 · 3 comments
Open

Incompatibility with SpongeForge #56

Neonit opened this issue Sep 9, 2018 · 3 comments
Labels

Comments

@Neonit
Copy link

Neonit commented Sep 9, 2018

Problem Description

With only MultiHotbar installed on client and MultiHotbar (Core) and SpongeForge installed on server, attempting to pickup an item, if my first hotbar is filled with items, kicks my client. An exception like the following is shown in the server log,. Unfortunately, 10 lines are hidden.

Before the error, it reports:

[Server thread/WARN] [minecraft/NetworkSystem]: Failed to handle packet for /<ip address>:<port>
net.minecraft.util.ReportedException: Adding item to inventory
        at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:459) ~[oq.class:?]
        at net.minecraft.network.NetHandlerPlayServer.redirect$onPlayerTick$zin000(NetHandlerPlayServer.java:2047) ~[pa.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_73660_a(NetHandlerPlayServer.java:173) ~[pa.class:?]
        at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher$1.func_73660_a(NetworkDispatcher.java:209) ~[NetworkDispatcher$1.class:?]
        at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:285) ~[gw.class:?]
        at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:180) [oz.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:790) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397) [nz.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]
Caused by: java.util.NoSuchElementException: No value present
        at java.util.Optional.get(Optional.java:135) ~[?:1.8.0_25]
        at net.minecraft.entity.player.InventoryPlayer.getSpongeSlot(InventoryPlayer.java:1743) ~[aec.class:?]
        at net.minecraft.entity.player.InventoryPlayer.redirect$onAdd$zha000(InventoryPlayer.java:1762) ~[aec.class:?]
        at net.minecraft.entity.player.InventoryPlayer.func_70452_e(InventoryPlayer.java:284) ~[aec.class:?]
        at net.minecraft.entity.player.InventoryPlayer.func_191971_c(InventoryPlayer.java:425) ~[aec.class:?]
        at net.minecraft.entity.player.InventoryPlayer.func_70441_a(InventoryPlayer.java:378) ~[aec.class:?]
        at net.minecraft.entity.item.EntityItem.redirect$onAddItemStackToInventory$zfp000(EntityItem.java:778) ~[acl.class:?]
        at net.minecraft.entity.item.EntityItem.func_70100_b_(EntityItem.java:400) ~[acl.class:?]
        at net.minecraft.entity.player.EntityPlayer.redirect$onPlayerCollideEntity$zgo000(EntityPlayer.java:3713) ~[aed.class:?]
        at net.minecraft.entity.player.EntityPlayer.func_71044_o(EntityPlayer.java:600) ~[aed.class:?]
        at net.minecraft.entity.player.EntityPlayer.func_70636_d(EntityPlayer.java:571) ~[aed.class:?]
        at net.minecraft.entity.EntityLivingBase.func_70071_h_(EntityLivingBase.java:2172) ~[vp.class:?]
        at net.minecraft.entity.player.EntityPlayer.func_70071_h_(EntityPlayer.java:234) ~[aed.class:?]
        at net.minecraft.entity.player.EntityPlayerMP.func_71127_g(EntityPlayerMP.java:382) ~[oq.class:?]
        ... 10 more

Attempting to give me an item with the /give command, when my first hotbar is filled with items, leads to just errors to be logged.

net.minecraft.util.ReportedException: Adding item to inventory
java.lang.RuntimeException: net.minecraft.util.ReportedException: Adding item to inventory
        at org.spongepowered.common.command.MinecraftCommandWrapper.tryExecute(MinecraftCommandWrapper.java:164) ~[MinecraftCommandWrapper.class:1.12.2-2705-7.1.0-BETA-3361]
        at org.spongepowered.common.command.MinecraftCommandWrapper.process(MinecraftCommandWrapper.java:145) ~[MinecraftCommandWrapper.class:1.12.2-2705-7.1.0-BETA-3361]
        at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:341) ~[SimpleDispatcher.class:1.12.2-2705-7.1.0-BETA-3361]
        at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:329) [SpongeCommandManager.class:1.12.2-2705-7.1.0-BETA-3361]
        at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:1083) [dh.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147361_d(NetHandlerPlayServer.java:958) [pa.class:?]
        at net.minecraft.network.NetHandlerPlayServer.func_147354_a(NetHandlerPlayServer.java:937) [pa.class:?]
        at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:37) [la.class:?]
        at net.minecraft.network.play.client.CPacketChatMessage.func_148833_a(SourceFile:9) [la.class:?]
        at org.spongepowered.common.network.PacketUtil.onProcessPacket(PacketUtil.java:92) [PacketUtil.class:1.12.2-2705-7.1.0-BETA-3361]
        at net.minecraft.network.PacketThreadUtil$1.redirect$onProcessPacket$zle000(SourceFile:539) [hv$1.class:?]
        at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_25]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_25]
        at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
        at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:293) [SpongeImplHooks.class:1.12.2-2705-7.1.0-BETA-3361]
        at net.minecraft.server.MinecraftServer.redirect$onRun$zjj000(MinecraftServer.java:3963) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397) [nz.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:745) [?:1.8.0_25]
Caused by: net.minecraft.util.ReportedException: Adding item to inventory
        at net.minecraft.entity.player.InventoryPlayer.func_191971_c(InventoryPlayer.java:464) ~[aec.class:?]
        at net.minecraft.entity.player.InventoryPlayer.func_70441_a(InventoryPlayer.java:378) ~[aec.class:?]
        at net.minecraft.command.CommandGive.func_184881_a(SourceFile:60) ~[cm.class:?]
        at net.minecraft.command.CommandHandler.func_175786_a(CommandHandler.java:119) ~[bj.class:?]
        at org.spongepowered.common.command.MinecraftCommandWrapper.tryExecute(MinecraftCommandWrapper.java:160) ~[MinecraftCommandWrapper.class:1.12.2-2705-7.1.0-BETA-3361]
        ... 21 more

In both cases the server continues running normally. If the client got kicked inside the pickup, reconnecting will not be possible, because on reconnect the pickup will be triggered and lead to the error and a kick immediately.

I don't know, if this is a problem to be solved by the Sponge team or if this could be solved here.

Steps to reproduce

  1. Setup a server with MultiHotbar and SpongeForge.
  2. Setup a client with MultiHotbar.
  3. Start both and connect.
  4. Collect or give different items until the bottom-most hotbar is filled and has not slots for new item types left.
  5. Attempt to pickup an item or /give one that would need a new slot in the second hotbar.

Versions

  • Forge 1.12.2-14.23.4.2759
  • MultiHotbar 1.12.2-4.0.1-build-T116 (only on client)
  • MultiHotbar Core 1.12.2-1.0.1-build-T22
  • SpongeForge 1.12.2-2705-7.1.0-BETA-3361 (only on server)
@rolandoislas
Copy link
Owner

It looks like there was a commit to SpongeForge that might fix this. Is this bug still present?

@Neonit
Copy link
Author

Neonit commented Jan 23, 2019

Can't tell. I stopped using Sponge back then, because I didn't need most of it and (at least partly) because of this bug. I'm currently not running a server actively.

Maybe someone else could check. If Sponge is already setup it's literally just installing the MultiHotbar and trying to pickup an item. If it works the chances are good this bug has been fixed.

@KeiBoogie
Copy link

Yeah I am having the same issue and it is really pissing me the fuck off. Please fix this or I will be fixing to come to your house.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants