Package org.geysermc.geyser.impl.entity
Record Class HitboxImpl
java.lang.Object
java.lang.Record
org.geysermc.geyser.impl.entity.HitboxImpl
- All Implemented Interfaces:
org.geysermc.geyser.api.entity.data.types.Hitbox
public record HitboxImpl(org.cloudburstmc.math.vector.Vector3f min, org.cloudburstmc.math.vector.Vector3f max, org.cloudburstmc.math.vector.Vector3f pivot)
extends Record
implements org.geysermc.geyser.api.entity.data.types.Hitbox
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.geysermc.geyser.api.entity.data.types.Hitbox
org.geysermc.geyser.api.entity.data.types.Hitbox.Builder -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.geysermc.geyser.api.entity.data.types.Hitbox -
Constructor Summary
ConstructorsConstructorDescriptionHitboxImpl(org.cloudburstmc.math.vector.Vector3f min, org.cloudburstmc.math.vector.Vector3f max, org.cloudburstmc.math.vector.Vector3f pivot) Creates an instance of aHitboxImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static List<org.geysermc.geyser.api.entity.data.types.Hitbox> fromMetaData(@Nullable org.cloudburstmc.nbt.NbtMap metaDataMap) final inthashCode()Returns a hash code value for this object.org.cloudburstmc.math.vector.Vector3fmax()Returns the value of themaxrecord component.org.cloudburstmc.math.vector.Vector3fmin()Returns the value of theminrecord component.org.cloudburstmc.math.vector.Vector3fpivot()Returns the value of thepivotrecord component.static org.cloudburstmc.nbt.NbtMapstatic org.cloudburstmc.nbt.NbtMaptoNbtMap(org.geysermc.geyser.api.entity.data.types.Hitbox hitbox) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
EMPTY
public static final org.geysermc.geyser.api.entity.data.types.Hitbox EMPTY
-
-
Constructor Details
-
HitboxImpl
public HitboxImpl(org.cloudburstmc.math.vector.Vector3f min, org.cloudburstmc.math.vector.Vector3f max, org.cloudburstmc.math.vector.Vector3f pivot) Creates an instance of aHitboxImplrecord class.- Parameters:
min- the value for theminrecord componentmax- the value for themaxrecord componentpivot- the value for thepivotrecord component
-
-
Method Details
-
fromMetaData
public static List<org.geysermc.geyser.api.entity.data.types.Hitbox> fromMetaData(@Nullable org.cloudburstmc.nbt.NbtMap metaDataMap) -
toNbtMap
public static org.cloudburstmc.nbt.NbtMap toNbtMap(org.geysermc.geyser.api.entity.data.types.Hitbox hitbox) -
toNbtMap
public static org.cloudburstmc.nbt.NbtMap toNbtMap(List<org.geysermc.geyser.api.entity.data.types.Hitbox> hitboxes) -
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). -
min
public org.cloudburstmc.math.vector.Vector3f min()Returns the value of theminrecord component.- Specified by:
minin interfaceorg.geysermc.geyser.api.entity.data.types.Hitbox- Returns:
- the value of the
minrecord component
-
max
public org.cloudburstmc.math.vector.Vector3f max()Returns the value of themaxrecord component.- Specified by:
maxin interfaceorg.geysermc.geyser.api.entity.data.types.Hitbox- Returns:
- the value of the
maxrecord component
-
pivot
public org.cloudburstmc.math.vector.Vector3f pivot()Returns the value of thepivotrecord component.- Specified by:
pivotin interfaceorg.geysermc.geyser.api.entity.data.types.Hitbox- Returns:
- the value of the
pivotrecord component
-