PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.66k stars 2.25k forks source link

Creeper Explosion Radius can't be negative on Paper #10460

Open PumpkinKnightStudio opened 4 months ago

PumpkinKnightStudio commented 4 months ago

Expected behavior

While using this following command in Vanilla: summon creeper ~ ~ ~ {ExplosionRadius:-1b,Fuse:0} will create an explosion Paper: summon creeper ~ ~ ~ {ExplosionRadius:-1b,Fuse:0} the creeper will not explode

This is commonly used in Player Launch Datapack

Observed/Actual behavior

The creeper should explode, applying the motion to player

Steps/models to reproduce

Use this command: summon creeper ~ ~ ~ {ExplosionRadius:-1b,Fuse:0} While ExplosionRadius is negative, it will not explode

Plugin and Datapack List

This is a code from Datapack which perform a Player Launch System

Paper version

This server is running Paper version git-Paper-496 (MC: 1.20.4) (Implementing API version 1.20.4-R0.1-SNAPSHOT) (Git: 7ac24a1 on ver/1.20.4) You are running the latest version Previous version: git-Purpur-2176 (MC: 1.20.4)

Other

Since this is used by many datapack to launch player, I believe using ExplosionRadius:-1 should be possible

Lulu13022002 commented 4 months ago

It seems that spigot explicitly clamp the radius to 0. https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/nms-patches/net/minecraft/world/level/Explosion.patch#36 https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/nms-patches/net/minecraft/world/level/Explosion.patch#57