Package forestry.api.core.backpacks
Interface IBackpackDefinition
public interface IBackpackDefinition
To make your own backpack, create a backpack definition and pass it to
IBackpackInterface.createBackpack(IBackpackDefinition, EnumBackpackType).-
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(net.minecraft.tags.TagKey, net.minecraft.tags.TagKey)orIBackpackInterface.createNaturalistBackpackFilter(net.minecraft.resources.ResourceLocation)or implement your own.- Returns:
- the backpack's item filter.
-