chunkymonkey
chunkymonkey copied to clipboard
(unconfirmed) don't drop items from far away chunks before X minutes
(this is more like a note to self)
I didn't actually test this, but unless this is handled client-side we are probably destroying all items from chunks as soon as they are unsubscribed. I didn't confirm but I believe we unsubscribe right after a player moves away from that chunk.
The desired behavior is that dropped items remain spawned for at least 5 minutes, so the player is able to recover them.
I'd have to check the behaviour, but the intent is that the client is told to "forget" about items that are in chunks outside their subscribed chunks - the packet naming is perhaps poor (PacketEntityDestroy or similar). The chunk should remember the items, and tell clients about them when they return. Having items disappear after 5 minutes sounds good - I'm not sure how long items last on the official server, but that's easily tuneable.
Having timed actions in chunks is a prereq for a bunch of things:
- items expiring
- blocks changing (think redstone ore and redstone wire, etc.)
- objects moving (assuming they don't move every tick - which they probably do, so might discount this from the list)
- block behaviour (furnaces)
- fluid movement