Package etithespirit.orimod.api
Class APIProvider
java.lang.Object
etithespirit.orimod.api.APIProvider
Provides access to a copy of the APIs offered by this mod.
- Author:
- Eti
-
Method Summary
Modifier and TypeMethodDescriptionstatic IEnvironmentalAffinityAPI
Returns an instance of the Environmental Affinity API if it exists, or a dummy instance otherwise.
This API is not ready for use.static ISpiritSoundAPI
Returns an API that allows for custom block/material sound overrides to be registered to Spirits.static boolean
Returns whether or not the Ori mod is installed.
-
Method Details
-
isModInstalled
public static boolean isModInstalled()Returns whether or not the Ori mod is installed.- Returns:
- Whether or not the Ori mod is installed.
-
getSpiritSoundAPI
Returns an API that allows for custom block/material sound overrides to be registered to Spirits. Use this if you are interested in any of your mod blocks having different sounds when they are stepped on by spirits. This is, of course, purely cosmetic and exists for the sake of immersion.
An example of when to use this is when looking at a block such asbiomesoplenty:flesh
. Its defined material for its Block class makes it useSpiritMaterial.WOOL
as per the default mapping, which is not fitting. This API could be used to set it to something likeSpiritMaterial.SHROOM
, which would match the intended material of the block far better than its vanilla material.
The test order for material overrides is:- Block -> SpiritMaterial Conditional Overrides
- Custom Material -> SpiritMaterial Conditional Overrides
- BlockState -> SpiritMaterial Bindings
- Block -> SpiritMaterial Bindings
- Custom Material -> SpiritMaterial Bindings
- Vanilla Material -> SpiritMaterial Bindings
- Returns:
- The instance of the sound API. If the mod is not installed (and only the API is), then a dummy API will be returned. Use
ISpiritSoundAPI.isInstalled()
to determine whether or not the returned API is usable, as the dummy API will raise an exception upon calling any of its members.
-
getEnvironmentalAffinityAPI
Returns an instance of the Environmental Affinity API if it exists, or a dummy instance otherwise.
This API is not ready for use.- Returns:
- An instance of the Environmental Affinity API if it exists, or a dummy instance otherwise.
-