Class MorphineEffect

java.lang.Object
net.minecraft.world.effect.MobEffect
tech.anonymoushacker1279.immersiveweapons.potion.MorphineEffect
All Implemented Interfaces:
net.neoforged.neoforge.common.extensions.IMobEffectExtension

public class MorphineEffect extends net.minecraft.world.effect.MobEffect
  • Constructor Summary

    Constructors
    Constructor
    Description
    MorphineEffect(net.minecraft.world.effect.MobEffectCategory effectCategory, int liquidColorIn)
    Constructor for MorphineEffect.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    applyEffectTick(net.minecraft.world.entity.LivingEntity livingEntity, int amplifier)
    Runs once each tick while the effect is active.
    boolean
    shouldApplyEffectTickThisTick(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, setFactorDataFactory

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IMobEffectExtension

    fillEffectCures, getSortOrder
  • Constructor Details

    • MorphineEffect

      public MorphineEffect(net.minecraft.world.effect.MobEffectCategory effectCategory, int liquidColorIn)
      Constructor for MorphineEffect.
      Parameters:
      effectCategory - the MobEffectCategory instance
      liquidColorIn - 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:
      applyEffectTick in class net.minecraft.world.effect.MobEffect
      Parameters:
      livingEntity - the LivingEntity with the effect
      amplifier - the effect amplifier
    • shouldApplyEffectTickThisTick

      public boolean shouldApplyEffectTickThisTick(int duration, int amplifier)
      Check if the duration effect is ticking.
      Overrides:
      shouldApplyEffectTickThisTick in class net.minecraft.world.effect.MobEffect
      Parameters:
      duration - the duration
      amplifier - the effect amplifier
      Returns:
      boolean