Record Class IsCastItemProperty
java.lang.Object
java.lang.Record
com.wdiscute.starcatcher.registry.items.rod.IsCastItemProperty
- All Implemented Interfaces:
net.minecraft.client.renderer.item.properties.conditional.ConditionalItemModelProperty, net.minecraft.client.renderer.item.properties.conditional.ItemModelPropertyTest
public record IsCastItemProperty(boolean isCast)
extends Record
implements net.minecraft.client.renderer.item.properties.conditional.ConditionalItemModelProperty
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<IsCastItemProperty> -
Constructor Summary
ConstructorsConstructorDescriptionIsCastItemProperty(boolean isCast) Creates an instance of aIsCastItemPropertyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanget(net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.client.multiplayer.ClientLevel level, @Nullable net.minecraft.world.entity.LivingEntity owner, int seed, net.minecraft.world.item.ItemDisplayContext displayContext) final inthashCode()Returns a hash code value for this object.booleanisCast()Returns the value of theisCastrecord component.final StringtoString()Returns a string representation of this record class.com.mojang.serialization.MapCodec<IsCastItemProperty> type()
-
Field Details
-
MAP_CODEC
-
-
Constructor Details
-
IsCastItemProperty
public IsCastItemProperty(boolean isCast) Creates an instance of aIsCastItemPropertyrecord class.- Parameters:
isCast- the value for theisCastrecord component
-
-
Method Details
-
get
public boolean get(net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.client.multiplayer.ClientLevel level, @Nullable net.minecraft.world.entity.LivingEntity owner, int seed, net.minecraft.world.item.ItemDisplayContext displayContext) - Specified by:
getin interfacenet.minecraft.client.renderer.item.properties.conditional.ItemModelPropertyTest
-
type
- Specified by:
typein interfacenet.minecraft.client.renderer.item.properties.conditional.ConditionalItemModelProperty
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
isCast
public boolean isCast()Returns the value of theisCastrecord component.- Returns:
- the value of the
isCastrecord component
-