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
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"
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
FieldsModifier and TypeFieldDescriptionstatic final net.minecraft.resources.ResourceLocationfinal intstatic final Stringstatic final Stringstatic final StringFields 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_REGISTRIESFields inherited from interface at.petrak.hexcasting.api.item.IotaHolderItem
TAG_OVERRIDE_VISUALLY -
Constructor Summary
ConstructorsConstructorDescriptionItemScroll(net.minecraft.world.item.Item.Properties pProperties, int blockSize) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendHoverText(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) booleanWritenullto indicate erasingnet.minecraft.network.chat.ComponentgetName(net.minecraft.world.item.ItemStack pStack) Optional<net.minecraft.world.inventory.tooltip.TooltipComponent>getTooltipImage(net.minecraft.world.item.ItemStack stack) voidinventoryTick(net.minecraft.world.item.ItemStack pStack, net.minecraft.world.level.Level pLevel, net.minecraft.world.entity.Entity pEntity, int pSlotId, boolean pIsSelected) protected booleanmayPlace(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.CompoundTagreadIotaTag(net.minecraft.world.item.ItemStack stack) net.minecraft.world.InteractionResultuseOn(net.minecraft.world.item.context.UseOnContext ctx) static net.minecraft.world.item.ItemStackwithPerWorldPattern(net.minecraft.world.item.ItemStack stack, String op_id) booleanwriteable(net.minecraft.world.item.ItemStack stack) voidwriteDatum(net.minecraft.world.item.ItemStack stack, Iota datum) Writenullto indicate erasingMethods 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, verifyTagAfterLoadMethods 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 at.petrak.hexcasting.api.item.IotaHolderItem
emptyIota, getColor, readIota
-
Field Details
-
TAG_OP_ID
- See Also:
-
TAG_PATTERN
- See Also:
-
TAG_NEEDS_PURCHASE
- See Also:
-
ANCIENT_PREDICATE
public static final net.minecraft.resources.ResourceLocation ANCIENT_PREDICATE -
blockSize
public final int blockSize
-
-
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:
readIotaTagin interfaceIotaHolderItem
-
writeable
public boolean writeable(net.minecraft.world.item.ItemStack stack) - Specified by:
writeablein interfaceIotaHolderItem- Returns:
- whether it is possible to write to this IotaHolder
-
canWrite
Description copied from interface:IotaHolderItemWritenullto indicate erasing- Specified by:
canWritein interfaceIotaHolderItem
-
writeDatum
Description copied from interface:IotaHolderItemWritenullto indicate erasing- Specified by:
writeDatumin interfaceIotaHolderItem
-
useOn
public net.minecraft.world.InteractionResult useOn(net.minecraft.world.item.context.UseOnContext ctx) - Overrides:
useOnin classnet.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:
getNamein classnet.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:
inventoryTickin classnet.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:
appendHoverTextin classnet.minecraft.world.item.Item
-
getTooltipImage
public Optional<net.minecraft.world.inventory.tooltip.TooltipComponent> getTooltipImage(net.minecraft.world.item.ItemStack stack) - Overrides:
getTooltipImagein classnet.minecraft.world.item.Item
-