Package appeng.api.client
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.ResourceLocationReturns the default model, which can be used when no explicit model is registered.static @Nullable net.minecraft.resources.ResourceLocationmodel(net.minecraft.world.level.ItemLike itemLike) TheResourceLocationof 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.ResourceLocation> models()A copy of all registered mappings.static voidregisterModel(net.minecraft.world.level.ItemLike itemLike, net.minecraft.resources.ResourceLocation model) Register a new model for a storage cell item.
-
Method Details
-
registerModel
public static void registerModel(net.minecraft.world.level.ItemLike itemLike, net.minecraft.resources.ResourceLocation model) Register a new model for a storage cell item.You are responsible for ensuring that the given model is actually loaded by the game. See
net.minecraftforge.client.model.ModelLoader#addSpecialModel. This method only maps anItemto aResourceLocationwhich 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- TheResourceLocationrepresenting the model.
-
model
@Nullable public static @Nullable net.minecraft.resources.ResourceLocation model(net.minecraft.world.level.ItemLike itemLike) TheResourceLocationof the model used to render the given storage cellItemwhen inserted into a drive or similar.- Parameters:
itemLike-- Returns:
- null, if no model is registered.
-
models
A copy of all registered mappings. -
getDefaultModel
public static net.minecraft.resources.ResourceLocation getDefaultModel()Returns the default model, which can be used when no explicit model is registered.
-