CC: Tweaked

CC: Tweaked

42M Downloads

Game Crashes when turtle block is exploded by null explosion

UnRealDinnerbone opened this issue ยท 4 comments

commented

Minecraft Version

1.18.x

Version

1.101.2

Details

Games crashes when a turtle is exploded from a null explosion (Example: Thermal Expansion Nuclear Grenade)

Crash Report: https://pste.ch/jelufulina.hs
Video: https://www.youtube.com/watch?v=EiUM6o9o3EI&ab_channel=MikeR

Original Report: FTBTeam/FTB-Modpack-Issues#2941

commented

While I can add a workaround for this, I think it's probably worth reporting to Thermal Core too. The explosion parameter isn't marked as @Nullable, which in the case of Forge's extension methods, normally means it should be treated as non-null.

commented

I'd agree with you, though this also seems to be an oversight on Forge's part and should be fixed there. There's absolutely a reason to have a location-sensitive query without requiring an Explosion object - it's simply a hole in the extension method.

commented

There's absolutely a reason to have a location-sensitive query without requiring an Explosion object

Hrmr, can you explain when this would be useful? I think from my perspective, even if you're rolling your own Explosion.explode() implementation, it still makes sense to pass an Explosion object around, just to provide consumer with additional context about the explosion.

In your case, it feels like it's probably worth creating an Explosion anyway, just so you can fire an ExplosionEvent.Start event, and permission mods can hook into it.

Sorry, realise this may sound more argumentative than I'm trying to be! Think I'm perhaps a little confused with what ThermalCore is trying to do here.

commented

I've fixed this on our legacy branches (1.16.5-1.19.2), as I'm not clear if ThermalCore is still being maintained for 1.18.2. That said, I'd really recommend you also fix this issue on your end.