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
  • Getting messages send from Player client-side [1.8.0]
Currently Supported: 1.16.X (Latest) and 1.15.X (LTS)
Sign in to follow this  
Followers 0
Fabillo

Getting messages send from Player client-side [1.8.0]

By Fabillo, March 20, 2018 in Modder Support

  • Reply to this topic
  • Start new topic

Recommended Posts

Fabillo    0

Fabillo

Fabillo    0

  • Tree Puncher
  • Fabillo
  • Members
  • 0
  • 23 posts
Posted March 20, 2018 (edited)

Hello Minecraft Forge modding people,

I'm trying to get messages send from the player client-side, and cancel them, all before they are send to the server.

I found a tutorial on Youtube, but it involved editing to Minecraft source code, wich is obviously not that easy/maybe impossible.

 

I'm very thankful for any kind of help.

Edited March 20, 2018 by Fabillo
  • Quote

Share this post


Link to post
Share on other sites

Choonster    1651

Choonster

Choonster    1651

  • Reality Controller
  • Choonster
  • Forge Modder
  • 1651
  • 5097 posts
Posted March 20, 2018

This isn't possible in 1.8. Update to 1.11.2+ (ideally 1.12.2) and subscribe to ClientChatEvent.

  • Quote

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Share this post


Link to post
Share on other sites

Fabillo    0

Fabillo

Fabillo    0

  • Tree Puncher
  • Fabillo
  • Members
  • 0
  • 23 posts
Posted March 21, 2018

But is there another way, like editing Minecraft#thePlayer?

Or using packets.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7591

diesieben07

diesieben07    7591

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7591
  • 55014 posts
Posted March 21, 2018

No. Update.

  • Quote

Share this post


Link to post
Share on other sites

Fabillo    0

Fabillo

Fabillo    0

  • Tree Puncher
  • Fabillo
  • Members
  • 0
  • 23 posts
Posted March 21, 2018 (edited)

No, i'm not seven years old, because i probably could not code at that age.

Also i don't like the new versions of Minecraft.

Edited March 21, 2018 by Fabillo
  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7591

diesieben07

diesieben07    7591

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7591
  • 55014 posts
Posted March 21, 2018
Just now, Fabillo said:

No, i'm not seven years old, because i probably could not code at that age.

Also i don't like the new versions of Minecraft.

Please do not call people new to coding in Minecraft 7 years old.

  1. That's my signature... It's a funny quote from like 2 years ago.
  2. If you want to code in old versions you cannot use new features. No, there is no magical wand you can swing to make it work. If you want new features, use the new versions.
  • Quote

Share this post


Link to post
Share on other sites

Fabillo    0

Fabillo

Fabillo    0

  • Tree Puncher
  • Fabillo
  • Members
  • 0
  • 23 posts
Posted March 21, 2018

1. Sorry for that!  I'm not only new to Forge modding, but also new to this webside.

2. But i hope for another way of doing that. Maybe like making a class extend EntityPlayerSP and editing a method.

  • Quote

Share this post


Link to post
Share on other sites

diesieben07    7591

diesieben07

diesieben07    7591

  • Reality Controller
  • diesieben07
  • Forum Team
  • 7591
  • 55014 posts
Posted March 21, 2018
26 minutes ago, Fabillo said:

But i hope for another way of doing that. Maybe like making a class extend EntityPlayerSP and editing a method.

You would need to edit a vanilla class to make this work, which is not supported.

  • 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

    • Klarks
      [1.16.4] My structure doesnt work

      By Klarks · Posted just now

      Help plz
    • Klarks
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks · Posted 7 minutes ago

      I get it but my container have a data parametr now   protected MyModContainer(int id, PlayerInventory playerInventory,World world,PacketBuffer data) { super(RegObj.MOD_CONTAINER.get(), id); this.playerInventory = new InvWrapper(playerInventory); world.getEntityByID( data.readInt()).getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY).ifPresent(h -> { addSlot(new SlotItemHandler(h,0,79,18)); }); layoutPlayerInventory(7,54); }   and my anonymous inner class asks for data parametr  too. if i'll leave it null container wont work INamedContainerProvider iNamedContainerProvider = new INamedContainerProvider() { @Override public ITextComponent getDisplayName() { return new StringTextComponent("loh"); } @Nullable @Override public Container createMenu(int id, PlayerInventory playerInventory, PlayerEntity playerEntity) { return new MyModContainer(id,playerInventory, world,extraDataWriter); } };
    • diesieben07
      Use ${} in mods.toml

      By diesieben07 · Posted 15 minutes ago

      Correct.
    • diesieben07
      [1.16.*] Run Client/Server error

      By diesieben07 · Posted 16 minutes ago

      If you get that error you are using Java 15 still. However Forge has a recent update that should fix this.
    • diesieben07
      Party System

      By diesieben07 · Posted 17 minutes ago

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

    • Klarks
      1
      [1.16.4] My structure doesnt work

      By Klarks
      Started 7 hours ago

    • Klarks
      36
      [1.16.4] How i can open a container by clicking on my mob

      By Klarks
      Started Saturday at 09:56 PM

    • DoctorC
      7
      Use ${} in mods.toml

      By DoctorC
      Started 2 hours ago

    • Luis_ST
      1
      [1.16.*] Run Client/Server error

      By Luis_ST
      Started 1 hour ago

    • Discult
      1
      Party System

      By Discult
      Started 59 minutes ago

  • Who's Online (See full list)

    • Klarks
    • Choonster
    • Heinzchen
    • diesieben07
    • _HungTeen_
    • Luis_ST
    • Thorius
    • Pl00py_R
  • All Activity
  • Home
  • Mod Developer Central
  • Modder Support
  • Getting messages send from Player client-side [1.8.0]
  • Theme

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