Record Class EntityData
java.lang.Object
java.lang.Record
com.zenith.mc.entity.EntityData
- All Implemented Interfaces:
RegistryData
public record EntityData(int id, String name, float width, float height, boolean attackable, boolean pickable, boolean livingEntity, boolean ageableMob, boolean blocksBuilding, EntityType mcplType, @Nullable EntityAttachment entityAttachment)
extends Record
implements RegistryData
-
Constructor Summary
ConstructorsConstructorDescriptionEntityData(int id, String name, float width, float height, boolean attackable, boolean pickable, boolean livingEntity, boolean ageableMob, boolean blocksBuilding, EntityType mcplType, @Nullable EntityAttachment entityAttachment) Creates an instance of aEntityDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of theageableMobrecord component.booleanReturns the value of theattackablerecord component.booleanReturns the value of theblocksBuildingrecord component.@Nullable EntityAttachmentReturns the value of theentityAttachmentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatheight()Returns the value of theheightrecord component.intid()Returns the value of theidrecord component.booleanReturns the value of thelivingEntityrecord component.mcplType()Returns the value of themcplTyperecord component.name()Returns the value of thenamerecord component.booleanpickable()Returns the value of thepickablerecord component.final StringtoString()Returns a string representation of this record class.floatwidth()Returns the value of thewidthrecord component.
-
Constructor Details
-
EntityData
public EntityData(int id, String name, float width, float height, boolean attackable, boolean pickable, boolean livingEntity, boolean ageableMob, boolean blocksBuilding, EntityType mcplType, @Nullable EntityAttachment entityAttachment) Creates an instance of aEntityDatarecord class.- Parameters:
id- the value for theidrecord componentname- the value for thenamerecord componentwidth- the value for thewidthrecord componentheight- the value for theheightrecord componentattackable- the value for theattackablerecord componentpickable- the value for thepickablerecord componentlivingEntity- the value for thelivingEntityrecord componentageableMob- the value for theageableMobrecord componentblocksBuilding- the value for theblocksBuildingrecord componentmcplType- the value for themcplTyperecord componententityAttachment- the value for theentityAttachmentrecord 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. -
id
public int id()Returns the value of theidrecord component.- Specified by:
idin interfaceRegistryData- Returns:
- the value of the
idrecord component
-
name
Returns the value of thenamerecord component.- Specified by:
namein interfaceRegistryData- Returns:
- the value of the
namerecord component
-
width
public float width()Returns the value of thewidthrecord component.- Returns:
- the value of the
widthrecord component
-
height
public float height()Returns the value of theheightrecord component.- Returns:
- the value of the
heightrecord component
-
attackable
public boolean attackable()Returns the value of theattackablerecord component.- Returns:
- the value of the
attackablerecord component
-
pickable
public boolean pickable()Returns the value of thepickablerecord component.- Returns:
- the value of the
pickablerecord component
-
livingEntity
public boolean livingEntity()Returns the value of thelivingEntityrecord component.- Returns:
- the value of the
livingEntityrecord component
-
ageableMob
public boolean ageableMob()Returns the value of theageableMobrecord component.- Returns:
- the value of the
ageableMobrecord component
-
blocksBuilding
public boolean blocksBuilding()Returns the value of theblocksBuildingrecord component.- Returns:
- the value of the
blocksBuildingrecord component
-
mcplType
Returns the value of themcplTyperecord component.- Returns:
- the value of the
mcplTyperecord component
-
entityAttachment
Returns the value of theentityAttachmentrecord component.- Returns:
- the value of the
entityAttachmentrecord component
-