Interface IUndoableAction
- All Superinterfaces:
IAction,IRuntimeAction
- All Known Implementing Classes:
ActionAddShiftedTooltip,ActionAddTooltip,ActionAddTrade,ActionAddWanderingTrade,ActionClearTooltip,ActionModifyAttribute,ActionModifyShiftedTooltip,ActionModifyTooltip,ActionRemoveRegexTooltip,ActionRemoveTrade,ActionRemoveWanderingTrade,ActionSetBlockProperty,ActionSetBurnTime,ActionSetCauldronInteraction,ActionSetCompostable,ActionSetFood,ActionSetItemProperty,ActionTooltipBase,ActionTradeBase
Represents an action that should be run on every game reload and that requires additional cleanup code.
Refer to IRuntimeAction and IAction for more information.
- Since:
- 9.1.0
-
Method Summary
Modifier and TypeMethodDescriptionGets a human-readable description of the action rollback.voidundo()Undoes all changes carried out by the action.Methods inherited from interface com.blamejared.crafttweaker.api.action.base.IAction
apply, assertLoader, describe, getDeclaredScriptPosition, shouldApplyOn, validate
-
Method Details
-
undo
void undo()Undoes all changes carried out by the action.- Since:
- 9.1.0
-
describeUndo
String describeUndo()Gets a human-readable description of the action rollback.This message is used for logging and to surface information to the user when something goes wrong. It is thus customary to describe the rollback as accurately as possible without being too verbose.
It is not allowed to return a
nullor otherwise empty description for the rollback: doing so will raise an error at runtime.- Returns:
- A description of the current action rollback.
- Since:
- 9.1.0
-