Package vazkii.botania.api.mana
Interface ManaCollector
- All Superinterfaces:
ManaReceiver
- All Known Subinterfaces:
ManaSpreader
- All Known Implementing Classes:
ManaSpreaderBlockEntity
Any
Implementation Instructions:
- When joining the world (e.g. on first tick), call
ManaReceiver that also implements this is considered a mana collector, by
which nearby generating flowers will pump mana into it.Implementation Instructions:
- When joining the world (e.g. on first tick), call
ManaNetwork.fireManaNetworkEvent(vazkii.botania.api.mana.ManaReceiver, vazkii.botania.api.mana.ManaBlockType, vazkii.botania.api.mana.ManaNetworkAction)
with this object, type ManaBlockType.COLLECTOR, and action ManaNetworkAction.ADD.
- When leaving the world (e.g. in setRemoved), call
ManaNetwork.fireManaNetworkEvent(vazkii.botania.api.mana.ManaReceiver, vazkii.botania.api.mana.ManaBlockType, vazkii.botania.api.mana.ManaNetworkAction)
with this object, type ManaBlockType.COLLECTOR, and action ManaNetworkAction.REMOVE.
Get the mana network using BotaniaAPI.getManaNetworkInstance().-
Field Summary
Fields inherited from interface vazkii.botania.api.mana.ManaReceiver
ID -
Method Summary
Modifier and TypeMethodDescriptionfloatgetManaYieldMultiplier(ManaBurst burst) Get the multiplier of mana to input into the block, 1.0 is the original amount of mana in the burst.intGets the maximum amount of mana this collector can have.voidCalled every tick on the client case the player is holding a Wand of the Forest.Methods inherited from interface vazkii.botania.api.mana.ManaReceiver
canReceiveManaFromBursts, getCurrentMana, getManaReceiverLevel, getManaReceiverPos, isFull, receiveMana
-
Method Details
-
onClientDisplayTick
void onClientDisplayTick()Called every tick on the client case the player is holding a Wand of the Forest. -
getManaYieldMultiplier
Get the multiplier of mana to input into the block, 1.0 is the original amount of mana in the burst. 0.9, for example, is 90%, so 10% of the mana in the burst will get dissipated. -
getMaxMana
int getMaxMana()Gets the maximum amount of mana this collector can have.
-