public class ModelComponent extends java.lang.Object implements IRenderComponent
ModelComponent allows models to be rendered for MalisisBlock.| Modifier and Type | Class and Description |
|---|---|
static interface |
ModelComponent.IVisibilityProvider
IVisibilityProvider determines whether a specific shape/group should be rendered.
|
| Modifier and Type | Field and Description |
|---|---|
protected MalisisModel |
model
MalisisModel for this ModelComponent. |
protected IModelIconProvider |
modelIconProvider
IModelIconProvider used for rendering. |
protected RenderParameters |
renderParameters
RenderParameters used for rendering. |
protected net.minecraft.util.ResourceLocation |
resourceLocation
ResourceLocation for the model. |
protected ModelComponent.IVisibilityProvider |
visibilityProvider
Shape/group visibility check.
|
| Constructor and Description |
|---|
ModelComponent(java.lang.String modelName)
Instantiates a new
ModelComponent with a ModelComponent.IVisibilityProvider and load its MalisisModel. |
ModelComponent(java.lang.String modelName,
ModelComponent.IVisibilityProvider visibilityProvider)
Instantiates a new
ModelComponent with a ModelComponent.IVisibilityProvider and load its MalisisModel. |
| Modifier and Type | Method and Description |
|---|---|
MalisisModel |
getModel()
Gets the
MalisisModel for this ModelComponent. |
protected void |
loadModel()
Loads the
MalisisBlock for this ModelComponent. |
void |
onComponentAdded(IComponentProvider provider)
Called when this
IComponent is added to the IComponentProvider. |
void |
render(net.minecraft.block.Block block,
MalisisRenderer<? extends net.minecraft.tileentity.TileEntity> renderer) |
void |
setIconProvider(IModelIconProvider iconProvider)
Sets the
IModelIconProvider to use with this ModelComponent. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisClientComponentgetComponent, getDependenciesprotected net.minecraft.util.ResourceLocation resourceLocation
ResourceLocation for the model.protected MalisisModel model
MalisisModel for this ModelComponent.protected RenderParameters renderParameters
RenderParameters used for rendering.protected IModelIconProvider modelIconProvider
IModelIconProvider used for rendering.protected ModelComponent.IVisibilityProvider visibilityProvider
public ModelComponent(java.lang.String modelName,
ModelComponent.IVisibilityProvider visibilityProvider)
ModelComponent with a ModelComponent.IVisibilityProvider and load its MalisisModel.modelName - the model namepublic ModelComponent(java.lang.String modelName)
ModelComponent with a ModelComponent.IVisibilityProvider and load its MalisisModel.modelName - the model namepublic void setIconProvider(IModelIconProvider iconProvider)
IModelIconProvider to use with this ModelComponent.iconProvider - the new icon providerpublic void onComponentAdded(IComponentProvider provider)
IComponentIComponent is added to the IComponentProvider.onComponentAdded in interface IComponentprovider - the providerprotected void loadModel()
MalisisBlock for this ModelComponent.public MalisisModel getModel()
MalisisModel for this ModelComponent.public void render(net.minecraft.block.Block block,
MalisisRenderer<? extends net.minecraft.tileentity.TileEntity> renderer)
render in interface IRenderComponent