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

GUI InGame & Chat Messages


Recommended Posts

Hi! i have some question about Forge API....


1. How i can parse chat messages?

2. How i can draw strings ingame? Not blocks... only Client Side... a text...

3. I can modify the package "net.minecraft.client.gui" the class "GuiIngame.java" and compile a mod?



Sry for my bad english and thx :)

Link to comment
Share on other sites

1.) On the client use ClientChatReceivedEvent, on the server use ServerChatEvent. Choose wisely.

2.) You mean add text to the HUD? use a client-side tick handler with TickType.RENDER and draw the strings in TickEnd.

3.) You could, but it's not a good idea. It would make your mod incompatible with others. Why do you want to do that?

Link to comment
Share on other sites

Ummm reHi!


Pne problem.... i Handle a ChatMessages

NetworkRegistry.instance().registerChatListener(new ChatListenerHandler(this));


and read good  the chat...

public Packet3Chat clientChat(NetHandler handler, Packet3Chat message)



But i like not show the message when i filter it.... how i can return a "Packet3Chat" without messages to not show it ingame chat ?¿??



Link to comment
Share on other sites

Sry for spam messages... but i have other new question.


How i can intercept chat messages from local user?




Local User write: "Hi! ppl "
Mod read: "Hi! ppl "
Mod change: "/tc Hi! ppl "
Mod send chat message: "/tc Hi! ppl "
Server received: "/tc Hi! ppl "




Link to comment
Share on other sites

diesieben07 thx for your help ;) I finally made it modifying the class GuiChat.java ;)  problem? I need distribute a "awj.class" file :\


Now i have other question... How i can change the size of the font when i use "FontRenderer" class?? i need other way? create a new wayport? :\


thx for all ;)

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.
Note: Your post will require moderator approval before it will be visible.

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.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.