public interface ITweaker
Modifier and Type | Method and Description |
---|---|
void |
apply(IAction action)
Executes a specified CraftTweaker action.
|
void |
enableDebug()
Enables debug class generations
|
java.util.List<IAction> |
getActions()
Retrieves all actions that have been performed.
|
NetworkSide |
getNetworkSide()
Gets the network side on which the game is currently running on
|
PreprocessorManager |
getPreprocessorManager()
Gets the preprocessor manager which deals with adding and removing preprocessors
|
void |
load()
Executes all scripts provided by the script provider.
|
boolean |
loadScript(boolean isSyntaxCommand,
java.lang.String loaderName)
Loads all scripts, choose whether to execute or not.
|
void |
registerLoadStartedEvent(IEventHandler<CrTLoadingStartedEvent> eventHandler)
Gets called as soon as the script start getting loaded (before the zs files are getting loaded)
|
void |
registerScriptLoadPostEvent(IEventHandler<CrTLoadingScriptEventPost> eventHandler)
Gets called as soon as the script file is done loading.
|
void |
registerScriptLoadPreEvent(IEventHandler<CrTLoadingScriptEventPre> eventHandler)
Gets called just before the script file is loaded
|
void |
setNetworkSide(NetworkSide networkSide)
Used to set the side the game is running on, is set in the construction event of the Main package
|
void |
setScriptProvider(IScriptProvider provider)
Sets the script provider.
|
void apply(IAction action)
action
- action to executevoid setScriptProvider(IScriptProvider provider)
provider
- provider to be setvoid load()
boolean loadScript(boolean isSyntaxCommand, java.lang.String loaderName)
isSyntaxCommand
- if it is a syntax command it will ignore stuff like the loader group and not execute itloaderName
- Name of the loader, affects whether a file gets loaded or notjava.util.List<IAction> getActions()
void enableDebug()
PreprocessorManager getPreprocessorManager()
NetworkSide getNetworkSide()
void setNetworkSide(NetworkSide networkSide)
void registerLoadStartedEvent(IEventHandler<CrTLoadingStartedEvent> eventHandler)
void registerScriptLoadPreEvent(IEventHandler<CrTLoadingScriptEventPre> eventHandler)
void registerScriptLoadPostEvent(IEventHandler<CrTLoadingScriptEventPost> eventHandler)