if (hitBlock != null && world.getBlockID(hitBlock.x, hitBlock.y, hitBlock.z) == 2) {
    world.setBlockID(hitBlock.x, hitBlock.y, hitBlock.z, 60);
    var rand = Math.floor(Math.random() * 20);
    switch (rand) {
    case 0: //1 in 10 chance for Seeds
    case 1:
        player.dropItem(Item(459));
        break;
    case 2: //1 in 20 chance for Flint
        player.dropItem(Item(262));
        break;
    case 3: //1 in 20 chance for 5 Sugar(placeholder for currency)
        player.dropItem(Item(353, 5));
        break;
    case 4: //1 in 5 chance for 1 Sugar(placeholder for currency)
    case 5:
    case 6:
    case 7:
        player.dropItem(Item(353));
        break;
    }
    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 + 1.5, hitBlock.z + 0.5);
}   }   }