Class PneumaticArmorItem

java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ArmorItem
me.desht.pneumaticcraft.common.item.PneumaticArmorItem
All Implemented Interfaces:
IFOVModifierItem, ICustomDurabilityBar, IPressurizableItem, ColorHandlers.ITintableItem, IChargeableContainerProvider, net.minecraft.world.flag.FeatureElement, net.minecraft.world.item.DyeableLeatherItem, net.minecraft.world.item.Equipable, net.minecraft.world.item.Vanishable, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem

public class PneumaticArmorItem extends net.minecraft.world.item.ArmorItem implements IChargeableContainerProvider, IFOVModifierItem, ICustomDurabilityBar, IPressurizableItem, net.minecraft.world.item.DyeableLeatherItem, ColorHandlers.ITintableItem
  • 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

    Nested classes/interfaces inherited from interface me.desht.pneumaticcraft.common.item.IChargeableContainerProvider

    IChargeableContainerProvider.Provider
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     
    static final String
     

    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.item.DyeableLeatherItem

    DEFAULT_LEATHER_COLOR, TAG_COLOR, TAG_DISPLAY

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

    FILTERED_REGISTRIES
  • Constructor Summary

    Constructors
    Constructor
    Description
    PneumaticArmorItem(net.minecraft.world.item.ArmorItem.Type equipmentSlotIn)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level worldIn, List<net.minecraft.network.chat.Component> tooltip, net.minecraft.world.item.TooltipFlag flagIn)
     
    boolean
    canElytraFly(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity)
     
    boolean
    canWalkOnPowderedSnow(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity wearer)
     
    boolean
    elytraFlightTick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity, int flightTicks)
     
    int
    getAir(net.minecraft.world.item.ItemStack stack)
    Get the amount of air currently held in this ItemStack.
    getArmorTexture(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.Entity entity, net.minecraft.world.entity.EquipmentSlot slot, String type)
     
    com.google.common.collect.Multimap<net.minecraft.world.entity.ai.attributes.Attribute,net.minecraft.world.entity.ai.attributes.AttributeModifier>
    getAttributeModifiers(net.minecraft.world.entity.EquipmentSlot equipmentSlot, net.minecraft.world.item.ItemStack stack)
     
    int
    Get the base item volume before any volume upgrades are added.
    static boolean
    getBooleanData(net.minecraft.world.item.ItemStack stack, String key, boolean def)
     
    int
    getColor(net.minecraft.world.item.ItemStack stack)
     
    net.minecraft.world.MenuProvider
    Get a container provider for this item
    static net.minecraft.core.BlockPos
    getCoordTrackerPos(net.minecraft.world.item.ItemStack helmetStack, net.minecraft.world.level.Level world)
     
    float
    getCustomDurability(net.minecraft.world.item.ItemStack stack)
    Get the actual value for the custom durability of the item, which controls the width of the drawn bar.
    int
    getCustomDurabilityColour(net.minecraft.world.item.ItemStack stack)
    Get the colour of the custom durability bar for this item, in RGB format (alpha will always be full)
    static IDroneBase
    Client-side method to get the debugged drone or programmable controller
    static String
    getEntityFilter(net.minecraft.world.item.ItemStack helmetStack)
     
    int
    getEyepieceColor(net.minecraft.world.item.ItemStack stack)
     
    float
    getFOVModifier(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.EquipmentSlot slot)
    Get the FOV modifer for the given item stack.
    static int
    getIntData(net.minecraft.world.item.ItemStack stack, String key, int def)
     
    static int
    getIntData(net.minecraft.world.item.ItemStack stack, String key, int def, int min, int max)
     
    float
    Get the maximum pressure to which this item can be charged.
    static net.minecraft.world.item.Item
    getSearchedItem(net.minecraft.world.item.ItemStack helmetStack)
     
    int
    getSecondaryColor(net.minecraft.world.item.ItemStack stack)
    Get the overlay colour
    net.minecraft.nbt.CompoundTag
    getShareTag(net.minecraft.world.item.ItemStack stack)
     
    int
    getTintColor(net.minecraft.world.item.ItemStack stack, int tintIndex)
     
    int
    getVolumeUpgrades(net.minecraft.world.item.ItemStack stack)
    Get the number of volume upgrades currently in this ItemStack.
    net.minecraftforge.common.capabilities.ICapabilityProvider
    initCapabilities(net.minecraft.world.item.ItemStack stack, net.minecraft.nbt.CompoundTag nbt)
     
    void
    initializeClient(Consumer<net.minecraftforge.client.extensions.common.IClientItemExtensions> consumer)
     
    boolean
    isDamageable(net.minecraft.world.item.ItemStack stack)
     
    boolean
    isEnderMask(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.monster.EnderMan endermanEntity)
     
    boolean
    isFoil(net.minecraft.world.item.ItemStack stack)
     
    static boolean
    isPlayerDebuggingDrone(net.minecraft.world.entity.player.Player player, IDroneBase e)
     
    static boolean
    isPlayerDebuggingDrone(net.minecraft.world.entity.player.Player player, AbstractDroneEntity e)
     
    static boolean
    isPlayerWearingAnyPneumaticArmor(net.minecraft.world.entity.player.Player player)
    Check if the player is wearing any pneumatic armor piece.
    static boolean
    isPneumaticArmorPiece(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.EquipmentSlot slot)
     
    boolean
    makesPiglinsNeutral(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity wearer)
     
    static void
    setCoordTrackerPos(net.minecraft.world.item.ItemStack helmetStack, net.minecraft.core.GlobalPos gPos)
     
    void
    setEyepieceColor(net.minecraft.world.item.ItemStack stack, int color)
     
    static void
    setSearchedItem(net.minecraft.world.item.ItemStack helmetStack, net.minecraft.world.item.Item searchedItem)
     
    void
    setSecondaryColor(net.minecraft.world.item.ItemStack stack, int color)
     
    boolean
    shouldShowCustomDurabilityBar(net.minecraft.world.item.ItemStack stack)
    Check if this item should be showing its custom bar at this time.

    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, 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.DyeableLeatherItem

    clearColor, hasCustomColor, setColor

    Methods inherited from interface net.minecraft.world.item.Equipable

    swapWithEquipmentSlot

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

    isEnabled

    Methods inherited from interface me.desht.pneumaticcraft.api.item.ICustomDurabilityBar

    isShowingOtherBar

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

    canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canEquip, canGrindstoneRepair, canPerformAction, createEntity, damageItem, doesSneakBypassUse, getAllEnchantments, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamaged, isNotReplaceableByPickAction, isPiglinCurrency, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation

    Methods inherited from interface me.desht.pneumaticcraft.api.pressure.IPressurizableItem

    getEffectiveVolume, getPressure
  • Field Details

  • Constructor Details

    • PneumaticArmorItem

      public PneumaticArmorItem(net.minecraft.world.item.ArmorItem.Type equipmentSlotIn)
  • Method Details

    • initCapabilities

      @Nullable public net.minecraftforge.common.capabilities.ICapabilityProvider initCapabilities(net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.nbt.CompoundTag nbt)
      Specified by:
      initCapabilities in interface net.minecraftforge.common.extensions.IForgeItem
    • initializeClient

      public void initializeClient(Consumer<net.minecraftforge.client.extensions.common.IClientItemExtensions> consumer)
      Overrides:
      initializeClient in class net.minecraft.world.item.Item
    • isPlayerWearingAnyPneumaticArmor

      public static boolean isPlayerWearingAnyPneumaticArmor(net.minecraft.world.entity.player.Player player)
      Check if the player is wearing any pneumatic armor piece.
      Parameters:
      player - the player
      Returns:
      true if the player is wearing pneumatic armor
    • isPneumaticArmorPiece

      public static boolean isPneumaticArmorPiece(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.EquipmentSlot slot)
    • getBaseVolume

      public int getBaseVolume()
      Description copied from interface: IPressurizableItem
      Get the base item volume before any volume upgrades are added.
      Specified by:
      getBaseVolume in interface IPressurizableItem
      Returns:
      the base volume
    • getVolumeUpgrades

      public int getVolumeUpgrades(net.minecraft.world.item.ItemStack stack)
      Description copied from interface: IPressurizableItem
      Get the number of volume upgrades currently in this ItemStack.
      Specified by:
      getVolumeUpgrades in interface IPressurizableItem
      Parameters:
      stack - the ItemStack to check
      Returns:
      the number of installed volume upgrades
    • getAir

      public int getAir(net.minecraft.world.item.ItemStack stack)
      Description copied from interface: IPressurizableItem
      Get the amount of air currently held in this ItemStack.
      Specified by:
      getAir in interface IPressurizableItem
      Parameters:
      stack - the ItemStack to check
      Returns:
      the amount of air, in mL
    • getMaxPressure

      public float getMaxPressure()
      Description copied from interface: IPressurizableItem
      Get the maximum pressure to which this item can be charged. Note that items (unlike machines) don't tend to explode when they reach their pressure limit; they just stop charging.
      Specified by:
      getMaxPressure in interface IPressurizableItem
      Returns:
      the maximum pressure for this item
    • getArmorTexture

      @Nullable 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
    • appendHoverText

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

      public boolean isFoil(net.minecraft.world.item.ItemStack stack)
      Overrides:
      isFoil in class net.minecraft.world.item.Item
    • getAttributeModifiers

      public com.google.common.collect.Multimap<net.minecraft.world.entity.ai.attributes.Attribute,net.minecraft.world.entity.ai.attributes.AttributeModifier> getAttributeModifiers(net.minecraft.world.entity.EquipmentSlot equipmentSlot, net.minecraft.world.item.ItemStack stack)
      Specified by:
      getAttributeModifiers in interface net.minecraftforge.common.extensions.IForgeItem
    • getShareTag

      @Nullable public net.minecraft.nbt.CompoundTag getShareTag(net.minecraft.world.item.ItemStack stack)
      Specified by:
      getShareTag in interface net.minecraftforge.common.extensions.IForgeItem
    • getIntData

      public static int getIntData(net.minecraft.world.item.ItemStack stack, String key, int def)
    • getIntData

      public static int getIntData(net.minecraft.world.item.ItemStack stack, String key, int def, int min, int max)
    • getBooleanData

      public static boolean getBooleanData(net.minecraft.world.item.ItemStack stack, String key, boolean def)
    • getSearchedItem

      public static net.minecraft.world.item.Item getSearchedItem(net.minecraft.world.item.ItemStack helmetStack)
    • setSearchedItem

      public static void setSearchedItem(net.minecraft.world.item.ItemStack helmetStack, net.minecraft.world.item.Item searchedItem)
    • getCoordTrackerPos

      public static net.minecraft.core.BlockPos getCoordTrackerPos(net.minecraft.world.item.ItemStack helmetStack, net.minecraft.world.level.Level world)
    • setCoordTrackerPos

      public static void setCoordTrackerPos(net.minecraft.world.item.ItemStack helmetStack, net.minecraft.core.GlobalPos gPos)
    • getEntityFilter

      public static String getEntityFilter(net.minecraft.world.item.ItemStack helmetStack)
    • isPlayerDebuggingDrone

      public static boolean isPlayerDebuggingDrone(net.minecraft.world.entity.player.Player player, AbstractDroneEntity e)
    • isPlayerDebuggingDrone

      public static boolean isPlayerDebuggingDrone(net.minecraft.world.entity.player.Player player, IDroneBase e)
    • getDebuggedDrone

      public static IDroneBase getDebuggedDrone()
      Client-side method to get the debugged drone or programmable controller
      Returns:
      the debugged whatever
    • getFOVModifier

      public float getFOVModifier(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.EquipmentSlot slot)
      Description copied from interface: IFOVModifierItem
      Get the FOV modifer for the given item stack. Lower values zoom in.
      Specified by:
      getFOVModifier in interface IFOVModifierItem
      Parameters:
      stack - the equipped item
      player - the player who has the item equipped
      slot - the equipment slot
      Returns:
      the FOV modifier
    • getContainerProvider

      public net.minecraft.world.MenuProvider getContainerProvider(ChargingStationBlockEntity te)
      Description copied from interface: IChargeableContainerProvider
      Get a container provider for this item
      Specified by:
      getContainerProvider in interface IChargeableContainerProvider
      Parameters:
      te - the charging station that the item is in
      Returns:
      the container provider
    • shouldShowCustomDurabilityBar

      public boolean shouldShowCustomDurabilityBar(net.minecraft.world.item.ItemStack stack)
      Description copied from interface: ICustomDurabilityBar
      Check if this item should be showing its custom bar at this time.
      Specified by:
      shouldShowCustomDurabilityBar in interface ICustomDurabilityBar
      Parameters:
      stack - the item stack
      Returns:
      true if the custom durability bar should be displayed, false otherwise
    • getCustomDurabilityColour

      public int getCustomDurabilityColour(net.minecraft.world.item.ItemStack stack)
      Description copied from interface: ICustomDurabilityBar
      Get the colour of the custom durability bar for this item, in RGB format (alpha will always be full)
      Specified by:
      getCustomDurabilityColour in interface ICustomDurabilityBar
      Parameters:
      stack - the item stack
      Returns:
      the colour to draw the custom durability bar
    • getCustomDurability

      public float getCustomDurability(net.minecraft.world.item.ItemStack stack)
      Description copied from interface: ICustomDurabilityBar
      Get the actual value for the custom durability of the item, which controls the width of the drawn bar.
      Specified by:
      getCustomDurability in interface ICustomDurabilityBar
      Parameters:
      stack - the item stack
      Returns:
      a durability value in the range 0.0F to 1.0F
    • getTintColor

      public int getTintColor(net.minecraft.world.item.ItemStack stack, int tintIndex)
      Specified by:
      getTintColor in interface ColorHandlers.ITintableItem
    • getColor

      public int getColor(net.minecraft.world.item.ItemStack stack)
      Specified by:
      getColor in interface net.minecraft.world.item.DyeableLeatherItem
    • makesPiglinsNeutral

      public boolean makesPiglinsNeutral(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity wearer)
      Specified by:
      makesPiglinsNeutral in interface net.minecraftforge.common.extensions.IForgeItem
    • isEnderMask

      public boolean isEnderMask(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.monster.EnderMan endermanEntity)
      Specified by:
      isEnderMask in interface net.minecraftforge.common.extensions.IForgeItem
    • canWalkOnPowderedSnow

      public boolean canWalkOnPowderedSnow(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity wearer)
      Specified by:
      canWalkOnPowderedSnow in interface net.minecraftforge.common.extensions.IForgeItem
    • isDamageable

      public boolean isDamageable(net.minecraft.world.item.ItemStack stack)
      Specified by:
      isDamageable in interface net.minecraftforge.common.extensions.IForgeItem
    • canElytraFly

      public boolean canElytraFly(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity)
      Specified by:
      canElytraFly in interface net.minecraftforge.common.extensions.IForgeItem
    • elytraFlightTick

      public boolean elytraFlightTick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity, int flightTicks)
      Specified by:
      elytraFlightTick in interface net.minecraftforge.common.extensions.IForgeItem
    • getSecondaryColor

      public int getSecondaryColor(net.minecraft.world.item.ItemStack stack)
      Get the overlay colour
      Parameters:
      stack - the armor piece
      Returns:
      the overlay colour in ARGB format
    • setSecondaryColor

      public void setSecondaryColor(net.minecraft.world.item.ItemStack stack, int color)
    • getEyepieceColor

      public int getEyepieceColor(net.minecraft.world.item.ItemStack stack)
    • setEyepieceColor

      public void setEyepieceColor(net.minecraft.world.item.ItemStack stack, int color)