PaperMC / PaperMC/Paper

Add BlockDropItemEvent::addDrop(ItemStack)

Open
#12,278 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
12.7k
Forks
3.5k
Avg merge
3d 13h
Merged PRs (30d)
11

Description

Is your feature request related to a problem?

There is no way for a plugin to directly create an instance of an Item

Describe the solution you'd like.

Add BlockDropItemEvent::addDrop(ItemStack)

Describe alternatives you've considered.

I could use World drop item, but this is rather annoying and breaks the event handling chain of BlockDropItemEvent as any downstream handlers will encounter an empty drops list (or not find the Item I wish to add) and will have to also hook an item spawn event and have no idea that spawn was caused by a block having "dropped" it.

Other

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with BlockDropItemEvent and its existing drop-list handling to understand how drops are exposed to downstream event handlers. Add the requested addDrop(ItemStack) API and verify that an added drop remains visible through the event chain; the issue does not name a file or test.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, game-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.