
Slight adjustments that could make this work better
ryantheleach opened this issue · 4 comments
If you track when players or dispensers/droppers drop items, you would be able to tell the difference between 'intentionally' marked mobs by dropping them pumpkins etc, vs mobs that have inadvertently picked up dirt, or a chicken egg or something.
This would probably provide saner defaults.
I can add a config to allow whitelisting certain items etc but it needs further testing and might hog performance. My goal is to keep it as barebones as possible. I'll see how it goes thanks for the suggestion.
A simple whitelist of items that retain the no-despawn behavior would be useful indeed. I would put the carved pumpkin as a default item in that list, as it is common with high throughput farms to dispense pumpkin heads on mobs.
Have to agree hard with MeeniMC on the Carved Pumpkin suggestion. Dispensing them onto mobs to remove them from the mob cap and keep them from despawning is a very common thing to do in Technical Minecraft and is unfortunately the only automatable way to keep mobs from despawning. Sadly even making Nametags dispensable wouldn't be a full replacement in a number of situations as nametags are not re-usable in the same way as Pumpkins.
I've added this in 1.5.0, there's no default item but you can specify multiple items through the config/commands using /letmedespawn addPersistenceEnabler
Also learnt that in vanilla dispensers make mobs persistent when you use them to equip a mob with armor, this is separate from when they pick up items and become persistent, this wouldn't matter much with LMD as the next time that mob picks up an item its persistence will be reset unless of course now in 1.5.0 if it has the specified item equipped in the head slot.