net.minecraft.world.item.component

public record Consumable

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

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
effects
f_347156_
public static final float
a
DEFAULT_CONSUME_SECONDS
field_53769
f_nwvcjaqb
DEFAULT_CONSUME_SECONDS
DEFAULT_CONSUME_SECONDS
f_346555_
private static final int
i
CONSUME_EFFECTS_INTERVAL
field_53772
f_fhxjpnlc
PARTICLES_AND_SOUND_TICK_INTERVAL
PLAY_CONSUMING_EFFECTS_INTERVAL
f_346421_
private static final float
j
CONSUME_EFFECTS_START_FRACTION
field_53773
f_slfuclml
PARTICLES_AND_SOUND_TICK_THRESHOLD
START_PLAYING_CONSUMING_EFFECTS_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> effects)

Method summary

Modifier and TypeMethod
public InteractionResult
a(bvi arg0, cwq arg1, bsk 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)
onUse(LivingEntity entity, ItemStack stack, Hand hand)
m_352451_(C_524_ p_368269_, C_1391_ p_364933_, C_470_ arg2)
public ItemStack
a(dgj arg0, bvi arg1, cwq 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)
consume(World world, LivingEntity entity, ItemStack stack)
m_356253_(C_1596_ p_363286_, C_524_ p_367304_, C_1391_ arg2)
public boolean
a(bvi arg0, cwq 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)
canConsume(LivingEntity entity, ItemStack stack)
m_353816_(C_524_ p_367934_, C_1391_ arg1)
public int
a()
consumeTicks()
method_62841()
m_ctgbsdpu()
getConsumeTicks()
getConsumeTicks()
m_355968_()
public void
a(azh arg0, bvi arg1, cwq 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)
playConsumeEffects(RandomGenerator random, LivingEntity entity, ItemStack stack, int particleCount)
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)
shouldPlayConsumingEffects(int remainingUseTicks)
m_354174_(int arg0)
public static Consumable$Builder
b()
builder()
method_62850()
m_azsrxogi()
builder()
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()
effects()
f_347156_()