Class StochasticDegradationEffect
java.lang.Object
org.cyclops.evilcraft.core.degradation.StochasticDegradationEffect
- All Implemented Interfaces:
IDegradationEffect
- Direct Known Subclasses:
MobSpawnDegradation,SoundDegradation,TerraformDegradation
A
IDegradationEffect that can be executed with a certain chance.
It will take into account the current degradation factor and the higher this
is, the higher the chance of the execution of this effect.
An optional chance can also be given for a chance next to the degradation chance.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRun(IDegradable degradable) If this effect can occur.doubleGet the configured chance on occuring.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cyclops.evilcraft.api.degradation.IDegradationEffect
runClientSide, runServerSide
-
Constructor Details
-
StochasticDegradationEffect
-
StochasticDegradationEffect
-
-
Method Details
-
canRun
Description copied from interface:IDegradationEffectIf this effect can occur.- Specified by:
canRunin interfaceIDegradationEffect- Parameters:
degradable- The degradable instance where the effect should apply.- Returns:
- If it can occur.
-
getChance
public double getChance()Get the configured chance on occuring.- Returns:
- The chance.
-