#(Blockutis) slowing down player hunger / exhaustion

26 messages · Page 1 of 1 (latest)

viscid ingot
#

hey, i want to slow down player hunger/exhaustion, for example make certain players lose hunger 2 times slower than normal, so that food lasts longer.
How should i do this? Should i use player exhaustion level increases, and cancel every-other one?
the docs warn that the event fires very rapidly, should i or could i do something else instead?

north scaffoldBOT
#

(Blockutis) slowing down player hunger / exhaustion

north scaffoldBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

ripe crest
#

!e food

subtle spireBOT
# ripe crest !e food
Group

Entity

Event Lines

<entity> changes food level

Switches

item:<item> to only process the event if it was triggered by an item that matches the specified item.

Triggers

when an entity's food level changes.

Has Player

when the entity that's food level has changed is a player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Has NPC

when the entity that's food level has changed is an NPC.

Context

<context.entity> returns the EntityTag.
<context.food> returns an ElementTag(Number) of the entity's new food level.
<context.item> returns an ItemTag of the item that triggered the event, if any.

Determine

ElementTag(Number) to set the entity's new food level.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

ripe crest
#

!t food_level

subtle spireBOT
# ripe crest !t food_level
Cannot Specify Searched Tag

Multiple possible tags: <PlayerTag.food_level>, <PlayerTag.formatted_food_level[(<max>)]>.

ripe crest
#

!t PlayerTag.food_level

subtle spireBOT
ripe crest
#

you can use that event

#

it also fires when the food goes up, so you want an if check to make sure the code only runs if the food is going down

viscid ingot
#

how can i check if the food went up or down?

dry tendon
#

save the value of current food_level inside a flag, and then in the next event trigger do logic accordingly

viscid ingot
#

alright. For now i just check if an item was used to cause the change, if not, it must have gone down
if that doesnt work, ill do what you said

dry tendon
#

true, i dont think you can heal hunger without items if not by a plugin/command

blissful star
inner snow
#

You could Change this in the paper.properties

#

Cant ya?

ripe crest
#

No need for flag

#

Just compare playertag.food_level with context.food

dry tendon
#

damn. i've got to re learn denizen 🥲

narrow ventureBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@viscid ingot

viscid ingot
#

thanks