chunkymonkey icon indicating copy to clipboard operation
chunkymonkey copied to clipboard

(unconfirmed) don't drop items from far away chunks before X minutes

Open nictuku opened this issue 13 years ago • 1 comments

(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.

nictuku avatar May 12 '11 18:05 nictuku

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

huin avatar May 12 '11 19:05 huin