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>

public class GenericModelHolder<M extends net.minecraft.client.model.Model> extends ModelHolder<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.
  • Constructor Details

    • GenericModelHolder

      public GenericModelHolder(Class<M> clazz, net.minecraft.resources.ResourceLocation resource)
      Parameters:
      clazz - The class of the model. Will normally be GenericSmdModel unless it's an older model.
      resource - The ResourceLocation of the model's .pqc file (Only applies to GenericSmdModel). null otherwise.
    • GenericModelHolder

      public GenericModelHolder(Class<M> clazz, Object... parameters)
    • GenericModelHolder

      public GenericModelHolder(Class<M> clazz)
    • GenericModelHolder

      public GenericModelHolder(net.minecraft.resources.ResourceLocation model)
    • GenericModelHolder

      public GenericModelHolder(String modelPath)
  • 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

      protected M loadModel()
      Specified by:
      loadModel in class ModelHolder<M extends net.minecraft.client.model.Model>