Class ComponentItem
java.lang.Object
net.minecraft.world.item.Item
net.ixdarklord.coolcatcore.api.item.ComponentItem
- All Implemented Interfaces:
net.minecraft.world.flag.FeatureElement,net.minecraft.world.level.ItemLike
public class ComponentItem
extends net.minecraft.world.item.Item
-
Nested Class Summary
Nested ClassesNested 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, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZEFields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES -
Constructor Summary
ConstructorsConstructorDescriptionComponentItem(net.minecraft.world.item.Item.Properties properties, ComponentItem.ComponentType componentType) -
Method Summary
Modifier and TypeMethodDescriptionvoidappendHoverText(net.minecraft.world.item.ItemStack stack, @Nullable net.minecraft.world.level.Level level, List<net.minecraft.network.chat.Component> tooltipComponents, net.minecraft.world.item.TooltipFlag tooltipFlag) booleanintbooleanisShiftButtonNotPressed(@Nullable Consumer<net.minecraft.network.chat.Component> tooltipComponents) static voidonTooltip(net.minecraft.world.item.ItemStack stack, List<net.minecraft.network.chat.Component> tooltipComponents) Appends the component type to the tooltip's name line whenappendToName()is set.Methods inherited from class net.minecraft.world.item.Item
asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getEnchantmentValue, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, 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.minecraft.world.flag.FeatureElement
isEnabled
-
Constructor Details
-
ComponentItem
public ComponentItem(net.minecraft.world.item.Item.Properties properties, ComponentItem.ComponentType componentType)
-
-
Method Details
-
appendHoverText
public void appendHoverText(net.minecraft.world.item.ItemStack stack, @Nullable @Nullable net.minecraft.world.level.Level level, List<net.minecraft.network.chat.Component> tooltipComponents, net.minecraft.world.item.TooltipFlag tooltipFlag) - Overrides:
appendHoverTextin classnet.minecraft.world.item.Item
-
onTooltip
public static void onTooltip(net.minecraft.world.item.ItemStack stack, List<net.minecraft.network.chat.Component> tooltipComponents) Appends the component type to the tooltip's name line whenappendToName()is set. Each loader's client tooltip event calls this with the full tooltip line list, once the item's own lines are in. -
appendToName
public boolean appendToName() -
getSplitterLength
public int getSplitterLength() -
isShiftButtonNotPressed
public boolean isShiftButtonNotPressed(@Nullable @Nullable Consumer<net.minecraft.network.chat.Component> tooltipComponents)
-