Record Class SimpleModelWrapper

java.lang.Object
java.lang.Record
net.minecraft.client.renderer.block.model.SimpleModelWrapper
All Implemented Interfaces:
BlockModelPart, BlockModelPartExtension

public record SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, Material.Baked particleMaterial, boolean hasTranslucency) extends Record implements BlockModelPart
  • 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.
    • hasTranslucency

      private final boolean hasTranslucency
      The field for the hasTranslucency record component.
    • LOGGER

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

    • SimpleModelWrapper

      public SimpleModelWrapper(QuadCollection quads, boolean useAmbientOcclusion, Material.Baked particleMaterial, boolean hasTranslucency)
      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
      hasTranslucency - the value for the hasTranslucency record component
  • Method Details

    • bake

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

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

      public List<BakedQuad> getQuads(@Nullable Direction direction)
      Specified by:
      getQuads in interface BlockModelPart
    • 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 BlockModelPart
      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 BlockModelPart
      Returns:
      the value of the particleMaterial record component
    • hasTranslucency

      public boolean hasTranslucency()
      Returns the value of the hasTranslucency record component.
      Specified by:
      hasTranslucency in interface BlockModelPart
      Returns:
      the value of the hasTranslucency record component