Class BaseTrimDatagenSuite

java.lang.Object
dev.dhyces.trimmed.api.data.BaseTrimDatagenSuite
Direct Known Subclasses:
TrimDatagenSuite

public abstract class BaseTrimDatagenSuite extends Object
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static final record 
     
    static class 
     
    static class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected 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 Map<net.minecraft.resources.ResourceLocation,String>
     
    protected final String
     
    protected 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 Pattern
     
    protected Map<net.minecraft.resources.ResourceLocation,net.minecraft.data.recipes.SmithingTrimRecipeBuilder>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    BaseTrimDatagenSuite(String modid, @Nullable BiConsumer<String,String> translationConsumer)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Use this if you wish to extend the class and generate in one method
    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).
    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.SmithingTrimRecipeBuilder
    makeTrimRecipe(net.minecraft.world.level.ItemLike templateItem)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • replacerPattern

      protected static Pattern replacerPattern
    • modid

      protected final String 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

      protected List<net.minecraft.resources.ResourceLocation> patternTextures
    • materialTexturePermutations

      protected Map<net.minecraft.resources.ResourceLocation,String> materialTexturePermutations
  • Constructor Details

  • 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 key
      templateItem - 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 key
      templateItem - The item that is used to obtain this pattern on armor
      patternConfigConsumer - 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 key
      templateItem - 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 material
      materialItem - The item that is attributed to this material
      color - 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 material
      materialItem - The item that is attributed to this material
      color - The color to style the component shown in the tooltip
      materialConfigConsumer - 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 material
      materialItem - The item that is attributed to this material
      color - 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 material
      materialItem - The item that is attributed to this material
      color - The color to style the component shown in the tooltip
      materialConfigConsumer - An optional consumer allowing modification of certain elements