Package net.minecraft.world.item
Class RecordItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.RecordItem
- All Implemented Interfaces:
- FeatureElement,- ItemLike,- IForgeItem
- 
Nested Class SummaryNested classes/interfaces inherited from class net.minecraft.world.item.ItemItem.Properties
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final intprivate static final Map<SoundEvent,RecordItem> Deprecated.private final intprivate final SoundEventDeprecated.private final Supplier<SoundEvent>Fields inherited from class net.minecraft.world.item.ItemBASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZEFields inherited from interface net.minecraft.world.flag.FeatureElementFILTERED_REGISTRIES
- 
Constructor SummaryConstructorsConstructorDescriptionRecordItem(int comparatorValue, Supplier<SoundEvent> soundSupplier, Item.Properties builder, int lengthInTicks) For mod use, allows to create a music disc without having to create a new SoundEvent before their registry event is fired.RecordItem(int p_239614_, SoundEvent p_239615_, Item.Properties p_239616_, int p_239617_) Deprecated.
- 
Method SummaryModifier and TypeMethodDescriptionvoidappendHoverText(ItemStack p_43043_, Level p_43044_, List<Component> p_43045_, TooltipFlag p_43046_) intstatic RecordItemgetBySound(SoundEvent p_43041_) intgetSound()useOn(UseOnContext p_43048_) Methods inherited from class net.minecraft.world.item.ItemasItem, 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, getRenderPropertiesInternal, getTooltipImage, getUseAnimation, getUseDuration, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, releaseUsing, requiredFeatures, shouldOverrideMultiplayerNbt, toString, use, useOnRelease, verifyTagAfterLoadMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.world.flag.FeatureElementisEnabledMethods inherited from interface net.minecraftforge.common.extensions.IForgeItemcanApplyAtEnchantingTable, 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, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onInventoryTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
- 
Field Details- 
BY_NAMEDeprecated.
- 
analogOutputprivate final int analogOutput
- 
soundDeprecated.
- 
lengthInTicksprivate final int lengthInTicks
- 
soundSupplier
 
- 
- 
Constructor Details- 
RecordItem@Deprecated public RecordItem(int p_239614_, SoundEvent p_239615_, Item.Properties p_239616_, int p_239617_) Deprecated.
- 
RecordItempublic RecordItem(int comparatorValue, Supplier<SoundEvent> soundSupplier, Item.Properties builder, int lengthInTicks) For mod use, allows to create a music disc without having to create a new SoundEvent before their registry event is fired.- Parameters:
- comparatorValue- The value this music disc should output on the comparator. Must be between 0 and 15.
- soundSupplier- A supplier that provides the sound that should be played. Use a- RegistryObject<SoundEvent>or a- Holder<SoundEvent>for this parameter.
- builder- A set of- Item.Propertiesthat describe this item.
- lengthInTicks- The length of the music disc track in ticks.
 
 
- 
- 
Method Details- 
useOn
- 
getAnalogOutputpublic int getAnalogOutput()
- 
appendHoverTextpublic void appendHoverText(ItemStack p_43043_, @Nullable Level p_43044_, List<Component> p_43045_, TooltipFlag p_43046_) - Overrides:
- appendHoverTextin class- Item
 
- 
getDisplayName
- 
getBySound
- 
getSound
- 
getLengthInTickspublic int getLengthInTicks()
 
-