Interface IDecayingItem

All Known Implementing Classes:
ConfiguredDecayingItem, DecayingItem, SimpleDecayProductItem

public interface IDecayingItem
  • Method Summary

    Modifier and Type
    Method
    Description
    default boolean
    areDecayTimesCombineable(net.minecraft.world.item.ItemStack stack1, net.minecraft.world.item.ItemStack stack2)
     
    static net.minecraft.world.item.ItemStack
    checkDecay(net.minecraft.world.item.ItemStack stack)
     
    static void
    extendLifetime(net.minecraft.world.item.ItemStack decayingItemStack, int additionalLifetime)
     
    net.minecraft.world.item.ItemStack
    getDecayProduct(net.minecraft.world.item.ItemStack stack)
    Get the Item Stack into which the decaying Item Stack decays.
    default String
    getDecayTimeTranslationKey(net.minecraft.world.item.ItemStack stack)
     
    long
    getLifetime(net.minecraft.world.item.ItemStack stack)
    Get the total lifetime in ticks of an Item Stack, not considering the current time it has been alive.
    static long
    getRemainingTime(IDecayingItem decayingItem, net.minecraft.world.item.ItemStack decayingItemStack, net.minecraft.nbt.CompoundTag decayingItemTag)
     
    static void
    startDecay(net.minecraft.world.item.ItemStack stack)
     
    static void
    startDecay(net.minecraft.world.item.ItemStack stack, long timeElapsed)
     
  • Method Details

    • getDecayProduct

      net.minecraft.world.item.ItemStack getDecayProduct(net.minecraft.world.item.ItemStack stack)
      Get the Item Stack into which the decaying Item Stack decays.
      Parameters:
      stack -
    • getLifetime

      long getLifetime(net.minecraft.world.item.ItemStack stack)
      Get the total lifetime in ticks of an Item Stack, not considering the current time it has been alive.
      Parameters:
      stack -
    • areDecayTimesCombineable

      default boolean areDecayTimesCombineable(net.minecraft.world.item.ItemStack stack1, net.minecraft.world.item.ItemStack stack2)
    • getDecayTimeTranslationKey

      default String getDecayTimeTranslationKey(net.minecraft.world.item.ItemStack stack)
    • checkDecay

      static net.minecraft.world.item.ItemStack checkDecay(net.minecraft.world.item.ItemStack stack)
    • getRemainingTime

      static long getRemainingTime(IDecayingItem decayingItem, net.minecraft.world.item.ItemStack decayingItemStack, net.minecraft.nbt.CompoundTag decayingItemTag)
    • startDecay

      static void startDecay(net.minecraft.world.item.ItemStack stack)
    • startDecay

      static void startDecay(net.minecraft.world.item.ItemStack stack, long timeElapsed)
    • extendLifetime

      static void extendLifetime(net.minecraft.world.item.ItemStack decayingItemStack, int additionalLifetime)