mirror of
https://github.com/GeyserMC/MCProtocolLib.git
synced 2024-11-14 19:34:58 -05:00
A library for communication with a Minecraft client/server.
64410dbe48
With the way this lib used to previously work, any time the protocol state changed, all the packet maps got cleared and had new packets inserted into them depending on the protocol state. This was unnecessarily expensive and although called rarely, it was not ideal. The packet codecs added are static, immutable and can be reused across sessions. The codec system also opens up the door for multi-version capability in the future. |
||
---|---|---|
.github/workflows | ||
example/com/github/steveice10/mc/protocol/test | ||
src | ||
.gitignore | ||
Jenkinsfile | ||
LICENSE.txt | ||
pom.xml | ||
README.md |
MCProtocolLib
MCProtocolLib is a simple library for communicating with a Minecraft client/server. It aims to allow people to make custom bots, clients, or servers for Minecraft easily.
Example Code
See example/com/github/steveice10/mc/protocol/test/MinecraftProtocolTest.java
Adding as a Dependency
The recommended way of fetching MCProtocolLib is through jitpack.io. See here for more details on how to include MCProtocolLib in your project.
Maven:
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
<dependency>
<groupId>com.github.Steveice10</groupId>
<artifactId>MCProtocolLib</artifactId>
<version>(version here)</version>
</dependency>
Gradle:
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.Steveice10:MCProtocolLib:(version here)'
}
Building the Source
MCProtocolLib uses Maven to manage dependencies. Simply run 'mvn clean install' in the source's directory.
Support and development
Please join us at https://discord.gg/geysermc under #mcprotocollib for discussion and support for this project.
License
MCProtocolLib is licensed under the MIT license.