Compatibility
Minecraft: Java Edition
Platforms
Supported environments
75% of ad revenue goes to creators
Support creators and Modrinth ad-free with Modrinth+Creators
Details
Train's Tweaks
Tweaks you won't find anywhere else!*
I make no guarantee any particular tweak is exclusive to Train's Tweaks
Train's Tweaks allows users and modpack developers to overcome certain hardcoded aspects of Minecraft. With Train's Tweaks, you can take your customization of Minecraft to the next level!
This mod is a compilation (and port to multi-platform) of several of my previous tweak mods, other tweaks I've found myself wanting while making modpacks, and user requests.
Feature | Description | Enabled by default? | Compatibility notes |
---|---|---|---|
AttackSpeed | Properly disconnects the attack speed and block break speed attributes. Make Haste and Mining Fatigue only affect block break speed. Conduit Power will no longer include a Haste-like effect, but Conduit can be configured to grant Haste (in addition to Conduit Power) to make up for this. Dedicated attack speed effects are included but unused by default. | No | The implementation of this feature is necessarily somewhat jank as it has to modify code that is loaded early. Effect description mods may have incorrect descriptions. A lot of mods have hardcoded checks for haste/mining fatigue which may influence attack speed in some fashion. |
Cure | Configure Zombie Villager curing. Add effects that count as Weakness to the config file, and use the item tag trains_tweaks:curing_items to change which item(s) start the curing process. Or use trains_tweaks:instant_curing_items (which has Enchanted Golden Apple in by default) for instant conversion. |
Yes | |
Difficulty | Modify how difficulty works; Option to remove damage multiplier from difficulty setting and apply constant modifiers to regional difficulty. | No | Your configuration may have unintended consequences, especially with other mods who depend on these values. Use these config options sparingly |
Experience | Configure the experience/level curve. Many options are available; choose from an increasing formula (Curve Mode) or a fixed amount of experience for each level. See this spreadsheet for comparisons. | No | This is a port of my LinearLevels mod and is incompatible with forks of it such as Fixed Levels. Also, XP storage mods will not use the correct numbers (unless they dynamically calculate a ratio of xp-to-level using Player#getXpNeededForNextLevel ) |
FireResistant | Allows the user to define which items have the fire-resistant property (or not) that Netherite items do using the item tags trains_tweaks:fire_resistant or trains_tweaks:not_fire_resistant . |
Yes | If Lychee is installed, trains_tweaks:fire_immune will not function. you should use the lychee:fire_immune item tag instead. trains_tweaks:not_fire_immune will still function in this case (assuming it's enabled in the config) |
Loot | Provides loot functions; currently only trains_tweaks:enchant_treasure and trains_tweaks:enchant_curse which both work like, and have the same options as, minecraft:enchant_randomly -- except it always provides a max level (non-curse) treasure enchantment (former) or curse (latter). Does absolutely nothing if you don't use these functions in a datapack |
Yes (cannot be disabled) | Future versions of NeoForge might not like how these functions are registered but that shouldn't be too hard to fix |
MobDrops | If enabled, replaces hardcoded mobs drops such as Nether Star, Chicken Egg, and Wither Rose with loot tables. See config file for loot table names. Also lets you enable baby drops. | No | Provided loot tables produce similar results to vanilla; you must make a datapack yourself to see changes. |
PowderWalking | Allows the user to define which items allow entities to walk on Powder Snow using the item tags trains_tweaks:powder_walking_item (for mainhand or offhand) or trains_tweaks:powder_walking_armor (for all armor slots). |
Yes | |
Rarity | Allows the user to define rarity for items using item tags (trains_tweaks:common to trains_tweaks:epic ). Prevents enchantments from changing an item's rarity (can be disabled). Train's Tweaks also provides Item Modifiers so commands or loot tables can easily change the rarity of an individual item. |
Yes | This works by setting the rarity component on tick; this might impact performance but I haven't tested. Removing the item from every rarity tag will only reset the rarity if Restore Default Rarity option is enabled |
SpawnsWith | Define what equipment mobs spawn with using the Equipment loot tables added in 1.21. This means you can disable zombies spawning with shovels, for instance. See below for more details. Note that this can cause issues (such as mobs not spawning) with misconfigured loot tables! | No* (Yes if you're a developer) | Mods that inject into any particular vanilla mobs' populateDefaultEquipmentSlots method probably interferes with this; ideally, if you wanted to use this, you would disable other mods' equipment spawning feature and then add that mod's equipment to the Train's Tweaks loot table(s) |
TameOcelot | Makes Ocelots tameable into cats again. Can be configured to produce a specific cat variant. | Yes | |
Yeet | Configs relating to throwing things; makes fire charges throwable, snowballs inflict freeze ticks, and Bottle O' Enchanting grant 10 xp by default | Yes | The "Snowballs Freeze Mobs" mod does not actually inflict freeze ticks, only inflicting blindness, so it should be compatible |
Zzz | Config options relating to beds and sleeping; by default, sleep time reduced to 60 ticks (or instant in creative), sleeping heals players, and entities can sleep through poison damage. Adds options to remove debuffs after sleeeping and to change client sleep overlay color. | Yes |
About the SpawnsWith feature
If the SpawnsWith feature and "Generic Mob Tables" option are enabled, mobs that are capable of spawning with armor (for example, zombies and skeletons) will instead roll the trains_tweaks:equipment/generic
loot table.
From here, equipment that is rolled will be equipped on the mob. The loot table is rolled with the local difficulty where the mob is spawning as the luck value, making it possible for different rates on different difficulties (using "bonus_rolls" and "quality" fields).
Additionally, for specific vanilla mobs that can spawn with equipment (see table below), there are config options to use a loot table instead of the vanilla equipment-setting code. These loot tables can be found here. These too are rolled with local difficulty passed as luck. I tried to make the default ones 1:1 with vanilla, but due to loot tables inherently not being as flexible as code, it is recommended you only enable config options per mob that you intend to customize the equipment loot table of.
The drop chance of all items generated when any SpawnsWith equipment table is not defined in the table, but rather the config file.
The Carved Pumpkin/Jack-o-Lantern helmet spawns on Halloween cannot overwrite helmets equipped by equipment tables.
Enchantments can be defined in generic or specific loot tables, but the vanilla logic that uses the minecraft:on_mob_spawn_equipment
enchantment tag still runs. This can be disabled by overriding and emptying said tag.
However, raid mobs have different hardcoded enchantment generation, which currently cannot be changed.
Mobs that pick up items will still drop picked up items 100% of the time.
Implemented Mobs
Mob | Generated loot goes to | Spawns with generic table if enabled? | Notes |
---|---|---|---|
Skeleton, Stray, and Bogged | Both hands | Yes | All skeletons besides Wither Skeleton use the same loot table (trains_tweaks:abstract_skeleton ) because they all use the same code for spawning with a bow. |
Fox | Main hand (mouth) | No | |
Drowned | Main hand | No | 3% offhand nautilus shell remains hardcoded |
Piglin | Armor only | No | 50% golden sword 50% crossbow remains hardcoded |
Piglin Brute | Both hands | No | |
Pillager | Both hands | No | Does not effect pillagers spawned as part of a raid |
Vex | Both hands | No | |
Vindicator | Both hands | No | Does not effect vindicators spawned as part of a raid |
Wither Skeleton | Both hands | No | The game does not enchant Wither Skeleton equipment like other mobs |
Zombie, Zombie Villager, and Husk | Both hands | Yes | Zombie Villager/Husk uses same loot table because it uses the same code for spawning with equipment as the zombie |
Zombified Piglin | Both hands | No |
Technical details
Mobs that roll trains_tweaks:equipment/generic
are all mobs that call super.populateDefaultEquipmentSlots
(or initEquipment in Yarn). This may or may not apply to modded mobs.
Halloween helmet spawns are unaffected because the date and no-helmet-equipped checks happen in finalizeSpawn after populateDefaultEquipmentSlots. Drowned nautilus shell and (standard) piglin weapon work the same way.
The reason different mobs' equipment loot tables generate to different equipment slots is because Train's Tweaks only mixins to populateDefaultEquipmentSlots. As you can see, it is wildly inconsistent what parts of equipment generate where in the vanilla game.
Unfortunately, there's no good way to programmatically apply this to any mob defined in datapack; mob-specific loot tables only work with mobs the mod is specifically programmed to effect.
However, it is possible for other mod developers to make their mobs' equipment customizable:
If I were making a mob that I wanted to have random equipment and I wanted that equipment to be customizable by the end-user, I would define it in a loot table of type minecraft:equipment
and then use that in its populateDefaultEquipmentSlots/initEquipment method.
I personally hope that Mojang makes mob equipment fully data-driven in the future.
Credit / Thanks
Dexterity and Clumsy effect icons are based on icons from game-icons.net.