Package vazkii.botania.api.mana
Interface LensEffectItem
- All Known Subinterfaces:
BasicLensItem,CompositableLensItem,ControlLensItem
- All Known Implementing Classes:
LaputaShardItem,LensItem,TerraBladeItem
public interface LensEffectItem
Have an item implement this for it to count as a lens effect and
be able to change the properties of Mana Bursts.
-
Method Summary
Modifier and TypeMethodDescriptionvoidapply(net.minecraft.world.item.ItemStack stack, BurstProperties props, net.minecraft.world.level.Level level) Called when a mana spreader that has this focus shoots a burst.booleancollideBurst(ManaBurst burst, net.minecraft.world.phys.HitResult pos, boolean isManaBlock, boolean shouldKill, net.minecraft.world.item.ItemStack stack) Called when a mana burst fired from a mana spreader with this focus collides against any block or entity.booleandoParticles(ManaBurst burst, net.minecraft.world.item.ItemStack stack) Called when the mana burst should do it's particles.default intgetManaToTransfer(ManaBurst burst, net.minecraft.world.item.ItemStack stack, ManaReceiver receiver) Gets the amount of mana to transfer to the passed in mana receiver block.voidupdateBurst(ManaBurst burst, net.minecraft.world.item.ItemStack stack) Called when a mana burst fired from a mana spreader with this focus is updated.
-
Method Details
-
apply
void apply(net.minecraft.world.item.ItemStack stack, BurstProperties props, net.minecraft.world.level.Level level) Called when a mana spreader that has this focus shoots a burst. This is where you change the properties of the burst. -
collideBurst
boolean collideBurst(ManaBurst burst, net.minecraft.world.phys.HitResult pos, boolean isManaBlock, boolean shouldKill, net.minecraft.world.item.ItemStack stack) Called when a mana burst fired from a mana spreader with this focus collides against any block or entity. This is called after the collision is handled.- Returns:
- True to kill the burst. False to keep it alive.
-
updateBurst
Called when a mana burst fired from a mana spreader with this focus is updated. This is called before the update is handled. -
doParticles
Called when the mana burst should do it's particles. Return false to not do any particles. -
getManaToTransfer
default int getManaToTransfer(ManaBurst burst, net.minecraft.world.item.ItemStack stack, ManaReceiver receiver) Gets the amount of mana to transfer to the passed in mana receiver block.
-