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;
}
Aggregations