Raised (several times) when a new {@link EditSession} is being instantiated.
Block loggers, as well as block set interceptors, can use this event to wrap the given {@link Extent} with their own, which would allow them to interceptall changes made to the world. For example, the code below would wrap the existing extent with a custom one, and the custom extent would receive all method calls
before the extent fetched from {@link #getExtent()} would.
event.setExtent(new MyExtent(event.getExtent())
This event is fired several times during the creation of a single {@link EditSession}, but {@link #getStage()} will differ each time.The stage determines at which point {@link Extent}s added to this event will be called. For example, if you inject an extent when the stage is set to {@link Stage#BEFORE_HISTORY}, then you can drop (or log) changes before the change has reached the history, reordering, and actual change extents,
but that means that any changes made with {@link EditSession#rawSetBlock(Vector,BaseBlock)} will skip yourcustom {@link Extent} because that method bypasses history (and reorder).It is thus recommended that loggers intercept at {@link Stage#BEFORE_CHANGE}and block interceptors intercept at BOTH {@link Stage#BEFORE_CHANGE} and{@link Stage#BEFORE_HISTORY}.