Class ModArmorFSBPowered

java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ArmorItem
com.hbm_m.powerarmor.ModArmorFSB
com.hbm_m.powerarmor.ModArmorFSBPowered
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:
ModPowerArmorItem

public class ModArmorFSBPowered extends ModArmorFSB
  • Nested Class Summary

    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
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    long
     
    long
     
    long
     
    long
     

    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
    ModArmorFSBPowered(net.minecraft.world.item.ArmorMaterial material, net.minecraft.world.item.ArmorItem.Type type, net.minecraft.world.item.Item.Properties properties, String texture, long maxPower, long chargeRate, long consumption, long drain)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level level, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flag)
     
    void
    chargeBattery(net.minecraft.world.item.ItemStack stack, long amount)
     
    void
    dischargeBattery(net.minecraft.world.item.ItemStack stack, long amount)
     
    long
    getCharge(net.minecraft.world.item.ItemStack stack)
     
    long
    getChargeRate(net.minecraft.world.item.ItemStack stack)
     
    long
    getDischargeRate(net.minecraft.world.item.ItemStack stack)
     
    double
    getDurabilityForDisplay(net.minecraft.world.item.ItemStack stack)
     
    long
    getMaxCharge(net.minecraft.world.item.ItemStack stack)
     
    net.minecraftforge.common.capabilities.ICapabilityProvider
    initCapabilities(net.minecraft.world.item.ItemStack stack, net.minecraft.nbt.CompoundTag nbt)
     
    boolean
    isArmorEnabled(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.
    void
    setCharge(net.minecraft.world.item.ItemStack stack, long amount)
     
    void
    setDamage(net.minecraft.world.item.ItemStack stack, int damage)
    MATCHES 1.7.10 BEHAVIOR This is called by Minecraft when armor would take damage.
    boolean
    showDurabilityBar(net.minecraft.world.item.ItemStack stack)
     
    void
    syncEnergyToClient(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, net.minecraft.world.entity.EquipmentSlot slot)
     

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

    dispenseArmor, getDefaultAttributeModifiers, getDefense, getEnchantmentValue, getEquipmentSlot, getEquipSound, getMaterial, getToughness, getType, isValidRepairItem, use

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

    asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, inventoryTick, isBarVisible, 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, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
  • Field Details

    • maxPower

      public long maxPower
    • chargeRate

      public long chargeRate
    • consumption

      public long consumption
    • drain

      public long drain
    • ARMOR_SLOT_HEAD

      public static final int ARMOR_SLOT_HEAD
      See Also:
    • ARMOR_SLOT_CHEST

      public static final int ARMOR_SLOT_CHEST
      See Also:
    • ARMOR_SLOT_LEGS

      public static final int ARMOR_SLOT_LEGS
      See Also:
    • ARMOR_SLOT_FEET

      public static final int ARMOR_SLOT_FEET
      See Also:
  • Constructor Details

    • ModArmorFSBPowered

      public ModArmorFSBPowered(net.minecraft.world.item.ArmorMaterial material, net.minecraft.world.item.ArmorItem.Type type, net.minecraft.world.item.Item.Properties properties, String texture, long maxPower, long chargeRate, long consumption, long drain)
  • Method Details

    • appendHoverText

      public void appendHoverText(net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.world.level.Level level, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flag)
      Overrides:
      appendHoverText in class net.minecraft.world.item.Item
    • isArmorEnabled

      public boolean isArmorEnabled(net.minecraft.world.item.ItemStack stack)
      Overrides:
      isArmorEnabled in class ModArmorFSB
    • chargeBattery

      public void chargeBattery(net.minecraft.world.item.ItemStack stack, long amount)
    • setCharge

      public void setCharge(net.minecraft.world.item.ItemStack stack, long amount)
    • dischargeBattery

      public void dischargeBattery(net.minecraft.world.item.ItemStack stack, long amount)
    • getCharge

      public long getCharge(net.minecraft.world.item.ItemStack stack)
    • showDurabilityBar

      public boolean showDurabilityBar(net.minecraft.world.item.ItemStack stack)
    • getDurabilityForDisplay

      public double getDurabilityForDisplay(net.minecraft.world.item.ItemStack stack)
    • getMaxCharge

      public long getMaxCharge(net.minecraft.world.item.ItemStack stack)
    • getChargeRate

      public long getChargeRate(net.minecraft.world.item.ItemStack stack)
    • getDischargeRate

      public long getDischargeRate(net.minecraft.world.item.ItemStack stack)
    • setDamage

      public void setDamage(net.minecraft.world.item.ItemStack stack, int damage)
      MATCHES 1.7.10 BEHAVIOR This is called by Minecraft when armor would take damage. Instead of damaging the item, we drain energy based on consumption. (Forge/NeoForge: IItemExtension#setDamage; на Fabric такого хука нет.)
    • onArmorTick

      public 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.
      Specified by:
      onArmorTick in interface net.minecraftforge.common.extensions.IForgeItem
      Overrides:
      onArmorTick in class ModArmorFSB
    • syncEnergyToClient

      public void syncEnergyToClient(net.minecraft.world.entity.player.Player player, net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level world, net.minecraft.world.entity.EquipmentSlot slot)
    • initCapabilities

      @Nullable public net.minecraftforge.common.capabilities.ICapabilityProvider initCapabilities(net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.nbt.CompoundTag nbt)