Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions src/docs/net/minecraftforge/client/event/ClientChatEvent.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/**
* @class net.minecraftforge.client.event.ClientChatEvent
*
* Fired when the client is about to send a chat message or command to the server.
* This can be used to implement client-only commands as chat messages, or intercepting messages for typos.
*
* This event is \link Cancelable cancellable\endlink, and does not \link HasResult have a result\endlink.
* If the event is cancelled, the chat message or command will not be sent to the server.
*
* This event is fired on the \link MinecraftForge#EVENT_BUS main Forge event bus\endlink,
* only on the \link LogicalSide#CLIENT logical client\endlink.
*
* @see ForgeEventFactory#onClientSendMessage(String)
*/

/**
* @fn public String ClientChatEvent::getMessage()
*
* Returns the message that will be sent to the server, if the event is not cancelled.
* If the message is blank, then no message will be sent to the server.
*
* The default value is the value of \link ClientChatEvent#getOriginalMessage()\endlink.
*
* @return The message that will be sent to the server
*/

/**
* @fn public void ClientChatEvent::setMessage(String message)
*
* Sets the new message to be sent to the server, if the event is not cancelled.
*
* If \p message is \c null, then it will be converted to an empty string.
* If \p message is empty, then no message will be sent to the server.
*
* @param message The new message to be sent, can be \c null
*/

/**
* @fn public String ClientChatEvent::getOriginalMessage()
*
* Returns the original message of the event, before any modifications.
*
* @return The original message of the event
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/**
* @class net.minecraftforge.client.event.ClientChatReceivedEvent
*
* Fired when the client is about to send a chat message or command to the server.
* This can be used to implement client-only commands as chat messages, or intercepting messages for typos.
*
* This event is \link Cancelable cancellable\endlink, and does not \link HasResult have a result\endlink.
* If the event is cancelled, the chat message or command will not be sent to the server.
*
* This event is fired on the \link MinecraftForge::EVENT_BUS main Forge event bus\endlink,
* only on the \link LogicalSide#CLIENT logical client\endlink.
*
* @see ChatType
* @see ForgeEventFactory#onClientChat(ChatType, ITextComponent, UUID)
*/

/**
* @fn public ITextComponent ClientChatReceivedEvent::getMessage()
*
* Returns the message that will be displayed in the chat message window, if the event is not cancelled.
* If the message is blank, then no message will be displayed.
*
* @return The message that will be displayed in the chat message window
*/

/**
* @fn public void ClientChatReceivedEvent::setMessage(ITextComponent message)
*
* Sets the new message to be displayed in the chat message window, if the event is not cancelled.
*
* If \p message is \c null, then no message will be displayed.
*
* @param message The new message to be displayed, can be \c null
*/

/**
* @fn public ChatType ClientChatReceivedEvent::getType()
*
* Returns the type of the message, as defined by \link ChatType\endlink.
*
* @return The type of the message
*/

/**
* @fn public UUID ClientChatReceivedEvent::getSenderUUID()
*
* Returns the UUID of the sender of the message, or \c null if one is not specified.
*
* @return The UUID of the message's sender, or \c null
*/
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/**
* @class net.minecraftforge.client.event.ClientPlayerNetworkEvent
* Fired on the client for different connectivity events.
* See the various subclasses to listen for specific events.
*
* @see ClientPlayerNetworkEvent.LoggedInEvent
* @see ClientPlayerNetworkEvent.LoggedOutEvent
* @see ClientPlayerNetworkEvent.RespawnEvent
*/

/**
* @fn public PlayerController ClientPlayerNetworkEvent::getController()
* Returns the \ref PlayerController of the client player, or \c null if it does not exist.
*
* If \ref ClientPlayerNetworkEvent#getPlayer() returns \c null, then this method also returns \c null.
*
* @return The client-side player controller, may be \c null
*/

/**
* @fn public ClientPlayerEntity ClientPlayerNetworkEvent::getPlayer()
* Returns the client-side player instance, or \c null if it does not exist.
*
* @return The client player instance, may be \c null
*/

/**
* @fn public NetworkManager ClientPlayerNetworkEvent::getNetworkManager()
* Returns the client-side network connection manager, or \c null if it does not exist.
*
* @return The network connection manager, may be \c null
*/

/**
* @class net.minecraftforge.client.event.ClientPlayerNetworkEvent.LoggedInEvent
* Fired when the client player logs in to the server.
* When this event is fired, the player should be initialized at that point in time.
*
* \ref ClientPlayerNetworkEvent#getController(), \ref ClientPlayerNetworkEvent#getPlayer(),
* and \ref ClientPlayerNetworkEvent#getNetworkManager() are guaranteed to never return \c null in this event.
*
* This event is not \link Cancelable cancellable\endlink, and does not \link HasResult have a result\endlink.
*
* This event is fired on the \link MinecraftForge#EVENT_BUS main Forge event bus\endlink,
* only on the \link LogicalSide#CLIENT logical client\endlink.
*
* @see ClientHooks#firePlayerLogin(PlayerController, ClientPlayerEntity, NetworkManager)
*/

/**
* @class net.minecraftforge.client.event.ClientPlayerNetworkEvent.LoggedOutEvent
* Fired when the player logs out.
* This event may also fire when a new integrated server is being created.
*
* This event is not \link Cancelable cancellable\endlink, and does not \link HasResult have a result\endlink.
*
* This event is fired on the \link MinecraftForge#EVENT_BUS main Forge event bus\endlink,
* only on the \link LogicalSide#CLIENT logical client\endlink.
*
* @see ClientHooks#firePlayerLogout(PlayerController, ClientPlayerEntity)
*/

/**
* @class net.minecraftforge.client.event.ClientPlayerNetworkEvent.RespawnEvent
* Fired when the player object respawns, such as dimension changes.
*
* \ref ClientPlayerNetworkEvent.RespawnEvent#getNewPlayer() returns the same player instance as
* \ref ClientPlayerNetworkEvent#getPlayer(). \ref ClientPlayerNetworkEvent#getController() ,
* \ref ClientPlayerNetworkEvent#getPlayer(), and \ref ClientPlayerNetworkEvent#getNetworkManager()
* are guaranteed to never return \c null in this event.
*
* This event is not \link Cancelable cancellable\endlink, and does not \link HasResult have a result\endlink.
*
* This event is fired on the \link MinecraftForge#EVENT_BUS main Forge event bus\endlink,
* only on the \link LogicalSide#CLIENT logical client\endlink.
*
* @see ClientHooks#firePlayerRespawn(PlayerController, ClientPlayerEntity, ClientPlayerEntity, NetworkManager)
*/

/**
* @fn public ClientPlayerEntity RespawnEvent::getOldPlayer()
* Returns the old \ref ClientPlayerEntity instance that existed before the respawn.
*
* @return The previous player instance
*/

/**
* @fn public ClientPlayerEntity RespawnEvent::getNewPlayer()
* Returns the new \ref ClientPlayerEntity instance that will replace the old instance, after the respawn event.
*
* @return The newly created player instance
*/
61 changes: 61 additions & 0 deletions src/docs/net/minecraftforge/client/event/ColorHandlerEvent.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
/**
* @class net.minecraftforge.client.event.ColorHandlerEvent
* Fired for registering block and item color handlers at the appropriate time.
* See the two subclasses for registering blocks or items color handlers.
*
* @see ColorHandlerEvent.Block
* @see ColorHandlerEvent.Item
*/

/**
* @class net.minecraftforge.client.event.ColorHandlerEvent.Block
* Fired for registering block colors handlers.
*
* This event is not \link Cancelable cancellable\endlink, and does not \link HasResult have a result\endlink.
*
* This event is fired on the \link FMLJavaModLoadingContext#getModEventBus() mod-specific event bus\endlink,
* only on the \link LogicalSide#CLIENT logical client\endlink.
*
* @see ForgeHooksClient#onBlockColorsInit(BlockColors)
*/

/**
* @fn public BlockColors Block::getBlockColors()
* Returns an instance of \ref BlockColors, for registering block color providers (\ref IBlockColor).
*
* @return an instance of the block colors
* @see BlockColors#register(IBlockColor, net.minecraft.block.Block...)
*/

/**
* @class net.minecraftforge.client.event.ColorHandlerEvent.Item
* Fired for registering item colors handlers.
*
* The block colors should only be used for referencing or delegating item colors to their respective block colors.
* Use \ref ColorHandlerEvent.Block for registering your block color handlers.
*
* This event is not \link Cancelable cancellable\endlink, and does not \link HasResult have a result\endlink.
*
* This event is fired on the \link FMLJavaModLoadingContext#getModEventBus() mod-specific event bus\endlink,
* only on the \link LogicalSide#CLIENT logical client\endlink.
*
* @see ForgeHooksClient#onItemColorsInit(ItemColors, BlockColors)
*/

/**
* @fn public ItemColors Item::getItemColors()
* Returns an instance of \ref ItemColors, for registering item color providers (\ref IItemColor).
*
* @return an instance of the item colors
* @see ItemColors#register(IItemColor, IItemProvider...)
*/

/**
* @fn public BlockColors Item::getBlockColors()
* Returns an instance of \ref BlockColors, for reference and/or delegation.
*
* This should only be used for reference or delegation to respective block colors.
* Use \ref ColorHandlerEvent.Block for registering your block color handlers.
*
* @return an instance of the block colors
*/
104 changes: 104 additions & 0 deletions src/docs/net/minecraftforge/client/event/DrawHighlightEvent.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
/**
* @class net.minecraftforge.client.event.DrawHighlightEvent
*
* Fired before a selection highlight is rendered.
* See the two subclasses to listen for blocks or entities.
*
* @see DrawHighlightEvent.HighlightBlock
* @see DrawHighlightEvent.HighlightEntity
* @see ForgeHooksClient#onDrawBlockHighlight(WorldRenderer, ActiveRenderInfo, RayTraceResult, float, MatrixStack, IRenderTypeBuffer)
* @todo This event will be renamed to DrawSelectionEvent
*/

/**
* @fn public WorldRenderer getContext()
*
* Returns the \ref WorldRenderer.
*
* @return The world renderer
*/

/**
* @fn public ActiveRenderInfo getInfo()
*
* Returns the \ref ActiveRenderInfo containing the information for the current rendering context.
*
* @return The active render information
*/

/**
* @fn public RayTraceResult getTarget()
*
* Returns the \ref RayTraceResult, representing the object at the position of the player's mouse.
* The subclasses of this event override this method to return a more specific subclass of \ref RayTraceResult, such as
* \ref BlockRayTraceResult.
*
* @return The target of the highlight
* @see HighlightBlock#getTarget()
* @see HighlightEntity#getTarget()
*/

/**
* @fn public float getPartialTicks()
*
* Returns the partial amount of ticks between the last and next render tick.
* This will be in the range of <tt>0.0-1.0</tt>.
*
* @return The amount of partial ticks
*/

/**
* @fn public MatrixStack getMatrix()
*
* Returns the \ref MatrixStack used for transformations, rotations, and scaling in rendering.
*
* @return The matrix stack used for rendering
*/

/**
* @fn public IRenderTypeBuffer getBuffers()
*
* Returns the \ref IRenderTypeBuffer currently being used for rendering.
*
* @return The rendering buffers
*/

/**
* @class net.minecraftforge.client.event.DrawHighlightEvent.HighlightBlock
*
* Fired before a block's selection highlight is rendered.
*
* This event is \link Cancelable cancellable\endlink, and does not \link HasResult have a result\endlink.
* If the event is cancelled, then the block selection highlight will not be rendered.
*
* This event is fired on the \link MinecraftForge#EVENT_BUS main Forge event bus\endlink,
* only on the \link LogicalSide#CLIENT logical client\endlink.
*/

/**
* @fn public BlockRayTraceResult HighlightBlock::getTarget()
*
* Returns the \ref BlockRayTraceResult, representing the block at the position of the player's mouse.
*
* @return The block target of the highlight
*/

/**
* @class net.minecraftforge.client.event.DrawHighlightEvent.HighlightEntity
*
* Fired before a block's selection highlight is rendered.
*
* This event is \link Cancelable cancellable\endlink, and does not \link HasResult have a result\endlink.
* Cancelling this event has no effect.
*
* This event is fired on the \link MinecraftForge#EVENT_BUS main Forge event bus\endlink,
* only on the \link LogicalSide#CLIENT logical client\endlink.
*/

/**
* @fn public EntityRayTraceResult HighlightEntity::getTarget()
*
* Returns the \ref EntityRayTraceResult, representing the entity at the position of the player's mouse.
*
* @return The entity target of the highlight
*/
Loading