Skip to main content
Discovery icon for PaperMC Discord server

PaperMC

17,353 Online
55,175 Members
# paper-dev3 people

capturing item entities from explosions

Paper lacks API for explosion item drops, but developers can intercept them using internal ServerLevel captureDrops during the explosion.

  • Paper does not provide a direct API event to retrieve all item entities generated specifically by an explosion
  • ItemSpawnEvent fires for drops, but linking individual item spawns back to a specific explosion is impractical
  • Setting ServerLevel.captureDrops to a custom list before triggering the explosion redirects generated drops into that collection
  • Developers must verify no capture is already active, reset captureDrops to null in a finally block, and manually spawn captured items
Summarized from recent messages, might be inaccurate

More conversations

Talk, Play, &
Hang Out

Find your space to hang out, discuss the latest updates with the party chat, and see who's down to join your next match.
Get App