Example usage for net.minecraftforge.event.world BlockEvent.HarvestDropsEvent getState

List of usage examples for net.minecraftforge.event.world BlockEvent.HarvestDropsEvent getState

Introduction

In this page you can find the example usage for net.minecraftforge.event.world BlockEvent.HarvestDropsEvent getState.

Prototype

public BlockState getState() 

Source Link

Usage

From source file:de.ellpeck.actuallyadditions.mod.event.BreakEvent.java

@SubscribeEvent
public void onBlockBreakEvent(BlockEvent.HarvestDropsEvent event) {
    IBlockState state = event.getState();
    if (state != null && state.getBlock() == Blocks.MOB_SPAWNER) {
        event.getDrops().add(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.SPAWNER_SHARD.ordinal()));
    }//from   w w w  . j a  v  a 2 s  . c o m
}