Package at.petrak.hexcasting.api.item
Interface IotaHolderItem
- All Known Implementing Classes:
ItemAbacus,ItemFocus,ItemScroll,ItemSlate,ItemSpellbook,ItemThoughtKnot
public interface IotaHolderItem
Items that store an iota to their tag can implement this interface.
On both the Forge and Fabric sides, the registry will be scanned for all items which implement this interface, and the appropriate cap/CC will be attached.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic voidappendHoverText(IotaHolderItem self, net.minecraft.world.item.ItemStack stack, List<net.minecraft.network.chat.Component> components, net.minecraft.world.item.TooltipFlag flag) booleanWritenullto indicate erasingdefault @Nullable IotaemptyIota(net.minecraft.world.item.ItemStack stack) What is this considered to contain when nothing can be read?default intgetColor(net.minecraft.world.item.ItemStack stack) default @Nullable IotareadIota(net.minecraft.world.item.ItemStack stack, net.minecraft.server.level.ServerLevel world) @Nullable net.minecraft.nbt.CompoundTagreadIotaTag(net.minecraft.world.item.ItemStack stack) booleanwriteable(net.minecraft.world.item.ItemStack stack) voidwriteDatum(net.minecraft.world.item.ItemStack stack, @Nullable Iota iota) Writenullto indicate erasing
-
Field Details
-
TAG_OVERRIDE_VISUALLY
If this key is set on the item, we ignore the rest of the item and render this as if it were of theIotaTypegiven by the resource location.This is not useful to the player at all.
- See Also:
-
-
Method Details
-
readIotaTag
@Nullable @Nullable net.minecraft.nbt.CompoundTag readIotaTag(net.minecraft.world.item.ItemStack stack) -
readIota
@Nullable default @Nullable Iota readIota(net.minecraft.world.item.ItemStack stack, net.minecraft.server.level.ServerLevel world) -
emptyIota
What is this considered to contain when nothing can be read? -
getColor
default int getColor(net.minecraft.world.item.ItemStack stack) -
writeable
boolean writeable(net.minecraft.world.item.ItemStack stack) - Returns:
- whether it is possible to write to this IotaHolder
-
canWrite
Writenullto indicate erasing -
writeDatum
Writenullto indicate erasing -
appendHoverText
static void appendHoverText(IotaHolderItem self, net.minecraft.world.item.ItemStack stack, List<net.minecraft.network.chat.Component> components, net.minecraft.world.item.TooltipFlag flag)
-