Added smithing template generation.

This commit is contained in:
ayutac 2023-06-06 14:48:00 +02:00 committed by modmuss
parent fa7351a7b4
commit 52448bbd58
9 changed files with 87 additions and 7 deletions

View file

@ -86,6 +86,7 @@ class CraftingRecipesProvider extends TechRebornRecipesProvider {
generateToolRecipes()
generateArmorRecipes()
generateUuMatterRecipes()
generateMisc()
}
def generateToolRecipes() {
@ -239,6 +240,15 @@ class CraftingRecipesProvider extends TechRebornRecipesProvider {
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, recipeNameString(dir, null, TRContent.RawMetals.TUNGSTEN)))
}
void generateMisc() {
createDuoShapeRecipe(Items.DIAMOND, TRContent.Nuggets.NETHERITE, TRContent.Parts.TEMPLATE_TEMPLATE,
'D' as char, 'N' as char)
.pattern("NDN")
.pattern("DDD")
.pattern("NDN")
.offerTo(this.exporter, new Identifier(TechReborn.MOD_ID, "crafting_table/parts/"+TRContent.Parts.TEMPLATE_TEMPLATE.name))
}
def static recipeNameString(String prefix, def input, def output, String source = null, String result = null) {
StringBuilder s = new StringBuilder()
s.append(prefix)

View file

@ -43,6 +43,7 @@ class AssemblingMachineRecipesProvider extends TechRebornRecipesProvider {
@Override
void generateRecipes() {
generateBed()
generateSmithingTemplates()
generateMiscTR()
generateMiscVanilla()
}
@ -77,6 +78,46 @@ class AssemblingMachineRecipesProvider extends TechRebornRecipesProvider {
}
}
void generateSmithingTemplates() {
[
(Items.COBBLESTONE) : Items.COAST_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.SANDSTONE) : Items.DUNE_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.END_STONE_BRICKS) : Items.EYE_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.NETHERRACK) : Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE,
(Items.NETHER_BRICKS) : Items.RIB_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.SMOOTH_STONE) : Items.SENTRY_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.SCULK_SHRIEKER) : Items.SILENCE_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.GILDED_BLACKSTONE) : Items.SNOUT_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.PURPUR_BLOCK) : Items.SPIRE_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.PRISMARINE_BRICKS) : Items.TIDE_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.STONE) : Items.VEX_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.DEEPSLATE) : Items.WARD_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.MOSSY_COBBLESTONE) : Items.WILD_ARMOR_TRIM_SMITHING_TEMPLATE
].each {material, template ->
offerAssemblingMachineRecipe {
ingredients stack(material, 2), TRContent.Parts.TEMPLATE_TEMPLATE
outputs template
power 40
time 1500
criterion getCriterionName(material), getCriterionConditions(material)
}
}
[
(Items.TERRACOTTA) : Items.HOST_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.BROWN_TERRACOTTA) : Items.RAISER_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.GRAY_TERRACOTTA) : Items.SHAPER_ARMOR_TRIM_SMITHING_TEMPLATE,
(Items.LIGHT_GRAY_TERRACOTTA) : Items.WAYFINDER_ARMOR_TRIM_SMITHING_TEMPLATE
].each {material, template ->
offerAssemblingMachineRecipe {
ingredients stack(material, 2), TRContent.Parts.TEMPLATE_TEMPLATE
outputs template
power 40
time 1500
criterion getCriterionName(material), getCriterionConditions(material)
}
}
}
void generateMiscTR() {
offerAssemblingMachineRecipe {
ingredients TRContent.Plates.PLATINUM.asTag(), TRContent.Parts.ADVANCED_CIRCUIT

View file

@ -25,14 +25,9 @@
package techreborn.datagen.recipes.machine.grinder
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput
import net.minecraft.item.ItemStack
import net.minecraft.item.Items
import net.minecraft.registry.Registry
import net.minecraft.registry.RegistryKeys
import net.minecraft.registry.RegistryWrapper
import net.minecraft.registry.tag.ItemTags
import net.minecraft.registry.tag.TagKey
import net.minecraft.util.Identifier
import techreborn.datagen.TRConventionalTags
import techreborn.datagen.recipes.TechRebornRecipesProvider
import techreborn.init.TRContent
@ -227,6 +222,12 @@ class GrinderRecipesProvider extends TechRebornRecipesProvider {
ingredients tag("minecraft:trim_templates")
outputs stack(TRContent.SmallDusts.DIAMOND, 5)
}
offerGrinderRecipe {
power 5
time 200
ingredients TRContent.Parts.TEMPLATE_TEMPLATE
outputs stack(TRContent.SmallDusts.DIAMOND, 5)
}
}
void generateSand() {

View file

@ -26,7 +26,6 @@ package techreborn.datagen.recipes.machine.industrial_grinder
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput
import net.minecraft.fluid.Fluids
import net.minecraft.item.ItemStack
import net.minecraft.item.Items
import net.minecraft.registry.RegistryWrapper
import techreborn.datagen.recipes.TechRebornRecipesProvider
@ -366,7 +365,7 @@ class IndustrialGrinderRecipesProvider extends TechRebornRecipesProvider {
time 140
fluidAmount 1000L
fluid Fluids.WATER
source "trim_template_with_water"
source "smithing_template_with_water"
criterion getCriterionName(trim), getCriterionConditions(trim)
}
offerIndustrialGrinderRecipe {
@ -376,6 +375,26 @@ class IndustrialGrinderRecipesProvider extends TechRebornRecipesProvider {
time 140
fluidAmount 1000L
fluid ModFluids.MERCURY.getFluid()
source "smithing_template_with_mercury"
criterion getCriterionName(trim), getCriterionConditions(trim)
}
offerIndustrialGrinderRecipe {
ingredients TRContent.Parts.TEMPLATE_TEMPLATE
outputs stack(TRContent.Dusts.DIAMOND, 2), stack(TRContent.SmallDusts.DIAMOND, 3)
power 128
time 140
fluidAmount 1000L
fluid Fluids.WATER
source "trim_template_with_water"
criterion getCriterionName(trim), getCriterionConditions(trim)
}
offerIndustrialGrinderRecipe {
ingredients TRContent.Parts.TEMPLATE_TEMPLATE
outputs stack(TRContent.Dusts.DIAMOND, 3), stack(TRContent.SmallDusts.DIAMOND, 2)
power 128
time 140
fluidAmount 1000L
fluid ModFluids.MERCURY.getFluid()
source "trim_template_with_mercury"
criterion getCriterionName(trim), getCriterionConditions(trim)
}

View file

@ -1355,6 +1355,7 @@ public class TRContent {
PLANTBALL,
COMPRESSED_PLANTBALL,
SPONGE_PIECE,
TEMPLATE_TEMPLATE,
SYNTHETIC_REDSTONE_CRYSTAL;

View file

@ -708,6 +708,7 @@ public class TRItemGroup {
TRContent.Parts.RUBBER,
TRContent.Parts.SCRAP);
entries.addBefore(Items.PRISMARINE_SHARD, TRContent.Parts.SPONGE_PIECE);
entries.addBefore(Items.SENTRY_ARMOR_TRIM_SMITHING_TEMPLATE, TRContent.Parts.TEMPLATE_TEMPLATE);
entries.addBefore(Items.BRICK,
TRContent.Parts.CARBON_FIBER,
TRContent.Parts.CARBON_MESH);

View file

@ -655,6 +655,7 @@
"item.techreborn.plantball": "Plantball",
"item.techreborn.compressed_plantball": "Compressed Plantball",
"item.techreborn.sponge_piece": "Piece of Sponge",
"item.techreborn.template_template": "Template Template",
"item.techreborn.synthetic_redstone_crystal": "Synthetic Redstone Crystal",
"item.techreborn.crude_unit_upgrader": "Crude Unit Upgrader",
"item.techreborn.basic_unit_upgrader": "Basic Unit Upgrader",

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "techreborn:item/part/template_template"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 430 B