Class BakedModelManagerHelper

java.lang.Object
net.fabricmc.fabric.api.client.model.BakedModelManagerHelper

public final class BakedModelManagerHelper extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable net.minecraft.client.render.model.BakedModel
    getModel(net.minecraft.client.render.model.BakedModelManager manager, net.minecraft.util.Identifier id)
    An alternative to BakedModelManager.getModel(ModelIdentifier) that accepts an Identifier instead.

    Methods inherited from class java.lang.Object

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

    • getModel

      @Nullable public static @Nullable net.minecraft.client.render.model.BakedModel getModel(net.minecraft.client.render.model.BakedModelManager manager, net.minecraft.util.Identifier id)
      An alternative to BakedModelManager.getModel(ModelIdentifier) that accepts an Identifier instead. Models loaded using ExtraModelProvider do not have a corresponding ModelIdentifier, so the vanilla method cannot be used to retrieve them. The Identifier that was used to load them can be used in this method to retrieve them.

      This method, as well as its vanilla counterpart, should only be used after the BakedModelManager has completed reloading. Otherwise, the result will be null or an old model.

      Parameters:
      manager - the manager that holds models
      id - the id of the model
      Returns:
      the model