For too long has the world of minecraft been subject to a performance decision made for computers the better part of a decade ago. We been willing to accept that our items despawn after 5 minutes, and that's the way it has to be. We have been making our butt-naked death runs across the nighttime landscape, in deference to our game's hunger for freeing resources. And when our friends died, we have stood there, juggling their items onto the ground frantically, in fear of that despawn that comes without warning or mercy.
Tonight, it ends. Tonight, we make minecraft wait for us, and also warn us when items are about to despawn.
This mod allows you to set custom despawn timers for a number of fine-grained cases, allowing you to dramatically raise the timer for items of potential interest (particularly items dropped due to player activity), without compromising server performance by persisting all the random environmental drops for as long. It also features an exceptions list, allowing you to give high-volume problem drops their own lower despawn time that supercedes the other rules you set.
Additionally, as of 2.0, items will start to jitter around 15 seconds before despawning, intensifying until they finally flicker out of existence. Don't be caught by surprise!
Bugfix release 2.5: I found an alternative to using NBT data, to eliminate a problem that can prevent items from stacking
I made this mod because it just didn't make sense to me that the item despawn time was hardcoded at 5 minutes, and that everyone has just accepted that. 5 minutes is far too short, on a pure gameplay balance basis, for your stuff to magically disappear, and on a performance optimization basis, is just not needed any more. It is my hope that this mod will lift a source of stress from players everywhere, that was never an interesting part of the gameplay design. It is also versatile enough to use for the opposite... I could imagine a PVP kit server wanting dramatically faster despawns.
This mod allows you to set independent despawn timers for:
- drops from player death
- drops from mob death
- drops from mobs killed by a player
- items thrown by players
- items mined by players
- and of course, "other" for anything else!
To those who would call this cheating: You have accepted a performance optimization as a part of your game balance. Go to the hardware store, buy yourself a pickaxe, take it home, throw it on the floor, and let me know when it magically disappears. If the 5 minute timer has become fun for you, good for you, but I can't imagine running a server with 5 minute despawns again.
Technical notes: minecraft EntityItems, aka dropped items, have a lifespan that they count up towards. The 5 minute standard is hardcoded into the constructor, but saved into a modifiable field. This mod intercepts items as they are spawned into the world and tweaks that lifespan value. The jittering is performed by re-randomizing the random hoverStart field on dropped items that is the basis for their rotation and up-and-down wiggling.
This is by far the best mod i've ever seen. This release marks a glorious day in the history of mankind. A day that people can mark entire mods of not being worthy to have their drops stay around. A day that people can allow for their things that they drop to not despawn. A day the world is finally united in peace. Thank you oh glorious capitalthree. May you never be forgotten. RIP
Honestly should be a vanilla thing anyways, the amount of crap items that just stay in my world for who knows how long is just a bit excessive. As a feature suggestion, make the items fade away instead of just disappearing, it would make things a little more urgent.
darkevilmac: your feature request has been filled, well, mostly. Fading was too hard but I made it so items will jitter around. Jar for 1.8.9 is uploaded to curse. 1.9 will come shortly. 1.7 might take a bit longer pending backporting unascribed's LambdaNetwork networking library.
Just a heads up for my lovely users, the new version with dropped items jittering before despawning, is up for 1.8 and 1.9. I will have to backport unascribed's LambdaNetwork library for the 1.7.10 port so it may be a few days.
What I see is similar to what my mod does, where it traps a few events and changes the EntityItem.lifespan property. Lingering Loot, though, is designed to avoid stomping over settings from other mods and only adjusts timers from the EntityItem default, so the ultimate effect will be that Iguana Tweaks settings override mine.
Iguana Tweaks seems to only do these actions if your configured lifespan is other than 6000. So if you want to use Lingering Loot's configuration, simply set all the lifespan values to 6000 in Iguana Tweaks, except for items thrown by a player, which don't have that check (mistake? Hopefully that gets changed.)
If Iguana Tweaks has enough configurability for you, I'd suggest avoiding Lingering Loot. Otherwise, I'd go based on what I said above, but do your own testing and make sure it's working properly. You might also suggest that the Iguana Tweaks developer (parker8283?) take a look at my mod and copy my configuration options, so that there will be no need to run both mods. Having 2 mods that both intercept all item spawns and try to muck with the lifespan is just not ideal.
Final note: there's no event that fires when another mod alters a dropped item's lifespan, so I have no way to track all those changes. Therefore the new 15 second about-to-despawn warning will not function properly if other mods lower an item's lifespan after my mod has added them to its tracking queue. (If lifespans are pushed up, Lingering Loot will notice and send them back into the queue)
Hey capitalthree, this looks really interesting! But would it be possible to make it where specific item IDs can be declared in the config file for particular behaviors? What I have in mind specifically is that I'd like to be able to have floppy disks from Computer Craft not despawn if they're ejected from a drive and, uh, "neglected" for a while, but at the same time I don't need a larger general category of drops to enjoy the same benefit.