Skip to content

Allows a Minecraft client and a mineflayer bot to control the same connection by mirroring the game state between clients

Notifications You must be signed in to change notification settings

0xjimmy/mineflayer-reflection-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft Reflection Proxy

Allows a Minecraft client and a mineflayer bot to control the same connection by mirroring the game state between clients.

Design

The proxy maintains 2 server instances and a mineflayer bot, which the bot and player each connect to. World state and player data is synced between the bot and player and gameplay packets are filtered to the intended recipients.

Plugin System

The current system loads plugins from ./plugins/exports.js. For now plugins get initalized from exporting an init(targetServer, playerConnection, mineflayerBot, setPlayerControl) function and an array of commands to that the player can trigger. The targetServer and playerConnection are Client instances, the mineflayerBot is a mineflayer bot instance. setPlayerControl(boolean: state) is called to set which game packets are forwareded to the server, true for the player and false for the bot.

TODO

  • Allow loading multiple world instances at a time, to allow to control multiple bots or different target server connections.
  • Allow user client to leave and reconnect syncing state from bot state.

About

Allows a Minecraft client and a mineflayer bot to control the same connection by mirroring the game state between clients

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published