mirror of
https://github.com/italicsjenga/valence.git
synced 2024-12-23 14:31:30 +11:00
Switch to mojang mappings
This commit is contained in:
parent
50018a52bf
commit
0e31aef2a1
1
extracted/biomes.json
Normal file
1
extracted/biomes.json
Normal file
|
@ -0,0 +1 @@
|
||||||
|
[]
|
23234
extracted/blocks.json
23234
extracted/blocks.json
File diff suppressed because it is too large
Load diff
|
@ -6,11 +6,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 4,
|
"max_level": 4,
|
||||||
"rarity_weight": 10,
|
"rarity_weight": 10,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -20,11 +18,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 4,
|
"max_level": 4,
|
||||||
"rarity_weight": 5,
|
"rarity_weight": 5,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -34,11 +30,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 4,
|
"max_level": 4,
|
||||||
"rarity_weight": 5,
|
"rarity_weight": 5,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -48,11 +42,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 4,
|
"max_level": 4,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -62,11 +54,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 4,
|
"max_level": 4,
|
||||||
"rarity_weight": 5,
|
"rarity_weight": 5,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -76,11 +66,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -90,11 +78,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 1,
|
"max_level": 1,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -104,11 +90,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 1,
|
"rarity_weight": 1,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -118,11 +102,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -132,11 +114,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 2,
|
"max_level": 2,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": true,
|
"treasure": true
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -146,11 +126,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 1,
|
"max_level": 1,
|
||||||
"rarity_weight": 1,
|
"rarity_weight": 1,
|
||||||
"cursed": true,
|
"curse": true,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": true,
|
"treasure": true
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -160,11 +138,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 1,
|
"rarity_weight": 1,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": true,
|
"treasure": true
|
||||||
"enchantment_table": false,
|
|
||||||
"random_selection": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -174,11 +150,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 1,
|
"rarity_weight": 1,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": true,
|
"treasure": true
|
||||||
"enchantment_table": false,
|
|
||||||
"random_selection": false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -188,11 +162,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 5,
|
"max_level": 5,
|
||||||
"rarity_weight": 10,
|
"rarity_weight": 10,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -202,11 +174,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 5,
|
"max_level": 5,
|
||||||
"rarity_weight": 5,
|
"rarity_weight": 5,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -216,11 +186,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 5,
|
"max_level": 5,
|
||||||
"rarity_weight": 5,
|
"rarity_weight": 5,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -230,11 +198,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 2,
|
"max_level": 2,
|
||||||
"rarity_weight": 5,
|
"rarity_weight": 5,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -244,11 +210,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 2,
|
"max_level": 2,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -258,11 +222,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -272,11 +234,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -286,11 +246,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 5,
|
"max_level": 5,
|
||||||
"rarity_weight": 10,
|
"rarity_weight": 10,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -300,11 +258,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 1,
|
"max_level": 1,
|
||||||
"rarity_weight": 1,
|
"rarity_weight": 1,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -314,11 +270,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 5,
|
"rarity_weight": 5,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -328,11 +282,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -342,11 +294,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 5,
|
"max_level": 5,
|
||||||
"rarity_weight": 10,
|
"rarity_weight": 10,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -356,11 +306,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 2,
|
"max_level": 2,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -370,11 +318,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 1,
|
"max_level": 1,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -384,11 +330,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 1,
|
"max_level": 1,
|
||||||
"rarity_weight": 1,
|
"rarity_weight": 1,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -398,11 +342,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -412,11 +354,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -426,11 +366,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 5,
|
"rarity_weight": 5,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -440,11 +378,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 5,
|
"max_level": 5,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -454,11 +390,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -468,11 +402,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 1,
|
"max_level": 1,
|
||||||
"rarity_weight": 1,
|
"rarity_weight": 1,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -482,11 +414,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 1,
|
"max_level": 1,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -496,11 +426,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 3,
|
"max_level": 3,
|
||||||
"rarity_weight": 5,
|
"rarity_weight": 5,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -510,11 +438,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 4,
|
"max_level": 4,
|
||||||
"rarity_weight": 10,
|
"rarity_weight": 10,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": false,
|
"treasure": false
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -524,11 +450,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 1,
|
"max_level": 1,
|
||||||
"rarity_weight": 2,
|
"rarity_weight": 2,
|
||||||
"cursed": false,
|
"curse": false,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": true,
|
"treasure": true
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -538,11 +462,9 @@
|
||||||
"min_level": 1,
|
"min_level": 1,
|
||||||
"max_level": 1,
|
"max_level": 1,
|
||||||
"rarity_weight": 1,
|
"rarity_weight": 1,
|
||||||
"cursed": true,
|
"curse": true,
|
||||||
"sources": {
|
"sources": {
|
||||||
"treasure": true,
|
"treasure": true
|
||||||
"enchantment_table": true,
|
|
||||||
"random_selection": true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
File diff suppressed because it is too large
Load diff
4904
extracted/items.json
4904
extracted/items.json
File diff suppressed because it is too large
Load diff
511
extracted/misc.json
Normal file
511
extracted/misc.json
Normal file
|
@ -0,0 +1,511 @@
|
||||||
|
{
|
||||||
|
"entity_type": {
|
||||||
|
"allay": 0,
|
||||||
|
"area_effect_cloud": 1,
|
||||||
|
"armor_stand": 2,
|
||||||
|
"arrow": 3,
|
||||||
|
"axolotl": 4,
|
||||||
|
"bat": 5,
|
||||||
|
"bee": 6,
|
||||||
|
"blaze": 7,
|
||||||
|
"boat": 8,
|
||||||
|
"chest_boat": 9,
|
||||||
|
"cat": 10,
|
||||||
|
"camel": 11,
|
||||||
|
"cave_spider": 12,
|
||||||
|
"chicken": 13,
|
||||||
|
"cod": 14,
|
||||||
|
"cow": 15,
|
||||||
|
"creeper": 16,
|
||||||
|
"dolphin": 17,
|
||||||
|
"donkey": 18,
|
||||||
|
"dragon_fireball": 19,
|
||||||
|
"drowned": 20,
|
||||||
|
"elder_guardian": 21,
|
||||||
|
"end_crystal": 22,
|
||||||
|
"ender_dragon": 23,
|
||||||
|
"enderman": 24,
|
||||||
|
"endermite": 25,
|
||||||
|
"evoker": 26,
|
||||||
|
"evoker_fangs": 27,
|
||||||
|
"experience_orb": 28,
|
||||||
|
"eye_of_ender": 29,
|
||||||
|
"falling_block": 30,
|
||||||
|
"firework_rocket": 31,
|
||||||
|
"fox": 32,
|
||||||
|
"frog": 33,
|
||||||
|
"ghast": 34,
|
||||||
|
"giant": 35,
|
||||||
|
"glow_item_frame": 36,
|
||||||
|
"glow_squid": 37,
|
||||||
|
"goat": 38,
|
||||||
|
"guardian": 39,
|
||||||
|
"hoglin": 40,
|
||||||
|
"horse": 41,
|
||||||
|
"husk": 42,
|
||||||
|
"illusioner": 43,
|
||||||
|
"iron_golem": 44,
|
||||||
|
"item": 45,
|
||||||
|
"item_frame": 46,
|
||||||
|
"fireball": 47,
|
||||||
|
"leash_knot": 48,
|
||||||
|
"lightning_bolt": 49,
|
||||||
|
"llama": 50,
|
||||||
|
"llama_spit": 51,
|
||||||
|
"magma_cube": 52,
|
||||||
|
"marker": 53,
|
||||||
|
"minecart": 54,
|
||||||
|
"chest_minecart": 55,
|
||||||
|
"command_block_minecart": 56,
|
||||||
|
"furnace_minecart": 57,
|
||||||
|
"hopper_minecart": 58,
|
||||||
|
"spawner_minecart": 59,
|
||||||
|
"tnt_minecart": 60,
|
||||||
|
"mule": 61,
|
||||||
|
"mooshroom": 62,
|
||||||
|
"ocelot": 63,
|
||||||
|
"painting": 64,
|
||||||
|
"panda": 65,
|
||||||
|
"parrot": 66,
|
||||||
|
"phantom": 67,
|
||||||
|
"pig": 68,
|
||||||
|
"piglin": 69,
|
||||||
|
"piglin_brute": 70,
|
||||||
|
"pillager": 71,
|
||||||
|
"polar_bear": 72,
|
||||||
|
"tnt": 73,
|
||||||
|
"pufferfish": 74,
|
||||||
|
"rabbit": 75,
|
||||||
|
"ravager": 76,
|
||||||
|
"salmon": 77,
|
||||||
|
"sheep": 78,
|
||||||
|
"shulker": 79,
|
||||||
|
"shulker_bullet": 80,
|
||||||
|
"silverfish": 81,
|
||||||
|
"skeleton": 82,
|
||||||
|
"skeleton_horse": 83,
|
||||||
|
"slime": 84,
|
||||||
|
"small_fireball": 85,
|
||||||
|
"snow_golem": 86,
|
||||||
|
"snowball": 87,
|
||||||
|
"spectral_arrow": 88,
|
||||||
|
"spider": 89,
|
||||||
|
"squid": 90,
|
||||||
|
"stray": 91,
|
||||||
|
"strider": 92,
|
||||||
|
"tadpole": 93,
|
||||||
|
"egg": 94,
|
||||||
|
"ender_pearl": 95,
|
||||||
|
"experience_bottle": 96,
|
||||||
|
"potion": 97,
|
||||||
|
"trident": 98,
|
||||||
|
"trader_llama": 99,
|
||||||
|
"tropical_fish": 100,
|
||||||
|
"turtle": 101,
|
||||||
|
"vex": 102,
|
||||||
|
"villager": 103,
|
||||||
|
"vindicator": 104,
|
||||||
|
"wandering_trader": 105,
|
||||||
|
"warden": 106,
|
||||||
|
"witch": 107,
|
||||||
|
"wither": 108,
|
||||||
|
"wither_skeleton": 109,
|
||||||
|
"wither_skull": 110,
|
||||||
|
"wolf": 111,
|
||||||
|
"zoglin": 112,
|
||||||
|
"zombie": 113,
|
||||||
|
"zombie_horse": 114,
|
||||||
|
"zombie_villager": 115,
|
||||||
|
"zombified_piglin": 116,
|
||||||
|
"player": 117,
|
||||||
|
"fishing_bobber": 118
|
||||||
|
},
|
||||||
|
"entity_event": {
|
||||||
|
"jump": 1,
|
||||||
|
"hurt": 2,
|
||||||
|
"death": 3,
|
||||||
|
"start_attacking": 4,
|
||||||
|
"stop_attacking": 5,
|
||||||
|
"taming_failed": 6,
|
||||||
|
"taming_succeeded": 7,
|
||||||
|
"shake_wetness": 8,
|
||||||
|
"use_item_complete": 9,
|
||||||
|
"eat_grass": 10,
|
||||||
|
"offer_flower": 11,
|
||||||
|
"love_hearts": 12,
|
||||||
|
"villager_angry": 13,
|
||||||
|
"villager_happy": 14,
|
||||||
|
"witch_hat_magic": 15,
|
||||||
|
"zombie_converting": 16,
|
||||||
|
"fireworks_explode": 17,
|
||||||
|
"in_love_hearts": 18,
|
||||||
|
"squid_anim_synch": 19,
|
||||||
|
"silverfish_merge_anim": 20,
|
||||||
|
"guardian_attack_sound": 21,
|
||||||
|
"reduced_debug_info": 22,
|
||||||
|
"full_debug_info": 23,
|
||||||
|
"permission_level_all": 24,
|
||||||
|
"permission_level_moderators": 25,
|
||||||
|
"permission_level_gamemasters": 26,
|
||||||
|
"permission_level_admins": 27,
|
||||||
|
"permission_level_owners": 28,
|
||||||
|
"attack_blocked": 29,
|
||||||
|
"shield_disabled": 30,
|
||||||
|
"fishing_rod_reel_in": 31,
|
||||||
|
"armorstand_wobble": 32,
|
||||||
|
"thorned": 33,
|
||||||
|
"stop_offer_flower": 34,
|
||||||
|
"talisman_activate": 35,
|
||||||
|
"drowned": 36,
|
||||||
|
"burned": 37,
|
||||||
|
"dolphin_looking_for_treasure": 38,
|
||||||
|
"ravager_stunned": 39,
|
||||||
|
"trusting_failed": 40,
|
||||||
|
"trusting_succeeded": 41,
|
||||||
|
"villager_sweat": 42,
|
||||||
|
"bad_omen_triggered": 43,
|
||||||
|
"poked": 44,
|
||||||
|
"fox_eat": 45,
|
||||||
|
"teleport": 46,
|
||||||
|
"mainhand_break": 47,
|
||||||
|
"offhand_break": 48,
|
||||||
|
"head_break": 49,
|
||||||
|
"chest_break": 50,
|
||||||
|
"legs_break": 51,
|
||||||
|
"feet_break": 52,
|
||||||
|
"honey_slide": 53,
|
||||||
|
"honey_jump": 54,
|
||||||
|
"swap_hands": 55,
|
||||||
|
"cancel_shake_wetness": 56,
|
||||||
|
"frozen": 57,
|
||||||
|
"start_ram": 58,
|
||||||
|
"end_ram": 59,
|
||||||
|
"poof": 60,
|
||||||
|
"tendrils_shiver": 61,
|
||||||
|
"sonic_charge": 62
|
||||||
|
},
|
||||||
|
"entity_animation": {
|
||||||
|
"swing_main_hand": 0,
|
||||||
|
"hurt": 1,
|
||||||
|
"wake_up": 2,
|
||||||
|
"swing_off_hand": 3,
|
||||||
|
"critical_hit": 4,
|
||||||
|
"magic_critical_hit": 5
|
||||||
|
},
|
||||||
|
"villager_type": {
|
||||||
|
"desert": 0,
|
||||||
|
"jungle": 1,
|
||||||
|
"plains": 2,
|
||||||
|
"savanna": 3,
|
||||||
|
"snow": 4,
|
||||||
|
"swamp": 5,
|
||||||
|
"taiga": 6
|
||||||
|
},
|
||||||
|
"villager_profession": {
|
||||||
|
"none": 0,
|
||||||
|
"armorer": 1,
|
||||||
|
"butcher": 2,
|
||||||
|
"cartographer": 3,
|
||||||
|
"cleric": 4,
|
||||||
|
"farmer": 5,
|
||||||
|
"fisherman": 6,
|
||||||
|
"fletcher": 7,
|
||||||
|
"leatherworker": 8,
|
||||||
|
"librarian": 9,
|
||||||
|
"mason": 10,
|
||||||
|
"nitwit": 11,
|
||||||
|
"shepherd": 12,
|
||||||
|
"toolsmith": 13,
|
||||||
|
"weaponsmith": 14
|
||||||
|
},
|
||||||
|
"cat_variant": {
|
||||||
|
"tabby": 0,
|
||||||
|
"black": 1,
|
||||||
|
"red": 2,
|
||||||
|
"siamese": 3,
|
||||||
|
"british_shorthair": 4,
|
||||||
|
"calico": 5,
|
||||||
|
"persian": 6,
|
||||||
|
"ragdoll": 7,
|
||||||
|
"white": 8,
|
||||||
|
"jellie": 9,
|
||||||
|
"all_black": 10
|
||||||
|
},
|
||||||
|
"frog_variant": {
|
||||||
|
"temperate": 0,
|
||||||
|
"warm": 1,
|
||||||
|
"cold": 2
|
||||||
|
},
|
||||||
|
"painting_variant": {
|
||||||
|
"kebab": {
|
||||||
|
"id": 0,
|
||||||
|
"width": 16,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"aztec": {
|
||||||
|
"id": 1,
|
||||||
|
"width": 16,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"alban": {
|
||||||
|
"id": 2,
|
||||||
|
"width": 16,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"aztec2": {
|
||||||
|
"id": 3,
|
||||||
|
"width": 16,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"bomb": {
|
||||||
|
"id": 4,
|
||||||
|
"width": 16,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"plant": {
|
||||||
|
"id": 5,
|
||||||
|
"width": 16,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"wasteland": {
|
||||||
|
"id": 6,
|
||||||
|
"width": 16,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"pool": {
|
||||||
|
"id": 7,
|
||||||
|
"width": 32,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"courbet": {
|
||||||
|
"id": 8,
|
||||||
|
"width": 32,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"sea": {
|
||||||
|
"id": 9,
|
||||||
|
"width": 32,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"sunset": {
|
||||||
|
"id": 10,
|
||||||
|
"width": 32,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"creebet": {
|
||||||
|
"id": 11,
|
||||||
|
"width": 32,
|
||||||
|
"height": 16
|
||||||
|
},
|
||||||
|
"wanderer": {
|
||||||
|
"id": 12,
|
||||||
|
"width": 16,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"graham": {
|
||||||
|
"id": 13,
|
||||||
|
"width": 16,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"match": {
|
||||||
|
"id": 14,
|
||||||
|
"width": 32,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"bust": {
|
||||||
|
"id": 15,
|
||||||
|
"width": 32,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"stage": {
|
||||||
|
"id": 16,
|
||||||
|
"width": 32,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"void": {
|
||||||
|
"id": 17,
|
||||||
|
"width": 32,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"skull_and_roses": {
|
||||||
|
"id": 18,
|
||||||
|
"width": 32,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"wither": {
|
||||||
|
"id": 19,
|
||||||
|
"width": 32,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"fighters": {
|
||||||
|
"id": 20,
|
||||||
|
"width": 64,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"pointer": {
|
||||||
|
"id": 21,
|
||||||
|
"width": 64,
|
||||||
|
"height": 64
|
||||||
|
},
|
||||||
|
"pigscene": {
|
||||||
|
"id": 22,
|
||||||
|
"width": 64,
|
||||||
|
"height": 64
|
||||||
|
},
|
||||||
|
"burning_skull": {
|
||||||
|
"id": 23,
|
||||||
|
"width": 64,
|
||||||
|
"height": 64
|
||||||
|
},
|
||||||
|
"skeleton": {
|
||||||
|
"id": 24,
|
||||||
|
"width": 64,
|
||||||
|
"height": 48
|
||||||
|
},
|
||||||
|
"earth": {
|
||||||
|
"id": 25,
|
||||||
|
"width": 32,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"wind": {
|
||||||
|
"id": 26,
|
||||||
|
"width": 32,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"water": {
|
||||||
|
"id": 27,
|
||||||
|
"width": 32,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"fire": {
|
||||||
|
"id": 28,
|
||||||
|
"width": 32,
|
||||||
|
"height": 32
|
||||||
|
},
|
||||||
|
"donkey_kong": {
|
||||||
|
"id": 29,
|
||||||
|
"width": 64,
|
||||||
|
"height": 48
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"direction": {
|
||||||
|
"down": 0,
|
||||||
|
"up": 1,
|
||||||
|
"north": 2,
|
||||||
|
"south": 3,
|
||||||
|
"west": 4,
|
||||||
|
"east": 5
|
||||||
|
},
|
||||||
|
"pose": {
|
||||||
|
"standing": 0,
|
||||||
|
"fall_flying": 1,
|
||||||
|
"sleeping": 2,
|
||||||
|
"swimming": 3,
|
||||||
|
"spin_attack": 4,
|
||||||
|
"crouching": 5,
|
||||||
|
"long_jumping": 6,
|
||||||
|
"dying": 7,
|
||||||
|
"croaking": 8,
|
||||||
|
"using_tongue": 9,
|
||||||
|
"sitting": 10,
|
||||||
|
"roaring": 11,
|
||||||
|
"sniffing": 12,
|
||||||
|
"emerging": 13,
|
||||||
|
"digging": 14
|
||||||
|
},
|
||||||
|
"particle_type": {
|
||||||
|
"ambient_entity_effect": 0,
|
||||||
|
"angry_villager": 1,
|
||||||
|
"block": 2,
|
||||||
|
"block_marker": 3,
|
||||||
|
"bubble": 4,
|
||||||
|
"cloud": 5,
|
||||||
|
"crit": 6,
|
||||||
|
"damage_indicator": 7,
|
||||||
|
"dragon_breath": 8,
|
||||||
|
"dripping_lava": 9,
|
||||||
|
"falling_lava": 10,
|
||||||
|
"landing_lava": 11,
|
||||||
|
"dripping_water": 12,
|
||||||
|
"falling_water": 13,
|
||||||
|
"dust": 14,
|
||||||
|
"dust_color_transition": 15,
|
||||||
|
"effect": 16,
|
||||||
|
"elder_guardian": 17,
|
||||||
|
"enchanted_hit": 18,
|
||||||
|
"enchant": 19,
|
||||||
|
"end_rod": 20,
|
||||||
|
"entity_effect": 21,
|
||||||
|
"explosion_emitter": 22,
|
||||||
|
"explosion": 23,
|
||||||
|
"sonic_boom": 24,
|
||||||
|
"falling_dust": 25,
|
||||||
|
"firework": 26,
|
||||||
|
"fishing": 27,
|
||||||
|
"flame": 28,
|
||||||
|
"sculk_soul": 29,
|
||||||
|
"sculk_charge": 30,
|
||||||
|
"sculk_charge_pop": 31,
|
||||||
|
"soul_fire_flame": 32,
|
||||||
|
"soul": 33,
|
||||||
|
"flash": 34,
|
||||||
|
"happy_villager": 35,
|
||||||
|
"composter": 36,
|
||||||
|
"heart": 37,
|
||||||
|
"instant_effect": 38,
|
||||||
|
"item": 39,
|
||||||
|
"vibration": 40,
|
||||||
|
"item_slime": 41,
|
||||||
|
"item_snowball": 42,
|
||||||
|
"large_smoke": 43,
|
||||||
|
"lava": 44,
|
||||||
|
"mycelium": 45,
|
||||||
|
"note": 46,
|
||||||
|
"poof": 47,
|
||||||
|
"portal": 48,
|
||||||
|
"rain": 49,
|
||||||
|
"smoke": 50,
|
||||||
|
"sneeze": 51,
|
||||||
|
"spit": 52,
|
||||||
|
"squid_ink": 53,
|
||||||
|
"sweep_attack": 54,
|
||||||
|
"totem_of_undying": 55,
|
||||||
|
"underwater": 56,
|
||||||
|
"splash": 57,
|
||||||
|
"witch": 58,
|
||||||
|
"bubble_pop": 59,
|
||||||
|
"current_down": 60,
|
||||||
|
"bubble_column_up": 61,
|
||||||
|
"nautilus": 62,
|
||||||
|
"dolphin": 63,
|
||||||
|
"campfire_cosy_smoke": 64,
|
||||||
|
"campfire_signal_smoke": 65,
|
||||||
|
"dripping_honey": 66,
|
||||||
|
"falling_honey": 67,
|
||||||
|
"landing_honey": 68,
|
||||||
|
"falling_nectar": 69,
|
||||||
|
"falling_spore_blossom": 70,
|
||||||
|
"ash": 71,
|
||||||
|
"crimson_spore": 72,
|
||||||
|
"warped_spore": 73,
|
||||||
|
"spore_blossom_air": 74,
|
||||||
|
"dripping_obsidian_tear": 75,
|
||||||
|
"falling_obsidian_tear": 76,
|
||||||
|
"landing_obsidian_tear": 77,
|
||||||
|
"reverse_portal": 78,
|
||||||
|
"white_ash": 79,
|
||||||
|
"small_flame": 80,
|
||||||
|
"snowflake": 81,
|
||||||
|
"dripping_dripstone_lava": 82,
|
||||||
|
"falling_dripstone_lava": 83,
|
||||||
|
"dripping_dripstone_water": 84,
|
||||||
|
"falling_dripstone_water": 85,
|
||||||
|
"glow_squid_ink": 86,
|
||||||
|
"glow": 87,
|
||||||
|
"wax_on": 88,
|
||||||
|
"wax_off": 89,
|
||||||
|
"electric_spark": 90,
|
||||||
|
"scrape": 91,
|
||||||
|
"shriek": 92
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,237 +2,237 @@
|
||||||
"serverbound": {
|
"serverbound": {
|
||||||
"handshaking": [
|
"handshaking": [
|
||||||
{
|
{
|
||||||
"name": "HandshakeC2SPacket",
|
"name": "ClientIntentionPacket",
|
||||||
"id": 0
|
"id": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"play": [
|
"play": [
|
||||||
{
|
{
|
||||||
"name": "TeleportConfirmC2SPacket",
|
"name": "ServerboundAcceptTeleportationPacket",
|
||||||
"id": 0
|
"id": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "QueryBlockNbtC2SPacket",
|
"name": "ServerboundBlockEntityTagQuery",
|
||||||
"id": 1
|
"id": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateDifficultyC2SPacket",
|
"name": "ServerboundChangeDifficultyPacket",
|
||||||
"id": 2
|
"id": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "MessageAcknowledgmentC2SPacket",
|
"name": "ServerboundChatAckPacket",
|
||||||
"id": 3
|
"id": 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CommandExecutionC2SPacket",
|
"name": "ServerboundChatCommandPacket",
|
||||||
"id": 4
|
"id": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ChatMessageC2SPacket",
|
"name": "ServerboundChatPacket",
|
||||||
"id": 5
|
"id": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ClientStatusC2SPacket",
|
"name": "ServerboundClientCommandPacket",
|
||||||
"id": 6
|
"id": 6
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ClientSettingsC2SPacket",
|
"name": "ServerboundClientInformationPacket",
|
||||||
"id": 7
|
"id": 7
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "RequestCommandCompletionsC2SPacket",
|
"name": "ServerboundCommandSuggestionPacket",
|
||||||
"id": 8
|
"id": 8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ButtonClickC2SPacket",
|
"name": "ServerboundContainerButtonClickPacket",
|
||||||
"id": 9
|
"id": 9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ClickSlotC2SPacket",
|
"name": "ServerboundContainerClickPacket",
|
||||||
"id": 10
|
"id": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CloseHandledScreenC2SPacket",
|
"name": "ServerboundContainerClosePacket",
|
||||||
"id": 11
|
"id": 11
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CustomPayloadC2SPacket",
|
"name": "ServerboundCustomPayloadPacket",
|
||||||
"id": 12
|
"id": 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BookUpdateC2SPacket",
|
"name": "ServerboundEditBookPacket",
|
||||||
"id": 13
|
"id": 13
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "QueryEntityNbtC2SPacket",
|
"name": "ServerboundEntityTagQuery",
|
||||||
"id": 14
|
"id": 14
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerInteractEntityC2SPacket",
|
"name": "ServerboundInteractPacket",
|
||||||
"id": 15
|
"id": 15
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "JigsawGeneratingC2SPacket",
|
"name": "ServerboundJigsawGeneratePacket",
|
||||||
"id": 16
|
"id": 16
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "KeepAliveC2SPacket",
|
"name": "ServerboundKeepAlivePacket",
|
||||||
"id": 17
|
"id": 17
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateDifficultyLockC2SPacket",
|
"name": "ServerboundLockDifficultyPacket",
|
||||||
"id": 18
|
"id": 18
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PositionAndOnGround",
|
"name": "Pos",
|
||||||
"id": 19
|
"id": 19
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Full",
|
"name": "PosRot",
|
||||||
"id": 20
|
"id": 20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LookAndOnGround",
|
"name": "Rot",
|
||||||
"id": 21
|
"id": 21
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "OnGroundOnly",
|
"name": "StatusOnly",
|
||||||
"id": 22
|
"id": 22
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VehicleMoveC2SPacket",
|
"name": "ServerboundMoveVehiclePacket",
|
||||||
"id": 23
|
"id": 23
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BoatPaddleStateC2SPacket",
|
"name": "ServerboundPaddleBoatPacket",
|
||||||
"id": 24
|
"id": 24
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PickFromInventoryC2SPacket",
|
"name": "ServerboundPickItemPacket",
|
||||||
"id": 25
|
"id": 25
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CraftRequestC2SPacket",
|
"name": "ServerboundPlaceRecipePacket",
|
||||||
"id": 26
|
"id": 26
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdatePlayerAbilitiesC2SPacket",
|
"name": "ServerboundPlayerAbilitiesPacket",
|
||||||
"id": 27
|
"id": 27
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerActionC2SPacket",
|
"name": "ServerboundPlayerActionPacket",
|
||||||
"id": 28
|
"id": 28
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ClientCommandC2SPacket",
|
"name": "ServerboundPlayerCommandPacket",
|
||||||
"id": 29
|
"id": 29
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerInputC2SPacket",
|
"name": "ServerboundPlayerInputPacket",
|
||||||
"id": 30
|
"id": 30
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayPongC2SPacket",
|
"name": "ServerboundPongPacket",
|
||||||
"id": 31
|
"id": 31
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerSessionC2SPacket",
|
"name": "ServerboundChatSessionUpdatePacket",
|
||||||
"id": 32
|
"id": 32
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "RecipeCategoryOptionsC2SPacket",
|
"name": "ServerboundRecipeBookChangeSettingsPacket",
|
||||||
"id": 33
|
"id": 33
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "RecipeBookDataC2SPacket",
|
"name": "ServerboundRecipeBookSeenRecipePacket",
|
||||||
"id": 34
|
"id": 34
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "RenameItemC2SPacket",
|
"name": "ServerboundRenameItemPacket",
|
||||||
"id": 35
|
"id": 35
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ResourcePackStatusC2SPacket",
|
"name": "ServerboundResourcePackPacket",
|
||||||
"id": 36
|
"id": 36
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "AdvancementTabC2SPacket",
|
"name": "ServerboundSeenAdvancementsPacket",
|
||||||
"id": 37
|
"id": 37
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SelectMerchantTradeC2SPacket",
|
"name": "ServerboundSelectTradePacket",
|
||||||
"id": 38
|
"id": 38
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateBeaconC2SPacket",
|
"name": "ServerboundSetBeaconPacket",
|
||||||
"id": 39
|
"id": 39
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateSelectedSlotC2SPacket",
|
"name": "ServerboundSetCarriedItemPacket",
|
||||||
"id": 40
|
"id": 40
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateCommandBlockC2SPacket",
|
"name": "ServerboundSetCommandBlockPacket",
|
||||||
"id": 41
|
"id": 41
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateCommandBlockMinecartC2SPacket",
|
"name": "ServerboundSetCommandMinecartPacket",
|
||||||
"id": 42
|
"id": 42
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CreativeInventoryActionC2SPacket",
|
"name": "ServerboundSetCreativeModeSlotPacket",
|
||||||
"id": 43
|
"id": 43
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateJigsawC2SPacket",
|
"name": "ServerboundSetJigsawBlockPacket",
|
||||||
"id": 44
|
"id": 44
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateStructureBlockC2SPacket",
|
"name": "ServerboundSetStructureBlockPacket",
|
||||||
"id": 45
|
"id": 45
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateSignC2SPacket",
|
"name": "ServerboundSignUpdatePacket",
|
||||||
"id": 46
|
"id": 46
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "HandSwingC2SPacket",
|
"name": "ServerboundSwingPacket",
|
||||||
"id": 47
|
"id": 47
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SpectatorTeleportC2SPacket",
|
"name": "ServerboundTeleportToEntityPacket",
|
||||||
"id": 48
|
"id": 48
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerInteractBlockC2SPacket",
|
"name": "ServerboundUseItemOnPacket",
|
||||||
"id": 49
|
"id": 49
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerInteractItemC2SPacket",
|
"name": "ServerboundUseItemPacket",
|
||||||
"id": 50
|
"id": 50
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"status": [
|
"status": [
|
||||||
{
|
{
|
||||||
"name": "QueryRequestC2SPacket",
|
"name": "ServerboundStatusRequestPacket",
|
||||||
"id": 0
|
"id": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "QueryPingC2SPacket",
|
"name": "ServerboundPingRequestPacket",
|
||||||
"id": 1
|
"id": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"login": [
|
"login": [
|
||||||
{
|
{
|
||||||
"name": "LoginHelloC2SPacket",
|
"name": "ServerboundHelloPacket",
|
||||||
"id": 0
|
"id": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LoginKeyC2SPacket",
|
"name": "ServerboundKeyPacket",
|
||||||
"id": 1
|
"id": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LoginQueryResponseC2SPacket",
|
"name": "ServerboundCustomQueryPacket",
|
||||||
"id": 2
|
"id": 2
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -241,463 +241,463 @@
|
||||||
"handshaking": [],
|
"handshaking": [],
|
||||||
"play": [
|
"play": [
|
||||||
{
|
{
|
||||||
"name": "EntitySpawnS2CPacket",
|
"name": "ClientboundAddEntityPacket",
|
||||||
"id": 0
|
"id": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ExperienceOrbSpawnS2CPacket",
|
"name": "ClientboundAddExperienceOrbPacket",
|
||||||
"id": 1
|
"id": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerSpawnS2CPacket",
|
"name": "ClientboundAddPlayerPacket",
|
||||||
"id": 2
|
"id": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntityAnimationS2CPacket",
|
"name": "ClientboundAnimatePacket",
|
||||||
"id": 3
|
"id": 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "StatisticsS2CPacket",
|
"name": "ClientboundAwardStatsPacket",
|
||||||
"id": 4
|
"id": 4
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerActionResponseS2CPacket",
|
"name": "ClientboundBlockChangedAckPacket",
|
||||||
"id": 5
|
"id": 5
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BlockBreakingProgressS2CPacket",
|
"name": "ClientboundBlockDestructionPacket",
|
||||||
"id": 6
|
"id": 6
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BlockEntityUpdateS2CPacket",
|
"name": "ClientboundBlockEntityDataPacket",
|
||||||
"id": 7
|
"id": 7
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BlockEventS2CPacket",
|
"name": "ClientboundBlockEventPacket",
|
||||||
"id": 8
|
"id": 8
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BlockUpdateS2CPacket",
|
"name": "ClientboundBlockUpdatePacket",
|
||||||
"id": 9
|
"id": 9
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "BossBarS2CPacket",
|
"name": "ClientboundBossEventPacket",
|
||||||
"id": 10
|
"id": 10
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DifficultyS2CPacket",
|
"name": "ClientboundChangeDifficultyPacket",
|
||||||
"id": 11
|
"id": 11
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ClearTitleS2CPacket",
|
"name": "ClientboundClearTitlesPacket",
|
||||||
"id": 12
|
"id": 12
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CommandSuggestionsS2CPacket",
|
"name": "ClientboundCommandSuggestionsPacket",
|
||||||
"id": 13
|
"id": 13
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CommandTreeS2CPacket",
|
"name": "ClientboundCommandsPacket",
|
||||||
"id": 14
|
"id": 14
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CloseScreenS2CPacket",
|
"name": "ClientboundContainerClosePacket",
|
||||||
"id": 15
|
"id": 15
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "InventoryS2CPacket",
|
"name": "ClientboundContainerSetContentPacket",
|
||||||
"id": 16
|
"id": 16
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ScreenHandlerPropertyUpdateS2CPacket",
|
"name": "ClientboundContainerSetDataPacket",
|
||||||
"id": 17
|
"id": 17
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ScreenHandlerSlotUpdateS2CPacket",
|
"name": "ClientboundContainerSetSlotPacket",
|
||||||
"id": 18
|
"id": 18
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CooldownUpdateS2CPacket",
|
"name": "ClientboundCooldownPacket",
|
||||||
"id": 19
|
"id": 19
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ChatSuggestionsS2CPacket",
|
"name": "ClientboundCustomChatCompletionsPacket",
|
||||||
"id": 20
|
"id": 20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CustomPayloadS2CPacket",
|
"name": "ClientboundCustomPayloadPacket",
|
||||||
"id": 21
|
"id": 21
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "RemoveMessageS2CPacket",
|
"name": "ClientboundDeleteChatPacket",
|
||||||
"id": 22
|
"id": 22
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DisconnectS2CPacket",
|
"name": "ClientboundDisconnectPacket",
|
||||||
"id": 23
|
"id": 23
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ProfilelessChatMessageS2CPacket",
|
"name": "ClientboundDisguisedChatPacket",
|
||||||
"id": 24
|
"id": 24
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntityStatusS2CPacket",
|
"name": "ClientboundEntityEventPacket",
|
||||||
"id": 25
|
"id": 25
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ExplosionS2CPacket",
|
"name": "ClientboundExplodePacket",
|
||||||
"id": 26
|
"id": 26
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UnloadChunkS2CPacket",
|
"name": "ClientboundForgetLevelChunkPacket",
|
||||||
"id": 27
|
"id": 27
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "GameStateChangeS2CPacket",
|
"name": "ClientboundGameEventPacket",
|
||||||
"id": 28
|
"id": 28
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "OpenHorseScreenS2CPacket",
|
"name": "ClientboundHorseScreenOpenPacket",
|
||||||
"id": 29
|
"id": 29
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "WorldBorderInitializeS2CPacket",
|
"name": "ClientboundInitializeBorderPacket",
|
||||||
"id": 30
|
"id": 30
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "KeepAliveS2CPacket",
|
"name": "ClientboundKeepAlivePacket",
|
||||||
"id": 31
|
"id": 31
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ChunkDataS2CPacket",
|
"name": "ClientboundLevelChunkWithLightPacket",
|
||||||
"id": 32
|
"id": 32
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "WorldEventS2CPacket",
|
"name": "ClientboundLevelEventPacket",
|
||||||
"id": 33
|
"id": 33
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ParticleS2CPacket",
|
"name": "ClientboundLevelParticlesPacket",
|
||||||
"id": 34
|
"id": 34
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LightUpdateS2CPacket",
|
"name": "ClientboundLightUpdatePacket",
|
||||||
"id": 35
|
"id": 35
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "GameJoinS2CPacket",
|
"name": "ClientboundLoginPacket",
|
||||||
"id": 36
|
"id": 36
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "MapUpdateS2CPacket",
|
"name": "ClientboundMapItemDataPacket",
|
||||||
"id": 37
|
"id": 37
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SetTradeOffersS2CPacket",
|
"name": "ClientboundMerchantOffersPacket",
|
||||||
"id": 38
|
"id": 38
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "MoveRelative",
|
"name": "Pos",
|
||||||
"id": 39
|
"id": 39
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "RotateAndMoveRelative",
|
"name": "PosRot",
|
||||||
"id": 40
|
"id": 40
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Rotate",
|
"name": "Rot",
|
||||||
"id": 41
|
"id": 41
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "VehicleMoveS2CPacket",
|
"name": "ClientboundMoveVehiclePacket",
|
||||||
"id": 42
|
"id": 42
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "OpenWrittenBookS2CPacket",
|
"name": "ClientboundOpenBookPacket",
|
||||||
"id": 43
|
"id": 43
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "OpenScreenS2CPacket",
|
"name": "ClientboundOpenScreenPacket",
|
||||||
"id": 44
|
"id": 44
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SignEditorOpenS2CPacket",
|
"name": "ClientboundOpenSignEditorPacket",
|
||||||
"id": 45
|
"id": 45
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayPingS2CPacket",
|
"name": "ClientboundPingPacket",
|
||||||
"id": 46
|
"id": 46
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "CraftFailedResponseS2CPacket",
|
"name": "ClientboundPlaceGhostRecipePacket",
|
||||||
"id": 47
|
"id": 47
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerAbilitiesS2CPacket",
|
"name": "ClientboundPlayerAbilitiesPacket",
|
||||||
"id": 48
|
"id": 48
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ChatMessageS2CPacket",
|
"name": "ClientboundPlayerChatPacket",
|
||||||
"id": 49
|
"id": 49
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EndCombatS2CPacket",
|
"name": "ClientboundPlayerCombatEndPacket",
|
||||||
"id": 50
|
"id": 50
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EnterCombatS2CPacket",
|
"name": "ClientboundPlayerCombatEnterPacket",
|
||||||
"id": 51
|
"id": 51
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "DeathMessageS2CPacket",
|
"name": "ClientboundPlayerCombatKillPacket",
|
||||||
"id": 52
|
"id": 52
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerRemoveS2CPacket",
|
"name": "ClientboundPlayerInfoRemovePacket",
|
||||||
"id": 53
|
"id": 53
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerListS2CPacket",
|
"name": "ClientboundPlayerInfoUpdatePacket",
|
||||||
"id": 54
|
"id": 54
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LookAtS2CPacket",
|
"name": "ClientboundPlayerLookAtPacket",
|
||||||
"id": 55
|
"id": 55
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerPositionLookS2CPacket",
|
"name": "ClientboundPlayerPositionPacket",
|
||||||
"id": 56
|
"id": 56
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UnlockRecipesS2CPacket",
|
"name": "ClientboundRecipePacket",
|
||||||
"id": 57
|
"id": 57
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntitiesDestroyS2CPacket",
|
"name": "ClientboundRemoveEntitiesPacket",
|
||||||
"id": 58
|
"id": 58
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "RemoveEntityStatusEffectS2CPacket",
|
"name": "ClientboundRemoveMobEffectPacket",
|
||||||
"id": 59
|
"id": 59
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ResourcePackSendS2CPacket",
|
"name": "ClientboundResourcePackPacket",
|
||||||
"id": 60
|
"id": 60
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerRespawnS2CPacket",
|
"name": "ClientboundRespawnPacket",
|
||||||
"id": 61
|
"id": 61
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntitySetHeadYawS2CPacket",
|
"name": "ClientboundRotateHeadPacket",
|
||||||
"id": 62
|
"id": 62
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ChunkDeltaUpdateS2CPacket",
|
"name": "ClientboundSectionBlocksUpdatePacket",
|
||||||
"id": 63
|
"id": 63
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SelectAdvancementTabS2CPacket",
|
"name": "ClientboundSelectAdvancementsTabPacket",
|
||||||
"id": 64
|
"id": 64
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ServerMetadataS2CPacket",
|
"name": "ClientboundServerDataPacket",
|
||||||
"id": 65
|
"id": 65
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "OverlayMessageS2CPacket",
|
"name": "ClientboundSetActionBarTextPacket",
|
||||||
"id": 66
|
"id": 66
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "WorldBorderCenterChangedS2CPacket",
|
"name": "ClientboundSetBorderCenterPacket",
|
||||||
"id": 67
|
"id": 67
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "WorldBorderInterpolateSizeS2CPacket",
|
"name": "ClientboundSetBorderLerpSizePacket",
|
||||||
"id": 68
|
"id": 68
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "WorldBorderSizeChangedS2CPacket",
|
"name": "ClientboundSetBorderSizePacket",
|
||||||
"id": 69
|
"id": 69
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "WorldBorderWarningTimeChangedS2CPacket",
|
"name": "ClientboundSetBorderWarningDelayPacket",
|
||||||
"id": 70
|
"id": 70
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "WorldBorderWarningBlocksChangedS2CPacket",
|
"name": "ClientboundSetBorderWarningDistancePacket",
|
||||||
"id": 71
|
"id": 71
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SetCameraEntityS2CPacket",
|
"name": "ClientboundSetCameraPacket",
|
||||||
"id": 72
|
"id": 72
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "UpdateSelectedSlotS2CPacket",
|
"name": "ClientboundSetCarriedItemPacket",
|
||||||
"id": 73
|
"id": 73
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ChunkRenderDistanceCenterS2CPacket",
|
"name": "ClientboundSetChunkCacheCenterPacket",
|
||||||
"id": 74
|
"id": 74
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ChunkLoadDistanceS2CPacket",
|
"name": "ClientboundSetChunkCacheRadiusPacket",
|
||||||
"id": 75
|
"id": 75
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerSpawnPositionS2CPacket",
|
"name": "ClientboundSetDefaultSpawnPositionPacket",
|
||||||
"id": 76
|
"id": 76
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ScoreboardDisplayS2CPacket",
|
"name": "ClientboundSetDisplayObjectivePacket",
|
||||||
"id": 77
|
"id": 77
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntityTrackerUpdateS2CPacket",
|
"name": "ClientboundSetEntityDataPacket",
|
||||||
"id": 78
|
"id": 78
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntityAttachS2CPacket",
|
"name": "ClientboundSetEntityLinkPacket",
|
||||||
"id": 79
|
"id": 79
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntityVelocityUpdateS2CPacket",
|
"name": "ClientboundSetEntityMotionPacket",
|
||||||
"id": 80
|
"id": 80
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntityEquipmentUpdateS2CPacket",
|
"name": "ClientboundSetEquipmentPacket",
|
||||||
"id": 81
|
"id": 81
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ExperienceBarUpdateS2CPacket",
|
"name": "ClientboundSetExperiencePacket",
|
||||||
"id": 82
|
"id": 82
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "HealthUpdateS2CPacket",
|
"name": "ClientboundSetHealthPacket",
|
||||||
"id": 83
|
"id": 83
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ScoreboardObjectiveUpdateS2CPacket",
|
"name": "ClientboundSetObjectivePacket",
|
||||||
"id": 84
|
"id": 84
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntityPassengersSetS2CPacket",
|
"name": "ClientboundSetPassengersPacket",
|
||||||
"id": 85
|
"id": 85
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "TeamS2CPacket",
|
"name": "ClientboundSetPlayerTeamPacket",
|
||||||
"id": 86
|
"id": 86
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ScoreboardPlayerUpdateS2CPacket",
|
"name": "ClientboundSetScorePacket",
|
||||||
"id": 87
|
"id": 87
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SimulationDistanceS2CPacket",
|
"name": "ClientboundSetSimulationDistancePacket",
|
||||||
"id": 88
|
"id": 88
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SubtitleS2CPacket",
|
"name": "ClientboundSetSubtitleTextPacket",
|
||||||
"id": 89
|
"id": 89
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "WorldTimeUpdateS2CPacket",
|
"name": "ClientboundSetTimePacket",
|
||||||
"id": 90
|
"id": 90
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "TitleS2CPacket",
|
"name": "ClientboundSetTitleTextPacket",
|
||||||
"id": 91
|
"id": 91
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "TitleFadeS2CPacket",
|
"name": "ClientboundSetTitlesAnimationPacket",
|
||||||
"id": 92
|
"id": 92
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlaySoundFromEntityS2CPacket",
|
"name": "ClientboundSoundEntityPacket",
|
||||||
"id": 93
|
"id": 93
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlaySoundS2CPacket",
|
"name": "ClientboundSoundPacket",
|
||||||
"id": 94
|
"id": 94
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "StopSoundS2CPacket",
|
"name": "ClientboundStopSoundPacket",
|
||||||
"id": 95
|
"id": 95
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "GameMessageS2CPacket",
|
"name": "ClientboundSystemChatPacket",
|
||||||
"id": 96
|
"id": 96
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "PlayerListHeaderS2CPacket",
|
"name": "ClientboundTabListPacket",
|
||||||
"id": 97
|
"id": 97
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "NbtQueryResponseS2CPacket",
|
"name": "ClientboundTagQueryPacket",
|
||||||
"id": 98
|
"id": 98
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "ItemPickupAnimationS2CPacket",
|
"name": "ClientboundTakeItemEntityPacket",
|
||||||
"id": 99
|
"id": 99
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntityPositionS2CPacket",
|
"name": "ClientboundTeleportEntityPacket",
|
||||||
"id": 100
|
"id": 100
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "AdvancementUpdateS2CPacket",
|
"name": "ClientboundUpdateAdvancementsPacket",
|
||||||
"id": 101
|
"id": 101
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntityAttributesS2CPacket",
|
"name": "ClientboundUpdateAttributesPacket",
|
||||||
"id": 102
|
"id": 102
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "FeaturesS2CPacket",
|
"name": "ClientboundUpdateEnabledFeaturesPacket",
|
||||||
"id": 103
|
"id": 103
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "EntityStatusEffectS2CPacket",
|
"name": "ClientboundUpdateMobEffectPacket",
|
||||||
"id": 104
|
"id": 104
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SynchronizeRecipesS2CPacket",
|
"name": "ClientboundUpdateRecipesPacket",
|
||||||
"id": 105
|
"id": 105
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "SynchronizeTagsS2CPacket",
|
"name": "ClientboundUpdateTagsPacket",
|
||||||
"id": 106
|
"id": 106
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"status": [
|
"status": [
|
||||||
{
|
{
|
||||||
"name": "QueryResponseS2CPacket",
|
"name": "ClientboundStatusResponsePacket",
|
||||||
"id": 0
|
"id": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "QueryPongS2CPacket",
|
"name": "ClientboundPongResponsePacket",
|
||||||
"id": 1
|
"id": 1
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"login": [
|
"login": [
|
||||||
{
|
{
|
||||||
"name": "LoginDisconnectS2CPacket",
|
"name": "ClientboundLoginDisconnectPacket",
|
||||||
"id": 0
|
"id": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LoginHelloS2CPacket",
|
"name": "ClientboundHelloPacket",
|
||||||
"id": 1
|
"id": 1
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LoginSuccessS2CPacket",
|
"name": "ClientboundGameProfilePacket",
|
||||||
"id": 2
|
"id": 2
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LoginCompressionS2CPacket",
|
"name": "ClientboundLoginCompressionPacket",
|
||||||
"id": 3
|
"id": 3
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "LoginQueryRequestS2CPacket",
|
"name": "ClientboundCustomQueryPacket",
|
||||||
"id": 4
|
"id": 4
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -14,7 +14,7 @@ dependencies {
|
||||||
|
|
||||||
// To change the versions see the gradle.properties file
|
// To change the versions see the gradle.properties file
|
||||||
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
minecraft "com.mojang:minecraft:${project.minecraft_version}"
|
||||||
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
|
mappings loom.officialMojangMappings()
|
||||||
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
|
||||||
|
|
||||||
// modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
// modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
|
||||||
|
|
|
@ -1,42 +0,0 @@
|
||||||
package rs.valence.extractor;
|
|
||||||
|
|
||||||
import com.mojang.authlib.GameProfile;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.data.DataTracker;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
|
||||||
import net.minecraft.network.encryption.PlayerPublicKey;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
public class DummyPlayerEntity extends PlayerEntity {
|
|
||||||
public static final DummyPlayerEntity INSTANCE;
|
|
||||||
|
|
||||||
static {
|
|
||||||
INSTANCE = Main.magicallyInstantiate(DummyPlayerEntity.class);
|
|
||||||
|
|
||||||
try {
|
|
||||||
var dataTrackerField = Entity.class.getDeclaredField("dataTracker");
|
|
||||||
dataTrackerField.setAccessible(true);
|
|
||||||
dataTrackerField.set(INSTANCE, new DataTracker(INSTANCE));
|
|
||||||
|
|
||||||
INSTANCE.initDataTracker();
|
|
||||||
} catch (NoSuchFieldException | IllegalAccessException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private DummyPlayerEntity(World world, BlockPos pos, float yaw, GameProfile gameProfile, @Nullable PlayerPublicKey publicKey) {
|
|
||||||
super(world, pos, yaw, gameProfile);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isSpectator() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isCreative() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,267 +0,0 @@
|
||||||
package rs.valence.extractor;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.entity.player.PlayerEntity;
|
|
||||||
import net.minecraft.fluid.Fluid;
|
|
||||||
import net.minecraft.item.map.MapState;
|
|
||||||
import net.minecraft.recipe.RecipeManager;
|
|
||||||
import net.minecraft.registry.DynamicRegistryManager;
|
|
||||||
import net.minecraft.registry.RegistryKey;
|
|
||||||
import net.minecraft.registry.entry.RegistryEntry;
|
|
||||||
import net.minecraft.resource.featuretoggle.FeatureFlags;
|
|
||||||
import net.minecraft.resource.featuretoggle.FeatureSet;
|
|
||||||
import net.minecraft.scoreboard.Scoreboard;
|
|
||||||
import net.minecraft.sound.SoundCategory;
|
|
||||||
import net.minecraft.sound.SoundEvent;
|
|
||||||
import net.minecraft.util.math.BlockPos;
|
|
||||||
import net.minecraft.util.math.Direction;
|
|
||||||
import net.minecraft.util.math.Vec3d;
|
|
||||||
import net.minecraft.util.math.random.Random;
|
|
||||||
import net.minecraft.util.profiler.Profiler;
|
|
||||||
import net.minecraft.world.Difficulty;
|
|
||||||
import net.minecraft.world.GameRules;
|
|
||||||
import net.minecraft.world.MutableWorldProperties;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
import net.minecraft.world.biome.Biome;
|
|
||||||
import net.minecraft.world.chunk.ChunkManager;
|
|
||||||
import net.minecraft.world.dimension.DimensionType;
|
|
||||||
import net.minecraft.world.entity.EntityLookup;
|
|
||||||
import net.minecraft.world.event.GameEvent;
|
|
||||||
import net.minecraft.world.tick.QueryableTickScheduler;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
public class DummyWorld extends World {
|
|
||||||
|
|
||||||
public static final DummyWorld INSTANCE;
|
|
||||||
|
|
||||||
static {
|
|
||||||
INSTANCE = Main.magicallyInstantiate(DummyWorld.class);
|
|
||||||
|
|
||||||
try {
|
|
||||||
var randomField = World.class.getDeclaredField("random");
|
|
||||||
randomField.setAccessible(true);
|
|
||||||
randomField.set(INSTANCE, Random.create());
|
|
||||||
|
|
||||||
var propertiesField = World.class.getDeclaredField("properties");
|
|
||||||
propertiesField.setAccessible(true);
|
|
||||||
propertiesField.set(INSTANCE, new DummyMutableWorldProperties());
|
|
||||||
|
|
||||||
} catch (NoSuchFieldException | IllegalAccessException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private DummyWorld(MutableWorldProperties properties, RegistryKey<World> registryRef, RegistryEntry<DimensionType> dimension, Supplier<Profiler> profiler, boolean isClient, boolean debugWorld, long seed, int maxChainedNeighborUpdates) {
|
|
||||||
super(properties, registryRef, dimension, profiler, isClient, debugWorld, seed, maxChainedNeighborUpdates);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void updateListeners(BlockPos pos, BlockState oldState, BlockState newState, int flags) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void playSound(@Nullable PlayerEntity except, double x, double y, double z, RegistryEntry<SoundEvent> sound, SoundCategory category, float volume, float pitch, long seed) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void playSound(@Nullable PlayerEntity except, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch, long seed) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void playSoundFromEntity(@Nullable PlayerEntity except, Entity entity, RegistryEntry<SoundEvent> sound, SoundCategory category, float volume, float pitch, long seed) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String asString() {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@Override
|
|
||||||
public Entity getEntityById(int id) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@Override
|
|
||||||
public MapState getMapState(String id) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void putMapState(String id, MapState state) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getNextMapId() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setBlockBreakingInfo(int entityId, BlockPos pos, int progress) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Scoreboard getScoreboard() {
|
|
||||||
return new Scoreboard();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public RecipeManager getRecipeManager() {
|
|
||||||
return new RecipeManager();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
protected EntityLookup<Entity> getEntityLookup() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public QueryableTickScheduler<Block> getBlockTickScheduler() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public QueryableTickScheduler<Fluid> getFluidTickScheduler() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ChunkManager getChunkManager() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void syncWorldEvent(@Nullable PlayerEntity player, int eventId, BlockPos pos, int data) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void emitGameEvent(GameEvent event, Vec3d emitterPos, GameEvent.Emitter emitter) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public DynamicRegistryManager getRegistryManager() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public FeatureSet getEnabledFeatures() {
|
|
||||||
return FeatureSet.of(FeatureFlags.VANILLA, FeatureFlags.BUNDLE, FeatureFlags.UPDATE_1_20);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public float getBrightness(Direction direction, boolean shaded) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<? extends PlayerEntity> getPlayers() {
|
|
||||||
return List.of();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public RegistryEntry<Biome> getGeneratorStoredBiome(int biomeX, int biomeY, int biomeZ) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static class DummyMutableWorldProperties implements MutableWorldProperties {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getSpawnX() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setSpawnX(int spawnX) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getSpawnY() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setSpawnY(int spawnY) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getSpawnZ() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setSpawnZ(int spawnZ) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public float getSpawnAngle() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setSpawnAngle(float spawnAngle) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getTime() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public long getTimeOfDay() {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isThundering() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isRaining() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setRaining(boolean raining) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isHardcore() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public GameRules getGameRules() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public Difficulty getDifficulty() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isDifficultyLocked() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -41,7 +41,7 @@ public class Main implements ModInitializer {
|
||||||
new Blocks(),
|
new Blocks(),
|
||||||
new Enchants(),
|
new Enchants(),
|
||||||
new Entities(),
|
new Entities(),
|
||||||
new EntityData(),
|
new Misc(),
|
||||||
new Items(),
|
new Items(),
|
||||||
new Packets(),
|
new Packets(),
|
||||||
new Sounds(),
|
new Sounds(),
|
||||||
|
|
261
extractor/src/main/java/rs/valence/extractor/MockLevel.java
Normal file
261
extractor/src/main/java/rs/valence/extractor/MockLevel.java
Normal file
|
@ -0,0 +1,261 @@
|
||||||
|
package rs.valence.extractor;
|
||||||
|
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.Holder;
|
||||||
|
import net.minecraft.core.RegistryAccess;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.sounds.SoundEvent;
|
||||||
|
import net.minecraft.sounds.SoundSource;
|
||||||
|
import net.minecraft.util.RandomSource;
|
||||||
|
import net.minecraft.util.profiling.ProfilerFiller;
|
||||||
|
import net.minecraft.world.Difficulty;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.flag.FeatureFlagSet;
|
||||||
|
import net.minecraft.world.flag.FeatureFlags;
|
||||||
|
import net.minecraft.world.item.crafting.RecipeManager;
|
||||||
|
import net.minecraft.world.level.GameRules;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.level.biome.Biome;
|
||||||
|
import net.minecraft.world.level.block.Block;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraft.world.level.chunk.ChunkSource;
|
||||||
|
import net.minecraft.world.level.dimension.DimensionType;
|
||||||
|
import net.minecraft.world.level.entity.LevelEntityGetter;
|
||||||
|
import net.minecraft.world.level.gameevent.GameEvent;
|
||||||
|
import net.minecraft.world.level.material.Fluid;
|
||||||
|
import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
|
||||||
|
import net.minecraft.world.level.storage.WritableLevelData;
|
||||||
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import net.minecraft.world.scores.Scoreboard;
|
||||||
|
import net.minecraft.world.ticks.LevelTickAccess;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
|
public class MockLevel extends Level {
|
||||||
|
|
||||||
|
public static final MockLevel INSTANCE;
|
||||||
|
|
||||||
|
static {
|
||||||
|
INSTANCE = Main.magicallyInstantiate(MockLevel.class);
|
||||||
|
|
||||||
|
try {
|
||||||
|
var randomField = Level.class.getDeclaredField("random");
|
||||||
|
randomField.setAccessible(true);
|
||||||
|
randomField.set(INSTANCE, RandomSource.create());
|
||||||
|
|
||||||
|
var levelDataField = Level.class.getDeclaredField("levelData");
|
||||||
|
levelDataField.setAccessible(true);
|
||||||
|
levelDataField.set(INSTANCE, new MockWritableLevelData());
|
||||||
|
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private MockLevel(WritableLevelData writableLevelData, ResourceKey<Level> resourceKey, Holder<DimensionType> holder, Supplier<ProfilerFiller> supplier, boolean bl, boolean bl2, long l, int i) {
|
||||||
|
super(writableLevelData, resourceKey, holder, supplier, bl, bl2, l, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void sendBlockUpdated(BlockPos blockPos, BlockState blockState, BlockState blockState2, int i) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void playSeededSound(@Nullable Player player, double d, double e, double f, Holder<SoundEvent> holder, SoundSource soundSource, float g, float h, long l) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void playSeededSound(@Nullable Player player, Entity entity, Holder<SoundEvent> holder, SoundSource soundSource, float f, float g, long l) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String gatherChunkSourceStats() {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public Entity getEntity(int i) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Override
|
||||||
|
public MapItemSavedData getMapData(String string) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setMapData(String string, MapItemSavedData mapItemSavedData) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getFreeMapId() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroyBlockProgress(int i, BlockPos blockPos, int j) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Scoreboard getScoreboard() {
|
||||||
|
return new Scoreboard();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RecipeManager getRecipeManager() {
|
||||||
|
return new RecipeManager();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected LevelEntityGetter<Entity> getEntities() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LevelTickAccess<Block> getBlockTicks() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public LevelTickAccess<Fluid> getFluidTicks() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ChunkSource getChunkSource() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void levelEvent(@Nullable Player player, int i, BlockPos blockPos, int j) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void gameEvent(GameEvent gameEvent, Vec3 vec3, GameEvent.Context context) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getShade(Direction direction, boolean bl) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<? extends Player> players() {
|
||||||
|
return List.of();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Holder<Biome> getUncachedNoiseBiome(int i, int j, int k) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public RegistryAccess registryAccess() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public FeatureFlagSet enabledFeatures() {
|
||||||
|
return FeatureFlagSet.of(FeatureFlags.VANILLA, FeatureFlags.BUNDLE, FeatureFlags.UPDATE_1_20);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static class MockWritableLevelData implements WritableLevelData {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setXSpawn(int i) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setYSpawn(int i) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setZSpawn(int i) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setSpawnAngle(float f) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getXSpawn() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getYSpawn() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getZSpawn() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getSpawnAngle() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getGameTime() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public long getDayTime() {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isThundering() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isRaining() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setRaining(boolean bl) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isHardcore() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public GameRules getGameRules() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Difficulty getDifficulty() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isDifficultyLocked() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,40 @@
|
||||||
|
package rs.valence.extractor;
|
||||||
|
|
||||||
|
import com.mojang.authlib.GameProfile;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.network.syncher.SynchedEntityData;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
|
||||||
|
public class MockPlayerEntity extends Player {
|
||||||
|
public static final MockPlayerEntity INSTANCE;
|
||||||
|
|
||||||
|
static {
|
||||||
|
INSTANCE = Main.magicallyInstantiate(MockPlayerEntity.class);
|
||||||
|
|
||||||
|
try {
|
||||||
|
var entityDataField = Entity.class.getDeclaredField("entityData");
|
||||||
|
entityDataField.setAccessible(true);
|
||||||
|
entityDataField.set(INSTANCE, new SynchedEntityData(INSTANCE));
|
||||||
|
|
||||||
|
INSTANCE.defineSynchedData();
|
||||||
|
} catch (NoSuchFieldException | IllegalAccessException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public MockPlayerEntity(Level level, BlockPos blockPos, float f, GameProfile gameProfile) {
|
||||||
|
super(level, blockPos, f, gameProfile);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSpectator() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCreative() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,9 +3,9 @@ package rs.valence.extractor.extractors;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import net.minecraft.registry.Registries;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import net.minecraft.world.EmptyBlockView;
|
import net.minecraft.world.level.EmptyBlockGetter;
|
||||||
import rs.valence.extractor.Main;
|
import rs.valence.extractor.Main;
|
||||||
|
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
|
@ -28,23 +28,24 @@ public class Blocks implements Main.Extractor {
|
||||||
var blocksJson = new JsonArray();
|
var blocksJson = new JsonArray();
|
||||||
var stateIdCounter = 0;
|
var stateIdCounter = 0;
|
||||||
|
|
||||||
var shapes = new LinkedHashMap<Shape, Integer>();
|
var aabbs = new LinkedHashMap<AABB, Integer>();
|
||||||
|
|
||||||
for (var block : Registries.BLOCK) {
|
for (var block : BuiltInRegistries.BLOCK) {
|
||||||
var blockJson = new JsonObject();
|
var blockJson = new JsonObject();
|
||||||
blockJson.addProperty("id", Registries.BLOCK.getRawId(block));
|
|
||||||
blockJson.addProperty("name", Registries.BLOCK.getId(block).getPath());
|
blockJson.addProperty("id", BuiltInRegistries.BLOCK.getId(block));
|
||||||
blockJson.addProperty("translation_key", block.getTranslationKey());
|
blockJson.addProperty("name", BuiltInRegistries.BLOCK.getKey(block).getPath());
|
||||||
blockJson.addProperty("item_id", Registries.ITEM.getRawId(block.asItem()));
|
blockJson.addProperty("translation_key", block.getDescriptionId());
|
||||||
|
blockJson.addProperty("item_id", BuiltInRegistries.ITEM.getId(block.asItem()));
|
||||||
|
|
||||||
var propsJson = new JsonArray();
|
var propsJson = new JsonArray();
|
||||||
for (var prop : block.getStateManager().getProperties()) {
|
for (var prop : block.getStateDefinition().getProperties()) {
|
||||||
var propJson = new JsonObject();
|
var propJson = new JsonObject();
|
||||||
|
|
||||||
propJson.addProperty("name", prop.getName());
|
propJson.addProperty("name", prop.getName());
|
||||||
|
|
||||||
var valuesJson = new JsonArray();
|
var valuesJson = new JsonArray();
|
||||||
for (var value : prop.getValues()) {
|
for (var value : prop.getPossibleValues()) {
|
||||||
valuesJson.add(value.toString().toLowerCase(Locale.ROOT));
|
valuesJson.add(value.toString().toLowerCase(Locale.ROOT));
|
||||||
}
|
}
|
||||||
propJson.add("values", valuesJson);
|
propJson.add("values", valuesJson);
|
||||||
|
@ -54,24 +55,24 @@ public class Blocks implements Main.Extractor {
|
||||||
blockJson.add("properties", propsJson);
|
blockJson.add("properties", propsJson);
|
||||||
|
|
||||||
var statesJson = new JsonArray();
|
var statesJson = new JsonArray();
|
||||||
for (var state : block.getStateManager().getStates()) {
|
for (var state : block.getStateDefinition().getPossibleStates()) {
|
||||||
var stateJson = new JsonObject();
|
var stateJson = new JsonObject();
|
||||||
var id = stateIdCounter++;
|
var id = stateIdCounter++;
|
||||||
stateJson.addProperty("id", id);
|
stateJson.addProperty("id", id);
|
||||||
stateJson.addProperty("luminance", state.getLuminance());
|
stateJson.addProperty("luminance", state.getLightEmission());
|
||||||
stateJson.addProperty("opaque", state.isOpaque());
|
// stateJson.addProperty("opaque", state.isOpaque());
|
||||||
stateJson.addProperty("replaceable", state.getMaterial().isReplaceable());
|
stateJson.addProperty("replaceable", state.getMaterial().isReplaceable());
|
||||||
|
|
||||||
if (block.getDefaultState().equals(state)) {
|
if (block.defaultBlockState().equals(state)) {
|
||||||
blockJson.addProperty("default_state_id", id);
|
blockJson.addProperty("default_state_id", id);
|
||||||
}
|
}
|
||||||
|
|
||||||
var collisionShapeIdxsJson = new JsonArray();
|
var collisionShapeIdxsJson = new JsonArray();
|
||||||
for (var box : state.getCollisionShape(EmptyBlockView.INSTANCE, BlockPos.ORIGIN).getBoundingBoxes()) {
|
for (var aabb : state.getCollisionShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO).toAabbs()) {
|
||||||
var collisionShape = new Shape(box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ);
|
var collisionAABB = new AABB(aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ);
|
||||||
|
|
||||||
var idx = shapes.putIfAbsent(collisionShape, shapes.size());
|
var idx = aabbs.putIfAbsent(collisionAABB, aabbs.size());
|
||||||
collisionShapeIdxsJson.add(Objects.requireNonNullElseGet(idx, () -> shapes.size() - 1));
|
collisionShapeIdxsJson.add(Objects.requireNonNullElseGet(idx, () -> aabbs.size() - 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
stateJson.add("collision_shapes", collisionShapeIdxsJson);
|
stateJson.add("collision_shapes", collisionShapeIdxsJson);
|
||||||
|
@ -84,7 +85,7 @@ public class Blocks implements Main.Extractor {
|
||||||
}
|
}
|
||||||
|
|
||||||
var shapesJson = new JsonArray();
|
var shapesJson = new JsonArray();
|
||||||
for (var shape : shapes.keySet()) {
|
for (var shape : aabbs.keySet()) {
|
||||||
var shapeJson = new JsonObject();
|
var shapeJson = new JsonObject();
|
||||||
shapeJson.addProperty("min_x", shape.minX);
|
shapeJson.addProperty("min_x", shape.minX);
|
||||||
shapeJson.addProperty("min_y", shape.minY);
|
shapeJson.addProperty("min_y", shape.minY);
|
||||||
|
@ -95,12 +96,12 @@ public class Blocks implements Main.Extractor {
|
||||||
shapesJson.add(shapeJson);
|
shapesJson.add(shapeJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
topLevelJson.add("shapes", shapesJson);
|
topLevelJson.add("aabbs", shapesJson);
|
||||||
topLevelJson.add("blocks", blocksJson);
|
topLevelJson.add("blocks", blocksJson);
|
||||||
|
|
||||||
return topLevelJson;
|
return topLevelJson;
|
||||||
}
|
}
|
||||||
|
|
||||||
private record Shape(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
|
private record AABB(double minX, double minY, double minZ, double maxX, double maxY, double maxZ) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@ package rs.valence.extractor.extractors;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import net.minecraft.registry.Registries;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import rs.valence.extractor.Main;
|
import rs.valence.extractor.Main;
|
||||||
|
|
||||||
public class Enchants implements Main.Extractor {
|
public class Enchants implements Main.Extractor {
|
||||||
|
@ -19,23 +19,23 @@ public class Enchants implements Main.Extractor {
|
||||||
public JsonElement extract() {
|
public JsonElement extract() {
|
||||||
var enchantsJson = new JsonArray();
|
var enchantsJson = new JsonArray();
|
||||||
|
|
||||||
for (var enchant : Registries.ENCHANTMENT) {
|
for (var enchant : BuiltInRegistries.ENCHANTMENT) {
|
||||||
var enchantJson = new JsonObject();
|
var enchantJson = new JsonObject();
|
||||||
|
|
||||||
enchantJson.addProperty("id", Registries.ENCHANTMENT.getRawId(enchant));
|
enchantJson.addProperty("id", BuiltInRegistries.ENCHANTMENT.getId(enchant));
|
||||||
enchantJson.addProperty("name", Registries.ENCHANTMENT.getId(enchant).getPath());
|
enchantJson.addProperty("name", BuiltInRegistries.ENCHANTMENT.getKey(enchant).getPath());
|
||||||
enchantJson.addProperty("translation_key", enchant.getTranslationKey());
|
enchantJson.addProperty("translation_key", enchant.getDescriptionId());
|
||||||
|
|
||||||
enchantJson.addProperty("min_level", enchant.getMinLevel());
|
enchantJson.addProperty("min_level", enchant.getMinLevel());
|
||||||
enchantJson.addProperty("max_level", enchant.getMaxLevel());
|
enchantJson.addProperty("max_level", enchant.getMaxLevel());
|
||||||
enchantJson.addProperty("rarity_weight", enchant.getRarity().getWeight());
|
enchantJson.addProperty("rarity_weight", enchant.getRarity().getWeight());
|
||||||
enchantJson.addProperty("cursed", enchant.isCursed());
|
enchantJson.addProperty("curse", enchant.isCurse());
|
||||||
|
|
||||||
var enchantmentSources = new JsonObject();
|
var enchantmentSources = new JsonObject();
|
||||||
enchantmentSources.addProperty("treasure", enchant.isTreasure());
|
enchantmentSources.addProperty("treasure", enchant.isTreasureOnly());
|
||||||
enchantmentSources.addProperty("enchantment_table", enchant.isAvailableForEnchantedBookOffer());
|
// enchantmentSources.addProperty("enchantment_table", enchant.isAvailableForEnchantedBookOffer());
|
||||||
// All enchants except for 'Soul speed' and 'Swift sneak' are available for random selection and are only obtainable from loot chests.
|
// // All enchants except for 'Soul speed' and 'Swift sneak' are available for random selection and are only obtainable from loot chests.
|
||||||
enchantmentSources.addProperty("random_selection", enchant.isAvailableForRandomSelection());
|
// enchantmentSources.addProperty("random_selection", enchant.isAvailableForRandomSelection());
|
||||||
|
|
||||||
enchantJson.add("sources", enchantmentSources);
|
enchantJson.add("sources", enchantmentSources);
|
||||||
|
|
||||||
|
|
|
@ -1,27 +1,27 @@
|
||||||
package rs.valence.extractor.extractors;
|
package rs.valence.extractor.extractors;
|
||||||
|
|
||||||
import com.google.gson.*;
|
import com.google.gson.*;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.core.BlockPos;
|
||||||
import net.minecraft.entity.EntityPose;
|
import net.minecraft.core.GlobalPos;
|
||||||
import net.minecraft.entity.EntityType;
|
import net.minecraft.core.Holder;
|
||||||
import net.minecraft.entity.data.DataTracker;
|
import net.minecraft.core.Rotations;
|
||||||
import net.minecraft.entity.data.TrackedData;
|
import net.minecraft.core.particles.ParticleOptions;
|
||||||
import net.minecraft.entity.data.TrackedDataHandlerRegistry;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import net.minecraft.entity.passive.CatVariant;
|
import net.minecraft.network.chat.Component;
|
||||||
import net.minecraft.entity.passive.FrogVariant;
|
import net.minecraft.network.syncher.EntityDataAccessor;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.network.syncher.EntityDataSerializers;
|
||||||
import net.minecraft.particle.ParticleEffect;
|
import net.minecraft.network.syncher.SynchedEntityData;
|
||||||
import net.minecraft.registry.Registries;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.registry.entry.RegistryEntry;
|
import net.minecraft.world.entity.EntityType;
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.world.entity.Pose;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.world.entity.animal.CatVariant;
|
||||||
import net.minecraft.util.math.EulerAngle;
|
import net.minecraft.world.entity.animal.FrogVariant;
|
||||||
import net.minecraft.util.math.GlobalPos;
|
import net.minecraft.world.entity.npc.VillagerData;
|
||||||
import net.minecraft.village.VillagerData;
|
import net.minecraft.world.item.ItemStack;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import rs.valence.extractor.ClassComparator;
|
import rs.valence.extractor.ClassComparator;
|
||||||
import rs.valence.extractor.DummyPlayerEntity;
|
import rs.valence.extractor.MockLevel;
|
||||||
import rs.valence.extractor.DummyWorld;
|
import rs.valence.extractor.MockPlayerEntity;
|
||||||
import rs.valence.extractor.Main;
|
import rs.valence.extractor.Main;
|
||||||
import rs.valence.extractor.Main.Pair;
|
import rs.valence.extractor.Main.Pair;
|
||||||
|
|
||||||
|
@ -29,159 +29,49 @@ import java.lang.reflect.ParameterizedType;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
public class Entities implements Main.Extractor {
|
public class Entities implements Main.Extractor {
|
||||||
private final static Map<String, Bit[]> BIT_FIELDS = Map.ofEntries(
|
|
||||||
// @formatter:off
|
|
||||||
bits(
|
|
||||||
"flags",
|
|
||||||
bit("on_fire", 0),
|
|
||||||
bit("sneaking", 1),
|
|
||||||
bit("sprinting", 3),
|
|
||||||
bit("swimming", 4),
|
|
||||||
bit("invisible", 5),
|
|
||||||
bit("glowing", 6),
|
|
||||||
bit("fall_flying", 7)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"projectile_flags",
|
|
||||||
bit("critical", 0),
|
|
||||||
bit("no_clip", 1)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"living_flags",
|
|
||||||
bit("using_item", 0),
|
|
||||||
bit("off_hand_active", 1),
|
|
||||||
bit("using_riptide", 2)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"player_model_parts",
|
|
||||||
bit("cape", 0),
|
|
||||||
bit("jacket", 1),
|
|
||||||
bit("left_sleeve", 2),
|
|
||||||
bit("right_sleeve", 3),
|
|
||||||
bit("left_pants_leg", 4),
|
|
||||||
bit("right_pants_leg", 5),
|
|
||||||
bit("hat", 6)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"armor_stand_flags",
|
|
||||||
bit("small", 0),
|
|
||||||
bit("show_arms", 1),
|
|
||||||
bit("hide_base_plate", 2),
|
|
||||||
bit("marker", 3)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"mob_flags",
|
|
||||||
bit("ai_disabled", 0),
|
|
||||||
bit("left_handed", 1),
|
|
||||||
bit("attacking", 2)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"bat_flags",
|
|
||||||
bit("hanging", 0)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"horse_flags",
|
|
||||||
bit("tamed", 1),
|
|
||||||
bit("saddled", 2),
|
|
||||||
bit("bred", 3),
|
|
||||||
bit("eating_grass", 4),
|
|
||||||
bit("angry", 5),
|
|
||||||
bit("eating", 6)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"bee_flags",
|
|
||||||
bit("near_target", 1),
|
|
||||||
bit("has_stung", 2),
|
|
||||||
bit("has_nectar", 3)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"fox_flags",
|
|
||||||
bit("sitting", 0),
|
|
||||||
bit("crouching", 2),
|
|
||||||
bit("rolling_head", 3),
|
|
||||||
bit("chasing", 4),
|
|
||||||
bit("sleeping", 5),
|
|
||||||
bit("walking", 6),
|
|
||||||
bit("aggressive", 7)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"panda_flags",
|
|
||||||
bit("sneezing", 1),
|
|
||||||
bit("playing", 2),
|
|
||||||
bit("sitting", 3),
|
|
||||||
bit("lying_on_back", 4)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"tameable_flags",
|
|
||||||
bit("sitting_pose", 0),
|
|
||||||
bit("tamed", 2)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"iron_golem_flags",
|
|
||||||
bit("player_created", 0)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"snow_golem_flags",
|
|
||||||
bit("has_pumpkin", 4)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"blaze_flags",
|
|
||||||
bit("fire_active", 0)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"vex_flags",
|
|
||||||
bit("charging", 0)
|
|
||||||
),
|
|
||||||
bits(
|
|
||||||
"spider_flags",
|
|
||||||
bit("climbing_wall", 0)
|
|
||||||
)
|
|
||||||
// @formatter:on
|
|
||||||
);
|
|
||||||
|
|
||||||
public Entities() {
|
public Entities() {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Pair<String, JsonElement> trackedDataToJson(TrackedData<?> data, DataTracker tracker) {
|
private static Pair<String, JsonElement> synchedDataToJson(EntityDataAccessor<?> accessor, SynchedEntityData data) {
|
||||||
final var handler = data.getType();
|
final var ser = accessor.getSerializer();
|
||||||
final var val = tracker.get(data);
|
final var val = data.get(accessor);
|
||||||
|
|
||||||
if (handler == TrackedDataHandlerRegistry.BYTE) {
|
if (ser == EntityDataSerializers.BYTE) {
|
||||||
return new Pair<>("byte", new JsonPrimitive((Byte) val));
|
return new Pair<>("byte", new JsonPrimitive((Byte) val));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.INTEGER) {
|
} else if (ser == EntityDataSerializers.INT) {
|
||||||
return new Pair<>("integer", new JsonPrimitive((Integer) val));
|
return new Pair<>("integer", new JsonPrimitive((Integer) val));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.LONG) {
|
} else if (ser == EntityDataSerializers.LONG) {
|
||||||
return new Pair<>("long", new JsonPrimitive((Long) val));
|
return new Pair<>("long", new JsonPrimitive((Long) val));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.FLOAT) {
|
} else if (ser == EntityDataSerializers.FLOAT) {
|
||||||
return new Pair<>("float", new JsonPrimitive((Float) val));
|
return new Pair<>("float", new JsonPrimitive((Float) val));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.STRING) {
|
} else if (ser == EntityDataSerializers.STRING) {
|
||||||
return new Pair<>("string", new JsonPrimitive((String) val));
|
return new Pair<>("string", new JsonPrimitive((String) val));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.TEXT_COMPONENT) {
|
} else if (ser == EntityDataSerializers.COMPONENT) {
|
||||||
// TODO: return text as json element.
|
// TODO: return text as json element.
|
||||||
return new Pair<>("text_component", new JsonPrimitive(((Text) val).getString()));
|
return new Pair<>("component", new JsonPrimitive(((Component) val).getString()));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.OPTIONAL_TEXT_COMPONENT) {
|
} else if (ser == EntityDataSerializers.OPTIONAL_COMPONENT) {
|
||||||
var res = ((Optional<?>) val).map(o -> (JsonElement) new JsonPrimitive(((Text) o).getString())).orElse(JsonNull.INSTANCE);
|
var res = ((Optional<?>) val).map(o -> (JsonElement) new JsonPrimitive(((Component) o).getString())).orElse(JsonNull.INSTANCE);
|
||||||
return new Pair<>("optional_text_component", res);
|
return new Pair<>("optional_component", res);
|
||||||
} else if (handler == TrackedDataHandlerRegistry.ITEM_STACK) {
|
} else if (ser == EntityDataSerializers.ITEM_STACK) {
|
||||||
// TODO
|
// TODO
|
||||||
return new Pair<>("item_stack", new JsonPrimitive(((ItemStack) val).toString()));
|
return new Pair<>("item_stack", new JsonPrimitive(((ItemStack) val).toString()));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.BOOLEAN) {
|
} else if (ser == EntityDataSerializers.BOOLEAN) {
|
||||||
return new Pair<>("boolean", new JsonPrimitive((Boolean) val));
|
return new Pair<>("boolean", new JsonPrimitive((Boolean) val));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.ROTATION) {
|
} else if (ser == EntityDataSerializers.ROTATIONS) {
|
||||||
var json = new JsonObject();
|
var json = new JsonObject();
|
||||||
var ea = (EulerAngle) val;
|
var rot = (Rotations) val;
|
||||||
json.addProperty("pitch", ea.getPitch());
|
json.addProperty("pitch", rot.getX());
|
||||||
json.addProperty("yaw", ea.getYaw());
|
json.addProperty("yaw", rot.getY());
|
||||||
json.addProperty("roll", ea.getRoll());
|
json.addProperty("roll", rot.getZ());
|
||||||
return new Pair<>("rotation", json);
|
return new Pair<>("rotation", json);
|
||||||
} else if (handler == TrackedDataHandlerRegistry.BLOCK_POS) {
|
} else if (ser == EntityDataSerializers.BLOCK_POS) {
|
||||||
var bp = (BlockPos) val;
|
var bp = (BlockPos) val;
|
||||||
var json = new JsonObject();
|
var json = new JsonObject();
|
||||||
json.addProperty("x", bp.getX());
|
json.addProperty("x", bp.getX());
|
||||||
json.addProperty("y", bp.getY());
|
json.addProperty("y", bp.getY());
|
||||||
json.addProperty("z", bp.getZ());
|
json.addProperty("z", bp.getZ());
|
||||||
return new Pair<>("block_pos", json);
|
return new Pair<>("block_pos", json);
|
||||||
} else if (handler == TrackedDataHandlerRegistry.OPTIONAL_BLOCK_POS) {
|
} else if (ser == EntityDataSerializers.OPTIONAL_BLOCK_POS) {
|
||||||
return new Pair<>("optional_block_pos", ((Optional<?>) val).map(o -> {
|
return new Pair<>("optional_block_pos", ((Optional<?>) val).map(o -> {
|
||||||
var bp = (BlockPos) o;
|
var bp = (BlockPos) o;
|
||||||
var json = new JsonObject();
|
var json = new JsonObject();
|
||||||
|
@ -190,69 +80,61 @@ public class Entities implements Main.Extractor {
|
||||||
json.addProperty("z", bp.getZ());
|
json.addProperty("z", bp.getZ());
|
||||||
return (JsonElement) json;
|
return (JsonElement) json;
|
||||||
}).orElse(JsonNull.INSTANCE));
|
}).orElse(JsonNull.INSTANCE));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.FACING) {
|
} else if (ser == EntityDataSerializers.DIRECTION) {
|
||||||
return new Pair<>("facing", new JsonPrimitive(val.toString()));
|
return new Pair<>("direction", new JsonPrimitive(val.toString()));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.OPTIONAL_UUID) {
|
} else if (ser == EntityDataSerializers.OPTIONAL_UUID) {
|
||||||
var res = ((Optional<?>) val).map(o -> (JsonElement) new JsonPrimitive(o.toString())).orElse(JsonNull.INSTANCE);
|
var res = ((Optional<?>) val).map(o -> (JsonElement) new JsonPrimitive(o.toString())).orElse(JsonNull.INSTANCE);
|
||||||
return new Pair<>("optional_uuid", res);
|
return new Pair<>("optional_uuid", res);
|
||||||
} else if (handler == TrackedDataHandlerRegistry.OPTIONAL_BLOCK_STATE) {
|
} else if (ser == EntityDataSerializers.BLOCK_STATE) {
|
||||||
// TODO: get raw block state ID.
|
// TODO: get raw block state ID.
|
||||||
var res = ((Optional<?>) val).map(o -> (JsonElement) new JsonPrimitive(o.toString())).orElse(JsonNull.INSTANCE);
|
var res = ((Optional<?>) val).map(o -> (JsonElement) new JsonPrimitive(o.toString())).orElse(JsonNull.INSTANCE);
|
||||||
return new Pair<>("optional_block_state", res);
|
return new Pair<>("block_state", res);
|
||||||
} else if (handler == TrackedDataHandlerRegistry.NBT_COMPOUND) {
|
} else if (ser == EntityDataSerializers.COMPOUND_TAG) {
|
||||||
// TODO: base64 binary representation or SNBT?
|
// TODO: base64 binary representation or SNBT?
|
||||||
return new Pair<>("nbt_compound", new JsonPrimitive(val.toString()));
|
return new Pair<>("compound_tag", new JsonPrimitive(val.toString()));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.PARTICLE) {
|
} else if (ser == EntityDataSerializers.PARTICLE) {
|
||||||
var id = Registries.PARTICLE_TYPE.getId(((ParticleEffect) val).getType());
|
var key = BuiltInRegistries.PARTICLE_TYPE.getKey(((ParticleOptions) val).getType());
|
||||||
return new Pair<>("particle", new JsonPrimitive(id.getPath()));
|
return new Pair<>("particle", new JsonPrimitive(key.getPath()));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.VILLAGER_DATA) {
|
} else if (ser == EntityDataSerializers.VILLAGER_DATA) {
|
||||||
var vd = (VillagerData) val;
|
var vd = (VillagerData) val;
|
||||||
var json = new JsonObject();
|
var json = new JsonObject();
|
||||||
var type = Registries.VILLAGER_TYPE.getId(vd.getType()).getPath();
|
var type = BuiltInRegistries.VILLAGER_TYPE.getKey(vd.getType()).getPath();
|
||||||
var profession = Registries.VILLAGER_PROFESSION.getId(vd.getProfession()).getPath();
|
var profession = BuiltInRegistries.VILLAGER_PROFESSION.getKey(vd.getProfession()).getPath();
|
||||||
json.addProperty("type", type);
|
json.addProperty("type", type);
|
||||||
json.addProperty("profession", profession);
|
json.addProperty("profession", profession);
|
||||||
json.addProperty("level", vd.getLevel());
|
json.addProperty("level", vd.getLevel());
|
||||||
return new Pair<>("villager_data", json);
|
return new Pair<>("villager_data", json);
|
||||||
} else if (handler == TrackedDataHandlerRegistry.OPTIONAL_INT) {
|
} else if (ser == EntityDataSerializers.OPTIONAL_UNSIGNED_INT) {
|
||||||
var opt = (OptionalInt) val;
|
var opt = (OptionalInt) val;
|
||||||
return new Pair<>("optional_int", opt.isPresent() ? new JsonPrimitive(opt.getAsInt()) : JsonNull.INSTANCE);
|
return new Pair<>("optional_unsigned_int", opt.isPresent() ? new JsonPrimitive(opt.getAsInt()) : JsonNull.INSTANCE);
|
||||||
} else if (handler == TrackedDataHandlerRegistry.ENTITY_POSE) {
|
} else if (ser == EntityDataSerializers.POSE) {
|
||||||
return new Pair<>("entity_pose", new JsonPrimitive(((EntityPose) val).name().toLowerCase(Locale.ROOT)));
|
return new Pair<>("entity_pose", new JsonPrimitive(((Pose) val).name().toLowerCase(Locale.ROOT)));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.CAT_VARIANT) {
|
} else if (ser == EntityDataSerializers.CAT_VARIANT) {
|
||||||
return new Pair<>("cat_variant", new JsonPrimitive(Registries.CAT_VARIANT.getId((CatVariant) val).getPath()));
|
return new Pair<>("cat_variant", new JsonPrimitive(BuiltInRegistries.CAT_VARIANT.getKey((CatVariant) val).getPath()));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.FROG_VARIANT) {
|
} else if (ser == EntityDataSerializers.FROG_VARIANT) {
|
||||||
return new Pair<>("frog_variant", new JsonPrimitive(Registries.FROG_VARIANT.getId((FrogVariant) val).getPath()));
|
return new Pair<>("frog_variant", new JsonPrimitive(BuiltInRegistries.FROG_VARIANT.getKey((FrogVariant) val).getPath()));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.OPTIONAL_GLOBAL_POS) {
|
} else if (ser == EntityDataSerializers.OPTIONAL_GLOBAL_POS) {
|
||||||
return new Pair<>("optional_global_pos", ((Optional<?>) val).map(o -> {
|
return new Pair<>("optional_global_pos", ((Optional<?>) val).map(o -> {
|
||||||
var gp = (GlobalPos) o;
|
var gp = (GlobalPos) o;
|
||||||
var json = new JsonObject();
|
var json = new JsonObject();
|
||||||
json.addProperty("dimension", gp.getDimension().getValue().toString());
|
json.addProperty("dimension", gp.dimension().location().toString());
|
||||||
|
|
||||||
var posJson = new JsonObject();
|
var posJson = new JsonObject();
|
||||||
posJson.addProperty("x", gp.getPos().getX());
|
posJson.addProperty("x", gp.pos().getX());
|
||||||
posJson.addProperty("y", gp.getPos().getY());
|
posJson.addProperty("y", gp.pos().getY());
|
||||||
posJson.addProperty("z", gp.getPos().getZ());
|
posJson.addProperty("z", gp.pos().getZ());
|
||||||
|
|
||||||
json.add("position", posJson);
|
json.add("position", posJson);
|
||||||
return (JsonElement) json;
|
return (JsonElement) json;
|
||||||
}).orElse(JsonNull.INSTANCE));
|
}).orElse(JsonNull.INSTANCE));
|
||||||
} else if (handler == TrackedDataHandlerRegistry.PAINTING_VARIANT) {
|
} else if (ser == EntityDataSerializers.PAINTING_VARIANT) {
|
||||||
var variant = ((RegistryEntry<?>) val).getKey().map(k -> k.getValue().getPath()).orElse("");
|
var variant = ((Holder<?>) val).unwrapKey().map(k -> k.location().getPath()).orElse("");
|
||||||
return new Pair<>("painting_variant", new JsonPrimitive(variant));
|
return new Pair<>("painting_variant", new JsonPrimitive(variant));
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Unexpected tracked data type");
|
throw new IllegalArgumentException("Unexpected tracked data type");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Bit bit(String name, int index) {
|
|
||||||
return new Bit(name, index);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Map.Entry<String, Bit[]> bits(String fieldName, Bit... bits) {
|
|
||||||
return Map.entry(fieldName, bits);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String fileName() {
|
public String fileName() {
|
||||||
return "entities.json";
|
return "entities.json";
|
||||||
|
@ -272,8 +154,8 @@ public class Entities implements Main.Extractor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
final var dataTrackerField = Entity.class.getDeclaredField("dataTracker");
|
final var synchedDataField = Entity.class.getDeclaredField("entityData");
|
||||||
dataTrackerField.setAccessible(true);
|
synchedDataField.setAccessible(true);
|
||||||
|
|
||||||
var entitiesMap = new TreeMap<Class<? extends Entity>, JsonElement>(new ClassComparator());
|
var entitiesMap = new TreeMap<Class<? extends Entity>, JsonElement>(new ClassComparator());
|
||||||
|
|
||||||
|
@ -282,12 +164,12 @@ public class Entities implements Main.Extractor {
|
||||||
@Nullable var entityType = entry.getValue();
|
@Nullable var entityType = entry.getValue();
|
||||||
assert entityType != null;
|
assert entityType != null;
|
||||||
|
|
||||||
// While we can use the tracked data registry and reflection to get the tracked fields on entities, we won't know what their default values are because they are assigned in the entity's constructor.
|
// While we can use reflection to get the synched data fields on entities, we won't know what their default values are because they are assigned in the entity's constructor.
|
||||||
// To obtain this, we create a dummy world to spawn the entities into and read the data tracker field from the base entity class.
|
// To obtain this, we create a dummy world to spawn the entities into and read the synched entity data field from the base entity class.
|
||||||
// We also handle player entities specially since they cannot be spawned with EntityType#create.
|
// We also handle player entities specially since they cannot be spawned with EntityType#create.
|
||||||
final var entityInstance = entityType.equals(EntityType.PLAYER) ? DummyPlayerEntity.INSTANCE : entityType.create(DummyWorld.INSTANCE);
|
final Entity entityInstance = entityType.equals(EntityType.PLAYER) ? MockPlayerEntity.INSTANCE : entityType.create(MockLevel.INSTANCE);
|
||||||
|
|
||||||
final var dataTracker = (DataTracker) dataTrackerField.get(entityInstance);
|
final var synchedData = (SynchedEntityData) synchedDataField.get(entityInstance);
|
||||||
|
|
||||||
while (entitiesMap.get(entityClass) == null) {
|
while (entitiesMap.get(entityClass) == null) {
|
||||||
var entityJson = new JsonObject();
|
var entityJson = new JsonObject();
|
||||||
|
@ -300,36 +182,27 @@ public class Entities implements Main.Extractor {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entityType != null) {
|
if (entityType != null) {
|
||||||
entityJson.addProperty("type", Registries.ENTITY_TYPE.getId(entityType).getPath());
|
entityJson.addProperty("type", BuiltInRegistries.ENTITY_TYPE.getKey(entityType).getPath());
|
||||||
|
|
||||||
entityJson.add("translation_key", new JsonPrimitive(entityType.getTranslationKey()));
|
entityJson.add("translation_key", new JsonPrimitive(entityType.getDescriptionId()));
|
||||||
}
|
}
|
||||||
|
|
||||||
var fieldsJson = new JsonArray();
|
var fieldsJson = new JsonArray();
|
||||||
for (var entityField : entityClass.getDeclaredFields()) {
|
for (var entityField : entityClass.getDeclaredFields()) {
|
||||||
if (entityField.getType().equals(TrackedData.class)) {
|
if (entityField.getType().equals(EntityDataAccessor.class)) {
|
||||||
entityField.setAccessible(true);
|
entityField.setAccessible(true);
|
||||||
|
|
||||||
var trackedData = (TrackedData<?>) entityField.get(null);
|
var trackedData = (EntityDataAccessor<?>) entityField.get(null);
|
||||||
|
|
||||||
var fieldJson = new JsonObject();
|
var fieldJson = new JsonObject();
|
||||||
var fieldName = entityField.getName().toLowerCase(Locale.ROOT);
|
var fieldName = entityField.getName().toLowerCase(Locale.ROOT);
|
||||||
fieldJson.addProperty("name", fieldName);
|
fieldJson.addProperty("name", fieldName);
|
||||||
fieldJson.addProperty("index", trackedData.getId());
|
fieldJson.addProperty("index", trackedData.getId());
|
||||||
|
|
||||||
var data = Entities.trackedDataToJson(trackedData, dataTracker);
|
var data = Entities.synchedDataToJson(trackedData, synchedData);
|
||||||
fieldJson.addProperty("type", data.left());
|
fieldJson.addProperty("type", data.left());
|
||||||
fieldJson.add("default_value", data.right());
|
fieldJson.add("default_value", data.right());
|
||||||
|
|
||||||
var bitsJson = new JsonArray();
|
|
||||||
for (var bit : BIT_FIELDS.getOrDefault(fieldName, new Bit[]{})) {
|
|
||||||
var bitJson = new JsonObject();
|
|
||||||
bitJson.addProperty("name", bit.name);
|
|
||||||
bitJson.addProperty("index", bit.index);
|
|
||||||
bitsJson.add(bitJson);
|
|
||||||
}
|
|
||||||
fieldJson.add("bits", bitsJson);
|
|
||||||
|
|
||||||
fieldsJson.add(fieldJson);
|
fieldsJson.add(fieldJson);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -339,9 +212,9 @@ public class Entities implements Main.Extractor {
|
||||||
if (bb != null) {
|
if (bb != null) {
|
||||||
var boundingBoxJson = new JsonObject();
|
var boundingBoxJson = new JsonObject();
|
||||||
|
|
||||||
boundingBoxJson.addProperty("size_x", bb.getXLength());
|
boundingBoxJson.addProperty("size_x", bb.getXsize());
|
||||||
boundingBoxJson.addProperty("size_y", bb.getYLength());
|
boundingBoxJson.addProperty("size_y", bb.getYsize());
|
||||||
boundingBoxJson.addProperty("size_z", bb.getZLength());
|
boundingBoxJson.addProperty("size_z", bb.getZsize());
|
||||||
|
|
||||||
entityJson.add("default_bounding_box", boundingBoxJson);
|
entityJson.add("default_bounding_box", boundingBoxJson);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,107 +0,0 @@
|
||||||
package rs.valence.extractor.extractors;
|
|
||||||
|
|
||||||
import com.google.gson.JsonElement;
|
|
||||||
import com.google.gson.JsonObject;
|
|
||||||
import net.minecraft.entity.EntityPose;
|
|
||||||
import net.minecraft.entity.EntityStatuses;
|
|
||||||
import net.minecraft.network.packet.s2c.play.EntityAnimationS2CPacket;
|
|
||||||
import net.minecraft.registry.Registries;
|
|
||||||
import net.minecraft.util.math.Direction;
|
|
||||||
import rs.valence.extractor.Main;
|
|
||||||
|
|
||||||
import java.lang.reflect.Modifier;
|
|
||||||
import java.util.Locale;
|
|
||||||
|
|
||||||
public class EntityData implements Main.Extractor {
|
|
||||||
@Override
|
|
||||||
public String fileName() {
|
|
||||||
return "entity_data.json";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public JsonElement extract() throws Exception {
|
|
||||||
var dataJson = new JsonObject();
|
|
||||||
|
|
||||||
var typesJson = new JsonObject();
|
|
||||||
for (var type : Registries.ENTITY_TYPE) {
|
|
||||||
typesJson.addProperty(Registries.ENTITY_TYPE.getId(type).getPath(), Registries.ENTITY_TYPE.getRawId(type));
|
|
||||||
}
|
|
||||||
dataJson.add("types", typesJson);
|
|
||||||
|
|
||||||
var statusesJson = new JsonObject();
|
|
||||||
for (var field : EntityStatuses.class.getDeclaredFields()) {
|
|
||||||
if (field.canAccess(null) && field.get(null) instanceof Byte code) {
|
|
||||||
if (field.getName().equals("field_30030")) {
|
|
||||||
statusesJson.addProperty("stop_attack", code);
|
|
||||||
} else {
|
|
||||||
statusesJson.addProperty(field.getName().toLowerCase(Locale.ROOT), code);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dataJson.add("statuses", statusesJson);
|
|
||||||
|
|
||||||
var animationsJson = new JsonObject();
|
|
||||||
for (var field : EntityAnimationS2CPacket.class.getDeclaredFields()) {
|
|
||||||
field.setAccessible(true);
|
|
||||||
if (Modifier.isStatic(field.getModifiers()) && field.canAccess(null) && field.get(null) instanceof Integer i) {
|
|
||||||
animationsJson.addProperty(field.getName().toLowerCase(Locale.ROOT), i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
dataJson.add("animations", animationsJson);
|
|
||||||
|
|
||||||
var villagerTypesJson = new JsonObject();
|
|
||||||
for (var type : Registries.VILLAGER_TYPE) {
|
|
||||||
villagerTypesJson.addProperty(Registries.VILLAGER_TYPE.getId(type).getPath(), Registries.VILLAGER_TYPE.getRawId(type));
|
|
||||||
}
|
|
||||||
dataJson.add("villager_types", villagerTypesJson);
|
|
||||||
|
|
||||||
var villagerProfessionsJson = new JsonObject();
|
|
||||||
for (var profession : Registries.VILLAGER_PROFESSION) {
|
|
||||||
villagerProfessionsJson.addProperty(profession.id(), Registries.VILLAGER_PROFESSION.getRawId(profession));
|
|
||||||
}
|
|
||||||
dataJson.add("villager_professions", villagerProfessionsJson);
|
|
||||||
|
|
||||||
var catVariantsJson = new JsonObject();
|
|
||||||
for (var variant : Registries.CAT_VARIANT) {
|
|
||||||
catVariantsJson.addProperty(Registries.CAT_VARIANT.getId(variant).getPath(), Registries.CAT_VARIANT.getRawId(variant));
|
|
||||||
}
|
|
||||||
dataJson.add("cat_variants", catVariantsJson);
|
|
||||||
|
|
||||||
var frogVariantsJson = new JsonObject();
|
|
||||||
for (var variant : Registries.FROG_VARIANT) {
|
|
||||||
frogVariantsJson.addProperty(Registries.FROG_VARIANT.getId(variant).getPath(), Registries.FROG_VARIANT.getRawId(variant));
|
|
||||||
}
|
|
||||||
dataJson.add("frog_variants", frogVariantsJson);
|
|
||||||
|
|
||||||
var paintingVariantsJson = new JsonObject();
|
|
||||||
for (var variant : Registries.PAINTING_VARIANT) {
|
|
||||||
var variantJson = new JsonObject();
|
|
||||||
variantJson.addProperty("id", Registries.PAINTING_VARIANT.getRawId(variant));
|
|
||||||
variantJson.addProperty("width", variant.getWidth());
|
|
||||||
variantJson.addProperty("height", variant.getHeight());
|
|
||||||
paintingVariantsJson.add(Registries.PAINTING_VARIANT.getId(variant).getPath(), variantJson);
|
|
||||||
}
|
|
||||||
dataJson.add("painting_variants", paintingVariantsJson);
|
|
||||||
|
|
||||||
var facingJson = new JsonObject();
|
|
||||||
for (var dir : Direction.values()) {
|
|
||||||
facingJson.addProperty(dir.getName(), dir.getId());
|
|
||||||
}
|
|
||||||
dataJson.add("facing", facingJson);
|
|
||||||
|
|
||||||
var posesJson = new JsonObject();
|
|
||||||
var poses = EntityPose.values();
|
|
||||||
for (int i = 0; i < poses.length; i++) {
|
|
||||||
posesJson.addProperty(poses[i].name().toLowerCase(Locale.ROOT), i);
|
|
||||||
}
|
|
||||||
dataJson.add("poses", posesJson);
|
|
||||||
|
|
||||||
var particleTypesJson = new JsonObject();
|
|
||||||
for (var type : Registries.PARTICLE_TYPE) {
|
|
||||||
particleTypesJson.addProperty(Registries.PARTICLE_TYPE.getId(type).getPath(), Registries.PARTICLE_TYPE.getRawId(type));
|
|
||||||
}
|
|
||||||
dataJson.add("particle_types", particleTypesJson);
|
|
||||||
|
|
||||||
return dataJson;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -3,7 +3,7 @@ package rs.valence.extractor.extractors;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import net.minecraft.registry.Registries;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import rs.valence.extractor.Main;
|
import rs.valence.extractor.Main;
|
||||||
|
|
||||||
public class Items implements Main.Extractor {
|
public class Items implements Main.Extractor {
|
||||||
|
@ -19,37 +19,37 @@ public class Items implements Main.Extractor {
|
||||||
public JsonElement extract() throws Exception {
|
public JsonElement extract() throws Exception {
|
||||||
var itemsJson = new JsonArray();
|
var itemsJson = new JsonArray();
|
||||||
|
|
||||||
for (var item : Registries.ITEM) {
|
for (var item : BuiltInRegistries.ITEM) {
|
||||||
var itemJson = new JsonObject();
|
var itemJson = new JsonObject();
|
||||||
itemJson.addProperty("id", Registries.ITEM.getRawId(item));
|
itemJson.addProperty("id", BuiltInRegistries.ITEM.getId(item));
|
||||||
itemJson.addProperty("name", Registries.ITEM.getId(item).getPath());
|
itemJson.addProperty("name", BuiltInRegistries.ITEM.getKey(item).getPath());
|
||||||
itemJson.addProperty("translation_key", item.getTranslationKey());
|
itemJson.addProperty("translation_key", item.getDescriptionId());
|
||||||
itemJson.addProperty("max_stack", item.getMaxCount());
|
itemJson.addProperty("max_stack_size", item.getMaxStackSize());
|
||||||
itemJson.addProperty("max_durability", item.getMaxDamage());
|
itemJson.addProperty("max_durability", item.getMaxDamage());
|
||||||
itemJson.addProperty("enchantability", item.getEnchantability());
|
itemJson.addProperty("enchantment_value", item.getEnchantmentValue());
|
||||||
itemJson.addProperty("fireproof", item.isFireproof());
|
itemJson.addProperty("fireproof", item.isFireResistant());
|
||||||
|
|
||||||
if (item.getFoodComponent() != null) {
|
if (item.getFoodProperties() != null) {
|
||||||
var foodJson = new JsonObject();
|
var foodJson = new JsonObject();
|
||||||
var foodComp = item.getFoodComponent();
|
var foodProps = item.getFoodProperties();
|
||||||
|
|
||||||
foodJson.addProperty("hunger", foodComp.getHunger());
|
foodJson.addProperty("nutrition", foodProps.getNutrition());
|
||||||
foodJson.addProperty("saturation", foodComp.getSaturationModifier());
|
foodJson.addProperty("saturation", foodProps.getSaturationModifier());
|
||||||
foodJson.addProperty("always_edible", foodComp.isAlwaysEdible());
|
foodJson.addProperty("always_edible", foodProps.canAlwaysEat());
|
||||||
foodJson.addProperty("meat", foodComp.isMeat());
|
foodJson.addProperty("meat", foodProps.isMeat());
|
||||||
foodJson.addProperty("snack", foodComp.isSnack());
|
foodJson.addProperty("fast_food", foodProps.isFastFood());
|
||||||
|
|
||||||
itemJson.add("food", foodJson);
|
itemJson.add("food", foodJson);
|
||||||
|
|
||||||
var effectsJson = new JsonArray();
|
var effectsJson = new JsonArray();
|
||||||
for (var pair : foodComp.getStatusEffects()) {
|
for (var pair : foodProps.getEffects()) {
|
||||||
var effectJson = new JsonObject();
|
var effectJson = new JsonObject();
|
||||||
|
|
||||||
var effect = pair.getFirst();
|
var effect = pair.getFirst();
|
||||||
var chance = pair.getSecond();
|
var chance = pair.getSecond();
|
||||||
|
|
||||||
effectJson.addProperty("chance", chance);
|
effectJson.addProperty("chance", chance);
|
||||||
effectJson.addProperty("translation_key", effect.getEffectType().getTranslationKey());
|
effectJson.addProperty("translation_key", effect.getDescriptionId());
|
||||||
// TODO: more effect information.
|
// TODO: more effect information.
|
||||||
|
|
||||||
effectsJson.add(effectJson);
|
effectsJson.add(effectJson);
|
||||||
|
|
|
@ -0,0 +1,103 @@
|
||||||
|
package rs.valence.extractor.extractors;
|
||||||
|
|
||||||
|
import com.google.gson.JsonElement;
|
||||||
|
import com.google.gson.JsonObject;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
|
import net.minecraft.network.protocol.game.ClientboundAnimatePacket;
|
||||||
|
import net.minecraft.world.entity.EntityEvent;
|
||||||
|
import net.minecraft.world.entity.Pose;
|
||||||
|
import rs.valence.extractor.Main;
|
||||||
|
|
||||||
|
import java.lang.reflect.Modifier;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
public class Misc implements Main.Extractor {
|
||||||
|
@Override
|
||||||
|
public String fileName() {
|
||||||
|
return "misc.json";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JsonElement extract() throws Exception {
|
||||||
|
var dataJson = new JsonObject();
|
||||||
|
|
||||||
|
var entityTypeJson = new JsonObject();
|
||||||
|
for (var type : BuiltInRegistries.ENTITY_TYPE) {
|
||||||
|
entityTypeJson.addProperty(BuiltInRegistries.ENTITY_TYPE.getKey(type).getPath(), BuiltInRegistries.ENTITY_TYPE.getId(type));
|
||||||
|
}
|
||||||
|
dataJson.add("entity_type", entityTypeJson);
|
||||||
|
|
||||||
|
var entityEventJson = new JsonObject();
|
||||||
|
for (var field : EntityEvent.class.getDeclaredFields()) {
|
||||||
|
if (field.canAccess(null) && field.get(null) instanceof Byte code) {
|
||||||
|
entityEventJson.addProperty(field.getName().toLowerCase(Locale.ROOT), code);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dataJson.add("entity_event", entityEventJson);
|
||||||
|
|
||||||
|
var entityAnimationJson = new JsonObject();
|
||||||
|
for (var field : ClientboundAnimatePacket.class.getDeclaredFields()) {
|
||||||
|
field.setAccessible(true);
|
||||||
|
if (Modifier.isStatic(field.getModifiers()) && field.canAccess(null) && field.get(null) instanceof Integer i) {
|
||||||
|
entityAnimationJson.addProperty(field.getName().toLowerCase(Locale.ROOT), i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
dataJson.add("entity_animation", entityAnimationJson);
|
||||||
|
|
||||||
|
var villagerTypeJson = new JsonObject();
|
||||||
|
for (var type : BuiltInRegistries.VILLAGER_TYPE) {
|
||||||
|
villagerTypeJson.addProperty(BuiltInRegistries.VILLAGER_TYPE.getKey(type).getPath(), BuiltInRegistries.VILLAGER_TYPE.getId(type));
|
||||||
|
}
|
||||||
|
dataJson.add("villager_type", villagerTypeJson);
|
||||||
|
|
||||||
|
var villagerProfessionJson = new JsonObject();
|
||||||
|
for (var profession : BuiltInRegistries.VILLAGER_PROFESSION) {
|
||||||
|
villagerProfessionJson.addProperty(profession.name(), BuiltInRegistries.VILLAGER_PROFESSION.getId(profession));
|
||||||
|
}
|
||||||
|
dataJson.add("villager_profession", villagerProfessionJson);
|
||||||
|
|
||||||
|
var catVariantJson = new JsonObject();
|
||||||
|
for (var variant : BuiltInRegistries.CAT_VARIANT) {
|
||||||
|
catVariantJson.addProperty(BuiltInRegistries.CAT_VARIANT.getKey(variant).getPath(), BuiltInRegistries.CAT_VARIANT.getId(variant));
|
||||||
|
}
|
||||||
|
dataJson.add("cat_variant", catVariantJson);
|
||||||
|
|
||||||
|
var frogVariantJson = new JsonObject();
|
||||||
|
for (var variant : BuiltInRegistries.FROG_VARIANT) {
|
||||||
|
frogVariantJson.addProperty(BuiltInRegistries.FROG_VARIANT.getKey(variant).getPath(), BuiltInRegistries.FROG_VARIANT.getId(variant));
|
||||||
|
}
|
||||||
|
dataJson.add("frog_variant", frogVariantJson);
|
||||||
|
|
||||||
|
var paintingVariantJson = new JsonObject();
|
||||||
|
for (var variant : BuiltInRegistries.PAINTING_VARIANT) {
|
||||||
|
var variantJson = new JsonObject();
|
||||||
|
variantJson.addProperty("id", BuiltInRegistries.PAINTING_VARIANT.getId(variant));
|
||||||
|
variantJson.addProperty("width", variant.getWidth());
|
||||||
|
variantJson.addProperty("height", variant.getHeight());
|
||||||
|
paintingVariantJson.add(BuiltInRegistries.PAINTING_VARIANT.getKey(variant).getPath(), variantJson);
|
||||||
|
}
|
||||||
|
dataJson.add("painting_variant", paintingVariantJson);
|
||||||
|
|
||||||
|
var directionJson = new JsonObject();
|
||||||
|
for (var dir : Direction.values()) {
|
||||||
|
directionJson.addProperty(dir.getName(), dir.get3DDataValue());
|
||||||
|
}
|
||||||
|
dataJson.add("direction", directionJson);
|
||||||
|
|
||||||
|
var poseJson = new JsonObject();
|
||||||
|
var poses = Pose.values();
|
||||||
|
for (int i = 0; i < poses.length; i++) {
|
||||||
|
poseJson.addProperty(poses[i].name().toLowerCase(Locale.ROOT), i);
|
||||||
|
}
|
||||||
|
dataJson.add("pose", poseJson);
|
||||||
|
|
||||||
|
var particleTypeJson = new JsonObject();
|
||||||
|
for (var type : BuiltInRegistries.PARTICLE_TYPE) {
|
||||||
|
particleTypeJson.addProperty(BuiltInRegistries.PARTICLE_TYPE.getKey(type).getPath(), BuiltInRegistries.PARTICLE_TYPE.getId(type));
|
||||||
|
}
|
||||||
|
dataJson.add("particle_type", particleTypeJson);
|
||||||
|
|
||||||
|
return dataJson;
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,8 +3,8 @@ package rs.valence.extractor.extractors;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import net.minecraft.network.NetworkSide;
|
import net.minecraft.network.ConnectionProtocol;
|
||||||
import net.minecraft.network.NetworkState;
|
import net.minecraft.network.protocol.PacketFlow;
|
||||||
import rs.valence.extractor.Main;
|
import rs.valence.extractor.Main;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
@ -20,13 +20,13 @@ public class Packets implements Main.Extractor {
|
||||||
public JsonElement extract() {
|
public JsonElement extract() {
|
||||||
var packetsJson = new JsonObject();
|
var packetsJson = new JsonObject();
|
||||||
|
|
||||||
for (var side : NetworkSide.values()) {
|
for (var flow : PacketFlow.values()) {
|
||||||
var sideJson = new JsonObject();
|
var flowJson = new JsonObject();
|
||||||
|
|
||||||
for (var state : NetworkState.values()) {
|
for (var proto : ConnectionProtocol.values()) {
|
||||||
var stateJson = new JsonArray();
|
var protoJson = new JsonArray();
|
||||||
|
|
||||||
var map = state.getPacketIdToPacketMap(side);
|
var map = proto.getPacketsByIds(flow);
|
||||||
|
|
||||||
for (var id : new TreeSet<>(map.keySet())) {
|
for (var id : new TreeSet<>(map.keySet())) {
|
||||||
var packetJson = new JsonObject();
|
var packetJson = new JsonObject();
|
||||||
|
@ -34,13 +34,13 @@ public class Packets implements Main.Extractor {
|
||||||
packetJson.addProperty("name", map.get(id.intValue()).getSimpleName());
|
packetJson.addProperty("name", map.get(id.intValue()).getSimpleName());
|
||||||
packetJson.addProperty("id", id);
|
packetJson.addProperty("id", id);
|
||||||
|
|
||||||
stateJson.add(packetJson);
|
protoJson.add(packetJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
sideJson.add(state.name().toLowerCase(Locale.ROOT), stateJson);
|
flowJson.add(proto.name().toLowerCase(Locale.ROOT), protoJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
packetsJson.add(side.name().toLowerCase(Locale.ROOT), sideJson);
|
packetsJson.add(flow.name().toLowerCase(Locale.ROOT), flowJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
return packetsJson;
|
return packetsJson;
|
||||||
|
|
|
@ -3,7 +3,7 @@ package rs.valence.extractor.extractors;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import net.minecraft.registry.Registries;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import rs.valence.extractor.Main;
|
import rs.valence.extractor.Main;
|
||||||
|
|
||||||
public class Sounds implements Main.Extractor {
|
public class Sounds implements Main.Extractor {
|
||||||
|
@ -19,10 +19,10 @@ public class Sounds implements Main.Extractor {
|
||||||
public JsonElement extract() throws Exception {
|
public JsonElement extract() throws Exception {
|
||||||
var itemsJson = new JsonArray();
|
var itemsJson = new JsonArray();
|
||||||
|
|
||||||
for (var sound : Registries.SOUND_EVENT) {
|
for (var sound : BuiltInRegistries.SOUND_EVENT) {
|
||||||
var itemJson = new JsonObject();
|
var itemJson = new JsonObject();
|
||||||
itemJson.addProperty("id", Registries.SOUND_EVENT.getRawId(sound));
|
itemJson.addProperty("id", BuiltInRegistries.SOUND_EVENT.getId(sound));
|
||||||
itemJson.addProperty("name", Registries.SOUND_EVENT.getId(sound).getPath());
|
itemJson.addProperty("name", BuiltInRegistries.SOUND_EVENT.getKey(sound).getPath());
|
||||||
itemsJson.add(itemJson);
|
itemsJson.add(itemJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ package rs.valence.extractor.extractors;
|
||||||
import com.google.gson.JsonArray;
|
import com.google.gson.JsonArray;
|
||||||
import com.google.gson.JsonElement;
|
import com.google.gson.JsonElement;
|
||||||
import com.google.gson.JsonObject;
|
import com.google.gson.JsonObject;
|
||||||
import net.minecraft.util.Language;
|
import net.minecraft.locale.Language;
|
||||||
import rs.valence.extractor.Main;
|
import rs.valence.extractor.Main;
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
Loading…
Reference in a new issue