Replies: 8 comments
-
We don't really have the context of this here either |
Beta Was this translation helpful? Give feedback.
-
You try with this event? https://papermc.io/javadocs/paper/1.18/io/papermc/paper/event/player/PlayerItemFrameChangeEvent.html |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
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. |
Beta Was this translation helpful? Give feedback.
-
Hey @imDaniX, have you had the chance to try out Machine-Marker's suggestion? |
Beta Was this translation helpful? Give feedback.
-
Yup, that's basically what I did. See here. |
Beta Was this translation helpful? Give feedback.
-
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
setDroppedItem
onHangingBreakEvent
which 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
HangingBreakEvent
and checking it onItemSpawnEvent
; or completely cancelling the event and handling the removal myself. Both sounds to me as junky workarounds.Other
No response
Beta Was this translation helpful? Give feedback.
All reactions