Package net.minestom.server.registry
Record Class Registry.EntityEntry
java.lang.Object
java.lang.Record
net.minestom.server.registry.Registry.EntityEntry
- All Implemented Interfaces:
Registry.Entry
- Enclosing class:
Registry
public static record Registry.EntityEntry(NamespaceID namespace, int id, String translationKey, double width, double height, double drag, double acceleration, EntitySpawnType spawnType, BoundingBox boundingBox, Registry.Properties custom)
extends Record
implements Registry.Entry
-
Constructor Summary
ConstructorsConstructorDescriptionEntityEntry(String namespace, Registry.Properties main, Registry.Properties custom) EntityEntry(NamespaceID namespace, int id, String translationKey, double width, double height, double drag, double acceleration, EntitySpawnType spawnType, BoundingBox boundingBox, Registry.Properties custom) Creates an instance of aEntityEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theaccelerationrecord component.Returns the value of theboundingBoxrecord component.custom()Returns the value of thecustomrecord component.doubledrag()Returns the value of thedragrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubleheight()Returns the value of theheightrecord component.intid()Returns the value of theidrecord component.Returns the value of thenamespacerecord component.Returns the value of thespawnTyperecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetranslationKeyrecord component.doublewidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
EntityEntry
-
EntityEntry
public EntityEntry(NamespaceID namespace, int id, String translationKey, double width, double height, double drag, double acceleration, EntitySpawnType spawnType, BoundingBox boundingBox, Registry.Properties custom) Creates an instance of aEntityEntryrecord class.- Parameters:
namespace- the value for thenamespacerecord componentid- the value for theidrecord componenttranslationKey- the value for thetranslationKeyrecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentdrag- the value for thedragrecord componentacceleration- the value for theaccelerationrecord componentspawnType- the value for thespawnTyperecord componentboundingBox- the value for theboundingBoxrecord componentcustom- the value for thecustomrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
namespace
Returns the value of thenamespacerecord component.- Returns:
- the value of the
namespacerecord component
-
id
public int id()Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
translationKey
Returns the value of thetranslationKeyrecord component.- Returns:
- the value of the
translationKeyrecord component
-
width
public double width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public double height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
drag
public double drag()Returns the value of thedragrecord component.- Returns:
- the value of the
dragrecord component
-
acceleration
public double acceleration()Returns the value of theaccelerationrecord component.- Returns:
- the value of the
accelerationrecord component
-
spawnType
Returns the value of thespawnTyperecord component.- Returns:
- the value of the
spawnTyperecord component
-
boundingBox
Returns the value of theboundingBoxrecord component.- Returns:
- the value of the
boundingBoxrecord component
-
custom
Returns the value of thecustomrecord component.- Specified by:
customin interfaceRegistry.Entry- Returns:
- the value of the
customrecord component
-