Interface IBackpackDefinition


public interface IBackpackDefinition
To make your own backpack, create a backpack definition and register it with IBackpackInterface#registerBackpackDefinition(String, IBackpackDefinition).
  • Method Summary

    Modifier and Type
    Method
    Description
    Predicate<net.minecraft.world.item.ItemStack>
    Filters items that can be put into a backpack.
    net.minecraft.network.chat.Component
    getName(net.minecraft.world.item.ItemStack backpack)
     
    int
     
    int
     
  • Method Details

    • getName

      net.minecraft.network.chat.Component getName(net.minecraft.world.item.ItemStack backpack)
      Returns:
      Human-readable name of the backpack.
    • getPrimaryColour

      int getPrimaryColour()
      Returns:
      Primary color for the backpack icon.
    • getSecondaryColour

      int getSecondaryColour()
      Returns:
      Secondary color for backpack icon, normally white.
    • getFilter

      Predicate<net.minecraft.world.item.ItemStack> getFilter()
      Filters items that can be put into a backpack.

      For Backpack Implementers: you can create a new filter with IBackpackInterface#createBackpackFilter() or IBackpackInterface#createNaturalistBackpackFilter(String) or implement your own.

      Returns:
      the backpack's item filter.