Bounding Box Outline Reloaded

Bounding Box Outline Reloaded

355k Downloads

Allow mod missing on client

BrainStone opened this issue ยท 12 comments

commented

It would be very useful if the Forge version of this mod would allow the client not to have it.

commented

Over on this closed issue he stated that only clients that want to show the boxes need the mod. But then when attempting to join the server with it I get rejected.

I don't want my regular players to need this to play on my servers, but I also know Sponge isn't @irtimaled 's strength. Do you know what they need to add/remove to make it side independent, @BrainStone ?

commented

I'm surprised that the server rejects players without the mod - it could be something about how the server tries to open a communication link to the client. I'll have to look into this

commented

I can recommend looking at mods like NEI (their main class). Because they don't require the mod on the client.

commented

Thanks - it may just be something as simple as exception wrapping the comms channel.

commented

Let me know if you guys have issues with this. I've done very limited testing and appears to work okay but don't have the setup to test it more thoroughly

commented

@irtimaled It appears to work like halfway.
I get a different error now: (Note: I connected with a vanilla client!)

[23:48:04] [Server thread/WARN]: Failed to handle packet for /x.x.x.x:x
java.util.NoSuchElementException: packet_handler
        at io.netty.channel.DefaultChannelPipeline.getContextOrDie(DefaultChannelPipeline.java:1080) ~[DefaultChannelPipeline.class:?]
        at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:251) ~[DefaultChannelPipeline.class:?]
        at io.netty.channel.DefaultChannelPipeline.addBefore(DefaultChannelPipeline.java:240) ~[DefaultChannelPipeline.class:?]
        at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.insertIntoChannel(NetworkDispatcher.java:176) ~[NetworkDispatcher.class:?]
        at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.serverToClientHandshake(NetworkDispatcher.java:163) ~[NetworkDispatcher.class:?]
        at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.fmlServerHandshake(FMLNetworkHandler.java:72) ~[FMLNetworkHandler.class:?]
        at net.minecraft.server.network.NetHandlerLoginServer.func_147326_c(NetHandlerLoginServer.java:135) ~[pa.class:?]
        at net.minecraft.server.network.NetHandlerLoginServer.func_73660_a(NetHandlerLoginServer.java:63) ~[pa.class:?]
        at net.minecraft.network.NetworkManager.func_74428_b(NetworkManager.java:285) ~[gw.class:?]
        at net.minecraft.network.NetworkSystem.func_151269_c(NetworkSystem.java:179) [ox.class:?]
        at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:784) [MinecraftServer.class:?]
        at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:391) [nx.class:?]
        at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:665) [MinecraftServer.class:?]
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:523) [MinecraftServer.class:?]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_131]
[23:48:04] [Server thread/INFO]: The_BrainStone lost connection: Internal Exception: io.netty.handler.codec.EncoderException: java.io.IOException: Can't serialize unregistered packet

Also a setup is pretty easy tbh. If you use gradle you can use ./gradlew runServer or start a server out of your IDE. Connections with vanilla clients should work and with Forge clients too (Set up a simple profile for each in your launcher) and you can also start the corresponding client with ./gradlew runClient or through the IDE again.

commented

I guess the issue is that you send packets which the client doesn't know. So a check if the client supports the mod before you open the channel should sove it.

commented

I'm not gonna be able to look at this today - if you are interested I accept pull requests :-)

commented

I would but I have to do a lot of stuff myself.
Maybe I'll ask the guys from JourneyMap. As I have a good connection to them and they did it right.

commented

I've updated the beta 18 jar linked above. This should solve the problem.

commented

Sorry for the very late reply. But it's working