Class StorageCellModels
java.lang.Object
appeng.api.client.StorageCellModels
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 TypeMethodDescriptionstatic net.minecraft.resources.IdentifierReturns 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.Identifiermodel(net.minecraft.world.level.ItemLike itemLike) TheIdentifierof the model used to render the given storage cellItemwhen inserted into a drive or similar.static Map<net.minecraft.world.item.Item, net.minecraft.resources.Identifier> models()A copy of all registered mappings.static voidregisterModel(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 withModelManager.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.
-
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
Itemto aIdentifierwhich can be looked up from theModelBakery. 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 itemmodel- TheIdentifierrepresenting the model.
-
model
@Nullable public static @Nullable net.minecraft.resources.Identifier model(net.minecraft.world.level.ItemLike itemLike) TheIdentifierof the model used to render the given storage cellItemwhen 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 withModelManager.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
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.
-