PaperMC / PaperMC/Paper

Leaves distance update event

Open
#12,752 0 comments 0 reactions 0 assignees View on GitHub

@Fisher2911 is already working on this.

Since Jun 27, 2025.

  • #12753 by @Fisher2911 — open
status: accepted
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?

It would be nice to have this feature to prevent / change the distance of leaves when their distance is updated internally.

This allows for making other blocks behave like leaves and logs. One example is if you want a note block with a specific state to act like a log. Then when the event is called, you can check the neighbors and set the leaves distance to 1 if one of the neighbors is the noteblock. This allows texture packs to be used to make custom logs without having to deal with all the different events that can cause a leaves distance to be updated, such as placing a block, breaking a block, pushing a block with a piston, etc.

Describe the solution you'd like.

I made a PR for the event which I will link to this issue.

Describe alternatives you've considered.

An alternative is to use the BlockPhysicsEvent, but that is a general-purpose event that also might not get called every time the distance of leaves are updated.

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 linked pull request #12753 and trace how the proposed event relates to internal leaves-distance updates. Compare it with BlockPhysicsEvent and the listed update causes, then verify that the new event supports changing leaves distance for each relevant update path.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.