Record Class EntityEffect.ReplaceBlock
java.lang.Object
java.lang.Record
net.minestom.server.item.enchant.EntityEffect.ReplaceBlock
- All Implemented Interfaces:
Enchantment.Effect, EntityEffect, LocationEffect
- Enclosing interface:
EntityEffect
public static record EntityEffect.ReplaceBlock(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 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 LocationEffect
LocationEffect.AllOf -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReplaceBlock(Codec.RawValue offset, Codec.RawValue predicate, Codec.RawValue blockState, Codec.RawValue triggerGameEvent) Creates an instance of aReplaceBlockrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockStaterecord component.codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.offset()Returns the value of theoffsetrecord component.Returns the value of thepredicaterecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetriggerGameEventrecord component.
-
Field Details
-
CODEC
-
-
Constructor Details
-
ReplaceBlock
public ReplaceBlock(Codec.RawValue offset, @Nullable Codec.RawValue predicate, Codec.RawValue blockState, @Nullable Codec.RawValue triggerGameEvent) Creates an instance of aReplaceBlockrecord class.- Parameters:
offset- the value for theoffsetrecord componentpredicate- the value for thepredicaterecord componentblockState- the value for theblockStaterecord componenttriggerGameEvent- the value for thetriggerGameEventrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceEntityEffect- Specified by:
codecin interfaceLocationEffect
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
offset
Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
predicate
Returns the value of thepredicaterecord component.- Returns:
- the value of the
predicaterecord component
-
blockState
Returns the value of theblockStaterecord component.- Returns:
- the value of the
blockStaterecord component
-
triggerGameEvent
Returns the value of thetriggerGameEventrecord component.- Returns:
- the value of the
triggerGameEventrecord component
-