#(SeorOreo) event related to consuming an item
25 messages · Page 1 of 1 (latest)
(SeorOreo) event related to consuming an item
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>
If the player isn't hungry you can't eat. But you could make the player hungry, when they right click with a food item, to let them eat it and set the food level back to normal afterwards or leave it as is.
!e clicks block
Player
this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.
player (right|left) clicks <block>
with:<item> to only process the event if a specified item was held.
using:hand/off_hand/either_hand to only process the event if the specified hand was used to click.
type:<material> to only run if the block clicked matches the material input.
when a player clicks on a block or in the air.
Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.item> returns the ItemTag the player is clicking with.
<context.location> returns the LocationTag the player is clicking on.
<context.relative> returns a LocationTag of the air block in front of the clicked block.
<context.click_type> returns an ElementTag of the Spigot API click type <@link url https://hub.spi...
<context.hand> returns an ElementTag of the used hand.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
You could add fake hunger to that ^, so that it seems like they're full when they're actually not
!m PlayerTag.fake_health
Shows the player a fake health bar, with a number between 0 and 20, where 1 is half of a heart.
Use with no input value to reset to the player's normal health.
Optionally, you can specify a fake food level, between 0 and 20.
You can also optionally specify a food saturation level between 0 and 10.
For example:
- adjust <player> fake_health:1
- adjust <player> fake_health:10|15
- adjust <player> fake_health:<player.health>|3|0
PlayerTag
ElementTag(Decimal)(|ElementTag(Number)(|ElementTag(Decimal)))
That name is weirdly misleading
Yeah, definitely lol
oh ok I thought there was a property for the items that made them able to be consumed at any time.
For the fake food level it would be something like
- adjust <player> fake_food_level:0 right?
No it's currently fake_health, not fake_food_level
And how do I specify the level of food?
ohhh there the input has 3 values I imagine that the second value is related to the level of hunger
It would be good if they changed the name of the mechanism, the truth is that it is very misleading hahaha 🤭
Yeah it is lol.
That should probably take a map input.
yeah I think the same would be better something like:
- adjust <player> fake_stats:<map[health=20;food_level=20;food_saturation=20]>```