Record Class SimpleModelWrapper

java.lang.Object
java.lang.Record
net.minecraft.client.resources.model.SimpleModelWrapper
All Implemented Interfaces:
BlockStateModelPart, BlockStateModelPartExtension

public record SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, Material.Baked particleMaterial) extends Record implements BlockStateModelPart
  • Field Details

    • quads

      private final QuadCollection quads
      The field for the quads record component.
    • useAmbientOcclusion

      private final boolean useAmbientOcclusion
      The field for the useAmbientOcclusion record component.
    • particleMaterial

      private final Material.Baked particleMaterial
      The field for the particleMaterial record component.
    • LOGGER

      private static final org.slf4j.Logger LOGGER
  • Constructor Details

    • SimpleModelWrapper

      public SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, Material.Baked particleMaterial)
      Creates an instance of a SimpleModelWrapper record class.
      Parameters:
      quads - the value for the quads record component
      useAmbientOcclusion - the value for the useAmbientOcclusion record component
      particleMaterial - the value for the particleMaterial record component
  • Method Details

    • bake

      public static BlockStateModelPart bake(ModelBaker modelBakery, Identifier location, ModelState state)
    • bake

      public static BlockStateModelPart bake(ModelBaker modelBakery, ResolvedModel model, ModelState state)
    • getQuads

      public List<BakedQuad> getQuads(@Nullable Direction direction)
      Specified by:
      getQuads in interface BlockStateModelPart
    • materialFlags

      public int materialFlags()
      Specified by:
      materialFlags in interface BlockStateModelPart
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • quads

      public QuadCollection quads()
      Returns the value of the quads record component.
      Returns:
      the value of the quads record component
    • useAmbientOcclusion

      public boolean useAmbientOcclusion()
      Returns the value of the useAmbientOcclusion record component.
      Specified by:
      useAmbientOcclusion in interface BlockStateModelPart
      Returns:
      the value of the useAmbientOcclusion record component
    • particleMaterial

      public Material.Baked particleMaterial()
      Returns the value of the particleMaterial record component.
      Specified by:
      particleMaterial in interface BlockStateModelPart
      Returns:
      the value of the particleMaterial record component