Interface IDegradationRegistry
- All Superinterfaces:
org.cyclops.cyclopscore.init.IRegistry
- All Known Implementing Classes:
DegradationRegistry
public interface IDegradationRegistry
extends org.cyclops.cyclopscore.init.IRegistry
Interface for the degradation registry.
-
Method Summary
Modifier and TypeMethodDescriptionGet all the registered degradation effects.Get a degradation effect based on a weighted random choice.voidregisterDegradationEffect(String nameID, IDegradationEffect degradationEffect, int weight) Register a new degradation effect.
-
Method Details
-
registerDegradationEffect
Register a new degradation effect.- Parameters:
nameID- The unique name of this effect.degradationEffect- The effect to register.weight- The weight that this effect can occur.
-
getDegradationEffects
Set<IDegradationEffect> getDegradationEffects()Get all the registered degradation effects.- Returns:
- The registered effects.
-
getRandomDegradationEffect
IDegradationEffect getRandomDegradationEffect()Get a degradation effect based on a weighted random choice.- Returns:
- A weighted random effect.
-