Skip to content

Commit

Permalink
Block transform cleanup
Browse files Browse the repository at this point in the history
Merge internal modifiers with visible ones and make them always show
Also make the harvest and silky modifiers show
Fix recipes for block transform and update related pages
  • Loading branch information
KnightMiner committed Nov 25, 2022
1 parent 5924e85 commit 6511905
Show file tree
Hide file tree
Showing 23 changed files with 79 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"subtracted": [
{
"item": "tconstruct:mattock"
"item": "tconstruct:pickadze"
},
{
"item": "tconstruct:excavator"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"subtracted": [
{
"item": "tconstruct:kama"
"item": "tconstruct:mattock"
},
{
"item": "tconstruct:scythe"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"subtracted": [
{
"item": "tconstruct:mattock"
"item": "tconstruct:pickadze"
},
{
"item": "tconstruct:excavator"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"subtracted": [
{
"item": "tconstruct:kama"
"item": "tconstruct:mattock"
},
{
"item": "tconstruct:scythe"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"redirects": [
{
"id": "tconstruct:stripping"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"redirects": [
{
"id": "tconstruct:firestarter"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"redirects": [
{
"id": "tconstruct:tilling"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"redirects": [
{
"id": "tconstruct:pathing"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"level": 1
},
{
"name": "tconstruct:axe_strip",
"name": "tconstruct:stripping",
"level": 1
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"level": 2
},
{
"name": "tconstruct:shovel_flatten",
"name": "tconstruct:pathing",
"level": 1
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"traits": [
{
"name": "tconstruct:firestarter_hidden",
"name": "tconstruct:firestarter",
"level": 1
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"level": 1
},
{
"name": "tconstruct:axe_strip",
"name": "tconstruct:stripping",
"level": 1
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"level": 1
},
{
"name": "tconstruct:hoe_till",
"name": "tconstruct:tilling",
"level": 1
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"traits": [
{
"name": "tconstruct:shovel_flatten",
"name": "tconstruct:pathing",
"level": 1
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"traits": [
{
"name": "tconstruct:hoe_till",
"name": "tconstruct:tilling",
"level": 1
},
{
Expand Down
14 changes: 5 additions & 9 deletions src/main/java/slimeknights/tconstruct/tools/TinkerModifiers.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,21 +337,17 @@ public TinkerModifiers() {
public static final StaticModifier<BlockTransformModifier> pathing = MODIFIERS.register("pathing", () -> new PathingModifier(75));
public static final StaticModifier<BlockTransformModifier> stripping = MODIFIERS.register("stripping", () -> new BlockTransformModifier(75, ToolActions.AXE_STRIP, SoundEvents.AXE_STRIP, false));
public static final StaticModifier<BlockTransformModifier> tilling = MODIFIERS.register("tilling", () -> new BlockTransformModifier(75, ToolActions.HOE_TILL, SoundEvents.HOE_TILL, false));
public static final StaticModifier<FirestarterModifier> firestarter = MODIFIERS.register("firestarter", () -> new FirestarterModifier(70));
public static final StaticModifier<FirestarterModifier> firestarter = MODIFIERS.register("firestarter", () -> new FirestarterModifier(75));
public static final StaticModifier<SingleLevelModifier> fireprimer = MODIFIERS.register("fireprimer", SingleLevelModifier::new);

// internal abilities
public static final StaticModifier<BlockTransformModifier> shovelFlatten = MODIFIERS.register("shovel_flatten", () -> new PathingModifier(Integer.MIN_VALUE + 50));
public static final StaticModifier<BlockTransformModifier> axeStrip = MODIFIERS.register("axe_strip", () -> new BlockTransformModifier(Integer.MIN_VALUE + 50, ToolActions.AXE_STRIP, SoundEvents.AXE_STRIP, false));
public static final StaticModifier<BlockTransformModifier> axeScrape = MODIFIERS.register("axe_scrape", () -> new BlockTransformModifier(Integer.MIN_VALUE + 49, ToolActions.AXE_SCRAPE, SoundEvents.AXE_SCRAPE, false, 3005));
public static final StaticModifier<BlockTransformModifier> axeWaxOff = MODIFIERS.register("axe_wax_off", () -> new BlockTransformModifier(Integer.MIN_VALUE + 48, ToolActions.AXE_WAX_OFF, SoundEvents.AXE_WAX_OFF, false, 3004));
public static final StaticModifier<BlockTransformModifier> hoeTill = MODIFIERS.register("hoe_till", () -> new BlockTransformModifier(Integer.MIN_VALUE + 50, ToolActions.HOE_TILL, SoundEvents.HOE_TILL, false));
public static final StaticModifier<FirestarterModifier> firestarterHidden = MODIFIERS.register("firestarter_hidden", () -> new FirestarterModifier(Integer.MIN_VALUE + 50));

public static final StaticModifier<ShearsAbilityModifier> shears = MODIFIERS.register("shears", () -> new ShearsAbilityModifier(0, Short.MIN_VALUE));
public static final StaticModifier<SilkyShearsAbilityModifier> silkyShears = MODIFIERS.register("silky_shears", () -> new SilkyShearsAbilityModifier(0, Short.MIN_VALUE));
public static final StaticModifier<SilkyShearsAbilityModifier> aoeSilkyShears = MODIFIERS.register("silky_aoe_shears", () -> new SilkyShearsAbilityModifier(1, Short.MIN_VALUE));
public static final StaticModifier<HarvestAbilityModifier> harvest = MODIFIERS.register("harvest", () -> new HarvestAbilityModifier(Integer.MIN_VALUE + 51));
public static final StaticModifier<ShearsAbilityModifier> shears = MODIFIERS.register("shears", () -> new ShearsAbilityModifier(0, 70));
public static final StaticModifier<SilkyShearsAbilityModifier> silkyShears = MODIFIERS.register("silky_shears", () -> new SilkyShearsAbilityModifier(0, 70));
public static final StaticModifier<SilkyShearsAbilityModifier> aoeSilkyShears = MODIFIERS.register("silky_aoe_shears", () -> new SilkyShearsAbilityModifier(1, 70));
public static final StaticModifier<HarvestAbilityModifier> harvest = MODIFIERS.register("harvest", () -> new HarvestAbilityModifier(70));
public static final StaticModifier<OffhandAttackModifier> offhandAttack = MODIFIERS.register("offhand_attack", OffhandAttackModifier::new);

// creative
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ protected void addModifiers() {
addRedirect(id("blue_extra_upgrade"), redirect(ModifierIds.harmonious));
addRedirect(id("extra_ability"), redirect(ModifierIds.draconic));

// internal modifier migration
addRedirect(id("shovel_flatten"), redirect(TinkerModifiers.pathing.getId()));
addRedirect(id("axe_strip"), redirect(TinkerModifiers.stripping.getId()));
addRedirect(id("hoe_till"), redirect(TinkerModifiers.tilling.getId()));
addRedirect(id("firestarter_hidden"), redirect(TinkerModifiers.firestarter.getId()));

// tier upgrades
// emerald
addModifier(ModifierIds.emerald, StatBoostModifier.builder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ private void addModifierRecipes(Consumer<FinishedRecipe> consumer) {
// block transformers
Ingredient heldWithDurability = IntersectionIngredient.of(Ingredient.of(TinkerTags.Items.DURABILITY), Ingredient.of(TinkerTags.Items.INTERACTABLE));
ModifierRecipeBuilder.modifier(TinkerModifiers.pathing)
.setTools(DifferenceIngredient.of(heldWithDurability, Ingredient.of(TinkerTools.mattock, TinkerTools.excavator)))
.setTools(DifferenceIngredient.of(heldWithDurability, Ingredient.of(TinkerTools.pickadze, TinkerTools.excavator)))
.addInput(roundPlate)
.addInput(TinkerMaterials.cobalt.getIngotTag())
.addInput(toolBinding)
Expand All @@ -1080,7 +1080,7 @@ private void addModifierRecipes(Consumer<FinishedRecipe> consumer) {
.saveSalvage(consumer, prefix(TinkerModifiers.stripping, abilitySalvage))
.save(consumer, prefix(TinkerModifiers.stripping, abilityFolder));
ModifierRecipeBuilder.modifier(TinkerModifiers.tilling)
.setTools(DifferenceIngredient.of(heldWithDurability, Ingredient.of(TinkerTools.kama, TinkerTools.scythe)))
.setTools(DifferenceIngredient.of(heldWithDurability, Ingredient.of(TinkerTools.mattock, TinkerTools.scythe)))
.addInput(smallBlade)
.addInput(TinkerMaterials.cobalt.getIngotTag())
.addInput(toolBinding)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ protected void addToolDefinitions() {
.multiplier(ToolStats.ATTACK_DAMAGE, 1.1f)
// traits
.trait(TinkerModifiers.knockback, 1)
.trait(TinkerModifiers.hoeTill)
.trait(TinkerModifiers.tilling)
// harvest
.action(ToolActions.AXE_DIG)
.action(ToolActions.SHOVEL_DIG)
Expand All @@ -152,7 +152,7 @@ protected void addToolDefinitions() {
.multiplier(ToolStats.MINING_SPEED, 0.75f)
.multiplier(ToolStats.ATTACK_DAMAGE, 1.15f)
// traits
.trait(TinkerModifiers.shovelFlatten)
.trait(TinkerModifiers.pathing)
.trait(ModifierIds.baneOfSssss)
// harvest
.action(ToolActions.PICKAXE_DIG)
Expand All @@ -175,7 +175,7 @@ protected void addToolDefinitions() {
.largeToolStartingSlots()
// traits
.trait(TinkerModifiers.knockback, 2)
.trait(TinkerModifiers.shovelFlatten)
.trait(TinkerModifiers.pathing)
// harvest
.action(ToolActions.SHOVEL_DIG)
.effective(BlockTags.MINEABLE_WITH_SHOVEL)
Expand All @@ -194,7 +194,7 @@ protected void addToolDefinitions() {
.smallToolStartingSlots()
// traits
.trait(TinkerModifiers.axeScrape)
.trait(TinkerModifiers.axeStrip)
.trait(TinkerModifiers.stripping)
.trait(TinkerModifiers.axeWaxOff)
// harvest
.action(ToolActions.AXE_DIG)
Expand All @@ -218,7 +218,7 @@ protected void addToolDefinitions() {
.largeToolStartingSlots()
// traits
.trait(TinkerModifiers.axeScrape)
.trait(TinkerModifiers.axeStrip)
.trait(TinkerModifiers.stripping)
.trait(TinkerModifiers.axeWaxOff)
// harvest
.action(ToolActions.AXE_DIG)
Expand Down Expand Up @@ -267,7 +267,7 @@ TinkerTags.Blocks.TREE_LOGS, new TreeAOEIterator(0, 0),
.multiplier(ToolStats.DURABILITY, 2.5f)
.largeToolStartingSlots()
// traits
.trait(TinkerModifiers.hoeTill)
.trait(TinkerModifiers.tilling)
.trait(TinkerModifiers.aoeSilkyShears)
.trait(TinkerModifiers.harvest)
// behavior
Expand Down Expand Up @@ -350,7 +350,7 @@ TinkerTags.Blocks.TREE_LOGS, new TreeAOEIterator(0, 0),
.stat(ToolStats.DURABILITY, 100)
.startingSlots(SlotType.UPGRADE, 1)
// traits
.trait(TinkerModifiers.firestarterHidden)
.trait(TinkerModifiers.firestarter)
.trait(TinkerModifiers.fiery);


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"modifier_id": "tconstruct:pathing",
"text": [
{
"text": "Allows the tool to create paths, similarly to mattocks or excavators. Tools will use their normal mining area for placing paths."
"text": "Allows the tool to create paths, similarly to pickadzes or excavators. Tools will use their normal mining area for placing paths."
},
{
"text": "Triggers before the tool's native stripping or tilling if present.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"modifier_id": "tconstruct:tilling",
"text": [
{
"text": "Allows the tool to till dirt, similarly to kamas or scythes. Tools will use their normal mining area for tilling."
"text": "Allows the tool to till dirt, similarly to mattocks or scythes. Tools will use their normal mining area for tilling."
},
{
"text": "Triggers before the tool's native pathing or stripping if present.",
Expand Down
12 changes: 12 additions & 0 deletions src/main/resources/assets/tconstruct/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,18 @@
"modifier.tconstruct.fireprimer": "Fireprimer",
"modifier.tconstruct.fireprimer.flavor": "Fanning the flames!",
"modifier.tconstruct.fireprimer.description": "Increases the area of fire of the tool",
"modifier.tconstruct.shears": "Shearing",
"modifier.tconstruct.shears.flavor": "Snip snip!",
"modifier.tconstruct.shears.description": "Tool can be used to shear mobs and disarm tripwire",
"modifier.tconstruct.silky_shears": "Silky Shears",
"modifier.tconstruct.silky_shears.flavor": "Snip snip!",
"modifier.tconstruct.silky_shears.description": "Tool can shear mobs if the silky modifier is added",
"modifier.tconstruct.silky_aoe_shears": "Silky Shears",
"modifier.tconstruct.silky_aoe_shears.flavor": "Snip snip!",
"modifier.tconstruct.silky_aoe_shears.description": "Tool can shear mobs if the silky modifier is added",
"modifier.tconstruct.harvest": "Harvest",
"modifier.tconstruct.harvest.flavor": "Swish!",
"modifier.tconstruct.harvest.description": "Tool can be used on crops to harvest and replant them",
"_comment": "Fluids",
"modifier.tconstruct.melting": "Melting",
"modifier.tconstruct.melting.flavor": "The power of a Melter on a stick!",
Expand Down
6 changes: 6 additions & 0 deletions src/main/resources/assets/tconstruct/mantle/colors.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@
"stripping": "#ab7a55",
"tilling": "#633c1e",

"__interaction_traits__": null,
"shears": "#A64F3F",
"silky_shears": "#A64F3F",
"silky_aoe_shears": "#A64F3F",
"harvest": "#CDB159",

"__armor_abilities__": null,
"double_jump": "#01cbcd",
"bouncy": "#27C6C6",
Expand Down

0 comments on commit 6511905

Please sign in to comment.