#How can you make a client-side mod?

13 messages · Page 1 of 1 (latest)

celest pecan
#

A bit silly, but how would you make a client-side only mod? For example, a utility mod that shows text on the screen depending on a chat message received.
Most tutorials outline adding stuff like blocks, entities, etc, And I can't find much good info for client-side mods

I'm a very big beginner to fabric modding, though I have experience in Java and OOP before.
I assume I need to put all my code into the ⁨ModClient.java⁩. But how do I do stuff like listen for certain events (on chat received for example) and print some text or something?

As you can tell I'm very lost, and any help would be appreciated!!

potent nexus
#

i would recommend turning off split sources in the template

#

ClientReceiveMessageEvents.ALLOW_GAME for the chat event

celest pecan
potent nexus
#

if you have split sources on you have code that explicitly only runs on the server

#

if you dont you can have your whole mod be set to client side

celest pecan
#

oh cool

#

a bit confusing ngl

foggy dome
#

!!sides

celest pecan
#

Hmm I see

#

So i just set it to client inside fabric.mod.json