Skip to content

Partonetrain/trains_tweaks

Repository files navigation

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. For a config menu, use the Configured mod. I recommended restarting the game after changing any config option.

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 (their icons aren't great). 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.
Bee Right now all this does is provide an option to prevent bees from losing their stingers and dying when they attack No
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)
Goat Lets you change the chance of a newly-spawned goat being a screaming goat (you can already change which items are dropped from goat ramming with vanilla instrument tags) No
Horse Ensure horse breed offspring never have worse stats, and set minimum stats for horses and llamas Yes Modded mobs that inherit from AbstractHorse may be affected by this
Interdimensional Enables configuration of nether portal frames and what dimensions can have nether portals in them No Incompatible with Charm and Crying Portals
Kritz Allows you to replace vanilla melee and ranged crit mechanics with attribute-based random crit mechanics No Incompatible with Apothic/Zenith Attributes; if either of those is installed, this feature will disable itself and ignore your config; you should use those mod's attributes instead
Loot Provides loot functions; trains_tweaks:enchant_max, trains_tweaks:enchant_treasure, enchant_curse, and enchant_all. The first three work like, and have the same options as, minecraft:enchant_randomly -- except it always provides one max level relevant enchant (normal, non-curse treasure, or curse respectively). enchant_all instead tries to apply every compatible enchant all at once. 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, Turtle Scute, and Armadillo Shed with loot tables. See config file for loot table names. Adds brushing to turtles. Also lets you enable baby drops. No Provided loot tables produce similar results to vanilla; you must make a datapack yourself to see changes. The enabled-by-default gameplay loot tables (like armadillo shed and turtle grow) have EMI Loot lang keys.
Npc Configure NPC entities, villagers and pillagers, such as configuring the reputation mechanic and enabling pillagers to attack babies No Anything that extends Villager, AbstractIllager, and Raider should be affected by the relevant tweaks
Ocelot Makes Ocelots more interesting by making them hunt fish and tamable into cats again. Tamed ocelots can be configured to produce a specific cat variant. Yes
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, including animal armor). 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 make zombies spawn with gold shovels instead of iron ones, for instance. See below for more details. No* (Yes if you're a developer) You should be able to create an equipment table for any Entity Type that extends LivingEntity, see below.
Trigger Adds two advancement triggers: trains_tweaks:day and trains_tweaks:gametime. Allows advancements to check for in-game days or number of ticks since world creation, respectively. Does nothing if not used in a datapack. See demo advancement JSONs for usage. No
UtilityCommands Adds an option to force-enable developer-only vanilla debugging commands as well as some new operator commands No
Vehicle Makes vehicles break instantly for players, and turns boat breakable blocks into a block tag Yes Twilight Forest and Biomes O' Plenty lily pads are included in the block tag
Wolf Replaces the hardcoded check for creepers and ghasts in tamed wolf attacking code with the entity tag trains_tweaks:tamed_wolves_avoid_attacking. Snowy wolves can walk on Powder Snow. Armor and health nerf options are included but are disabled by default. Yes Creeper Overhaul, Grimoire of Gaia, Enemy Expansion, Caverns and Chasms, Alex's Caves mobs are included in the entity type tag
Xplosiv Configs relating to explosions and how powerful they should be. Also allows making TNT unstable and/or ignite instantly. Yes Creeper Overhaul, Grimoire of Gaia, Enemy Expansion, Caverns and Chasms, Alex's Caves mobs are included in the entity type tag
Yeet Config options relating to throwing things and projectiles in general; 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, sleeping, and respawning; 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

As of Train's Tweaks 0.9.10, the SpawnsWith feature has been reworked to be more flexible to work with worldgen. Datapacks will break.

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, you can define equipment tables for a specific mob by placing an equipment loot table at trains_tweaks:equipment/namespace/entityid_*, where * is either main_hand, off_hand, or armor. Mainhand and offhand tables should only ever roll up to one item each, while armor tables should only ever roll up to 4. Some examples 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 with loot tables inherently not being as flexible as code, they may end up giving different results.

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 happen before equipment tables are rolled, and as such could be overwritten. 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. Mobs that pick up items will still drop picked up items 100% of the time.

Note to pack developers

This mod is powered almost entirely by mixins! Due to the precarious nature of mixins and the large amount of vanilla code modified by Train's Tweaks, I recommend you disable this mod first if you come across an issue with your pack. Only enable it after ensuring Train's Tweaks is not the source of the problem. If it is the source of the problem, create an issue on GitHub. Your saves should be safe, although your datapack may not load if you use the Loot or Trigger features in them.

Credit / Thanks

Dexterity, Clumsy, Melee Fury, and Ranged Fury effect icons are based on icons from game-icons.net. These might be replaced in the future, however.

Thanks to TelepathicGrunt and Wormbo for assisting with SpawnsWith issues and subsequent rework.

About

Tweaks you won't find anywhere else

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages