net.minecraft.world.item.component

public record Consumable

czu
net.minecraft.world.item.component.Consumable
net.minecraft.class_10124
net.minecraft.unmapped.C_ybwnbwdi
net.minecraft.component.type.ConsumableComponent
net.minecraft.item.ConsumableComponent
net.minecraft.src.C_345888_
net.minecraft.world.item.component.ChargedProjectiles

Field summary

Modifier and TypeField
private final float
d
consumeSeconds
comp_3085
f_ufsmneua
consumeSeconds
consumeSeconds
f_346490_
private final ItemUseAnimation
e
animation
comp_3086
f_clfaafdk
useAction
animation
f_348643_
private final Holder<SoundEvent>
f
sound
comp_3087
f_aeyuouga
sound
sound
f_346592_
private final boolean
g
hasConsumeParticles
comp_3088
f_mrptxzly
hasConsumeParticles
hasConsumeParticles
f_348304_
private final List<ConsumeEffect>
h
onConsumeEffects
comp_3089
f_wghiuzdn
onConsumeEffects
onConsumeEffects
f_347156_
public static final float
a
DEFAULT_CONSUME_SECONDS
field_53769
f_nwvcjaqb
DEFAULT_CONSUME_SECONDS
f_346555_
private static final int
i
CONSUME_EFFECTS_INTERVAL
field_53772
f_fhxjpnlc
PARTICLES_AND_SOUND_TICK_INTERVAL
f_346421_
private static final float
j
CONSUME_EFFECTS_START_FRACTION
field_53773
f_slfuclml
PARTICLES_AND_SOUND_TICK_THRESHOLD
f_348435_
public static final com.mojang.serialization.Codec<Consumable>
b
CODEC
field_53770
f_iiwumbzm
CODEC
CODEC
f_348058_
public static final StreamCodec<RegistryFriendlyByteBuf, Consumable>
c
STREAM_CODEC
field_53771
f_ruesyysm
PACKET_CODEC
PACKET_CODEC
f_346569_

Constructor summary

ModifierConstructor
public (float consumeSeconds, ItemUseAnimation animation, Holder<SoundEvent> sound, boolean hasConsumeParticles, List<ConsumeEffect> onConsumeEffects)

Method summary

Modifier and TypeMethod
public InteractionResult
a(bwf arg0, cxo arg1, bth arg2)
startConsuming(LivingEntity arg0, ItemStack arg1, InteractionHand arg2)
method_62845(class_1309 arg0, class_1799 arg1, class_1268 arg2)
m_tlnulagg(C_usxaxydn arg0, C_sddaxwyk arg1, C_laxmzoqs arg2)
consume(LivingEntity user, ItemStack stack, Hand hand)
m_tlnulagg(LivingEntity entity, ItemStack stack, Hand arg2)
m_352451_(C_524_ p_368269_, C_1391_ p_364933_, C_470_ arg2)
public ItemStack
a(dhh arg0, bwf arg1, cxo arg2)
onConsume(Level arg0, LivingEntity arg1, ItemStack arg2)
method_62847(class_1937 arg0, class_1309 arg1, class_1799 arg2)
m_zlmhvbte(C_cdctfzbn arg0, C_usxaxydn arg1, C_sddaxwyk arg2)
finishConsumption(World world, LivingEntity user, ItemStack stack)
m_zlmhvbte(World world, LivingEntity entity, ItemStack stack)
m_356253_(C_1596_ p_363286_, C_524_ p_367304_, C_1391_ arg2)
public boolean
a(bwf arg0, cxo arg1)
canConsume(LivingEntity arg0, ItemStack arg1)
method_62844(class_1309 arg0, class_1799 arg1)
m_teiwvlig(C_usxaxydn arg0, C_sddaxwyk arg1)
canConsume(LivingEntity user, ItemStack stack)
m_teiwvlig(LivingEntity entity, ItemStack stack)
m_353816_(C_524_ p_367934_, C_1391_ arg1)
public int
a()
consumeTicks()
method_62841()
m_ctgbsdpu()
getConsumeTicks()
m_355968_()
public void
a(bam arg0, bwf arg1, cxo arg2, int arg3)
emitParticlesAndSounds(RandomSource arg0, LivingEntity arg1, ItemStack arg2, int arg3)
method_62843(class_5819 arg0, class_1309 arg1, class_1799 arg2, int arg3)
m_qqhcmwrv(C_rlomrsco arg0, C_usxaxydn arg1, C_sddaxwyk arg2, int arg3)
spawnParticlesAndPlaySound(Random random, LivingEntity user, ItemStack stack, int particleCount)
m_qqhcmwrv(RandomGenerator random, LivingEntity entity, ItemStack stack, int arg3)
m_353588_(C_212974_ p_365515_, C_524_ p_366278_, C_1391_ p_361912_, int arg3)
public boolean
a(int arg0)
shouldEmitParticlesAndSounds(int arg0)
method_62842(int arg0)
m_frzjixnv(int arg0)
shouldSpawnParticlesAndPlaySounds(int remainingUseTicks)
m_354174_(int arg0)
public static Consumable$Builder
b()
builder()
method_62850()
m_azsrxogi()
builder()
m_354046_()
public float
c()
consumeSeconds()
comp_3085()
m_zoqatelj()
consumeSeconds()
consumeSeconds()
f_346490_()
public ItemUseAnimation
d()
animation()
comp_3086()
m_wskwrszl()
useAction()
animation()
f_348643_()
public Holder<SoundEvent>
e()
sound()
comp_3087()
m_lvcrvcnz()
sound()
sound()
f_346592_()
public boolean
f()
hasConsumeParticles()
comp_3088()
m_iyhazjos()
hasConsumeParticles()
hasConsumeParticles()
f_348304_()
public List<ConsumeEffect>
g()
onConsumeEffects()
comp_3089()
m_fcyytzpl()
onConsumeEffects()
onConsumeEffects()
f_347156_()