Class BlockModel

java.lang.Object
com.jozufozu.flywheel.core.model.BlockModel
All Implemented Interfaces:
Model

public class BlockModel extends Object implements Model
A model of a single block.
  • Constructor Details

    • BlockModel

      public BlockModel(net.minecraft.world.level.block.state.BlockState state)
    • BlockModel

      public BlockModel(net.minecraft.client.resources.model.BakedModel model, net.minecraft.world.level.block.state.BlockState referenceState)
    • BlockModel

      public BlockModel(net.minecraft.client.resources.model.BakedModel model, net.minecraft.world.level.block.state.BlockState referenceState, com.mojang.blaze3d.vertex.PoseStack ms)
    • BlockModel

      public BlockModel(Bufferable bufferable, String name)
    • BlockModel

      public BlockModel(Pair<com.mojang.blaze3d.vertex.BufferBuilder.RenderedBuffer,Integer> pair, String name)
  • Method Details

    • name

      public String name()
      Description copied from interface: Model
      A name uniquely identifying this model.
      Specified by:
      name in interface Model
    • vertexCount

      public int vertexCount()
      Specified by:
      vertexCount in interface Model
      Returns:
      The number of vertices the model has.
    • getReader

      public VertexList getReader()
      Specified by:
      getReader in interface Model
    • createEBO

      public ElementBuffer createEBO()
      Description copied from interface: Model
      Create an element buffer object that indexes the vertices of this model.

      Very often models in minecraft are made up of sequential quads, which is a very predictable pattern. The default implementation accommodates this, however this can be overridden to change the behavior and support more complex models.

      Specified by:
      createEBO in interface Model
      Returns:
      an element buffer object indexing this model's vertices.
    • getType

      public VertexType getType()
      Specified by:
      getType in interface Model
    • delete

      public void delete()
      Specified by:
      delete in interface Model