List of usage examples for net.minecraftforge.event.world BlockEvent.HarvestDropsEvent getState
public BlockState getState()
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 }