Record Class BooleanProperty

java.lang.Object
java.lang.Record
org.geysermc.geyser.entity.properties.type.BooleanProperty
All Implemented Interfaces:
org.geysermc.geyser.api.entity.property.GeyserEntityProperty<Boolean>, org.geysermc.geyser.api.entity.property.type.GeyserBooleanEntityProperty, PropertyType<Boolean,org.cloudburstmc.protocol.bedrock.data.entity.IntEntityProperty>

public record BooleanProperty(org.geysermc.geyser.api.util.Identifier identifier, Boolean defaultValue) extends Record implements PropertyType<Boolean,org.cloudburstmc.protocol.bedrock.data.entity.IntEntityProperty>, org.geysermc.geyser.api.entity.property.type.GeyserBooleanEntityProperty
  • Constructor Summary

    Constructors
    Constructor
    Description
    BooleanProperty(org.geysermc.geyser.api.util.Identifier identifier, Boolean defaultValue)
    Creates an instance of a BooleanProperty record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.cloudburstmc.protocol.bedrock.data.entity.IntEntityProperty
    createValue(int index, Boolean value)
     
    Returns the value of the defaultValue record component.
    org.cloudburstmc.protocol.bedrock.data.entity.IntEntityProperty
    defaultValue(int index)
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    org.geysermc.geyser.api.util.Identifier
    Returns the value of the identifier record component.
    org.cloudburstmc.nbt.NbtMap
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.geysermc.geyser.entity.properties.type.PropertyType

    apply
  • Constructor Details

    • BooleanProperty

      public BooleanProperty(org.geysermc.geyser.api.util.Identifier identifier, Boolean defaultValue)
      Creates an instance of a BooleanProperty record class.
      Parameters:
      identifier - the value for the identifier record component
      defaultValue - the value for the defaultValue record component
  • Method Details

    • nbtMap

      public org.cloudburstmc.nbt.NbtMap nbtMap()
      Specified by:
      nbtMap in interface PropertyType<Boolean,org.cloudburstmc.protocol.bedrock.data.entity.IntEntityProperty>
    • defaultValue

      public org.cloudburstmc.protocol.bedrock.data.entity.IntEntityProperty defaultValue(int index)
      Specified by:
      defaultValue in interface PropertyType<Boolean,org.cloudburstmc.protocol.bedrock.data.entity.IntEntityProperty>
    • createValue

      public org.cloudburstmc.protocol.bedrock.data.entity.IntEntityProperty createValue(int index, Boolean value)
      Specified by:
      createValue in interface PropertyType<Boolean,org.cloudburstmc.protocol.bedrock.data.entity.IntEntityProperty>
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • identifier

      public org.geysermc.geyser.api.util.Identifier identifier()
      Returns the value of the identifier record component.
      Specified by:
      identifier in interface org.geysermc.geyser.api.entity.property.GeyserEntityProperty<Boolean>
      Returns:
      the value of the identifier record component
    • defaultValue

      public Boolean defaultValue()
      Returns the value of the defaultValue record component.
      Specified by:
      defaultValue in interface org.geysermc.geyser.api.entity.property.GeyserEntityProperty<Boolean>
      Returns:
      the value of the defaultValue record component