Hi,
got a problem. I need to change the drops of a modded item. I know, I can access the HarvestDropsEvent event, so I can do something like this:
public void onHarvestDropsEvent(HarvestDropsEvent event)
{
if(event.block.toString().contains("net.minecraft.block.BlockOldLog"))
{
event.drops.clear();
event.drops.add(new ItemStack(Items.stick, random.nextInt(3)+1));
}
}
When I break wood, I get a few sticks instead of the wood logs. That works! But now I want to drop a modded item. How can I spawn it when I only got the name of it and not the actual class? Thank you!