Record Class Ignite
java.lang.Object
java.lang.Record
net.minecraft.world.item.enchantment.effects.Ignite
- All Implemented Interfaces:
EnchantmentEntityEffect,EnchantmentLocationBasedEffect
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<Ignite> private final LevelBasedValueThe field for thedurationrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionIgnite(LevelBasedValue duration) Creates an instance of aIgniterecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(ServerLevel p_345606_, int p_344968_, EnchantedItemInUse p_346032_, Entity p_346370_, Vec3 p_344775_) com.mojang.serialization.MapCodec<Ignite> codec()duration()Returns the value of thedurationrecord component.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
-
duration
The field for thedurationrecord component. -
CODEC
-
-
Constructor Details
-
Ignite
Creates an instance of aIgniterecord class.- Parameters:
duration- the value for thedurationrecord component
-
-
Method Details
-
apply
public void apply(ServerLevel p_345606_, int p_344968_, EnchantedItemInUse p_346032_, Entity p_346370_, Vec3 p_344775_) - Specified by:
applyin interfaceEnchantmentEntityEffect
-
codec
- Specified by:
codecin interfaceEnchantmentEntityEffect- Specified by:
codecin interfaceEnchantmentLocationBasedEffect
-
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). -
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-