Jump to content

[1.12.2] ITickable Restrictions?


unassigned

Recommended Posts

Hello, 

I have a 'storage' attached to a chunk via capability, and I want this to update with the rest of Minecraft to modify it. Currently, I'm subscribed to onWorldTick and iterating through a list of chunks that have this storage attached to it, then calling an 'internal update' function to do this modification. This issue with this, however, all values update at the same time, I want them to update separately from each other as their values need to be changed (similar to how TE's work off different ticks). I looked into implementing ITickable, however, the update function is never called, presumably because it does not know my class exists. Is there any way to 'register' my tickable, or is there another way to achieve what I want?

 

Thank you.

Link to comment
Share on other sites

1 hour ago, unassigned said:

similar to how TE's work off different ticks

They don't all TE's are ticked at the same time from the world being ticked.

 

1 hour ago, unassigned said:

I want them to update separately from each other as their values need to be changed

Generate a random number and determine if the update method is called from that?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

On 12/13/2018 at 9:49 AM, unassigned said:

is there another way to achieve what I want?

Not really, this is probably the best way.

 

On 12/13/2018 at 9:49 AM, unassigned said:

This issue with this, however, all values update at the same time, I want them to update separately from each other as their values need to be changed (similar to how TE's work off different ticks).

Could you please elaborate on the issue a bit more? It almost sounds like you are using static fields but I can't tell for sure.

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.

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.