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 Details

    • get

      @Nullable @Nullable BibliocraftWoodType get(net.minecraft.resources.ResourceLocation id)
      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

      @Nullable default @Nullable BibliocraftWoodType get(String id)
      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

      Returns:
      An unmodifiable list of all registered wood types. Must only be called after registration is finished.