Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

A way to replace the server handshake event


Dospacite
 Share

Recommended Posts

I'm currently working on an authentication system that works through the replacement of the default ServerHello packet sent during the handshake process (https://wiki.vg/Minecraft_Forge_Handshake). I have tried to do this with FMLNetworkEvent.ClientConnectedToServerEvent but it fires after the handshake process (from what I have seen by testing, correct me if I'm wrong).

The reason I want to replace the handshake packet is that most custom clients do it that way and I'm wondering if I can replicate that.

Is there a way of doing this in ANY way?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: codechicken/lib/packet/PacketCustom$ICustomPacketHandler     at cpw.mods.fml.common.LoadController.transition(LoadController.java:163)     at cpw.mods.fml.common.Loader.loadMods(Loader.java:544)     at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:208)     at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:480)     at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:878)     at net.minecraft.client.main.Main.main(SourceFile:148)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)     at net.minecraft.launchwrapper.Launch.main(Launch.java:28)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at org.multimc.onesix.OneSixLauncher.launchWithMainClass(OneSixLauncher.java:210)     at org.multimc.onesix.OneSixLauncher.launch(OneSixLauncher.java:245)     at org.multimc.EntryPoint.listen(EntryPoint.java:143)     at org.multimc.EntryPoint.main(EntryPoint.java:34) Caused by: java.lang.NoClassDefFoundError: codechicken/lib/packet/PacketCustom$ICustomPacketHandler     at java.lang.Class.forName0(Native Method)     at java.lang.Class.forName(Unknown Source)     at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:440)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:212)     at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:190)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)     at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)     at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)     at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)     at com.google.common.eventbus.EventBus.post(EventBus.java:275)     at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119)     at cpw.mods.fml.common.Loader.loadMods(Loader.java:513)     ... 18 more Caused by: java.lang.ClassNotFoundException: codechicken.lib.packet.PacketCustom$ICustomPacketHandler     at net.minecraft.launchwrapper.LaunchClassLoader.findClass(LaunchClassLoader.java:101)     at java.lang.ClassLoader.loadClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     ... 43 more
    • Not directly related to your answer, but does that mean, if I want to make an Obsidian Block into a projectile (extend projectile class), whilst retaining its default properties, I am out of luck and I have to "mess with internals"? Maybe there is a way to unregister default Minecraft blocks and add fake ones? Impostors of sort.
    • what did you expect? you need to add this things manually look for an example at the StonecutterScreen
    • Noted.   I am trying to fetch Fence blocks and add an overlay to it.   By  you mean ICustomModelLoader?  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.