rosegold

Minecraft client written in Crystal, following the botting rules of CivMC

Features

How to Start Writing Bots

  1. crystal init app <nameforyourbotrepo>

  2. Add the dependency to your shard.yml:

    dependencies:
      rosegold:
        github: grepsedawk/rosegold.cr
        version: ~> 0.6
  3. Run shards install

  4. Start with a basic example by writing a file in src/, something like...

    require "rosegold"
    bot = Rosegold::Bot.join_game("play.civmc.net")
    sleep 3
    
    while bot.connected?
      bot.eat!
      bot.yaw = -90
      bot.pitch = -10
      bot.inventory.pick! "diamond_sword"
      bot.attack
      bot.wait_ticks 20
      puts bot.feet
      puts "Tool durability: #{bot.main_hand.durability} / #{bot.main_hand.max_durability}"
    end

Contributing

  1. Fork it (https://github.com/grepsedawk/rosegold.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request