Package org.geysermc.geyser.item
Record Class GeyserCustomItemOptions
java.lang.Object
java.lang.Record
org.geysermc.geyser.item.GeyserCustomItemOptions
- All Implemented Interfaces:
org.geysermc.geyser.api.item.custom.CustomItemOptions
public record GeyserCustomItemOptions(org.geysermc.geyser.api.util.TriState unbreakable, OptionalInt customModelData, OptionalInt damagePredicate)
extends Record
implements org.geysermc.geyser.api.item.custom.CustomItemOptions
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.geysermc.geyser.api.item.custom.CustomItemOptions
org.geysermc.geyser.api.item.custom.CustomItemOptions.Builder -
Constructor Summary
ConstructorsConstructorDescriptionGeyserCustomItemOptions(org.geysermc.geyser.api.util.TriState unbreakable, OptionalInt customModelData, OptionalInt damagePredicate)Creates an instance of aGeyserCustomItemOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecustomModelDatarecord component.Returns the value of thedamagePredicaterecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.org.geysermc.geyser.api.util.TriStateReturns the value of theunbreakablerecord component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.geyser.api.item.custom.CustomItemOptions
hasCustomItemOptions
-
Constructor Details
-
GeyserCustomItemOptions
public GeyserCustomItemOptions(org.geysermc.geyser.api.util.TriState unbreakable, OptionalInt customModelData, OptionalInt damagePredicate)Creates an instance of aGeyserCustomItemOptionsrecord class.- Parameters:
unbreakable- the value for theunbreakablerecord componentcustomModelData- the value for thecustomModelDatarecord componentdamagePredicate- the value for thedamagePredicaterecord component
-
-
Method Details
-
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). -
unbreakable
public org.geysermc.geyser.api.util.TriState unbreakable()Returns the value of theunbreakablerecord component.- Specified by:
unbreakablein interfaceorg.geysermc.geyser.api.item.custom.CustomItemOptions- Returns:
- the value of the
unbreakablerecord component
-
customModelData
Returns the value of thecustomModelDatarecord component.- Specified by:
customModelDatain interfaceorg.geysermc.geyser.api.item.custom.CustomItemOptions- Returns:
- the value of the
customModelDatarecord component
-
damagePredicate
Returns the value of thedamagePredicaterecord component.- Specified by:
damagePredicatein interfaceorg.geysermc.geyser.api.item.custom.CustomItemOptions- Returns:
- the value of the
damagePredicaterecord component
-