Download Additional Events — Minecraft Mods — ModStock

Additional Events

Active

Downloads

0

Last update

5 years ago
Client
Libraries

 

This is a library designed to assist in modding by providing some additional events for mods to use (and in the future some of my mods will be relying on it to hopefully isolate the asm to this library to reduce the chance of conflicts).

 

Now before you get cross with me, no this is not another one of those libs (I like to call them "Modder Name Libs") that are only used by one modder and the only reason for their existence is to boost downloads to get additional rewards usually coupled with various excuses.

 

Anyone can contribute to this lib, make pull requests, etc and repackage it in their mod as needed (license is permitting).  (Unlike forge, I won't spend 6 months arguing about how a glorified table is somehow better than a full compiled programming language)

 

Here's the events so far:

 

- GenerateLootEvent :

* Fired just before a block's loot is generated,
* used for modifying the loot context and loot table that will be used to generate the loot for a block.
*
* Cancelling this event will skip the loot generation entirely and simply pass an empty list to the block.

- DropLootEvent :

* Works similar to the pre-1.14 HarvestDropsEvent that broke due to blocks using loot tables and forge refuses to put back
* Fired just before a block's loot is dropped into the world.
* Used to modify a block's drops after they're already generated.
* Cancelling this event will prevent the block from spawning in any drops.

 

- GetCollisionVoxelShapesEvent

 

* same concept as pre 1.14 getCollisionBoxesEvent but slightly different impl

* Fired during Blockstate#getCollisionShapes

* use this to modify an existing block's collision shape to for example walk on water

* Cannot be cancelled

 

- ItemEntityDamageEvent

 

* Used to determine what happens to an itementity that is about to be damaged by something, contains both the amount and the DamageSource that caused it

* Fired during ItemEntity#attackEntityFrom

* Cancelling it will prevent damage to the item entity

Project members
tfarecnim

tfarecnim