Package vazkii.botania.common.item
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
FieldsFields 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_WIDTHFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToCreativeTab(net.minecraft.world.item.Item me, net.minecraft.world.item.CreativeModeTab.Output output) Add this item and any variants to the creative tabvoidappendHoverText(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) voidapply(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.getBurst(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack stack) static intgetShardLevel(net.minecraft.world.item.ItemStack shard) booleanshouldPull(net.minecraft.world.item.ItemStack stack) protected voidspawnFirstBurst(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack shard) protected voidspawnNextBurst(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos pos, net.minecraft.world.item.ItemStack lens) voidupdateBurst(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.InteractionResultuseOn(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, verifyComponentsAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface vazkii.botania.api.mana.LensEffectItem
getManaToTransfer
-
Field Details
-
MAX_LEVEL
public static final int MAX_LEVEL- See Also:
-
-
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:CustomCreativeTabContentsAdd this item and any variants to the creative tab- Specified by:
addToCreativeTabin interfaceCustomCreativeTabContents- 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:
appendHoverTextin classnet.minecraft.world.item.Item
-
useOn
public net.minecraft.world.InteractionResult useOn(net.minecraft.world.item.context.UseOnContext ctx) - Overrides:
useOnin classnet.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:LensEffectItemCalled when a mana spreader that has this focus shoots a burst. This is where you change the properties of the burst.- Specified by:
applyin interfaceLensEffectItem
-
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:LensEffectItemCalled 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:
collideBurstin interfaceLensEffectItem- Returns:
- True to kill the burst. False to keep it alive.
-
updateBurst
Description copied from interface:LensEffectItemCalled when a mana burst fired from a mana spreader with this focus is updated. This is called before the update is handled.- Specified by:
updateBurstin interfaceLensEffectItem
-
doParticles
Description copied from interface:LensEffectItemCalled when the mana burst should do it's particles. Return false to not do any particles.- Specified by:
doParticlesin interfaceLensEffectItem
-
shouldPull
public boolean shouldPull(net.minecraft.world.item.ItemStack stack) - Specified by:
shouldPullin interfaceTinyPlanetExcempt
-