mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-19 19:49:35 +00:00
Tons of changes:
- Added interface to game, client and server - Added transformations - Made ingredient conditions more practical to use, no longer requires imports - Started implementation of event handling - Moved commands and logic to the common API code - Added common interface to MineTweaker recipes - Added string methods - Moved the logger from static value to static getter - Fixed crashes on dedicated servers - Fixed bracket resolution for <id:meta> values in 1.6.4 - Fixed scripts not being sent to multiplayer clients in 1.6.4
This commit is contained in:
1 parent
7f6235f30d
commit
115593efa5
131 files changed
+3215
-1930
No files matched your search
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
*/
|
||||
|
||||
package minetweaker.runtime;
|
||||
|
||||
import java.util.List;
|
||||
import minetweaker.IUndoableAction;
|
||||
import minetweaker.api.item.IIngredient;
|
||||
import stanhebben.zenscript.annotations.ZenClass;
|
||||
import stanhebben.zenscript.annotations.ZenMethod;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Stan
|
||||
*/
|
||||
@ZenClass("minetweaker.IMineTweaker")
|
||||
public interface ITweaker {
|
||||
/**
|
||||
* Executes a specified MineTweaker action. Will print a log message and
|
||||
* adds the action to the undo list.
|
||||
*
|
||||
* @param action action to execute
|
||||
*/
|
||||
public void apply(IUndoableAction action);
|
||||
|
||||
/**
|
||||
* Removes a specific item from all known recipes handlers.
|
||||
*
|
||||
* @param items items to remove
|
||||
*/
|
||||
@ZenMethod
|
||||
public void remove(IIngredient items);
|
||||
|
||||
/**
|
||||
* Rolls back all actions performed by MineTweaker. Returns the list of
|
||||
* actions that could not be rolled back (the "stuck" ones that are not
|
||||
* undoable).
|
||||
*
|
||||
* @return stuck action list
|
||||
*/
|
||||
public List<IUndoableAction> rollback();
|
||||
|
||||
/**
|
||||
* Sets the script provider.
|
||||
*
|
||||
* @param provider
|
||||
* @return
|
||||
*/
|
||||
public void setScriptProvider(IScriptProvider provider);
|
||||
|
||||
/**
|
||||
* Executes all scripts provided by the script provider.
|
||||
*/
|
||||
public void load();
|
||||
|
||||
/**
|
||||
* Retrieves the data from the scripts that were loaded last.
|
||||
*
|
||||
* @return scripts data
|
||||
*/
|
||||
public byte[] getScriptData();
|
||||
}
|
||||
Reference in new issue
Block a user