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
ConstructorsConstructorDescriptionUpdate(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 aUpdaterecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable Tdata()Returns the value of thedatarecord component.net.minecraft.world.item.ItemDisplayContextReturns the value of thedisplayContextrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable net.minecraft.world.entity.LivingEntityfinal inthashCode()Returns a hash code value for this object.@Nullable net.minecraft.client.multiplayer.ClientLevellevel()Returns the value of thelevelrecord component.@Nullable net.minecraft.world.entity.ItemOwnerowner()Returns the value of theownerrecord component.net.minecraft.client.renderer.item.ItemModelResolverresolver()Returns the value of theresolverrecord component.intseed()Returns the value of theseedrecord component.net.minecraft.world.item.ItemStackstack()Returns the value of thestackrecord component.net.minecraft.client.renderer.item.ItemStackRenderStatestate()Returns the value of thestaterecord component.booleantest(net.minecraft.client.renderer.item.properties.conditional.ItemModelPropertyTest test) floatfinal StringtoString()Returns a string representation of this record class.voidupdateModel(net.minecraft.client.renderer.item.ItemModel model)
-
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 aUpdaterecord class.- Parameters:
resolver- the value for theresolverrecord componentstate- the value for thestaterecord componentstack- the value for thestackrecord componentdisplayContext- the value for thedisplayContextrecord componentdata- the value for thedatarecord componentlevel- the value for thelevelrecord componentowner- the value for theownerrecord componentseed- the value for theseedrecord 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
-
hashCode
-
equals
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 withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
resolver
public net.minecraft.client.renderer.item.ItemModelResolver resolver()Returns the value of theresolverrecord component.- Returns:
- the value of the
resolverrecord component
-
state
public net.minecraft.client.renderer.item.ItemStackRenderState state()Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
stack
public net.minecraft.world.item.ItemStack stack()Returns the value of thestackrecord component.- Returns:
- the value of the
stackrecord component
-
displayContext
public net.minecraft.world.item.ItemDisplayContext displayContext()Returns the value of thedisplayContextrecord component.- Returns:
- the value of the
displayContextrecord component
-
data
Returns the value of thedatarecord component.- Returns:
- the value of the
datarecord component
-
level
public @Nullable net.minecraft.client.multiplayer.ClientLevel level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-
owner
public @Nullable net.minecraft.world.entity.ItemOwner owner()Returns the value of theownerrecord component.- Returns:
- the value of the
ownerrecord component
-
seed
public int seed()Returns the value of theseedrecord component.- Returns:
- the value of the
seedrecord component
-