Class AffinityWithFX

java.lang.Object
etithespirit.orimod.api.environment.EnvironmentalAffinity
etithespirit.orimod.api.environment.defaultimpl.AffinityWithFX

public class AffinityWithFX extends EnvironmentalAffinity
An affinity extension class that has built in behavior for what is expected of an environmentally affine biome
  • Field Details

    • RNG

      protected static final Random RNG
      A pseudorandomizer for doing whatever it is you do with pseudorandomizers when you aren't worshipping RNJesus.
    • chanceOfCausingDecayPlayer

      public final double chanceOfCausingDecayPlayer
      The chance of causing the Decay effect per tick on a standard player. If negative, it is the chance of curing Decay instead.
    • chanceOfCausingDecaySpirit

      public final double chanceOfCausingDecaySpirit
      The chance of causing the Decay effect per tick on a Spirit player. If negative, it is the chance of curing Decay instead.
    • decaySeverity

      public final int decaySeverity
      The amplifier of the Decay effect once applied.
    • decaySpreadChanceMultiplier

      public final double decaySpreadChanceMultiplier
      The chance for Decay to spread in this biome.
    • decayDieChanceMultiplier

      public final double decayDieChanceMultiplier
      The chance for Decay to die in this biome (in place of spreading).
    • DECAY_EFFECT_REF

      public static final AffinityWithFX.SetOnce<net.minecraft.world.effect.MobEffect> DECAY_EFFECT_REF
      A soft reference to the Decay effect.
  • Constructor Details

    • AffinityWithFX

      public AffinityWithFX(net.minecraft.resources.ResourceLocation biome, double efficiencyPercentage, double chanceOfCausingDecayPlayer, double chanceOfCausingDecaySpirit, double decaySpreadChanceMult, double decayDieChanceMult, int decaySeverity)
      Create a new preset affinity with effects and damage.
      Parameters:
      biome - The biome this affects.
      efficiencyPercentage - The efficiency of light devices in this biome.
      chanceOfCausingDecayPlayer - The chance of causing Decay on a normal player. A negative value will switch it to mean the chance of curing Decay instead.
      chanceOfCausingDecaySpirit - The chance of causing Decay on a Spirit. A negative value will switch it to mean the chance of curing Decay instead.
      decaySpreadChanceMult - The multiplier applied to any given Decay block's spread chance.
      decayDieChanceMult - The multiplier applied to any Decay block's death chance.
      decaySeverity - The amplifier of the Decay effect if it is added.
  • Method Details

    • onPlayerTick

      public void onPlayerTick(net.minecraft.world.entity.player.Player player)
      Description copied from class: EnvironmentalAffinity
      This method executes every forge Player tick (post phase, both sides) where the player is in the biome associated with this affinity.
      Specified by:
      onPlayerTick in class EnvironmentalAffinity
      Parameters:
      player - The player to tick for.
    • onWorldTick

      public void onWorldTick(net.minecraft.world.level.Level world)
      Description copied from class: EnvironmentalAffinity
      This method executes every forge World tick (post phase, both sides).
      Specified by:
      onWorldTick in class EnvironmentalAffinity
      Parameters:
      world - The level to tick in.