Class LaputaShardItem

java.lang.Object
net.minecraft.world.item.Item
vazkii.botania.common.item.LaputaShardItem
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, LensEffectItem, TinyPlanetExcempt, CustomCreativeTabContents

public class LaputaShardItem extends net.minecraft.world.item.Item implements LensEffectItem, TinyPlanetExcempt, CustomCreativeTabContents
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.item.Item

    net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.TooltipContext
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     

    Fields inherited from class net.minecraft.world.item.Item

    ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTH

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    LaputaShardItem(net.minecraft.world.item.Item.Properties props)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addToCreativeTab(net.minecraft.world.item.Item me, net.minecraft.world.item.CreativeModeTab.Output output)
    Add this item and any variants to the creative tab
    void
    appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext context, List<net.minecraft.network.chat.Component> list, net.minecraft.world.item.TooltipFlag flags)
     
    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.
    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.
    boolean
    doParticles(ManaBurst burst, net.minecraft.world.item.ItemStack stack)
    Called when the mana burst should do it's particles.
    getBurst(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack stack)
     
    static int
    getShardLevel(net.minecraft.world.item.ItemStack shard)
     
    boolean
    shouldPull(net.minecraft.world.item.ItemStack stack)
     
    protected void
    spawnFirstBurst(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack shard)
     
    protected void
    spawnNextBurst(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack lens)
     
    void
    updateBurst(ManaBurst burst, net.minecraft.world.item.ItemStack stack)
    Called when a mana burst fired from a mana spreader with this focus is updated.
    net.minecraft.world.InteractionResult
    useOn(net.minecraft.world.item.context.UseOnContext ctx)
     

    Methods inherited from class net.minecraft.world.item.Item

    asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isValidRepairItem, mineBlock, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, releaseUsing, requiredFeatures, toString, use, useOnRelease, verifyComponentsAfterLoad

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.minecraft.world.flag.FeatureElement

    isEnabled

    Methods inherited from interface vazkii.botania.api.mana.LensEffectItem

    getManaToTransfer
  • Field Details

  • Constructor Details

    • LaputaShardItem

      public LaputaShardItem(net.minecraft.world.item.Item.Properties props)
  • Method Details

    • addToCreativeTab

      public void addToCreativeTab(net.minecraft.world.item.Item me, net.minecraft.world.item.CreativeModeTab.Output output)
      Description copied from interface: CustomCreativeTabContents
      Add this item and any variants to the creative tab
      Specified by:
      addToCreativeTab in interface CustomCreativeTabContents
      Parameters:
      me - The item itself, for convenience when implementing this on a Block
    • appendHoverText

      public void appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.item.Item.TooltipContext context, List<net.minecraft.network.chat.Component> list, net.minecraft.world.item.TooltipFlag flags)
      Overrides:
      appendHoverText in class net.minecraft.world.item.Item
    • useOn

      public net.minecraft.world.InteractionResult useOn(net.minecraft.world.item.context.UseOnContext ctx)
      Overrides:
      useOn in class net.minecraft.world.item.Item
    • spawnFirstBurst

      protected void spawnFirstBurst(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack shard)
    • spawnNextBurst

      protected void spawnNextBurst(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack lens)
    • getShardLevel

      public static int getShardLevel(net.minecraft.world.item.ItemStack shard)
    • getBurst

      public ManaBurstEntity getBurst(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack stack)
    • apply

      public void apply(net.minecraft.world.item.ItemStack stack, BurstProperties props, net.minecraft.world.level.Level level)
      Description copied from interface: LensEffectItem
      Called when a mana spreader that has this focus shoots a burst. This is where you change the properties of the burst.
      Specified by:
      apply in interface LensEffectItem
    • collideBurst

      public boolean collideBurst(ManaBurst burst, net.minecraft.world.phys.HitResult pos, boolean isManaBlock, boolean shouldKill, net.minecraft.world.item.ItemStack stack)
      Description copied from interface: LensEffectItem
      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.
      Specified by:
      collideBurst in interface LensEffectItem
      Returns:
      True to kill the burst. False to keep it alive.
    • updateBurst

      public void updateBurst(ManaBurst burst, net.minecraft.world.item.ItemStack stack)
      Description copied from interface: LensEffectItem
      Called when a mana burst fired from a mana spreader with this focus is updated. This is called before the update is handled.
      Specified by:
      updateBurst in interface LensEffectItem
    • doParticles

      public boolean doParticles(ManaBurst burst, net.minecraft.world.item.ItemStack stack)
      Description copied from interface: LensEffectItem
      Called when the mana burst should do it's particles. Return false to not do any particles.
      Specified by:
      doParticles in interface LensEffectItem
    • shouldPull

      public boolean shouldPull(net.minecraft.world.item.ItemStack stack)
      Specified by:
      shouldPull in interface TinyPlanetExcempt