Package com.unascribed.ears.api.registry
Class EarsStateOverriderRegistry
java.lang.Object
com.unascribed.ears.api.registry.EarsStateOverriderRegistry
-
Method Summary
Modifier and TypeMethodDescriptionstatic Identified<Boolean>isActive(EarsStateType state, Object peer, boolean def) static Corkregister(String namespace, EarsStateOverrider overrider) Registers a state overrider that will be checked before rendering Ears features.
-
Method Details
-
register
Registers a state overrider that will be checked before rendering Ears features.This allows you to un-prevent the drawing of Ears features that are normally suppressed by the wearing of certain types of equipment should you want to, or disable detection of various other things. Your StateOverrider will receive two arguments; the
type of statebeing checked, and the "peer" object, which can be safely cast to EntityPlayer (or your mappings' equivalent). The Ears API is provided by Ears common code, which has no access to the EntityPlayer type.You can use this to, for example, force claws to render when wearing boots if your mod is causing boots to be hidden.
- Parameters:
namespace- Your mod's namespace. This is equivalent to "modid".overrider- The EarsStateOverrider to register.- Returns:
- a Cork you can use to unregister this overrider later if needed
-
isActive
- Returns:
trueif the given state is active, plus the namespace if an override was applied
-