Interface ChangeBlockEvent
-
- All Superinterfaces:
Event
- All Known Subinterfaces:
ChangeBlockEvent.All
,ChangeBlockEvent.Post
,ChangeBlockEvent.Pre
public interface ChangeBlockEvent extends Event
Plain event for when one or manyBlockStates
may be changing within aServerWorld
. Ideally, theChangeBlockEvent.All.transactions()
will contain a full list in order of which the changes are taking place, but the overall list may not be the full breadth of what changes take place during some complex operations. To record the entirety of all transactions taking place,ChangeBlockEvent.Post
provides additional aide with knowing whichBlockTransactionReceipt
s are recorded in a particluarServerWorld
without the additional cost of having multiple events thrown throughout.To determine whether a particular
BlockTransaction
is abreak
,place
,modify
, etc. please refer to theBlockTransaction.operation()
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
ChangeBlockEvent.All
static interface
ChangeBlockEvent.Post
Called when there are multiple block changes due to aBlockType
having "ticked", in which theCause
will have aBlockSnapshot
, or, in the case that anEntity
has "ticked", in which theCause
will have anEntity
, or, in the case that aBlockEntity
"ticked", theCause
will have theBlockEntity
.static interface
ChangeBlockEvent.Pre
Called before running specific block logic at one or moreServerLocation
's such asBlockTypes.WATER
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ServerWorld
world()
Gets the world this event is affecting.
-
-
-
Method Detail
-
world
ServerWorld world()
Gets the world this event is affecting.- Returns:
- The world encompassing these block changes
-
-