net.minecraft.world.item.component

public record Consumable

cyw
net.minecraft.world.item.component.Consumable
net.minecraft.class_10124
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
consumeSeconds
f_346490_
private final ItemUseAnimation
e
animation
comp_3086
useAction
f_348643_
private final Holder<SoundEvent>
f
sound
comp_3087
sound
f_346592_
private final boolean
g
hasConsumeParticles
comp_3088
hasConsumeParticles
f_348304_
private final List<ConsumeEffect>
h
onConsumeEffects
comp_3089
onConsumeEffects
f_347156_
public static final float
a
DEFAULT_CONSUME_SECONDS
field_53769
DEFAULT_CONSUME_SECONDS
f_346555_
private static final int
i
CONSUME_EFFECTS_INTERVAL
field_53772
PARTICLES_AND_SOUND_TICK_INTERVAL
f_346421_
private static final float
j
CONSUME_EFFECTS_START_FRACTION
field_53773
PARTICLES_AND_SOUND_TICK_THRESHOLD
f_348435_
public static final com.mojang.serialization.Codec<Consumable>
b
CODEC
field_53770
CODEC
f_348058_
public static final StreamCodec<RegistryFriendlyByteBuf, Consumable>
c
STREAM_CODEC
field_53771
PACKET_CODEC
f_346569_

Constructor summary

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

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)
consume(LivingEntity user, 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)
finishConsumption(World world, LivingEntity user, 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)
canConsume(LivingEntity user, ItemStack stack)
m_353816_(C_524_ p_367934_, C_1391_ arg1)
public int
a()
consumeTicks()
method_62841()
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)
spawnParticlesAndPlaySound(Random random, LivingEntity user, 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)
shouldSpawnParticlesAndPlaySounds(int remainingUseTicks)
m_354174_(int arg0)
public static Consumable$Builder
b()
builder()
method_62850()
builder()
m_354046_()
public float
c()
consumeSeconds()
comp_3085()
consumeSeconds()
f_346490_()
public ItemUseAnimation
d()
animation()
comp_3086()
useAction()
f_348643_()
public Holder<SoundEvent>
e()
sound()
comp_3087()
sound()
f_346592_()
public boolean
f()
hasConsumeParticles()
comp_3088()
hasConsumeParticles()
f_348304_()
public List<ConsumeEffect>
g()
onConsumeEffects()
comp_3089()
onConsumeEffects()
f_347156_()