Package dev.dhyces.trimmed.api.data
Class BaseTrimDatagenSuite
java.lang.Object
dev.dhyces.trimmed.api.data.BaseTrimDatagenSuite
- Direct Known Subclasses:
TrimDatagenSuite
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final recordstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<net.minecraft.resources.ResourceLocation, net.minecraft.data.recipes.ShapedRecipeBuilder> protected Map<net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimMaterial>, net.minecraft.world.item.armortrim.TrimMaterial> protected final Stringprotected Map<net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimPattern>, net.minecraft.world.item.armortrim.TrimPattern> protected List<net.minecraft.resources.ResourceLocation> protected static Patternprotected Map<net.minecraft.resources.ResourceLocation, net.minecraft.data.recipes.SmithingTrimRecipeBuilder> -
Constructor Summary
ConstructorsConstructorDescriptionBaseTrimDatagenSuite(String modid, @Nullable BiConsumer<String, String> translationConsumer) -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerate()Use this if you wish to extend the class and generate in one methodmakeMaterial(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimMaterial> materialKey, Supplier<? extends net.minecraft.world.level.ItemLike> materialItem, int color) Creates a new material, as well as add to the "trim_materials" tag, add an entry to the custom material permutations client-map, and optionally add a lang entry (if a lang provider is provided).makeMaterial(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimMaterial> materialKey, Supplier<? extends net.minecraft.world.level.ItemLike> materialItem, int color, Consumer<BaseTrimDatagenSuite.MaterialConfig> materialConfigConsumer) Creates a new material, as well as add to the "trim_materials" tag, add an entry to the custom material permutations client-map, and optionally add a lang entry (if a lang provider is provided).makeMaterial(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimMaterial> materialKey, net.minecraft.world.level.ItemLike materialItem, int color) Creates a new material, as well as add to the "trim_materials" tag, add an entry to the custom material permutations client-map, and optionally add a lang entry (if a lang provider is provided).makeMaterial(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimMaterial> materialKey, net.minecraft.world.level.ItemLike materialItem, int color, Consumer<BaseTrimDatagenSuite.MaterialConfig> materialConfigConsumer) Creates a new material, as well as add to the "trim_materials" tag, add an entry to the custom material permutations client-map, and optionally add a lang entry (if a lang provider is provided).makePattern(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimPattern> patternKey, Supplier<? extends net.minecraft.world.level.ItemLike> templateItem) Creates a new pattern with decal set to false, as well as add to the "trim_templates" tag, add an entry to the custom patterns client-tag, create a smithing trim recipe, and optionally add a lang entry (if a lang provider is provided) and a "copy" recipe (used for duplicating the template).makePattern(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimPattern> patternKey, Supplier<? extends net.minecraft.world.level.ItemLike> templateItem, boolean isDecal, Consumer<BaseTrimDatagenSuite.PatternConfig> patternConfigConsumer) Creates a new pattern, as well as add to the "trim_templates" tag, add an entry to the custom patterns client-tag, create a smithing trim recipe, and optionally add a lang entry (if a lang provider is provided) and a "copy" recipe (used for duplicating the template).makePattern(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimPattern> patternKey, net.minecraft.world.level.ItemLike templateItem) Creates a new pattern with decal set to false, as well as add to the "trim_templates" tag, add an entry to the custom patterns client-tag, create a smithing trim recipe, and optionally add a lang entry (if a lang provider is provided) and a "copy" recipe (used for duplicating the template).makePattern(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimPattern> patternKey, net.minecraft.world.level.ItemLike templateItem, boolean isDecal, Consumer<BaseTrimDatagenSuite.PatternConfig> patternConfigConsumer) Creates a new pattern, as well as add to the "trim_templates" tag, add an entry to the custom patterns client-tag, create a smithing trim recipe, and optionally add a lang entry (if a lang provider is provided) and a "copy" recipe (used for duplicating the template).protected net.minecraft.data.recipes.SmithingTrimRecipeBuildermakeTrimRecipe(net.minecraft.world.level.ItemLike templateItem)
-
Field Details
-
replacerPattern
-
modid
-
patterns
protected Map<net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimPattern>,net.minecraft.world.item.armortrim.TrimPattern> patterns -
copyRecipes
protected Map<net.minecraft.resources.ResourceLocation,net.minecraft.data.recipes.ShapedRecipeBuilder> copyRecipes -
trimRecipes
protected Map<net.minecraft.resources.ResourceLocation,net.minecraft.data.recipes.SmithingTrimRecipeBuilder> trimRecipes -
materials
protected Map<net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimMaterial>,net.minecraft.world.item.armortrim.TrimMaterial> materials -
patternTextures
-
materialTexturePermutations
-
-
Constructor Details
-
BaseTrimDatagenSuite
public BaseTrimDatagenSuite(String modid, @Nullable @Nullable BiConsumer<String, String> translationConsumer)
-
-
Method Details
-
generate
public void generate()Use this if you wish to extend the class and generate in one method -
makePattern
public BaseTrimDatagenSuite makePattern(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimPattern> patternKey, Supplier<? extends net.minecraft.world.level.ItemLike> templateItem) Creates a new pattern with decal set to false, as well as add to the "trim_templates" tag, add an entry to the custom patterns client-tag, create a smithing trim recipe, and optionally add a lang entry (if a lang provider is provided) and a "copy" recipe (used for duplicating the template).- Parameters:
patternKey- The pattern keytemplateItem- The item that is used to obtain this pattern on armor
-
makePattern
public BaseTrimDatagenSuite makePattern(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimPattern> patternKey, Supplier<? extends net.minecraft.world.level.ItemLike> templateItem, boolean isDecal, Consumer<BaseTrimDatagenSuite.PatternConfig> patternConfigConsumer) Creates a new pattern, as well as add to the "trim_templates" tag, add an entry to the custom patterns client-tag, create a smithing trim recipe, and optionally add a lang entry (if a lang provider is provided) and a "copy" recipe (used for duplicating the template).- Parameters:
patternKey- The pattern keytemplateItem- The item that is used to obtain this pattern on armorpatternConfigConsumer- An optional element allowing modification of certain elements
-
makePattern
public BaseTrimDatagenSuite makePattern(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimPattern> patternKey, net.minecraft.world.level.ItemLike templateItem) Creates a new pattern with decal set to false, as well as add to the "trim_templates" tag, add an entry to the custom patterns client-tag, create a smithing trim recipe, and optionally add a lang entry (if a lang provider is provided) and a "copy" recipe (used for duplicating the template).- Parameters:
patternKey- The pattern keytemplateItem- The item that is used to obtain this pattern on armor
-
makePattern
public BaseTrimDatagenSuite makePattern(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimPattern> patternKey, net.minecraft.world.level.ItemLike templateItem, boolean isDecal, Consumer<BaseTrimDatagenSuite.PatternConfig> patternConfigConsumer) Creates a new pattern, as well as add to the "trim_templates" tag, add an entry to the custom patterns client-tag, create a smithing trim recipe, and optionally add a lang entry (if a lang provider is provided) and a "copy" recipe (used for duplicating the template).- Parameters:
patternKey- The pattern key.templateItem- The item that is used to obtain this pattern on armor.isDecal- True will make the pattern only render where the armor texture is. False will allow the trim to always render.patternConfigConsumer- An optional element allowing modification of certain elements.
-
makeTrimRecipe
protected net.minecraft.data.recipes.SmithingTrimRecipeBuilder makeTrimRecipe(net.minecraft.world.level.ItemLike templateItem) -
makeMaterial
public BaseTrimDatagenSuite makeMaterial(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimMaterial> materialKey, Supplier<? extends net.minecraft.world.level.ItemLike> materialItem, int color) Creates a new material, as well as add to the "trim_materials" tag, add an entry to the custom material permutations client-map, and optionally add a lang entry (if a lang provider is provided).- Parameters:
materialKey- The key for your materialmaterialItem- The item that is attributed to this materialcolor- The color to style the component shown in the tooltip
-
makeMaterial
public BaseTrimDatagenSuite makeMaterial(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimMaterial> materialKey, Supplier<? extends net.minecraft.world.level.ItemLike> materialItem, int color, Consumer<BaseTrimDatagenSuite.MaterialConfig> materialConfigConsumer) Creates a new material, as well as add to the "trim_materials" tag, add an entry to the custom material permutations client-map, and optionally add a lang entry (if a lang provider is provided).- Parameters:
materialKey- The key for your materialmaterialItem- The item that is attributed to this materialcolor- The color to style the component shown in the tooltipmaterialConfigConsumer- An optional consumer allowing modification of certain elements
-
makeMaterial
public BaseTrimDatagenSuite makeMaterial(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimMaterial> materialKey, net.minecraft.world.level.ItemLike materialItem, int color) Creates a new material, as well as add to the "trim_materials" tag, add an entry to the custom material permutations client-map, and optionally add a lang entry (if a lang provider is provided).- Parameters:
materialKey- The key for your materialmaterialItem- The item that is attributed to this materialcolor- The color to style the component shown in the tooltip
-
makeMaterial
public BaseTrimDatagenSuite makeMaterial(net.minecraft.resources.ResourceKey<net.minecraft.world.item.armortrim.TrimMaterial> materialKey, net.minecraft.world.level.ItemLike materialItem, int color, Consumer<BaseTrimDatagenSuite.MaterialConfig> materialConfigConsumer) Creates a new material, as well as add to the "trim_materials" tag, add an entry to the custom material permutations client-map, and optionally add a lang entry (if a lang provider is provided).- Parameters:
materialKey- The key for your materialmaterialItem- The item that is attributed to this materialcolor- The color to style the component shown in the tooltipmaterialConfigConsumer- An optional consumer allowing modification of certain elements
-