net.minecraftforge.client.event.ClientChatEvent
ForgeEventFactory#onClientSendMessage
ClientChatEvent is fired whenever the client is about to send a chat message or command to the server.
This event is fired via ForgeEventFactory#onClientSendMessage(String), which is executed byGuiScreen#sendChatMessage(String, boolean)
#message contains the message that will be sent to the server. This can be changed by mods.
#originalMessage contains the original message that was going to be sent to the server. This cannot be changed by mods.
This event isCancelable
.
If this event is canceled, the chat message or command is never sent to the server.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.client.event.ClientChatReceivedEvent
ForgeEventFactory#onClientChat
ClientPlayNetHandler#handleChat
Fired on the client when a chat message is received.
If this event is cancelled, the message is not displayed in the chat message window.
Fired on net.minecraftforge.common.MinecraftForge#EVENT_BUS.
net.minecraftforge.client.event.ClientPlayerChangeGameModeEvent
ForgeHooksClient#onClientChangeGameMode
Fired before the client player is notified of a change in game mode from the server.
net.minecraftforge.client.event.ClientPlayerNetworkEvent
Client side player connectivity events.
net.minecraftforge.client.event.ClientPlayerNetworkEvent.LoggedInEvent
ClientPlayNetHandler#handleLogin
Fired when the client player logs in to the server. The player should be initialized.
net.minecraftforge.client.event.ClientPlayerNetworkEvent.LoggedOutEvent
Fired when the player logs out. Note this might also fire when a new integrated server is being created.
net.minecraftforge.client.event.ClientPlayerNetworkEvent.RespawnEvent
ClientPlayNetHandler#handleRespawn
Fired when the player object respawns, such as dimension changes.
net.minecraftforge.client.event.ColorHandlerEvent
Use these events to register block/item color handlers at the appropriate time.
net.minecraftforge.client.event.ColorHandlerEvent.Block
ForgeHooksClient#onBlockColorsInit
net.minecraftforge.client.event.ColorHandlerEvent.Item
ForgeHooksClient#onItemColorsInit
net.minecraftforge.client.event.DrawHighlightEvent
ForgeHooksClient#onDrawBlockHighlight
WorldRenderer#renderLevel
WorldRenderer#renderLevel
An event called whenever the selection highlight around blocks is about to be rendered. Canceling this event stops the selection highlight from being rendered. TODO: Rename to DrawSelectionEvent
net.minecraftforge.client.event.DrawHighlightEvent.HighlightBlock
ForgeHooksClient#onDrawBlockHighlight
WorldRenderer#renderLevel
WorldRenderer#renderLevel
A variant of the DrawHighlightEvent only called when a block is highlighted.
net.minecraftforge.client.event.DrawHighlightEvent.HighlightEntity
ForgeHooksClient#onDrawBlockHighlight
WorldRenderer#renderLevel
WorldRenderer#renderLevel
A variant of the DrawHighlightEvent only called when an entity is highlighted. Canceling this event has no effect.
net.minecraftforge.client.event.EntityViewRenderEvent
Event that hooks into GameRenderer, allowing any feature to customize visual attributes the player sees.
net.minecraftforge.client.event.EntityViewRenderEvent.CameraSetup
ForgeHooksClient#onCameraSetup
Event that allows mods to alter the angles of the player's camera. Mainly useful for applying roll.
net.minecraftforge.client.event.EntityViewRenderEvent.FOVModifier
ForgeHooksClient#getFOVModifier
Event that allows mods to alter the raw FOV itself. This directly affects to the FOV without being modified.
net.minecraftforge.client.event.EntityViewRenderEvent.FogColors
Event that allows any feature to customize the color of fog the player sees. NOTE: Any change made to one of the color variables will affect the result seen in-game.
net.minecraftforge.client.event.EntityViewRenderEvent.FogDensity
ForgeHooksClient#getFogDensity
Event that allows any feature to customize the fog density the player sees. NOTE: In order to make this event have an effect, you must cancel the event
net.minecraftforge.client.event.EntityViewRenderEvent.FogEvent
net.minecraftforge.client.event.EntityViewRenderEvent.RenderFogEvent
Event that allows any feature to customize the rendering of fog.
net.minecraftforge.client.event.FOVUpdateEvent
AbstractClientPlayerEntity#getFieldOfViewModifier
net.minecraftforge.client.event.GuiContainerEvent
Event class for handling GuiContainer specific events.
net.minecraftforge.client.event.GuiContainerEvent.DrawBackground
This event is fired directly after the GuiContainer has draw any background elements, This is useful for drawing new background elements.
net.minecraftforge.client.event.GuiContainerEvent.DrawForeground
This event is fired directly after the GuiContainer has draw any foreground elements, But before the "dragged" stack, and before any tooltips. This is useful for any slot / item specific overlays. Things that need to be on top of All GUI elements but bellow tooltips and dragged stacks.
net.minecraftforge.client.event.GuiOpenEvent
This event is called before any Gui will open. If you don't want this to happen, cancel the event. If you want to override this Gui, simply set the gui variable to your own Gui.
net.minecraftforge.client.event.GuiScreenEvent
Event classes for GuiScreen events.
net.minecraftforge.client.event.GuiScreenEvent.BackgroundDrawnEvent
Screen#renderBackground
Screen#renderDirtBackground
This event fires at the end of
GuiScreen#drawBackground(int)
and before the rest of the Gui draws. This allows drawing next to Guis, above the background but below any tooltips.
net.minecraftforge.client.event.GuiScreenEvent.DrawScreenEvent
net.minecraftforge.client.event.GuiScreenEvent.DrawScreenEvent.Post
This event fires just after
GuiScreen#render(int, int, float)
is called.
net.minecraftforge.client.event.GuiScreenEvent.DrawScreenEvent.Pre
This event fires just before
GuiScreen#render(int, int, float)
is called. Cancel this event to skipGuiScreen#render(int, int, float)
.
net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent
net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Post
This event fires right after
GuiScreen#initGui()
. This is a good place to alter a GuiScreen's component layout if desired.
net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent.Pre
This event fires just after initializing
GuiScreen#mc
,GuiScreen#fontRenderer
,GuiScreen#width
, andGuiScreen#height
.
If canceled the following lines are skipped inGuiScreen#setWorldAndResolution(Minecraft, int, int)
:
this.buttonList.clear();
this.children.clear();
this.initGui();
net.minecraftforge.client.event.GuiScreenEvent.KeyboardCharTypedEvent
net.minecraftforge.client.event.GuiScreenEvent.KeyboardCharTypedEvent.Post
ForgeHooksClient#onGuiCharTypedPost
KeyboardListener#charTyped
KeyboardListener#charTyped
This event fires after
IGuiEventListener#charTyped(char, int)
if the character was not already handled. Cancel this event when you successfully use the keyboard input to prevent other handlers from using the same input.
net.minecraftforge.client.event.GuiScreenEvent.KeyboardCharTypedEvent.Pre
ForgeHooksClient#onGuiCharTypedPre
KeyboardListener#charTyped
KeyboardListener#charTyped
This event fires when keyboard character input is detected for a GuiScreen, before it is handled. Cancel this event to bypass
IGuiEventListener#charTyped(char, int)
.
net.minecraftforge.client.event.GuiScreenEvent.KeyboardKeyEvent
net.minecraftforge.client.event.GuiScreenEvent.KeyboardKeyPressedEvent
net.minecraftforge.client.event.GuiScreenEvent.KeyboardKeyPressedEvent.Post
ForgeHooksClient#onGuiKeyPressedPost
This event fires after
IGuiEventListener#keyPressed(int, int, int)
if the key was not already handled. Cancel this event when you successfully use the keyboard input to prevent other handlers from using the same input.
net.minecraftforge.client.event.GuiScreenEvent.KeyboardKeyPressedEvent.Pre
ForgeHooksClient#onGuiKeyPressedPre
This event fires when keyboard input is detected for a GuiScreen, before it is handled. Cancel this event to bypass
IGuiEventListener#keyPressed(int, int, int)
.
net.minecraftforge.client.event.GuiScreenEvent.KeyboardKeyReleasedEvent
net.minecraftforge.client.event.GuiScreenEvent.KeyboardKeyReleasedEvent.Post
ForgeHooksClient#onGuiKeyReleasedPost
This event fires after
IGuiEventListener#keyReleased(int, int, int)
if the key was not already handled. Cancel this event when you successfully use the keyboard input to prevent other handlers from using the same input.
net.minecraftforge.client.event.GuiScreenEvent.KeyboardKeyReleasedEvent.Pre
ForgeHooksClient#onGuiKeyReleasedPre
This event fires when keyboard input is detected for a GuiScreen, before it is handled. Cancel this event to bypass
IGuiEventListener#keyReleased(int, int, int)
.
net.minecraftforge.client.event.GuiScreenEvent.MouseClickedEvent
net.minecraftforge.client.event.GuiScreenEvent.MouseClickedEvent.Post
ForgeHooksClient#onGuiMouseClickedPost
This event fires after
IGuiEventListener#mouseClicked(double, double, int)
if the click was not already handled. Cancel this event when you successfully use the mouse click, to prevent other handlers from using the same input.
net.minecraftforge.client.event.GuiScreenEvent.MouseClickedEvent.Pre
ForgeHooksClient#onGuiMouseClickedPre
This event fires when a mouse click is detected for a GuiScreen, before it is handled. Cancel this event to bypass
IGuiEventListener#mouseClicked(double, double, int)
.
net.minecraftforge.client.event.GuiScreenEvent.MouseDragEvent
net.minecraftforge.client.event.GuiScreenEvent.MouseDragEvent.Post
ForgeHooksClient#onGuiMouseDragPost
This event fires after
IGuiEventListener#mouseDragged(double, double, int, double, double)
if the drag was not already handled. Cancel this event when you successfully use the mouse drag, to prevent other handlers from using the same input.
net.minecraftforge.client.event.GuiScreenEvent.MouseDragEvent.Pre
ForgeHooksClient#onGuiMouseDragPre
This event fires when a mouse drag is detected for a GuiScreen, before it is handled. Cancel this event to bypass
IGuiEventListener#mouseDragged(double, double, int, double, double)
.
net.minecraftforge.client.event.GuiScreenEvent.MouseInputEvent
net.minecraftforge.client.event.GuiScreenEvent.MouseReleasedEvent
net.minecraftforge.client.event.GuiScreenEvent.MouseReleasedEvent.Post
ForgeHooksClient#onGuiMouseReleasedPost
This event fires after
IGuiEventListener#mouseReleased(double, double, int)
if the release was not already handled. Cancel this event when you successfully use the mouse release, to prevent other handlers from using the same input.
net.minecraftforge.client.event.GuiScreenEvent.MouseReleasedEvent.Pre
ForgeHooksClient#onGuiMouseReleasedPre
This event fires when a mouse release is detected for a GuiScreen, before it is handled. Cancel this event to bypass
IGuiEventListener#mouseReleased(double, double, int)
.
net.minecraftforge.client.event.GuiScreenEvent.MouseScrollEvent
net.minecraftforge.client.event.GuiScreenEvent.MouseScrollEvent.Post
ForgeHooksClient#onGuiMouseScrollPost
This event fires after
IGuiEventListener#mouseScrolled(double)
if the scroll was not already handled. Cancel this event when you successfully use the mouse scroll, to prevent other handlers from using the same input.
net.minecraftforge.client.event.GuiScreenEvent.MouseScrollEvent.Pre
ForgeHooksClient#onGuiMouseScrollPre
This event fires when a mouse scroll is detected for a GuiScreen, before it is handled. Cancel this event to bypass
IGuiEventListener#mouseScrolled(double)
.
net.minecraftforge.client.event.GuiScreenEvent.PotionShiftEvent
DisplayEffectsScreen#checkEffectRendering
This event fires in
InventoryEffectRenderer#updateActivePotionEffects()
when potion effects are active and the gui wants to move over. Cancel this event to prevent the Gui from being moved.
net.minecraftforge.client.event.InputEvent
net.minecraftforge.client.event.InputEvent.ClickInputEvent
Minecraft#continueAttack
Minecraft#startAttack
Minecraft#startUseItem
Minecraft#pickBlock
This event fires when one of the keybindings that by default involves clicking the mouse buttons is triggered. These key bindings are use item, pick block and attack keybindings. (right, middle and left mouse click) In the case that these key bindings are re-bound to a keyboard key the event will still be fired as normal.
net.minecraftforge.client.event.InputEvent.KeyInputEvent
This event fires when a keyboard input is detected.
net.minecraftforge.client.event.InputEvent.MouseInputEvent
ForgeHooksClient#fireMouseInput
This event fires when a mouse input is detected.
net.minecraftforge.client.event.InputEvent.MouseScrollEvent
ForgeHooksClient#onMouseScroll
This event fires when the mouse scroll wheel is used outside of a gui.
net.minecraftforge.client.event.InputEvent.RawMouseEvent
ForgeHooksClient#onRawMouseClicked
A cancellable mouse event fired before key bindings are updated
net.minecraftforge.client.event.InputUpdateEvent
ForgeHooksClient#onInputUpdate
This event is fired after player movement inputs are updated.
Handlers can freely manipulateMovementInput
to cancel movement.
net.minecraftforge.client.event.ModelBakeEvent
net.minecraftforge.client.event.ModelRegistryEvent
ModelLoaderRegistry#onModelLoadingStart
Fired when the net.minecraftforge.client.model.ModelLoader is ready to register model loaders
net.minecraftforge.client.event.ParticleFactoryRegisterEvent
Fired when you should call
net.minecraft.client.particle.ParticleManager#registerFactory
. Note that yourParticleType
s should still be registered during the usual registry events, this is only for the factories.
net.minecraftforge.client.event.RecipesUpdatedEvent
ForgeHooksClient#onRecipesUpdated
ClientPlayNetHandler#handleUpdateRecipes
Fired on
Dist#CLIENT
whenRecipeManager
has all of its recipes synced from the server to the client (just after a client has connected),
net.minecraftforge.client.event.RenderBlockOverlayEvent
ForgeEventFactory#renderBlockOverlay
ForgeEventFactory#renderFireOverlay
ForgeEventFactory#renderWaterOverlay
OverlayRenderer#renderScreenEffect
Called when a block's texture is going to be overlaid on the player's HUD. Cancel this event to prevent the overlay.
net.minecraftforge.client.event.RenderGameOverlayEvent
ForgeHooksClient#bossBarRenderPre
ForgeHooksClient#bossBarRenderPost
ForgeIngameGui#render
BossOverlayGui#render
BossOverlayGui#render
net.minecraftforge.client.event.RenderGameOverlayEvent.BossInfo
ForgeHooksClient#bossBarRenderPre
net.minecraftforge.client.event.RenderGameOverlayEvent.Chat
net.minecraftforge.client.event.RenderGameOverlayEvent.Post
ForgeHooksClient#bossBarRenderPost
ForgeIngameGui#post
net.minecraftforge.client.event.RenderGameOverlayEvent.Pre
net.minecraftforge.client.event.RenderGameOverlayEvent.Text
net.minecraftforge.client.event.RenderHandEvent
ForgeHooksClient#renderSpecificFirstPersonHand
FirstPersonRenderer#renderHandsWithItems
FirstPersonRenderer#renderHandsWithItems
This event is fired on the net.minecraftforge.common.MinecraftForge#EVENT_BUS whenever a hand is rendered in first person. Canceling the event causes the hand to not render.
net.minecraftforge.client.event.RenderItemInFrameEvent
This event is called when an item is rendered in an item frame. You can set canceled to do no further vanilla processing.
net.minecraftforge.client.event.RenderLivingEvent
net.minecraftforge.client.event.RenderLivingEvent.Post
net.minecraftforge.client.event.RenderLivingEvent.Pre
net.minecraftforge.client.event.RenderNameplateEvent
RenderNameplateEvent is fired whenever the entity renderer attempts to render a name plate/tag of an entity.
#nameplateContent contains the content being rendered on the name plate/tag. This can be changed by mods.
#originalContent contains the original content being rendered on the name plate/tag. This cannot be changed by mods.
#entityRenderer contains the entity renderer instance that renders the name plate/tag. This cannot be changed by mods.
#matrixStack contains the matrix stack instance involved in rendering the name plate/tag. This cannot be changed by mods.
#renderTypeBuffer contains the render type buffer instance involved in rendering the name plate/tag. This cannot be changed by mods.
#packedLight contains the sky and block light values used in rendering the name plate/tag.
#partialTicks contains the partial ticks used in rendering the name plate/tag. This cannot be changed by mods.
This event has a result. .
ALLOW will force-render name plate/tag, DEFAULT will ignore the hook and continue using the vanilla check & DENY will prevent name plate/tag from rendering
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.client.event.RenderPlayerEvent
net.minecraftforge.client.event.RenderPlayerEvent.Post
net.minecraftforge.client.event.RenderPlayerEvent.Pre
net.minecraftforge.client.event.RenderTooltipEvent
A set of events which are fired at various points during tooltip rendering. Can be used to change the rendering parameters, draw something extra, etc. Do not use this event directly, use one of the subclasses:
RenderTooltipEvent.Pre RenderTooltipEvent.PostBackground RenderTooltipEvent.PostText
net.minecraftforge.client.event.RenderTooltipEvent.Color
This event is fired when the colours for the tooltip background are determined.
net.minecraftforge.client.event.RenderTooltipEvent.Post
Events inheriting from this class are fired at different stages during the tooltip rendering. Do not use this event directly, use one of its subclasses:
RenderTooltipEvent.PostBackground RenderTooltipEvent.PostText
net.minecraftforge.client.event.RenderTooltipEvent.PostBackground
This event is fired directly after the tooltip background is drawn, but before any text is drawn.
net.minecraftforge.client.event.RenderTooltipEvent.PostText
This event is fired directly after the tooltip text is drawn, but before the GL state is reset.
net.minecraftforge.client.event.RenderTooltipEvent.Pre
This event is fired before any tooltip calculations are done. It provides setters for all aspects of the tooltip, so the final render can be modified. This event is
Cancelable
.
net.minecraftforge.client.event.RenderWorldLastEvent
ForgeHooksClient#dispatchRenderLast
net.minecraftforge.client.event.ScreenshotEvent
This event is fired before and after a screenshot is taken This event is fired on the net.minecraftforge.common.MinecraftForge#EVENT_BUS This event is
Cancelable
#screenshotFile contains the file the screenshot will be/was saved to #image contains theNativeImage
that will be saved #resultMessage contains theITextComponent
to be returned. Ifnull
, the default vanilla message will be used instead
net.minecraftforge.client.event.TextureStitchEvent
net.minecraftforge.client.event.TextureStitchEvent.Post
ForgeHooksClient#onTextureStitchedPost
This event is fired once the texture map has loaded all textures and stitched them together. All Icons should have there locations defined by the time this is fired.
net.minecraftforge.client.event.TextureStitchEvent.Pre
ForgeHooksClient#onTextureStitchedPre
Fired when the TextureMap is told to refresh it's stitched texture. Called before the
net.minecraft.client.renderer.texture.TextureAtlasSprite
are loaded.
net.minecraftforge.client.event.sound.PlaySoundEvent
Raised when the SoundManager tries to play a normal sound. If you return null from this function it will prevent the sound from being played, you can return a different entry if you want to change the sound being played.
net.minecraftforge.client.event.sound.PlaySoundSourceEvent
net.minecraftforge.client.event.sound.PlayStreamingSourceEvent
net.minecraftforge.client.event.sound.SoundEvent
net.minecraftforge.client.event.sound.SoundEvent.SoundSourceEvent
net.minecraftforge.client.event.sound.SoundLoadEvent
SoundEngine#SoundEngine
SoundEngine#reload
Raised by the SoundManager.loadSoundSettings, this would be a good place for adding your custom sounds to the SoundPool.
net.minecraftforge.client.event.sound.SoundSetupEvent
This event is raised by the SoundManager when it does its first setup of the SoundSystemConfig's codecs, use this function to add your own codecs.
net.minecraftforge.event.AddReloadListenerEvent
ForgeEventFactory#onResourceReload
The main ResourceManager is recreated on each reload, through
DataPackRegistries
's creation. The event is fired on each reload and lets modders add their own ReloadListeners, for server-side resources. The event is fired on the MinecraftForge#EVENT_BUS
net.minecraftforge.event.AnvilUpdateEvent
AnvilUpdateEvent is fired when the inputs (either input stack, or the name) to an anvil are changed.
It is called fromRepairContainer#updateRepairOutput
.
If the event is canceled, vanilla behavior will not run, and the output will be set toItemStack#EMPTY
.
If the event is not canceled, but the output is not empty, it will set the output and not run vanilla behavior.
if the output is empty, and the event is not canceled, vanilla behavior will execute.
net.minecraftforge.event.AttachCapabilitiesEvent
ForgeEventFactory#gatherCapabilities
CapabilityProvider#gatherCapabilities
Fired whenever an object with Capabilities support {currently TileEntity/Item/Entity) is created. Allowing for the attachment of arbitrary capability providers. Please note that as this is fired for ALL object creations efficient code is recommended. And if possible use one of the sub-classes to filter your intended objects.
net.minecraftforge.event.CommandEvent
CommandEvent is fired after a command is parsed, but before it is executed. This event is fired during the invocation of
Commands#handleCommand(CommandSource, String)
.
#parse contains the instance ofParseResults
for the parsed command.
#exception begins null, but can be populated with an exception to be thrown within the command.
This event isCancelable
.
If the event is canceled, the execution of the command does not occur.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.DifficultyChangeEvent
ClientWorldInfo#setDifficulty
WorldSettings#withDifficulty
DifficultyChangeEvent is fired when difficulty is changing.
This event is fired via the ForgeHooks#onDifficultyChange(EnumDifficulty, EnumDifficulty).
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.ItemAttributeModifierEvent
ForgeHooks#getAttributeModifiers
ItemStack#getAttributeModifiers
This event is fired when the attributes for an ItemStack are being calculated. Attributes are calculated on the server when equipping and unequipping an item to add and remove attributes respectively, both must be consistent. Attributes are calculated on the client when rendering an item's tooltip to show relevant attributes.
Note that this event is fired regardless of if the stack has NBT overriding attributes or not. If your attribute should be ignored when attributes are overridden, you can check for the presence of theAttributeModifiers
tag.
This event is fired on the net.minecraftforge.common.MinecraftForge#EVENT_BUS.
net.minecraftforge.event.LootTableLoadEvent
ForgeEventFactory#loadLootTable
Event fired when a LootTable json is loaded from json. This event is fired whenever resources are loaded, or when the server starts. This event will NOT be fired for LootTables loaded from the world folder, these are considered configurations files and should not be modified by mods. Canceling the event will make it load a empty loot table.
net.minecraftforge.event.RegisterCommandsEvent
ForgeEventFactory#onCommandRegister
Commands are rebuilt whenever
DataPackRegistries
is recreated. You can use this event to register your commands whenever thenet.minecraft.command.Commands
class in constructed. The event is fired on the MinecraftForge#EVENT_BUS
net.minecraftforge.event.RegistryEvent
RegistryEvent supertype.
net.minecraftforge.event.RegistryEvent.MissingMappings
net.minecraftforge.event.RegistryEvent.NewRegistry
ModLoadingStage#CREATE_REGISTRIES
Register new registries when you receive this event, through the
RecipeBuilder
net.minecraftforge.event.RegistryEvent.Register
ForgeRegistry#getRegisterEvent
Register your objects for the appropriate registry type when you receive this event.
event.getRegistry().register(...)
The registries will be visited in alphabetic order of their name, except blocks and items, which will be visited FIRST and SECOND respectively. ObjectHolders will reload between Blocks and Items, and after all registries have been visited.
net.minecraftforge.event.ServerChatEvent
ServerPlayNetHandler#handleChat
ServerChatEvent is fired whenever a C01PacketChatMessage is processed.
This event is fired via ForgeHooks#onServerChatEvent(NetHandlerPlayServer, String, ITextComponent), which is executed by theNetHandlerPlayServer#processChatMessage(CPacketChatMessage)
#username contains the username of the player sending the chat message.
#message contains the message being sent.
#player the instance of EntityPlayerMP for the player sending the chat message.
#component contains the instance of ChatComponentTranslation for the sent message.
This event isCancelable
.
If this event is canceled, the chat message is never distributed to all clients.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.TagsUpdatedEvent
Fired on the client when
ITagCollectionSupplier
has all of its tags synced from the server to the client (just after a client has connected). Fired on the server whenITagCollectionSupplier
has read all tags from disk (during a data reload). This event is fired on the MinecraftForge#EVENT_BUS On the client, this event fires on the Client Thread. On the server, this event may be fired on the Server Thread, or an async reloader thread.
net.minecraftforge.event.TagsUpdatedEvent.CustomTagTypes
SyncCustomTagTypes#handle
DataPackRegistries#updateGlobals
Fired after any custom tag types have been processed
net.minecraftforge.event.TagsUpdatedEvent.VanillaTagTypes
ITagCollectionSupplier#bindToGlobal
Fired after the Vanilla Tag types have been processed
net.minecraftforge.event.TickEvent
net.minecraftforge.event.TickEvent.ClientTickEvent
BasicEventHooks#onPreClientTick
BasicEventHooks#onPostClientTick
net.minecraftforge.event.TickEvent.PlayerTickEvent
BasicEventHooks#onPlayerPreTick
BasicEventHooks#onPlayerPostTick
PlayerEntity#tick
PlayerEntity#tick
net.minecraftforge.event.TickEvent.RenderTickEvent
BasicEventHooks#onRenderTickStart
BasicEventHooks#onRenderTickEnd
Minecraft#runTick
Minecraft#runTick
net.minecraftforge.event.TickEvent.ServerTickEvent
BasicEventHooks#onPreServerTick
BasicEventHooks#onPostServerTick
MinecraftServer#tickServer
MinecraftServer#tickServer
net.minecraftforge.event.TickEvent.WorldTickEvent
BasicEventHooks#onPreWorldTick
BasicEventHooks#onPostWorldTick
MinecraftServer#tickChildren
MinecraftServer#tickChildren
net.minecraftforge.event.brewing.PlayerBrewedPotionEvent
ForgeEventFactory#onPlayerBrewedPotion
This event is called when a player picks up a potion from a brewing stand.
net.minecraftforge.event.brewing.PotionBrewEvent
net.minecraftforge.event.brewing.PotionBrewEvent.Post
ForgeEventFactory#onPotionBrewed
ForgeEventFactory#onPotionAttemptBrew
BrewingStandTileEntity#doBrew
PotionBrewEvent.Post is fired when a potion is brewed in the brewing stand.
The event is fired during theBrewingStandTileEntity#brewPotions()
method invocation.
#stacks contains the itemstack array from the TileEntityBrewer holding all items in Brewer.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.brewing.PotionBrewEvent.Pre
ForgeEventFactory#onPotionAttemptBrew
PotionBrewEvent.Pre is fired before vanilla brewing takes place. All changes made to the event's array will be made to the TileEntity if the event is canceled.
The event is fired during theBrewingStandTileEntity#brewPotions()
method invocation.
#stacks contains the itemstack array from the TileEntityBrewer holding all items in Brewer.
This event isCancelable
.
If the event is not canceled, the vanilla brewing will take place instead of modded brewing.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
If this event is canceled, and items have been modified, PotionBrewEvent.Post will automatically be fired.
net.minecraftforge.event.enchanting.EnchantmentLevelSetEvent
ForgeEventFactory#onEnchantmentLevelSet
EnchantmentContainer#slotsChanged
Fired when the enchantment level is set for each of the three potential enchantments in the enchanting table. The #level is set to the vanilla value and can be modified by this event handler. The #enchantRow is used to determine which enchantment level is being set, 1, 2, or 3. The #power is a number from 0-15 and indicates how many bookshelves surround the enchanting table. The #itemStack representing the item being enchanted is also available.
net.minecraftforge.event.entity.EntityAttributeCreationEvent
GameData#checkForRevertToVanilla
EntityAttributeCreationEvent.
Use this event to register attributes for your own EntityTypes. This event is fired after registration and before common setup.
Fired on the Mod bus IModBusEvent.
net.minecraftforge.event.entity.EntityAttributeModificationEvent
GameData#checkForRevertToVanilla
EntityAttributeModificationEvent.
Use this event to add attributes to existing entity types. This event is fired after registration and before common setup, and after EntityAttributeCreationEvent
Fired on the Mod bus IModBusEvent.
net.minecraftforge.event.entity.EntityEvent
EntityEvent is fired when an event involving any Entity occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
#entity contains the entity that caused this event to occur.
All children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.EntityEvent.CanUpdate
ForgeEventFactory#canEntityUpdate
CanUpdate is fired when an Entity is being created.
This event is fired whenever vanilla Minecraft determines that an entity
cannot update inWorld#updateEntityWithOptionalForce(net.minecraft.entity.Entity, boolean)
CanUpdate#canUpdate contains the boolean value of whether this entity can update.
If the modder decides that this Entity can be updated, they may change canUpdate to true,
and the entity with then be updated.
This event is notCancelable
.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.EntityEvent.EnteringChunk
EnteringChunk is fired when an Entity enters a chunk.
This event is fired whenever vanilla Minecraft determines that an entity
is entering a chunk inChunk#addEntity(net.minecraft.entity.Entity)
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.EntityEvent.EntityConstructing
EntityConstructing is fired when an Entity is being created.
This event is fired within the constructor of the Entity.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.EntityEvent.Size
ForgeEventFactory#getEntitySizeForge
ForgeEventFactory#getEntitySizeForge
Entity#
Entity#refreshDimensions
This event is fired whenever the
Pose
changes, and in a few other hardcoded scenarios.
CAREFUL: This is also fired in the Entity constructor. Therefore the entity(subclass) might not be fully initialized. Check Entity#isAddedToWorld() or !Entity#firstUpdate.
If you change the player's size, you probably want to set the eye height accordingly as well
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.EntityJoinWorldEvent
ClientWorld#addEntity
ServerWorld#addPlayer
ServerWorld#addEntity
ServerWorld#loadFromChunk
EntityJoinWorldEvent is fired when an Entity joins the world.
This event is fired whenever an Entity is added to the world inWorld#loadEntities(Collection)
,net.minecraft.world.ServerWorld#loadEntities(Collection)
World#joinEntityInSurroundings(Entity)
, andWorld#spawnEntity(Entity)
.
Note: This event may be called before the underlyingnet.minecraft.world.chunk.Chunk
is promoted tonet.minecraft.world.chunk.ChunkStatus#FULL
. You will cause chunk loading deadlocks if you don't delay your world interactions.
#world contains the world in which the entity is to join.
This event isCancelable
.
If this event is canceled, the Entity is not added to the world.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.EntityLeaveWorldEvent
ClientWorld#onEntityRemoved
ServerWorld#removeEntityComplete
EntityLeaveWorldEvent is fired when an Entity leaves the world.
This event is fired whenever an Entity is removed from the world inClientWorld#removeEntity(Entity)
,ServerWorld#removeEntityComplete(Entity,Boolean)
.
#world contains the world from which the entity is removed.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS
net.minecraftforge.event.entity.EntityMobGriefingEvent
ForgeEventFactory#getMobGriefingEvent
ForgeHooks#canEntityDestroy
CampfireBlock#onProjectileHit
CropsBlock#entityInside
TurtleEggBlock#canDestroyEgg
FarmTask#checkExtraStartConditions
EatGrassGoal#tick
EatGrassGoal#tick
WitherEntity#customServerAiStep
WitherEntity#customServerAiStep
Entity#canTrample
LivingEntity#createWitherRose
MobEntity#aiStep
CreeperEntity#explodeCreeper
PlaceBlockGoal#canUse
TakeBlockGoal#canUse
WololoSpellGoal#canUse
RavagerEntity#aiStep
HideInStoneGoal#canUse
SummonSilverfishGoal#tick
EatBerriesGoal#onReachedTarget
RaidFarmGoal#canUse
SnowGolemEntity#aiStep
FireballEntity#onHit
SmallFireballEntity#onHitBlock
WitherSkullEntity#onHit
EntityMobGriefingEvent is fired when mob griefing is about to occur and allows an event listener to specify whether it should or not.
This event is fired when ever themobGriefing
game rule is checked.
This event has aresult
:Result#ALLOW
means this instance of mob griefing is allowed.Result#DEFAULT
means themobGriefing
game rule is used to determine the behaviour.Result#DENY
means this instance of mob griefing is not allowed.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.EntityMountEvent
ForgeEventFactory#canMountEntity
Entity#startRiding
Entity#removeVehicle
net.minecraftforge.event.entity.EntityStruckByLightningEvent
ForgeEventFactory#onEntityStruckByLightning
EntityStruckByLightningEvent is fired when an Entity is about to be struck by lightening.
This event is fired whenever an EntityLightningBolt is updated to strike an Entity inEntityLightningBolt#onUpdate()
via ForgeEventFactory#onEntityStruckByLightning(Entity, EntityLightningBolt).
#lightning contains the instance of EntityLightningBolt attempting to strike an entity.
This event isCancelable
.
If this event is canceled, the Entity is not struck by the lightening.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.EntityTravelToDimensionEvent
ForgeHooks#onTravelToDimension
ServerPlayerEntity#changeDimension
ServerPlayerEntity#teleportTo
EntityTravelToDimensionEvent is fired before an Entity travels to a dimension.
#dimension contains the id of the dimension the entity is traveling to.
This event isCancelable
.
If this event is canceled, the Entity does not travel to the dimension.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.PlaySoundAtEntityEvent
ForgeEventFactory#onPlaySoundAtEntity
ClientPlayerEntity#playSound
ClientWorld#playSound
ClientWorld#playSound
ServerWorld#playSound
ServerWorld#playSound
PlaySoundAtEntityEvent is fired a sound is to be played at an Entity
This event is fired whenever a sound is set to be played at an Entity such as inClientPlayerEntity#playSound(SoundEvent, float, float)
andWorld#playSound(PlayerEntity, double, double, double, SoundEvent, SoundCategory, float, float)
.
#name contains the name of the sound to be played at the Entity.
#volume contains the volume at which the sound is to be played originally.
#pitch contains the pitch at which the sound is to be played originally.
#newVolume contains the volume at which the sound is actually played.
#newPitch contains the pitch at which the sound is actually played.
Changing the #name field will cause the sound of this name to be played instead of the originally intended sound.
This event isCancelable
.
If this event is canceled, the sound is not played.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.ProjectileImpactEvent
ForgeEventFactory#onProjectileImpact
AbstractArrowEntity#tick
DamagingProjectileEntity#tick
FireworkRocketEntity#onHit
LlamaSpitEntity#tick
ShulkerBulletEntity#tick
ThrowableEntity#tick
This event is fired when a projectile entity impacts something. This event is fired via ForgeEventFactory#onProjectileImpact(Entity, RayTraceResult) Subclasses of this event exist for more specific types of projectile. This event is fired for all vanilla projectiles by Forge, custom projectiles should fire this event and check the result in a similar fashion. This event is cancelable. When canceled, the impact will not be processed. Killing or other handling of the entity after event cancellation is up to the modder. This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.ProjectileImpactEvent.Arrow
ForgeEventFactory#onProjectileImpact
AbstractArrowEntity#tick
DamagingProjectileEntity#tick
FireworkRocketEntity#onHit
LlamaSpitEntity#tick
ShulkerBulletEntity#tick
ThrowableEntity#tick
net.minecraftforge.event.entity.ProjectileImpactEvent.Fireball
ForgeEventFactory#onProjectileImpact
AbstractArrowEntity#tick
DamagingProjectileEntity#tick
FireworkRocketEntity#onHit
LlamaSpitEntity#tick
ShulkerBulletEntity#tick
ThrowableEntity#tick
net.minecraftforge.event.entity.ProjectileImpactEvent.FireworkRocket
ForgeEventFactory#onProjectileImpact
AbstractArrowEntity#tick
DamagingProjectileEntity#tick
FireworkRocketEntity#onHit
LlamaSpitEntity#tick
ShulkerBulletEntity#tick
ThrowableEntity#tick
Event is cancellable, causes firework to ignore the current hit and continue on its journey.
net.minecraftforge.event.entity.ProjectileImpactEvent.Throwable
ForgeEventFactory#onProjectileImpact
AbstractArrowEntity#tick
DamagingProjectileEntity#tick
FireworkRocketEntity#onHit
LlamaSpitEntity#tick
ShulkerBulletEntity#tick
ThrowableEntity#tick
net.minecraftforge.event.entity.item.ItemEvent
Base class for all EntityItem events. Contains a reference to the EntityItem of interest. For most EntityItem events, there's little to no additional useful data from the firing method that isn't already contained within the EntityItem instance.
net.minecraftforge.event.entity.item.ItemExpireEvent
ForgeEventFactory#onItemExpire
Event that is fired when an EntityItem's age has reached its maximum lifespan. Canceling this event will prevent the EntityItem from being flagged as dead, thus staying it's removal from the world. If canceled it will add more time to the entities life equal to extraLife.
net.minecraftforge.event.entity.item.ItemTossEvent
PlayerEntity#drop
PlayerEntity#drop
Event that is fired whenever a player tosses (Q) an item or drag-n-drops a stack of items outside the inventory GUI screens. Canceling the event will stop the items from entering the world, but will not prevent them being removed from the inventory - and thus removed from the system.
net.minecraftforge.event.entity.living.AnimalTameEvent
ForgeEventFactory#onAnimalTame
RunAroundLikeCrazyGoal#tick
CatEntity#mobInteract
OcelotEntity#mobInteract
ParrotEntity#mobInteract
WolfEntity#mobInteract
This event is fired when an
EntityAnimal
is tamed.
It is fired via ForgeEventFactory#onAnimalTame(EntityAnimal, EntityPlayer). Forge fires this event for applicable vanilla animals, mods need to fire it themselves. This event isCancelable
. If canceled, taming the animal will fail. This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.BabyEntitySpawnEvent
AnimalEntity#spawnChildFromBreeding
MateGoal#breed
BabyEntitySpawnEvent is fired just before a baby entity is about to be spawned.
Parents will have disengaged their relationship.@Cancelable
It is possible to change the child completely by using #setChild(EntityAgeable)
This event is fired fromEntityAIMate#spawnBaby()
andEntityAIVillagerMate#giveBirth()
#parentA contains the initiating parent entity.
#parentB contains the secondary parent entity.
#causedByPlayer contains the player responsible for the breading (if applicable).
#child contains the child that will be spawned.
This event isCancelable
.
If this event is canceled, the child Entity is not added to the world, and the parents
will no longer attempt to mate.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.EnderTeleportEvent
ForgeEventFactory#onOldEnderTeleport
ForgeEventFactory#onEnderTeleport
ForgeEventFactory#onEnderPearlLand
Event for when an Enderman/Shulker teleports or an ender pearl is used. Can be used to either modify the target position, or cancel the teleport outright.
net.minecraftforge.event.entity.living.EntityTeleportEvent
EntityTeleportEvent is fired when an event involving any teleportation of an Entity occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
#getTarget() contains the target destination.
#getPrev() contains the entity's current position.
All children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.EntityTeleportEvent.ChorusFruit
ForgeEventFactory#onChorusFruitTeleport
ChorusFruitItem#finishUsingItem
EntityTeleportEvent.ChorusFruit is fired before a LivingEntity is teleported due to consuming Chorus Fruit.
This event isCancelable
.
If the event is not canceled, the entity will be teleported.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
This event is only fired on thenet.minecraftforge.fml.LogicalSide#SERVER
side.
If this event is canceled, the entity will not be teleported.
net.minecraftforge.event.entity.living.EntityTeleportEvent.EnderEntity
ForgeEventFactory#onEnderTeleport
EndermanEntity#teleport
ShulkerEntity#teleportSomewhere
EntityTeleportEvent.EnderEntity is fired before an Enderman or Shulker randomly teleports.
This event isCancelable
.
If the event is not canceled, the entity will be teleported.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
This event is only fired on thenet.minecraftforge.fml.LogicalSide#SERVER
side.
If this event is canceled, the entity will not be teleported.
net.minecraftforge.event.entity.living.EntityTeleportEvent.EnderPearl
ForgeEventFactory#onEnderPearlLand
EntityTeleportEvent.EnderPearl is fired before an Entity is teleported from an EnderPearlEntity.
This event isCancelable
.
If the event is not canceled, the entity will be teleported.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
This event is only fired on thenet.minecraftforge.fml.LogicalSide#SERVER
side.
If this event is canceled, the entity will not be teleported.
net.minecraftforge.event.entity.living.EntityTeleportEvent.SpreadPlayersCommand
ForgeEventFactory#onEntityTeleportSpreadPlayersCommand
SpreadPlayersCommand#setPlayerPositions
EntityTeleportEvent.SpreadPlayersCommand is fired before a living entity is teleported from use of
net.minecraft.command.impl.SpreadPlayersCommand
.
This event isCancelable
.
If the event is not canceled, the entity will be teleported.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
This event is only fired on thenet.minecraftforge.fml.LogicalSide#SERVER
side.
If this event is canceled, the entity will not be teleported.
net.minecraftforge.event.entity.living.EntityTeleportEvent.TeleportCommand
ForgeEventFactory#onEntityTeleportCommand
TeleportCommand#performTeleport
EntityTeleportEvent.TeleportCommand is fired before a living entity is teleported from use of
net.minecraft.command.impl.TeleportCommand
.
This event isCancelable
.
If the event is not canceled, the entity will be teleported.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
This event is only fired on thenet.minecraftforge.fml.LogicalSide#SERVER
side.
If this event is canceled, the entity will not be teleported.
net.minecraftforge.event.entity.living.LivingAttackEvent
ForgeHooks#onLivingAttack
ForgeHooks#onPlayerAttack
ClientPlayerEntity#hurt
RemoteClientPlayerEntity#hurt
LivingEntity#hurt
PlayerEntity#hurt
LivingAttackEvent is fired when a living Entity is attacked.
This event is fired whenever an Entity is attacked inEntityLivingBase#attackEntityFrom(DamageSource, float)
andEntityPlayer#attackEntityFrom(DamageSource, float)
.
This event is fired via the ForgeHooks#onLivingAttack(EntityLivingBase, DamageSource, float).
#source contains the DamageSource of the attack.
#amount contains the amount of damage dealt to the entity.
This event isCancelable
.
If this event is canceled, the Entity does not take attack damage.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingConversionEvent
net.minecraftforge.event.entity.living.LivingConversionEvent.Post
ForgeEventFactory#onLivingConvert
VillagerEntity#thunderHit
HoglinEntity#finishConversion
AbstractPiglinEntity#finishConversion
ZombieEntity#convertToZombieType
ZombieEntity#killed
ZombieVillagerEntity#finishConversion
PigEntity#thunderHit
LivingConversionEvent.Post is triggered when an entity is replacing itself with another entity. The old living entity is likely to be removed right after this event.
net.minecraftforge.event.entity.living.LivingConversionEvent.Pre
ForgeEventFactory#canLivingConvert
VillagerEntity#thunderHit
HoglinEntity#customServerAiStep
AbstractPiglinEntity#customServerAiStep
ZombieEntity#tick
ZombieEntity#killed
ZombieVillagerEntity#tick
PigEntity#thunderHit
LivingConversionEvent.Pre is triggered when an entity is trying to replace itself with another entity This event may trigger every tick even if it was cancelled last tick for entities like Zombies and Hoglins. To prevent it, the conversion timer needs to be changed or reset This event is
Cancelable
If cancelled, the replacement will not occur
net.minecraftforge.event.entity.living.LivingDamageEvent
LivingEntity#actuallyHurt
PlayerEntity#actuallyHurt
LivingDamageEvent is fired just before damage is applied to entity.
At this point armor, potion and absorption modifiers have already been applied to damage - this is FINAL value.
Also note that appropriate resources (like armor durability and absorption extra hearths) have already been consumed.
This event is fired whenever an Entity is damaged inEntityLivingBase#damageEntity(DamageSource, float)
andEntityPlayer#damageEntity(DamageSource, float)
.
This event is fired via the ForgeHooks#onLivingDamage(EntityLivingBase, DamageSource, float).
#source contains the DamageSource that caused this Entity to be hurt.
#amount contains the final amount of damage that will be dealt to entity.
This event isCancelable
.
If this event is canceled, the Entity is not hurt. Used resources WILL NOT be restored.
This event does not have a result.
net.minecraftforge.event.entity.living.LivingDeathEvent
LivingEntity#die
PlayerEntity#die
ServerPlayerEntity#die
LivingDeathEvent is fired when an Entity dies.
This event is fired whenever an Entity dies inEntityLivingBase#onDeath(DamageSource)
,EntityPlayer#onDeath(DamageSource)
, andEntityPlayerMP#onDeath(DamageSource)
.
This event is fired via the ForgeHooks#onLivingDeath(EntityLivingBase, DamageSource).
#source contains the DamageSource that caused the entity to die.
This event isCancelable
.
If this event is canceled, the Entity does not die.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingDestroyBlockEvent
ForgeEventFactory#onEntityDestroyBlock
ForgeHooks#canEntityDestroy
WitherEntity#customServerAiStep
Fired when the ender dragon or wither attempts to destroy a block and when ever a zombie attempts to break a door. Basically a event version of
Block#canEntityDestroy(IBlockState, IBlockAccess, BlockPos, Entity)
This event isCancelable
.
If this event is canceled, the block will not be destroyed.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingDropsEvent
LivingDropsEvent is fired when an Entity's death causes dropped items to appear.
This event is fired whenever an Entity dies and drops items inEntityLivingBase#onDeath(DamageSource)
.
This event is fired via the ForgeHooks#onLivingDrops(EntityLivingBase, DamageSource, ArrayList, int, boolean).
#source contains the DamageSource that caused the drop to occur.
#drops contains the ArrayList of EntityItems that will be dropped.
#lootingLevel contains the amount of loot that will be dropped.
#recentlyHit determines whether the Entity doing the drop has recently been damaged.
This event isCancelable
.
If this event is canceled, the Entity does not drop anything.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingEntityUseItemEvent
net.minecraftforge.event.entity.living.LivingEntityUseItemEvent.Finish
ForgeEventFactory#onItemUseFinish
LivingEntity#completeUsingItem
Fired after an item has fully finished being used. The item has been notified that it was used, and the item/result stacks reflect after that state. This means that when this is fired for a Potion, the potion effect has already been applied. LivingEntityUseItemEvent#item is a copy of the item BEFORE it was used. If you wish to cancel those effects, you should cancel one of the above events. The result item stack is the stack that is placed in the player's inventory in replacement of the stack that is currently being used.
net.minecraftforge.event.entity.living.LivingEntityUseItemEvent.Start
ForgeEventFactory#onItemUseStart
Fired when a player starts 'using' an item, typically when they hold right mouse. Examples: Drawing a bow Eating Food Drinking Potions/Milk Guarding with a sword Cancel the event, or set the duration or <= 0 to prevent it from processing.
net.minecraftforge.event.entity.living.LivingEntityUseItemEvent.Stop
ForgeEventFactory#onUseItemStop
Fired when a player stops using an item without the use duration timing out. Example: Stop eating 1/2 way through Stop defending with sword Stop drawing bow. This case would fire the arrow Duration on this event is how long the item had left in it's count down before 'finishing' Canceling this event will prevent the Item from being notified that it has stopped being used, The only vanilla item this would effect are bows, and it would cause them NOT to fire there arrow.
net.minecraftforge.event.entity.living.LivingEntityUseItemEvent.Tick
ForgeEventFactory#onItemUseTick
LivingEntity#updatingUsingItem
Fired every tick that a player is 'using' an item, see Start for info. Cancel the event, or set the duration or <= 0 to cause the player to stop using the item.
net.minecraftforge.event.entity.living.LivingEquipmentChangeEvent
LivingEntity#collectEquipmentChanges
LivingEquipmentChangeEvent is fired when the Equipment of a Entity changes.
This event is fired whenever changes in Equipment are detected inEntityLivingBase#onUpdate()
.
This also includes entities joining the World, as well as being cloned.
This event is fired on server-side only.
#slot contains the affectedEntityEquipmentSlot
.
#from contains theItemStack
that was equipped previously.
#to contains theItemStack
that is equipped now.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingEvent
LivingEvent is fired whenever an event involving Living entities occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
All children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent
LivingEntity#jumpFromGround
MagmaCubeEntity#jumpFromGround
AbstractHorseEntity#travel
LivingJumpEvent is fired when an Entity jumps.
This event is fired whenever an Entity jumps inEntityLivingBase#jump()
,EntityMagmaCube#jump()
, andEntityHorse#jump()
.
This event is fired via the ForgeHooks#onLivingJump(EntityLivingBase).
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent
LivingUpdateEvent is fired when an Entity is updated.
This event is fired whenever an Entity is updated inEntityLivingBase#onUpdate()
.
This event is fired via the ForgeHooks#onLivingUpdate(EntityLivingBase).
This event isCancelable
.
If this event is canceled, the Entity does not update.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingEvent.LivingVisibilityEvent
ForgeHooks#getEntityVisibilityMultiplier
LivingEntity#getVisibilityPercent
net.minecraftforge.event.entity.living.LivingExperienceDropEvent
ForgeEventFactory#getExperienceDrop
Event for when an entity drops experience on its death, can be used to change the amount of experience points dropped or completely prevent dropping of experience by canceling the event.
net.minecraftforge.event.entity.living.LivingFallEvent
LivingFallEvent is fired when an Entity is set to be falling.
This event is fired whenever an Entity is set to fall inEntityLivingBase#fall(float, float)
.
This event is fired via the ForgeHooks#onLivingFall(EntityLivingBase, float, float).
#distance contains the distance the Entity is to fall. If this event is canceled, this value is set to 0.0F.
This event isCancelable
.
If this event is canceled, the Entity does not fall.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingHealEvent
ForgeEventFactory#onLivingHeal
LivingHealEvent is fired when an Entity is set to be healed.
This event is fired whenever an Entity is healed inEntityLivingBase#heal(float)
This event is fired via the ForgeEventFactory#onLivingHeal(EntityLivingBase, float).
#amount contains the amount of healing done to the Entity that was healed.
This event isCancelable
.
If this event is canceled, the Entity is not healed.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingHurtEvent
LivingEntity#actuallyHurt
PlayerEntity#actuallyHurt
LivingHurtEvent is fired when an Entity is set to be hurt.
This event is fired whenever an Entity is hurt inEntityLivingBase#damageEntity(DamageSource, float)
andEntityPlayer#damageEntity(DamageSource, float)
.
This event is fired via the ForgeHooks#onLivingHurt(EntityLivingBase, DamageSource, float).
#source contains the DamageSource that caused this Entity to be hurt.
#amount contains the amount of damage dealt to the Entity that was hurt.
This event isCancelable
.
If this event is canceled, the Entity is not hurt.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingKnockBackEvent
LivingKnockBackEvent is fired when a living entity is about to be knocked back.
This event is fired whenever an Entity is knocked back inEntityLivingBase#attackEntityFrom(DamageSource, float)
,EntityLivingBase#blockWithShield(EntityLivingBase)
,EntityMob#attackEntityAsMob(Entity)
andEntityPlayer#attackTargetEntityWithCurrentItem(Entity)
This event is fired via ForgeHooks#onLivingKnockBack(EntityLivingBase, Entity, float, double, double).
attacker
contains the Entity that caused the knock back.
#strength contains the strength of the knock back.
#ratioX contains the x ratio of the knock back.
#ratioZ contains the z ratio of the knock back.
This event isCancelable
.
If this event is canceled, the entity is not knocked back.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingPackSizeEvent
ForgeEventFactory#getMaxSpawnPackSize
WorldEntitySpawner#spawnCategoryForPosition
net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent
ForgeHooks#onLivingSetAttackTarget
LivingSetAttackTargetEvent is fired when an Entity sets a target to attack.
This event is fired whenever an Entity sets a target to attack inEntityLiving#setAttackTarget(EntityLivingBase)
andEntityLivingBase#setRevengeTarget(EntityLivingBase)
.
This event is fired via the ForgeHooks#onLivingSetAttackTarget(EntityLivingBase, EntityLivingBase).
#target contains the newly targeted Entity.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingSpawnEvent
LivingSpawnEvent is fired for any events associated with Living Entities spawn status.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
#world contains the world in which this living Entity is being spawned.
#x contains the x-coordinate this entity is being spawned at.
#y contains the y-coordinate this entity is being spawned at.
#z contains the z-coordinate this entity is being spawned at.
All children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LivingSpawnEvent.AllowDespawn
ForgeEventFactory#canEntityDespawn
Fired each tick for despawnable mobs to allow control over despawning.
Result#DEFAULT
will pass the mob on to vanilla despawn mechanics.Result#ALLOW
will force the mob to despawn.Result#DENY
will force the mob to remain. This is fired every tick for every despawnable entity. Be efficient in your handlers. Note: this is not fired if the mob is definitely going to otherwise despawn. It is fired to check if the mob can be allowed to despawn. SeeEntityLiving#despawnEntity
net.minecraftforge.event.entity.living.LivingSpawnEvent.CheckSpawn
ForgeEventFactory#canEntitySpawn
ForgeHooks#canEntitySpawn
ForgeEventFactory#canEntitySpawnSpawner
Fires before mob spawn events. Result is significant: DEFAULT: use vanilla spawn rules ALLOW: allow the spawn DENY: deny the spawn
net.minecraftforge.event.entity.living.LivingSpawnEvent.SpecialSpawn
ForgeEventFactory#doSpecialSpawn
EntityType#spawn
AbstractSpawner#tick
WorldEntitySpawner#spawnCategoryForPosition
SpecialSpawn is fired when an Entity is to be spawned.
This allows you to do special inializers in the new entity.
This event is fired via the ForgeEventFactory#doSpecialSpawn(EntityLiving, World, float, float, float).
This event isCancelable
.
If this event is canceled, the Entity is not spawned.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.LootingLevelEvent
LivingEntity#dropAllDeathLoot
LootContext#getLootingModifier
net.minecraftforge.event.entity.living.PotionColorCalculationEvent
LivingEntity#updateInvisibilityStatus
Fires after Potion Color Calculation. this event is not
Cancelable
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.PotionEvent
This Event and its subevents gets fired from
EntityLivingBase
on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.PotionEvent.PotionAddedEvent
This Event is fired when a new Potion is added to the Entity. This is also fired if the Entity already has this effect but with different duration/level. This Event is not
Cancelable
This Event does not have a Result.
net.minecraftforge.event.entity.living.PotionEvent.PotionApplicableEvent
LivingEntity#canBeAffected
SpiderEntity#canBeAffected
This Event is fired to check if a Potion can get applied to an Entity. This Event is not
Cancelable
This Event has a result . ALLOW will apply this potion effect. DENY will not apply this potion effect. DEFAULT will run vanilla logic to determine if this potion isApplicable.
net.minecraftforge.event.entity.living.PotionEvent.PotionExpiryEvent
This Event is fired when a Potion effect expires on an Entity. This Event is not
Cancelable
This Event does not have a Result.
net.minecraftforge.event.entity.living.PotionEvent.PotionRemoveEvent
LivingEntity#removeAllEffects
LivingEntity#removeEffect
LivingEntity#curePotionEffects
This Event is fired when a Potion is about to get removed from an Entity. This Event is
Cancelable
. This Event does not have a result.
net.minecraftforge.event.entity.living.ZombieEvent
ZombieEvent is fired whenever a zombie is spawned for aid. If a method utilizes this
Event
as its parameter, the method will receive every child event of this class. All children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.living.ZombieEvent.SummonAidEvent
ForgeEventFactory#fireZombieSummonAid
SummonAidEvent is fired when a Zombie Entity is summoned. This event is fired whenever a Zombie Entity is summoned in
EntityZombie#attackEntityFrom(DamageSource, float)
. This event is fired via the ForgeEventFactory#fireZombieSummonAid(EntityZombie, World, int, int, int, EntityLivingBase, double). #customSummonedAid remains null, but can be populated with a custom EntityZombie which will be spawned. #world contains the world that this summoning is occurring in. #x contains the x-coordinate at which this summoning event is occurring. #y contains the y-coordinate at which this summoning event is occurring. #z contains the z-coordinate at which this summoning event is occurring. #attacker contains the living Entity that attacked and caused this event to fire. #summonChance contains the likelihood that a Zombie would successfully be summoned. This event is notCancelable
. This event has a result.Result#ALLOW
Zombie is summoned.Result#DENY
Zombie is not summoned. This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.AdvancementEvent
This event is fired when a player gets an advancement.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.AnvilRepairEvent
Fired when the player removes a "repaired" item from the Anvil's Output slot. breakChance specifies as a percentage the chance that the anvil will be "damaged" when used. ItemStacks are the inputs/output from the anvil. They cannot be edited.
net.minecraftforge.event.entity.player.ArrowLooseEvent
ForgeEventFactory#onArrowLoose
ArrowLooseEvent is fired when a player stops using a bow.
This event is fired whenever a player stops using a bow inItemBow#onPlayerStoppedUsing(ItemStack, World, EntityLivingBase, int)
.
#bow contains the ItemBow ItemStack that was used in this event.
#charge contains the value for how much the player had charged before stopping the shot.
This event isCancelable
.
If this event is canceled, the player does not stop using the bow.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.ArrowNockEvent
ArrowNockEvent is fired when a player begins using a bow.
This event is fired whenever a player begins using a bow inItemBow#onItemRightClick(World, EntityPlayer, EnumHand)
.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.AttackEntityEvent
ForgeHooks#onPlayerAttackTarget
AttackEntityEvent is fired when a player attacks an Entity.
This event is fired whenever a player attacks an Entity inEntityPlayer#attackTargetEntityWithCurrentItem(Entity)
.
#target contains the Entity that was damaged by the player.
This event isCancelable
.
If this event is canceled, the player does not attack the Entity.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.BonemealEvent
ForgeEventFactory#onApplyBonemeal
This event is called when a player attempts to use Bonemeal on a block. It can be canceled to completely prevent any further processing. You can also set the result to ALLOW to mark the event as processed and use up a bonemeal from the stack but do no further processing. setResult(ALLOW) is the same as the old setHandled()
net.minecraftforge.event.entity.player.CriticalHitEvent
This event is fired whenever a player attacks an Entity in EntityPlayer#attackTargetEntityWithCurrentItem(Entity).
This event is notCancelable
.
This event has a result.
DEFAULT: means the vanilla logic will determine if this a critical hit.
DENY: it will not be a critical hit but the player still will attack
ALLOW: this attack is forced to be critical
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.EntityItemPickupEvent
ForgeEventFactory#onItemPickup
This event is called when a player collides with a EntityItem on the ground. The event can be canceled, and no further processing will be done. You can set the result of this event to ALLOW which will trigger the processing of achievements, FML's event, play the sound, and kill the entity if all the items are picked up. setResult(ALLOW) is the same as the old setHandled()
net.minecraftforge.event.entity.player.FillBucketEvent
This event is fired when a player attempts to use a Empty bucket, it can be canceled to completely prevent any further processing. If you set the result to 'ALLOW', it means that you have processed the event and wants the basic functionality of adding the new ItemStack to your inventory and reducing the stack size to process. setResult(ALLOW) is the same as the old setHandled();
net.minecraftforge.event.entity.player.ItemFishedEvent
This event is called when a player fishes an item. This event is
Cancelable
Canceling the event will cause the player to receive no items at all. The hook will still take the damage specified
net.minecraftforge.event.entity.player.ItemTooltipEvent
ForgeEventFactory#onItemTooltip
net.minecraftforge.event.entity.player.PlayerContainerEvent
net.minecraftforge.event.entity.player.PlayerContainerEvent.Close
ServerPlayerEntity#doCloseContainer
net.minecraftforge.event.entity.player.PlayerContainerEvent.Open
NetworkHooks#openGui
ServerPlayerEntity#openMenu
ServerPlayerEntity#openHorseInventory
net.minecraftforge.event.entity.player.PlayerDestroyItemEvent
ForgeEventFactory#onPlayerDestroyItem
ForgeHooks#onPlaceItemIntoWorld
ForgeHooks#getContainerItem
PlayerController#useItem
LivingEntity#releaseUsingItem
PlayerEntity#hurtCurrentlyUsedShield
PlayerEntity#interactOn
PlayerEntity#interactOn
PlayerEntity#attack
PlayerInteractionManager#destroyBlock
PlayerDestroyItemEvent is fired when a player destroys an item.
This event is fired whenever a player destroys an item inPlayerController#onPlayerDestroyBlock(BlockPos)
,PlayerController#processRightClick(PlayerEntity, World, Hand)
,PlayerController#processRightClickBlock(ClientPlayerEntity, ClientWorld, BlockPos, Direction, Vec3d, Hand)
,PlayerEntity#attackTargetEntityWithCurrentItem(Entity)
,PlayerEntity#damageShield(float)
,PlayerEntity#interactOn(Entity, Hand)
, ForgeHooks#getContainerItem(ItemStack),PlayerInteractionManager#processRightClick(PlayerEntity, World, ItemStack, Hand)
,PlayerInteractionManager#processRightClickBlock(PlayerEntity, World, ItemStack, Hand, BlockPos, Direction, float, float, float)
andPlayerInteractionManager#tryHarvestBlock(BlockPos)
.
#original contains the original ItemStack before the item was destroyed.
(@link #hand) contains the hand that the current item was held in.
This event is notCancelable
.
This event does not have a result.
This event is fired from ForgeEventFactory#onPlayerDestroyItem(PlayerEntity, ItemStack, Hand).
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.PlayerEvent
PlayerEvent is fired whenever an event involving Living entities occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
All children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.PlayerEvent.BreakSpeed
ForgeEventFactory#getBreakSpeed
BreakSpeed is fired when a player attempts to harvest a block.
This event is fired whenever a player attempts to harvest a block inEntityPlayer#canHarvestBlock(IBlockState)
.
This event is fired via the ForgeEventFactory#getBreakSpeed(EntityPlayer, IBlockState, float, BlockPos).
#state contains the block being broken.
#originalSpeed contains the original speed at which the player broke the block.
#newSpeed contains the newSpeed at which the player will break the block.
#pos contains the coordinates at which this event is occurring. Y value -1 means location is unknown.
This event isCancelable
.
If it is canceled, the player is unable to break the block.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.PlayerEvent.Clone
ForgeEventFactory#onPlayerClone
ServerPlayerEntity#restoreFrom
Fired when the EntityPlayer is cloned, typically caused by the network sending a RESPAWN_PLAYER event. Either caused by death, or by traveling from the End to the overworld.
net.minecraftforge.event.entity.player.PlayerEvent.HarvestCheck
ForgeEventFactory#doPlayerHarvestCheck
ForgeHooks#canHarvestBlock
ForgeHooks#canHarvestBlock
PlayerEntity#hasCorrectToolForDrops
HarvestCheck is fired when a player attempts to harvest a block.
This event is fired whenever a player attempts to harvest a block inEntityPlayer#canHarvestBlock(IBlockState)
.
This event is fired via the ForgeEventFactory#doPlayerHarvestCheck(EntityPlayer, IBlockState, boolean).
#state contains theIBlockState
that is being checked for harvesting.
#success contains the boolean value for whether the Block will be successfully harvested.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.PlayerEvent.ItemCraftedEvent
BasicEventHooks#firePlayerCraftingEvent
CraftingResultSlot#checkTakeAchievements
net.minecraftforge.event.entity.player.PlayerEvent.ItemPickupEvent
BasicEventHooks#firePlayerItemPickupEvent
net.minecraftforge.event.entity.player.PlayerEvent.ItemSmeltedEvent
BasicEventHooks#firePlayerSmeltedEvent
FurnaceResultSlot#checkTakeAchievements
net.minecraftforge.event.entity.player.PlayerEvent.LoadFromFile
ForgeEventFactory#firePlayerLoadingEvent
ForgeEventFactory#firePlayerLoadingEvent
PlayerList#load
PlayerData#load
The player is being loaded from the world save. Note that the player won't have been added to the world yet. Intended to allow mods to load an additional file from the players directory containing additional mod related player data.
net.minecraftforge.event.entity.player.PlayerEvent.NameFormat
ForgeEventFactory#getPlayerDisplayName
PlayerEntity#getDisplayName
PlayerEntity#refreshDisplayName
NameFormat is fired when a player's display name is retrieved.
This event is fired whenever a player's name is retrieved inEntityPlayer#getDisplayName()
orEntityPlayer#refreshDisplayName()
.
This event is fired via the ForgeEventFactory#getPlayerDisplayName(EntityPlayer, String).
#username contains the username of the player. #displayname contains the display name of the player.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.PlayerEvent.PlayerChangeGameModeEvent
ServerPlayerEntity#setGameMode
Fired when the game type of a server player is changed to a different value than what it was previously. Eg Creative to Survival, not Survival to Survival. If the event is cancelled the game mode of the player is not changed and the value of
newGameMode
is ignored.
net.minecraftforge.event.entity.player.PlayerEvent.PlayerChangedDimensionEvent
BasicEventHooks#firePlayerChangedDimensionEvent
ServerPlayerEntity#changeDimension
ServerPlayerEntity#teleportTo
net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedInEvent
BasicEventHooks#firePlayerLoggedIn
net.minecraftforge.event.entity.player.PlayerEvent.PlayerLoggedOutEvent
BasicEventHooks#firePlayerLoggedOut
net.minecraftforge.event.entity.player.PlayerEvent.PlayerRespawnEvent
BasicEventHooks#firePlayerRespawnEvent
net.minecraftforge.event.entity.player.PlayerEvent.SaveToFile
ForgeEventFactory#firePlayerSavingEvent
The player is being saved to the world store. Note that the player may be in the process of logging out or otherwise departing from the world. Don't assume it's association with the world. This allows mods to load an additional file from the players directory containing additional mod related player data.
Use this event to save the additional mod related player data to the world.
WARNING: Do not overwrite the player's .dat file here. You will corrupt the world state.
net.minecraftforge.event.entity.player.PlayerEvent.StartTracking
ForgeEventFactory#onStartEntityTracking
Fired when an Entity is started to be "tracked" by this player (the player receives updates about this entity, e.g. motion).
net.minecraftforge.event.entity.player.PlayerEvent.StopTracking
ForgeEventFactory#onStopEntityTracking
Fired when an Entity is stopped to be "tracked" by this player (the player no longer receives updates about this entity, e.g. motion).
net.minecraftforge.event.entity.player.PlayerEvent.TabListNameFormat
ForgeEventFactory#getPlayerTabListDisplayName
ServerPlayerEntity#getTabListDisplayName
ServerPlayerEntity#refreshTabListName
TabListNameFormat is fired when a player's display name for the tablist is retrieved.
This event is fired whenever a player's display name for the tablist is retrieved inServerPlayerEntity#getTabListDisplayName()
orServerPlayerEntity#refreshTabListName()
.
This event is fired via the ForgeEventFactory#getPlayerTabListDisplayName(PlayerEntity).
#getDisplayName() contains the display name of the player or null if the client should determine the display name itself.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.PlayerEvent.Visibility
ForgeHooks#getPlayerVisibilityDistance
TODO 1.17 remove, unused Fired when the world checks if a player is near enough to be attacked by an entity. The resulting visibility modifier is multiplied by the one calculated by Minecraft (based on sneaking and more) and used to calculate the radius a player has to be in (targetDistance*modifier). This can also be used to increase the visibility of a player, if it was decreased by Minecraft or other mods. But the resulting value cannot be higher than the standard target distance.
net.minecraftforge.event.entity.player.PlayerFlyableFallEvent
ForgeEventFactory#onPlayerFall
Occurs when a player falls, but is able to fly. Doesn't need to be cancelable, this is mainly for notification purposes.
net.minecraftforge.event.entity.player.PlayerInteractEvent
PlayerInteractEvent is fired when a player interacts in some way. All subclasses are fired on MinecraftForge#EVENT_BUS. See the individual documentation on each subevent for more details.
net.minecraftforge.event.entity.player.PlayerInteractEvent.EntityInteract
PlayerController#interact
PlayerEntity#interactOn
This event is fired on both sides when the player right clicks an entity. It is responsible for all general entity interactions. This event is fired only if the result of the above EntityInteractSpecific is not
EnumActionResult#SUCCESS
. This event's state affects whetherEntity#processInitialInteract
andnet.minecraft.item.Item#itemInteractionForEntity
are called. Let result beEnumActionResult#SUCCESS
ifEntity#processInitialInteract
ornet.minecraft.item.Item#itemInteractionForEntity
return true, or #cancellationResult if the event is cancelled. If we are on the client and result is notEnumActionResult#SUCCESS
, the client will then try RightClickItem.
net.minecraftforge.event.entity.player.PlayerInteractEvent.EntityInteractSpecific
PlayerController#interactAt
ServerPlayNetHandler#handleInteract
This event is fired on both sides whenever a player right clicks an entity. "Interact at" is an interact where the local vector (which part of the entity you clicked) is known. The state of this event affects whether
Entity#applyPlayerInteraction
is called. Let result be the return value ofEntity#applyPlayerInteraction
, or #cancellationResult if the event is cancelled. If we are on the client and result is notEnumActionResult#SUCCESS
, the client will then try EntityInteract.
net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickBlock
PlayerController#startDestroyBlock
PlayerController#startDestroyBlock
PlayerController#continueDestroyBlock
PlayerController#continueDestroyBlock
PlayerInteractionManager#handleBlockBreakAction
This event is fired when a player left clicks while targeting a block. This event controls which of
net.minecraft.block.Block#onBlockClicked
and/or the item harvesting methods will be called Canceling the event will cause none of the above noted methods to be called. There are various results to this event, see the getters below. Note that if the event is canceled and the player holds down left mouse, the event will continue to fire. This is due to how vanilla calls the left click handler methods. Also note that creative mode directly breaks the block without running any other logic. Therefore, in creative mode, #setUseBlock and #setUseItem have no effect.
net.minecraftforge.event.entity.player.PlayerInteractEvent.LeftClickEmpty
This event is fired on the client side when the player left clicks empty space with any ItemStack. The server is not aware of when the client left clicks empty space, you will need to tell the server yourself. This event cannot be canceled.
net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock
ForgeHooks#onRightClickBlock
ForgeHooks#onRightClickBlock
PlayerController#useItemOn
PlayerInteractionManager#useItemOn
This event is fired on both sides whenever the player right clicks while targeting a block.
This event controls which ofItem#onItemUseFirst
,Block#onBlockActivated
, andItem#onItemUse
will be called.
Canceling the event will cause none of the above three to be called.
Let result be the first non-pass return value of the above three methods, or pass, if they all pass.
Or #cancellationResult if the event is cancelled.
If result equalsActionResultType#PASS
, we proceed to RightClickItem.
There are various results to this event, see the getters below.
Note that handling things differently on the client vs server may cause desynchronizations!
net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickEmpty
This event is fired on the client side when the player right clicks empty space with an empty hand. The server is not aware of when the client right clicks empty space with an empty hand, you will need to tell the server yourself. This event cannot be canceled.
net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickItem
PlayerController#useItem
PlayerInteractionManager#useItem
This event is fired on both sides before the player triggers
net.minecraft.item.Item#onItemRightClick
. Note that this is NOT fired if the player is targeting a block RightClickBlock or entity EntityInteract EntityInteractSpecific. Let result be the return value ofnet.minecraft.item.Item#onItemRightClick
, or #cancellationResult if the event is cancelled. If we are on the client and result is notEnumActionResult#SUCCESS
, the client will then continue to other hands.
net.minecraftforge.event.entity.player.PlayerSetSpawnEvent
ForgeEventFactory#onPlayerSpawnSet
ServerPlayerEntity#setRespawnPosition
This event is fired when a player's spawn point is set or reset.
The event can be canceled, which will prevent the spawn point from being changed.
net.minecraftforge.event.entity.player.PlayerSleepInBedEvent
ForgeEventFactory#onPlayerSleepInBed
ServerPlayerEntity#startSleepInBed
PlayerSleepInBedEvent is fired when a player sleeps in a bed.
This event is fired whenever a player sleeps in a bed inEntityPlayer#trySleep(BlockPos)
.
#result contains whether the player is able to sleep.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.PlayerWakeUpEvent
ForgeEventFactory#onPlayerWakeup
This event is fired when the player is waking up.
This is merely for purposes of listening for this to happen.
There is nothing that can be manipulated with this event.
net.minecraftforge.event.entity.player.PlayerXpEvent
PlayerXpEvent is fired whenever an event involving player experience occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
All children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.entity.player.PlayerXpEvent.LevelChange
PlayerEntity#giveExperienceLevels
This event is fired when the player's experience level changes through the
PlayerEntity#addExperienceLevel
method. It can be cancelled, and no further processing will be done.
net.minecraftforge.event.entity.player.PlayerXpEvent.PickupXp
ExperienceOrbEntity#playerTouch
This event is fired after the player collides with an experience orb, but before the player has been given the experience. It can be cancelled, and no further processing will be done.
net.minecraftforge.event.entity.player.PlayerXpEvent.XpChange
PlayerEntity#giveExperiencePoints
This event is fired when the player's experience changes through the
PlayerEntity#giveExperiencePoints
method. It can be cancelled, and no further processing will be done.
net.minecraftforge.event.entity.player.SleepingLocationCheckEvent
ForgeEventFactory#fireSleepingLocationCheck
This event is fired when game checks, if sleeping player should be still considered "in bed".
Failing this check will cause player to wake up.
This event has a result.
setResult(ALLOW) informs game that player is still "in bed"
setResult(DEFAULT) causes game to checkBlock#isBed(IBlockState, net.minecraft.world.IWorldReader, BlockPos, Entity)
instead
net.minecraftforge.event.entity.player.SleepingTimeCheckEvent
ForgeEventFactory#fireSleepingTimeCheck
PlayerEntity#tick
ServerPlayerEntity#startSleepInBed
This event is fired when the game checks if players can sleep at this time.
Failing this check will cause sleeping players to wake up and prevent awake players from sleeping.
This event has a result.
setResult(ALLOW) informs game that player can sleep at this time.
setResult(DEFAULT) causes game to check !World#isDaytime()
instead.
net.minecraftforge.event.entity.player.UseHoeEvent
This event is fired when a player attempts to use a Hoe on a block, it can be canceled to completely prevent any further processing. You can also set the result to ALLOW to mark the event as processed and damage the hoe. setResult(ALLOW) is the same as the old setHandled(); TODO: 1.17 Remove
net.minecraftforge.event.furnace.FurnaceFuelBurnTimeEvent
ForgeEventFactory#getItemBurnTime
FurnaceFuelBurnTimeEvent is fired when determining the fuel value for an ItemStack.
To set the burn time of your own item, useItem#getBurnTime(ItemStack)
instead.
This event is fired from ForgeEventFactory#getItemBurnTime(ItemStack).
This event isCancelable
to prevent later handlers from changing the value.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.village.VillageSiegeEvent
VillageSiegeEvent is fired just before a zombie siege finds a successful location in
VillageSiege#trySetupSiege
, to give mods the chance to stop the siege.
This event isCancelable
; canceling stops the siege.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.village.VillagerTradesEvent
VillagerTradingManager#postVillagerEvents
VillagerTradesEvent is fired during the FMLServerAboutToStartEvent. It is used to gather the trade lists for each profession. It is fired on the MinecraftForge#EVENT_BUS. It is fired once for each registered villager profession. Villagers pick two trades from their trade map, based on their level. Villager level is increased by successful trades. The map is populated for levels 1-5 (inclusive), so Map#get will never return null for those keys. Levels outside of this range do nothing, as specified by
VillagerData#canLevelUp(int)
which is called before attempting to level up. To add trades to the merchant, simply add new trades to the list. BasicTrade provides a default implementation.
net.minecraftforge.event.village.WandererTradesEvent
VillagerTradingManager#postWandererEvent
WandererTradesEvent is fired during the FMLServerAboutToStartEvent. It is used to gather the trade lists for the wandering merchant. It is fired on the MinecraftForge#EVENT_BUS. The wandering merchant picks a few trades from
TradeType#GENERIC
and a single trade fromTradeType#RARE
. To add trades to the merchant, simply add new trades to the list. BasicTrade provides a default implementation.
net.minecraftforge.event.world.BiomeLoadingEvent
This event fires when a Biome is created from json or when a registered biome is re-created for worldgen. It allows mods to edit a biome (like add a mob spawn) before it gets used for worldgen. In order to maintain the most compatibility possible with other mods' modifications to a biome, the event should be assigned a
net.minecraftforge.eventbus.api.EventPriority
as follows: - Additions to any list/map contained in a biome :EventPriority#HIGH
- Removals to any list/map contained in a biome :EventPriority#NORMAL
- Any other modification :EventPriority#LOW
Be aware that another mod could have done an operation beforehand, so an expected value out of a vanilla biome might not always be the same, depending on other mods.
net.minecraftforge.event.world.BlockEvent
net.minecraftforge.event.world.BlockEvent.BlockToolInteractEvent
IForgeBlockState#getToolModifiedState
Fired when when this block is right clicked by a tool to change its state. For example: Used to determine if an axe can strip, a shovel can path, or a hoe can till. This event is
Cancelable
. If canceled, this will prevent the tool from changing the block's state.
net.minecraftforge.event.world.BlockEvent.BreakEvent
PlayerInteractionManager#destroyBlock
Event that is fired when an Block is about to be broken by a player Canceling this event will prevent the Block from being broken.
net.minecraftforge.event.world.BlockEvent.CreateFluidSourceEvent
ForgeEventFactory#canCreateFluidSource
Fired to check whether a non-source block can turn into a source block. A result of ALLOW causes a source block to be created even if the liquid usually doesn't do that (like lava), and a result of DENY prevents creation even if the liquid usually does do that (like water).
net.minecraftforge.event.world.BlockEvent.CropGrowEvent
Fired when a crop block grows. See subevents.
net.minecraftforge.event.world.BlockEvent.CropGrowEvent.Post
AbstractTopPlantBlock#randomTick
BambooBlock#randomTick
CactusBlock#randomTick
ChorusFlowerBlock#randomTick
CocoaBlock#randomTick
CropsBlock#randomTick
NetherWartBlock#randomTick
StemBlock#randomTick
SweetBerryBushBlock#randomTick
Fired when "growing age" blocks (for example cacti, chorus plants, or crops in vanilla) have successfully grown. The block's original state is available, in addition to its new state.
This event is notCancelable
.
This event does not have a result.
net.minecraftforge.event.world.BlockEvent.CropGrowEvent.Pre
AbstractTopPlantBlock#randomTick
BambooBlock#randomTick
CactusBlock#randomTick
ChorusFlowerBlock#randomTick
CocoaBlock#randomTick
CropsBlock#randomTick
NetherWartBlock#randomTick
StemBlock#randomTick
SugarCaneBlock#randomTick
SweetBerryBushBlock#randomTick
Fired when any "growing age" blocks (for example cacti, chorus plants, or crops in vanilla) attempt to advance to the next growth age state during a random tick.
Result#DEFAULT
will pass on to the vanilla growth mechanics.
Result#ALLOW
will force the plant to advance a growth stage.
Result#DENY
will prevent the plant from advancing a growth stage.
This event is notCancelable
.
net.minecraftforge.event.world.BlockEvent.EntityMultiPlaceEvent
ForgeEventFactory#onMultiBlockPlace
ForgeHooks#onPlaceItemIntoWorld
Fired when a single block placement triggers the creation of multiple blocks(e.g. placing a bed block). The block returned by #state and its related methods is the block where the placed block would exist if the placement only affected a single block.
net.minecraftforge.event.world.BlockEvent.EntityPlaceEvent
ForgeEventFactory#onBlockPlace
ForgeHooks#onPlaceItemIntoWorld
FrostWalkerEnchantment#onEntityMoved
PlaceBlockGoal#tick
Called when a block is placed. If a Block Place event is cancelled, the block will not be placed.
net.minecraftforge.event.world.BlockEvent.FarmlandTrampleEvent
Fired when when farmland gets trampled This event is
Cancelable
net.minecraftforge.event.world.BlockEvent.FluidPlaceBlockEvent
ForgeEventFactory#fireFluidPlaceBlockEvent
FlowingFluidBlock#shouldSpreadLiquid
FlowingFluidBlock#shouldSpreadLiquid
LavaFluid#randomTick
LavaFluid#randomTick
LavaFluid#spreadTo
Fired when a liquid places a block. Use #setNewState(IBlockState) to change the result of a cobblestone generator or add variants of obsidian. Alternatively, you could execute arbitrary code when lava sets blocks on fire, even preventing it. #getState() will return the block that was originally going to be placed. #getPos() will return the position of the block to be changed.
net.minecraftforge.event.world.BlockEvent.NeighborNotifyEvent
ForgeEventFactory#onNeighborNotify
RedstoneDiodeBlock#updateNeighborsInFront
World#updateNeighborsAt
World#updateNeighborsAtExceptFromFacing
Fired when a physics update occurs on a block. This event acts as a way for mods to detect physics updates, in the same way a BUD switch does. This event is only called on the server.
net.minecraftforge.event.world.BlockEvent.PortalSpawnEvent
ForgeEventFactory#onTrySpawnPortal
net.minecraftforge.event.world.ChunkDataEvent
ChunkDataEvent is fired when an event involving chunk data occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
#data contains the NBTTagCompound containing the chunk data for this event.
All children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.ChunkDataEvent.Load
ChunkSerializer#read
ChunkSerializer#read
ChunkDataEvent.Load is fired when vanilla Minecraft attempts to load Chunk data.
This event is fired during chunk loading innet.minecraft.world.chunk.storage.ChunkSerializer.read(ServerWorld, TemplateManager, PointOfInterestManager, ChunkPos, CompoundNBT)
which means it is async, so be careful.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.ChunkDataEvent.Save
ChunkDataEvent.Save is fired when vanilla Minecraft attempts to save Chunk data.
This event is fired during chunk saving inAnvilChunkLoader#saveChunk(World, Chunk)
.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.ChunkEvent
ChunkEvent is fired when an event involving a chunk occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
#chunk contains the Chunk this event is affecting.
All children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.ChunkEvent.Load
ClientChunkProvider#replaceWithPacketData
ChunkManager#protoChunkToFullChunk
ChunkEvent.Load is fired when vanilla Minecraft attempts to load a Chunk into the world.
This event is fired during chunk loading in
ChunkProviderClient#loadChunk(int, int)
,
Chunk.onChunkLoad().
Note: This event may be called before the underlyingnet.minecraft.world.chunk.Chunk
is promoted tonet.minecraft.world.chunk.ChunkStatus#FULL
. You will cause chunk loading deadlocks if you don't delay your world interactions.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.ChunkEvent.Unload
ClientChunkProvider#drop
ChunkManager#scheduleUnload
ChunkEvent.Unload is fired when vanilla Minecraft attempts to unload a Chunk from the world.
This event is fired during chunk unloading in
Chunk.onChunkUnload().
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.ChunkWatchEvent
ChunkWatchEvent is fired when an event involving a chunk being watched occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
#pos contains the ChunkPos of the Chunk this event is affecting.
#world contains the World of the Chunk this event is affecting.
#player contains the EntityPlayer that is involved with this chunk being watched.
The #player's world may not be the same as the world of the chunk when the player is teleporting to another dimension.
All children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.ChunkWatchEvent.UnWatch
ForgeEventFactory#fireChunkWatch
ChunkManager#updateChunkTracking
ChunkWatchEvent.UnWatch is fired when an EntityPlayer stops watching a chunk.
This event is fired when a chunk is removed from the watched chunks of an EntityPlayer innet.minecraft.world.server.ChunkManager#setChunkLoadedAtClient
.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.ChunkWatchEvent.Watch
ForgeEventFactory#fireChunkWatch
ChunkManager#updateChunkTracking
ChunkWatchEvent.Watch is fired when an EntityPlayer begins watching a chunk.
This event is fired when a chunk is added to the watched chunks of an EntityPlayer innet.minecraft.world.server.ChunkManager#setChunkLoadedAtClient
.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.ExplosionEvent
ExplosionEvent triggers when an explosion happens in the world.
ExplosionEvent.Start is fired before the explosion actually occurs.
ExplosionEvent.Detonate is fired once the explosion has a list of affected blocks and entities.
ExplosionEvent.Start isCancelable
.
ExplosionEvent.Detonate can modify the affected blocks and entities.
Children do not use .
Children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.ExplosionEvent.Detonate
ForgeEventFactory#onExplosionDetonate
ExplosionEvent.Detonate is fired once the explosion has a list of affected blocks and entities. These lists can be modified to change the outcome.
This event is notCancelable
.
This event does not use .
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.ExplosionEvent.Start
ForgeEventFactory#onExplosionStart
ServerWorld#explode
World#explode
ExplosionEvent.Start is fired before the explosion actually occurs. Canceling this event will stop the explosion.
This event isCancelable
.
This event does not use .
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.NoteBlockEvent
Base class for Noteblock Events
net.minecraftforge.event.world.NoteBlockEvent.Change
Fired when a Noteblock is changed. You can adjust the note it will change to via #setNote(Note, Octave). Canceling this event will not change the note and also stop the Noteblock from playing it's note.
net.minecraftforge.event.world.NoteBlockEvent.Play
Fired when a Noteblock plays it's note. You can override the note and instrument Canceling this event will stop the note from playing.
net.minecraftforge.event.world.PistonEvent
Base piston event, use PistonEvent.Post and PistonEvent.Pre
net.minecraftforge.event.world.PistonEvent.Post
ForgeEventFactory#onPistonMovePost
Fires after the piston has moved and set surrounding states. This will not fire if PistonEvent.Pre is cancelled.
net.minecraftforge.event.world.PistonEvent.Pre
ForgeEventFactory#onPistonMovePre
PistonBlock#triggerEvent
PistonBlock#triggerEvent
Fires before the piston has updated block states. Cancellation prevents movement.
net.minecraftforge.event.world.SaplingGrowTreeEvent
ForgeEventFactory#saplingGrowTree
SaplingGrowTreeEvent is fired when a sapling grows into a tree.
This event is fired during sapling growth inBlockSapling#generateTree(World, BlockPos, IBlockState, Random)
.
#pos contains the coordinates of the growing sapling.
#rand contains an instance of Random for use.
This event is notCancelable
.
This event has a result.
This result determines if the sapling is allowed to grow.
This event is fired on theMinecraftForge#TERRAIN_GEN_BUS
.
net.minecraftforge.event.world.SleepFinishedTimeEvent
ForgeEventFactory#onSleepFinished
This event is fired when all players are asleep and the time should be set to day.
setWakeUpTime(wakeUpTime) sets a new time that will be added to the dayTime.
net.minecraftforge.event.world.StructureSpawnListGatherEvent
StructureSpawnManager#gatherEntitySpawns
This event fires when a Structure is gathering what mobs/creatures can spawn in it. In order to maintain the most compatibility possible with other mods' modifications to a structure, the event should be assigned a
net.minecraftforge.eventbus.api.EventPriority
as follows: - Additions :EventPriority#HIGH
- Removals :EventPriority#NORMAL
- Any other modification :EventPriority#LOW
Be aware that another mod could have done an operation beforehand, so an expected value out of a vanilla structure might not always be the same, depending on other mods.
net.minecraftforge.event.world.WorldEvent
WorldEvent is fired when an event involving the world occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
#world contains the World this event is occurring in.
All children of this event are fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.WorldEvent.CreateSpawnPosition
ForgeEventFactory#onCreateWorldSpawn
MinecraftServer#setInitialSpawn
Called by WorldServer when it attempts to create a spawnpoint for a dimension. Canceling the event will prevent the vanilla code from running.
net.minecraftforge.event.world.WorldEvent.Load
ClientWorld#ClientWorld
MinecraftServer#createLevels
WorldEvent.Load is fired when Minecraft loads a world.
This event is fired when a world is loaded inWorldClient#WorldClient(NetHandlerPlayClient, WorldSettings, int, EnumDifficulty, Profiler)
,MinecraftServer#loadAllWorlds(String, String, long, WorldType, String)
,IntegratedServer#loadAllWorlds(String, String, long, WorldType, String)
DimensionManager#initDimension(int)
, andForgeInternalHandler#onDimensionLoad(Load)
.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.WorldEvent.PotentialSpawns
ForgeEventFactory#getPotentialSpawns
WorldEntitySpawner#getRandomSpawnMobAt
Called by WorldServer to gather a list of all possible entities that can spawn at the specified location. If an entry is added to the list, it needs to be a globally unique instance. The event is called in
WorldServer#getSpawnListEntryForTypeAt(EnumCreatureType, BlockPos)
as well asWorldServer#canCreatureTypeSpawnHere(EnumCreatureType, SpawnListEntry, BlockPos)
where the latter checks for identity, meaning both events must add the same instance. Canceling the event will result in a empty list, meaning no entity will be spawned.
net.minecraftforge.event.world.WorldEvent.Save
WorldEvent.Save is fired when Minecraft saves a world.
This event is fired when a world is saved inWorldServer#saveAllChunks(boolean, IProgressUpdate)
,ForgeInternalHandler#onDimensionSave(Save)
.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.event.world.WorldEvent.Unload
Minecraft#setLevel
Minecraft#clearLevel
MinecraftServer#stopServer
WorldEvent.Unload is fired when Minecraft unloads a world.
This event is fired when a world is unloaded inMinecraft#loadWorld(WorldClient, String)
,MinecraftServer#stopServer()
,DimensionManager#unloadWorlds()
,ForgeInternalHandler#onDimensionUnload(Unload)
.
This event is notCancelable
.
This event does not have a result.
This event is fired on the MinecraftForge#EVENT_BUS.
net.minecraftforge.fml.config.ModConfig.Loading
ConfigTracker#openConfig
ConfigTracker#loadDefaultServerConfigs
net.minecraftforge.fml.config.ModConfig.ModConfigEvent
net.minecraftforge.fml.config.ModConfig.Reloading
ConfigWatcher#run
ConfigTracker#receiveSyncedConfig
net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent
This is the second of four commonly called events during mod lifecycle startup. Called before InterModEnqueueEvent Called after FMLCommonSetupEvent Called on
net.minecraftforge.api.distmarker.Dist#CLIENT
- the game client. Alternative to FMLDedicatedServerSetupEvent. Do client only setup with this event, such as KeyBindings. This is a parallel dispatch event.
net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent
This is the first of four commonly called events during mod initialization. Called before FMLClientSetupEvent or FMLDedicatedServerSetupEvent during mod startup. Called after net.minecraftforge.event.RegistryEvent.Register events have been fired. Either register your listener using net.minecraftforge.fml.AutomaticEventSubscriber and
net.minecraftforge.eventbus.api.SubscribeEvent
ornet.minecraftforge.eventbus.api.IEventBus#addListener(Consumer)
in your constructor. Most non-specific mod setup will be performed here. Note that this is a parallel dispatched event - you cannot interact with game state in this event.
net.minecraftforge.fml.event.lifecycle.FMLConstructModEvent
net.minecraftforge.fml.event.lifecycle.FMLDedicatedServerSetupEvent
This is the second of four commonly called events during mod lifecycle startup. Called before InterModEnqueueEvent Called after FMLCommonSetupEvent Called on
net.minecraftforge.api.distmarker.Dist#DEDICATED_SERVER
- the dedicated game server. Alternative to FMLClientSetupEvent. Do dedicated server specific activities with this event. This event is fired before construction of the dedicated server. Use net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent or net.minecraftforge.fml.event.server.FMLServerStartingEvent to do stuff with the server, in both dedicated and integrated server contexts This is a parallel dispatch event.
net.minecraftforge.fml.event.lifecycle.FMLFingerprintViolationEvent
DEPRECATED WITHOUT REPLACEMENT. REMOVE FROM YOUR CODE!!! IT HAS NEVER BEEN FIRED IN 1.13+ AND WILL NEVER FIRE AGAIN!!! FIRE.JPG FIRE.JPG FIRE.JPG DELET THIS
net.minecraftforge.fml.event.lifecycle.FMLLoadCompleteEvent
This is a mostly internal event fired to mod containers that indicates that loading is complete. Mods should not in general override or otherwise attempt to implement this event.
net.minecraftforge.fml.event.lifecycle.FMLModIdMappingEvent
Called whenever the ID mapping might have changed. If you register for this event, you will be called back whenever the client or server loads an ID set. This includes both when the ID maps are loaded from disk, as well as when the ID maps revert to the initial state. Note: you cannot change the IDs that have been allocated, but you might want to use this event to update caches or other in-mod artifacts that might be impacted by an ID change. Fired on the net.minecraftforge.common.MinecraftForge#EVENT_BUS
net.minecraftforge.fml.event.lifecycle.GatherDataEvent
net.minecraftforge.fml.event.lifecycle.InterModEnqueueEvent
This is the third of four commonly called events during mod lifecycle startup. Called before InterModProcessEvent Called after FMLClientSetupEvent or FMLDedicatedServerSetupEvent Enqueue net.minecraftforge.fml.InterModComms messages to other mods with this event. This is a parallel dispatch event.
net.minecraftforge.fml.event.lifecycle.InterModProcessEvent
This is the fourth of four commonly called events during mod lifecycle startup. Called after InterModEnqueueEvent Retrieve net.minecraftforge.fml.InterModComms net.minecraftforge.fml.InterModComms.IMCMessage suppliers and process them as you wish with this event. This is a parallel dispatch event.
net.minecraftforge.fml.event.lifecycle.ModLifecycleEvent
Parent type to all ModLifecycle events. This is based on Forge EventBus. They fire through the ModContainer's eventbus instance.
net.minecraftforge.fml.event.lifecycle.ParallelDispatchEvent
net.minecraftforge.fml.event.server.FMLServerAboutToStartEvent
ServerLifecycleHooks#handleServerAboutToStart
Called before the server begins loading anything. Called after InterModProcessEvent on the dedicated server, and after the player has hit "Play Selected World" in the client. Called before FMLServerStartingEvent. You can obtain a reference to the server with this event.
net.minecraftforge.fml.event.server.FMLServerStartedEvent
ServerLifecycleHooks#handleServerStarted
Called after FMLServerStartingEvent when the server is available and ready to play.
net.minecraftforge.fml.event.server.FMLServerStartingEvent
ServerLifecycleHooks#handleServerStarting
Called after FMLServerAboutToStartEvent and before FMLServerStartedEvent. This event allows for customizations of the server. If you need to add commands use net.minecraftforge.event.RegisterCommandsEvent.
net.minecraftforge.fml.event.server.FMLServerStoppedEvent
ServerLifecycleHooks#handleServerStopped
Called after FMLServerStoppingEvent when the server has completely shut down. Called immediately before shutting down, on the dedicated server, and before returning to the main menu on the client.
net.minecraftforge.fml.event.server.FMLServerStoppingEvent
ServerLifecycleHooks#handleServerStopping
Called when the server begins an orderly shutdown, before FMLServerStoppedEvent.
net.minecraftforge.fml.event.server.ServerLifecycleEvent
net.minecraftforge.fml.network.NetworkEvent
net.minecraftforge.fml.network.NetworkEvent.ChannelRegistrationChangeEvent
Fired when the channel registration (see minecraft custom channel documentation) changes. Note the payload is not exposed. This fires to the resource location that owns the channel, when it's registration changes state. It seems plausible that this will fire multiple times for the same state, depending on what the server is doing. It just directly dispatches upon receipt.
net.minecraftforge.fml.network.NetworkEvent.ClientCustomPayloadEvent
NetworkDirection#PLAY_TO_SERVER
net.minecraftforge.fml.network.NetworkEvent.ClientCustomPayloadLoginEvent
NetworkDirection#LOGIN_TO_SERVER
net.minecraftforge.fml.network.NetworkEvent.GatherLoginPayloadsEvent
NetworkInstance#dispatchGatherLogin
net.minecraftforge.fml.network.NetworkEvent.LoginPayloadEvent
FMLLoginWrapper#wrapperReceived
net.minecraftforge.fml.network.NetworkEvent.ServerCustomPayloadEvent
NetworkDirection#PLAY_TO_CLIENT