Record Class FloatProperty

java.lang.Object
java.lang.Record
org.geysermc.geyser.entity.properties.type.FloatProperty
All Implemented Interfaces:
org.geysermc.geyser.api.entity.property.GeyserEntityProperty<Float>, org.geysermc.geyser.api.entity.property.type.GeyserFloatEntityProperty, PropertyType<Float,org.cloudburstmc.protocol.bedrock.data.entity.FloatEntityProperty>

public record FloatProperty(org.geysermc.geyser.api.util.Identifier identifier, float max, float min, Float defaultValue) extends Record implements PropertyType<Float,org.cloudburstmc.protocol.bedrock.data.entity.FloatEntityProperty>, org.geysermc.geyser.api.entity.property.type.GeyserFloatEntityProperty
  • Constructor Summary

    Constructors
    Constructor
    Description
    FloatProperty(org.geysermc.geyser.api.util.Identifier identifier, float max, float min, Float defaultValue)
    Creates an instance of a FloatProperty record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.cloudburstmc.protocol.bedrock.data.entity.FloatEntityProperty
    createValue(int index, Float value)
     
    Returns the value of the defaultValue record component.
    org.cloudburstmc.protocol.bedrock.data.entity.FloatEntityProperty
    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.
    float
    max()
    Returns the value of the max record component.
    float
    min()
    Returns the value of the min 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

    • FloatProperty

      public FloatProperty(org.geysermc.geyser.api.util.Identifier identifier, float max, float min, Float defaultValue)
      Creates an instance of a FloatProperty record class.
      Parameters:
      identifier - the value for the identifier record component
      max - the value for the max record component
      min - the value for the min 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<Float,org.cloudburstmc.protocol.bedrock.data.entity.FloatEntityProperty>
    • defaultValue

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

      public org.cloudburstmc.protocol.bedrock.data.entity.FloatEntityProperty createValue(int index, Float value)
      Specified by:
      createValue in interface PropertyType<Float,org.cloudburstmc.protocol.bedrock.data.entity.FloatEntityProperty>
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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<Float>
      Returns:
      the value of the identifier record component
    • max

      public float max()
      Returns the value of the max record component.
      Specified by:
      max in interface org.geysermc.geyser.api.entity.property.type.GeyserFloatEntityProperty
      Returns:
      the value of the max record component
    • min

      public float min()
      Returns the value of the min record component.
      Specified by:
      min in interface org.geysermc.geyser.api.entity.property.type.GeyserFloatEntityProperty
      Returns:
      the value of the min record component
    • defaultValue

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