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 manyBlockStatesmay 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.Postprovides additional aide with knowing whichBlockTransactionReceipts are recorded in a particluarServerWorldwithout the additional cost of having multiple events thrown throughout.To determine whether a particular
BlockTransactionis abreak,place,modify, etc. please refer to theBlockTransaction.operation()
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceChangeBlockEvent.Allstatic interfaceChangeBlockEvent.PostCalled when there are multiple block changes due to aBlockTypehaving "ticked", in which theCausewill have aBlockSnapshot, or, in the case that anEntityhas "ticked", in which theCausewill have anEntity, or, in the case that aBlockEntity"ticked", theCausewill have theBlockEntity.static interfaceChangeBlockEvent.PreCalled 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 ServerWorldworld()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
-
-