Module net.minestom.server
Package net.minestom.server.item.enchant
Record Class EntityEffect.ReplaceDisc
java.lang.Object
java.lang.Record
net.minestom.server.item.enchant.EntityEffect.ReplaceDisc
- All Implemented Interfaces:
Enchantment.Effect
,EntityEffect
,LocationEffect
- Enclosing interface:
EntityEffect
public static record EntityEffect.ReplaceDisc(LevelBasedValue radius, LevelBasedValue height, Codec.RawValue offset, Codec.RawValue predicate, Codec.RawValue blockState, Codec.RawValue triggerGameEvent)
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.SummonEntity
Nested classes/interfaces inherited from interface net.minestom.server.item.enchant.LocationEffect
LocationEffect.AllOf
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReplaceDisc
(LevelBasedValue radius, LevelBasedValue height, Codec.RawValue offset, Codec.RawValue predicate, Codec.RawValue blockState, Codec.RawValue triggerGameEvent) Creates an instance of aReplaceDisc
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockState
record component.codec()
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.height()
Returns the value of theheight
record component.offset()
Returns the value of theoffset
record component.Returns the value of thepredicate
record component.radius()
Returns the value of theradius
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thetriggerGameEvent
record component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
ReplaceDisc
public ReplaceDisc(LevelBasedValue radius, LevelBasedValue height, Codec.RawValue offset, @Nullable Codec.RawValue predicate, Codec.RawValue blockState, @Nullable Codec.RawValue triggerGameEvent) Creates an instance of aReplaceDisc
record class.- Parameters:
radius
- the value for theradius
record componentheight
- the value for theheight
record componentoffset
- the value for theoffset
record componentpredicate
- the value for thepredicate
record componentblockState
- the value for theblockState
record componenttriggerGameEvent
- the value for thetriggerGameEvent
record component
-
-
Method Details
-
codec
- Specified by:
codec
in interfaceEntityEffect
- Specified by:
codec
in 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. All components in this record class are compared withObjects::equals(Object,Object)
. -
radius
Returns the value of theradius
record component.- Returns:
- the value of the
radius
record component
-
height
Returns the value of theheight
record component.- Returns:
- the value of the
height
record component
-
offset
Returns the value of theoffset
record component.- Returns:
- the value of the
offset
record component
-
predicate
Returns the value of thepredicate
record component.- Returns:
- the value of the
predicate
record component
-
blockState
Returns the value of theblockState
record component.- Returns:
- the value of the
blockState
record component
-
triggerGameEvent
Returns the value of thetriggerGameEvent
record component.- Returns:
- the value of the
triggerGameEvent
record component
-