Jump to content

Recommended Posts

Posted

I need to use ClientTickEvent to check if my mod's keybinds trigger. his used to work on 1.8.9, but now it seems the method is triggered exclusevly on the server side. Example:

 

        @SubscribeEvent
public void handleClientTick(ClientTickEvent event){
	System.out.println(FMLCommonHandler.instance().getSide());
        }

 

Prints out:

 

[14:48:20] [Client thread/INFO] [sTDOUT]: [com.github.alexthe666.iceandfire.event.EventKeys:handleClientTick:19]: SERVER

Posted

You are totally correct. after checking my superclass(from an library my friend owns) I see this snippet.

 

message.onServerReceived(FMLServerHandler.instance().getServer(), message, messageContext.getServerHandler().playerEntity, messageContext));

 

I'll just try to make a basic  version by myself, then, and see if it works.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

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