Heyhey! Sorry if this is an obvious question, but I've done a lot of searching and haven't found anything specifically about this.
I'm attempting to create a block (torch) that removes itself after a set amount of time. I'm trying to do it with a block instead of a tile entity for performance reasons (but feel free to let me know if I'm just doing it wrong)
The whole world.scheduleBlockUpdate seems like the perfect solution, except this example use case:
1) place a torch that will expire in 1 hour
2) in 59 minutues, break the torch
3) place a new torch, hoping you've just bought yourself another hour of light
4) torch goes out in 1 minute, because the scheduled update from the first torch fires on the second one, as it has the same blockID, and it destroys itself.
intuitively, I'd like to just remove any scheduled updates for the coordinates of the block when I place a torch, but that doesn't seem possible. Is it possible? Am I crazy?