Skip to content

Commit

Permalink
Rework luck extracting
Browse files Browse the repository at this point in the history
Looting and fortune both extract to luck now, since thats the craftable one
Added an extra recipe for luck using 2 ichor crystals to make level 2&3
  • Loading branch information
KnightMiner committed Jan 4, 2023
1 parent 3548f4e commit 0b0eaad
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"type": "tconstruct:modifier",
"inputs": [
{
"item": "tconstruct:ichor_slime_crystal"
},
{
"type": "forge:partial_nbt",
"item": "tconstruct:modifier_crystal",
"nbt": "{modifier:\"tconstruct:luck\"}"
},
{
"item": "tconstruct:ichor_slime_crystal"
}
],
"tools": [
{
"tag": "tconstruct:modifiable/melee_or_unarmed"
},
{
"tag": "tconstruct:modifiable/harvest"
},
{
"tag": "tconstruct:modifiable/ranged"
}
],
"requirements": {
"name": "tconstruct:luck",
"level": 1,
"error": "recipe.tconstruct.modifier.luck.level_2"
},
"allow_crystal": false,
"result": {
"name": "tconstruct:luck",
"level": 1
},
"max_level": 3
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"minecraft:bane_of_arthropods": "tconstruct:bane_of_sssss",
"minecraft:knockback": "tconstruct:knockback",
"minecraft:fire_aspect": "tconstruct:fiery",
"minecraft:looting": "tconstruct:looting",
"minecraft:looting": "tconstruct:luck",
"minecraft:sweeping": "tconstruct:sweeping_edge",
"minecraft:impaling": "tconstruct:antiaquatic",
"minecraft:efficiency": "tconstruct:haste",
"minecraft:silk_touch": "tconstruct:silky",
"minecraft:fortune": "tconstruct:fortune",
"minecraft:fortune": "tconstruct:luck",
"minecraft:power": "tconstruct:power",
"minecraft:punch": "tconstruct:punch",
"minecraft:flame": "tconstruct:fiery",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ protected void addEnchantmentMappings() {
add(Enchantments.BANE_OF_ARTHROPODS, ModifierIds.baneOfSssss);
add(Enchantments.KNOCKBACK, TinkerModifiers.knockback.getId());
add(Enchantments.FIRE_ASPECT, TinkerModifiers.fiery.getId());
add(Enchantments.MOB_LOOTING, ModifierIds.looting);
add(Enchantments.MOB_LOOTING, ModifierIds.luck);
add(Enchantments.SWEEPING_EDGE, TinkerModifiers.sweeping.getId());
add(Enchantments.IMPALING, ModifierIds.antiaquatic);

// harvest
add(Enchantments.BLOCK_EFFICIENCY, TinkerModifiers.haste.getId());
add(Enchantments.SILK_TOUCH, TinkerModifiers.silky.getId());
add(Enchantments.BLOCK_FORTUNE, ModifierIds.fortune);
add(Enchantments.BLOCK_FORTUNE, ModifierIds.luck);

// ranged
add(Enchantments.POWER_ARROWS, ModifierIds.power);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
import slimeknights.tconstruct.tools.TinkerTools;
import slimeknights.tconstruct.tools.data.material.MaterialIds;
import slimeknights.tconstruct.tools.item.ArmorSlotType;
import slimeknights.tconstruct.tools.item.ModifierCrystalItem;
import slimeknights.tconstruct.tools.recipe.ArmorDyeingRecipe;
import slimeknights.tconstruct.tools.recipe.EnchantmentConvertingRecipe;
import slimeknights.tconstruct.tools.recipe.ModifierRemovalRecipe;
Expand All @@ -75,6 +76,7 @@

import javax.annotation.Nullable;
import java.util.Arrays;
import java.util.Objects;
import java.util.function.BiConsumer;
import java.util.function.Consumer;

Expand Down Expand Up @@ -1098,6 +1100,18 @@ private void addModifierRecipes(Consumer<FinishedRecipe> consumer) {
.setSlots(SlotType.ABILITY, 1)
.saveSalvage(consumer, wrap(ModifierIds.luck, abilitySalvage, "_pants"))
.save(consumer, wrap(ModifierIds.luck, abilityFolder, "_pants"));
// extra crystal recipes
ModifierRecipeBuilder.modifier(ModifierIds.luck)
.setTools(luckSupporting)
.addInput(TinkerWorld.ichorGeode)
.addInput(PartialNBTIngredient.of(TinkerModifiers.modifierCrystal, Objects.requireNonNull(ModifierCrystalItem.withModifier(ModifierIds.luck).getTag())))
.addInput(TinkerWorld.ichorGeode)
.setRequirements(ModifierMatch.entry(ModifierIds.luck, 1))
.setRequirementsError(makeRequirementsError("luck.level_2"))
.disallowCrystal()
.setMaxLevel(3)
.save(consumer, wrap(ModifierIds.luck, abilityFolder, "_crystal_higher_levels"));

// silky: all the cloth
ModifierRecipeBuilder.modifier(TinkerModifiers.silky)
.addInput(TinkerModifiers.silkyCloth)
Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/assets/tconstruct/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -2069,8 +2069,6 @@
"modifier.tconstruct.looting": "Looting",
"modifier.tconstruct.looting.flavor": "Luck of the Mobs!",
"modifier.tconstruct.looting.description": "Gives you more nice things when killing mobs!",
"recipe.tconstruct.modifier.looting.level_2": "Looting II requires a different recipe for the first level",
"recipe.tconstruct.modifier.looting.level_3": "Looting III requires a different recipe for the first two levels",

"_comment": "Expanders",
"modifier.tconstruct.expanded": "Expanded",
Expand Down

0 comments on commit 0b0eaad

Please sign in to comment.