Skip to content

Commit

Permalink
Improve API Documentation for groups and committing.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlgorithmX2 committed Jan 14, 2017
1 parent 84d5db8 commit 2445093
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/main/java/mod/chiselsandbits/api/IBitAccess.java
Expand Up @@ -69,6 +69,12 @@ void setBitAt(
* affect, optionally you can trigger updates or not.
*
* If the {@link IBitAccess} is not in the world this method does nothing.
*
* All changes made by a player should be committed on the client and the
* server, failure to commit changes on the client will cause corruption of
* the Undo Pipeline, causing 'Block Has Changed' errors when trying to undo
* blocks that have been modified only on the server, doing so also
* increases responsiveness in those changes for the player making them.
*
* @param triggerUpdates
* normally true, only use false if your doing something special.
Expand Down
15 changes: 10 additions & 5 deletions src/main/java/mod/chiselsandbits/api/IChiselAndBitsAPI.java
Expand Up @@ -167,8 +167,13 @@ IBitBag getBitbag(
ItemStack stack );

/**
* Begins an undo operation, starting two operations without ending the
* previous operation will throw a runtime exception.
* Begins an undo group, starting two operations without ending the previous
* operation will throw a runtime exception.
*
* This is used to merge multiple blocks into a single operation, undo steps
* will be recorded regardless of usage of this method, however its
* suggested to use groups in any case where a change well affect more then
* one block.
*
* @formatter:off
*
Expand All @@ -182,9 +187,9 @@ void beginUndoGroup(
EntityPlayer player );

/**
* Ends a previously running undo operation, must be called after starting
* an undo operation, closing a group without opening one will result in a
* runtime exception.
* Ends a previously running undo group, must be called after starting an
* undo group, closing a group without opening one will result in a runtime
* exception.
*/
void endUndoGroup(
EntityPlayer player );
Expand Down

0 comments on commit 2445093

Please sign in to comment.