Class StorageCellModels

java.lang.Object
appeng.api.client.StorageCellModels

public final class StorageCellModels extends Object
A registry for 3D models used to render storage cells in the world, when they are inserted into a drive or similar machines.
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.resources.Identifier
    Returns the default model, which can be used when no explicit model is registered.
    static net.neoforged.neoforge.client.model.standalone.StandaloneModelKey<net.minecraft.client.renderer.block.dispatch.BlockStateModel>
    Returns the default model, which can be used when no explicit model is registered.
    static @Nullable net.minecraft.resources.Identifier
    model(net.minecraft.world.level.ItemLike itemLike)
    The Identifier of the model used to render the given storage cell Item when inserted into a drive or similar.
    static Map<net.minecraft.world.item.Item, net.minecraft.resources.Identifier>
    A copy of all registered mappings.
    static void
    registerModel(net.minecraft.world.level.ItemLike itemLike, net.minecraft.resources.Identifier model)
    Register a new model for a storage cell item.
    static @Nullable net.neoforged.neoforge.client.model.standalone.StandaloneModelKey<net.minecraft.client.renderer.block.dispatch.BlockStateModel>
    standaloneModel(net.minecraft.world.level.ItemLike itemLike)
    The key for use with ModelManager.getStandaloneModel(StandaloneModelKey) for a given cell item.
    static Map<net.minecraft.world.item.Item, net.neoforged.neoforge.client.model.standalone.StandaloneModelKey<net.minecraft.client.renderer.block.dispatch.BlockStateModel>>
    A copy of all registered standalone model keys.

    Methods inherited from class Object

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

    • registerModel

      public static void registerModel(net.minecraft.world.level.ItemLike itemLike, net.minecraft.resources.Identifier model)
      Register a new model for a storage cell item.

      This method only maps an Item to a Identifier which can be looked up from the ModelBakery. No validation about missing models will be done.

      Will throw an exception in case a model is already registered for an item.

      For examples look at our cell part models within the drive model directory.

      Parameters:
      itemLike - The cell item
      model - The Identifier representing the model.
    • model

      @Nullable public static @Nullable net.minecraft.resources.Identifier model(net.minecraft.world.level.ItemLike itemLike)
      The Identifier of the model used to render the given storage cell Item when inserted into a drive or similar.
      Returns:
      null, if no model is registered.
    • standaloneModel

      @Nullable public static @Nullable net.neoforged.neoforge.client.model.standalone.StandaloneModelKey<net.minecraft.client.renderer.block.dispatch.BlockStateModel> standaloneModel(net.minecraft.world.level.ItemLike itemLike)
      The key for use with ModelManager.getStandaloneModel(StandaloneModelKey) for a given cell item. Since standalone keys are never allowed to change, the registry pre-creates them for your registered models.
      Returns:
      null, if no model is registered.
    • models

      public static Map<net.minecraft.world.item.Item, net.minecraft.resources.Identifier> models()
      A copy of all registered mappings.
    • standaloneModels

      public static Map<net.minecraft.world.item.Item, net.neoforged.neoforge.client.model.standalone.StandaloneModelKey<net.minecraft.client.renderer.block.dispatch.BlockStateModel>> standaloneModels()
      A copy of all registered standalone model keys.
    • getDefaultModel

      public static net.minecraft.resources.Identifier getDefaultModel()
      Returns the default model, which can be used when no explicit model is registered.
    • getDefaultStandaloneModel

      public static net.neoforged.neoforge.client.model.standalone.StandaloneModelKey<net.minecraft.client.renderer.block.dispatch.BlockStateModel> getDefaultStandaloneModel()
      Returns the default model, which can be used when no explicit model is registered.