Record Class Update<T>

java.lang.Object
java.lang.Record
net.ntrdeal.realapi.client.render.model.real_model.Update<T>

@Environment(CLIENT) public record Update<T>(net.minecraft.client.renderer.item.ItemModelResolver resolver, net.minecraft.client.renderer.item.ItemStackRenderState state, net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.ItemDisplayContext displayContext, @Nullable T data, @Nullable net.minecraft.client.multiplayer.ClientLevel level, @Nullable net.minecraft.world.entity.ItemOwner owner, int seed) extends Record
  • Constructor Summary

    Constructors
    Constructor
    Description
    Update(net.minecraft.client.renderer.item.ItemModelResolver resolver, net.minecraft.client.renderer.item.ItemStackRenderState state, net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.ItemDisplayContext displayContext, @Nullable T data, @Nullable net.minecraft.client.multiplayer.ClientLevel level, @Nullable net.minecraft.world.entity.ItemOwner owner, int seed)
    Creates an instance of a Update record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable T
    Returns the value of the data record component.
    net.minecraft.world.item.ItemDisplayContext
    Returns the value of the displayContext record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    @Nullable net.minecraft.world.entity.LivingEntity
     
    final int
    Returns a hash code value for this object.
    @Nullable net.minecraft.client.multiplayer.ClientLevel
    Returns the value of the level record component.
    @Nullable net.minecraft.world.entity.ItemOwner
    Returns the value of the owner record component.
    net.minecraft.client.renderer.item.ItemModelResolver
    Returns the value of the resolver record component.
    int
    Returns the value of the seed record component.
    net.minecraft.world.item.ItemStack
    Returns the value of the stack record component.
    net.minecraft.client.renderer.item.ItemStackRenderState
    Returns the value of the state record component.
    boolean
    test(net.minecraft.client.renderer.item.properties.conditional.ItemModelPropertyTest test)
     
    float
     
    final String
    Returns a string representation of this record class.
    void
    updateModel(net.minecraft.client.renderer.item.ItemModel model)
     

    Methods inherited from class Object

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

    • Update

      public Update(net.minecraft.client.renderer.item.ItemModelResolver resolver, net.minecraft.client.renderer.item.ItemStackRenderState state, net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.ItemDisplayContext displayContext, @Nullable T data, @Nullable net.minecraft.client.multiplayer.ClientLevel level, @Nullable net.minecraft.world.entity.ItemOwner owner, int seed)
      Creates an instance of a Update record class.
      Parameters:
      resolver - the value for the resolver record component
      state - the value for the state record component
      stack - the value for the stack record component
      displayContext - the value for the displayContext record component
      data - the value for the data record component
      level - the value for the level record component
      owner - the value for the owner record component
      seed - the value for the seed record component
  • Method Details

    • updateModel

      public void updateModel(net.minecraft.client.renderer.item.ItemModel model)
    • test

      public boolean test(net.minecraft.client.renderer.item.properties.conditional.ItemModelPropertyTest test)
    • tickDelta

      public float tickDelta()
    • getOwnerEntity

      public @Nullable net.minecraft.world.entity.LivingEntity getOwnerEntity()
    • 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.
    • resolver

      public net.minecraft.client.renderer.item.ItemModelResolver resolver()
      Returns the value of the resolver record component.
      Returns:
      the value of the resolver record component
    • state

      public net.minecraft.client.renderer.item.ItemStackRenderState state()
      Returns the value of the state record component.
      Returns:
      the value of the state record component
    • stack

      public net.minecraft.world.item.ItemStack stack()
      Returns the value of the stack record component.
      Returns:
      the value of the stack record component
    • displayContext

      public net.minecraft.world.item.ItemDisplayContext displayContext()
      Returns the value of the displayContext record component.
      Returns:
      the value of the displayContext record component
    • data

      public @Nullable T data()
      Returns the value of the data record component.
      Returns:
      the value of the data record component
    • level

      public @Nullable net.minecraft.client.multiplayer.ClientLevel level()
      Returns the value of the level record component.
      Returns:
      the value of the level record component
    • owner

      public @Nullable net.minecraft.world.entity.ItemOwner owner()
      Returns the value of the owner record component.
      Returns:
      the value of the owner record component
    • seed

      public int seed()
      Returns the value of the seed record component.
      Returns:
      the value of the seed record component