Skip to content

fix: prevent TNT minecarts from exploding if TNT host option is disabled#921

Merged
codeHusky merged 1 commit intosmartcmd:mainfrom
Alezito2008:fix/tnt-minecart-host-options
Mar 8, 2026
Merged

fix: prevent TNT minecarts from exploding if TNT host option is disabled#921
codeHusky merged 1 commit intosmartcmd:mainfrom
Alezito2008:fix/tnt-minecart-host-options

Conversation

@Alezito2008
Copy link
Contributor

Description

Fixed a gameplay inconsistency where TNT Minecarts would ignore the "TNT Explodes" host option, allowing them to explode even when TNT was disabled for the world.

Changes

Previous Behavior

TNT Minecarts would always explode regardless of the world's host settings. This allowed for accidental or intentional griefing in worlds where the host specifically disabled TNT.

Root Cause

The MinecartTNT::explode function lacked a check for the eGameHostOption_TNT flag

New Behavior

TNT Minecarts now respect the TNT explodes option.

Fix Implementation

Wrapped the explosion and entity removal logic inside a conditional check for app.GetGameHostOption(eGameHostOption_TNT)

AI Use Disclosure

No

Related Issues

@Alezito2008
Copy link
Contributor Author

Minecraft.2026-03-08.03-37-22.2.mp4

@eh-K
Copy link
Contributor

eh-K commented Mar 8, 2026

Nice find 🧠

@codeHusky codeHusky merged commit d461012 into smartcmd:main Mar 8, 2026
1 check passed
retroohmygod pushed a commit to retroohmygod/astrasmcfork that referenced this pull request Mar 8, 2026
piebotc pushed a commit to piebotc/LegacyEvolved that referenced this pull request Mar 9, 2026
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.

[Bug] Disabling TNT does not disable TNT minecart explosions

3 participants