Jump to content

[1.8] Drop item from a vanilla block


Jeerdus

Recommended Posts

if the block already has an item then you can use HarvestDropsEvent. you first add a chance float then add your item. if the block has no drops or you want the item to drop with any tool (such as allowing obsidian to drop from an iron pciaxe) then you can use BreakEvent and spawn the item in the world.

Link to comment
Share on other sites

if the block has no drops or you want the item to drop with any tool (such as allowing obsidian to drop from an iron pciaxe) then you can use BreakEvent and spawn the item in the world.

This is not the correct approach.

a) If the block does not have drops, HarvestDropsEvent will still fire.

b) To make a block harvestable that was previously not, use PlayerEvent.HarvestCheck.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.