#(r1mulus) .time_lived tag in ticks
51 messages · Page 1 of 1 (latest)
(r1mulus) .time_lived tag in ticks
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.
Thread is now a Feature thread. This indicates a request for a new feature to the plugin, that both (A) does not already exist and (B) reasonably can be added. If you are unsure whether this applies, use </helpthread:1028674284870180883> to change back to a normal help thread.
!t time_lived
Returns how long the entity has lived.
attributes
DurationTag
EntityTag.time_lived
Is this not already in ticks?
This is returning in seconds then?
yea
Returns the number of ticks in the duration. (20t/second)
ElementTag(Number)
Though, I see your point.
Aya/Monkey will have to comment if they feel the need to change it.
Its literally unnecessary and gets in the way
?
not a feature thread
Thread is now a Help/Support thread. A helper will check your thread when available.
use this
Please do not touch this thread if you don’t understand what it’s about, I’m asking
if that doesnt work its a bugthread not a featurethread
Thread is now a Bug thread. This indicates a core code bug that a developer must resolved, not an error message or other support topic. Please do not misuse the Bug label. Use </helpthread:1028674284870180883> to switch the thread back to a normal help thread if you are not 100% confident it is a code bug.
This fixes the https://discord.com/channels/315163488085475337/1417879777821331496 by using a constructor for ticks
theres no chance to understand if you dont explain or showcase the issue
@visual dust
this was after everything
rimulus, you created a post criticizing a method without any further explanation, you were then provided with a solution which you again only critized without explaining what is essentially your problem
I can’t understand what I explained wrong, but here’s the problem: in Java, .getTicksLived() returns the entity’s lifetime in ticks, but because this value is divided by 20 afterward, it becomes impossible to get the result in ticks. For example, if I need to check whether an entity has existed for 1 tick or 2 or 16 ticks, I can only check 20, meaning one second
This makes sense, although I will ask why you need to check if an entity has lived for such a short period. Personal curiousity really.
I need to remove entities during the BlockPhysics event, but only those that appeared as a result of it. Since there’s no context for the entities, I wanted to use time_lived so I don’t remove nearby items, only those that appeared because of the BlockPhysics event
Entity
<entity> changes <block> (into <block>)
when an entity changes the material of a block.
when the entity that changed the block is a player. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.
<context.entity> returns the EntityTag that changed the block.
<context.location> returns the LocationTag of the changed block.
<context.old_material> returns the old material of the block.
<context.new_material> returns the new material of the block.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
Usually during physics it turns into a falling block right?
Block
This event may fire very rapidly.
<block> physics
adjacent:<block> to only process the event if the block or an immediately adjacent block (up/down/n/e/s/w) matches the LocationTag matcher specified. This can be useful to prevent blocks from breaking.
when a block's physics update.
<context.location> returns a LocationTag of the block the physics is affecting.
<context.new_material> returns a MaterialTag of what the block is becoming.
True - this adds switches in:<area> + location_flagged:<flag name>.
True - this adds <context.cancelled> and determines cancelled + cancelled:false.
Original problem is still valid and time lived should definitely be changed, just wondering if physics is related to falling blocks.
I've never used the block physics event.
This event triggers on any block update
Ah.
PR has been merged
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.)
@drifting sparrow