Package com.beansgalaxy.backpacks.compat
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 -
Method Summary
Modifier and TypeMethodDescriptionbooleancanEquip(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack) Determines if the ItemStack can be equipped into a slot.booleancanUnequip(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack) Determines if the ItemStack can be unequipped from a slot.voidcurioTick(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.DropRulegetDropRule(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.voidonEquip(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.voidonUnequip(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, waitMethods 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.ICurioItemCalled when the ItemStack is equipped into a slot or its data changes.- Specified by:
onEquipin interfacetop.theillusivec4.curios.api.type.capability.ICurioItem- Parameters:
slotContext- Context about the slot that the ItemStack was just unequipped fromprevStack- The previous ItemStack in the slotstack- 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.ICurioItemCalled when the ItemStack is unequipped from a slot or its data changes.- Specified by:
onUnequipin interfacetop.theillusivec4.curios.api.type.capability.ICurioItem- Parameters:
slotContext- Context about the slot that the ItemStack was just unequipped fromnewStack- The new ItemStack in the slotoldStack- 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.ICurioItemDetermines if the ItemStack can be equipped into a slot.- Specified by:
canEquipin interfacetop.theillusivec4.curios.api.type.capability.ICurioItem- Parameters:
slotContext- Context about the slot that the ItemStack is attempting to equip intostack- 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.ICurioItemDetermines if the ItemStack can be unequipped from a slot.- Specified by:
canUnequipin interfacetop.theillusivec4.curios.api.type.capability.ICurioItem- Parameters:
slotContext- Context about the slot that the ItemStack is attempting to unequip fromstack- 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.ICurioItemCalled every tick on both client and server while the ItemStack is equipped.- Specified by:
curioTickin interfacetop.theillusivec4.curios.api.type.capability.ICurioItem- Parameters:
slotContext- The context for the slot that the ItemStack is instack- 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.ICurioItemDetermines 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:
getDropRulein interfacetop.theillusivec4.curios.api.type.capability.ICurioItem- Parameters:
slotContext- Context about the slot that the ItemStack is attempting to equip intosource- The damage source that killed the wearer and triggered the droplootingLevel- The level of looting that triggered the droprecentlyHit- Whether or not the wearer was recently hitstack- The ItemStack in question- Returns:
- The
ICurio.DropRulethat applies to this curio
-