mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-22 04:52:21 +00:00
format all the things!
This commit is contained in:
1 parent
54ec75fd3d
commit
b36c6dade6
377 files changed
+6833
-6772
No files matched your search
@@ -27,48 +27,48 @@ public interface IUndoableAction {
|
||||
* again if undo() has been called in between.
|
||||
*/
|
||||
public void apply();
|
||||
|
||||
|
||||
/**
|
||||
* Checks if this action can be undone. If this method returns true, it
|
||||
* must implement undo() properly. If this method returns false, the action
|
||||
* is considered permanent, undo() will never be called, and the action
|
||||
* cannot be executed as part of a server script. Additionally, the
|
||||
* minetweaker.clear() function will not work and minetweaker.canClear
|
||||
* will return false.
|
||||
* Checks if this action can be undone. If this method returns true, it must
|
||||
* implement undo() properly. If this method returns false, the action is
|
||||
* considered permanent, undo() will never be called, and the action cannot
|
||||
* be executed as part of a server script. Additionally, the
|
||||
* minetweaker.clear() function will not work and minetweaker.canClear will
|
||||
* return false.
|
||||
*
|
||||
* @return undoable status
|
||||
*/
|
||||
public boolean canUndo();
|
||||
|
||||
|
||||
/**
|
||||
* Undoes the action. Will only be called after apply() has been executed.
|
||||
* After an undo, apply may be called again. They could be done multiple
|
||||
* times in certain scenarios.
|
||||
*/
|
||||
public void undo();
|
||||
|
||||
|
||||
/**
|
||||
* Describes, in a single human-readable sentence, what this specific action
|
||||
* is doing. Used in logging messages, lists, ...
|
||||
*
|
||||
* Try to be as descriptive as possible without being too verbose.
|
||||
*
|
||||
* Examples:
|
||||
* - Adding Peach planks to the woodPlanks ore dictionary entry
|
||||
* - Removing a recipe for Iron Ore
|
||||
* Examples: - Adding Peach planks to the woodPlanks ore dictionary entry -
|
||||
* Removing a recipe for Iron Ore
|
||||
*
|
||||
* @return the description of this action
|
||||
*/
|
||||
public String describe();
|
||||
|
||||
|
||||
/**
|
||||
* Describes what this action does if it is undone. Similar to the describe()
|
||||
* method. No implementation is needed if the action cannot be undone.
|
||||
* Describes what this action does if it is undone. Similar to the
|
||||
* describe() method. No implementation is needed if the action cannot be
|
||||
* undone.
|
||||
*
|
||||
* @return the description of this action, when undone
|
||||
*/
|
||||
public String describeUndo();
|
||||
|
||||
|
||||
/**
|
||||
* Returns the override key. Two actions are considered to override each
|
||||
* other if their override key is equal. You can return null to indicate
|
||||
@@ -77,7 +77,8 @@ public interface IUndoableAction {
|
||||
* This value only makes sense for recipes that are not undoable. For
|
||||
* undoable recipes, you should return null.
|
||||
*
|
||||
* @return override key (null for actions that are undoable or which can never be overridden by another action)
|
||||
* @return override key (null for actions that are undoable or which can
|
||||
* never be overridden by another action)
|
||||
*/
|
||||
public Object getOverrideKey();
|
||||
}
|
||||
Reference in new issue
Block a user