Skip to content

feat: fully implement Player#sendFakeBlock - #3009

Open
Timongcraft wants to merge 6 commits into
EngineHub:masterfrom
Timongcraft:feat/fully-impl-fake-block
Open

feat: fully implement Player#sendFakeBlock#3009
Timongcraft wants to merge 6 commits into
EngineHub:masterfrom
Timongcraft:feat/fully-impl-fake-block

Conversation

@Timongcraft

@Timongcraft Timongcraft commented Aug 15, 2026

Copy link
Copy Markdown

Overview

This PR aims to improves the Player#sendFakeBlock implementation to support non structure-blocks (used by the CUI).

Description

Replaces the structure block specific implementation with a generic implementation to allow API users to send fake blocks containing NBT such as player heads, banners etc.

TODO

  • implement other platforms
  • fix breakage on spigot

@Timongcraft
Timongcraft force-pushed the feat/fully-impl-fake-block branch from b1822f7 to 3d668ae Compare August 17, 2026 13:31
fix: impl in general -> was missing a setLevel call  -> using public factory method instead of internal constructor like in core module

tested on spongevanilla-1.21.10-17.0.0 (sponge's stable)
(26.2 and their latest snapshot 26.3 both have issues)
@Timongcraft
Timongcraft force-pushed the feat/fully-impl-fake-block branch from 3d668ae to 1ab67d3 Compare August 17, 2026 16:49
@Timongcraft
Timongcraft marked this pull request as ready for review August 17, 2026 16:52
@Timongcraft
Timongcraft requested a review from a team as a code owner August 17, 2026 16:52
@Timongcraft

Timongcraft commented Aug 17, 2026

Copy link
Copy Markdown
Author

I'm not sure if the old BukkitImplAdapter#sendFakeNBT(Player, BlockVector3, LinCompoundTag) should be removed directly or marked for removal since it shouldn't be used externally but is available in the bukkit module and kinda declared as public api here, no?

…getBlockEntity), also different name in spigot

 -> replace round-tripping through TileState with only the type parsing
chore: refactor core impl to also directly parse the BE type id
chore: fixup indentation

tested on paper 26.2-112 & spigot 26.2 4647-Spigot-8db49a2-efaae75 (spigot has issues unrelated to this pr though)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant