Skip to content

Commit

Permalink
Fix recipe conflict between nahuatl shield core and obsidian plating
Browse files Browse the repository at this point in the history
Casting obsidian either gives you a shield or a shield core based on which recipe won. Solved it by allowing nahuatl in the part builder and ditching composite for shield cores (all options are able to be made without composite)
  • Loading branch information
KnightMiner committed May 18, 2024
1 parent 7bbb19f commit 301f678
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"craftable": false,
"craftable": true,
"hidden": false,
"sortOrder": 2,
"tier": 3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import net.minecraft.world.level.ItemLike;
import net.minecraftforge.common.Tags;
import slimeknights.mantle.recipe.helper.ItemOutput;
import slimeknights.tconstruct.common.TinkerTags;
import slimeknights.tconstruct.common.data.BaseRecipeProvider;
import slimeknights.tconstruct.fluids.TinkerFluids;
import slimeknights.tconstruct.library.data.recipe.IMaterialRecipeHelper;
Expand All @@ -19,6 +20,7 @@
import slimeknights.tconstruct.library.recipe.casting.ItemCastingRecipeBuilder;
import slimeknights.tconstruct.library.recipe.casting.material.MaterialCastingRecipeBuilder;
import slimeknights.tconstruct.library.recipe.ingredient.MaterialIngredient;
import slimeknights.tconstruct.library.recipe.partbuilder.PartRecipeBuilder;
import slimeknights.tconstruct.library.recipe.tinkerstation.building.ToolBuildingRecipeBuilder;
import slimeknights.tconstruct.library.tools.nbt.MaterialIdNBT;
import slimeknights.tconstruct.shared.TinkerMaterials;
Expand Down Expand Up @@ -234,9 +236,14 @@ private void addPartRecipes(Consumer<FinishedRecipe> consumer) {
partCasting(consumer, TinkerToolParts.plating.get(ArmorSlotType.BOOTS), TinkerSmeltery.bootsPlatingCast, 2, partFolder, castFolder);
partRecipes(consumer, TinkerToolParts.maille, TinkerSmeltery.mailleCast, 2, partFolder, castFolder);

// bowstrings and shield cores are part builder exclusive
// bowstrings are part builder exclusive, but also support composite
uncastablePart(consumer, TinkerToolParts.bowstring.get(), 1, partFolder);
uncastablePart(consumer, TinkerToolParts.shieldCore.get(), 4, partFolder);
// no shield core composite, conflicts with tool casting
PartRecipeBuilder.partRecipe(TinkerToolParts.shieldCore.get())
.setPattern(TinkerToolParts.shieldCore.getId())
.setPatternItem(Ingredient.of(TinkerTags.Items.DEFAULT_PATTERNS))
.setCost(4)
.save(consumer, prefix(TinkerToolParts.shieldCore, partFolder + "builder/"));
}

/** Helper to create a casting recipe for a slimeskull variant */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected void addMaterials() {
// tier 3
addMaterial(MaterialIds.slimesteel, 3, ORDER_GENERAL, false);
addMaterial(MaterialIds.amethystBronze, 3, ORDER_HARVEST, false);
addMaterial(MaterialIds.nahuatl, 3, ORDER_WEAPON, false);
addMaterial(MaterialIds.nahuatl, 3, ORDER_WEAPON, true);
addMaterial(MaterialIds.obsidian, 3, ORDER_WEAPON, false);
addMaterial(MaterialIds.roseGold, 3, ORDER_SPECIAL, false);
addMaterial(MaterialIds.pigIron, 3, ORDER_SPECIAL, false);
Expand Down

0 comments on commit 301f678

Please sign in to comment.