Record Class EntityTextureOverride<T extends net.minecraft.world.entity.LivingEntity>
java.lang.Object
java.lang.Record
net.frozenblock.lib.entity.api.rendering.EntityTextureOverride<T>
- Type Parameters:
T- The entity class the override is for.
@Environment(CLIENT)
public record EntityTextureOverride<T extends net.minecraft.world.entity.LivingEntity>(net.minecraft.world.entity.EntityType<T extends net.minecraft.world.entity.LivingEntity> type, net.minecraft.resources.ResourceLocation texture, EntityTextureOverride.Condition<T extends net.minecraft.world.entity.LivingEntity> condition)
extends Record
Used to override an entity's texture if a condition is met.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceEntityTextureOverride.Condition<T extends net.minecraft.world.entity.LivingEntity> -
Constructor Summary
ConstructorsConstructorDescriptionEntityTextureOverride(net.minecraft.world.entity.EntityType<T> type, net.minecraft.resources.ResourceLocation texture, EntityTextureOverride.Condition<T> condition) Creates an instance of aEntityTextureOverriderecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static <T extends net.minecraft.world.entity.LivingEntity>
EntityTextureOverride<T>register(net.minecraft.resources.ResourceLocation key, net.minecraft.world.entity.EntityType<T> type, net.minecraft.resources.ResourceLocation texture, boolean caseSensitive, String... names) static <T extends net.minecraft.world.entity.LivingEntity>
EntityTextureOverride<T>register(net.minecraft.resources.ResourceLocation key, net.minecraft.world.entity.EntityType<T> type, net.minecraft.resources.ResourceLocation texture, String... names) static <T extends net.minecraft.world.entity.LivingEntity>
EntityTextureOverride<T>register(net.minecraft.resources.ResourceLocation key, net.minecraft.world.entity.EntityType<T> type, net.minecraft.resources.ResourceLocation texture, EntityTextureOverride.Condition<T> condition) net.minecraft.resources.ResourceLocationtexture()Returns the value of thetexturerecord component.final StringtoString()Returns a string representation of this record class.net.minecraft.world.entity.EntityType<T>type()Returns the value of thetyperecord component.
-
Constructor Details
-
EntityTextureOverride
public EntityTextureOverride(net.minecraft.world.entity.EntityType<T> type, net.minecraft.resources.ResourceLocation texture, EntityTextureOverride.Condition<T> condition) Creates an instance of aEntityTextureOverriderecord class.- Parameters:
type- the value for thetyperecord componenttexture- the value for thetexturerecord componentcondition- the value for theconditionrecord component
-
-
Method Details
-
register
public static <T extends net.minecraft.world.entity.LivingEntity> EntityTextureOverride<T> register(net.minecraft.resources.ResourceLocation key, net.minecraft.world.entity.EntityType<T> type, net.minecraft.resources.ResourceLocation texture, String... names) -
register
public static <T extends net.minecraft.world.entity.LivingEntity> EntityTextureOverride<T> register(net.minecraft.resources.ResourceLocation key, net.minecraft.world.entity.EntityType<T> type, net.minecraft.resources.ResourceLocation texture, boolean caseSensitive, String... names) -
register
public static <T extends net.minecraft.world.entity.LivingEntity> EntityTextureOverride<T> register(net.minecraft.resources.ResourceLocation key, net.minecraft.world.entity.EntityType<T> type, net.minecraft.resources.ResourceLocation texture, EntityTextureOverride.Condition<T> condition) -
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. -
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. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
texture
public net.minecraft.resources.ResourceLocation texture()Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-