copygirl's Wearable Backpacks

copygirl's Wearable Backpacks

15M Downloads

Allow items to be captured by grave mods on death

copygirl opened this issue ยท 3 comments

commented

(Making an issue as a reminder for myself, because this was meant to go into the previous release.)

Currently, Wearable Backpacks uses LivingDeathEvent to drop the items. Which is good, because eventually, I would like mobs to be able to wear backpacks again, too. But unfortunately, this prevents the dropped items from being captured and stored safely by gravestone mods and such. So the solution is to special-case this for players and instead use PlayerDropsEvent for them.

commented

I play your mod together with the Gravestone Mod by EuhDawson.
It works very well so far. If I die a gravestone is generated with my items in it and the backpack is generated right next to it with its item separately in it.

commented

When the dropAsBlockOnDeath option is turned off, the contents of the backpack drop along with the backpack item itself. The option itself can be useful on servers with protected areas, where you might otherwise be unable to pick up the backpack again. Otherwise, the backpack itself can still be destroyed or picked up by another player, so it might be nice to instead store it safely inside a gravestone.

commented

Okay, I think I'm not actually fixing this, as it would just need weird special-casing code that just feels wrong. In the ideal case, items dropped in LivingDeathEvent should just be captured instead of having to use PlayerDropsEvent, before which the player's equipment (including equipped backpacks) is already dropped.