Interface IScriptLoadSource
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Identifies a script load source.
A script load source is uniquely identified by its id, represented by a ResourceLocation. A load source is
used to identify who or what is responsible for the loading of scripts and which circumstances have lead to the
loading.
Each script load source must be registered through a
ICraftTweakerPlugin before being able to be used.
This is a functional interface whose functional method is id().
- Since:
- 9.1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic IScriptLoadSourcefind(net.minecraft.resources.ResourceLocation id) Attempts to find a load source with the given ID in the registry.net.minecraft.resources.ResourceLocationid()The ID of the load source.
-
Method Details
-
find
Attempts to find a load source with the given ID in the registry.It is not allowed to call this method before registries have been properly initialized. If such an action is performed, then the result is undefined behavior.
- Parameters:
id- The id of the load source to find.- Returns:
- The load source with the given id.
- Throws:
IllegalArgumentException- If no such load source was registered.- Since:
- 9.1.0
-
id
net.minecraft.resources.ResourceLocation id()The ID of the load source.- Returns:
- The ID of the load source.
- Since:
- 9.1.0
-