[SPIGOT-6159] Age does not allow you to set below zero Created: 28/Sep/20  Updated: 29/Sep/20

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Antimony L Apodaca Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: 1.16.3, falling_block, falling_sand, ticks_lived
Environment:

Windows 10
Local test server being accessed by local client


Version: CraftBukkit version git-Spigot-17d78db-a339310 (MC: 1.16.3) (Implementing API version 1.16.3-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

Currently, there is a check that prevents "Age" from being set to less than zero:

however, when messing around with Vanilla falling_block entities, the traditional way of preventing the block from despawning is to set the life of the falling_block to negative max int (- 2147483647) using the summon command (summon falling_block  ~   {Time:-2147483648}). With this check here, we are unable to set the ticks lived of a block using spigot and instead need to do it through vanilla mechanics instead. Please consider removing this check.



 Comments   
Comment by Dyens [ 29/Sep/20 ]

The check should remain as TicksLived says how long the entity has been alive, and that time should never be less than 0.

The issue here is CraftFallingBlock#setTicksLived() setting both the tickCount and the FallingBlock Time when calling that method. FallingBlock Time is used by the entity to decide when to despawn and if it should remove the block when spawning.

Note: Was initially only gonna do this comment, but after taking a look into FallingBlock metadata I noticed some missing methods so instead I opened SPIGOT-6162

Generated at Tue Apr 15 11:10:16 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.