Changes

1,881 bytes added ,  08:48, 14 February 2021
move Forge Event Bus section to use treelist, partially add descriptions to each event
Line 191: Line 191:  
A full list of the events fired here is as follows, split into discrete categories:
 
A full list of the events fired here is as follows, split into discrete categories:
   −
=== Render Events ===
+
{{Tree list}}
* <code>RenderWorldLastEvent</code>
+
* <code>Event</code> - ''The root event class''
* <code>RenderHandEvent</code>
+
** '''Rendering events''' ('''client-only''')
* <code>RenderLivingEvent</code>
+
*** <code>RenderWorldLastEvent</code> - Fired after world rendering to allow mods to add custom renders
* <code>RenderItemInFrameEvent</code>
+
*** <code>RenderHandEvent</code> - Fired before and after the hand of the player is rendered in the first person POV
* <code>RenderBlockOverlayEvent</code>
+
*** <code>RenderLivingEvent</code> - Fired before and after a <code>LivingRenderer</code> is executed
* <code>DrawHighlightEvent</code>
+
*** <code>RenderItemInFrameEvent</code> - Fired before the item in an <code>ItemFrameEntity</code> is rendered
* <code>RenderTooltipEvent</code>
+
*** <code>RenderBlockOverlayEvent</code> - Fired before the block overlay for the player's screen is rendered
* <code>EntityViewRenderEvent</code>
+
*** <code>DrawHighlightEvent</code> - Fired before the block highlight outline is rendered
* <code>RenderGameOverlayEvent</code>
+
*** <code>RenderTooltipEvent</code> - Fired before and during rendering of a text tooltip on a screen
* <code>FOVUpdateEvent</code>
+
*** <code>EntityViewRenderEvent</code> - Superclass for events relating to the player's viewpoint
 
+
*** <code>RenderGameOverlayEvent</code> - Superclass, fired for each element on the player's HUD or game overlay
=== GUI Events ===
+
*** <code>FOVUpdateEvent</code> - Fired when the FOV of the player is requested (?)
* <code>GuiScreenEvent</code>
+
** '''GUI/Screen events''' ('''client-only''')
* <code>GuiContainerEvent</code>
+
*** <code>GuiScreenEvent</code> - Superclass for events relating to <code>Screen</code>s
* <code>GuiOpenEvent</code>
+
*** <code>GuiContainerEvent</code> - Superclsas for events relating to <code>ContainerScreen</code>s
 
+
*** <code>GuiOpenEvent</code> - Fired before a new screen is opened on the game window
=== Super Events ===
+
** '''Superclass events''' - ''These events exist to be superclasses of other events''
(Events that exist to contain other events)
+
*** <code>GenericEvent</code> - ''from EventBus'', superclass of events which have a generic type
* <code>BlockEvent</code>
+
*** <code>BlockEvent</code> - Superclass for events relating to a block within the world
* <code>WorldEvent</code>
+
*** <code>WorldEvent</code> - Superclass for events relating to the world
* <code>InputEvent</code>
+
*** <code>InputEvent</code> - ('''client-only''') Superclass for events relating to the player's keyboard and mouse inputs
* <code>NetworkEvent</code>
+
*** <code>NetworkEvent</code> - Superclass for events relating to networking
* <code>GenericEvent</code>
+
*** <code>ExplosionEvent</code> - Fired before an explosion explodes in the world
* <code>ExplosionEvent</code>
+
*** <code>SoundEvent</code> - ('''client-only''') Superclass for events related to sounds
* <code>SoundEvent</code>
+
*** <code>EntityEvent</code> - Superclass for events relating to entities
* <code>EntityEvent</code>
+
*** <code>TickEvent</code> - Superclass for events fired before and after ticking
* <code>TickEvent</code>
+
** '''Chat events'''
 
+
*** <code>ServerChatEvent</code> ('''server-only''') - Fired when the server receives a chat message and before it relays the message
=== Chat Events ===
+
*** <code>ClientChatEvent</code> ('''client-only''') - Fired before the client is about to send a chat message
* <code>ServerChatEvent</code>
+
*** <code>ClientChatReceivedEvent</code> ('''client-only''') - Fired when the client receives a chat message from the server
* <code>ClientChatEvent</code>
+
** '''Data loading events'''
* <code>ClientChatReceivedEvent</code>
+
*** <code>RecipesUpdatedEvent</code>
 
+
*** <code>BiomeLoadingEvent</code>
=== Data Loading Events ===
+
*** <code>LootTableLoadEvent</code>
* <code>RecipesUpdatedEvent</code>
+
*** <code>StructureSpawnListGatherEvent</code>
* <code>BiomeLoadingEvent</code>
+
** '''Startup events'''
* <code>LootTableLoadEvent</code>
+
*** <code>AddReloadListenerEvent</code>
* <code>StructureSpawnListGatherEvent</code>
+
*** <code>RegisterCommandsEvent</code>
 
+
*** <code>ServerLifecycleEvent</code>
=== Startup Events ===
+
** '''Gamemode events'''
* <code>AddReloadListenerEvent</code>
+
*** <code>DifficultyChangeEvent</code>
* <code>RegisterCommandsEvent</code>
+
*** <code>ClientPlayerChangeGamemodeEvent</code>
* <code>ServerLifecycleEvent</code>
+
**'''Trade events'''
 
+
*** <code>WandererTradesEvent</code>
=== Gamemode Events ===
+
*** <code>VillagerTradesEvent</code>
* <code>DifficultyChangeEvent</code>
+
** '''Other events'''
* <code>ClientPlayerChangeGamemodeEvent</code>
+
*** <code>FurnaceFuelBurnTimeEvent</code>
 
+
*** <code>BabyEntitySpawnEvent</code>
=== Trade Events ===
+
*** <code>VillageSiegeEvent</code>
* <code>WandererTradesEvent</code>
+
*** <code>TagsUpdatedEvent</code>
* <code>VillagerTradesEvent</code>
+
*** <code>PotionBrewEvent</code>
 
+
*** <code>ScreenshotEvent</code>
=== Other Events ===
+
*** <code>EnchantmentLevelSetEvent</code>
* <code>FurnaceFuelBurnTimeEvent</code>
+
*** <code>CommandEvent</code>
* <code>BabyEntitySpawnEvent</code>
+
*** <code>AnvilUpdateEvent</code>
* <code>VillageSiegeEvent</code>
+
*** <code>ItemAttributeModifierEvent</code>
* <code>TagsUpdatedEvent</code>
+
*** <code>ClientPlayerNetworkEvent</code>
* <code>PotionBrewEvent</code>
+
*** <code>ChunkWatchEvent</code>
* <code>ScreenshotEvent</code>
+
{{Tree list/end}}
* <code>EnchantmentLevelSetEvent</code>
  −
* <code>CommandEvent</code>
  −
* <code>AnvilUpdateEvent</code>
  −
* <code>ItemAttributeModifierEvent</code>
  −
* <code>ClientPlayerNetworkEvent</code>
  −
* <code>ChunkWatchEvent</code>
      
Like before, each of these events (especially the Super Events, which contain most of the useful events in the game) will have their own article explaining their purpose and usefulness.
 
Like before, each of these events (especially the Super Events, which contain most of the useful events in the game) will have their own article explaining their purpose and usefulness.
297

edits