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,net.minecraft.world.level.ItemLike,net.minecraftforge.common.extensions.IForgeItem
-
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, category, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappendHoverText(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 descriptionvoidfillItemCategory(net.minecraft.world.item.CreativeModeTab group, net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items) intgetBarColor(net.minecraft.world.item.ItemStack pStack) intgetBarWidth(net.minecraft.world.item.ItemStack pStack) 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 intgetEtchProgress(net.minecraft.world.item.ItemStack stack) booleanisBarVisible(net.minecraft.world.item.ItemStack pStack) booleanisShowingOtherBar(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.booleanonEntityItemUpdate(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entityItem) static voidsetEtchProgress(net.minecraft.world.item.ItemStack stack, int progress) 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.Item
allowedIn, asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getEquipSound, getFoodProperties, getId, getItemCategory, 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, shouldOverrideMultiplayerNbt, toString, use, useOn, useOnRelease, verifyTagAfterLoadMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreativeTabs, 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, onUsingTick, 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:NonDespawningItemallows items to add custom lines of information to the mouseover description- Overrides:
appendHoverTextin classNonDespawningItem
-
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:
isBarVisiblein classnet.minecraft.world.item.Item
-
getBarWidth
public int getBarWidth(net.minecraft.world.item.ItemStack pStack) - Overrides:
getBarWidthin classnet.minecraft.world.item.Item
-
getBarColor
public int getBarColor(net.minecraft.world.item.ItemStack pStack) - Overrides:
getBarColorin classnet.minecraft.world.item.Item
-
onEntityItemUpdate
public boolean onEntityItemUpdate(net.minecraft.world.item.ItemStack stack, net.minecraft.world.entity.item.ItemEntity entityItem) - Specified by:
onEntityItemUpdatein interfacenet.minecraftforge.common.extensions.IForgeItem- Overrides:
onEntityItemUpdatein classNonDespawningItem
-
fillItemCategory
public void fillItemCategory(net.minecraft.world.item.CreativeModeTab group, net.minecraft.core.NonNullList<net.minecraft.world.item.ItemStack> items) - Overrides:
fillItemCategoryin classnet.minecraft.world.item.Item
-
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
-
isShowingOtherBar
public boolean isShowingOtherBar(net.minecraft.world.item.ItemStack stack) Description copied from interface:ICustomDurabilityBarIs 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:
isShowingOtherBarin interfaceICustomDurabilityBar- Parameters:
stack- the item stack- Returns:
- true if the item will already be showing a normal durability bar
-