Record Class ExplodeEnchantmentEffect
java.lang.Object
java.lang.Record
net.minecraft.enchantment.effect.entity.ExplodeEnchantmentEffect
- Record Components:
attributeToUser-damageType-knockbackMultiplier-immuneBlocks-offset-radius-createFire-blockInteraction-smallParticle-largeParticle-sound-
- All Implemented Interfaces:
EnchantmentEntityEffect,EnchantmentLocationBasedEffect
public record ExplodeEnchantmentEffect(boolean attributeToUser, Optional<RegistryEntry<DamageType>> damageType, Optional<EnchantmentLevelBasedValue> knockbackMultiplier, Optional<RegistryEntryList<Block>> immuneBlocks, Vec3d offset, EnchantmentLevelBasedValue radius, boolean createFire, World.ExplosionSourceType blockInteraction, ParticleEffect smallParticle, ParticleEffect largeParticle, RegistryEntry<SoundEvent> sound)
extends Record
implements EnchantmentEntityEffect
- Mappings:
Namespace Name named net/minecraft/enchantment/effect/entity/ExplodeEnchantmentEffectintermediary net/minecraft/class_9724official davnamed attributeToUserintermediary comp_2722official dnamed damageTypeintermediary comp_2723official enamed knockbackMultiplierintermediary comp_2724official fnamed immuneBlocksintermediary comp_2725official gnamed offsetintermediary comp_2726official hnamed radiusintermediary comp_2727official inamed createFireintermediary comp_2728official jnamed blockInteractionintermediary comp_2729official knamed smallParticleintermediary comp_2730official lnamed largeParticleintermediary comp_2731official mnamed soundintermediary comp_2732official n
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanThe field for theattributeToUserrecord component.private final World.ExplosionSourceTypeThe field for theblockInteractionrecord component.static final com.mojang.serialization.MapCodec<ExplodeEnchantmentEffect> private final booleanThe field for thecreateFirerecord component.private final Optional<RegistryEntry<DamageType>> The field for thedamageTyperecord component.private final Optional<RegistryEntryList<Block>> The field for theimmuneBlocksrecord component.private final Optional<EnchantmentLevelBasedValue> The field for theknockbackMultiplierrecord component.private final ParticleEffectThe field for thelargeParticlerecord component.private final Vec3dThe field for theoffsetrecord component.private final EnchantmentLevelBasedValueThe field for theradiusrecord component.private final ParticleEffectThe field for thesmallParticlerecord component.private final RegistryEntry<SoundEvent> The field for thesoundrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionExplodeEnchantmentEffect(boolean bool, Optional<RegistryEntry<DamageType>> optional, Optional<EnchantmentLevelBasedValue> optional2, Optional<RegistryEntryList<Block>> optional3, Vec3d vec3d, EnchantmentLevelBasedValue enchantmentLevelBasedValue, boolean bool2, World.ExplosionSourceType explosionSourceType, ParticleEffect particleEffect, ParticleEffect particleEffect2, RegistryEntry<SoundEvent> registryEntry) -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(ServerWorld world, int level, EnchantmentEffectContext context, Entity user, Vec3d pos) booleanReturns the value of theattributeToUserrecord component.Returns the value of theblockInteractionrecord component.booleanReturns the value of thecreateFirerecord component.Returns the value of thedamageTyperecord component.final booleanIndicates whether some other object is "equal to" this one.com.mojang.serialization.MapCodec<ExplodeEnchantmentEffect> getCodec()private @Nullable DamageSourcegetDamageSource(Entity user, Vec3d pos) final inthashCode()Returns a hash code value for this object.Returns the value of theimmuneBlocksrecord component.Returns the value of theknockbackMultiplierrecord component.Returns the value of thelargeParticlerecord component.offset()Returns the value of theoffsetrecord component.radius()Returns the value of theradiusrecord component.Returns the value of thesmallParticlerecord component.sound()Returns the value of thesoundrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.enchantment.effect.EnchantmentEntityEffect
applyMethods inherited from interface net.minecraft.enchantment.effect.EnchantmentLocationBasedEffect
remove
-
Field Details
-
attributeToUser
private final boolean attributeToUserThe field for theattributeToUserrecord component. -
damageType
The field for thedamageTyperecord component. -
knockbackMultiplier
The field for theknockbackMultiplierrecord component. -
immuneBlocks
The field for theimmuneBlocksrecord component. -
offset
The field for theoffsetrecord component. -
radius
The field for theradiusrecord component. -
createFire
private final boolean createFireThe field for thecreateFirerecord component. -
blockInteraction
The field for theblockInteractionrecord component. -
smallParticle
The field for thesmallParticlerecord component. -
largeParticle
The field for thelargeParticlerecord component. -
sound
The field for thesoundrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/enchantment/effect/entity/ExplodeEnchantmentEffect;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_51710Lnet/minecraft/class_9724;field_51710:Lcom/mojang/serialization/MapCodec;official aLdav;a:Lcom/mojang/serialization/MapCodec;
-
-
Constructor Details
-
ExplodeEnchantmentEffect
public ExplodeEnchantmentEffect(boolean bool, Optional<RegistryEntry<DamageType>> optional, Optional<EnchantmentLevelBasedValue> optional2, Optional<RegistryEntryList<Block>> optional3, Vec3d vec3d, EnchantmentLevelBasedValue enchantmentLevelBasedValue, boolean bool2, World.ExplosionSourceType explosionSourceType, ParticleEffect particleEffect, ParticleEffect particleEffect2, RegistryEntry<SoundEvent> registryEntry)
-
-
Method Details
-
apply
public void apply(ServerWorld world, int level, EnchantmentEffectContext context, Entity user, Vec3d pos) - Specified by:
applyin interfaceEnchantmentEntityEffect- Mappings:
Namespace Name Mixin selector named applyLnet/minecraft/enchantment/effect/EnchantmentEntityEffect;apply(Lnet/minecraft/server/world/ServerWorld;ILnet/minecraft/enchantment/EnchantmentEffectContext;Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Vec3d;)Vintermediary method_60220Lnet/minecraft/class_9721;method_60220(Lnet/minecraft/class_3218;ILnet/minecraft/class_9699;Lnet/minecraft/class_1297;Lnet/minecraft/class_243;)Vofficial aLdas;a(Laqu;ILdab;Lbsr;Lexc;)V
-
getDamageSource
- Mappings:
Namespace Name Mixin selector named getDamageSourceLnet/minecraft/enchantment/effect/entity/ExplodeEnchantmentEffect;getDamageSource(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/entity/damage/DamageSource;intermediary method_60235Lnet/minecraft/class_9724;method_60235(Lnet/minecraft/class_1297;Lnet/minecraft/class_243;)Lnet/minecraft/class_1282;official aLdav;a(Lbsr;Lexc;)Lbrk;
-
getCodec
- Specified by:
getCodecin interfaceEnchantmentEntityEffect- Specified by:
getCodecin interfaceEnchantmentLocationBasedEffect- Mappings:
Namespace Name Mixin selector named getCodecLnet/minecraft/enchantment/effect/EnchantmentLocationBasedEffect;getCodec()Lcom/mojang/serialization/MapCodec;intermediary method_60219Lnet/minecraft/class_9722;method_60219()Lcom/mojang/serialization/MapCodec;official aLdat;a()Lcom/mojang/serialization/MapCodec;
-
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 '=='. -
attributeToUser
public boolean attributeToUser()Returns the value of theattributeToUserrecord component.- Returns:
- the value of the
attributeToUserrecord component
-
damageType
Returns the value of thedamageTyperecord component.- Returns:
- the value of the
damageTyperecord component
-
knockbackMultiplier
Returns the value of theknockbackMultiplierrecord component.- Returns:
- the value of the
knockbackMultiplierrecord component
-
immuneBlocks
Returns the value of theimmuneBlocksrecord component.- Returns:
- the value of the
immuneBlocksrecord component
-
offset
Returns the value of theoffsetrecord component.- Returns:
- the value of the
offsetrecord component
-
radius
Returns the value of theradiusrecord component.- Returns:
- the value of the
radiusrecord component
-
createFire
public boolean createFire()Returns the value of thecreateFirerecord component.- Returns:
- the value of the
createFirerecord component
-
blockInteraction
Returns the value of theblockInteractionrecord component.- Returns:
- the value of the
blockInteractionrecord component
-
smallParticle
Returns the value of thesmallParticlerecord component.- Returns:
- the value of the
smallParticlerecord component
-
largeParticle
Returns the value of thelargeParticlerecord component.- Returns:
- the value of the
largeParticlerecord component
-
sound
Returns the value of thesoundrecord component.- Returns:
- the value of the
soundrecord component
-