Code Monkey home page Code Monkey logo

twistedbot's Introduction

Bot/Proxy for Minecraft

Twitter @lukleh

Technical info

  • Support for Minecraft 1.5, protocol version 60
  • Code is for Python 2.7
  • Running under PyPy
  • Clean flake8 with long lines
  • Optional (mandatory for proxy mode) PyCrypto dependency if you want the datastream to be encrypted. Configurable in config.
  • Rest of the dependencies is included in "libs" directory.

Bot

Features

  • Client side artificial player for Minecraft that runs on vanilla server in online(needs encryption) and offline mode. No modification on server/client side needed.
  • Basic pathfinding
  • Solid block awareness
  • Avoiding lava, web and cactus
  • Reasonable handeling of vines, ladders and water
  • No active interaction with the world. That is no digging, placing blocks, open/close doors, etc.
  • Use signs to set up points to rotate -> details below
  • Configure using command line arguments or modifying twistedbot/config.py
  • In the idle state bot just stares at you, turning his head and body.

Usage

By default connects to localhost

pypy bot.py 

Possible flags

pypy bot.py -h

In game commands

type "help" in chat to see available commands, then use "help command" for details.

If your username (commander) is set, then you can use chat to send commands to bot.

Sign waypoints

Use signs as a waypoints. When you want the sign to be part of waypoints that bot can travel between do the following, all without quotes:

  • place sign
  • line 1: 'waypoint'
  • line 2: If number, for example '1', '2' or '3.5', it will be used as an order of how to sort the waypoints in group (if line 3 contains text). Otherwise parsed as a name that waypoint can be addressed directly.
  • line 3: Groupname, if given number on line 2, this name groups waypoints.
  • line 4: Name, if number on line 2 and groupname on line 3, then has same function as name in line 2.

Proxy

  • Intercepts network traffic between client and server, usefull for debugging and figuring out how Minecraft works.
  • If you are runnig server, proxy and client on the same machine, have quad core.
  • Keep in mind that thanks to the encryption, proxy has to first decrypt and then encrypt again. This may cause a noticeable delay.

Usage

To run with defaults, server is localhost:25565 and proxy is listening on localhost:25566. Then connect your client to localhost:25566.

pypy proxy.py

When you close proxy, it prints packet statistics before exit.

Possible flags

pypy proxy.py -h

To make your own filter, look in twistedbot.proxy_processors.default for an example.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.