Class AlcoholEffect
java.lang.Object
net.minecraft.world.effect.MobEffect
tech.anonymoushacker1279.immersiveweapons.potion.AlcoholEffect
- All Implemented Interfaces:
net.neoforged.neoforge.common.extensions.IMobEffectExtension
public class AlcoholEffect
extends net.minecraft.world.effect.MobEffect
-
Constructor Summary
ConstructorsConstructorDescriptionAlcoholEffect(net.minecraft.world.effect.MobEffectCategory effectCategory, int liquidColorIn) Constructor for AlcoholEffect. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyEffectTick(net.minecraft.world.entity.LivingEntity livingEntity, int amplifier) Runs once each tick while the effect is active.booleanshouldApplyEffectTickThisTick(int duration, int amplifier) Check if the duration effect is ticking.Methods inherited from class net.minecraft.world.effect.MobEffect
addAttributeModifier, addAttributeModifiers, applyInstantenousEffect, builtInRegistryHolder, createFactorData, getAttributeModifiers, getCategory, getColor, getDescriptionId, getDisplayName, getEffectRendererInternal, getOrCreateDescriptionId, initializeClient, isBeneficial, isInstantenous, onEffectStarted, removeAttributeModifiers, setFactorDataFactoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.extensions.IMobEffectExtension
fillEffectCures, getSortOrder
-
Constructor Details
-
AlcoholEffect
public AlcoholEffect(net.minecraft.world.effect.MobEffectCategory effectCategory, int liquidColorIn) Constructor for AlcoholEffect.- Parameters:
effectCategory- theMobEffectCategoryinstanceliquidColorIn- the liquid color
-
-
Method Details
-
applyEffectTick
public void applyEffectTick(net.minecraft.world.entity.LivingEntity livingEntity, int amplifier) Runs once each tick while the effect is active.- Overrides:
applyEffectTickin classnet.minecraft.world.effect.MobEffect- Parameters:
livingEntity- theLivingEntitywith the effectamplifier- the effect amplifier
-
shouldApplyEffectTickThisTick
public boolean shouldApplyEffectTickThisTick(int duration, int amplifier) Check if the duration effect is ticking.- Overrides:
shouldApplyEffectTickThisTickin classnet.minecraft.world.effect.MobEffect- Parameters:
duration- the durationamplifier- the effect amplifier- Returns:
- boolean
-