You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: stop calling removed World.spawn Consumer overload on Paper 1.21+
The 1.1.0 jar was unusable on Paper 1.21.x: every render tick threw
NoSuchMethodError pointing at World.spawn(Location, Class,
org.bukkit.util.Consumer). The 1.20.1 paper-api dev bundle still
declares that deprecated org.bukkit.util.Consumer overload, so our
lambdas were resolved against it at compile time. Paper 1.21 actually
honoured the forRemoval marker and deleted the method, leaving the
shipped class file pointing at a method that no longer exists.
The Paper 1.21+ replacement uses java.util.function.Consumer, but we
cannot rely on either type being present everywhere in the supported
1.20.1 -> 26.x range. The smallest portable fix is to drop the Consumer
overload entirely and use the long-stable two-argument
World.spawn(Location, Class), then configure the entity immediately
afterwards.
- Convert all four spawn helpers (item display, text label, interaction
hitbox, block display) to a two-step spawn: World.spawn(Location, Class)
followed by the same property assignments that previously lived inside
the consumer.
- Set setVisibleByDefault first so the entity tracker tick that picks the
spawn up cannot broadcast a one-frame public-visibility window before
the plugin narrows viewers.
- Bump the project version to 1.1.1 and add a CHANGELOG entry that
describes the hotfix in both English and Simplified Chinese.
Verified: ./gradlew test (full suite) passes against the 1.20.1
baseline; the resulting jar no longer references the removed Consumer
overload, so deployment on Paper 1.21.x stops crashing per render tick.
- Paper 1.21+ render crash fix: every render tick threw `NoSuchMethodError: org.bukkit.World.spawn(Location, Class, org.bukkit.util.Consumer)` on Paper 1.21.x because Paper removed the deprecated `org.bukkit.util.Consumer` overload while the 1.20 dev bundle had bound our lambdas to it at compile time. The four entity factories (tile/label/interaction/block) now use the long-stable two-argument `World.spawn(Location, Class)` and configure the entity immediately afterwards, restoring rendering across the full 1.20.1-26.x range.
15
+
- Visibility ordering hardening: `setVisibleByDefault` is now called first so the entity tracker cannot publish a one-frame window of default visibility before the plugin restricts viewers.
16
+
3
17
## 1.1.0 - 2026-06-16
4
18
5
19
Compatibility and architecture release for the post-1.0.0 Paper/Folia line.
0 commit comments