package com.techern.minecraft.melonblockdrop;

import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ChatComponentText;
import net.minecraftforge.event.world.BlockEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

/**
 * An event handler for when breaking {@link net.minecraft.block.BlockMelon}s
 *
 * @since 1.0.0
 */
public class MelonBlockHarvestEventHandler {

    /**
     * Called when harvesting any block
     *
     * @param event The {@link net.minecraftforge.event.world.BlockEvent.HarvestDropsEvent}
     *
     * @since 1.0.0
     */
    @SubscribeEvent
    public void harvest(BlockEvent.HarvestDropsEvent event) {

        if (event.state.getBlock().equals(Blocks.melon_block)) {
            //We're doing a melon block

            //First reset the drop list
            event.drops.clear();

            //Then add the new drop
            event.drops.add(new ItemStack(Blocks.melon_block, 1));

        } //Do nothing if not

    }

}

@@ -100,99 +100,21 @@
 ft.i
-nit.Items;%0Aimport net.minecraft.item.ItemStack;%0Aimport net.minecraft.util.ChatComponentText
+tem.ItemStack
 ;%0Aim

Remove unused imports