Interface ChangeBlockEvent
- All Superinterfaces:
Event
- All Known Subinterfaces:
ChangeBlockEvent.All
,ChangeBlockEvent.Post
,ChangeBlockEvent.Pre
Plain event for when one or many
BlockStates
may be
changing within a ServerWorld
.
Ideally, the ChangeBlockEvent.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 which BlockTransactionReceipt
s are
recorded in a particluar ServerWorld
without the additional cost of having multiple events thrown throughout.
To determine whether a particular BlockTransaction
is a
break
, place
, modify
, etc. please refer to the
BlockTransaction.operation()
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
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
Called before running specific block logic at one or moreServerLocation
's such asBlockTypes.WATER
. -
Method Summary
-
Method Details
-
world
ServerWorld world()Gets the world this event is affecting.- Returns:
- The world encompassing these block changes
-