Giter Site home page Giter Site logo

protocolcraft-plugin's Introduction

Build status Discord

Repository storing code to generate extension plugins for protocolCraft. They can be used to help dealing with custom payload packets sent by mods (see . You can check SniffCraft for an example usecase, or the Botcraft mod support wiki page for details.

As the plugins can be compiled independantly from other libraries, don't expect this repo to be updated very often (except to add new plugins). But that doesn't mean plugins won't work with more recent ProtocolCraft versions. For example, the packets in vanilla-plugin haven't changed since Minecraft 1.13, i.e. July 18, 2018.

Usage

Once compiled, the plugins must be placed next to your executable using protocolCraft under a protocolcraft_plugins folder in order to be found at runtime.

Build

The code uses cmake build system and requires an internet connection at configuration time to download a few files from the Botcraft repo. For an offline configuration/build, make sure you manually download all the files listed here and place them under a protocolCraft folder in your cmake build directory, keeping their relative paths identical to their URL.

git clone https://github.com/adepierre/protocolcraft-plugin.git
cd protocolcraft-plugin
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --config Release

Built plugins will be placed by default under a bin folder. To set a specific output destination, or to configure a plugin option, you can use cmake -D syntax. See each plugin readme to know which options (if any) they have.

cmake -DCMAKE_BUILD_TYPE=Release -DPLUGINS_OUTPUT_DIR=/path/to/my/built/plugins ..
cmake --build . --config Release

Create a new plugin

This repo architecture has been thought to simplify the process of creating a plugin, allowing anyone from the community to easily implement a new plugin for a given mod. Here are the steps to add a new one:

  • fork this repository
  • duplicate the plugins/vanilla-plugin folder and rename it
  • add the new folder at the end of plugins/CMakeLists.txt
  • create all your packets classes
  • register them with the expected identifier in ONE cpp file (see this for reference)
  • edit your plugin CMakeLists.txt with your files/options/include folders, there are some edit sections setup in the CMakeLists.txt to help you
  • edit your plugin individual readme to give details on what it does
  • create a PR with your new plugin

If the automatic build fails during artifact upload because you didn't have a latest release yet, go to <your fork>/releases/new and create a new release. The only important field is the tag name which must be latest and then go to <your fork>/actions/workflows to rerun the failed worfklow.

protocolcraft-plugin's People

Contributors

adepierre avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.