Interface FabricItemModelGenerator

All Known Implementing Classes:
ItemModelGeneratorMixin

public interface FabricItemModelGenerator
Fabric-provided extensions for ItemModelGenerators.

Note: This interface is automatically implemented on all generators via Mixin and interface injection.

  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    build(net.minecraft.world.item.Item item, ModelBuilder<?> modelBuilder)
    Generates an item's model based on an already-prepared ModelBuilder.
    default void
    build(net.minecraft.world.item.Item item, String suffix, ModelBuilder<?> modelBuilder)
    Generates an item's model based on an already-prepared ModelBuilder.
    default void
    register(net.minecraft.world.item.Item item, String suffix, net.minecraft.data.models.model.ModelTemplate model, net.minecraft.data.models.model.TextureMapping textureMap)
    Generates an item's model based on the given model template and corresponding texture mapping.
    default void
    register(net.minecraft.world.item.Item item, net.minecraft.data.models.model.ModelTemplate model, net.minecraft.data.models.model.TextureMapping textureMap)
    Generates an item's model based on the given model template and corresponding texture mapping.
  • Method Details

    • register

      default void register(net.minecraft.world.item.Item item, net.minecraft.data.models.model.ModelTemplate model, net.minecraft.data.models.model.TextureMapping textureMap)
      Generates an item's model based on the given model template and corresponding texture mapping. Both the model and mapping must be made with the same set of texture keys.
      Parameters:
      item - The item to generate this model for.
      model - The desired template to generate this model out of.
      textureMap - The desired texture mapping for this model.
    • build

      default void build(net.minecraft.world.item.Item item, ModelBuilder<?> modelBuilder)
      Generates an item's model based on an already-prepared ModelBuilder. Textures get automatically mapped to the resulting model when built.
      Parameters:
      item - The item to generate this model for.
      modelBuilder - The desired model builder to generate from.
    • register

      default void register(net.minecraft.world.item.Item item, String suffix, net.minecraft.data.models.model.ModelTemplate model, net.minecraft.data.models.model.TextureMapping textureMap)
      Generates an item's model based on the given model template and corresponding texture mapping. Both the model and mapping must be made with the same set of texture keys.
      Parameters:
      item - The item to generate this model for.
      suffix - An optional suffix for the generated model's file name.
      model - The desired template to generate this model out of.
      textureMap - The desired texture mapping for this model.
    • build

      default void build(net.minecraft.world.item.Item item, String suffix, ModelBuilder<?> modelBuilder)
      Generates an item's model based on an already-prepared ModelBuilder. Textures get automatically mapped to the resulting model when built.
      Parameters:
      item - The item to generate this model for.
      suffix - An optional suffix for the generated model's file name.
      modelBuilder - The desired model builder to generate from.