Jump to content
  • Home
  • Files
  • Docs
Topics
  • All Content

  • This Topic
  • This Forum

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.15.2] ClientPlayNetHandler and ServerPlayNetHandler
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
Corgam

[1.15.2] ClientPlayNetHandler and ServerPlayNetHandler

By Corgam, May 7, 2020 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Corgam    1

Corgam

Corgam    1

  • Tree Puncher
  • Corgam
  • Members
  • 1
  • 35 posts
Posted May 7, 2020

Hi,

is there a way to add new methodes and attributes to the ClientPlayNetHandler and ServerPlayNetHandler classes?

I want to create a system similar to the existing advancements system, so my goal is to add a new Manager to the ClientPlayNetHandler

and also I have created custom Packets and I want to send and process them in ClientPlayNetHandler and ServerPlayNetHandler

 

Cheers,

Corgam

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7589

diesieben07

diesieben07    7589

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7589
  • 54951 posts
Posted May 7, 2020

That is not how you make custom packets.

Look at the documentation.

  • Like 1
  • Quote

Share this post


Link to post
Share on other sites

Niprow    7

Niprow

Niprow    7

  • Stone Miner
  • Niprow
  • Members
  • 7
  • 68 posts
Posted May 7, 2020

you send minecraft packets via the the <Dist>PlayNetHandler and for your own look into the docs SimpleImpl

  • Like 1
  • Quote

 I will make fun of you if you are not able to look into the (vanilla-) code.

Share this post


Link to post
Share on other sites

Corgam    1

Corgam

Corgam    1

  • Tree Puncher
  • Corgam
  • Members
  • 1
  • 35 posts
Posted May 7, 2020

Is there some tutorial or other mod's github page to get some example code?

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7589

diesieben07

diesieben07    7589

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7589
  • 54951 posts
Posted May 7, 2020

It was literally linked twice.

  • Quote

Share this post


Link to post
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.   Paste as plain text instead

  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.

    • Insert image from URL
×
  • Desktop
  • Tablet
  • Phone
Sign in to follow this  
Followers 0
Go To Topic Listing



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • T1ps
      GUI Documentation

      By T1ps · Posted 9 minutes ago

      @Draco18s Ok... That's weird lmao umm is there any completed documentation for it or am I just gonna need to mess around?
    • _HungTeen_
      [1.15.2] Invalid criterion trigger

      By _HungTeen_ · Posted 23 minutes ago

      I am making a new Criterion trigger called SunAmountTrigger. First I create SunAmountTrigger class like the default did : https://github.com/HungTeen/pvzmod/blob/dev/src/main/java/com/hungteen/pvz/advancement/SunAmountTrigger.java And then I register it in AdvancementHandler : https://github.com/HungTeen/pvzmod/blob/dev/src/main/java/com/hungteen/pvz/advancement/AdvancementHandler.java Here is the json file of the custom advancement : https://github.com/HungTeen/pvzmod/blob/dev/src/main/resources/data/pvz/advancements/sunny_days.json But When I run mc, I didn't see the advancements and got log like this: [m[1;31m[11:11:47] [Server thread/ERROR] [minecraft/AdvancementManager]: Parsing error loading custom advancement pvz:sunny_days: Invalid criterion trigger: minecraft:sun_amount   I don't know why it's Invalid, tysm if someone can help me figure out.
    • monkeysHK
      [1.16] Transparent Picture Render in GUI

      By monkeysHK · Posted 25 minutes ago

      It was a really good reference to look at. I am trying to define a RenderState and use their constructor and their setup and clear functions. But it still wouldn't work. I don't know where the problem is. private static final RenderState.AlphaState HALF_ALPHA = new RenderState.AlphaState(0.5F); minecraft.getTextureManager().bindTexture(new ResourceLocation("minecraft", "textures/gui/widgets.png")); matrixStack.push(); HALF_ALPHA.setupRenderState(); { matrixStack.translate(instru_pos[currentNbo.ordinal()][0], instru_pos[currentNbo.ordinal()][1], 0); matrixStack.scale((255/20f)*scale, (255/20f)*scale, (255/20f)*scale); this.blit(matrixStack, 0, 0, 0, 146, 20, 20); } HALF_ALPHA.clearRenderState(); matrixStack.pop();  
    • DaemonUmbra
      Mods work in singleplayer but not in multiplayer

      By DaemonUmbra · Posted 30 minutes ago

      1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    • DaemonUmbra
      not all my mods are showing up in a 1.12.2 server

      By DaemonUmbra · Posted 31 minutes ago

      1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
  • Topics

    • T1ps
      2
      GUI Documentation

      By T1ps
      Started Tuesday at 10:14 PM

    • _HungTeen_
      0
      [1.15.2] Invalid criterion trigger

      By _HungTeen_
      Started 23 minutes ago

    • monkeysHK
      2
      [1.16] Transparent Picture Render in GUI

      By monkeysHK
      Started Yesterday at 12:19 AM

    • __SmolMight__
      1
      Mods work in singleplayer but not in multiplayer

      By __SmolMight__
      Started 3 hours ago

    • uglyswed@gmail.com
      1
      not all my mods are showing up in a 1.12.2 server

      By uglyswed@gmail.com
      Started 3 hours ago

  • Who's Online (See full list)

    • _HungTeen_
    • c_o_w
    • Teedledee
    • Azaka7
    • AurenX
    • T1ps
    • DaemonUmbra
    • sarkozi
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • [1.15.2] ClientPlayNetHandler and ServerPlayNetHandler
  • Theme

Copyright © 2019 ForgeDevelopment LLC · Ads by Longitude Ads LLC Powered by Invision Community