[SPIGOT-7806] Drops in PlayerDeathEvent and EntityDeathEvent ignore the origin of the drop for Location Created: 30/Jun/24 Updated: 25/Dec/24 Resolved: 06/Jul/24 |
|
Status: | Resolved |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | Doc | Assignee: | Doc |
Resolution: | Fixed | Votes: | 1 |
Labels: | None |
Issue Links: |
|
||||||||||||||||||||
Version: | 1.21 | ||||||||||||||||||||
Guidelines Read: | Yes |
Description |
Based in https://hub.spigotmc.org/jira/browse/SPIGOT-7800 https://hub.spigotmc.org/jira/browse/SPIGOT-7801 Currently all the drops are managed in the same list passed to events, this ignore the "origin" and can cause a diff behaviour from vanilla where:
For handle this the options can be:
|
Comments |
Comment by Grant Gryczan [ 05/Jul/24 ] |
Thank you. The PR fixes both issues! |
Comment by md_5 [ 05/Jul/24 ] |
(--rev 1.21 --pr craftbukkit:1445 should be the correct arguments for that I think) |
Comment by Doc [ 05/Jul/24 ] |
Ok i make https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/1445/overview with a suggestion for just mark the item added for inventory internally and check that in the event this allow detect (in case other plugins not mess with the items added) the behaviour for the items. I test the PR with Graves for https://vanillatweaks.net/picker/datapacks/ and generate correctly the grave with the items of the inventory
GrantGryczan if you use BuildTools can try the PR for any additional test or comments. |
Comment by Grant Gryczan [ 05/Jul/24 ] |
It's worth noting data packs (such as Graves from Vanilla Tweaks) sometimes use a player loot table to save data from before the player died (without requiring /gamerule keepInventory true). It's otherwise impossible to do so (at least without saving the player's NBT data every tick, which would be just about the laggiest thing a data pack can do). The loot table would contain an item that copies data from the player onto it via an item modifier, so that the data is persisted and can be read after the player dies. And with this bug, any data packs that rely on this method of saving player data on death (such as items from their inventory or how much XP they had) won't find the loot table item. |
Comment by Grant Gryczan [ 04/Jul/24 ] |
Correction: the inventory should spawn -0.3 from eyes. |