Changes

Summary

  1. Deduplicate code and ensure all ID variants have network and NBT methods as relevant (details)
  2. Implement item predicates (details)
  3. Add in tool context predicates (details)
  4. Allow material variant IDs to match variantless materials (details)
  5. Switch to cleaner implementation of tool stat modules (details)
  6. Implement 3 new advancements to take advantage of tool stat predicates (details)
  7. Update advancement material list (details)
  8. Correct unclear name for the tool damage hook (details)
Commit 25baf8d67beb7914b13fa1a41cd9688aa73d1543 by KnightMiner
Deduplicate code and ensure all ID variants have network and NBT methods as relevant

Technicaly there is a breaking change here with the removal of a method in pattern, but that method was broken so there is no way anyone was using it.
The protected class from pattern being removed should not be a breaking change
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/materials/stats/MaterialStatsId.java (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/tools/stat/ToolStatId.java (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/materials/definition/MaterialId.java (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/materials/definition/MaterialVariantId.java (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/modifiers/ModifierId.java (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/recipe/partbuilder/Pattern.java (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/utils/IdParser.java
Commit 1e66c8f7201b6dd0e58072a2cb153c544a244b24 by KnightMiner
Implement item predicates

Similar to ingredients, but does not require an item stack specifically making them a bit more general
TODO: decide if I wish to move this to Mantle before the release, as they are as general as block predicates and I don't want to deprecate another thing
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/json/predicate/block/SetBlockPredicate.java (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/item/ItemPredicate.java
The file was modifiedsrc/main/java/slimeknights/tconstruct/shared/TinkerCommons.java (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/item/ItemSetPredicate.java
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/RegistrySetLoader.java
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/item/ItemTagPredicate.java
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/item/package-info.java
Commit f0e67dd7fcc1b9c7d03ac31323a0394fda87610b by KnightMiner
Add in tool context predicates

Standard JSON predicate support, can check the tool's item, modifiers, etc. (basically all functionality that ToolPredicate had before and more). Will be used in some modifier stuff in the future.
Replaces ToolPredicate via ToolStackItemPredicate
The file was modifiedsrc/generated/resources/data/tconstruct/advancements/tools/upgrade_slots.json (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/tools/context/ToolRebuildContext.java (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/tools/nbt/IToolStackView.java (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/advancements/tools/material_master.json (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/tool/HasModifierPredicate.java
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/tool/ToolStackItemPredicate.java
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/tools/stat/StatPredicate.java (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/NestedLoader.java
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/tool/package-info.java
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/tools/nbt/IToolContext.java (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/advancements/tools/modified.json (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/tools/ToolPredicate.java (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/tools/stat/ToolStats.java (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/tool/ToolContextPredicate.java
The file was modifiedsrc/generated/resources/data/tconstruct/advancements/world/slimeskull.json (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/IntRange.java
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/tool/ItemToolPredicate.java
The file was modifiedsrc/main/java/slimeknights/tconstruct/common/data/AdvancementsProvider.java (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/tool/HasMaterialPredicate.java
The file was modifiedsrc/main/java/slimeknights/tconstruct/tools/TinkerTools.java (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/tool/HasStatTypePredicate.java
The file was modifiedsrc/generated/resources/data/tconstruct/advancements/smeltery/abilities.json (diff)
Commit 42bcf6b3a5fbc745198b4bba61b5d83b00f98528 by KnightMiner
Allow material variant IDs to match variantless materials

Basically, a material such as tconstruct:whitestone would not be matchable without also matching tconstruct:whitestone#end. Now you can use tconstruct:whitestone#default to match just tconstruct:whitestone.
Its a bit of a special case under the assumption that no one will use the variant #default (since thats an odd variant name). May rethink this to be cleaner in 1.19.
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/materials/definition/MaterialVariantId.java (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/materials/definition/MaterialVariantIdImpl.java (diff)
Commit 3350452b41690521f7914320ad89e5cf3bd401e2 by KnightMiner
Switch to cleaner implementation of tool stat modules

Instead of a single module that magically detects the stat type, now uses two modules
tconstruct:set_stat is used for harvest tiers and other similar stats; it just sets the value using the update method
tconstruct:stat_boost is used for numeric stats; and now supports both flat and scaling values
Both types support generalized tool predicates instead of item tags, and also support level range predicates on the modifier (e.g. have a stat bonus that kicks in after level 7)
Removed dependency on ModifierStatBoost, making it easier to fully remove that.
ScalingLevel is now called RandomLevelingValue to distinguish it from LevelingValue, and had "leveling" renamed to "per_level" (not part of a release, so non-breaking).

Taking advantage of flat stats, emerald, diamond, and netherite all are strictly no levels to simplify logic
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/knockback_resistance.json (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/diamond.json (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/modifiers/modules/combat/MobEffectModule.java (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/power.json (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/sharpweight.json (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/ductile.json (diff)
The file was removedsrc/main/java/slimeknights/tconstruct/library/modifiers/modules/build/ToolStatModule.java
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/modifiers/modules/behavior/RepairModule.java (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/tools/TinkerModifiers.java (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/cultivated.json (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/emerald.json (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/modifiers/modules/build/SetStatModule.java
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/LevelingValue.java
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/modifiers/dynamic/StatBoostModifier.java (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/quick_charge.json (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/modifiers/modules/ModifierModuleCondition.java
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/flexible.json (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/pierce.json (diff)
The file was removedsrc/main/java/slimeknights/tconstruct/library/utils/ScalingValue.java
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/sticky.json (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/lightweight.json (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/sharpness.json (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/sturdy.json (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/modifiers/modules/build/StatBoostModule.java
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/featherweight.json (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/tools/data/ModifierProvider.java (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/blindshot.json (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/heavy.json (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/swiftstrike.json (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/modifiers/util/ModifierStatBoost.java (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/trueshot.json (diff)
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/RandomLevelingValue.java
The file was modifiedsrc/generated/resources/data/tconstruct/tinkering/modifiers/netherite.json (diff)
Commit 4d809a32470c3577a684ee72d10c1eadfcd86a7d by KnightMiner
Implement 3 new advancements to take advantage of tool stat predicates

Netherite Tier is a simple stat in set check, usng the harvest tiers stat
One shot is a stat minimum check
Perfect aim checks for an exact stat value, the maximum value
Also update the abilities advancement for new abilities
The file was modifiedsrc/generated/resources/data/tconstruct/advancements/smeltery/abilities.json (diff)
The file was addedsrc/generated/resources/data/tconstruct/advancements/tools/one_shot.json
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/tools/stat/StatPredicate.java (diff)
The file was addedsrc/generated/resources/data/tconstruct/advancements/tools/netherite_tier.json
The file was modifiedsrc/main/java/slimeknights/tconstruct/tools/TinkerTools.java (diff)
The file was modifiedsrc/generated/resources/data/tconstruct/advancements/tools/material_master.json (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/common/data/AdvancementsProvider.java (diff)
The file was modifiedsrc/main/resources/assets/tconstruct/lang/en_us.json (diff)
The file was addedsrc/generated/resources/data/tconstruct/advancements/tools/perfect_aim.json
The file was addedsrc/main/java/slimeknights/tconstruct/library/json/predicate/tool/StatInSetPredicate.java
Commit 090fc8fab4cee9e78a313c0a8fa43b2384e66522 by KnightMiner
Update advancement material list
The file was modifiedsrc/generated/resources/data/tconstruct/advancements/tools/material_master.json (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/common/data/AdvancementsProvider.java (diff)
Commit 8536138abdb63ff2214b612e03048ceb5c21a507 by KnightMiner
Correct unclear name for the tool damage hook
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/tools/helper/ToolDamageUtil.java (diff)
The file was modifiedsrc/main/java/slimeknights/tconstruct/library/modifiers/TinkerHooks.java (diff)