Skip to content

Commit

Permalink
Added step up modifier using new forge attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
KnightMiner committed May 4, 2022
1 parent 760ae5f commit dd1b121
Show file tree
Hide file tree
Showing 13 changed files with 113 additions and 2 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.0
forge_version=40.1.14
loader_range=[39.0,)
forge_range=[40.1.0,)
forge_range=[40.1.3,)
parchment_version=2022.03.13

# Build Dependencies
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "tconstruct:modifier_salvage",
"tools": {
"tag": "tconstruct:modifiable/armor/leggings"
},
"slots": {
"upgrades": 1
},
"modifier": "tconstruct:step_up",
"min_level": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"type": "tconstruct:modifier",
"inputs": [
{
"item": "minecraft:leather"
},
{
"item": "minecraft:golden_carrot"
},
{
"item": "minecraft:leather"
},
{
"item": "minecraft:scaffolding"
},
{
"item": "minecraft:scaffolding"
}
],
"tools": {
"tag": "tconstruct:modifiable/armor/leggings"
},
"slots": {
"upgrades": 1
},
"result": {
"name": "tconstruct:step_up",
"level": 1
},
"max_level": 2
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"type": "tconstruct:stat_boost",
"level_display": "tconstruct:default",
"attributes": [
{
"unique": "tconstruct.modifier.step_up",
"attribute": "forge:step_height_addition",
"operation": "addition",
"amount": 0.5,
"slots": [
"feet",
"legs",
"chest",
"head"
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public class ModifierIds {
public static final ModifierId knockbackArmor = id("knockback_armor");
public static final ModifierId strength = id("strength");
// leggings
public static final ModifierId stepUp = id("step_up");
public static final ModifierId speedy = id("speedy");


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ protected void addModifiers() {
addModifier(ModifierIds.strength, StatBoostModifier.builder().attribute("tconstruct.modifier.strength", Attributes.ATTACK_DAMAGE, Operation.MULTIPLY_TOTAL, 0.1f, armorSlots).build());
addRedirect(id("armor_power"), redirect(ModifierIds.strength));
// leggings
addModifier(ModifierIds.stepUp, StatBoostModifier.builder().attribute("tconstruct.modifier.step_up", ForgeMod.STEP_HEIGHT_ADDITION.get(), Operation.ADDITION, 0.5f, armorSlots).build());
addModifier(ModifierIds.speedy, StatBoostModifier.builder().attribute("tconstruct.modifier.speedy", Attributes.MOVEMENT_SPEED, Operation.MULTIPLY_TOTAL, 0.1f, armorSlots).build());

// traits - tier 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -683,6 +683,17 @@ private void addModifierRecipes(Consumer<FinishedRecipe> consumer) {
.setMaxLevel(2)
.saveSalvage(consumer, prefix(TinkerModifiers.leaping, upgradeSalvage))
.save(consumer, prefix(TinkerModifiers.leaping, upgradeFolder));
ModifierRecipeBuilder.modifier(ModifierIds.stepUp)
.setTools(TinkerTags.Items.LEGGINGS)
.addInput(Items.LEATHER)
.addInput(Items.GOLDEN_CARROT)
.addInput(Items.LEATHER)
.addInput(Items.SCAFFOLDING)
.addInput(Items.SCAFFOLDING)
.setSlots(SlotType.UPGRADE, 1)
.setMaxLevel(2)
.saveSalvage(consumer, prefix(ModifierIds.stepUp, upgradeSalvage))
.save(consumer, prefix(ModifierIds.stepUp, upgradeFolder));
// half of pockets as a slotless
ModifierRecipeBuilder.modifier(TinkerModifiers.pocketChain)
.setTools(TinkerTags.Items.LEGGINGS)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"modifier_id": "tconstruct:step_up",
"text": [
{
"text": "Increases the height the player can step by 0.5 blocks per level."
}
],
"more_text_space": true,
"effects": [
"Maximum of 2 levels",
"Requires 1 upgrade slot per level"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,10 @@
"type": "tconstruct:modifier",
"data": "upgrades/armor/springy.json"
},
{
"type": "tconstruct:modifier",
"data": "upgrades/armor/step_up.json"
},
{
"type": "tconstruct:modifier",
"data": "upgrades/armor/sticky.json"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"modifier_id": "tconstruct:step_up",
"text": [
{
"text": "Put one foot in front of the other, except higher."
}
],
"effects": [
"Allows climbing taller blocks like stairs",
"Multiple levels, increases step height with each level",
"Requires 1 Upgrade Slot per level"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@
"type": "tconstruct:modifier",
"data": "upgrades/armor/speedy.json"
},
{
"type": "tconstruct:modifier",
"data": "upgrades/armor/step_up.json"
},
{
"type": "tconstruct:modifier",
"data": "upgrades/armor/springy.json"
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/assets/tconstruct/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1838,6 +1838,9 @@
"modifier.tconstruct.speedy": "Speedy",
"modifier.tconstruct.speedy.flavor": "Keep going and going and going...",
"modifier.tconstruct.speedy.description": "Achieve speeds closer to that of rabbits",
"modifier.tconstruct.step_up": "Step Up",
"modifier.tconstruct.step_up.flavor": "Don't skip leg day",
"modifier.tconstruct.step_up.description": "Allows climbing taller blocks as if they were stairs",
"modifier.tconstruct.leaping": "Leaping",
"modifier.tconstruct.leaping.flavor": "Leap tall buildings in a single bound!",
"modifier.tconstruct.leaping.description": "Rabbits can leap high, so this should also let you leap high",
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/assets/tconstruct/tinkering/colors.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
"soulspeed": "#5B4538",
"speedy": "#7F0901",
"springy": "#FF950D",
"step_up": "#C18958",
"sticky": "#ffffff",
"thorns": "#9FA76D",

Expand Down

0 comments on commit dd1b121

Please sign in to comment.