Class EmptyPCBItem

java.lang.Object
net.minecraft.world.item.Item
me.desht.pneumaticcraft.common.item.NonDespawningItem
me.desht.pneumaticcraft.common.item.EmptyPCBItem
All Implemented Interfaces:
ICustomDurabilityBar, CreativeTabStackProvider, net.minecraft.world.flag.FeatureElement, net.minecraft.world.level.ItemLike, net.minecraftforge.common.extensions.IForgeItem

public class EmptyPCBItem extends NonDespawningItem implements ICustomDurabilityBar, CreativeTabStackProvider
  • Nested Class Summary

    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.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
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level player, List<net.minecraft.network.chat.Component> infoList, net.minecraft.world.item.TooltipFlag par4)
    allows items to add custom lines of information to the mouseover description
    int
    getBarColor(net.minecraft.world.item.ItemStack pStack)
     
    int
    getBarWidth(net.minecraft.world.item.ItemStack pStack)
     
    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 int
    getEtchProgress(net.minecraft.world.item.ItemStack stack)
     
    net.minecraft.world.item.ItemStack
    Returns an itemstack for the item produced on failed etching in the Etching Tank.
    Stream<net.minecraft.world.item.ItemStack>
     
    net.minecraft.world.item.ItemStack
    Returns an itemstack for the item produced on successful etching in the Etching Tank.
    boolean
    isBarVisible(net.minecraft.world.item.ItemStack pStack)
     
    boolean
    isShowingOtherBar(net.minecraft.world.item.ItemStack stack)
    Is this item already showing a regular durability bar? This controls if the custom bar needs a small Y offset so both bars can be seen.
    boolean
    onEntityItemUpdate(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entityItem)
     
    static void
    setEtchProgress(net.minecraft.world.item.ItemStack stack, int progress)
     
    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.Item

    asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, 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.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, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
  • Constructor Details

    • EmptyPCBItem

      public EmptyPCBItem()
  • Method Details

    • appendHoverText

      public void appendHoverText(net.minecraft.world.item.ItemStack stack, net.minecraft.world.level.Level player, List<net.minecraft.network.chat.Component> infoList, net.minecraft.world.item.TooltipFlag par4)
      Description copied from class: NonDespawningItem
      allows items to add custom lines of information to the mouseover description
      Overrides:
      appendHoverText in class NonDespawningItem
    • getEtchProgress

      public static int getEtchProgress(net.minecraft.world.item.ItemStack stack)
    • setEtchProgress

      public static void setEtchProgress(net.minecraft.world.item.ItemStack stack, int progress)
    • isBarVisible

      public boolean isBarVisible(net.minecraft.world.item.ItemStack pStack)
      Overrides:
      isBarVisible in class net.minecraft.world.item.Item
    • getBarWidth

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

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

      public boolean onEntityItemUpdate(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entityItem)
      Specified by:
      onEntityItemUpdate in interface net.minecraftforge.common.extensions.IForgeItem
      Overrides:
      onEntityItemUpdate in class NonDespawningItem
    • 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
    • isShowingOtherBar

      public boolean isShowingOtherBar(net.minecraft.world.item.ItemStack stack)
      Description copied from interface: ICustomDurabilityBar
      Is this item already showing a regular durability bar? This controls if the custom bar needs a small Y offset so both bars can be seen. If the regular bar is being shown, the custom bar will be directly above it; if it is not being shown, the custom bar will be drawn in its place.
      Specified by:
      isShowingOtherBar in interface ICustomDurabilityBar
      Parameters:
      stack - the item stack
      Returns:
      true if the item will already be showing a normal durability bar
    • getStacksForItem

      public Stream<net.minecraft.world.item.ItemStack> getStacksForItem()
      Specified by:
      getStacksForItem in interface CreativeTabStackProvider
    • getSuccessItem

      public net.minecraft.world.item.ItemStack getSuccessItem()
      Returns an itemstack for the item produced on successful etching in the Etching Tank.
      Returns:
      an itemstack for the item produced on successful etching in the Etching Tank
    • getFailedItem

      public net.minecraft.world.item.ItemStack getFailedItem()
      Returns an itemstack for the item produced on failed etching in the Etching Tank.
      Returns:
      an itemstack for the item produced on failed etching in the Etching Tank