Class ItemScroll

java.lang.Object
net.minecraft.world.item.Item
at.petrak.hexcasting.common.items.storage.ItemScroll
All Implemented Interfaces:
IotaHolderItem, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike

public class ItemScroll extends net.minecraft.world.item.Item implements IotaHolderItem
TAG_OP_ID and TAG_PATTERN: "Ancient Scroll of %s" (per-world pattern preloaded)
TAG_OP_ID: "Ancient Scroll of %s" (per-world pattern loaded on inv tick)
TAG_PATTERN: "Scroll" (custom)
(none): "Empty Scroll"
  • Nested Class Summary

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

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

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.resources.ResourceLocation
     
    final int
     
    static final String
     
    static final String
     
    static final String
     

    Fields 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_SIZE

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

    FILTERED_REGISTRIES

    Fields inherited from interface at.petrak.hexcasting.api.item.IotaHolderItem

    TAG_OVERRIDE_VISUALLY
  • Constructor Summary

    Constructors
    Constructor
    Description
    ItemScroll(net.minecraft.world.item.Item.Properties pProperties, int blockSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendHoverText(net.minecraft.world.item.ItemStack pStack, @Nullable net.minecraft.world.level.Level pLevel, List<net.minecraft.network.chat.Component> pTooltipComponents, net.minecraft.world.item.TooltipFlag pIsAdvanced)
     
    boolean
    canWrite(net.minecraft.world.item.ItemStack stack, Iota datum)
    Write null to indicate erasing
    net.minecraft.network.chat.Component
    getName(net.minecraft.world.item.ItemStack pStack)
     
    Optional<net.minecraft.world.inventory.tooltip.TooltipComponent>
    getTooltipImage(net.minecraft.world.item.ItemStack stack)
     
    void
    inventoryTick(net.minecraft.world.item.ItemStack pStack, net.minecraft.world.level.Level pLevel, net.minecraft.world.entity.Entity pEntity, int pSlotId, boolean pIsSelected)
     
    protected boolean
    mayPlace(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.core.Direction pDirection, net.minecraft.world.item.ItemStack pHangingEntityStack, net.minecraft.core.BlockPos pPos)
     
    @Nullable net.minecraft.nbt.CompoundTag
    readIotaTag(net.minecraft.world.item.ItemStack stack)
     
    net.minecraft.world.InteractionResult
    useOn(net.minecraft.world.item.context.UseOnContext ctx)
     
    static net.minecraft.world.item.ItemStack
    withPerWorldPattern(net.minecraft.world.item.ItemStack stack, String op_id)
     
    boolean
    writeable(net.minecraft.world.item.ItemStack stack)
     
    void
    writeDatum(net.minecraft.world.item.ItemStack stack, Iota datum)
    Write null to indicate erasing

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

    asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, useOnRelease, verifyTagAfterLoad

    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 at.petrak.hexcasting.api.item.IotaHolderItem

    emptyIota, getColor, readIota
  • Field Details

  • Constructor Details

    • ItemScroll

      public ItemScroll(net.minecraft.world.item.Item.Properties pProperties, int blockSize)
  • Method Details

    • withPerWorldPattern

      public static net.minecraft.world.item.ItemStack withPerWorldPattern(net.minecraft.world.item.ItemStack stack, String op_id)
    • readIotaTag

      @Nullable public @Nullable net.minecraft.nbt.CompoundTag readIotaTag(net.minecraft.world.item.ItemStack stack)
      Specified by:
      readIotaTag in interface IotaHolderItem
    • writeable

      public boolean writeable(net.minecraft.world.item.ItemStack stack)
      Specified by:
      writeable in interface IotaHolderItem
      Returns:
      whether it is possible to write to this IotaHolder
    • canWrite

      public boolean canWrite(net.minecraft.world.item.ItemStack stack, Iota datum)
      Description copied from interface: IotaHolderItem
      Write null to indicate erasing
      Specified by:
      canWrite in interface IotaHolderItem
    • writeDatum

      public void writeDatum(net.minecraft.world.item.ItemStack stack, Iota datum)
      Description copied from interface: IotaHolderItem
      Write null to indicate erasing
      Specified by:
      writeDatum in interface IotaHolderItem
    • useOn

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

      protected boolean mayPlace(net.minecraft.world.entity.player.Player pPlayer, net.minecraft.core.Direction pDirection, net.minecraft.world.item.ItemStack pHangingEntityStack, net.minecraft.core.BlockPos pPos)
    • getName

      public net.minecraft.network.chat.Component getName(net.minecraft.world.item.ItemStack pStack)
      Overrides:
      getName in class net.minecraft.world.item.Item
    • inventoryTick

      public void inventoryTick(net.minecraft.world.item.ItemStack pStack, net.minecraft.world.level.Level pLevel, net.minecraft.world.entity.Entity pEntity, int pSlotId, boolean pIsSelected)
      Overrides:
      inventoryTick in class net.minecraft.world.item.Item
    • appendHoverText

      public void appendHoverText(net.minecraft.world.item.ItemStack pStack, @Nullable @Nullable net.minecraft.world.level.Level pLevel, List<net.minecraft.network.chat.Component> pTooltipComponents, net.minecraft.world.item.TooltipFlag pIsAdvanced)
      Overrides:
      appendHoverText in class net.minecraft.world.item.Item
    • getTooltipImage

      public Optional<net.minecraft.world.inventory.tooltip.TooltipComponent> getTooltipImage(net.minecraft.world.item.ItemStack stack)
      Overrides:
      getTooltipImage in class net.minecraft.world.item.Item