Class EffectHolder

java.lang.Object
net.lcc.sollib.api.common.registry.SHolder<net.minecraft.world.effect.MobEffect>
net.lcc.sollib.api.common.registry.holder.EffectHolder
All Implemented Interfaces:
Supplier<net.minecraft.world.effect.MobEffect>

public class EffectHolder extends SHolder<net.minecraft.world.effect.MobEffect>
A holder class for effect registry using a SolModContainer
  • Field Details

  • Constructor Details

  • Method Details

    • getRegistry

      public net.minecraft.core.Registry<net.minecraft.world.effect.MobEffect> getRegistry()
      Overrides:
      getRegistry in class SHolder<net.minecraft.world.effect.MobEffect>
    • withPotion

      public EffectHolder withPotion(Supplier<net.minecraft.world.level.ItemLike> ingredient)
      Registers a potion for this effect
      Parameters:
      ingredient - What ingredient must be added to brew this
    • withPotion

      public EffectHolder withPotion(Supplier<net.minecraft.world.item.alchemy.Potion> base, Supplier<net.minecraft.world.level.ItemLike> ingredient)
      Registers a potion for this effect
      Parameters:
      base - What potion this is brewed from (eg Potions.AWKWARD)
      ingredient - What ingredient must be added to brew this
    • withPotion

      public EffectHolder withPotion(Supplier<net.minecraft.world.item.alchemy.Potion> base, Supplier<net.minecraft.world.level.ItemLike> ingredient, int duration)
      Registers a potion for this effect
      Parameters:
      base - What potion this is brewed from (eg Potions.AWKWARD)
      ingredient - What ingredient must be added to brew this
      duration - The duration for said potion
    • withPotion

      public EffectHolder withPotion(Supplier<net.minecraft.world.item.alchemy.Potion> base, Supplier<net.minecraft.world.level.ItemLike> ingredient, int duration, boolean hasLong, boolean hasStrong)
      Registers a potion for this effect
      Parameters:
      base - What potion this is brewed from (eg Potions.AWKWARD)
      ingredient - What ingredient must be added to brew this
      duration - The duration for said potion
      hasLong - Should a long variant be registered too
      hasStrong - Should a strong variant be registered too
    • hasPotion

      public boolean hasPotion()
    • hasLongPotion

      public boolean hasLongPotion()
    • hasStrongPotion

      public boolean hasStrongPotion()
    • getCraftingBase

      public Supplier<net.minecraft.core.Holder<net.minecraft.world.item.alchemy.Potion>> getCraftingBase()
    • getCraftingIngredient

      public Supplier<net.minecraft.world.level.ItemLike> getCraftingIngredient()
    • getPotion

      public Supplier<net.minecraft.core.Holder<net.minecraft.world.item.alchemy.Potion>> getPotion()
    • getLongPotion

      public Supplier<net.minecraft.core.Holder<net.minecraft.world.item.alchemy.Potion>> getLongPotion()
    • getStrongPotion

      public Supplier<net.minecraft.core.Holder<net.minecraft.world.item.alchemy.Potion>> getStrongPotion()
    • registerPotion

      @Internal public void registerPotion(Consumer<SHolder<net.minecraft.world.item.alchemy.Potion>> registrar)