events.listen('item.right_click', event => {
    
  if (event.item.id == 'kubejs:essence_floral') {
	  if (event.player.world.isOverworld()) {
		  
	var UUID= event.player.getFullNBT().UUID;
    var cleanUUID = '[I;'+UUID.toString().substring(1);
	  
	event.player.playSound('botania:light_relay');

	event.server.runCommandSilent('execute as ' + event.player.name + ' run summon mutantbeasts:throwable_block' + ' ' + event.player.x + ' ' + (event.player.y+150) + ' ' + event.player.z +' {Owner:'+cleanUUID+',Motion: [0.0d, -1.25d, 0.0d], BlockState:{Name:"kubejs:lootblock_magic_floral"},Time:30}');
	
	event.server.runCommandSilent('execute as ' + event.player.name + ' run particle autumnity:falling_leaf ' + event.player.x + ' ' + event.player.y + ' ' + event.player.z + ' 1 75 1 4 100');
      
    if (!event.player.isCreativeMode()) {
    
    event.item.setCount(event.item.getCount() - 1)
    }
	  }
    }
});