Package com.hbm_m.powerarmor
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
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.ArmorItem
net.minecraft.world.item.ArmorItem.TypeNested classes/interfaces inherited from class net.minecraft.world.item.Item
net.minecraft.world.item.Item.Properties -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intlonglonglonglongFields inherited from class com.hbm_m.powerarmor.ModArmorFSB
customGeiger, dashCount, effects, fallSound, hardLanding, hasGeigerSound, jumpSound, noHelmet, stepSize, stepSound, thermal, vatsFields inherited from class net.minecraft.world.item.ArmorItem
DISPENSE_ITEM_BEHAVIOR, knockbackResistance, material, typeFields 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_SIZEFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionModArmorFSBPowered(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 TypeMethodDescriptionvoidappendHoverText(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) voidchargeBattery(net.minecraft.world.item.ItemStack stack, long amount) voiddischargeBattery(net.minecraft.world.item.ItemStack stack, long amount) longgetCharge(net.minecraft.world.item.ItemStack stack) longgetChargeRate(net.minecraft.world.item.ItemStack stack) longgetDischargeRate(net.minecraft.world.item.ItemStack stack) doublegetDurabilityForDisplay(net.minecraft.world.item.ItemStack stack) longgetMaxCharge(net.minecraft.world.item.ItemStack stack) net.minecraftforge.common.capabilities.ICapabilityProviderinitCapabilities(net.minecraft.world.item.ItemStack stack, net.minecraft.nbt.CompoundTag nbt) booleanisArmorEnabled(net.minecraft.world.item.ItemStack stack) voidonArmorTick(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.voidsetCharge(net.minecraft.world.item.ItemStack stack, long amount) voidsetDamage(net.minecraft.world.item.ItemStack stack, int damage) MATCHES 1.7.10 BEHAVIOR This is called by Minecraft when armor would take damage.booleanshowDurabilityBar(net.minecraft.world.item.ItemStack stack) voidsyncEnergyToClient(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 com.hbm_m.powerarmor.ModArmorFSB
addEffect, enableThermalSight, enableVATS, getArmorTexture, handleFall, handleJump, hasFSBArmor, hasFSBArmorIgnoreCharge, initializeClient, onLivingAttack, onLivingHurt, setDashCount, setFallSound, setHasCustomGeiger, setHasGeigerSound, setHasHardLanding, setJumpSound, setNoHelmet, setOverlay, setStepSize, setStepSound, steppyMethods inherited from class net.minecraft.world.item.ArmorItem
dispenseArmor, getDefaultAttributeModifiers, getDefense, getEnchantmentValue, getEquipmentSlot, getEquipSound, getMaterial, getToughness, getType, isValidRepairItem, useMethods 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, verifyTagAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.item.Equipable
swapWithEquipmentSlotMethods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabledMethods 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:
appendHoverTextin classnet.minecraft.world.item.Item
-
isArmorEnabled
public boolean isArmorEnabled(net.minecraft.world.item.ItemStack stack) - Overrides:
isArmorEnabledin classModArmorFSB
-
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:
onArmorTickin interfacenet.minecraftforge.common.extensions.IForgeItem- Overrides:
onArmorTickin classModArmorFSB
-
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)
-