Class Event
- Direct Known Subclasses:
AddBreakProgressEvent,AddEntityToWorldEvent,BreakEvent,CharEvent,ChatMessageEvent,ChunkSaveEvent,ComponentRenderEvent,ComponentRenderOverlayEvent,ConstructEvent,ContainerOpenEvent,CursorPosEvent,EntityDamageEvent,EntityDeathEvent,EntityInteractEvent,EntityTickEvent,GuiInitEvent,GuiOpenEvent,InitGuiComponentEvent,InteractionEvent,InventoryChangeEvent,ItemInteractEvent,ItemPickupEvent,KeyEvent,LayerActionEvent,LoadAssetsEvent,LoadSettingsEvent,MakeCameraCoordsEvent,MissingTileEvent,MouseEvent,OverlayRenderEvent,PlaceTileEvent,PlayerJoinWorldEvent,PlayerLeaveWorldEvent,PlayerRenderEvent,PlayerStatsEvent,RecipeLearnEvent,RegenEvent,ResetMovedPlayerEvent,ScrollEvent,SetBiomeEvent,SetStateEvent,TileDropsEvent,TileEntityTickEvent,TileInteractEvent,TooltipEvent,WorldCreationEvent,WorldGenEvent,WorldLoadEvent,WorldObjectCollisionEvent,WorldRenderEvent,WorldSaveEvent,WorldTickEvent,WorldUnloadEvent
IEventHandler.
Generally speaking, an event class' variables should all be public and either final or non-final, based on if they should be modifiable or not.
As an example of this behavior, the BreakEvent has a final AbstractPlayerEntity parameter, as the player that is breaking a tile should
not be changed. However, the positions and whether or not the breaking
operation was effective are non-final, meaning an event listener is able to
change which position a tile is being broken at and whether or not it should
drop its item.
Keep in mind that, when creating a custom event, you should always query any non-final variables that you pass into the event after firing it to ensure that the outcome of the event actually influences the outcome of your operation.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Event
public Event()
-