Search in sources :

Example 1 with ItemBackpackNaturalist

use of forestry.storage.items.ItemBackpackNaturalist in project ForestryMC by ForestryMC.

the class BackpackInterface method createNaturalistBackpack.

@Override
public Item createNaturalistBackpack(String backpackUid, ISpeciesRoot speciesRoot) {
    Preconditions.checkNotNull(backpackUid, "backpackUid must not be null");
    Preconditions.checkNotNull(speciesRoot, "speciesRoot must not be null");
    IBackpackDefinition definition = definitions.get(backpackUid);
    if (definition == null) {
        throw new IllegalArgumentException("No backpack definition was registered for UID: " + backpackUid);
    }
    ItemBackpack backpack = new ItemBackpackNaturalist(speciesRoot, definition);
    Proxies.common.registerItem(backpack);
    return backpack;
}
Also used : IBackpackDefinition(forestry.api.storage.IBackpackDefinition) ItemBackpackNaturalist(forestry.storage.items.ItemBackpackNaturalist) ItemBackpack(forestry.storage.items.ItemBackpack)

Aggregations

IBackpackDefinition (forestry.api.storage.IBackpackDefinition)1 ItemBackpack (forestry.storage.items.ItemBackpack)1 ItemBackpackNaturalist (forestry.storage.items.ItemBackpackNaturalist)1