Class CurioItem

java.lang.Object
com.beansgalaxy.backpacks.compat.CurioItem
All Implemented Interfaces:
top.theillusivec4.curios.api.type.capability.ICurioItem

public class CurioItem extends Object implements top.theillusivec4.curios.api.type.capability.ICurioItem
  • Field Summary

    Fields inherited from interface top.theillusivec4.curios.api.type.capability.ICurioItem

    defaultInstance
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canEquip(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack)
    Determines if the ItemStack can be equipped into a slot.
    boolean
    canUnequip(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack)
    Determines if the ItemStack can be unequipped from a slot.
    void
    curioTick(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack)
    Called every tick on both client and server while the ItemStack is equipped.
    top.theillusivec4.curios.api.type.capability.ICurio.DropRule
    getDropRule(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.damagesource.DamageSource source, int lootingLevel, boolean recentlyHit, net.minecraft.world.item.ItemStack stack)
    Determines if the ItemStack should drop on death and persist through respawn.
    void
    onEquip(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack prevStack, net.minecraft.world.item.ItemStack stack)
    Called when the ItemStack is equipped into a slot or its data changes.
    void
    onUnequip(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack newStack, net.minecraft.world.item.ItemStack oldStack)
    Called when the ItemStack is unequipped from a slot or its data changes.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface top.theillusivec4.curios.api.type.capability.ICurioItem

    canEquip, canEquipFromUse, canRightClickEquip, canSync, canSync, canUnequip, canWalkOnPowderedSnow, curioAnimate, curioBreak, curioBreak, curioTick, getAttributeModifiers, getAttributeModifiers, getAttributesTooltip, getDropRule, getEquipSound, getFortuneBonus, getFortuneLevel, getLootingBonus, getLootingLevel, getSlotsTooltip, getTagsTooltip, hasCurioCapability, isEnderMask, makesPiglinsNeutral, onEquip, onEquipFromUse, onUnequip, playRightClickEquipSound, readSyncData, readSyncData, showAttributesTooltip, writeSyncData, writeSyncData
  • Constructor Details

    • CurioItem

      public CurioItem()
  • Method Details

    • onEquip

      public void onEquip(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack prevStack, net.minecraft.world.item.ItemStack stack)
      Description copied from interface: top.theillusivec4.curios.api.type.capability.ICurioItem
      Called when the ItemStack is equipped into a slot or its data changes.
      Specified by:
      onEquip in interface top.theillusivec4.curios.api.type.capability.ICurioItem
      Parameters:
      slotContext - Context about the slot that the ItemStack was just unequipped from
      prevStack - The previous ItemStack in the slot
      stack - The ItemStack in question
    • onUnequip

      public void onUnequip(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack newStack, net.minecraft.world.item.ItemStack oldStack)
      Description copied from interface: top.theillusivec4.curios.api.type.capability.ICurioItem
      Called when the ItemStack is unequipped from a slot or its data changes.
      Specified by:
      onUnequip in interface top.theillusivec4.curios.api.type.capability.ICurioItem
      Parameters:
      slotContext - Context about the slot that the ItemStack was just unequipped from
      newStack - The new ItemStack in the slot
      oldStack - The ItemStack in question
    • canEquip

      public boolean canEquip(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack)
      Description copied from interface: top.theillusivec4.curios.api.type.capability.ICurioItem
      Determines if the ItemStack can be equipped into a slot.
      Specified by:
      canEquip in interface top.theillusivec4.curios.api.type.capability.ICurioItem
      Parameters:
      slotContext - Context about the slot that the ItemStack is attempting to equip into
      stack - The ItemStack in question
      Returns:
      True if the ItemStack can be equipped/put in, false if not
    • canUnequip

      public boolean canUnequip(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack)
      Description copied from interface: top.theillusivec4.curios.api.type.capability.ICurioItem
      Determines if the ItemStack can be unequipped from a slot.
      Specified by:
      canUnequip in interface top.theillusivec4.curios.api.type.capability.ICurioItem
      Parameters:
      slotContext - Context about the slot that the ItemStack is attempting to unequip from
      stack - The ItemStack in question
      Returns:
      True if the ItemStack can be unequipped/taken out, false if not
    • curioTick

      public void curioTick(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack)
      Description copied from interface: top.theillusivec4.curios.api.type.capability.ICurioItem
      Called every tick on both client and server while the ItemStack is equipped.
      Specified by:
      curioTick in interface top.theillusivec4.curios.api.type.capability.ICurioItem
      Parameters:
      slotContext - The context for the slot that the ItemStack is in
      stack - The ItemStack in question
    • getDropRule

      @NotNull public top.theillusivec4.curios.api.type.capability.ICurio.DropRule getDropRule(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.damagesource.DamageSource source, int lootingLevel, boolean recentlyHit, net.minecraft.world.item.ItemStack stack)
      Description copied from interface: top.theillusivec4.curios.api.type.capability.ICurioItem
      Determines if the ItemStack should drop on death and persist through respawn. This will persist the ItemStack in the curio slot to the respawned player if applicable.
      Specified by:
      getDropRule in interface top.theillusivec4.curios.api.type.capability.ICurioItem
      Parameters:
      slotContext - Context about the slot that the ItemStack is attempting to equip into
      source - The damage source that killed the wearer and triggered the drop
      lootingLevel - The level of looting that triggered the drop
      recentlyHit - Whether or not the wearer was recently hit
      stack - The ItemStack in question
      Returns:
      The ICurio.DropRule that applies to this curio