Class GenericModelHolder<M extends net.minecraft.client.model.Model>
java.lang.Object
com.pixelmonmod.pixelmon.client.models.ModelHolder<M>
com.pixelmonmod.pixelmon.client.render.GenericModelHolder<M>
Created by Jay113355 on 5/12/2017
Basically this class is a way of lazy loading for block models. So that those aren't loaded on startup.
Its the same idea as
CustomModel
Only in object form.-
Field Summary
Fields inherited from class com.pixelmonmod.pixelmon.client.models.ModelHolder
model
-
Constructor Summary
ConstructorDescriptionGenericModelHolder
(Class<M> clazz) GenericModelHolder
(Class<M> clazz, Object... parameters) GenericModelHolder
(Class<M> clazz, net.minecraft.resources.ResourceLocation resource) GenericModelHolder
(String modelPath) GenericModelHolder
(net.minecraft.resources.ResourceLocation model) -
Method Summary
Modifier and TypeMethodDescriptionprotected M
void
render
(com.mojang.blaze3d.vertex.PoseStack matrix, com.mojang.blaze3d.vertex.VertexConsumer buffer, int packedLight, int packedOverlay) void
render
(com.mojang.blaze3d.vertex.PoseStack matrix, com.mojang.blaze3d.vertex.VertexConsumer buffer, int packedLight, int packedOverlay, float r, float g, float b, float a) Methods inherited from class com.pixelmonmod.pixelmon.client.models.ModelHolder
clear, getModel
-
Constructor Details
-
GenericModelHolder
- Parameters:
clazz
- The class of the model. Will normally beGenericSmdModel
unless it's an older model.resource
- The ResourceLocation of the model's .pqc file (Only applies to GenericSmdModel). null otherwise.
-
GenericModelHolder
-
GenericModelHolder
-
GenericModelHolder
public GenericModelHolder(net.minecraft.resources.ResourceLocation model) -
GenericModelHolder
-
-
Method Details
-
render
public void render(com.mojang.blaze3d.vertex.PoseStack matrix, com.mojang.blaze3d.vertex.VertexConsumer buffer, int packedLight, int packedOverlay, float r, float g, float b, float a) -
render
public void render(com.mojang.blaze3d.vertex.PoseStack matrix, com.mojang.blaze3d.vertex.VertexConsumer buffer, int packedLight, int packedOverlay) -
loadModel
- Specified by:
loadModel
in classModelHolder<M extends net.minecraft.client.model.Model>
-