Skip to content

Commit

Permalink
Reach changes
Browse files Browse the repository at this point in the history
Reach now works on mobs thanks to the new forge PR
Reach is now chestplate exclusive, was difficult to justify the behavior of reach towards the offhand so opted to limit it to the place that made the most sense
  • Loading branch information
KnightMiner committed Jun 4, 2022
1 parent 224ab30 commit b40cb75
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 23 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ minecraft_version=1.18.2
minecraft_range=[1.18.2,1.19)

# Forge Version Information
forge_version=40.1.16
forge_version=40.1.21
loader_range=[39.0,)
forge_range=[40.1.16,)
forge_range=[40.1.21,)
parchment_version=2022.03.13

# Build Dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,9 @@
"tag": "forge:slimeball/ender"
}
],
"tools": [
{
"tag": "tconstruct:modifiable/harvest"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
}
],
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
},
"slots": {
"abilities": 1
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@
"chest",
"head"
]
},
{
"unique": "tconstruct.modifier.range",
"attribute": "forge:attack_range",
"operation": "addition",
"amount": 1.0,
"slots": [
"mainhand",
"feet",
"legs",
"chest",
"head"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,11 @@ protected void addModifiers() {
addModifier(ModifierIds.worldbound, StatBoostModifier.builder().addFlag(IModifiable.INDESTRUCTIBLE_ENTITY).rarity(Rarity.UNCOMMON).display(ModifierLevelDisplay.NO_LEVELS).build());
addModifier(ModifierIds.shiny, StatBoostModifier.builder().addFlag(IModifiable.SHINY).rarity(Rarity.EPIC).display(ModifierLevelDisplay.NO_LEVELS).build());
// general abilities
addModifier(ModifierIds.reach, StatBoostModifier.builder().attribute("tconstruct.modifier.reach", ForgeMod.REACH_DISTANCE.get(), Operation.ADDITION, 1, EquipmentSlot.MAINHAND, EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET).build());
addModifier(ModifierIds.reach, StatBoostModifier.builder()
.attribute("tconstruct.modifier.reach", ForgeMod.REACH_DISTANCE.get(), Operation.ADDITION, 1, EquipmentSlot.MAINHAND, EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET)
.attribute("tconstruct.modifier.range", ForgeMod.ATTACK_RANGE.get(), Operation.ADDITION, 1, EquipmentSlot.MAINHAND, EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET)
.build());


// loot
addModifier(TinkerModifiers.silky, new LootModifier(Enchantments.SILK_TOUCH, 1, ModifierLevelDisplay.NO_LEVELS));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1023,15 +1023,18 @@ private void addModifierRecipes(Consumer<FinishedRecipe> consumer) {
.save(consumer, prefix(TinkerModifiers.expanded, abilityFolder));
// reach expander
ModifierRecipeBuilder.modifier(ModifierIds.reach)
.setTools(ingredientFromTags(TinkerTags.Items.HARVEST, TinkerTags.Items.CHESTPLATES))
.setTools(TinkerTags.Items.CHESTPLATES)
.addInput(Items.PISTON)
.addInput(TinkerMaterials.queensSlime.getIngotTag())
.addInput(Items.PISTON)
.addInput(SlimeType.ENDER.getSlimeballTag())
.addInput(SlimeType.ENDER.getSlimeballTag())
.setSlots(SlotType.ABILITY, 1)
.saveSalvage(consumer, prefix(ModifierIds.reach, abilitySalvage))
.save(consumer, prefix(ModifierIds.reach, abilityFolder));
ModifierRecipeBuilder.modifier(ModifierIds.reach)
.setTools(ingredientFromTags(TinkerTags.Items.HARVEST, TinkerTags.Items.CHESTPLATES))
.setSlots(SlotType.ABILITY, 1)
.saveSalvage(consumer, prefix(ModifierIds.reach, abilitySalvage));
// block transformers
Ingredient heldWithDurability = IntersectionIngredient.of(Ingredient.of(TinkerTags.Items.DURABILITY), Ingredient.of(TinkerTags.Items.INTERACTABLE));
ModifierRecipeBuilder.modifier(TinkerModifiers.pathing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"modifier_id": "tconstruct:reach",
"text": [
{
"text": "Increases the maximum distance from the player this tool can mine or place blocks by 1 block per level. On chestplates, increases reach of your held tool."
"text": "Increases the maximum distance from the player this tool can mine, place blocks, and attack mobs by 1 block per level."
}
],
"more_text_space": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
"type": "tconstruct:modifier",
"data": "abilities/general/luck.json"
},
{
"type": "tconstruct:modifier",
"data": "abilities/general/reach.json"
},
{
"type": "tconstruct:modifier",
"data": "abilities/general/unbreakable.json"
Expand Down Expand Up @@ -128,6 +124,10 @@
"type": "tconstruct:modifier",
"data": "abilities/armor/pockets.json"
},
{
"type": "tconstruct:modifier",
"data": "abilities/armor/reach.json"
},
{
"type": "tconstruct:modifier",
"data": "abilities/armor/shield_strap.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
],
"effects": [
"Increases reach distance for blocks and mining",
"Increases reach distance for blocks, mining, and attacking",
"Multiple levels, each level allows you to reach further",
"Requires 1 Ability Slot per level"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
"type": "tconstruct:modifier",
"data": "abilities/general/gilded.json"
},
{
"type": "tconstruct:modifier",
"data": "abilities/general/reach.json"
},
{
"type": "tconstruct:modifier",
"data": "abilities/general/luck.json"
Expand Down Expand Up @@ -136,6 +132,10 @@
"type": "tconstruct:modifier",
"data": "abilities/armor/pocket_chain.json"
},
{
"type": "tconstruct:modifier",
"data": "abilities/armor/reach.json"
},
{
"type": "tconstruct:modifier",
"data": "abilities/armor/shield_strap.json"
Expand Down

0 comments on commit b40cb75

Please sign in to comment.