Record Class EntityInfo
java.lang.Object
java.lang.Record
io.hymods.lib.data.EntityInfo
-
Constructor Summary
ConstructorsConstructorDescriptionEntityInfo(com.hypixel.hytale.component.Ref<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> reference, String name, String type, com.hypixel.hytale.math.vector.Vector3d position, double distance, boolean isPlayer, boolean isNPC) Creates an instance of aEntityInforecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubledistance()Returns the value of thedistancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanisNPC()Returns the value of theisNPCrecord component.booleanisPlayer()Returns the value of theisPlayerrecord component.name()Returns the value of thenamerecord component.com.hypixel.hytale.math.vector.Vector3dposition()Returns the value of thepositionrecord component.com.hypixel.hytale.component.Ref<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> Returns the value of thereferencerecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
EntityInfo
public EntityInfo(com.hypixel.hytale.component.Ref<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> reference, String name, String type, com.hypixel.hytale.math.vector.Vector3d position, double distance, boolean isPlayer, boolean isNPC) Creates an instance of aEntityInforecord class.- Parameters:
reference- the value for thereferencerecord componentname- the value for thenamerecord componenttype- the value for thetyperecord componentposition- the value for thepositionrecord componentdistance- the value for thedistancerecord componentisPlayer- the value for theisPlayerrecord componentisNPC- the value for theisNPCrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
reference
public com.hypixel.hytale.component.Ref<com.hypixel.hytale.server.core.universe.world.storage.EntityStore> reference()Returns the value of thereferencerecord component.- Returns:
- the value of the
referencerecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
position
public com.hypixel.hytale.math.vector.Vector3d position()Returns the value of thepositionrecord component.- Returns:
- the value of the
positionrecord component
-
distance
public double distance()Returns the value of thedistancerecord component.- Returns:
- the value of the
distancerecord component
-
isPlayer
public boolean isPlayer()Returns the value of theisPlayerrecord component.- Returns:
- the value of the
isPlayerrecord component
-
isNPC
public boolean isNPC()Returns the value of theisNPCrecord component.- Returns:
- the value of the
isNPCrecord component
-