Record Class VampiricStrikeEffect
java.lang.Object
java.lang.Record
dev.tophatcat.vampiricstrikeenchantment.common.enchantments.custom.VampiricStrikeEffect
- All Implemented Interfaces:
net.minecraft.world.item.enchantment.effects.EnchantmentEntityEffect,net.minecraft.world.item.enchantment.effects.EnchantmentLocationBasedEffect
public record VampiricStrikeEffect()
extends Record
implements net.minecraft.world.item.enchantment.effects.EnchantmentEntityEffect
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<VampiricStrikeEffect> -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aVampiricStrikeEffectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(@NotNull net.minecraft.server.level.ServerLevel level, int enchantmentLevel, @NotNull net.minecraft.world.item.enchantment.EnchantedItemInUse context, @NotNull net.minecraft.world.entity.Entity entity, @NotNull net.minecraft.world.phys.Vec3 pos) @NotNull com.mojang.serialization.MapCodec<? extends net.minecraft.world.item.enchantment.effects.EnchantmentEntityEffect> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.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.world.item.enchantment.effects.EnchantmentEntityEffect
onChangedBlockMethods inherited from interface net.minecraft.world.item.enchantment.effects.EnchantmentLocationBasedEffect
onDeactivated
-
Field Details
-
CODEC
-
-
Constructor Details
-
VampiricStrikeEffect
public VampiricStrikeEffect()Creates an instance of aVampiricStrikeEffectrecord class.
-
-
Method Details
-
apply
public void apply(@NotNull @NotNull net.minecraft.server.level.ServerLevel level, int enchantmentLevel, @NotNull @NotNull net.minecraft.world.item.enchantment.EnchantedItemInUse context, @NotNull @NotNull net.minecraft.world.entity.Entity entity, @NotNull @NotNull net.minecraft.world.phys.Vec3 pos) - Specified by:
applyin interfacenet.minecraft.world.item.enchantment.effects.EnchantmentEntityEffect
-
codec
@NotNull public @NotNull com.mojang.serialization.MapCodec<? extends net.minecraft.world.item.enchantment.effects.EnchantmentEntityEffect> codec()- Specified by:
codecin interfacenet.minecraft.world.item.enchantment.effects.EnchantmentEntityEffect- Specified by:
codecin interfacenet.minecraft.world.item.enchantment.effects.EnchantmentLocationBasedEffect
-
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.
-