Class ScrollItem
java.lang.Object
net.minecraft.world.item.Item
com.binaris.wizardry.content.item.ScrollItem
- All Implemented Interfaces:
ICastItem,IWorkbenchItem,net.fabricmc.fabric.api.item.v1.FabricItem,net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intFields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZEFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendHoverText(@NotNull net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.world.level.Level level, @NotNull List<net.minecraft.network.chat.Component> list, @NotNull net.minecraft.world.item.TooltipFlag tooltipFlag) booleancanCast(net.minecraft.world.item.ItemStack stack, Spell spell, PlayerCastContext ctx) booleancanPlace(net.minecraft.world.item.ItemStack stack) booleancast(net.minecraft.world.item.ItemStack stack, Spell spell, PlayerCastContext ctx) @NotNull net.minecraft.world.item.ItemStackfinishUsingItem(@NotNull net.minecraft.world.item.ItemStack stack, @NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.entity.LivingEntity livingEntity) @NotNull SpellgetCurrentSpell(net.minecraft.world.item.ItemStack stack) @NotNull net.minecraft.network.chat.ComponentgetName(@NotNull net.minecraft.world.item.ItemStack stack) intgetSpellSlotCount(net.minecraft.world.item.ItemStack stack) intgetUseDuration(@NotNull net.minecraft.world.item.ItemStack stack) booleanisFoil(@NotNull net.minecraft.world.item.ItemStack stack) booleanonApplyButtonPressed(net.minecraft.world.entity.player.Player player, net.minecraft.world.inventory.Slot centre, net.minecraft.world.inventory.Slot crystals, net.minecraft.world.inventory.Slot upgrade, net.minecraft.world.inventory.Slot[] spellBooks) voidonUseTick(@NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.entity.LivingEntity livingEntity, @NotNull net.minecraft.world.item.ItemStack stack, int timeLeft) voidreleaseUsing(@NotNull net.minecraft.world.item.ItemStack stack, @NotNull net.minecraft.world.level.Level level, @NotNull net.minecraft.world.entity.LivingEntity livingEntity, int timeCharged) booleanshowSpellHUD(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack) booleanshowTooltip(net.minecraft.world.item.ItemStack stack) @NotNull net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack>use(@NotNull net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, @NotNull net.minecraft.world.InteractionHand hand) Methods inherited from class net.minecraft.world.item.Item
asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getTooltipImage, getUseAnimation, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, overrideOtherStackedOnMe, overrideStackedOnOther, requiredFeatures, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.fabricmc.fabric.api.item.v1.FabricItem
allowContinuingBlockBreaking, allowNbtUpdateAnimation, getAttributeModifiers, getRecipeRemainder, isSuitableForMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods inherited from interface com.binaris.wizardry.api.content.item.ICastItem
getCurrentCooldown, getCurrentMaxCooldown, getNextSpell, getPreviousSpell, getSpells, selectNextSpell, selectPreviousSpell, selectSpell, showSpellsInWorkbenchMethods inherited from interface com.binaris.wizardry.api.content.item.IWorkbenchItem
applyUpgrade, isClearable, onClearButtonPressed
-
Field Details
-
CASTING_TIME
public static final int CASTING_TIME- See Also:
-
COOLDOWN_FORFEIT_TICKS
public static final int COOLDOWN_FORFEIT_TICKS- See Also:
-
-
Constructor Details
-
ScrollItem
public ScrollItem(net.minecraft.world.item.Item.Properties properties)
-
-
Method Details
-
use
@NotNull public @NotNull net.minecraft.world.InteractionResultHolder<net.minecraft.world.item.ItemStack> use(@NotNull @NotNull net.minecraft.world.level.Level level, net.minecraft.world.entity.player.Player player, @NotNull @NotNull net.minecraft.world.InteractionHand hand) - Overrides:
usein classnet.minecraft.world.item.Item
-
onUseTick
public void onUseTick(@NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.entity.LivingEntity livingEntity, @NotNull @NotNull net.minecraft.world.item.ItemStack stack, int timeLeft) - Overrides:
onUseTickin classnet.minecraft.world.item.Item
-
canCast
public boolean canCast(net.minecraft.world.item.ItemStack stack, Spell spell, PlayerCastContext ctx) -
cast
-
appendHoverText
public void appendHoverText(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.world.level.Level level, @NotNull @NotNull List<net.minecraft.network.chat.Component> list, @NotNull @NotNull net.minecraft.world.item.TooltipFlag tooltipFlag) - Overrides:
appendHoverTextin classnet.minecraft.world.item.Item
-
finishUsingItem
@NotNull public @NotNull net.minecraft.world.item.ItemStack finishUsingItem(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, @NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.entity.LivingEntity livingEntity) - Overrides:
finishUsingItemin classnet.minecraft.world.item.Item
-
releaseUsing
public void releaseUsing(@NotNull @NotNull net.minecraft.world.item.ItemStack stack, @NotNull @NotNull net.minecraft.world.level.Level level, @NotNull @NotNull net.minecraft.world.entity.LivingEntity livingEntity, int timeCharged) - Overrides:
releaseUsingin classnet.minecraft.world.item.Item
-
getCurrentSpell
- Specified by:
getCurrentSpellin interfaceICastItem
-
showSpellHUD
public boolean showSpellHUD(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack) - Specified by:
showSpellHUDin interfaceICastItem
-
isFoil
public boolean isFoil(@NotNull @NotNull net.minecraft.world.item.ItemStack stack) - Overrides:
isFoilin classnet.minecraft.world.item.Item
-
getName
@NotNull public @NotNull net.minecraft.network.chat.Component getName(@NotNull @NotNull net.minecraft.world.item.ItemStack stack) - Overrides:
getNamein classnet.minecraft.world.item.Item
-
getUseDuration
public int getUseDuration(@NotNull @NotNull net.minecraft.world.item.ItemStack stack) - Overrides:
getUseDurationin classnet.minecraft.world.item.Item
-
showTooltip
public boolean showTooltip(net.minecraft.world.item.ItemStack stack) - Specified by:
showTooltipin interfaceIWorkbenchItem
-
onApplyButtonPressed
public boolean onApplyButtonPressed(net.minecraft.world.entity.player.Player player, net.minecraft.world.inventory.Slot centre, net.minecraft.world.inventory.Slot crystals, net.minecraft.world.inventory.Slot upgrade, net.minecraft.world.inventory.Slot[] spellBooks) - Specified by:
onApplyButtonPressedin interfaceIWorkbenchItem
-
getSpellSlotCount
public int getSpellSlotCount(net.minecraft.world.item.ItemStack stack) - Specified by:
getSpellSlotCountin interfaceIWorkbenchItem
-
canPlace
public boolean canPlace(net.minecraft.world.item.ItemStack stack) - Specified by:
canPlacein interfaceIWorkbenchItem
-