Interface BibliocraftWoodTypeRegistry
public interface BibliocraftWoodTypeRegistry
The registry for
BibliocraftWoodTypes. Get via BibliocraftApi.getWoodTypeRegistry().
Register a new wood type by subscribing to RegisterBibliocraftWoodTypesEvent and calling register(...) on it.
Make sure to put this call behind a ModList.isLoaded("bibliocraft") check, and in a separate class, to prevent accidental classloading (like you would with client classes).-
Method Summary
Modifier and TypeMethodDescriptiondefault @Nullable BibliocraftWoodType@Nullable BibliocraftWoodTypeget(net.minecraft.resources.ResourceLocation id) getAll()
-
Method Details
-
get
- Parameters:
id- The id of the wood type to get.- Returns:
- The wood type with the given id. May return null if no wood type with the given id exists.
-
get
- Parameters:
id- The id of the wood type to get.- Returns:
- The wood type with the given id. May return null if no wood type with the given id exists.
-
getAll
Collection<BibliocraftWoodType> getAll()- Returns:
- An unmodifiable list of all registered wood types. Must only be called after registration is finished.
-