Class PneumaticArmorItem
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<net.minecraft.world.item.Item>
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.item.DyeableLeatherItem,net.minecraft.world.item.Vanishable,net.minecraft.world.item.Wearable,net.minecraft.world.level.ItemLike,net.minecraftforge.common.extensions.IForgeItem,net.minecraftforge.registries.IForgeRegistryEntry<net.minecraft.world.item.Item>
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.Item
net.minecraft.world.item.Item.PropertiesNested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
net.minecraftforge.registries.ForgeRegistryEntry.UncheckedRegistryEntry<V extends net.minecraftforge.registries.IForgeRegistryEntry<V>>Nested classes/interfaces inherited from interface me.desht.pneumaticcraft.common.item.IChargeableContainerProvider
IChargeableContainerProvider.Provider -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class net.minecraft.world.item.ArmorItem
DISPENSE_ITEM_BEHAVIOR, knockbackResistance, material, slotFields inherited from class net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, category, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZEFields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegateFields inherited from interface net.minecraft.world.item.DyeableLeatherItem
DEFAULT_LEATHER_COLOR, TAG_COLOR, TAG_DISPLAY -
Constructor Summary
ConstructorsConstructorDescriptionPneumaticArmorItem(net.minecraft.world.entity.EquipmentSlot equipmentSlotIn) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendHoverText(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) booleancanElytraFly(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) booleancanWalkOnPowderedSnow(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity wearer) booleanelytraFlightTick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity, int flightTicks) intgetAir(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) intGet the base item volume before any volume upgrades are added.static booleangetBooleanData(net.minecraft.world.item.ItemStack stack, String key, boolean def) intgetColor(net.minecraft.world.item.ItemStack stack) net.minecraft.world.MenuProviderGet a container provider for this itemstatic net.minecraft.core.BlockPosgetCoordTrackerPos(net.minecraft.world.item.ItemStack helmetStack, net.minecraft.world.level.Level world) floatgetCustomDurability(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.intgetCustomDurabilityColour(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 IDroneBaseClient-side method to get the debugged drone or programmable controllerstatic StringgetEntityFilter(net.minecraft.world.item.ItemStack helmetStack) intgetEyepieceColor(net.minecraft.world.item.ItemStack stack) floatgetFOVModifier(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 intgetIntData(net.minecraft.world.item.ItemStack stack, String key, int def) static intgetIntData(net.minecraft.world.item.ItemStack stack, String key, int def, int min, int max) static net.minecraft.world.item.ItemgetSearchedItem(net.minecraft.world.item.ItemStack helmetStack) intgetSecondaryColor(net.minecraft.world.item.ItemStack stack) Get the overlay colournet.minecraft.nbt.CompoundTaggetShareTag(net.minecraft.world.item.ItemStack stack) intgetTintColor(net.minecraft.world.item.ItemStack stack, int tintIndex) intgetVolumeUpgrades(net.minecraft.world.item.ItemStack stack) Get the number of volume upgrades currently in this ItemStack.net.minecraftforge.common.capabilities.ICapabilityProviderinitCapabilities(net.minecraft.world.item.ItemStack stack, net.minecraft.nbt.CompoundTag nbt) voidinitializeClient(Consumer<net.minecraftforge.client.IItemRenderProperties> consumer) booleanisDamageable(net.minecraft.world.item.ItemStack stack) booleanisEnderMask(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.monster.EnderMan endermanEntity) booleanisFoil(net.minecraft.world.item.ItemStack stack) static booleanisPlayerDebuggingDrone(net.minecraft.world.entity.player.Player player, IDroneBase e) static booleanisPlayerDebuggingDrone(net.minecraft.world.entity.player.Player player, AbstractDroneEntity e) static booleanisPlayerWearingAnyPneumaticArmor(net.minecraft.world.entity.player.Player player) Check if the player is wearing any pneumatic armor piece.static booleanisPneumaticArmorPiece(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.EquipmentSlot slot) booleanmakesPiglinsNeutral(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity wearer) static voidsetCoordTrackerPos(net.minecraft.world.item.ItemStack helmetStack, net.minecraft.core.GlobalPos gPos) voidsetEyepieceColor(net.minecraft.world.item.ItemStack stack, int color) static voidsetSearchedItem(net.minecraft.world.item.ItemStack helmetStack, net.minecraft.world.item.Item searchedItem) voidsetSecondaryColor(net.minecraft.world.item.ItemStack stack, int color) booleanshouldShowCustomDurabilityBar(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, getEquipSound, getMaterial, getSlot, getToughness, isValidRepairItem, useMethods inherited from class net.minecraft.world.item.Item
allowdedIn, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, fillItemCategory, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getFoodProperties, getId, getItemCategory, 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, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoadMethods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.item.DyeableLeatherItem
clearColor, hasCustomColor, setColorMethods inherited from interface me.desht.pneumaticcraft.api.item.ICustomDurabilityBar
isShowingOtherBarMethods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canEquip, canPerformAction, createEntity, damageItem, doesSneakBypassUse, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getItemEnchantability, getItemStackLimit, getMaxDamage, getSweepHitBox, getXpRepairRatio, hasContainerItem, hasCustomEntity, isBookEnchantable, isCorrectToolForDrops, isDamaged, isPiglinCurrency, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimationMethods inherited from interface me.desht.pneumaticcraft.api.pressure.IPressurizableItem
getEffectiveVolume, getPressure
-
Field Details
-
NBT_SEARCH_ITEM
- See Also:
-
NBT_COORD_TRACKER
- See Also:
-
NBT_ENTITY_FILTER
- See Also:
-
NBT_JUMP_BOOST
- See Also:
-
NBT_SPEED_BOOST
- See Also:
-
NBT_BUILDER_MODE
- See Also:
-
NBT_JET_BOOTS_POWER
- See Also:
-
NBT_FLIGHT_STABILIZERS
- See Also:
-
NBT_SMART_HOVER
- See Also:
-
DEFAULT_PRIMARY_COLOR
public static final int DEFAULT_PRIMARY_COLOR- See Also:
-
DEFAULT_SECONDARY_COLOR
public static final int DEFAULT_SECONDARY_COLOR- See Also:
-
DEFAULT_EYEPIECE_COLOR
public static final int DEFAULT_EYEPIECE_COLOR- See Also:
-
-
Constructor Details
-
PneumaticArmorItem
public PneumaticArmorItem(net.minecraft.world.entity.EquipmentSlot 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:
initCapabilitiesin interfacenet.minecraftforge.common.extensions.IForgeItem
-
initializeClient
- Overrides:
initializeClientin classnet.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:IPressurizableItemGet the base item volume before any volume upgrades are added.- Specified by:
getBaseVolumein interfaceIPressurizableItem- Returns:
- the base volume
-
getVolumeUpgrades
public int getVolumeUpgrades(net.minecraft.world.item.ItemStack stack) Description copied from interface:IPressurizableItemGet the number of volume upgrades currently in this ItemStack.- Specified by:
getVolumeUpgradesin interfaceIPressurizableItem- 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:IPressurizableItemGet the amount of air currently held in this ItemStack.- Specified by:
getAirin interfaceIPressurizableItem- Parameters:
stack- the ItemStack to check- Returns:
- the amount of air, in mL
-
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:
getArmorTexturein interfacenet.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:
appendHoverTextin classnet.minecraft.world.item.Item
-
isFoil
public boolean isFoil(net.minecraft.world.item.ItemStack stack) - Overrides:
isFoilin classnet.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:
getAttributeModifiersin interfacenet.minecraftforge.common.extensions.IForgeItem
-
getIntData
-
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
-
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
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:IFOVModifierItemGet the FOV modifer for the given item stack. Lower values zoom in.- Specified by:
getFOVModifierin interfaceIFOVModifierItem- Parameters:
stack- the equipped itemplayer- the player who has the item equippedslot- the equipment slot- Returns:
- the FOV modifier
-
getContainerProvider
Description copied from interface:IChargeableContainerProviderGet a container provider for this item- Specified by:
getContainerProviderin interfaceIChargeableContainerProvider- 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:ICustomDurabilityBarCheck if this item should be showing its custom bar at this time.- Specified by:
shouldShowCustomDurabilityBarin interfaceICustomDurabilityBar- 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:ICustomDurabilityBarGet the colour of the custom durability bar for this item, in RGB format (alpha will always be full)- Specified by:
getCustomDurabilityColourin interfaceICustomDurabilityBar- 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:ICustomDurabilityBarGet the actual value for the custom durability of the item, which controls the width of the drawn bar.- Specified by:
getCustomDurabilityin interfaceICustomDurabilityBar- 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:
getTintColorin interfaceColorHandlers.ITintableItem
-
getColor
public int getColor(net.minecraft.world.item.ItemStack stack) - Specified by:
getColorin interfacenet.minecraft.world.item.DyeableLeatherItem
-
makesPiglinsNeutral
public boolean makesPiglinsNeutral(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity wearer) - Specified by:
makesPiglinsNeutralin interfacenet.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:
isEnderMaskin interfacenet.minecraftforge.common.extensions.IForgeItem
-
canWalkOnPowderedSnow
public boolean canWalkOnPowderedSnow(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity wearer) - Specified by:
canWalkOnPowderedSnowin interfacenet.minecraftforge.common.extensions.IForgeItem
-
isDamageable
public boolean isDamageable(net.minecraft.world.item.ItemStack stack) - Specified by:
isDamageablein interfacenet.minecraftforge.common.extensions.IForgeItem
-
canElytraFly
public boolean canElytraFly(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity) - Specified by:
canElytraFlyin interfacenet.minecraftforge.common.extensions.IForgeItem
-
elytraFlightTick
public boolean elytraFlightTick(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.LivingEntity entity, int flightTicks) - Specified by:
elytraFlightTickin interfacenet.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)
-