Record Class DynamicFluidContainerModel.Textures

java.lang.Object
java.lang.Record
net.neoforged.neoforge.client.model.item.DynamicFluidContainerModel.Textures
Enclosing class:
DynamicFluidContainerModel

public static record DynamicFluidContainerModel.Textures(Optional<net.minecraft.resources.ResourceLocation> particle, Optional<net.minecraft.resources.ResourceLocation> base, Optional<net.minecraft.resources.ResourceLocation> fluid, Optional<net.minecraft.resources.ResourceLocation> cover) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Optional<net.minecraft.resources.ResourceLocation>
    The field for the base record component.
    static final com.mojang.serialization.Codec<DynamicFluidContainerModel.Textures>
     
    private final Optional<net.minecraft.resources.ResourceLocation>
    The field for the cover record component.
    private final Optional<net.minecraft.resources.ResourceLocation>
    The field for the fluid record component.
    private final Optional<net.minecraft.resources.ResourceLocation>
    The field for the particle record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Textures(Optional<net.minecraft.resources.ResourceLocation> particle, Optional<net.minecraft.resources.ResourceLocation> base, Optional<net.minecraft.resources.ResourceLocation> fluid, Optional<net.minecraft.resources.ResourceLocation> cover)
    Creates an instance of a Textures record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    Optional<net.minecraft.resources.ResourceLocation>
    Returns the value of the base record component.
    Optional<net.minecraft.resources.ResourceLocation>
    Returns the value of the cover record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    Optional<net.minecraft.resources.ResourceLocation>
    Returns the value of the fluid record component.
    final int
    Returns a hash code value for this object.
    Optional<net.minecraft.resources.ResourceLocation>
    Returns the value of the particle record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • particle

      private final Optional<net.minecraft.resources.ResourceLocation> particle
      The field for the particle record component.
    • base

      private final Optional<net.minecraft.resources.ResourceLocation> base
      The field for the base record component.
    • fluid

      private final Optional<net.minecraft.resources.ResourceLocation> fluid
      The field for the fluid record component.
    • cover

      private final Optional<net.minecraft.resources.ResourceLocation> cover
      The field for the cover record component.
    • CODEC

      public static final com.mojang.serialization.Codec<DynamicFluidContainerModel.Textures> CODEC
  • Constructor Details

    • Textures

      public Textures(Optional<net.minecraft.resources.ResourceLocation> particle, Optional<net.minecraft.resources.ResourceLocation> base, Optional<net.minecraft.resources.ResourceLocation> fluid, Optional<net.minecraft.resources.ResourceLocation> cover)
      Creates an instance of a Textures record class.
      Parameters:
      particle - the value for the particle record component
      base - the value for the base record component
      fluid - the value for the fluid record component
      cover - the value for the cover record component
  • Method Details

    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • particle

      public Optional<net.minecraft.resources.ResourceLocation> particle()
      Returns the value of the particle record component.
      Returns:
      the value of the particle record component
    • base

      public Optional<net.minecraft.resources.ResourceLocation> base()
      Returns the value of the base record component.
      Returns:
      the value of the base record component
    • fluid

      public Optional<net.minecraft.resources.ResourceLocation> fluid()
      Returns the value of the fluid record component.
      Returns:
      the value of the fluid record component
    • cover

      public Optional<net.minecraft.resources.ResourceLocation> cover()
      Returns the value of the cover record component.
      Returns:
      the value of the cover record component