Class ModPowerArmorItem

java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ArmorItem
All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement, net.minecraft.world.item.Equipable, net.minecraft.world.item.Vanishable, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem
Direct Known Subclasses:
AJRArmor, AJROArmor, BismuthArmor, DNTArmor, T51Armor

public class ModPowerArmorItem extends ModArmorFSBPowered
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

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

    net.minecraft.world.item.ArmorItem.Type

    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.ArmorItem

    DISPENSE_ITEM_BEHAVIOR, knockbackResistance, material, type

    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
  • Constructor Summary

    Constructors
    Constructor
    Description
    ModPowerArmorItem(net.minecraft.world.item.ArmorMaterial material, net.minecraft.world.item.ArmorItem.Type type, net.minecraft.world.item.Item.Properties properties, PowerArmorSpecs specs)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    extractEnergy(net.minecraft.world.item.ItemStack stack, long amount, boolean simulate)
     
    getArmorTexture(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.Entity entity, net.minecraft.world.entity.EquipmentSlot slot, String type)
     
    int
    getBarColor(net.minecraft.world.item.ItemStack stack)
     
    int
    getBarWidth(net.minecraft.world.item.ItemStack stack)
     
    int
     
    long
    getEnergy(net.minecraft.world.item.ItemStack stack)
     
    net.minecraft.sounds.SoundEvent
     
    int
    getMaxDamage(net.minecraft.world.item.ItemStack stack)
     
    long
    getModifiedCapacity(net.minecraft.world.item.ItemStack stack)
     
    float
    getRadiationResistance(net.minecraft.world.item.ItemStack stack)
     
     
    float
     
    static boolean
    hasFSBArmor(net.minecraft.world.entity.player.Player player)
    Проверяет, носит ли игрок полный сет силовой брони (FSB).
    static boolean
    hasFSBArmorIgnoreCharge(net.minecraft.world.entity.player.Player player)
    Проверяет, носит ли игрок полный сет силовой брони, игнорируя заряд.
    static boolean
    hasFullSet(net.minecraft.world.entity.player.Player player)
     
    void
    initializeClient(Consumer<net.minecraftforge.client.extensions.common.IClientItemExtensions> consumer)
     
    boolean
    isBarVisible(net.minecraft.world.item.ItemStack stack)
    Переопределяем методы для корректного отображения энергии в тултипе с учетом модификаторов
    boolean
    isDamageable(net.minecraft.world.item.ItemStack stack)
     
    void
    onArmorTick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player)
    MATCHES 1.7.10 BEHAVIOR Passive energy drain per tick when wearing full FSB armor set.

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

    dispenseArmor, getDefaultAttributeModifiers, getEnchantmentValue, getEquipmentSlot, getMaterial, getType, isValidRepairItem, use

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

    asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getCraftingRemainingItem, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, inventoryTick, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, 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.item.Equipable

    swapWithEquipmentSlot

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

    isEnabled

    Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem

    canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
  • Constructor Details

    • ModPowerArmorItem

      public ModPowerArmorItem(net.minecraft.world.item.ArmorMaterial material, net.minecraft.world.item.ArmorItem.Type type, net.minecraft.world.item.Item.Properties properties, PowerArmorSpecs specs)
  • Method Details

    • getDefense

      public int getDefense()
      Overrides:
      getDefense in class net.minecraft.world.item.ArmorItem
    • getToughness

      public float getToughness()
      Overrides:
      getToughness in class net.minecraft.world.item.ArmorItem
    • getSpecs

      public PowerArmorSpecs getSpecs()
    • getArmorTexture

      public String getArmorTexture(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.Entity entity, net.minecraft.world.entity.EquipmentSlot slot, String type)
      Specified by:
      getArmorTexture in interface net.minecraftforge.common.extensions.IForgeItem
      Overrides:
      getArmorTexture in class ModArmorFSB
    • initializeClient

      public void initializeClient(Consumer<net.minecraftforge.client.extensions.common.IClientItemExtensions> consumer)
      Overrides:
      initializeClient in class ModArmorFSB
    • getEquipSound

      public net.minecraft.sounds.SoundEvent getEquipSound()
      Specified by:
      getEquipSound in interface net.minecraft.world.item.Equipable
      Overrides:
      getEquipSound in class net.minecraft.world.item.ArmorItem
    • isBarVisible

      public boolean isBarVisible(net.minecraft.world.item.ItemStack stack)
      Переопределяем методы для корректного отображения энергии в тултипе с учетом модификаторов
      Overrides:
      isBarVisible in class net.minecraft.world.item.Item
    • getBarWidth

      public int getBarWidth(net.minecraft.world.item.ItemStack stack)
      Overrides:
      getBarWidth in class net.minecraft.world.item.Item
    • getBarColor

      public int getBarColor(net.minecraft.world.item.ItemStack stack)
      Overrides:
      getBarColor in class net.minecraft.world.item.Item
    • onArmorTick

      public void onArmorTick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, net.minecraft.world.entity.player.Player player)
      Description copied from class: ModArmorFSBPowered
      MATCHES 1.7.10 BEHAVIOR Passive energy drain per tick when wearing full FSB armor set.
      Specified by:
      onArmorTick in interface net.minecraftforge.common.extensions.IForgeItem
      Overrides:
      onArmorTick in class ModArmorFSBPowered
    • isDamageable

      public boolean isDamageable(net.minecraft.world.item.ItemStack stack)
    • getMaxDamage

      public int getMaxDamage(net.minecraft.world.item.ItemStack stack)
    • hasFullSet

      public static boolean hasFullSet(net.minecraft.world.entity.player.Player player)
    • hasFSBArmor

      public static boolean hasFSBArmor(net.minecraft.world.entity.player.Player player)
      Проверяет, носит ли игрок полный сет силовой брони (FSB). Использует базовую реализацию из ModArmorFSB
    • hasFSBArmorIgnoreCharge

      public static boolean hasFSBArmorIgnoreCharge(net.minecraft.world.entity.player.Player player)
      Проверяет, носит ли игрок полный сет силовой брони, игнорируя заряд. Использует базовую реализацию из ModArmorFSB
    • getEnergy

      public long getEnergy(net.minecraft.world.item.ItemStack stack)
    • extractEnergy

      public void extractEnergy(net.minecraft.world.item.ItemStack stack, long amount, boolean simulate)
    • getModifiedCapacity

      public long getModifiedCapacity(net.minecraft.world.item.ItemStack stack)
    • getRadiationResistance

      public float getRadiationResistance(net.minecraft.world.item.ItemStack stack)