[SPIGOT-7191] TNT minecart explosions crash the server Created: 01/Dec/22  Updated: 25/Dec/24  Resolved: 01/Dec/22

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Tagavari Assignee: Doc
Resolution: Fixed Votes: 0
Labels: 1.19.2
Environment:

macOS Ventura 13.0.1 / Apple M1

openjdk version "17.0.4.1" 2022-08-12 LTS
OpenJDK Runtime Environment Microsoft-40354 (build 17.0.4.1+1-LTS)
OpenJDK 64-Bit Server VM Microsoft-40354 (build 17.0.4.1+1-LTS, mixed mode)

 


 

Windows 11 Home 22H2 / Intel i7-8565U

openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, sharing)


Attachments: PNG File 2022-12-01_08.21.38.png     Text File crash-2022-12-01_08.23.29-server.txt     Zip Archive world-aftercrash.zip     Zip Archive world-beforecrash-1.zip    
Version: CraftBukkit version 3608-Spigot-6198b5a-b5aa0be (MC: 1.19.2) (Implementing API version 1.19.2-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

If a TNT minecart explodes, the server will crash. Attempting to restart the server afterwards will cause the server to crash immediately after loading the world with the same error, rendering the world unusable until the TNT minecart is removed externally.

This crash occurs on a fresh Spigot server with no plugins or config changes. This issue does not occur on a vanilla 1.19.2 server.

I've attached 2 world files to help reproduce this issue. world-beforecrash includes the world shown in the screenshot - pull the lever to cause the TNT minecart to explode and crash the server. world-aftercrash is a copy of the world after causing the server to crash, where loading the world in a Spigot server will cause the server to crash on its own.

Opening a world that caused the Spigot server to crash in vanilla will simply have the minecarts explode.

Please let me know if there is any more information I can provide. Thank you!



 Comments   
Comment by Phoenix616 [ 01/Dec/22 ]

Imo. the far better solution would be to make ExplosiveMinecart actually extend Explosive. Not sure why that functionality was never added.

Comment by FreeSoccerHDX [ 01/Dec/22 ]

The problem was is new beause recently there was a missing Event for the explode of the entity... 

They added this:

ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) this.getBukkitEntity(), (float) (4.0D + this.random.nextDouble() * 1.5D * d1), false);

But need to change it to this:
ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), (float) (4.0D + this.random.nextDouble() * 1.5D * d1), false);

Generated at Sun Mar 30 17:57:28 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.