https://github.com/dockyardmc/packetgenerators
Generates packet data from wiki.vg
https://github.com/dockyardmc/packetgenerators
Last synced: 5 days ago
JSON representation
Generates packet data from wiki.vg
- Host: GitHub
- URL: https://github.com/dockyardmc/packetgenerators
- Owner: DockyardMC
- Created: 2024-06-14T04:27:23.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-22T16:51:47.000Z (almost 2 years ago)
- Last Synced: 2025-02-23T16:14:02.932Z (over 1 year ago)
- Language: Kotlin
- Size: 8.79 KB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wiki.vg Data Generator
Gets packet data from [wiki.vg](https://wiki.vg/Protocol) and converts them to json format
---
## Installation
**Kotlin DSL**
```kotlin
repositories {
maven {
name = "devOS"
url = uri("https://mvn.devos.one/releases")
}
}
dependencies {
implementation("io.github.dockyardmc:wikivg-datagen:1.3")
}
```
**Gradle Groovy**
```groovy
repositories {
maven {
name "devOS"
url "https://mvn.devos.one/releases"
}
}
dependencies {
implementation 'io.github.dockyardmc:wikivg-datagen:1.3'
}
```
---
## Usage
You can get the latest data like this:
```kotlin
val dataGenerator = WikiVGDataGenerator()
val json = dataGenerator.json
val list = dataGenerator.packets
```
**Example:** _(Sound Effect Packet)_
```json
{
"id": "0x68",
"header": "Sound Effect",
"packet": "sound_effect",
"protocol_state": "play",
"bound_to": "client",
"content": [
{
"field": "sound_name",
"type": "optional_identifier"
},
{
"field": "has_fixed_range",
"type": "optional_boolean"
},
{
"field": "range",
"type": "optional_float"
},
{
"field": "sound_category",
"type": "var_int_enum"
},
{
"field": "effect_position_x",
"type": "int"
},
{
"field": "effect_position_y",
"type": "int"
},
{
"field": "effect_position_z",
"type": "int"
},
{
"field": "volume",
"type": "float"
},
{
"field": "pitch",
"type": "float"
},
{
"field": "seed",
"type": "long"
}
]
}
```