Class AffinityWithFX
java.lang.Object
etithespirit.orimod.api.environment.EnvironmentalAffinity
etithespirit.orimod.api.environment.defaultimpl.AffinityWithFX
An affinity extension class that has built in behavior for what is expected of an environmentally affine biome
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
A single use storage class. -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal double
The chance of causing the Decay effect per tick on a standard player.final double
The chance of causing the Decay effect per tick on a Spirit player.static final AffinityWithFX.SetOnce<net.minecraft.world.effect.MobEffect>
A soft reference to the Decay effect.final double
The chance for Decay to die in this biome (in place of spreading).final int
The amplifier of the Decay effect once applied.final double
The chance for Decay to spread in this biome.protected static final Random
A pseudorandomizer for doing whatever it is you do with pseudorandomizers when you aren't worshipping RNJesus.Fields inherited from class etithespirit.orimod.api.environment.EnvironmentalAffinity
biome, efficiency, efficiencySingular
-
Constructor Summary
ConstructorsConstructorDescriptionAffinityWithFX
(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. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onPlayerTick
(net.minecraft.world.entity.player.Player player) This method executes every forge Player tick (post phase, both sides) where the player is in the biome associated with this affinity.void
onWorldTick
(net.minecraft.world.level.Level world) This method executes every forge World tick (post phase, both sides).Methods inherited from class etithespirit.orimod.api.environment.EnvironmentalAffinity
getNextEfficiencyMultiplier, sendPlayerTickToAll, sendWorldTickToAll
-
Field Details
-
RNG
A pseudorandomizer for doing whatever it is you do with pseudorandomizers when you aren't worshipping RNJesus. -
chanceOfCausingDecayPlayer
public final double chanceOfCausingDecayPlayerThe 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 chanceOfCausingDecaySpiritThe 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 decaySeverityThe amplifier of the Decay effect once applied. -
decaySpreadChanceMultiplier
public final double decaySpreadChanceMultiplierThe chance for Decay to spread in this biome. -
decayDieChanceMultiplier
public final double decayDieChanceMultiplierThe chance for Decay to die in this biome (in place of spreading). -
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 classEnvironmentalAffinity
- 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 classEnvironmentalAffinity
- Parameters:
world
- The level to tick in.
-