Rohaan

need to make a mod that nerfs the explosion damage dealt to players by TNT minecarts slightly, they should be nerfed by a value that I can edit which just changes the percentage of vanilla damage dealt, alongside a damage cap which should be configurable as a percentage of every players max health. Both of these should be editable in a config file, and in the config there should be an option to disable crystal explosions, respawn anchor explosions in the overworld and the end, as well as edit tnt damage to buff them

Kodari AI
KodariOct 28 at 4:44 pm 3
TntMinecartDamageNerf
A Minecraft Fabric mod that modifies explosion damage from TNT minecarts, reducing it by a configurable percentage of vanilla damage. Includes a configurable damage cap as a percentage of the player's max health. Config file allows disabling crystal explosions, respawn anchor explosions in the overworld and end, and optionally buffing TNT damage. All settings are editable via a configuration file for flexible gameplay balancing.
  1. Add the Fabric mod entry point and editable config.

  2. Adjust player damage from TNT minecarts, including a max-health-based cap.

  3. Add config switches for crystal and respawn-anchor explosions, plus configurable TNT scaling.

Created Blast Control, a Fabric 26.3 mod. On first launch, it creates config/blastcontrol.properties:

  • tnt_minecart_damage_percent=90.0 scales TNT minecart damage to players; values above 100 buff it.

  • tnt_minecart_max_health_cap_percent=50.0 caps that damage at a percentage of the player’s max health.

  • Separate options disable End Crystal explosions and respawn-anchor explosions in the Overworld or End.

Restart the game after editing the config for changes to take effect.

Rohaan

add commands to edit the config settings in game, and also a reload command to reload the config

Kodari AI
KodariOct 28 at 4:57 pm 2

Added moderator-only commands; changes apply immediately and are saved to config/blastcontrol.properties.

  • /blastcontrol set tnt_minecart_damage_percent <number>

  • /blastcontrol set tnt_minecart_max_health_cap_percent <number>

  • /blastcontrol set disable_end_crystal_explosions <true|false>

  • /blastcontrol set disable_respawn_anchor_explosions_overworld <true|false>

  • /blastcontrol set disable_respawn_anchor_explosions_end <true|false>

  • /blastcontrol reload reloads the settings from the config file.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
gradle.properties
settings.gradle
Code
9 485
src/main/java/dev/kodari/blastcontrol/BlastControl.java
package dev.kodari.blastcontrol;

import net.fabricmc.api.ModInitializer;

public final class BlastControl implements ModInitializer {
    @Override
    public void onInitialize() {
        BlastControlConfig.load();
        BlastControlCommands.register();
    }
}