Package net.minestom.server.item.enchant
Record Class EntityEffect.SummonEntity
java.lang.Object
java.lang.Record
net.minestom.server.item.enchant.EntityEffect.SummonEntity
- All Implemented Interfaces:
Enchantment.Effect,EntityEffect,LocationEffect
- Enclosing interface:
EntityEffect
public static record EntityEffect.SummonEntity(Codec.RawValue entityTypes, boolean joinTeam)
extends Record
implements EntityEffect, LocationEffect
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minestom.server.item.enchant.EntityEffect
EntityEffect.AllOf, EntityEffect.ApplyPotionEffect, EntityEffect.ChangeItemDamage, EntityEffect.DamageEntity, EntityEffect.Explode, EntityEffect.Ignite, EntityEffect.PlaySound, EntityEffect.ReplaceBlock, EntityEffect.ReplaceDisc, EntityEffect.RunFunction, EntityEffect.SetBlockProperties, EntityEffect.SpawnParticles, EntityEffect.SummonEntityNested classes/interfaces inherited from interface net.minestom.server.item.enchant.LocationEffect
LocationEffect.AllOf -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSummonEntity(Codec.RawValue entityTypes, boolean joinTeam) Creates an instance of aSummonEntityrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotNull StructCodec<EntityEffect.SummonEntity> codec()Returns the value of theentityTypesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanjoinTeam()Returns the value of thejoinTeamrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
-
Constructor Details
-
SummonEntity
Creates an instance of aSummonEntityrecord class.- Parameters:
entityTypes- the value for theentityTypesrecord componentjoinTeam- the value for thejoinTeamrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceEntityEffect- Specified by:
codecin interfaceLocationEffect
-
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 '=='. -
entityTypes
Returns the value of theentityTypesrecord component.- Returns:
- the value of the
entityTypesrecord component
-
joinTeam
public boolean joinTeam()Returns the value of thejoinTeamrecord component.- Returns:
- the value of the
joinTeamrecord component
-