net.minecraft.world.item.component

public record Consumable

dbi
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

Field summary

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

Constructor summary

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

Method summary

Modifier and TypeMethod
public InteractionResult
a(bxe arg0, czd arg1, buc 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)
public ItemStack
a(dja arg0, bxe arg1, czd 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)
public boolean
a(bxe arg0, czd 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)
public int
a()
consumeTicks()
method_62841()
m_ctgbsdpu()
getConsumeTicks()
getConsumeTicks()
public void
a(azv arg0, bxe arg1, czd 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)
public boolean
a(int arg0)
shouldEmitParticlesAndSounds(int arg0)
method_62842(int arg0)
m_frzjixnv(int arg0)
shouldSpawnParticlesAndPlaySounds(int remainingUseTicks)
shouldPlayConsumingEffects(int remainingUseTicks)
public static Consumable$Builder
b()
builder()
method_62850()
m_azsrxogi()
builder()
builder()
public float
c()
consumeSeconds()
comp_3085()
m_zoqatelj()
consumeSeconds()
consumeSeconds()
public ItemUseAnimation
d()
animation()
comp_3086()
m_wskwrszl()
useAction()
animation()
public Holder<SoundEvent>
e()
sound()
comp_3087()
m_lvcrvcnz()
sound()
sound()
public boolean
f()
hasConsumeParticles()
comp_3088()
m_iyhazjos()
hasConsumeParticles()
hasConsumeParticles()
public List<ConsumeEffect>
g()
onConsumeEffects()
comp_3089()
m_fcyytzpl()
onConsumeEffects()
effects()