Constructor and Description |
---|
CrTTweaker() |
Modifier and Type | Method and Description |
---|---|
void |
apply(IAction action)
Executes a specified CraftTweaker action.
|
protected java.util.List<ScriptFile> |
collectScriptFiles(boolean isSyntaxCommand) |
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.
|
public void apply(IAction action)
ITweaker
public void setScriptProvider(IScriptProvider provider)
ITweaker
setScriptProvider
in interface ITweaker
provider
- provider to be setpublic void load()
ITweaker
public boolean loadScript(boolean isSyntaxCommand, java.lang.String loaderName)
ITweaker
loadScript
in interface ITweaker
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 notprotected java.util.List<ScriptFile> collectScriptFiles(boolean isSyntaxCommand)
public java.util.List<IAction> getActions()
ITweaker
getActions
in interface ITweaker
public void enableDebug()
ITweaker
enableDebug
in interface ITweaker
public PreprocessorManager getPreprocessorManager()
ITweaker
getPreprocessorManager
in interface ITweaker
public NetworkSide getNetworkSide()
ITweaker
getNetworkSide
in interface ITweaker
public void setNetworkSide(NetworkSide networkSide)
ITweaker
setNetworkSide
in interface ITweaker
public void registerLoadStartedEvent(IEventHandler<CrTLoadingStartedEvent> eventHandler)
ITweaker
registerLoadStartedEvent
in interface ITweaker
public void registerScriptLoadPreEvent(IEventHandler<CrTLoadingScriptEventPre> eventHandler)
ITweaker
registerScriptLoadPreEvent
in interface ITweaker
public void registerScriptLoadPostEvent(IEventHandler<CrTLoadingScriptEventPost> eventHandler)
ITweaker
registerScriptLoadPostEvent
in interface ITweaker