Class UpgradeSmithingTemplateItem

java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.SmithingTemplateItem
net.xun.lib.common.api.item.UpgradeSmithingTemplateItem
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.neoforged.neoforge.common.extensions.IItemExtension

public class UpgradeSmithingTemplateItem extends net.minecraft.world.item.SmithingTemplateItem
Custom smithing template item for upgrade recipes.

This class extends Minecraft's SmithingTemplateItem to provide customizable upgrade templates. The template displays information about applicable items, required ingredients, and slot descriptions based on the provided name and resource locations.

  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.world.item.Item

    net.minecraft.world.item.Item.Properties, net.minecraft.world.item.Item.TooltipContext
  • Field Summary

    Fields inherited from class net.minecraft.world.item.Item

    ABSOLUTE_MAX_STACK_SIZE, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, canRepair, DEFAULT_MAX_STACK_SIZE, MAX_BAR_WIDTH

    Fields inherited from interface net.minecraft.world.flag.FeatureElement

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    UpgradeSmithingTemplateItem(String name, List<net.minecraft.resources.ResourceLocation> baseSlotEmptyIcons, List<net.minecraft.resources.ResourceLocation> additionalSlotEmptyIcons, net.minecraft.world.flag.FeatureFlag... requiredFeatures)
    Constructs a new UpgradeSmithingTemplateItem.
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<net.minecraft.resources.ResourceLocation>
    Creates a default list of empty icons for equipment slots.
    static List<net.minecraft.resources.ResourceLocation>
    Creates a default list of empty icons for material slots.

    Methods inherited from class net.minecraft.world.item.SmithingTemplateItem

    appendHoverText, createArmorTrimTemplate, createArmorTrimTemplate, createNetheriteUpgradeTemplate, getAdditionalSlotEmptyIcons, getAdditionSlotDescription, getBaseSlotDescription, getBaseSlotEmptyIcons

    Methods inherited from class net.minecraft.world.item.Item

    asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getBreakingSound, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDefaultMaxStackSize, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getId, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEnchantable, isFoil, isRepairable, isValidRepairItem, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, releaseUsing, requiredFeatures, toString, use, useOn, useOnRelease, verifyComponentsAfterLoad

    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 net.neoforged.neoforge.common.extensions.IItemExtension

    applyEnchantments, canBeHurtBy, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
  • Constructor Details

    • UpgradeSmithingTemplateItem

      public UpgradeSmithingTemplateItem(String name, List<net.minecraft.resources.ResourceLocation> baseSlotEmptyIcons, List<net.minecraft.resources.ResourceLocation> additionalSlotEmptyIcons, net.minecraft.world.flag.FeatureFlag... requiredFeatures)
      Constructs a new UpgradeSmithingTemplateItem.
      Parameters:
      name - The unique name identifier for this template (used for translation keys)
      baseSlotEmptyIcons - List of resource locations for base slot empty icons
      additionalSlotEmptyIcons - List of resource locations for additional slot empty icons
      requiredFeatures - Optional feature flags required for this item
  • Method Details

    • createTemplateUpgradeIconList

      public static List<net.minecraft.resources.ResourceLocation> createTemplateUpgradeIconList()
      Creates a default list of empty icons for equipment slots.

      This includes icons for armor pieces and tools to show what items can be upgraded using this template.

      Returns:
      List of resource locations for equipment slot icons
    • createTemplateUpgradeMaterialList

      public static List<net.minecraft.resources.ResourceLocation> createTemplateUpgradeMaterialList()
      Creates a default list of empty icons for material slots.

      Typically contains a single ingot icon, but can be customized for different upgrade types.

      Returns:
      List of resource locations for material slot icons