Package vazkii.botania.api.mana.spark
Interface SparkAttachable
- All Known Implementing Classes:
ManaEnchanterBlockEntity,ManaPoolBlockEntity,TerrestrialAgglomerationPlateBlockEntity
public interface SparkAttachable
A block entity with this capability can have a mana spark attached to it.
For the Spark to be allowed to have upgrades, the same block position must also have an ManaPool capability
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturn true if this Tile no longer requires mana and all Sparks transferring mana to it should cancel their transfer.default voidattachSpark(ManaSpark entity) Called when the Spark is attached.booleancanAttachSpark(net.minecraft.world.item.ItemStack stack) Can this block have a Spark attached to it.Gets the Spark that is attached to this block.intReturns how much space for mana is available in this block, normally the total - the current.
-
Field Details
-
ID
static final net.minecraft.resources.ResourceLocation ID
-
-
Method Details
-
canAttachSpark
boolean canAttachSpark(net.minecraft.world.item.ItemStack stack) Can this block have a Spark attached to it. Note that this will not unattach the Spark if it's changed later. -
attachSpark
Called when the Spark is attached. -
getAvailableSpaceForMana
int getAvailableSpaceForMana()Returns how much space for mana is available in this block, normally the total - the current. Should NEVER return negative values. Make sure to check against that. -
getAttachedSpark
ManaSpark getAttachedSpark()Gets the Spark that is attached to this block. A common implementation is to check for Spark entities above using world.getEntitiesWithinAABB() -
areIncomingTranfersDone
boolean areIncomingTranfersDone()Return true if this Tile no longer requires mana and all Sparks transferring mana to it should cancel their transfer.
-