IBlockDropHandler

The IBlockDropHandler function is used to allow for advanced block drop handling for Blocks created with the Vanilla Factory.

Importing the class

You want to import the class? Here you go:

import mods.contenttweaker.DropHandler;

Function structure

The function is a void function that takes the following parameters:

As this method does not return anything, all drops need to be added to the drops list using the exposed methods.
Read about them here.

Example

block.setDropHandler(function(drops, world, position, state) {

    drops.add(<minecraft:bedrock>);
    drops.add(<minecraft:carrot> % 50);

    return;
});