Download Additional Events — Minecraft Mods — MetaMods

Additional Events

Active

Downloads

0

Last update

5 years ago
Client
Libraries

Additional Events

This library is designed to assist mod developers by providing additional events that other modifications can use. In the future, some of my own mods will depend on this library, which will allow isolating ASM code here and reduce the likelihood of conflicts with other modifications.

It's important to note that this is not one of those libraries that are used by only one developer and exist solely to increase download counts for additional rewards. This library is open to everyone - anyone can contribute, create pull requests, and repackage it in their mods as needed (in accordance with the license).

Available Events

GenerateLootEvent

Triggered immediately before loot generation from a block. Allows modifying the loot context and loot table that will be used to create drops from the block. If this event is cancelled, loot generation will be completely skipped, and an empty list will be passed to the block.

DropLootEvent

Analogous to the HarvestDropsEvent that existed before version 1.14 and stopped working after blocks switched to using loot tables. Fires right before a block's loot drops into the world. Used to modify a block's drops after they have been generated. Cancelling the event prevents any items from appearing from the block.

GetCollisionVoxelShapesEvent

Similar to the getCollisionBoxesEvent from versions before 1.14, but with a slightly different implementation. Triggered during Blockstate#getCollisionShapes execution. Allows modifying the collision shape of an existing block - for example, to enable walking on water. This event cannot be cancelled.

ItemEntityDamageEvent

Determines what happens to an item entity that is about to take damage. Contains information about the damage amount and damage source. Triggered during ItemEntity#attackEntityFrom execution. Cancelling the event prevents damage to the item entity.

Project members
tfarecnim

tfarecnim

Created: 1 Mar 2020

ID: 36834