net.minecraft.world.item.component

public record Consumable

czv
net.minecraft.world.item.component.Consumable
net.minecraft.class_10124
net.minecraft.component.type.ConsumableComponent
net.minecraft.world.item.component.Consumable

Field summary

Modifier and TypeField
private final float
d
consumeSeconds
comp_3085
consumeSeconds
private final ItemUseAnimation
e
animation
comp_3086
useAction
private final Holder<SoundEvent>
f
sound
comp_3087
sound
private final boolean
g
hasConsumeParticles
comp_3088
hasConsumeParticles
private final List<ConsumeEffect>
h
onConsumeEffects
comp_3089
onConsumeEffects
public static final float
a
DEFAULT_CONSUME_SECONDS
field_53769
DEFAULT_CONSUME_SECONDS
private static final int
i
CONSUME_EFFECTS_INTERVAL
field_53772
PARTICLES_AND_SOUND_TICK_INTERVAL
private static final float
j
CONSUME_EFFECTS_START_FRACTION
field_53773
PARTICLES_AND_SOUND_TICK_THRESHOLD
public static final com.mojang.serialization.Codec<Consumable>
b
CODEC
field_53770
CODEC
public static final StreamCodec<RegistryFriendlyByteBuf, Consumable>
c
STREAM_CODEC
field_53771
PACKET_CODEC

Constructor summary

ModifierConstructor
public (float arg0, ItemUseAnimation arg1, Holder<SoundEvent> arg2, boolean arg3, List<ConsumeEffect> arg4)

Method summary

Modifier and TypeMethod
public InteractionResult
a(bwg arg0, cxp arg1, bti 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)
public ItemStack
a(dhi arg0, bwg arg1, cxp 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)
public boolean
a(bwg arg0, cxp arg1)
canConsume(LivingEntity arg0, ItemStack arg1)
method_62844(class_1309 arg0, class_1799 arg1)
canConsume(LivingEntity user, ItemStack stack)
public int
a()
consumeTicks()
method_62841()
getConsumeTicks()
public void
a(bam arg0, bwg arg1, cxp 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)
public boolean
a(int arg0)
shouldEmitParticlesAndSounds(int arg0)
method_62842(int arg0)
shouldSpawnParticlesAndPlaySounds(int remainingUseTicks)
public static Consumable$Builder
b()
builder()
method_62850()
builder()
public float
c()
consumeSeconds()
comp_3085()
consumeSeconds()
public ItemUseAnimation
d()
animation()
comp_3086()
useAction()
public Holder<SoundEvent>
e()
sound()
comp_3087()
sound()
public boolean
f()
hasConsumeParticles()
comp_3088()
hasConsumeParticles()
public List<ConsumeEffect>
g()
onConsumeEffects()
comp_3089()
onConsumeEffects()