Interface IIndividualItem


public interface IIndividualItem
Implemented by items that carry a genetic individual in a data component. Lets the API read an individual out of a stack without naming the item implementation. Ex. the bee, tree, and butterfly items
See Also:
  • invalid reference
    For the stack helpers that dispatch through this interface
  • Method Details

    • getIndividualFromComponent

      @Nullable IIndividual getIndividualFromComponent(net.minecraft.world.item.ItemStack stack)
      Returns:
      The individual stored in the stack, or null if it has none
    • getLifeStage

      ILifeStage getLifeStage()
      Returns:
      The life stage this item represents. Ex. drone, princess, queen
    • getSpeciesType

      ISpeciesType<?,?> getSpeciesType()
      Returns:
      The species type this item belongs to