-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Description
Expected behavior
When a TNT block is primed by redstone, TNTPrimeEvent#getPrimingBlock() should return the redstone component (e.g., lever, button, repeater) that triggered it — as it did before Minecraft 1.21.2.
Observed/Actual behavior
Since Minecraft 1.21.2, when TNT is primed via redstone, TNTPrimeEvent#getPrimingBlock() always returns null.
After checking the NMS, it seems that the Block#neighborChanged method signature changed from BlockPos sourcePos to @Nullable Orientation wireOrientation, and now the value passed to the event is always null.
Steps/models to reproduce
Create a simple plugin that listens to TNTPrimeEvent.
ej:
@EventHandler
public void onTNTPrime(TNTPrimeEvent event) {
if (!event.getCause().equals(TNTPrimeEvent.PrimeCause.REDSTONE)) return;
logger.info(event.getPrimingBlock() + "");
}Plugin and Datapack List
Only the test plugin described above (no other plugins or datapacks).
Paper version
> ver
[13:18:05 INFO]: Checking version, please wait...
[13:18:05 INFO]: This server is running Paper version 1.21.8-60-main@29c8822 (2025-09-06T21:49:13Z) (Implementing API version 1.21.8-R0.1-SNAPSHOT)
You are running the latest version
Other
This behavior seems to originate from CraftBukkit’s change to the TNT block logic:
Although the change is technically on CraftBukkit’s side, since Paper is now a hard fork, it might be worth considering whether restoring the previous behavior (returning the redstone source block) would be beneficial for plugin compatibility.
Would you consider handling this case to maintain consistency with pre-1.21.2 behavior?