Package guideme
Class GuideBuilder
java.lang.Object
guideme.GuideBuilder
Constructs new guides.
Use
Guide.builder(ResourceLocation)
to obtain a new builder.-
Method Summary
Modifier and TypeMethodDescriptionguideme.internal.MutableGuide
build()
Creates the guide.defaultNamespace
(String defaultNamespace) Sets the default resource namespace for this guide.developmentSources
(@Nullable Path folder) developmentSources
(Path folder, String namespace) Load additional page resources and assets from the given folder.Stops the builder from adding any of the default extensions.disableDefaultExtensions
(ExtensionPoint<?> extensionPoint) Stops the builder from adding any of the default extensions to the given extension point.Disables the global open hotkey from using this guide.<T extends Extension>
GuideBuilderextension
(ExtensionPoint<T> extensionPoint, T extension) Adds an extension to the given extension point for this guide.Sets the folder within the resource pack, from which pages for this guide will be loaded.Adds a page index to this guide, to be updated whenever the pages in the guide change.<T extends PageIndex>
GuideBuilderAdds a page index to this guide, to be updated whenever the pages in the guide change.itemSettings
(GuideItemSettings settings) Configure the generic guide item provided by GuideME.register
(boolean enable) Allows the automated registration in the global Guide registry to be disabled.startPage
(net.minecraft.resources.ResourceLocation pageId) Set the page to show when this guide is being opened without any previous page or target page.watchDevelopmentSources
(boolean enable) If development sources are used (developmentSources(Path, String), the given folder will automatically be watched for change.
-
Method Details
-
register
Allows the automated registration in the global Guide registry to be disabled. This is mostly useful for testing purposes. Disabling registration of the guide will disable several features for this guide:- Automatically showing the guide on startup
- The open hotkey
- Automatically reloading pages on resource reload
-
defaultNamespace
Sets the default resource namespace for this guide. This namespace is used for resources loaded from a plain folder during development and defaults to the namespace of the guide id. -
folder
Sets the folder within the resource pack, from which pages for this guide will be loaded. Please note that this name must be unique across all namespaces, since it would otherwise cause pages from guides added by other mods to show up in yours. This defaults toguides/<namespace>/<path>
with namespace and path coming from the guide id, which should implicitly make it unique. -
disableDefaultExtensions
Stops the builder from adding any of the default extensions. UsedisableDefaultExtensions(ExtensionPoint)
to disable the default extensions only for one of the extension points. -
disableOpenHotkey
Disables the global open hotkey from using this guide. -
disableDefaultExtensions
Stops the builder from adding any of the default extensions to the given extension point.disableDefaultExtensions()
takes precedence and will disable all extension points. -
startPage
Set the page to show when this guide is being opened without any previous page or target page. Defaults toindex.md
in thedefault namespace
. -
developmentSources
See developmentSources(Path, String). Uses the default namespace of the guide as the namespace for the pages and resources in the folder. -
developmentSources
Load additional page resources and assets from the given folder. Useful during development in conjunction withwatchDevelopmentSources
to automatically reload pages during development. All resources in the given folder are treated as if they were in the given namespace and the folder given toGuide.builder(net.minecraft.resources.ResourceLocation)
. The default values for folder and namespace will be taken from the system properties:guideDev.<FOLDER>.sources
guideDev.<FOLDER>.sourcesNamespace
-
watchDevelopmentSources
If development sources are used (developmentSources(Path, String), the given folder will automatically be watched for change. This method can be used to disable this behavior. -
index
Adds a page index to this guide, to be updated whenever the pages in the guide change. -
index
Adds a page index to this guide, to be updated whenever the pages in the guide change. Allows the class token under which the index can be retrieved to be specified. -
extension
Adds an extension to the given extension point for this guide. -
itemSettings
Configure the generic guide item provided by GuideME. If you are using this code API to register your guide, you are encouraged to register your own guide item instead of using the generic one. -
build
public guideme.internal.MutableGuide build()Creates the guide.
-