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

Where is the "days without sleeping" counter implemented?


OsHeaven
 Share

Recommended Posts

Hi,

 

im searching for the "days without sleeping" counter, what spawns phantoms at >= 3 days...

i wanna reset it with some other mechanics additionally to sleeping...

ive found a sleepingTimer in the PlayerEntity class, but i think its something else...

any hints would be nice

Link to comment
Share on other sites

If you look at the references of PhantomEntity and EntityType.PHANTOM, you'll see that Phantoms are spawned by the PhantomSpawner class. This checks Stats.TIME_SINCE_REST for each player, which is incremented every tick while the player isn't sleeping in PlayerEntity#tick.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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