Class GlovesItem
java.lang.Object
net.minecraft.world.item.Item
com.idark.valoria.registries.item.types.curio.GlovesItem
- All Implemented Interfaces:
ICurioTexture
,net.minecraft.world.flag.FeatureElement
,net.minecraft.world.item.Vanishable
,net.minecraft.world.level.ItemLike
,net.minecraftforge.common.extensions.IForgeItem
,top.theillusivec4.curios.api.type.capability.ICurioItem
public class GlovesItem
extends net.minecraft.world.item.Item
implements top.theillusivec4.curios.api.type.capability.ICurioItem, ICurioTexture, net.minecraft.world.item.Vanishable
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties
-
Field Summary
Fields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
Fields inherited from interface top.theillusivec4.curios.api.type.capability.ICurioItem
defaultInstance
-
Constructor Summary
ConstructorDescriptionGlovesItem
(AccessoryGem gem, AccessoryMaterial material, net.minecraft.world.item.Item.Properties properties) -
Method Summary
Modifier and TypeMethodDescriptionvoid
appendHoverText
(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flags) boolean
canEquipFromUse
(top.theillusivec4.curios.api.SlotContext slot, net.minecraft.world.item.ItemStack stack) Determines if the ItemStack can be automatically equipped into the first available slot when used.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.com.google.common.collect.Multimap<net.minecraft.world.entity.ai.attributes.Attribute,
net.minecraft.world.entity.ai.attributes.AttributeModifier> getAttributeModifiers
(top.theillusivec4.curios.api.SlotContext slotContext, UUID uuid, net.minecraft.world.item.ItemStack stack) Retrieves a map of attribute modifiers for the curio.top.theillusivec4.curios.api.type.capability.ICurio.SoundInfo
getEquipSound
(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack) Retrieves the equip sound information for the given slot context.static net.minecraft.resources.ResourceLocation
getGlovesTexture
(String material, boolean slim) net.minecraft.resources.ResourceLocation
getTexture
(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) boolean
makesPiglinsNeutral
(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack) Determines whether wearing the curio makes nearby piglins neutral, in the same manner as wearing gold armor in vanilla.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, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, useOn, 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 top.theillusivec4.curios.api.type.capability.ICurioItem
canEquip, canEquip, canRightClickEquip, canSync, canSync, canUnequip, canUnequip, canWalkOnPowderedSnow, curioAnimate, curioBreak, curioBreak, curioTick, getAttributeModifiers, getAttributesTooltip, getDropRule, getDropRule, getFortuneBonus, getFortuneLevel, getLootingBonus, getLootingLevel, getSlotsTooltip, getTagsTooltip, hasCurioCapability, isEnderMask, onEquip, onEquip, onEquipFromUse, onUnequip, onUnequip, playRightClickEquipSound, readSyncData, readSyncData, showAttributesTooltip, writeSyncData, writeSyncData
Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
Field Details
-
gem
-
material
-
-
Constructor Details
-
GlovesItem
public GlovesItem(AccessoryGem gem, AccessoryMaterial material, net.minecraft.world.item.Item.Properties properties)
-
-
Method Details
-
getGlovesTexture
public static net.minecraft.resources.ResourceLocation getGlovesTexture(String material, boolean slim) -
getEquipSound
@Nonnull public top.theillusivec4.curios.api.type.capability.ICurio.SoundInfo getEquipSound(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack) Description copied from interface:top.theillusivec4.curios.api.type.capability.ICurioItem
Retrieves the equip sound information for the given slot context.- Specified by:
getEquipSound
in interfacetop.theillusivec4.curios.api.type.capability.ICurioItem
- Parameters:
slotContext
- Context about the slot that the ItemStack was just equipped into- Returns:
ICurio.SoundInfo
containing information about the sound event, volume, and pitch
-
canEquipFromUse
public boolean canEquipFromUse(top.theillusivec4.curios.api.SlotContext slot, net.minecraft.world.item.ItemStack stack) Description copied from interface:top.theillusivec4.curios.api.type.capability.ICurioItem
Determines if the ItemStack can be automatically equipped into the first available slot when used.- Specified by:
canEquipFromUse
in interfacetop.theillusivec4.curios.api.type.capability.ICurioItem
- Parameters:
slot
- Context about the slot that the ItemStackstack
- The ItemStack in question- Returns:
- True to enable auto-equipping when the item is used, false to disable
-
getAttributeModifiers
public com.google.common.collect.Multimap<net.minecraft.world.entity.ai.attributes.Attribute,net.minecraft.world.entity.ai.attributes.AttributeModifier> getAttributeModifiers(top.theillusivec4.curios.api.SlotContext slotContext, UUID uuid, net.minecraft.world.item.ItemStack stack) Description copied from interface:top.theillusivec4.curios.api.type.capability.ICurioItem
Retrieves a map of attribute modifiers for the curio.
Note that only the identifier is guaranteed to be present in the slot context. For instances where the ItemStack may not be in a curio slot, such as when retrieving item tooltips, the index is -1 and the wearer may be null.- Specified by:
getAttributeModifiers
in interfacetop.theillusivec4.curios.api.type.capability.ICurioItem
- Parameters:
slotContext
- Context about the slot that the ItemStack is inuuid
- Slot-unique UUID- Returns:
- A map of attribute modifiers to apply
-
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 interfacetop.theillusivec4.curios.api.type.capability.ICurioItem
- Parameters:
slotContext
- The context for the slot that the ItemStack is instack
- The ItemStack in question
-
makesPiglinsNeutral
public boolean makesPiglinsNeutral(top.theillusivec4.curios.api.SlotContext slotContext, net.minecraft.world.item.ItemStack stack) Description copied from interface:top.theillusivec4.curios.api.type.capability.ICurioItem
Determines whether wearing the curio makes nearby piglins neutral, in the same manner as wearing gold armor in vanilla.- Specified by:
makesPiglinsNeutral
in interfacetop.theillusivec4.curios.api.type.capability.ICurioItem
- Parameters:
slotContext
- Context about the slot that the ItemStack is in- Returns:
- True if nearby piglins are neutral, false otherwise
-
getTexture
public net.minecraft.resources.ResourceLocation getTexture(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) - Specified by:
getTexture
in interfaceICurioTexture
-
appendHoverText
public void appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flags) - Overrides:
appendHoverText
in classnet.minecraft.world.item.Item
-