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

addScheduledTask in Newer Versions (1.16.x/ 1.17.x) [Solved]


urbanxx001
 Share

Recommended Posts

As the title says, I was wondering what the updated method/process for addScheduledTask is. I need this for an event similar to:

@SubscribeEvent
public void onEntityJoin(final EntityJoinWorldEvent event) {
	Minecraft.getInstance() //(not recognized)--> .addScheduledTask(new Runnable() {
	    @Override
	    public void run() { }
	});
}

For the FML setup event I've used:

event.enqueueWork(() -> { }

But I'm not sure what's required for a simple event. The context for this is collecting what language the client is using and then sending a packet to sync with the server. But the packet must be delayed or it fails in this event.

Edit: Actually I can do the same thing when the player loads a container needing it. So the event's probably unnecessary

Edited by urbanxx001
Link to comment
Share on other sites

  • urbanxx001 changed the title to addScheduledTask in Newer Versions (1.16.x/ 1.17.x)
  • urbanxx001 changed the title to addScheduledTask in Newer Versions (1.16.x/ 1.17.x) [Solved]

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
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.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.