@minecraft
    正在准备搜索索引...

    类 TransactionManager

    The Transaction Manager is responsible for tracking and managing all of the registered transaction operations which represent creator changes in the world. Transaction Manager is the basis of the UNDO and REDO operations, and allows a creator to store the changes made to the world and the state of the world BEFORE those changes were applied, making it possible to UNDO those changes and restore the world state. The transactions are stored as a stack, and can be undone in stack order to restore the world to it's original state

    索引

    方法

    • 世界修改

      返回 void

      Perform an redo operation. This will take the last transaction record on the redo stack and store the current world state and then apply the changes in the record. This will reduce the redo record stack by one.

      The transaction record affected by this operation will be transferred to the undo stack in case the creator decides to undo it

      This function can throw errors.

    • 世界修改

      返回 number

      Return the number of transaction records on the redo stack.

      This function can throw errors.

    • 世界修改

      返回 void

      Perform an undo operation. This will take the last transaction record on the stack and apply the stored world state from before the changes were made. This will reduce the record stack by one.

      The transaction record affected by this operation will be transferred to the redo stack in case the creator decides to reapply it

      This function can throw errors.

    • 世界修改

      返回 number

      Return how many transactions records currently exist on the stack

      This function can throw errors.