Repository navigation
Replies: 8 comments
|
We don't really have the context of this here either |
|
You try with this event? https://papermc.io/javadocs/paper/1.18/io/papermc/paper/event/player/PlayerItemFrameChangeEvent.html |
So, item frame dropping code is too disconnected from the event firing?
It doesn't fire when an item frame itself gets removed tho. I don't think it's applicable in my situation. |
|
ganging break is a generic event, which calls off into other logic which determines what if anything drops, etc; I don't see how it would attach to those at all given how that works at all, we couldn't tell you if/what will drop, etc |
|
Can you cancel the event and then remove it yourself and handle drops as such? Some hanging things drop multiple items vs just 1. Paintings and leashknots can only drop 1, but item frames may drop 2. |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
Hey @imDaniX, have you had the chance to try out Machine-Marker's suggestion? |
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem?
I need to drop a specific item when a specific item frame is being broken.
Describe the solution you'd like.
A method
setDroppedItemonHangingBreakEventwhich sets the item to drop. Probably with an option to drop nothing if provided item is null (or, to be on brighter side, has typeAIR?)Describe alternatives you've considered.
Caching the location on
HangingBreakEventand checking it onItemSpawnEvent; or completely cancelling the event and handling the removal myself. Both sounds to me as junky workarounds.Other
No response
All reactions