HomeJavaDatapacksDangercarts: Dangerous Minecarts
Dangercarts: Dangerous Minecarts
DatapacksJava

Dangercarts: Dangerous Minecarts

by clowderbop · on Modrinth

Which Minecraft do you have?

Every version of the game needs its own build. Pick yours, then download — the wrong build installs fine and then does nothing in the game. This mod is built for Data pack only.

⬇ Download for 1.21.1–1.21.4⬇ Download for 1.21
I don't know my version or loader
Open the Minecraft launcher and look at the profile you play on — it names both, like fabric-loader-1.21.4. The version also shows in the bottom-right corner of the game's main menu.
No loader in the profile name? Then it's plain Minecraft, and these mods won't run — you need Fabric or NeoForge installed first.

Dangercarts: Dangerous Minecarts

If a hunk of iron speeding down some tracks hits you, you'd expect some damage; however, you can stop minecarts going any speed with your body without any repercussions. This is especially weird if you enabled the Minecart Improvements experiment, in which Minecarts can go super fast.

With this data pack, minecarts now deal damage and knockback based on their speed! If you get killed by one, the death message will appropriately say that you got "smashed by a fast minecart".

Damage and knockback are dealt to all entities that can take it, which has an added bonus of killing or knocking off mobs from your rails, making your minecart not stop as often.

How does it work?

The data pack works by spawning an invisible slime named "a fast minecart" in front of the minecart when it should hit entities. Damage is then applied based on the speed of the Minecart as if it were a mace attack by our favourite invisible slime, a fast minecart.

Note: This datapack does not work in peaceful difficulty.

Configuration

You can set the speed threshold (in blocks per second) and damage values (in half hearts) for each speed using the following commands. You can set damage to 40 for a sure instant kill.

Setting Command
set_low_threshold /function dangercarts:config/set_low_threshold {value: <newvalue>}
set_medium_threshold /function dangercarts:config/set_medium_threshold {value: <newvalue>}
set_high_threshold /function dangercarts:config/set_high_threshold {value: <newvalue>}
set_low_damage /function dangercarts:config/set_low_damage {value: <newvalue>}
set_medium_damage /function dangercarts:config/set_medium_damage {value: <newvalue>}
set_high_damage /function dangercarts:config/set_high_damage {value: <newvalue>}

Presets

You can also use the following commands to set the values to some presets:

Default

/function dangercarts:config/preset_default
Setting High Medium Low
threshold 6 4 2
damage 7 4 2

Improved Minecarts Experiment with minecartMaxSpeed set to 22+

/function dangercarts:config/preset_improved_minecarts
Setting High Medium Low
threshold 21 15 10
damage 40 12 6

Important Notes

Uninstalling

To uninstall the datapack, run the following command:

/function dangercarts:uninstall

This will remove all the scoreboard objectives and data storage used by the datapack. After running this command, you should disable or remove the datapack using /datapack disable or manually removing it from the datapacks folder before restarting the world/server.

Reporting an issue / Contributing

Please report issues and contribute to the project on the Github page.

Credits

This data pack is an adaptation of Deadly Minecarts to make it work with versions 1.21.x, and with a few improvements sprinkled in. It also uses a square root function developed by NOPENAME.

Quick facts

Install steps are the general flow for this file type — see the MC Java Mods guides for the full walkthrough.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more