//GenSword
if (hitBlock != null) 
{
	if(world.getBlockID(hitBlock.x,hitBlock.y,hitBlock.z) == 31)
	{
		world.setBlockID(hitBlock.x,hitBlock.y,hitBlock.z,0);
		sound.playSound3D("sound.bush",hitBlock.x,hitBlock.y,hitBlock.z);
		
		var rand = Math.floor(Math.random() * 20);
		switch (rand) 
		{
		case 0:
		case 1:
			player.dropItem(Item(273));
			break; // 1 in 10 chance for 5 sugar (currency placeholder)
		case 2:
		case 3:
		case 4:
		case 5:
		case 6:
		case 7:
			player.dropItem(Item(353));
			break; // 3 in 10 chance for 1 sugar (currency placeholder)
		case 8:
			player.dropItem(Item(466));
			break; // 1 in 20 chance for a bomb, I reccomend using the Limiter script to stop people getting bombs too early.
                case 9:
			player.dropItem(Item(262,5));
			break; // 1 in 20 chance for 10 arrows.
		}
		itemSearch = player.getEntitiesWithinRange(0.2);
		for (var i = 0; i < itemSearch.length; i++) 
		{
			var ent = itemSearch[i];
			if (ent.getClassType() == "Item") {
				ent.setPosition(hitBlock.x + 0.5, hitBlock.y + 0.5, hitBlock.z + 0.5);
			}   
		}
	}
}