mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 23:44:38 +00:00
parent
4865b772f6
commit
118f649cf7
34 changed files with 11529 additions and 13198 deletions
|
@ -9,7 +9,7 @@ A collection of Rust crates for making Minecraft bots, clients, and tools.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- The line below is automatically read and updated by the migrate script, so don't change it manually. -->
|
<!-- The line below is automatically read and updated by the migrate script, so don't change it manually. -->
|
||||||
*Currently supported Minecraft version: `1.19.4`.*
|
*Currently supported Minecraft version: `1.19.3`.*
|
||||||
|
|
||||||
## ⚠️ Azalea is still very unfinished, though most crates are in a somewhat useable state
|
## ⚠️ Azalea is still very unfinished, though most crates are in a somewhat useable state
|
||||||
|
|
||||||
|
|
|
@ -404,10 +404,7 @@ pub fn make_block_states(input: TokenStream) -> TokenStream {
|
||||||
&to_pascal_case(&block.name.to_string()),
|
&to_pascal_case(&block.name.to_string()),
|
||||||
proc_macro2::Span::call_site(),
|
proc_macro2::Span::call_site(),
|
||||||
);
|
);
|
||||||
let block_struct_name = Ident::new(
|
let block_struct_name = Ident::new(&block_name_pascal_case.to_string(), proc_macro2::Span::call_site());
|
||||||
&block_name_pascal_case.to_string(),
|
|
||||||
proc_macro2::Span::call_site(),
|
|
||||||
);
|
|
||||||
|
|
||||||
let mut from_block_to_state_match_inner = quote! {};
|
let mut from_block_to_state_match_inner = quote! {};
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,6 @@ make_block_states! {
|
||||||
_0,
|
_0,
|
||||||
_1,
|
_1,
|
||||||
},
|
},
|
||||||
"stage" => CherrySaplingStage {
|
|
||||||
_0,
|
|
||||||
_1,
|
|
||||||
},
|
|
||||||
"stage" => DarkOakSaplingStage {
|
"stage" => DarkOakSaplingStage {
|
||||||
_0,
|
_0,
|
||||||
_1,
|
_1,
|
||||||
|
@ -82,12 +78,6 @@ make_block_states! {
|
||||||
_14,
|
_14,
|
||||||
_15,
|
_15,
|
||||||
},
|
},
|
||||||
"dusted" => SuspiciousSandDusted {
|
|
||||||
_0,
|
|
||||||
_1,
|
|
||||||
_2,
|
|
||||||
_3,
|
|
||||||
},
|
|
||||||
"axis" => Axis {
|
"axis" => Axis {
|
||||||
X,
|
X,
|
||||||
Y,
|
Y,
|
||||||
|
@ -139,15 +129,6 @@ make_block_states! {
|
||||||
_6,
|
_6,
|
||||||
_7,
|
_7,
|
||||||
},
|
},
|
||||||
"distance" => CherryLeavesDistance {
|
|
||||||
_1,
|
|
||||||
_2,
|
|
||||||
_3,
|
|
||||||
_4,
|
|
||||||
_5,
|
|
||||||
_6,
|
|
||||||
_7,
|
|
||||||
},
|
|
||||||
"distance" => DarkOakLeavesDistance {
|
"distance" => DarkOakLeavesDistance {
|
||||||
_1,
|
_1,
|
||||||
_2,
|
_2,
|
||||||
|
@ -452,24 +433,6 @@ make_block_states! {
|
||||||
_14,
|
_14,
|
||||||
_15,
|
_15,
|
||||||
},
|
},
|
||||||
"rotation" => CherrySignRotation {
|
|
||||||
_0,
|
|
||||||
_1,
|
|
||||||
_2,
|
|
||||||
_3,
|
|
||||||
_4,
|
|
||||||
_5,
|
|
||||||
_6,
|
|
||||||
_7,
|
|
||||||
_8,
|
|
||||||
_9,
|
|
||||||
_10,
|
|
||||||
_11,
|
|
||||||
_12,
|
|
||||||
_13,
|
|
||||||
_14,
|
|
||||||
_15,
|
|
||||||
},
|
|
||||||
"rotation" => JungleSignRotation {
|
"rotation" => JungleSignRotation {
|
||||||
_0,
|
_0,
|
||||||
_1,
|
_1,
|
||||||
|
@ -632,24 +595,6 @@ make_block_states! {
|
||||||
_14,
|
_14,
|
||||||
_15,
|
_15,
|
||||||
},
|
},
|
||||||
"rotation" => CherryHangingSignRotation {
|
|
||||||
_0,
|
|
||||||
_1,
|
|
||||||
_2,
|
|
||||||
_3,
|
|
||||||
_4,
|
|
||||||
_5,
|
|
||||||
_6,
|
|
||||||
_7,
|
|
||||||
_8,
|
|
||||||
_9,
|
|
||||||
_10,
|
|
||||||
_11,
|
|
||||||
_12,
|
|
||||||
_13,
|
|
||||||
_14,
|
|
||||||
_15,
|
|
||||||
},
|
|
||||||
"rotation" => JungleHangingSignRotation {
|
"rotation" => JungleHangingSignRotation {
|
||||||
_0,
|
_0,
|
||||||
_1,
|
_1,
|
||||||
|
@ -1434,11 +1379,6 @@ make_block_states! {
|
||||||
_4,
|
_4,
|
||||||
_5,
|
_5,
|
||||||
},
|
},
|
||||||
"age" => TorchflowerCropAge {
|
|
||||||
_0,
|
|
||||||
_1,
|
|
||||||
_2,
|
|
||||||
},
|
|
||||||
"age" => BeetrootsAge {
|
"age" => BeetrootsAge {
|
||||||
_0,
|
_0,
|
||||||
_1,
|
_1,
|
||||||
|
@ -1869,12 +1809,6 @@ make_block_states! {
|
||||||
_25,
|
_25,
|
||||||
},
|
},
|
||||||
"berries" => bool,
|
"berries" => bool,
|
||||||
"flower_amount" => PinkPetalsAmount {
|
|
||||||
_1,
|
|
||||||
_2,
|
|
||||||
_3,
|
|
||||||
_4,
|
|
||||||
},
|
|
||||||
"tilt" => Tilt {
|
"tilt" => Tilt {
|
||||||
None,
|
None,
|
||||||
Unstable,
|
Unstable,
|
||||||
|
@ -1910,7 +1844,6 @@ make_block_states! {
|
||||||
birch_planks => BlockBehavior::default(), {},
|
birch_planks => BlockBehavior::default(), {},
|
||||||
jungle_planks => BlockBehavior::default(), {},
|
jungle_planks => BlockBehavior::default(), {},
|
||||||
acacia_planks => BlockBehavior::default(), {},
|
acacia_planks => BlockBehavior::default(), {},
|
||||||
cherry_planks => BlockBehavior::default(), {},
|
|
||||||
dark_oak_planks => BlockBehavior::default(), {},
|
dark_oak_planks => BlockBehavior::default(), {},
|
||||||
mangrove_planks => BlockBehavior::default(), {},
|
mangrove_planks => BlockBehavior::default(), {},
|
||||||
bamboo_planks => BlockBehavior::default(), {},
|
bamboo_planks => BlockBehavior::default(), {},
|
||||||
|
@ -1930,9 +1863,6 @@ make_block_states! {
|
||||||
acacia_sapling => BlockBehavior::default(), {
|
acacia_sapling => BlockBehavior::default(), {
|
||||||
stage: AcaciaSaplingStage::_0,
|
stage: AcaciaSaplingStage::_0,
|
||||||
},
|
},
|
||||||
cherry_sapling => BlockBehavior::default(), {
|
|
||||||
stage: CherrySaplingStage::_0,
|
|
||||||
},
|
|
||||||
dark_oak_sapling => BlockBehavior::default(), {
|
dark_oak_sapling => BlockBehavior::default(), {
|
||||||
stage: DarkOakSaplingStage::_0,
|
stage: DarkOakSaplingStage::_0,
|
||||||
},
|
},
|
||||||
|
@ -1950,9 +1880,6 @@ make_block_states! {
|
||||||
level: LavaLevel::_0,
|
level: LavaLevel::_0,
|
||||||
},
|
},
|
||||||
sand => BlockBehavior::default(), {},
|
sand => BlockBehavior::default(), {},
|
||||||
suspicious_sand => BlockBehavior::default(), {
|
|
||||||
dusted: SuspiciousSandDusted::_0,
|
|
||||||
},
|
|
||||||
red_sand => BlockBehavior::default(), {},
|
red_sand => BlockBehavior::default(), {},
|
||||||
gravel => BlockBehavior::default(), {},
|
gravel => BlockBehavior::default(), {},
|
||||||
gold_ore => BlockBehavior::default(), {},
|
gold_ore => BlockBehavior::default(), {},
|
||||||
|
@ -1977,9 +1904,6 @@ make_block_states! {
|
||||||
acacia_log => BlockBehavior::default(), {
|
acacia_log => BlockBehavior::default(), {
|
||||||
axis: Axis::Y,
|
axis: Axis::Y,
|
||||||
},
|
},
|
||||||
cherry_log => BlockBehavior::default(), {
|
|
||||||
axis: Axis::Y,
|
|
||||||
},
|
|
||||||
dark_oak_log => BlockBehavior::default(), {
|
dark_oak_log => BlockBehavior::default(), {
|
||||||
axis: Axis::Y,
|
axis: Axis::Y,
|
||||||
},
|
},
|
||||||
|
@ -2007,9 +1931,6 @@ make_block_states! {
|
||||||
stripped_acacia_log => BlockBehavior::default(), {
|
stripped_acacia_log => BlockBehavior::default(), {
|
||||||
axis: Axis::Y,
|
axis: Axis::Y,
|
||||||
},
|
},
|
||||||
stripped_cherry_log => BlockBehavior::default(), {
|
|
||||||
axis: Axis::Y,
|
|
||||||
},
|
|
||||||
stripped_dark_oak_log => BlockBehavior::default(), {
|
stripped_dark_oak_log => BlockBehavior::default(), {
|
||||||
axis: Axis::Y,
|
axis: Axis::Y,
|
||||||
},
|
},
|
||||||
|
@ -2037,9 +1958,6 @@ make_block_states! {
|
||||||
acacia_wood => BlockBehavior::default(), {
|
acacia_wood => BlockBehavior::default(), {
|
||||||
axis: Axis::Y,
|
axis: Axis::Y,
|
||||||
},
|
},
|
||||||
cherry_wood => BlockBehavior::default(), {
|
|
||||||
axis: Axis::Y,
|
|
||||||
},
|
|
||||||
dark_oak_wood => BlockBehavior::default(), {
|
dark_oak_wood => BlockBehavior::default(), {
|
||||||
axis: Axis::Y,
|
axis: Axis::Y,
|
||||||
},
|
},
|
||||||
|
@ -2061,9 +1979,6 @@ make_block_states! {
|
||||||
stripped_acacia_wood => BlockBehavior::default(), {
|
stripped_acacia_wood => BlockBehavior::default(), {
|
||||||
axis: Axis::Y,
|
axis: Axis::Y,
|
||||||
},
|
},
|
||||||
stripped_cherry_wood => BlockBehavior::default(), {
|
|
||||||
axis: Axis::Y,
|
|
||||||
},
|
|
||||||
stripped_dark_oak_wood => BlockBehavior::default(), {
|
stripped_dark_oak_wood => BlockBehavior::default(), {
|
||||||
axis: Axis::Y,
|
axis: Axis::Y,
|
||||||
},
|
},
|
||||||
|
@ -2095,11 +2010,6 @@ make_block_states! {
|
||||||
persistent: false,
|
persistent: false,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
},
|
},
|
||||||
cherry_leaves => BlockBehavior::default(), {
|
|
||||||
distance: CherryLeavesDistance::_7,
|
|
||||||
persistent: false,
|
|
||||||
waterlogged: false,
|
|
||||||
},
|
|
||||||
dark_oak_leaves => BlockBehavior::default(), {
|
dark_oak_leaves => BlockBehavior::default(), {
|
||||||
distance: DarkOakLeavesDistance::_7,
|
distance: DarkOakLeavesDistance::_7,
|
||||||
persistent: false,
|
persistent: false,
|
||||||
|
@ -2270,7 +2180,6 @@ make_block_states! {
|
||||||
facing: FacingCubic::North,
|
facing: FacingCubic::North,
|
||||||
},
|
},
|
||||||
dandelion => BlockBehavior::default(), {},
|
dandelion => BlockBehavior::default(), {},
|
||||||
torchflower => BlockBehavior::default(), {},
|
|
||||||
poppy => BlockBehavior::default(), {},
|
poppy => BlockBehavior::default(), {},
|
||||||
blue_orchid => BlockBehavior::default(), {},
|
blue_orchid => BlockBehavior::default(), {},
|
||||||
allium => BlockBehavior::default(), {},
|
allium => BlockBehavior::default(), {},
|
||||||
|
@ -2365,10 +2274,6 @@ make_block_states! {
|
||||||
rotation: AcaciaSignRotation::_0,
|
rotation: AcaciaSignRotation::_0,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
},
|
},
|
||||||
cherry_sign => BlockBehavior::default(), {
|
|
||||||
rotation: CherrySignRotation::_0,
|
|
||||||
waterlogged: false,
|
|
||||||
},
|
|
||||||
jungle_sign => BlockBehavior::default(), {
|
jungle_sign => BlockBehavior::default(), {
|
||||||
rotation: JungleSignRotation::_0,
|
rotation: JungleSignRotation::_0,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
|
@ -2422,10 +2327,6 @@ make_block_states! {
|
||||||
facing: FacingCardinal::North,
|
facing: FacingCardinal::North,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
},
|
},
|
||||||
cherry_wall_sign => BlockBehavior::default(), {
|
|
||||||
facing: FacingCardinal::North,
|
|
||||||
waterlogged: false,
|
|
||||||
},
|
|
||||||
jungle_wall_sign => BlockBehavior::default(), {
|
jungle_wall_sign => BlockBehavior::default(), {
|
||||||
facing: FacingCardinal::North,
|
facing: FacingCardinal::North,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
|
@ -2462,11 +2363,6 @@ make_block_states! {
|
||||||
rotation: AcaciaHangingSignRotation::_0,
|
rotation: AcaciaHangingSignRotation::_0,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
},
|
},
|
||||||
cherry_hanging_sign => BlockBehavior::default(), {
|
|
||||||
attached: false,
|
|
||||||
rotation: CherryHangingSignRotation::_0,
|
|
||||||
waterlogged: false,
|
|
||||||
},
|
|
||||||
jungle_hanging_sign => BlockBehavior::default(), {
|
jungle_hanging_sign => BlockBehavior::default(), {
|
||||||
attached: false,
|
attached: false,
|
||||||
rotation: JungleHangingSignRotation::_0,
|
rotation: JungleHangingSignRotation::_0,
|
||||||
|
@ -2513,10 +2409,6 @@ make_block_states! {
|
||||||
facing: FacingCardinal::North,
|
facing: FacingCardinal::North,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
},
|
},
|
||||||
cherry_wall_hanging_sign => BlockBehavior::default(), {
|
|
||||||
facing: FacingCardinal::North,
|
|
||||||
waterlogged: false,
|
|
||||||
},
|
|
||||||
jungle_wall_hanging_sign => BlockBehavior::default(), {
|
jungle_wall_hanging_sign => BlockBehavior::default(), {
|
||||||
facing: FacingCardinal::North,
|
facing: FacingCardinal::North,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
|
@ -2571,9 +2463,6 @@ make_block_states! {
|
||||||
acacia_pressure_plate => BlockBehavior::default(), {
|
acacia_pressure_plate => BlockBehavior::default(), {
|
||||||
powered: false,
|
powered: false,
|
||||||
},
|
},
|
||||||
cherry_pressure_plate => BlockBehavior::default(), {
|
|
||||||
powered: false,
|
|
||||||
},
|
|
||||||
dark_oak_pressure_plate => BlockBehavior::default(), {
|
dark_oak_pressure_plate => BlockBehavior::default(), {
|
||||||
powered: false,
|
powered: false,
|
||||||
},
|
},
|
||||||
|
@ -2707,13 +2596,6 @@ make_block_states! {
|
||||||
powered: false,
|
powered: false,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
},
|
},
|
||||||
cherry_trapdoor => BlockBehavior::default(), {
|
|
||||||
facing: FacingCardinal::North,
|
|
||||||
half: TopBottom::Bottom,
|
|
||||||
open: false,
|
|
||||||
powered: false,
|
|
||||||
waterlogged: false,
|
|
||||||
},
|
|
||||||
dark_oak_trapdoor => BlockBehavior::default(), {
|
dark_oak_trapdoor => BlockBehavior::default(), {
|
||||||
facing: FacingCardinal::North,
|
facing: FacingCardinal::North,
|
||||||
half: TopBottom::Bottom,
|
half: TopBottom::Bottom,
|
||||||
|
@ -2958,13 +2840,11 @@ make_block_states! {
|
||||||
west: WestWall::None,
|
west: WestWall::None,
|
||||||
},
|
},
|
||||||
flower_pot => BlockBehavior::default(), {},
|
flower_pot => BlockBehavior::default(), {},
|
||||||
potted_torchflower => BlockBehavior::default(), {},
|
|
||||||
potted_oak_sapling => BlockBehavior::default(), {},
|
potted_oak_sapling => BlockBehavior::default(), {},
|
||||||
potted_spruce_sapling => BlockBehavior::default(), {},
|
potted_spruce_sapling => BlockBehavior::default(), {},
|
||||||
potted_birch_sapling => BlockBehavior::default(), {},
|
potted_birch_sapling => BlockBehavior::default(), {},
|
||||||
potted_jungle_sapling => BlockBehavior::default(), {},
|
potted_jungle_sapling => BlockBehavior::default(), {},
|
||||||
potted_acacia_sapling => BlockBehavior::default(), {},
|
potted_acacia_sapling => BlockBehavior::default(), {},
|
||||||
potted_cherry_sapling => BlockBehavior::default(), {},
|
|
||||||
potted_dark_oak_sapling => BlockBehavior::default(), {},
|
potted_dark_oak_sapling => BlockBehavior::default(), {},
|
||||||
potted_mangrove_propagule => BlockBehavior::default(), {},
|
potted_mangrove_propagule => BlockBehavior::default(), {},
|
||||||
potted_fern => BlockBehavior::default(), {},
|
potted_fern => BlockBehavior::default(), {},
|
||||||
|
@ -3016,11 +2896,6 @@ make_block_states! {
|
||||||
facing: FacingCardinal::North,
|
facing: FacingCardinal::North,
|
||||||
powered: false,
|
powered: false,
|
||||||
},
|
},
|
||||||
cherry_button => BlockBehavior::default(), {
|
|
||||||
face: Face::Wall,
|
|
||||||
facing: FacingCardinal::North,
|
|
||||||
powered: false,
|
|
||||||
},
|
|
||||||
dark_oak_button => BlockBehavior::default(), {
|
dark_oak_button => BlockBehavior::default(), {
|
||||||
face: Face::Wall,
|
face: Face::Wall,
|
||||||
facing: FacingCardinal::North,
|
facing: FacingCardinal::North,
|
||||||
|
@ -3267,12 +3142,6 @@ make_block_states! {
|
||||||
shape: StairShape::Straight,
|
shape: StairShape::Straight,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
},
|
},
|
||||||
cherry_stairs => BlockBehavior::default(), {
|
|
||||||
facing: FacingCardinal::North,
|
|
||||||
half: TopBottom::Bottom,
|
|
||||||
shape: StairShape::Straight,
|
|
||||||
waterlogged: false,
|
|
||||||
},
|
|
||||||
dark_oak_stairs => BlockBehavior::default(), {
|
dark_oak_stairs => BlockBehavior::default(), {
|
||||||
facing: FacingCardinal::North,
|
facing: FacingCardinal::North,
|
||||||
half: TopBottom::Bottom,
|
half: TopBottom::Bottom,
|
||||||
|
@ -3509,10 +3378,6 @@ make_block_states! {
|
||||||
kind: Type::Bottom,
|
kind: Type::Bottom,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
},
|
},
|
||||||
cherry_slab => BlockBehavior::default(), {
|
|
||||||
kind: Type::Bottom,
|
|
||||||
waterlogged: false,
|
|
||||||
},
|
|
||||||
dark_oak_slab => BlockBehavior::default(), {
|
dark_oak_slab => BlockBehavior::default(), {
|
||||||
kind: Type::Bottom,
|
kind: Type::Bottom,
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
|
@ -3613,12 +3478,6 @@ make_block_states! {
|
||||||
open: false,
|
open: false,
|
||||||
powered: false,
|
powered: false,
|
||||||
},
|
},
|
||||||
cherry_fence_gate => BlockBehavior::default(), {
|
|
||||||
facing: FacingCardinal::North,
|
|
||||||
in_wall: false,
|
|
||||||
open: false,
|
|
||||||
powered: false,
|
|
||||||
},
|
|
||||||
dark_oak_fence_gate => BlockBehavior::default(), {
|
dark_oak_fence_gate => BlockBehavior::default(), {
|
||||||
facing: FacingCardinal::North,
|
facing: FacingCardinal::North,
|
||||||
in_wall: false,
|
in_wall: false,
|
||||||
|
@ -3665,13 +3524,6 @@ make_block_states! {
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
west: false,
|
west: false,
|
||||||
},
|
},
|
||||||
cherry_fence => BlockBehavior::default(), {
|
|
||||||
east: false,
|
|
||||||
north: false,
|
|
||||||
south: false,
|
|
||||||
waterlogged: false,
|
|
||||||
west: false,
|
|
||||||
},
|
|
||||||
dark_oak_fence => BlockBehavior::default(), {
|
dark_oak_fence => BlockBehavior::default(), {
|
||||||
east: false,
|
east: false,
|
||||||
north: false,
|
north: false,
|
||||||
|
@ -3721,13 +3573,6 @@ make_block_states! {
|
||||||
open: false,
|
open: false,
|
||||||
powered: false,
|
powered: false,
|
||||||
},
|
},
|
||||||
cherry_door => BlockBehavior::default(), {
|
|
||||||
facing: FacingCardinal::North,
|
|
||||||
half: Half::Lower,
|
|
||||||
hinge: Hinge::Left,
|
|
||||||
open: false,
|
|
||||||
powered: false,
|
|
||||||
},
|
|
||||||
dark_oak_door => BlockBehavior::default(), {
|
dark_oak_door => BlockBehavior::default(), {
|
||||||
facing: FacingCardinal::North,
|
facing: FacingCardinal::North,
|
||||||
half: Half::Lower,
|
half: Half::Lower,
|
||||||
|
@ -3774,9 +3619,6 @@ make_block_states! {
|
||||||
waterlogged: false,
|
waterlogged: false,
|
||||||
},
|
},
|
||||||
end_stone_bricks => BlockBehavior::default(), {},
|
end_stone_bricks => BlockBehavior::default(), {},
|
||||||
torchflower_crop => BlockBehavior::default(), {
|
|
||||||
age: TorchflowerCropAge::_0,
|
|
||||||
},
|
|
||||||
beetroots => BlockBehavior::default(), {
|
beetroots => BlockBehavior::default(), {
|
||||||
age: BeetrootsAge::_0,
|
age: BeetrootsAge::_0,
|
||||||
},
|
},
|
||||||
|
@ -4931,10 +4773,6 @@ make_block_states! {
|
||||||
azalea => BlockBehavior::default(), {},
|
azalea => BlockBehavior::default(), {},
|
||||||
flowering_azalea => BlockBehavior::default(), {},
|
flowering_azalea => BlockBehavior::default(), {},
|
||||||
moss_carpet => BlockBehavior::default(), {},
|
moss_carpet => BlockBehavior::default(), {},
|
||||||
pink_petals => BlockBehavior::default(), {
|
|
||||||
facing: FacingCardinal::North,
|
|
||||||
flower_amount: PinkPetalsAmount::_1,
|
|
||||||
},
|
|
||||||
moss_block => BlockBehavior::default(), {},
|
moss_block => BlockBehavior::default(), {},
|
||||||
big_dripleaf => BlockBehavior::default(), {
|
big_dripleaf => BlockBehavior::default(), {
|
||||||
facing: FacingCardinal::North,
|
facing: FacingCardinal::North,
|
||||||
|
@ -5057,9 +4895,5 @@ make_block_states! {
|
||||||
},
|
},
|
||||||
frogspawn => BlockBehavior::default(), {},
|
frogspawn => BlockBehavior::default(), {},
|
||||||
reinforced_deepslate => BlockBehavior::default(), {},
|
reinforced_deepslate => BlockBehavior::default(), {},
|
||||||
decorated_pot => BlockBehavior::default(), {
|
|
||||||
facing: FacingCardinal::North,
|
|
||||||
waterlogged: false,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -481,10 +481,6 @@ fn process_packet_events(ecs: &mut World) {
|
||||||
|
|
||||||
partial_world.chunks.view_center = ChunkPos::new(p.x, p.z);
|
partial_world.chunks.view_center = ChunkPos::new(p.x, p.z);
|
||||||
}
|
}
|
||||||
ClientboundGamePacket::ChunksBiomes(_) => {}
|
|
||||||
ClientboundGamePacket::LightUpdate(_p) => {
|
|
||||||
// debug!("Got light update packet {:?}", p);
|
|
||||||
}
|
|
||||||
ClientboundGamePacket::LevelChunkWithLight(p) => {
|
ClientboundGamePacket::LevelChunkWithLight(p) => {
|
||||||
debug!("Got chunk with light packet {} {}", p.x, p.z);
|
debug!("Got chunk with light packet {} {}", p.x, p.z);
|
||||||
let pos = ChunkPos::new(p.x, p.z);
|
let pos = ChunkPos::new(p.x, p.z);
|
||||||
|
@ -532,6 +528,9 @@ fn process_packet_events(ecs: &mut World) {
|
||||||
error!("Couldn't set chunk data: {}", e);
|
error!("Couldn't set chunk data: {}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ClientboundGamePacket::LightUpdate(_p) => {
|
||||||
|
// debug!("Got light update packet {:?}", p);
|
||||||
|
}
|
||||||
ClientboundGamePacket::AddEntity(p) => {
|
ClientboundGamePacket::AddEntity(p) => {
|
||||||
debug!("Got add entity packet {:?}", p);
|
debug!("Got add entity packet {:?}", p);
|
||||||
|
|
||||||
|
@ -909,7 +908,6 @@ fn process_packet_events(ecs: &mut World) {
|
||||||
|
|
||||||
system_state.apply(ecs);
|
system_state.apply(ecs);
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientboundGamePacket::SelectAdvancementsTab(_) => {}
|
ClientboundGamePacket::SelectAdvancementsTab(_) => {}
|
||||||
ClientboundGamePacket::SetActionBarText(_) => {}
|
ClientboundGamePacket::SetActionBarText(_) => {}
|
||||||
ClientboundGamePacket::SetBorderCenter(_) => {}
|
ClientboundGamePacket::SetBorderCenter(_) => {}
|
||||||
|
@ -935,9 +933,6 @@ fn process_packet_events(ecs: &mut World) {
|
||||||
ClientboundGamePacket::DisguisedChat(_) => {}
|
ClientboundGamePacket::DisguisedChat(_) => {}
|
||||||
ClientboundGamePacket::UpdateEnabledFeatures(_) => {}
|
ClientboundGamePacket::UpdateEnabledFeatures(_) => {}
|
||||||
ClientboundGamePacket::ContainerClose(_) => {}
|
ClientboundGamePacket::ContainerClose(_) => {}
|
||||||
ClientboundGamePacket::Bundle(_) => {}
|
|
||||||
ClientboundGamePacket::DamageEvent(_) => {}
|
|
||||||
ClientboundGamePacket::HurtAnimation(_) => {}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,7 +150,7 @@ impl BlockPos {
|
||||||
|
|
||||||
/// Chunk coordinates are used to represent where a chunk is in the world. You
|
/// Chunk coordinates are used to represent where a chunk is in the world. You
|
||||||
/// can convert the x and z to block coordinates by multiplying them by 16.
|
/// can convert the x and z to block coordinates by multiplying them by 16.
|
||||||
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, McBuf)]
|
#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash)]
|
||||||
pub struct ChunkPos {
|
pub struct ChunkPos {
|
||||||
pub x: i32,
|
pub x: i32,
|
||||||
pub z: i32,
|
pub z: i32,
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -49,6 +49,7 @@ const PROXY_PLAYERS: Players = Players {
|
||||||
sample: Vec::new(),
|
sample: Vec::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const PROXY_PREVIEWS_CHAT: Option<bool> = Some(false);
|
||||||
const PROXY_SECURE_CHAT: Option<bool> = Some(false);
|
const PROXY_SECURE_CHAT: Option<bool> = Some(false);
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
|
@ -107,6 +108,7 @@ async fn handle_connection(stream: TcpStream) -> anyhow::Result<()> {
|
||||||
favicon: PROXY_FAVICON.clone(),
|
favicon: PROXY_FAVICON.clone(),
|
||||||
players: PROXY_PLAYERS.clone(),
|
players: PROXY_PLAYERS.clone(),
|
||||||
version: PROXY_VERSION.clone(),
|
version: PROXY_VERSION.clone(),
|
||||||
|
previews_chat: PROXY_PREVIEWS_CHAT,
|
||||||
enforces_secure_chat: PROXY_SECURE_CHAT,
|
enforces_secure_chat: PROXY_SECURE_CHAT,
|
||||||
}
|
}
|
||||||
.get(),
|
.get(),
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
use azalea_buf::McBuf;
|
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
|
||||||
pub struct ClientboundBundlePacket {}
|
|
|
@ -1,14 +1,7 @@
|
||||||
use azalea_buf::McBuf;
|
|
||||||
use azalea_core::ChunkPos;
|
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
use azalea_buf::McBuf;
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
pub struct ClientboundChunksBiomesPacket {
|
pub struct ClientboundChunksBiomesPacket {
|
||||||
pub chunk_biome_data: Vec<ChunkBiomeData>,
|
pub chunk_biome_data: todo!(),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
|
||||||
pub struct ChunkBiomeData {
|
|
||||||
pub pos: ChunkPos,
|
|
||||||
pub buffer: Vec<u8>,
|
|
||||||
}
|
|
|
@ -1,10 +1,13 @@
|
||||||
use azalea_buf::{
|
use azalea_buf::BufReadError;
|
||||||
BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable,
|
use azalea_buf::McBuf;
|
||||||
};
|
use azalea_buf::McBufVarReadable;
|
||||||
use azalea_core::{FixedBitSet, ResourceLocation};
|
use azalea_buf::{McBufReadable, McBufVarWritable, McBufWritable};
|
||||||
|
use azalea_core::FixedBitSet;
|
||||||
|
use azalea_core::ResourceLocation;
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
use log::warn;
|
use log::warn;
|
||||||
use std::io::{Cursor, Write};
|
use std::io::Cursor;
|
||||||
|
use std::io::Write;
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
pub struct ClientboundCommandsPacket {
|
pub struct ClientboundCommandsPacket {
|
||||||
|
@ -134,14 +137,13 @@ pub enum BrigadierParser {
|
||||||
FloatRange,
|
FloatRange,
|
||||||
Dimension,
|
Dimension,
|
||||||
GameMode,
|
GameMode,
|
||||||
Time { min: i32 },
|
Time,
|
||||||
ResourceOrTag { registry_key: ResourceLocation },
|
ResourceOrTag { registry_key: ResourceLocation },
|
||||||
ResourceOrTagKey { registry_key: ResourceLocation },
|
ResourceOrTagKey { registry_key: ResourceLocation },
|
||||||
Resource { registry_key: ResourceLocation },
|
Resource { registry_key: ResourceLocation },
|
||||||
ResourceKey { registry_key: ResourceLocation },
|
ResourceKey { registry_key: ResourceLocation },
|
||||||
TemplateMirror,
|
TemplateMirror,
|
||||||
TemplateRotation,
|
TemplateRotation,
|
||||||
Heightmap,
|
|
||||||
Uuid,
|
Uuid,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,28 +0,0 @@
|
||||||
use azalea_buf::McBuf;
|
|
||||||
use azalea_core::ResourceLocation;
|
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
|
||||||
pub struct ClientboundCustomSoundPacket {
|
|
||||||
pub name: ResourceLocation,
|
|
||||||
pub source: SoundSource,
|
|
||||||
pub x: i32,
|
|
||||||
pub y: i32,
|
|
||||||
pub z: i32,
|
|
||||||
pub volume: f32,
|
|
||||||
pub pitch: f32,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(McBuf, Clone, Copy, Debug)]
|
|
||||||
pub enum SoundSource {
|
|
||||||
Master = 0,
|
|
||||||
Music = 1,
|
|
||||||
Records = 2,
|
|
||||||
Weather = 3,
|
|
||||||
Blocks = 4,
|
|
||||||
Hostile = 5,
|
|
||||||
Neutral = 6,
|
|
||||||
Players = 7,
|
|
||||||
Ambient = 8,
|
|
||||||
Voice = 9,
|
|
||||||
}
|
|
|
@ -1,30 +0,0 @@
|
||||||
use std::io::{Cursor, Write};
|
|
||||||
|
|
||||||
use azalea_buf::{McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable};
|
|
||||||
use azalea_core::Vec3;
|
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
|
||||||
pub struct ClientboundDamageEventPacket {
|
|
||||||
#[var]
|
|
||||||
pub entity_id: u32,
|
|
||||||
#[var]
|
|
||||||
pub source_type_id: u32,
|
|
||||||
pub source_cause_id: OptionalEntityId,
|
|
||||||
pub source_direct_id: OptionalEntityId,
|
|
||||||
pub source_position: Option<Vec3>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
|
||||||
pub struct OptionalEntityId(pub u32);
|
|
||||||
impl McBufReadable for OptionalEntityId {
|
|
||||||
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, azalea_buf::BufReadError> {
|
|
||||||
Ok(OptionalEntityId(u32::var_read_from(buf)? - 1))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
impl McBufWritable for OptionalEntityId {
|
|
||||||
fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
|
|
||||||
(self.0 + 1).var_write_into(buf)?;
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,9 +0,0 @@
|
||||||
use azalea_buf::McBuf;
|
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
|
||||||
pub struct ClientboundHurtAnimationPacket {
|
|
||||||
#[var]
|
|
||||||
pub id: u32,
|
|
||||||
pub yaw: f32,
|
|
||||||
}
|
|
|
@ -95,16 +95,10 @@ pub mod registry {
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
||||||
pub struct RegistryRoot {
|
pub struct RegistryRoot {
|
||||||
#[cfg(feature = "strict_registry")]
|
|
||||||
#[serde(rename = "minecraft:trim_material")]
|
|
||||||
pub trim_material: RegistryType<TrimMaterialElement>,
|
|
||||||
#[cfg(not(feature = "strict_registry"))]
|
|
||||||
#[serde(rename = "minecraft:trim_material")]
|
|
||||||
pub trim_material: Tag,
|
|
||||||
|
|
||||||
#[cfg(feature = "strict_registry")]
|
#[cfg(feature = "strict_registry")]
|
||||||
#[serde(rename = "minecraft:chat_type")]
|
#[serde(rename = "minecraft:chat_type")]
|
||||||
pub chat_type: RegistryType<ChatTypeElement>,
|
pub chat_type: RegistryType<ChatTypeElement>,
|
||||||
|
|
||||||
#[cfg(not(feature = "strict_registry"))]
|
#[cfg(not(feature = "strict_registry"))]
|
||||||
#[serde(rename = "minecraft:chat_type")]
|
#[serde(rename = "minecraft:chat_type")]
|
||||||
pub chat_type: Tag,
|
pub chat_type: Tag,
|
||||||
|
@ -115,23 +109,10 @@ pub mod registry {
|
||||||
#[cfg(feature = "strict_registry")]
|
#[cfg(feature = "strict_registry")]
|
||||||
#[serde(rename = "minecraft:worldgen/biome")]
|
#[serde(rename = "minecraft:worldgen/biome")]
|
||||||
pub world_type: RegistryType<WorldTypeElement>,
|
pub world_type: RegistryType<WorldTypeElement>,
|
||||||
|
|
||||||
#[cfg(not(feature = "strict_registry"))]
|
#[cfg(not(feature = "strict_registry"))]
|
||||||
#[serde(rename = "minecraft:worldgen/biome")]
|
#[serde(rename = "minecraft:worldgen/biome")]
|
||||||
pub world_type: Tag,
|
pub world_type: Tag,
|
||||||
|
|
||||||
#[cfg(feature = "strict_registry")]
|
|
||||||
#[serde(rename = "minecraft:trim_pattern")]
|
|
||||||
pub trim_pattern: RegistryType<TrimPatternElement>,
|
|
||||||
#[cfg(not(feature = "strict_registry"))]
|
|
||||||
#[serde(rename = "minecraft:trim_pattern")]
|
|
||||||
pub trim_pattern: Tag,
|
|
||||||
|
|
||||||
#[cfg(feature = "strict_registry")]
|
|
||||||
#[serde(rename = "minecraft:damage_type")]
|
|
||||||
pub damage_type: RegistryType<DamageTypeElement>,
|
|
||||||
#[cfg(not(feature = "strict_registry"))]
|
|
||||||
#[serde(rename = "minecraft:damage_type")]
|
|
||||||
pub damage_type: Tag,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A collection of values for a certain type of registry data.
|
/// A collection of values for a certain type of registry data.
|
||||||
|
@ -152,18 +133,6 @@ pub mod registry {
|
||||||
pub element: T,
|
pub element: T,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
|
||||||
pub struct TrimMaterialElement {
|
|
||||||
pub asset_name: String,
|
|
||||||
pub ingredient: ResourceLocation,
|
|
||||||
pub item_model_index: f32,
|
|
||||||
pub override_armor_materials: HashMap<String, String>,
|
|
||||||
#[serde(default)]
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
pub description: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Data about a kind of chat message
|
/// Data about a kind of chat message
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
||||||
|
@ -290,13 +259,12 @@ pub mod registry {
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
||||||
pub struct WorldTypeElement {
|
pub struct WorldTypeElement {
|
||||||
#[serde(with = "Convert")]
|
|
||||||
pub has_precipitation: bool,
|
|
||||||
pub temperature: f32,
|
pub temperature: f32,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub temperature_modifier: Option<String>,
|
pub temperature_modifier: Option<String>,
|
||||||
pub downfall: f32,
|
pub downfall: f32,
|
||||||
|
pub precipitation: BiomePrecipitation,
|
||||||
pub effects: BiomeEffects,
|
pub effects: BiomeEffects,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,7 +309,7 @@ pub mod registry {
|
||||||
pub additions_sound: Option<AdditionsSound>,
|
pub additions_sound: Option<AdditionsSound>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub ambient_sound: Option<ResourceLocation>,
|
pub ambient_sound: Option<SoundId>,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
pub particle: Option<BiomeParticle>,
|
pub particle: Option<BiomeParticle>,
|
||||||
|
@ -357,7 +325,7 @@ pub mod registry {
|
||||||
pub replace_current_music: bool,
|
pub replace_current_music: bool,
|
||||||
pub max_delay: u32,
|
pub max_delay: u32,
|
||||||
pub min_delay: u32,
|
pub min_delay: u32,
|
||||||
pub sound: azalea_registry::SoundEvent,
|
pub sound: SoundId,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
|
@ -366,14 +334,21 @@ pub mod registry {
|
||||||
pub tick_delay: u32,
|
pub tick_delay: u32,
|
||||||
pub block_search_extent: u32,
|
pub block_search_extent: u32,
|
||||||
pub offset: f32,
|
pub offset: f32,
|
||||||
pub sound: azalea_registry::SoundEvent,
|
pub sound: SoundId,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||||
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
||||||
pub struct AdditionsSound {
|
pub struct AdditionsSound {
|
||||||
pub tick_chance: f32,
|
pub tick_chance: f32,
|
||||||
pub sound: azalea_registry::SoundEvent,
|
pub sound: SoundId,
|
||||||
|
}
|
||||||
|
|
||||||
|
/// The ID of a sound.
|
||||||
|
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
|
||||||
|
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
||||||
|
pub struct SoundId {
|
||||||
|
pub sound_id: azalea_registry::SoundEvent,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Biome particles.
|
/// Biome particles.
|
||||||
|
@ -386,27 +361,6 @@ pub mod registry {
|
||||||
pub options: HashMap<String, String>,
|
pub options: HashMap<String, String>,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
|
||||||
pub struct TrimPatternElement {
|
|
||||||
#[serde(flatten)]
|
|
||||||
pub pattern: HashMap<String, String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
|
||||||
#[cfg_attr(feature = "strict_registry", serde(deny_unknown_fields))]
|
|
||||||
pub struct DamageTypeElement {
|
|
||||||
pub message_id: String,
|
|
||||||
pub scaling: String,
|
|
||||||
pub exhaustion: f32,
|
|
||||||
#[serde(default)]
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
pub effects: Option<String>,
|
|
||||||
#[serde(default)]
|
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
|
||||||
pub death_message_type: Option<String>,
|
|
||||||
}
|
|
||||||
|
|
||||||
// Using a trait because you can't implement methods for
|
// Using a trait because you can't implement methods for
|
||||||
// types you don't own, in this case Option<bool> and bool.
|
// types you don't own, in this case Option<bool> and bool.
|
||||||
trait Convert: Sized {
|
trait Convert: Sized {
|
||||||
|
@ -489,15 +443,12 @@ mod tests {
|
||||||
// This is just for testing.
|
// This is just for testing.
|
||||||
let registry = RegistryHolder {
|
let registry = RegistryHolder {
|
||||||
root: RegistryRoot {
|
root: RegistryRoot {
|
||||||
trim_material: Tag::End,
|
|
||||||
chat_type: Tag::End,
|
chat_type: Tag::End,
|
||||||
dimension_type: RegistryType::<DimensionTypeElement> {
|
dimension_type: RegistryType::<DimensionTypeElement> {
|
||||||
kind: ResourceLocation::new("minecraft:dimension_type"),
|
kind: ResourceLocation::new("minecraft:dimension_type"),
|
||||||
value: Vec::new(),
|
value: Vec::new(),
|
||||||
},
|
},
|
||||||
world_type: Tag::End,
|
world_type: Tag::End,
|
||||||
trim_pattern: Tag::End,
|
|
||||||
damage_type: Tag::End,
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
use std::io::{Cursor, Write};
|
use azalea_buf::{BufReadError, McBuf};
|
||||||
|
use azalea_buf::{McBufReadable, McBufWritable};
|
||||||
use azalea_buf::{BufReadError, McBuf, McBufReadable, McBufWritable};
|
|
||||||
use azalea_core::FixedBitSet;
|
use azalea_core::FixedBitSet;
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
use std::io::{Cursor, Write};
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
pub struct ClientboundPlayerPositionPacket {
|
pub struct ClientboundPlayerPositionPacket {
|
||||||
|
@ -11,13 +11,16 @@ pub struct ClientboundPlayerPositionPacket {
|
||||||
pub z: f64,
|
pub z: f64,
|
||||||
pub y_rot: f32,
|
pub y_rot: f32,
|
||||||
pub x_rot: f32,
|
pub x_rot: f32,
|
||||||
pub relative_arguments: RelativeMovements,
|
pub relative_arguments: RelativeArguments,
|
||||||
|
/// Client should confirm this packet with Teleport Confirm containing the
|
||||||
|
/// same Teleport ID.
|
||||||
#[var]
|
#[var]
|
||||||
pub id: u32,
|
pub id: u32,
|
||||||
|
pub dismount_vehicle: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
pub struct RelativeMovements {
|
pub struct RelativeArguments {
|
||||||
pub x: bool,
|
pub x: bool,
|
||||||
pub y: bool,
|
pub y: bool,
|
||||||
pub z: bool,
|
pub z: bool,
|
||||||
|
@ -25,10 +28,10 @@ pub struct RelativeMovements {
|
||||||
pub x_rot: bool,
|
pub x_rot: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl McBufReadable for RelativeMovements {
|
impl McBufReadable for RelativeArguments {
|
||||||
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
||||||
let set = FixedBitSet::<5>::read_from(buf)?;
|
let set = FixedBitSet::<5>::read_from(buf)?;
|
||||||
Ok(RelativeMovements {
|
Ok(RelativeArguments {
|
||||||
x: set.index(0),
|
x: set.index(0),
|
||||||
y: set.index(1),
|
y: set.index(1),
|
||||||
z: set.index(2),
|
z: set.index(2),
|
||||||
|
@ -38,7 +41,7 @@ impl McBufReadable for RelativeMovements {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl McBufWritable for RelativeMovements {
|
impl McBufWritable for RelativeArguments {
|
||||||
fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
|
fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
|
||||||
let mut set = FixedBitSet::<5>::new();
|
let mut set = FixedBitSet::<5>::new();
|
||||||
if self.x {
|
if self.x {
|
||||||
|
|
|
@ -4,7 +4,7 @@ use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
pub struct ClientboundServerDataPacket {
|
pub struct ClientboundServerDataPacket {
|
||||||
pub motd: FormattedText,
|
pub motd: Option<FormattedText>,
|
||||||
pub icon_bytes: Option<Vec<u8>>,
|
pub icon_base64: Option<String>,
|
||||||
pub enforces_secure_chat: bool,
|
pub enforces_secure_chat: bool,
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,7 @@ use azalea_buf::{
|
||||||
};
|
};
|
||||||
use azalea_core::{ResourceLocation, Slot};
|
use azalea_core::{ResourceLocation, Slot};
|
||||||
use azalea_protocol_macros::ClientboundGamePacket;
|
use azalea_protocol_macros::ClientboundGamePacket;
|
||||||
use azalea_registry::RecipeSerializer;
|
|
||||||
|
|
||||||
use std::io::{Cursor, Write};
|
use std::io::{Cursor, Write};
|
||||||
use std::str::FromStr;
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
#[derive(Clone, Debug, McBuf, ClientboundGamePacket)]
|
||||||
pub struct ClientboundUpdateRecipesPacket {
|
pub struct ClientboundUpdateRecipesPacket {
|
||||||
|
@ -36,7 +33,6 @@ pub struct ShapedRecipe {
|
||||||
pub category: CraftingBookCategory,
|
pub category: CraftingBookCategory,
|
||||||
pub ingredients: Vec<Ingredient>,
|
pub ingredients: Vec<Ingredient>,
|
||||||
pub result: Slot,
|
pub result: Slot,
|
||||||
pub show_notification: bool,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, Copy, McBuf)]
|
#[derive(Clone, Debug, Copy, McBuf)]
|
||||||
|
@ -72,7 +68,6 @@ impl McBufReadable for ShapedRecipe {
|
||||||
ingredients.push(Ingredient::read_from(buf)?);
|
ingredients.push(Ingredient::read_from(buf)?);
|
||||||
}
|
}
|
||||||
let result = Slot::read_from(buf)?;
|
let result = Slot::read_from(buf)?;
|
||||||
let show_notification = bool::read_from(buf)?;
|
|
||||||
|
|
||||||
Ok(ShapedRecipe {
|
Ok(ShapedRecipe {
|
||||||
width,
|
width,
|
||||||
|
@ -81,7 +76,6 @@ impl McBufReadable for ShapedRecipe {
|
||||||
category,
|
category,
|
||||||
ingredients,
|
ingredients,
|
||||||
result,
|
result,
|
||||||
show_notification,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -114,25 +108,10 @@ pub struct SimpleRecipe {
|
||||||
pub category: CraftingBookCategory,
|
pub category: CraftingBookCategory,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
|
||||||
pub struct SmithingTransformRecipe {
|
|
||||||
pub template: Ingredient,
|
|
||||||
pub base: Ingredient,
|
|
||||||
pub addition: Ingredient,
|
|
||||||
pub result: Slot,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
|
||||||
pub struct SmithingTrimRecipe {
|
|
||||||
pub template: Ingredient,
|
|
||||||
pub base: Ingredient,
|
|
||||||
pub addition: Ingredient,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
#[derive(Clone, Debug, McBuf)]
|
||||||
pub enum RecipeData {
|
pub enum RecipeData {
|
||||||
CraftingShaped(ShapedRecipe),
|
|
||||||
CraftingShapeless(ShapelessRecipe),
|
CraftingShapeless(ShapelessRecipe),
|
||||||
|
CraftingShaped(ShapedRecipe),
|
||||||
CraftingSpecialArmorDye(SimpleRecipe),
|
CraftingSpecialArmorDye(SimpleRecipe),
|
||||||
CraftingSpecialBookCloning(SimpleRecipe),
|
CraftingSpecialBookCloning(SimpleRecipe),
|
||||||
CraftingSpecialMapCloning(SimpleRecipe),
|
CraftingSpecialMapCloning(SimpleRecipe),
|
||||||
|
@ -143,6 +122,7 @@ pub enum RecipeData {
|
||||||
CraftingSpecialRepairItem(SimpleRecipe),
|
CraftingSpecialRepairItem(SimpleRecipe),
|
||||||
CraftingSpecialTippedArrow(SimpleRecipe),
|
CraftingSpecialTippedArrow(SimpleRecipe),
|
||||||
CraftingSpecialBannerDuplicate(SimpleRecipe),
|
CraftingSpecialBannerDuplicate(SimpleRecipe),
|
||||||
|
CraftingSpecialBannerAddPattern(SimpleRecipe),
|
||||||
CraftingSpecialShieldDecoration(SimpleRecipe),
|
CraftingSpecialShieldDecoration(SimpleRecipe),
|
||||||
CraftingSpecialShulkerBoxColoring(SimpleRecipe),
|
CraftingSpecialShulkerBoxColoring(SimpleRecipe),
|
||||||
CraftingSpecialSuspiciousStew(SimpleRecipe),
|
CraftingSpecialSuspiciousStew(SimpleRecipe),
|
||||||
|
@ -152,9 +132,6 @@ pub enum RecipeData {
|
||||||
CampfireCooking(CookingRecipe),
|
CampfireCooking(CookingRecipe),
|
||||||
Stonecutting(StoneCutterRecipe),
|
Stonecutting(StoneCutterRecipe),
|
||||||
Smithing(SmithingRecipe),
|
Smithing(SmithingRecipe),
|
||||||
SmithingTransform(SmithingTransformRecipe),
|
|
||||||
SmithingTrim(SmithingTrimRecipe),
|
|
||||||
CraftingDecoratedPot(SimpleRecipe),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
#[derive(Clone, Debug, McBuf)]
|
||||||
|
@ -164,55 +141,48 @@ pub struct Ingredient {
|
||||||
|
|
||||||
impl McBufWritable for Recipe {
|
impl McBufWritable for Recipe {
|
||||||
fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
|
fn write_into(&self, buf: &mut impl Write) -> Result<(), std::io::Error> {
|
||||||
let recipe_serializer = match &self.data {
|
let resource_location = match &self.data {
|
||||||
RecipeData::CraftingShapeless(_) => RecipeSerializer::CraftingShapeless,
|
RecipeData::CraftingShapeless(_) => "minecraft:crafting_shapeless",
|
||||||
RecipeData::CraftingShaped(_) => RecipeSerializer::CraftingShaped,
|
RecipeData::CraftingShaped(_) => "minecraft:crafting_shaped",
|
||||||
RecipeData::CraftingSpecialArmorDye(_) => RecipeSerializer::CraftingSpecialArmordye,
|
RecipeData::CraftingSpecialArmorDye(_) => "minecraft:crafting_special_armordye",
|
||||||
RecipeData::CraftingSpecialBookCloning(_) => {
|
RecipeData::CraftingSpecialBookCloning(_) => "minecraft:crafting_special_bookcloning",
|
||||||
RecipeSerializer::CraftingSpecialBookcloning
|
RecipeData::CraftingSpecialMapCloning(_) => "minecraft:crafting_special_mapcloning",
|
||||||
}
|
RecipeData::CraftingSpecialMapExtending(_) => "minecraft:crafting_special_mapextending",
|
||||||
RecipeData::CraftingSpecialMapCloning(_) => RecipeSerializer::CraftingSpecialMapcloning,
|
|
||||||
RecipeData::CraftingSpecialMapExtending(_) => {
|
|
||||||
RecipeSerializer::CraftingSpecialMapextending
|
|
||||||
}
|
|
||||||
RecipeData::CraftingSpecialFireworkRocket(_) => {
|
RecipeData::CraftingSpecialFireworkRocket(_) => {
|
||||||
RecipeSerializer::CraftingSpecialFireworkRocket
|
"minecraft:crafting_special_firework_rocket"
|
||||||
}
|
}
|
||||||
RecipeData::CraftingSpecialFireworkStar(_) => {
|
RecipeData::CraftingSpecialFireworkStar(_) => {
|
||||||
RecipeSerializer::CraftingSpecialFireworkStar
|
"minecraft:crafting_special_firework_star"
|
||||||
}
|
}
|
||||||
|
|
||||||
RecipeData::CraftingSpecialFireworkStarFade(_) => {
|
RecipeData::CraftingSpecialFireworkStarFade(_) => {
|
||||||
RecipeSerializer::CraftingSpecialFireworkStarFade
|
"minecraft:crafting_special_firework_star_fade"
|
||||||
}
|
|
||||||
RecipeData::CraftingSpecialRepairItem(_) => RecipeSerializer::CraftingSpecialRepairitem,
|
|
||||||
RecipeData::CraftingSpecialTippedArrow(_) => {
|
|
||||||
RecipeSerializer::CraftingSpecialTippedarrow
|
|
||||||
}
|
}
|
||||||
|
RecipeData::CraftingSpecialRepairItem(_) => "minecraft:crafting_special_repairitem",
|
||||||
|
RecipeData::CraftingSpecialTippedArrow(_) => "minecraft:crafting_special_tippedarrow",
|
||||||
RecipeData::CraftingSpecialBannerDuplicate(_) => {
|
RecipeData::CraftingSpecialBannerDuplicate(_) => {
|
||||||
RecipeSerializer::CraftingSpecialBannerduplicate
|
"minecraft:crafting_special_bannerduplicate"
|
||||||
|
}
|
||||||
|
RecipeData::CraftingSpecialBannerAddPattern(_) => {
|
||||||
|
"minecraft:crafting_special_banneraddpattern"
|
||||||
}
|
}
|
||||||
RecipeData::CraftingSpecialShieldDecoration(_) => {
|
RecipeData::CraftingSpecialShieldDecoration(_) => {
|
||||||
RecipeSerializer::CraftingSpecialShielddecoration
|
"minecraft:crafting_special_shielddecoration"
|
||||||
}
|
}
|
||||||
RecipeData::CraftingSpecialShulkerBoxColoring(_) => {
|
RecipeData::CraftingSpecialShulkerBoxColoring(_) => {
|
||||||
RecipeSerializer::CraftingSpecialShulkerboxcoloring
|
"minecraft:crafting_special_shulkerboxcoloring"
|
||||||
}
|
}
|
||||||
RecipeData::CraftingSpecialSuspiciousStew(_) => {
|
RecipeData::CraftingSpecialSuspiciousStew(_) => {
|
||||||
RecipeSerializer::CraftingSpecialSuspiciousstew
|
"minecraft:crafting_special_suspiciousstew"
|
||||||
}
|
}
|
||||||
RecipeData::Smelting(_) => RecipeSerializer::Smelting,
|
RecipeData::Smelting(_) => "minecraft:smelting",
|
||||||
RecipeData::Blasting(_) => RecipeSerializer::Blasting,
|
RecipeData::Blasting(_) => "minecraft:blasting",
|
||||||
RecipeData::Smoking(_) => RecipeSerializer::Smoking,
|
RecipeData::Smoking(_) => "minecraft:smoking",
|
||||||
RecipeData::CampfireCooking(_) => RecipeSerializer::CampfireCooking,
|
RecipeData::CampfireCooking(_) => "minecraft:campfire_cooking",
|
||||||
RecipeData::Stonecutting(_) => RecipeSerializer::Stonecutting,
|
RecipeData::Stonecutting(_) => "minecraft:stonecutting",
|
||||||
RecipeData::Smithing(_) => RecipeSerializer::Smithing,
|
RecipeData::Smithing(_) => "minecraft:smithing",
|
||||||
RecipeData::SmithingTransform(_) => RecipeSerializer::SmithingTransform,
|
|
||||||
RecipeData::SmithingTrim(_) => RecipeSerializer::SmithingTrim,
|
|
||||||
RecipeData::CraftingDecoratedPot(_) => RecipeSerializer::CraftingDecoratedPot,
|
|
||||||
};
|
};
|
||||||
let resource_location = ResourceLocation::new(&recipe_serializer.to_string());
|
ResourceLocation::new(resource_location).write_into(buf)?;
|
||||||
resource_location.write_into(buf)?;
|
|
||||||
self.identifier.write_into(buf)?;
|
self.identifier.write_into(buf)?;
|
||||||
self.data.write_without_id(buf)?;
|
self.data.write_without_id(buf)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@ -221,79 +191,74 @@ impl McBufWritable for Recipe {
|
||||||
|
|
||||||
impl McBufReadable for Recipe {
|
impl McBufReadable for Recipe {
|
||||||
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
||||||
let recipe_serializer_name = ResourceLocation::read_from(buf)?;
|
let recipe_type = ResourceLocation::read_from(buf)?;
|
||||||
let Ok(recipe_serializer) =
|
|
||||||
RecipeSerializer::from_str(&recipe_serializer_name.to_string()) else {
|
|
||||||
return Err(BufReadError::UnexpectedStringEnumVariant { id: recipe_serializer_name.to_string() });
|
|
||||||
};
|
|
||||||
let identifier = ResourceLocation::read_from(buf)?;
|
let identifier = ResourceLocation::read_from(buf)?;
|
||||||
|
|
||||||
// rust doesn't let us match ResourceLocation so we have to do a big
|
// rust doesn't let us match ResourceLocation so we have to do a big
|
||||||
// if-else chain :(
|
// if-else chain :(
|
||||||
let data = match recipe_serializer {
|
let data = match recipe_type.to_string().as_str() {
|
||||||
RecipeSerializer::CraftingShaped => {
|
"minecraft:crafting_shapeless" => {
|
||||||
RecipeData::CraftingShaped(ShapedRecipe::read_from(buf)?)
|
|
||||||
}
|
|
||||||
RecipeSerializer::CraftingShapeless => {
|
|
||||||
RecipeData::CraftingShapeless(ShapelessRecipe::read_from(buf)?)
|
RecipeData::CraftingShapeless(ShapelessRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialArmordye => {
|
"minecraft:crafting_shaped" => {
|
||||||
|
RecipeData::CraftingShaped(ShapedRecipe::read_from(buf)?)
|
||||||
|
}
|
||||||
|
"minecraft:crafting_special_armordye" => {
|
||||||
RecipeData::CraftingSpecialArmorDye(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialArmorDye(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialBookcloning => {
|
"minecraft:crafting_special_bookcloning" => {
|
||||||
RecipeData::CraftingSpecialBookCloning(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialBookCloning(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialMapcloning => {
|
"minecraft:crafting_special_mapcloning" => {
|
||||||
RecipeData::CraftingSpecialMapCloning(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialMapCloning(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialMapextending => {
|
"minecraft:crafting_special_mapextending" => {
|
||||||
RecipeData::CraftingSpecialMapExtending(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialMapExtending(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialFireworkRocket => {
|
"minecraft:crafting_special_firework_rocket" => {
|
||||||
RecipeData::CraftingSpecialFireworkRocket(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialFireworkRocket(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialFireworkStar => {
|
"minecraft:crafting_special_firework_star" => {
|
||||||
RecipeData::CraftingSpecialFireworkStar(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialFireworkStar(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialFireworkStarFade => {
|
"minecraft:crafting_special_firework_star_fade" => {
|
||||||
RecipeData::CraftingSpecialFireworkStarFade(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialFireworkStarFade(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialRepairitem => {
|
"minecraft:crafting_special_repairitem" => {
|
||||||
RecipeData::CraftingSpecialRepairItem(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialRepairItem(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialTippedarrow => {
|
"minecraft:crafting_special_tippedarrow" => {
|
||||||
RecipeData::CraftingSpecialTippedArrow(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialTippedArrow(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialBannerduplicate => {
|
"minecraft:crafting_special_bannerduplicate" => {
|
||||||
RecipeData::CraftingSpecialBannerDuplicate(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialBannerDuplicate(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialShielddecoration => {
|
"minecraft:crafting_special_banneraddpattern" => {
|
||||||
|
RecipeData::CraftingSpecialBannerAddPattern(SimpleRecipe::read_from(buf)?)
|
||||||
|
}
|
||||||
|
"minecraft:crafting_special_shielddecoration" => {
|
||||||
RecipeData::CraftingSpecialShieldDecoration(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialShieldDecoration(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialShulkerboxcoloring => {
|
"minecraft:crafting_special_shulkerboxcoloring" => {
|
||||||
RecipeData::CraftingSpecialShulkerBoxColoring(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialShulkerBoxColoring(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::CraftingSpecialSuspiciousstew => {
|
"minecraft:crafting_special_suspiciousstew" => {
|
||||||
RecipeData::CraftingSpecialSuspiciousStew(SimpleRecipe::read_from(buf)?)
|
RecipeData::CraftingSpecialSuspiciousStew(SimpleRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::Smelting => RecipeData::Smelting(CookingRecipe::read_from(buf)?),
|
"minecraft:smelting" => RecipeData::Smelting(CookingRecipe::read_from(buf)?),
|
||||||
RecipeSerializer::Blasting => RecipeData::Blasting(CookingRecipe::read_from(buf)?),
|
"minecraft:blasting" => RecipeData::Blasting(CookingRecipe::read_from(buf)?),
|
||||||
RecipeSerializer::Smoking => RecipeData::Smoking(CookingRecipe::read_from(buf)?),
|
"minecraft:smoking" => RecipeData::Smoking(CookingRecipe::read_from(buf)?),
|
||||||
RecipeSerializer::CampfireCooking => {
|
"minecraft:campfire_cooking" => {
|
||||||
RecipeData::CampfireCooking(CookingRecipe::read_from(buf)?)
|
RecipeData::CampfireCooking(CookingRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::Stonecutting => {
|
"minecraft:stonecutting" => {
|
||||||
RecipeData::Stonecutting(StoneCutterRecipe::read_from(buf)?)
|
RecipeData::Stonecutting(StoneCutterRecipe::read_from(buf)?)
|
||||||
}
|
}
|
||||||
RecipeSerializer::Smithing => RecipeData::Smithing(SmithingRecipe::read_from(buf)?),
|
"minecraft:smithing" => RecipeData::Smithing(SmithingRecipe::read_from(buf)?),
|
||||||
RecipeSerializer::SmithingTransform => {
|
_ => {
|
||||||
RecipeData::SmithingTransform(SmithingTransformRecipe::read_from(buf)?)
|
return Err(BufReadError::UnexpectedStringEnumVariant {
|
||||||
}
|
id: recipe_type.to_string(),
|
||||||
RecipeSerializer::SmithingTrim => {
|
});
|
||||||
RecipeData::SmithingTrim(SmithingTrimRecipe::read_from(buf)?)
|
|
||||||
}
|
|
||||||
RecipeSerializer::CraftingDecoratedPot => {
|
|
||||||
RecipeData::CraftingDecoratedPot(SimpleRecipe::read_from(buf)?)
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -9,9 +9,7 @@ pub mod clientbound_block_entity_data_packet;
|
||||||
pub mod clientbound_block_event_packet;
|
pub mod clientbound_block_event_packet;
|
||||||
pub mod clientbound_block_update_packet;
|
pub mod clientbound_block_update_packet;
|
||||||
pub mod clientbound_boss_event_packet;
|
pub mod clientbound_boss_event_packet;
|
||||||
pub mod clientbound_bundle_packet;
|
|
||||||
pub mod clientbound_change_difficulty_packet;
|
pub mod clientbound_change_difficulty_packet;
|
||||||
pub mod clientbound_chunks_biomes_packet;
|
|
||||||
pub mod clientbound_command_suggestions_packet;
|
pub mod clientbound_command_suggestions_packet;
|
||||||
pub mod clientbound_commands_packet;
|
pub mod clientbound_commands_packet;
|
||||||
pub mod clientbound_container_close_packet;
|
pub mod clientbound_container_close_packet;
|
||||||
|
@ -21,7 +19,6 @@ pub mod clientbound_container_set_slot_packet;
|
||||||
pub mod clientbound_cooldown_packet;
|
pub mod clientbound_cooldown_packet;
|
||||||
pub mod clientbound_custom_chat_completions_packet;
|
pub mod clientbound_custom_chat_completions_packet;
|
||||||
pub mod clientbound_custom_payload_packet;
|
pub mod clientbound_custom_payload_packet;
|
||||||
pub mod clientbound_damage_event_packet;
|
|
||||||
pub mod clientbound_delete_chat_packet;
|
pub mod clientbound_delete_chat_packet;
|
||||||
pub mod clientbound_disconnect_packet;
|
pub mod clientbound_disconnect_packet;
|
||||||
pub mod clientbound_disguised_chat_packet;
|
pub mod clientbound_disguised_chat_packet;
|
||||||
|
@ -30,7 +27,6 @@ pub mod clientbound_explode_packet;
|
||||||
pub mod clientbound_forget_level_chunk_packet;
|
pub mod clientbound_forget_level_chunk_packet;
|
||||||
pub mod clientbound_game_event_packet;
|
pub mod clientbound_game_event_packet;
|
||||||
pub mod clientbound_horse_screen_open_packet;
|
pub mod clientbound_horse_screen_open_packet;
|
||||||
pub mod clientbound_hurt_animation_packet;
|
|
||||||
pub mod clientbound_initialize_border_packet;
|
pub mod clientbound_initialize_border_packet;
|
||||||
pub mod clientbound_keep_alive_packet;
|
pub mod clientbound_keep_alive_packet;
|
||||||
pub mod clientbound_level_chunk_with_light_packet;
|
pub mod clientbound_level_chunk_with_light_packet;
|
||||||
|
@ -171,33 +167,33 @@ declare_state_packets!(
|
||||||
0x03: serverbound_chat_ack_packet::ServerboundChatAckPacket,
|
0x03: serverbound_chat_ack_packet::ServerboundChatAckPacket,
|
||||||
0x04: serverbound_chat_command_packet::ServerboundChatCommandPacket,
|
0x04: serverbound_chat_command_packet::ServerboundChatCommandPacket,
|
||||||
0x05: serverbound_chat_packet::ServerboundChatPacket,
|
0x05: serverbound_chat_packet::ServerboundChatPacket,
|
||||||
0x06: serverbound_chat_session_update_packet::ServerboundChatSessionUpdatePacket,
|
0x06: serverbound_client_command_packet::ServerboundClientCommandPacket,
|
||||||
0x07: serverbound_client_command_packet::ServerboundClientCommandPacket,
|
0x07: serverbound_client_information_packet::ServerboundClientInformationPacket,
|
||||||
0x08: serverbound_client_information_packet::ServerboundClientInformationPacket,
|
0x08: serverbound_command_suggestion_packet::ServerboundCommandSuggestionPacket,
|
||||||
0x09: serverbound_command_suggestion_packet::ServerboundCommandSuggestionPacket,
|
0x09: serverbound_container_button_click_packet::ServerboundContainerButtonClickPacket,
|
||||||
0x0a: serverbound_container_button_click_packet::ServerboundContainerButtonClickPacket,
|
0x0a: serverbound_container_click_packet::ServerboundContainerClickPacket,
|
||||||
0x0b: serverbound_container_click_packet::ServerboundContainerClickPacket,
|
0x0b: serverbound_container_close_packet::ServerboundContainerClosePacket,
|
||||||
0x0c: serverbound_container_close_packet::ServerboundContainerClosePacket,
|
0x0c: serverbound_custom_payload_packet::ServerboundCustomPayloadPacket,
|
||||||
0x0d: serverbound_custom_payload_packet::ServerboundCustomPayloadPacket,
|
0x0d: serverbound_edit_book_packet::ServerboundEditBookPacket,
|
||||||
0x0e: serverbound_edit_book_packet::ServerboundEditBookPacket,
|
0x0e: serverbound_entity_tag_query::ServerboundEntityTagQuery,
|
||||||
0x0f: serverbound_entity_tag_query::ServerboundEntityTagQuery,
|
0x0f: serverbound_interact_packet::ServerboundInteractPacket,
|
||||||
0x10: serverbound_interact_packet::ServerboundInteractPacket,
|
0x10: serverbound_jigsaw_generate_packet::ServerboundJigsawGeneratePacket,
|
||||||
0x11: serverbound_jigsaw_generate_packet::ServerboundJigsawGeneratePacket,
|
0x11: serverbound_keep_alive_packet::ServerboundKeepAlivePacket,
|
||||||
0x12: serverbound_keep_alive_packet::ServerboundKeepAlivePacket,
|
0x12: serverbound_lock_difficulty_packet::ServerboundLockDifficultyPacket,
|
||||||
0x13: serverbound_lock_difficulty_packet::ServerboundLockDifficultyPacket,
|
0x13: serverbound_move_player_pos_packet::ServerboundMovePlayerPosPacket,
|
||||||
0x14: serverbound_move_player_pos_packet::ServerboundMovePlayerPosPacket,
|
0x14: serverbound_move_player_pos_rot_packet::ServerboundMovePlayerPosRotPacket,
|
||||||
0x15: serverbound_move_player_pos_rot_packet::ServerboundMovePlayerPosRotPacket,
|
0x15: serverbound_move_player_rot_packet::ServerboundMovePlayerRotPacket,
|
||||||
0x16: serverbound_move_player_rot_packet::ServerboundMovePlayerRotPacket,
|
0x16: serverbound_move_player_status_only_packet::ServerboundMovePlayerStatusOnlyPacket,
|
||||||
0x17: serverbound_move_player_status_only_packet::ServerboundMovePlayerStatusOnlyPacket,
|
0x17: serverbound_move_vehicle_packet::ServerboundMoveVehiclePacket,
|
||||||
0x18: serverbound_move_vehicle_packet::ServerboundMoveVehiclePacket,
|
0x18: serverbound_paddle_boat_packet::ServerboundPaddleBoatPacket,
|
||||||
0x19: serverbound_paddle_boat_packet::ServerboundPaddleBoatPacket,
|
0x19: serverbound_pick_item_packet::ServerboundPickItemPacket,
|
||||||
0x1a: serverbound_pick_item_packet::ServerboundPickItemPacket,
|
0x1a: serverbound_place_recipe_packet::ServerboundPlaceRecipePacket,
|
||||||
0x1b: serverbound_place_recipe_packet::ServerboundPlaceRecipePacket,
|
0x1b: serverbound_player_abilities_packet::ServerboundPlayerAbilitiesPacket,
|
||||||
0x1c: serverbound_player_abilities_packet::ServerboundPlayerAbilitiesPacket,
|
0x1c: serverbound_player_action_packet::ServerboundPlayerActionPacket,
|
||||||
0x1d: serverbound_player_action_packet::ServerboundPlayerActionPacket,
|
0x1d: serverbound_player_command_packet::ServerboundPlayerCommandPacket,
|
||||||
0x1e: serverbound_player_command_packet::ServerboundPlayerCommandPacket,
|
0x1e: serverbound_player_input_packet::ServerboundPlayerInputPacket,
|
||||||
0x1f: serverbound_player_input_packet::ServerboundPlayerInputPacket,
|
0x1f: serverbound_pong_packet::ServerboundPongPacket,
|
||||||
0x20: serverbound_pong_packet::ServerboundPongPacket,
|
0x20: serverbound_chat_session_update_packet::ServerboundChatSessionUpdatePacket,
|
||||||
0x21: serverbound_recipe_book_change_settings_packet::ServerboundRecipeBookChangeSettingsPacket,
|
0x21: serverbound_recipe_book_change_settings_packet::ServerboundRecipeBookChangeSettingsPacket,
|
||||||
0x22: serverbound_recipe_book_seen_recipe_packet::ServerboundRecipeBookSeenRecipePacket,
|
0x22: serverbound_recipe_book_seen_recipe_packet::ServerboundRecipeBookSeenRecipePacket,
|
||||||
0x23: serverbound_rename_item_packet::ServerboundRenameItemPacket,
|
0x23: serverbound_rename_item_packet::ServerboundRenameItemPacket,
|
||||||
|
@ -218,115 +214,111 @@ declare_state_packets!(
|
||||||
0x32: serverbound_use_item_packet::ServerboundUseItemPacket,
|
0x32: serverbound_use_item_packet::ServerboundUseItemPacket,
|
||||||
},
|
},
|
||||||
Clientbound => {
|
Clientbound => {
|
||||||
0x00: clientbound_bundle_packet::ClientboundBundlePacket,
|
0x00: clientbound_add_entity_packet::ClientboundAddEntityPacket,
|
||||||
0x01: clientbound_add_entity_packet::ClientboundAddEntityPacket,
|
0x01: clientbound_add_experience_orb_packet::ClientboundAddExperienceOrbPacket,
|
||||||
0x02: clientbound_add_experience_orb_packet::ClientboundAddExperienceOrbPacket,
|
0x02: clientbound_add_player_packet::ClientboundAddPlayerPacket,
|
||||||
0x03: clientbound_add_player_packet::ClientboundAddPlayerPacket,
|
0x03: clientbound_animate_packet::ClientboundAnimatePacket,
|
||||||
0x04: clientbound_animate_packet::ClientboundAnimatePacket,
|
0x04: clientbound_award_stats_packet::ClientboundAwardStatsPacket,
|
||||||
0x05: clientbound_award_stats_packet::ClientboundAwardStatsPacket,
|
0x05: clientbound_block_changed_ack_packet::ClientboundBlockChangedAckPacket,
|
||||||
0x06: clientbound_block_changed_ack_packet::ClientboundBlockChangedAckPacket,
|
0x06: clientbound_block_destruction_packet::ClientboundBlockDestructionPacket,
|
||||||
0x07: clientbound_block_destruction_packet::ClientboundBlockDestructionPacket,
|
0x07: clientbound_block_entity_data_packet::ClientboundBlockEntityDataPacket,
|
||||||
0x08: clientbound_block_entity_data_packet::ClientboundBlockEntityDataPacket,
|
0x08: clientbound_block_event_packet::ClientboundBlockEventPacket,
|
||||||
0x09: clientbound_block_event_packet::ClientboundBlockEventPacket,
|
0x09: clientbound_block_update_packet::ClientboundBlockUpdatePacket,
|
||||||
0x0a: clientbound_block_update_packet::ClientboundBlockUpdatePacket,
|
0x0a: clientbound_boss_event_packet::ClientboundBossEventPacket,
|
||||||
0x0b: clientbound_boss_event_packet::ClientboundBossEventPacket,
|
0x0b: clientbound_change_difficulty_packet::ClientboundChangeDifficultyPacket,
|
||||||
0x0c: clientbound_change_difficulty_packet::ClientboundChangeDifficultyPacket,
|
0x0d: clientbound_command_suggestions_packet::ClientboundCommandSuggestionsPacket,
|
||||||
0x0d: clientbound_chunks_biomes_packet::ClientboundChunksBiomesPacket,
|
0x0e: clientbound_commands_packet::ClientboundCommandsPacket,
|
||||||
0x0f: clientbound_command_suggestions_packet::ClientboundCommandSuggestionsPacket,
|
0x0f: clientbound_container_close_packet::ClientboundContainerClosePacket,
|
||||||
0x10: clientbound_commands_packet::ClientboundCommandsPacket,
|
0x10: clientbound_container_set_content_packet::ClientboundContainerSetContentPacket,
|
||||||
0x11: clientbound_container_close_packet::ClientboundContainerClosePacket,
|
0x11: clientbound_container_set_data_packet::ClientboundContainerSetDataPacket,
|
||||||
0x12: clientbound_container_set_content_packet::ClientboundContainerSetContentPacket,
|
0x12: clientbound_container_set_slot_packet::ClientboundContainerSetSlotPacket,
|
||||||
0x13: clientbound_container_set_data_packet::ClientboundContainerSetDataPacket,
|
0x13: clientbound_cooldown_packet::ClientboundCooldownPacket,
|
||||||
0x14: clientbound_container_set_slot_packet::ClientboundContainerSetSlotPacket,
|
0x14: clientbound_custom_chat_completions_packet::ClientboundCustomChatCompletionsPacket,
|
||||||
0x15: clientbound_cooldown_packet::ClientboundCooldownPacket,
|
0x15: clientbound_custom_payload_packet::ClientboundCustomPayloadPacket,
|
||||||
0x16: clientbound_custom_chat_completions_packet::ClientboundCustomChatCompletionsPacket,
|
0x16: clientbound_delete_chat_packet::ClientboundDeleteChatPacket,
|
||||||
0x17: clientbound_custom_payload_packet::ClientboundCustomPayloadPacket,
|
0x17: clientbound_disconnect_packet::ClientboundDisconnectPacket,
|
||||||
0x18: clientbound_damage_event_packet::ClientboundDamageEventPacket,
|
0x18: clientbound_disguised_chat_packet::ClientboundDisguisedChatPacket,
|
||||||
0x19: clientbound_delete_chat_packet::ClientboundDeleteChatPacket,
|
0x19: clientbound_entity_event_packet::ClientboundEntityEventPacket,
|
||||||
0x1a: clientbound_disconnect_packet::ClientboundDisconnectPacket,
|
0x1a: clientbound_explode_packet::ClientboundExplodePacket,
|
||||||
0x1b: clientbound_disguised_chat_packet::ClientboundDisguisedChatPacket,
|
0x1b: clientbound_forget_level_chunk_packet::ClientboundForgetLevelChunkPacket,
|
||||||
0x1c: clientbound_entity_event_packet::ClientboundEntityEventPacket,
|
0x1c: clientbound_game_event_packet::ClientboundGameEventPacket,
|
||||||
0x1d: clientbound_explode_packet::ClientboundExplodePacket,
|
0x1d: clientbound_horse_screen_open_packet::ClientboundHorseScreenOpenPacket,
|
||||||
0x1e: clientbound_forget_level_chunk_packet::ClientboundForgetLevelChunkPacket,
|
0x1e: clientbound_initialize_border_packet::ClientboundInitializeBorderPacket,
|
||||||
0x1f: clientbound_game_event_packet::ClientboundGameEventPacket,
|
0x1f: clientbound_keep_alive_packet::ClientboundKeepAlivePacket,
|
||||||
0x20: clientbound_horse_screen_open_packet::ClientboundHorseScreenOpenPacket,
|
0x20: clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket,
|
||||||
0x21: clientbound_hurt_animation_packet::ClientboundHurtAnimationPacket,
|
0x21: clientbound_level_event_packet::ClientboundLevelEventPacket,
|
||||||
0x22: clientbound_initialize_border_packet::ClientboundInitializeBorderPacket,
|
0x22: clientbound_level_particles_packet::ClientboundLevelParticlesPacket,
|
||||||
0x23: clientbound_keep_alive_packet::ClientboundKeepAlivePacket,
|
0x23: clientbound_light_update_packet::ClientboundLightUpdatePacket,
|
||||||
0x24: clientbound_level_chunk_with_light_packet::ClientboundLevelChunkWithLightPacket,
|
0x24: clientbound_login_packet::ClientboundLoginPacket,
|
||||||
0x25: clientbound_level_event_packet::ClientboundLevelEventPacket,
|
0x25: clientbound_map_item_data_packet::ClientboundMapItemDataPacket,
|
||||||
0x26: clientbound_level_particles_packet::ClientboundLevelParticlesPacket,
|
0x26: clientbound_merchant_offers_packet::ClientboundMerchantOffersPacket,
|
||||||
0x27: clientbound_light_update_packet::ClientboundLightUpdatePacket,
|
0x27: clientbound_move_entity_pos_packet::ClientboundMoveEntityPosPacket,
|
||||||
0x28: clientbound_login_packet::ClientboundLoginPacket,
|
0x28: clientbound_move_entity_pos_rot_packet::ClientboundMoveEntityPosRotPacket,
|
||||||
0x29: clientbound_map_item_data_packet::ClientboundMapItemDataPacket,
|
0x29: clientbound_move_entity_rot_packet::ClientboundMoveEntityRotPacket,
|
||||||
0x2a: clientbound_merchant_offers_packet::ClientboundMerchantOffersPacket,
|
0x2a: clientbound_move_vehicle_packet::ClientboundMoveVehiclePacket,
|
||||||
0x2b: clientbound_move_entity_pos_packet::ClientboundMoveEntityPosPacket,
|
0x2b: clientbound_open_book_packet::ClientboundOpenBookPacket,
|
||||||
0x2c: clientbound_move_entity_pos_rot_packet::ClientboundMoveEntityPosRotPacket,
|
0x2c: clientbound_open_screen_packet::ClientboundOpenScreenPacket,
|
||||||
0x2d: clientbound_move_entity_rot_packet::ClientboundMoveEntityRotPacket,
|
0x2d: clientbound_open_sign_editor_packet::ClientboundOpenSignEditorPacket,
|
||||||
0x2e: clientbound_move_vehicle_packet::ClientboundMoveVehiclePacket,
|
0x2e: clientbound_ping_packet::ClientboundPingPacket,
|
||||||
0x2f: clientbound_open_book_packet::ClientboundOpenBookPacket,
|
0x2f: clientbound_place_ghost_recipe_packet::ClientboundPlaceGhostRecipePacket,
|
||||||
0x30: clientbound_open_screen_packet::ClientboundOpenScreenPacket,
|
0x30: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket,
|
||||||
0x31: clientbound_open_sign_editor_packet::ClientboundOpenSignEditorPacket,
|
0x31: clientbound_player_chat_packet::ClientboundPlayerChatPacket,
|
||||||
0x32: clientbound_ping_packet::ClientboundPingPacket,
|
0x32: clientbound_player_combat_end_packet::ClientboundPlayerCombatEndPacket,
|
||||||
0x33: clientbound_place_ghost_recipe_packet::ClientboundPlaceGhostRecipePacket,
|
0x33: clientbound_player_combat_enter_packet::ClientboundPlayerCombatEnterPacket,
|
||||||
0x34: clientbound_player_abilities_packet::ClientboundPlayerAbilitiesPacket,
|
0x34: clientbound_player_combat_kill_packet::ClientboundPlayerCombatKillPacket,
|
||||||
0x35: clientbound_player_chat_packet::ClientboundPlayerChatPacket,
|
0x35: clientbound_player_info_remove_packet::ClientboundPlayerInfoRemovePacket,
|
||||||
0x36: clientbound_player_combat_end_packet::ClientboundPlayerCombatEndPacket,
|
0x36: clientbound_player_info_update_packet::ClientboundPlayerInfoUpdatePacket,
|
||||||
0x37: clientbound_player_combat_enter_packet::ClientboundPlayerCombatEnterPacket,
|
0x37: clientbound_player_look_at_packet::ClientboundPlayerLookAtPacket,
|
||||||
0x38: clientbound_player_combat_kill_packet::ClientboundPlayerCombatKillPacket,
|
0x38: clientbound_player_position_packet::ClientboundPlayerPositionPacket,
|
||||||
0x39: clientbound_player_info_remove_packet::ClientboundPlayerInfoRemovePacket,
|
0x39: clientbound_recipe_packet::ClientboundRecipePacket,
|
||||||
0x3a: clientbound_player_info_update_packet::ClientboundPlayerInfoUpdatePacket,
|
0x3a: clientbound_remove_entities_packet::ClientboundRemoveEntitiesPacket,
|
||||||
0x3b: clientbound_player_look_at_packet::ClientboundPlayerLookAtPacket,
|
0x3b: clientbound_remove_mob_effect_packet::ClientboundRemoveMobEffectPacket,
|
||||||
0x3c: clientbound_player_position_packet::ClientboundPlayerPositionPacket,
|
0x3c: clientbound_resource_pack_packet::ClientboundResourcePackPacket,
|
||||||
0x3d: clientbound_recipe_packet::ClientboundRecipePacket,
|
0x3d: clientbound_respawn_packet::ClientboundRespawnPacket,
|
||||||
0x3e: clientbound_remove_entities_packet::ClientboundRemoveEntitiesPacket,
|
0x3e: clientbound_rotate_head_packet::ClientboundRotateHeadPacket,
|
||||||
0x3f: clientbound_remove_mob_effect_packet::ClientboundRemoveMobEffectPacket,
|
0x3f: clientbound_section_blocks_update_packet::ClientboundSectionBlocksUpdatePacket,
|
||||||
0x40: clientbound_resource_pack_packet::ClientboundResourcePackPacket,
|
0x40: clientbound_select_advancements_tab_packet::ClientboundSelectAdvancementsTabPacket,
|
||||||
0x41: clientbound_respawn_packet::ClientboundRespawnPacket,
|
0x41: clientbound_server_data_packet::ClientboundServerDataPacket,
|
||||||
0x42: clientbound_rotate_head_packet::ClientboundRotateHeadPacket,
|
0x42: clientbound_set_action_bar_text_packet::ClientboundSetActionBarTextPacket,
|
||||||
0x43: clientbound_section_blocks_update_packet::ClientboundSectionBlocksUpdatePacket,
|
0x43: clientbound_set_border_center_packet::ClientboundSetBorderCenterPacket,
|
||||||
0x44: clientbound_select_advancements_tab_packet::ClientboundSelectAdvancementsTabPacket,
|
0x44: clientbound_set_border_lerp_size_packet::ClientboundSetBorderLerpSizePacket,
|
||||||
0x45: clientbound_server_data_packet::ClientboundServerDataPacket,
|
0x45: clientbound_set_border_size_packet::ClientboundSetBorderSizePacket,
|
||||||
0x46: clientbound_set_action_bar_text_packet::ClientboundSetActionBarTextPacket,
|
0x46: clientbound_set_border_warning_delay_packet::ClientboundSetBorderWarningDelayPacket,
|
||||||
0x47: clientbound_set_border_center_packet::ClientboundSetBorderCenterPacket,
|
0x47: clientbound_set_border_warning_distance_packet::ClientboundSetBorderWarningDistancePacket,
|
||||||
0x48: clientbound_set_border_lerp_size_packet::ClientboundSetBorderLerpSizePacket,
|
0x48: clientbound_set_camera_packet::ClientboundSetCameraPacket,
|
||||||
0x49: clientbound_set_border_size_packet::ClientboundSetBorderSizePacket,
|
0x49: clientbound_set_carried_item_packet::ClientboundSetCarriedItemPacket,
|
||||||
0x4a: clientbound_set_border_warning_delay_packet::ClientboundSetBorderWarningDelayPacket,
|
0x4a: clientbound_set_chunk_cache_center_packet::ClientboundSetChunkCacheCenterPacket,
|
||||||
0x4b: clientbound_set_border_warning_distance_packet::ClientboundSetBorderWarningDistancePacket,
|
0x4b: clientbound_set_chunk_cache_radius_packet::ClientboundSetChunkCacheRadiusPacket,
|
||||||
0x4c: clientbound_set_camera_packet::ClientboundSetCameraPacket,
|
0x4c: clientbound_set_default_spawn_position_packet::ClientboundSetDefaultSpawnPositionPacket,
|
||||||
0x4d: clientbound_set_carried_item_packet::ClientboundSetCarriedItemPacket,
|
0x4d: clientbound_set_display_objective_packet::ClientboundSetDisplayObjectivePacket,
|
||||||
0x4e: clientbound_set_chunk_cache_center_packet::ClientboundSetChunkCacheCenterPacket,
|
0x4e: clientbound_set_entity_data_packet::ClientboundSetEntityDataPacket,
|
||||||
0x4f: clientbound_set_chunk_cache_radius_packet::ClientboundSetChunkCacheRadiusPacket,
|
0x4f: clientbound_set_entity_link_packet::ClientboundSetEntityLinkPacket,
|
||||||
0x50: clientbound_set_default_spawn_position_packet::ClientboundSetDefaultSpawnPositionPacket,
|
0x50: clientbound_set_entity_motion_packet::ClientboundSetEntityMotionPacket,
|
||||||
0x51: clientbound_set_display_objective_packet::ClientboundSetDisplayObjectivePacket,
|
0x51: clientbound_set_equipment_packet::ClientboundSetEquipmentPacket,
|
||||||
0x52: clientbound_set_entity_data_packet::ClientboundSetEntityDataPacket,
|
0x52: clientbound_set_experience_packet::ClientboundSetExperiencePacket,
|
||||||
0x53: clientbound_set_entity_link_packet::ClientboundSetEntityLinkPacket,
|
0x53: clientbound_set_health_packet::ClientboundSetHealthPacket,
|
||||||
0x54: clientbound_set_entity_motion_packet::ClientboundSetEntityMotionPacket,
|
0x54: clientbound_set_objective_packet::ClientboundSetObjectivePacket,
|
||||||
0x55: clientbound_set_equipment_packet::ClientboundSetEquipmentPacket,
|
0x55: clientbound_set_passengers_packet::ClientboundSetPassengersPacket,
|
||||||
0x56: clientbound_set_experience_packet::ClientboundSetExperiencePacket,
|
0x56: clientbound_set_player_team_packet::ClientboundSetPlayerTeamPacket,
|
||||||
0x57: clientbound_set_health_packet::ClientboundSetHealthPacket,
|
0x57: clientbound_set_score_packet::ClientboundSetScorePacket,
|
||||||
0x58: clientbound_set_objective_packet::ClientboundSetObjectivePacket,
|
0x58: clientbound_set_simulation_distance_packet::ClientboundSetSimulationDistancePacket,
|
||||||
0x59: clientbound_set_passengers_packet::ClientboundSetPassengersPacket,
|
0x59: clientbound_set_subtitle_text_packet::ClientboundSetSubtitleTextPacket,
|
||||||
0x5a: clientbound_set_player_team_packet::ClientboundSetPlayerTeamPacket,
|
0x5a: clientbound_set_time_packet::ClientboundSetTimePacket,
|
||||||
0x5b: clientbound_set_score_packet::ClientboundSetScorePacket,
|
0x5b: clientbound_set_title_text_packet::ClientboundSetTitleTextPacket,
|
||||||
0x5c: clientbound_set_simulation_distance_packet::ClientboundSetSimulationDistancePacket,
|
0x5c: clientbound_set_titles_animation_packet::ClientboundSetTitlesAnimationPacket,
|
||||||
0x5d: clientbound_set_subtitle_text_packet::ClientboundSetSubtitleTextPacket,
|
0x5d: clientbound_sound_entity_packet::ClientboundSoundEntityPacket,
|
||||||
0x5e: clientbound_set_time_packet::ClientboundSetTimePacket,
|
0x5e: clientbound_sound_packet::ClientboundSoundPacket,
|
||||||
0x5f: clientbound_set_title_text_packet::ClientboundSetTitleTextPacket,
|
0x5f: clientbound_stop_sound_packet::ClientboundStopSoundPacket,
|
||||||
0x60: clientbound_set_titles_animation_packet::ClientboundSetTitlesAnimationPacket,
|
0x60: clientbound_system_chat_packet::ClientboundSystemChatPacket,
|
||||||
0x61: clientbound_sound_entity_packet::ClientboundSoundEntityPacket,
|
0x61: clientbound_tab_list_packet::ClientboundTabListPacket,
|
||||||
0x62: clientbound_sound_packet::ClientboundSoundPacket,
|
0x62: clientbound_tag_query_packet::ClientboundTagQueryPacket,
|
||||||
0x63: clientbound_stop_sound_packet::ClientboundStopSoundPacket,
|
0x63: clientbound_take_item_entity_packet::ClientboundTakeItemEntityPacket,
|
||||||
0x64: clientbound_system_chat_packet::ClientboundSystemChatPacket,
|
0x64: clientbound_teleport_entity_packet::ClientboundTeleportEntityPacket,
|
||||||
0x65: clientbound_tab_list_packet::ClientboundTabListPacket,
|
0x65: clientbound_update_advancements_packet::ClientboundUpdateAdvancementsPacket,
|
||||||
0x66: clientbound_tag_query_packet::ClientboundTagQueryPacket,
|
0x66: clientbound_update_attributes_packet::ClientboundUpdateAttributesPacket,
|
||||||
0x67: clientbound_take_item_entity_packet::ClientboundTakeItemEntityPacket,
|
0x67: clientbound_update_enabled_features_packet::ClientboundUpdateEnabledFeaturesPacket,
|
||||||
0x68: clientbound_teleport_entity_packet::ClientboundTeleportEntityPacket,
|
0x68: clientbound_update_mob_effect_packet::ClientboundUpdateMobEffectPacket,
|
||||||
0x69: clientbound_update_advancements_packet::ClientboundUpdateAdvancementsPacket,
|
0x69: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket,
|
||||||
0x6a: clientbound_update_attributes_packet::ClientboundUpdateAttributesPacket,
|
0x6a: clientbound_update_tags_packet::ClientboundUpdateTagsPacket,
|
||||||
0x6b: clientbound_update_enabled_features_packet::ClientboundUpdateEnabledFeaturesPacket,
|
|
||||||
0x6c: clientbound_update_mob_effect_packet::ClientboundUpdateMobEffectPacket,
|
|
||||||
0x6d: clientbound_update_recipes_packet::ClientboundUpdateRecipesPacket,
|
|
||||||
0x6e: clientbound_update_tags_packet::ClientboundUpdateTagsPacket,
|
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
@ -10,7 +10,7 @@ use std::io::{Cursor, Write};
|
||||||
// TODO: rename the packet files to just like clientbound_add_entity instead of
|
// TODO: rename the packet files to just like clientbound_add_entity instead of
|
||||||
// clientbound_add_entity_packet
|
// clientbound_add_entity_packet
|
||||||
|
|
||||||
pub const PROTOCOL_VERSION: u32 = 762;
|
pub const PROTOCOL_VERSION: u32 = 761;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
|
||||||
pub enum ConnectionProtocol {
|
pub enum ConnectionProtocol {
|
||||||
|
|
|
@ -36,6 +36,10 @@ pub struct ClientboundStatusResponsePacket {
|
||||||
pub version: Version,
|
pub version: Version,
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
#[serde(rename = "previewsChat")]
|
||||||
|
pub previews_chat: Option<bool>,
|
||||||
|
#[serde(default)]
|
||||||
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
#[serde(rename = "enforcesSecureChat")]
|
#[serde(rename = "enforcesSecureChat")]
|
||||||
pub enforces_secure_chat: Option<bool>,
|
pub enforces_secure_chat: Option<bool>,
|
||||||
}
|
}
|
||||||
|
|
|
@ -257,3 +257,29 @@ where
|
||||||
|
|
||||||
Ok(packet)
|
Ok(packet)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::*;
|
||||||
|
use crate::packets::game::ClientboundGamePacket;
|
||||||
|
use std::io::Cursor;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_read_packet() {
|
||||||
|
let mut buf: Cursor<&[u8]> = Cursor::new(&[
|
||||||
|
56, 64, 85, 58, 141, 138, 71, 146, 193, 64, 88, 0, 0, 0, 0, 0, 0, 64, 60, 224, 105, 34,
|
||||||
|
119, 8, 228, 67, 50, 51, 68, 194, 177, 230, 101, 0, 17, 0,
|
||||||
|
]);
|
||||||
|
let packet = packet_decoder::<ClientboundGamePacket>(&mut buf).unwrap();
|
||||||
|
match &packet {
|
||||||
|
ClientboundGamePacket::PlayerPosition(p) => {
|
||||||
|
assert_eq!(p.id, 17);
|
||||||
|
assert_eq!(p.x, 84.91488892545296);
|
||||||
|
assert_eq!(p.y, 96.0);
|
||||||
|
assert_eq!(p.z, 28.876604227124417);
|
||||||
|
assert_eq!(p.dismount_vehicle, false);
|
||||||
|
}
|
||||||
|
_ => panic!("Wrong packet type"),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ pub async fn resolve_address(address: &ServerAddress) -> Result<SocketAddr, Reso
|
||||||
return Ok(SocketAddr::new(
|
return Ok(SocketAddr::new(
|
||||||
lookup_ip.iter().next().unwrap(),
|
lookup_ip.iter().next().unwrap(),
|
||||||
redirect_address.port,
|
redirect_address.port,
|
||||||
));
|
))
|
||||||
}
|
}
|
||||||
|
|
||||||
// debug!("redirecting to {:?}", redirect_address);
|
// debug!("redirecting to {:?}", redirect_address);
|
||||||
|
|
|
@ -164,7 +164,6 @@ enum Block {
|
||||||
BirchPlanks => "minecraft:birch_planks",
|
BirchPlanks => "minecraft:birch_planks",
|
||||||
JunglePlanks => "minecraft:jungle_planks",
|
JunglePlanks => "minecraft:jungle_planks",
|
||||||
AcaciaPlanks => "minecraft:acacia_planks",
|
AcaciaPlanks => "minecraft:acacia_planks",
|
||||||
CherryPlanks => "minecraft:cherry_planks",
|
|
||||||
DarkOakPlanks => "minecraft:dark_oak_planks",
|
DarkOakPlanks => "minecraft:dark_oak_planks",
|
||||||
MangrovePlanks => "minecraft:mangrove_planks",
|
MangrovePlanks => "minecraft:mangrove_planks",
|
||||||
BambooPlanks => "minecraft:bamboo_planks",
|
BambooPlanks => "minecraft:bamboo_planks",
|
||||||
|
@ -174,14 +173,12 @@ enum Block {
|
||||||
BirchSapling => "minecraft:birch_sapling",
|
BirchSapling => "minecraft:birch_sapling",
|
||||||
JungleSapling => "minecraft:jungle_sapling",
|
JungleSapling => "minecraft:jungle_sapling",
|
||||||
AcaciaSapling => "minecraft:acacia_sapling",
|
AcaciaSapling => "minecraft:acacia_sapling",
|
||||||
CherrySapling => "minecraft:cherry_sapling",
|
|
||||||
DarkOakSapling => "minecraft:dark_oak_sapling",
|
DarkOakSapling => "minecraft:dark_oak_sapling",
|
||||||
MangrovePropagule => "minecraft:mangrove_propagule",
|
MangrovePropagule => "minecraft:mangrove_propagule",
|
||||||
Bedrock => "minecraft:bedrock",
|
Bedrock => "minecraft:bedrock",
|
||||||
Water => "minecraft:water",
|
Water => "minecraft:water",
|
||||||
Lava => "minecraft:lava",
|
Lava => "minecraft:lava",
|
||||||
Sand => "minecraft:sand",
|
Sand => "minecraft:sand",
|
||||||
SuspiciousSand => "minecraft:suspicious_sand",
|
|
||||||
RedSand => "minecraft:red_sand",
|
RedSand => "minecraft:red_sand",
|
||||||
Gravel => "minecraft:gravel",
|
Gravel => "minecraft:gravel",
|
||||||
GoldOre => "minecraft:gold_ore",
|
GoldOre => "minecraft:gold_ore",
|
||||||
|
@ -196,7 +193,6 @@ enum Block {
|
||||||
BirchLog => "minecraft:birch_log",
|
BirchLog => "minecraft:birch_log",
|
||||||
JungleLog => "minecraft:jungle_log",
|
JungleLog => "minecraft:jungle_log",
|
||||||
AcaciaLog => "minecraft:acacia_log",
|
AcaciaLog => "minecraft:acacia_log",
|
||||||
CherryLog => "minecraft:cherry_log",
|
|
||||||
DarkOakLog => "minecraft:dark_oak_log",
|
DarkOakLog => "minecraft:dark_oak_log",
|
||||||
MangroveLog => "minecraft:mangrove_log",
|
MangroveLog => "minecraft:mangrove_log",
|
||||||
MangroveRoots => "minecraft:mangrove_roots",
|
MangroveRoots => "minecraft:mangrove_roots",
|
||||||
|
@ -206,7 +202,6 @@ enum Block {
|
||||||
StrippedBirchLog => "minecraft:stripped_birch_log",
|
StrippedBirchLog => "minecraft:stripped_birch_log",
|
||||||
StrippedJungleLog => "minecraft:stripped_jungle_log",
|
StrippedJungleLog => "minecraft:stripped_jungle_log",
|
||||||
StrippedAcaciaLog => "minecraft:stripped_acacia_log",
|
StrippedAcaciaLog => "minecraft:stripped_acacia_log",
|
||||||
StrippedCherryLog => "minecraft:stripped_cherry_log",
|
|
||||||
StrippedDarkOakLog => "minecraft:stripped_dark_oak_log",
|
StrippedDarkOakLog => "minecraft:stripped_dark_oak_log",
|
||||||
StrippedOakLog => "minecraft:stripped_oak_log",
|
StrippedOakLog => "minecraft:stripped_oak_log",
|
||||||
StrippedMangroveLog => "minecraft:stripped_mangrove_log",
|
StrippedMangroveLog => "minecraft:stripped_mangrove_log",
|
||||||
|
@ -216,7 +211,6 @@ enum Block {
|
||||||
BirchWood => "minecraft:birch_wood",
|
BirchWood => "minecraft:birch_wood",
|
||||||
JungleWood => "minecraft:jungle_wood",
|
JungleWood => "minecraft:jungle_wood",
|
||||||
AcaciaWood => "minecraft:acacia_wood",
|
AcaciaWood => "minecraft:acacia_wood",
|
||||||
CherryWood => "minecraft:cherry_wood",
|
|
||||||
DarkOakWood => "minecraft:dark_oak_wood",
|
DarkOakWood => "minecraft:dark_oak_wood",
|
||||||
MangroveWood => "minecraft:mangrove_wood",
|
MangroveWood => "minecraft:mangrove_wood",
|
||||||
StrippedOakWood => "minecraft:stripped_oak_wood",
|
StrippedOakWood => "minecraft:stripped_oak_wood",
|
||||||
|
@ -224,7 +218,6 @@ enum Block {
|
||||||
StrippedBirchWood => "minecraft:stripped_birch_wood",
|
StrippedBirchWood => "minecraft:stripped_birch_wood",
|
||||||
StrippedJungleWood => "minecraft:stripped_jungle_wood",
|
StrippedJungleWood => "minecraft:stripped_jungle_wood",
|
||||||
StrippedAcaciaWood => "minecraft:stripped_acacia_wood",
|
StrippedAcaciaWood => "minecraft:stripped_acacia_wood",
|
||||||
StrippedCherryWood => "minecraft:stripped_cherry_wood",
|
|
||||||
StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood",
|
StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood",
|
||||||
StrippedMangroveWood => "minecraft:stripped_mangrove_wood",
|
StrippedMangroveWood => "minecraft:stripped_mangrove_wood",
|
||||||
OakLeaves => "minecraft:oak_leaves",
|
OakLeaves => "minecraft:oak_leaves",
|
||||||
|
@ -232,7 +225,6 @@ enum Block {
|
||||||
BirchLeaves => "minecraft:birch_leaves",
|
BirchLeaves => "minecraft:birch_leaves",
|
||||||
JungleLeaves => "minecraft:jungle_leaves",
|
JungleLeaves => "minecraft:jungle_leaves",
|
||||||
AcaciaLeaves => "minecraft:acacia_leaves",
|
AcaciaLeaves => "minecraft:acacia_leaves",
|
||||||
CherryLeaves => "minecraft:cherry_leaves",
|
|
||||||
DarkOakLeaves => "minecraft:dark_oak_leaves",
|
DarkOakLeaves => "minecraft:dark_oak_leaves",
|
||||||
MangroveLeaves => "minecraft:mangrove_leaves",
|
MangroveLeaves => "minecraft:mangrove_leaves",
|
||||||
AzaleaLeaves => "minecraft:azalea_leaves",
|
AzaleaLeaves => "minecraft:azalea_leaves",
|
||||||
|
@ -293,7 +285,6 @@ enum Block {
|
||||||
BlackWool => "minecraft:black_wool",
|
BlackWool => "minecraft:black_wool",
|
||||||
MovingPiston => "minecraft:moving_piston",
|
MovingPiston => "minecraft:moving_piston",
|
||||||
Dandelion => "minecraft:dandelion",
|
Dandelion => "minecraft:dandelion",
|
||||||
Torchflower => "minecraft:torchflower",
|
|
||||||
Poppy => "minecraft:poppy",
|
Poppy => "minecraft:poppy",
|
||||||
BlueOrchid => "minecraft:blue_orchid",
|
BlueOrchid => "minecraft:blue_orchid",
|
||||||
Allium => "minecraft:allium",
|
Allium => "minecraft:allium",
|
||||||
|
@ -335,7 +326,6 @@ enum Block {
|
||||||
SpruceSign => "minecraft:spruce_sign",
|
SpruceSign => "minecraft:spruce_sign",
|
||||||
BirchSign => "minecraft:birch_sign",
|
BirchSign => "minecraft:birch_sign",
|
||||||
AcaciaSign => "minecraft:acacia_sign",
|
AcaciaSign => "minecraft:acacia_sign",
|
||||||
CherrySign => "minecraft:cherry_sign",
|
|
||||||
JungleSign => "minecraft:jungle_sign",
|
JungleSign => "minecraft:jungle_sign",
|
||||||
DarkOakSign => "minecraft:dark_oak_sign",
|
DarkOakSign => "minecraft:dark_oak_sign",
|
||||||
MangroveSign => "minecraft:mangrove_sign",
|
MangroveSign => "minecraft:mangrove_sign",
|
||||||
|
@ -348,7 +338,6 @@ enum Block {
|
||||||
SpruceWallSign => "minecraft:spruce_wall_sign",
|
SpruceWallSign => "minecraft:spruce_wall_sign",
|
||||||
BirchWallSign => "minecraft:birch_wall_sign",
|
BirchWallSign => "minecraft:birch_wall_sign",
|
||||||
AcaciaWallSign => "minecraft:acacia_wall_sign",
|
AcaciaWallSign => "minecraft:acacia_wall_sign",
|
||||||
CherryWallSign => "minecraft:cherry_wall_sign",
|
|
||||||
JungleWallSign => "minecraft:jungle_wall_sign",
|
JungleWallSign => "minecraft:jungle_wall_sign",
|
||||||
DarkOakWallSign => "minecraft:dark_oak_wall_sign",
|
DarkOakWallSign => "minecraft:dark_oak_wall_sign",
|
||||||
MangroveWallSign => "minecraft:mangrove_wall_sign",
|
MangroveWallSign => "minecraft:mangrove_wall_sign",
|
||||||
|
@ -357,7 +346,6 @@ enum Block {
|
||||||
SpruceHangingSign => "minecraft:spruce_hanging_sign",
|
SpruceHangingSign => "minecraft:spruce_hanging_sign",
|
||||||
BirchHangingSign => "minecraft:birch_hanging_sign",
|
BirchHangingSign => "minecraft:birch_hanging_sign",
|
||||||
AcaciaHangingSign => "minecraft:acacia_hanging_sign",
|
AcaciaHangingSign => "minecraft:acacia_hanging_sign",
|
||||||
CherryHangingSign => "minecraft:cherry_hanging_sign",
|
|
||||||
JungleHangingSign => "minecraft:jungle_hanging_sign",
|
JungleHangingSign => "minecraft:jungle_hanging_sign",
|
||||||
DarkOakHangingSign => "minecraft:dark_oak_hanging_sign",
|
DarkOakHangingSign => "minecraft:dark_oak_hanging_sign",
|
||||||
CrimsonHangingSign => "minecraft:crimson_hanging_sign",
|
CrimsonHangingSign => "minecraft:crimson_hanging_sign",
|
||||||
|
@ -368,7 +356,6 @@ enum Block {
|
||||||
SpruceWallHangingSign => "minecraft:spruce_wall_hanging_sign",
|
SpruceWallHangingSign => "minecraft:spruce_wall_hanging_sign",
|
||||||
BirchWallHangingSign => "minecraft:birch_wall_hanging_sign",
|
BirchWallHangingSign => "minecraft:birch_wall_hanging_sign",
|
||||||
AcaciaWallHangingSign => "minecraft:acacia_wall_hanging_sign",
|
AcaciaWallHangingSign => "minecraft:acacia_wall_hanging_sign",
|
||||||
CherryWallHangingSign => "minecraft:cherry_wall_hanging_sign",
|
|
||||||
JungleWallHangingSign => "minecraft:jungle_wall_hanging_sign",
|
JungleWallHangingSign => "minecraft:jungle_wall_hanging_sign",
|
||||||
DarkOakWallHangingSign => "minecraft:dark_oak_wall_hanging_sign",
|
DarkOakWallHangingSign => "minecraft:dark_oak_wall_hanging_sign",
|
||||||
MangroveWallHangingSign => "minecraft:mangrove_wall_hanging_sign",
|
MangroveWallHangingSign => "minecraft:mangrove_wall_hanging_sign",
|
||||||
|
@ -383,7 +370,6 @@ enum Block {
|
||||||
BirchPressurePlate => "minecraft:birch_pressure_plate",
|
BirchPressurePlate => "minecraft:birch_pressure_plate",
|
||||||
JunglePressurePlate => "minecraft:jungle_pressure_plate",
|
JunglePressurePlate => "minecraft:jungle_pressure_plate",
|
||||||
AcaciaPressurePlate => "minecraft:acacia_pressure_plate",
|
AcaciaPressurePlate => "minecraft:acacia_pressure_plate",
|
||||||
CherryPressurePlate => "minecraft:cherry_pressure_plate",
|
|
||||||
DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate",
|
DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate",
|
||||||
MangrovePressurePlate => "minecraft:mangrove_pressure_plate",
|
MangrovePressurePlate => "minecraft:mangrove_pressure_plate",
|
||||||
BambooPressurePlate => "minecraft:bamboo_pressure_plate",
|
BambooPressurePlate => "minecraft:bamboo_pressure_plate",
|
||||||
|
@ -435,7 +421,6 @@ enum Block {
|
||||||
BirchTrapdoor => "minecraft:birch_trapdoor",
|
BirchTrapdoor => "minecraft:birch_trapdoor",
|
||||||
JungleTrapdoor => "minecraft:jungle_trapdoor",
|
JungleTrapdoor => "minecraft:jungle_trapdoor",
|
||||||
AcaciaTrapdoor => "minecraft:acacia_trapdoor",
|
AcaciaTrapdoor => "minecraft:acacia_trapdoor",
|
||||||
CherryTrapdoor => "minecraft:cherry_trapdoor",
|
|
||||||
DarkOakTrapdoor => "minecraft:dark_oak_trapdoor",
|
DarkOakTrapdoor => "minecraft:dark_oak_trapdoor",
|
||||||
MangroveTrapdoor => "minecraft:mangrove_trapdoor",
|
MangroveTrapdoor => "minecraft:mangrove_trapdoor",
|
||||||
BambooTrapdoor => "minecraft:bamboo_trapdoor",
|
BambooTrapdoor => "minecraft:bamboo_trapdoor",
|
||||||
|
@ -501,13 +486,11 @@ enum Block {
|
||||||
CobblestoneWall => "minecraft:cobblestone_wall",
|
CobblestoneWall => "minecraft:cobblestone_wall",
|
||||||
MossyCobblestoneWall => "minecraft:mossy_cobblestone_wall",
|
MossyCobblestoneWall => "minecraft:mossy_cobblestone_wall",
|
||||||
FlowerPot => "minecraft:flower_pot",
|
FlowerPot => "minecraft:flower_pot",
|
||||||
PottedTorchflower => "minecraft:potted_torchflower",
|
|
||||||
PottedOakSapling => "minecraft:potted_oak_sapling",
|
PottedOakSapling => "minecraft:potted_oak_sapling",
|
||||||
PottedSpruceSapling => "minecraft:potted_spruce_sapling",
|
PottedSpruceSapling => "minecraft:potted_spruce_sapling",
|
||||||
PottedBirchSapling => "minecraft:potted_birch_sapling",
|
PottedBirchSapling => "minecraft:potted_birch_sapling",
|
||||||
PottedJungleSapling => "minecraft:potted_jungle_sapling",
|
PottedJungleSapling => "minecraft:potted_jungle_sapling",
|
||||||
PottedAcaciaSapling => "minecraft:potted_acacia_sapling",
|
PottedAcaciaSapling => "minecraft:potted_acacia_sapling",
|
||||||
PottedCherrySapling => "minecraft:potted_cherry_sapling",
|
|
||||||
PottedDarkOakSapling => "minecraft:potted_dark_oak_sapling",
|
PottedDarkOakSapling => "minecraft:potted_dark_oak_sapling",
|
||||||
PottedMangrovePropagule => "minecraft:potted_mangrove_propagule",
|
PottedMangrovePropagule => "minecraft:potted_mangrove_propagule",
|
||||||
PottedFern => "minecraft:potted_fern",
|
PottedFern => "minecraft:potted_fern",
|
||||||
|
@ -535,7 +518,6 @@ enum Block {
|
||||||
BirchButton => "minecraft:birch_button",
|
BirchButton => "minecraft:birch_button",
|
||||||
JungleButton => "minecraft:jungle_button",
|
JungleButton => "minecraft:jungle_button",
|
||||||
AcaciaButton => "minecraft:acacia_button",
|
AcaciaButton => "minecraft:acacia_button",
|
||||||
CherryButton => "minecraft:cherry_button",
|
|
||||||
DarkOakButton => "minecraft:dark_oak_button",
|
DarkOakButton => "minecraft:dark_oak_button",
|
||||||
MangroveButton => "minecraft:mangrove_button",
|
MangroveButton => "minecraft:mangrove_button",
|
||||||
BambooButton => "minecraft:bamboo_button",
|
BambooButton => "minecraft:bamboo_button",
|
||||||
|
@ -603,7 +585,6 @@ enum Block {
|
||||||
RedStainedGlassPane => "minecraft:red_stained_glass_pane",
|
RedStainedGlassPane => "minecraft:red_stained_glass_pane",
|
||||||
BlackStainedGlassPane => "minecraft:black_stained_glass_pane",
|
BlackStainedGlassPane => "minecraft:black_stained_glass_pane",
|
||||||
AcaciaStairs => "minecraft:acacia_stairs",
|
AcaciaStairs => "minecraft:acacia_stairs",
|
||||||
CherryStairs => "minecraft:cherry_stairs",
|
|
||||||
DarkOakStairs => "minecraft:dark_oak_stairs",
|
DarkOakStairs => "minecraft:dark_oak_stairs",
|
||||||
MangroveStairs => "minecraft:mangrove_stairs",
|
MangroveStairs => "minecraft:mangrove_stairs",
|
||||||
BambooStairs => "minecraft:bamboo_stairs",
|
BambooStairs => "minecraft:bamboo_stairs",
|
||||||
|
@ -689,7 +670,6 @@ enum Block {
|
||||||
BirchSlab => "minecraft:birch_slab",
|
BirchSlab => "minecraft:birch_slab",
|
||||||
JungleSlab => "minecraft:jungle_slab",
|
JungleSlab => "minecraft:jungle_slab",
|
||||||
AcaciaSlab => "minecraft:acacia_slab",
|
AcaciaSlab => "minecraft:acacia_slab",
|
||||||
CherrySlab => "minecraft:cherry_slab",
|
|
||||||
DarkOakSlab => "minecraft:dark_oak_slab",
|
DarkOakSlab => "minecraft:dark_oak_slab",
|
||||||
MangroveSlab => "minecraft:mangrove_slab",
|
MangroveSlab => "minecraft:mangrove_slab",
|
||||||
BambooSlab => "minecraft:bamboo_slab",
|
BambooSlab => "minecraft:bamboo_slab",
|
||||||
|
@ -716,7 +696,6 @@ enum Block {
|
||||||
BirchFenceGate => "minecraft:birch_fence_gate",
|
BirchFenceGate => "minecraft:birch_fence_gate",
|
||||||
JungleFenceGate => "minecraft:jungle_fence_gate",
|
JungleFenceGate => "minecraft:jungle_fence_gate",
|
||||||
AcaciaFenceGate => "minecraft:acacia_fence_gate",
|
AcaciaFenceGate => "minecraft:acacia_fence_gate",
|
||||||
CherryFenceGate => "minecraft:cherry_fence_gate",
|
|
||||||
DarkOakFenceGate => "minecraft:dark_oak_fence_gate",
|
DarkOakFenceGate => "minecraft:dark_oak_fence_gate",
|
||||||
MangroveFenceGate => "minecraft:mangrove_fence_gate",
|
MangroveFenceGate => "minecraft:mangrove_fence_gate",
|
||||||
BambooFenceGate => "minecraft:bamboo_fence_gate",
|
BambooFenceGate => "minecraft:bamboo_fence_gate",
|
||||||
|
@ -724,7 +703,6 @@ enum Block {
|
||||||
BirchFence => "minecraft:birch_fence",
|
BirchFence => "minecraft:birch_fence",
|
||||||
JungleFence => "minecraft:jungle_fence",
|
JungleFence => "minecraft:jungle_fence",
|
||||||
AcaciaFence => "minecraft:acacia_fence",
|
AcaciaFence => "minecraft:acacia_fence",
|
||||||
CherryFence => "minecraft:cherry_fence",
|
|
||||||
DarkOakFence => "minecraft:dark_oak_fence",
|
DarkOakFence => "minecraft:dark_oak_fence",
|
||||||
MangroveFence => "minecraft:mangrove_fence",
|
MangroveFence => "minecraft:mangrove_fence",
|
||||||
BambooFence => "minecraft:bamboo_fence",
|
BambooFence => "minecraft:bamboo_fence",
|
||||||
|
@ -732,7 +710,6 @@ enum Block {
|
||||||
BirchDoor => "minecraft:birch_door",
|
BirchDoor => "minecraft:birch_door",
|
||||||
JungleDoor => "minecraft:jungle_door",
|
JungleDoor => "minecraft:jungle_door",
|
||||||
AcaciaDoor => "minecraft:acacia_door",
|
AcaciaDoor => "minecraft:acacia_door",
|
||||||
CherryDoor => "minecraft:cherry_door",
|
|
||||||
DarkOakDoor => "minecraft:dark_oak_door",
|
DarkOakDoor => "minecraft:dark_oak_door",
|
||||||
MangroveDoor => "minecraft:mangrove_door",
|
MangroveDoor => "minecraft:mangrove_door",
|
||||||
BambooDoor => "minecraft:bamboo_door",
|
BambooDoor => "minecraft:bamboo_door",
|
||||||
|
@ -743,7 +720,6 @@ enum Block {
|
||||||
PurpurPillar => "minecraft:purpur_pillar",
|
PurpurPillar => "minecraft:purpur_pillar",
|
||||||
PurpurStairs => "minecraft:purpur_stairs",
|
PurpurStairs => "minecraft:purpur_stairs",
|
||||||
EndStoneBricks => "minecraft:end_stone_bricks",
|
EndStoneBricks => "minecraft:end_stone_bricks",
|
||||||
TorchflowerCrop => "minecraft:torchflower_crop",
|
|
||||||
Beetroots => "minecraft:beetroots",
|
Beetroots => "minecraft:beetroots",
|
||||||
DirtPath => "minecraft:dirt_path",
|
DirtPath => "minecraft:dirt_path",
|
||||||
EndGateway => "minecraft:end_gateway",
|
EndGateway => "minecraft:end_gateway",
|
||||||
|
@ -1103,7 +1079,6 @@ enum Block {
|
||||||
Azalea => "minecraft:azalea",
|
Azalea => "minecraft:azalea",
|
||||||
FloweringAzalea => "minecraft:flowering_azalea",
|
FloweringAzalea => "minecraft:flowering_azalea",
|
||||||
MossCarpet => "minecraft:moss_carpet",
|
MossCarpet => "minecraft:moss_carpet",
|
||||||
PinkPetals => "minecraft:pink_petals",
|
|
||||||
MossBlock => "minecraft:moss_block",
|
MossBlock => "minecraft:moss_block",
|
||||||
BigDripleaf => "minecraft:big_dripleaf",
|
BigDripleaf => "minecraft:big_dripleaf",
|
||||||
BigDripleafStem => "minecraft:big_dripleaf_stem",
|
BigDripleafStem => "minecraft:big_dripleaf_stem",
|
||||||
|
@ -1143,7 +1118,6 @@ enum Block {
|
||||||
PearlescentFroglight => "minecraft:pearlescent_froglight",
|
PearlescentFroglight => "minecraft:pearlescent_froglight",
|
||||||
Frogspawn => "minecraft:frogspawn",
|
Frogspawn => "minecraft:frogspawn",
|
||||||
ReinforcedDeepslate => "minecraft:reinforced_deepslate",
|
ReinforcedDeepslate => "minecraft:reinforced_deepslate",
|
||||||
DecoratedPot => "minecraft:decorated_pot",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1190,8 +1164,6 @@ enum BlockEntityKind {
|
||||||
SculkCatalyst => "minecraft:sculk_catalyst",
|
SculkCatalyst => "minecraft:sculk_catalyst",
|
||||||
SculkShrieker => "minecraft:sculk_shrieker",
|
SculkShrieker => "minecraft:sculk_shrieker",
|
||||||
ChiseledBookshelf => "minecraft:chiseled_bookshelf",
|
ChiseledBookshelf => "minecraft:chiseled_bookshelf",
|
||||||
SuspiciousSand => "minecraft:suspicious_sand",
|
|
||||||
DecoratedPot => "minecraft:decorated_pot",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1295,7 +1267,6 @@ enum CommandArgumentKind {
|
||||||
ResourceKey => "minecraft:resource_key",
|
ResourceKey => "minecraft:resource_key",
|
||||||
TemplateMirror => "minecraft:template_mirror",
|
TemplateMirror => "minecraft:template_mirror",
|
||||||
TemplateRotation => "minecraft:template_rotation",
|
TemplateRotation => "minecraft:template_rotation",
|
||||||
Heightmap => "minecraft:heightmap",
|
|
||||||
Uuid => "minecraft:uuid",
|
Uuid => "minecraft:uuid",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1435,39 +1406,32 @@ enum EntityKind {
|
||||||
Bat => "minecraft:bat",
|
Bat => "minecraft:bat",
|
||||||
Bee => "minecraft:bee",
|
Bee => "minecraft:bee",
|
||||||
Blaze => "minecraft:blaze",
|
Blaze => "minecraft:blaze",
|
||||||
BlockDisplay => "minecraft:block_display",
|
|
||||||
Boat => "minecraft:boat",
|
Boat => "minecraft:boat",
|
||||||
Camel => "minecraft:camel",
|
|
||||||
Cat => "minecraft:cat",
|
|
||||||
CaveSpider => "minecraft:cave_spider",
|
|
||||||
ChestBoat => "minecraft:chest_boat",
|
ChestBoat => "minecraft:chest_boat",
|
||||||
ChestMinecart => "minecraft:chest_minecart",
|
Cat => "minecraft:cat",
|
||||||
|
Camel => "minecraft:camel",
|
||||||
|
CaveSpider => "minecraft:cave_spider",
|
||||||
Chicken => "minecraft:chicken",
|
Chicken => "minecraft:chicken",
|
||||||
Cod => "minecraft:cod",
|
Cod => "minecraft:cod",
|
||||||
CommandBlockMinecart => "minecraft:command_block_minecart",
|
|
||||||
Cow => "minecraft:cow",
|
Cow => "minecraft:cow",
|
||||||
Creeper => "minecraft:creeper",
|
Creeper => "minecraft:creeper",
|
||||||
Dolphin => "minecraft:dolphin",
|
Dolphin => "minecraft:dolphin",
|
||||||
Donkey => "minecraft:donkey",
|
Donkey => "minecraft:donkey",
|
||||||
DragonFireball => "minecraft:dragon_fireball",
|
DragonFireball => "minecraft:dragon_fireball",
|
||||||
Drowned => "minecraft:drowned",
|
Drowned => "minecraft:drowned",
|
||||||
Egg => "minecraft:egg",
|
|
||||||
ElderGuardian => "minecraft:elder_guardian",
|
ElderGuardian => "minecraft:elder_guardian",
|
||||||
EndCrystal => "minecraft:end_crystal",
|
EndCrystal => "minecraft:end_crystal",
|
||||||
EnderDragon => "minecraft:ender_dragon",
|
EnderDragon => "minecraft:ender_dragon",
|
||||||
EnderPearl => "minecraft:ender_pearl",
|
|
||||||
Enderman => "minecraft:enderman",
|
Enderman => "minecraft:enderman",
|
||||||
Endermite => "minecraft:endermite",
|
Endermite => "minecraft:endermite",
|
||||||
Evoker => "minecraft:evoker",
|
Evoker => "minecraft:evoker",
|
||||||
EvokerFangs => "minecraft:evoker_fangs",
|
EvokerFangs => "minecraft:evoker_fangs",
|
||||||
ExperienceBottle => "minecraft:experience_bottle",
|
|
||||||
ExperienceOrb => "minecraft:experience_orb",
|
ExperienceOrb => "minecraft:experience_orb",
|
||||||
EyeOfEnder => "minecraft:eye_of_ender",
|
EyeOfEnder => "minecraft:eye_of_ender",
|
||||||
FallingBlock => "minecraft:falling_block",
|
FallingBlock => "minecraft:falling_block",
|
||||||
FireworkRocket => "minecraft:firework_rocket",
|
FireworkRocket => "minecraft:firework_rocket",
|
||||||
Fox => "minecraft:fox",
|
Fox => "minecraft:fox",
|
||||||
Frog => "minecraft:frog",
|
Frog => "minecraft:frog",
|
||||||
FurnaceMinecart => "minecraft:furnace_minecart",
|
|
||||||
Ghast => "minecraft:ghast",
|
Ghast => "minecraft:ghast",
|
||||||
Giant => "minecraft:giant",
|
Giant => "minecraft:giant",
|
||||||
GlowItemFrame => "minecraft:glow_item_frame",
|
GlowItemFrame => "minecraft:glow_item_frame",
|
||||||
|
@ -1475,14 +1439,11 @@ enum EntityKind {
|
||||||
Goat => "minecraft:goat",
|
Goat => "minecraft:goat",
|
||||||
Guardian => "minecraft:guardian",
|
Guardian => "minecraft:guardian",
|
||||||
Hoglin => "minecraft:hoglin",
|
Hoglin => "minecraft:hoglin",
|
||||||
HopperMinecart => "minecraft:hopper_minecart",
|
|
||||||
Horse => "minecraft:horse",
|
Horse => "minecraft:horse",
|
||||||
Husk => "minecraft:husk",
|
Husk => "minecraft:husk",
|
||||||
Illusioner => "minecraft:illusioner",
|
Illusioner => "minecraft:illusioner",
|
||||||
Interaction => "minecraft:interaction",
|
|
||||||
IronGolem => "minecraft:iron_golem",
|
IronGolem => "minecraft:iron_golem",
|
||||||
Item => "minecraft:item",
|
Item => "minecraft:item",
|
||||||
ItemDisplay => "minecraft:item_display",
|
|
||||||
ItemFrame => "minecraft:item_frame",
|
ItemFrame => "minecraft:item_frame",
|
||||||
Fireball => "minecraft:fireball",
|
Fireball => "minecraft:fireball",
|
||||||
LeashKnot => "minecraft:leash_knot",
|
LeashKnot => "minecraft:leash_knot",
|
||||||
|
@ -1492,8 +1453,14 @@ enum EntityKind {
|
||||||
MagmaCube => "minecraft:magma_cube",
|
MagmaCube => "minecraft:magma_cube",
|
||||||
Marker => "minecraft:marker",
|
Marker => "minecraft:marker",
|
||||||
Minecart => "minecraft:minecart",
|
Minecart => "minecraft:minecart",
|
||||||
Mooshroom => "minecraft:mooshroom",
|
ChestMinecart => "minecraft:chest_minecart",
|
||||||
|
CommandBlockMinecart => "minecraft:command_block_minecart",
|
||||||
|
FurnaceMinecart => "minecraft:furnace_minecart",
|
||||||
|
HopperMinecart => "minecraft:hopper_minecart",
|
||||||
|
SpawnerMinecart => "minecraft:spawner_minecart",
|
||||||
|
TntMinecart => "minecraft:tnt_minecart",
|
||||||
Mule => "minecraft:mule",
|
Mule => "minecraft:mule",
|
||||||
|
Mooshroom => "minecraft:mooshroom",
|
||||||
Ocelot => "minecraft:ocelot",
|
Ocelot => "minecraft:ocelot",
|
||||||
Painting => "minecraft:painting",
|
Painting => "minecraft:painting",
|
||||||
Panda => "minecraft:panda",
|
Panda => "minecraft:panda",
|
||||||
|
@ -1504,7 +1471,7 @@ enum EntityKind {
|
||||||
PiglinBrute => "minecraft:piglin_brute",
|
PiglinBrute => "minecraft:piglin_brute",
|
||||||
Pillager => "minecraft:pillager",
|
Pillager => "minecraft:pillager",
|
||||||
PolarBear => "minecraft:polar_bear",
|
PolarBear => "minecraft:polar_bear",
|
||||||
Potion => "minecraft:potion",
|
Tnt => "minecraft:tnt",
|
||||||
Pufferfish => "minecraft:pufferfish",
|
Pufferfish => "minecraft:pufferfish",
|
||||||
Rabbit => "minecraft:rabbit",
|
Rabbit => "minecraft:rabbit",
|
||||||
Ravager => "minecraft:ravager",
|
Ravager => "minecraft:ravager",
|
||||||
|
@ -1517,21 +1484,20 @@ enum EntityKind {
|
||||||
SkeletonHorse => "minecraft:skeleton_horse",
|
SkeletonHorse => "minecraft:skeleton_horse",
|
||||||
Slime => "minecraft:slime",
|
Slime => "minecraft:slime",
|
||||||
SmallFireball => "minecraft:small_fireball",
|
SmallFireball => "minecraft:small_fireball",
|
||||||
Sniffer => "minecraft:sniffer",
|
|
||||||
SnowGolem => "minecraft:snow_golem",
|
SnowGolem => "minecraft:snow_golem",
|
||||||
Snowball => "minecraft:snowball",
|
Snowball => "minecraft:snowball",
|
||||||
SpawnerMinecart => "minecraft:spawner_minecart",
|
|
||||||
SpectralArrow => "minecraft:spectral_arrow",
|
SpectralArrow => "minecraft:spectral_arrow",
|
||||||
Spider => "minecraft:spider",
|
Spider => "minecraft:spider",
|
||||||
Squid => "minecraft:squid",
|
Squid => "minecraft:squid",
|
||||||
Stray => "minecraft:stray",
|
Stray => "minecraft:stray",
|
||||||
Strider => "minecraft:strider",
|
Strider => "minecraft:strider",
|
||||||
Tadpole => "minecraft:tadpole",
|
Tadpole => "minecraft:tadpole",
|
||||||
TextDisplay => "minecraft:text_display",
|
Egg => "minecraft:egg",
|
||||||
Tnt => "minecraft:tnt",
|
EnderPearl => "minecraft:ender_pearl",
|
||||||
TntMinecart => "minecraft:tnt_minecart",
|
ExperienceBottle => "minecraft:experience_bottle",
|
||||||
TraderLlama => "minecraft:trader_llama",
|
Potion => "minecraft:potion",
|
||||||
Trident => "minecraft:trident",
|
Trident => "minecraft:trident",
|
||||||
|
TraderLlama => "minecraft:trader_llama",
|
||||||
TropicalFish => "minecraft:tropical_fish",
|
TropicalFish => "minecraft:tropical_fish",
|
||||||
Turtle => "minecraft:turtle",
|
Turtle => "minecraft:turtle",
|
||||||
Vex => "minecraft:vex",
|
Vex => "minecraft:vex",
|
||||||
|
@ -1600,9 +1566,7 @@ enum GameEvent {
|
||||||
ElytraGlide => "minecraft:elytra_glide",
|
ElytraGlide => "minecraft:elytra_glide",
|
||||||
EntityDamage => "minecraft:entity_damage",
|
EntityDamage => "minecraft:entity_damage",
|
||||||
EntityDie => "minecraft:entity_die",
|
EntityDie => "minecraft:entity_die",
|
||||||
EntityDismount => "minecraft:entity_dismount",
|
|
||||||
EntityInteract => "minecraft:entity_interact",
|
EntityInteract => "minecraft:entity_interact",
|
||||||
EntityMount => "minecraft:entity_mount",
|
|
||||||
EntityPlace => "minecraft:entity_place",
|
EntityPlace => "minecraft:entity_place",
|
||||||
EntityRoar => "minecraft:entity_roar",
|
EntityRoar => "minecraft:entity_roar",
|
||||||
EntityShake => "minecraft:entity_shake",
|
EntityShake => "minecraft:entity_shake",
|
||||||
|
@ -1699,7 +1663,6 @@ enum Item {
|
||||||
BirchPlanks => "minecraft:birch_planks",
|
BirchPlanks => "minecraft:birch_planks",
|
||||||
JunglePlanks => "minecraft:jungle_planks",
|
JunglePlanks => "minecraft:jungle_planks",
|
||||||
AcaciaPlanks => "minecraft:acacia_planks",
|
AcaciaPlanks => "minecraft:acacia_planks",
|
||||||
CherryPlanks => "minecraft:cherry_planks",
|
|
||||||
DarkOakPlanks => "minecraft:dark_oak_planks",
|
DarkOakPlanks => "minecraft:dark_oak_planks",
|
||||||
MangrovePlanks => "minecraft:mangrove_planks",
|
MangrovePlanks => "minecraft:mangrove_planks",
|
||||||
BambooPlanks => "minecraft:bamboo_planks",
|
BambooPlanks => "minecraft:bamboo_planks",
|
||||||
|
@ -1711,12 +1674,10 @@ enum Item {
|
||||||
BirchSapling => "minecraft:birch_sapling",
|
BirchSapling => "minecraft:birch_sapling",
|
||||||
JungleSapling => "minecraft:jungle_sapling",
|
JungleSapling => "minecraft:jungle_sapling",
|
||||||
AcaciaSapling => "minecraft:acacia_sapling",
|
AcaciaSapling => "minecraft:acacia_sapling",
|
||||||
CherrySapling => "minecraft:cherry_sapling",
|
|
||||||
DarkOakSapling => "minecraft:dark_oak_sapling",
|
DarkOakSapling => "minecraft:dark_oak_sapling",
|
||||||
MangrovePropagule => "minecraft:mangrove_propagule",
|
MangrovePropagule => "minecraft:mangrove_propagule",
|
||||||
Bedrock => "minecraft:bedrock",
|
Bedrock => "minecraft:bedrock",
|
||||||
Sand => "minecraft:sand",
|
Sand => "minecraft:sand",
|
||||||
SuspiciousSand => "minecraft:suspicious_sand",
|
|
||||||
RedSand => "minecraft:red_sand",
|
RedSand => "minecraft:red_sand",
|
||||||
Gravel => "minecraft:gravel",
|
Gravel => "minecraft:gravel",
|
||||||
CoalOre => "minecraft:coal_ore",
|
CoalOre => "minecraft:coal_ore",
|
||||||
|
@ -1785,7 +1746,6 @@ enum Item {
|
||||||
BirchLog => "minecraft:birch_log",
|
BirchLog => "minecraft:birch_log",
|
||||||
JungleLog => "minecraft:jungle_log",
|
JungleLog => "minecraft:jungle_log",
|
||||||
AcaciaLog => "minecraft:acacia_log",
|
AcaciaLog => "minecraft:acacia_log",
|
||||||
CherryLog => "minecraft:cherry_log",
|
|
||||||
DarkOakLog => "minecraft:dark_oak_log",
|
DarkOakLog => "minecraft:dark_oak_log",
|
||||||
MangroveLog => "minecraft:mangrove_log",
|
MangroveLog => "minecraft:mangrove_log",
|
||||||
MangroveRoots => "minecraft:mangrove_roots",
|
MangroveRoots => "minecraft:mangrove_roots",
|
||||||
|
@ -1798,7 +1758,6 @@ enum Item {
|
||||||
StrippedBirchLog => "minecraft:stripped_birch_log",
|
StrippedBirchLog => "minecraft:stripped_birch_log",
|
||||||
StrippedJungleLog => "minecraft:stripped_jungle_log",
|
StrippedJungleLog => "minecraft:stripped_jungle_log",
|
||||||
StrippedAcaciaLog => "minecraft:stripped_acacia_log",
|
StrippedAcaciaLog => "minecraft:stripped_acacia_log",
|
||||||
StrippedCherryLog => "minecraft:stripped_cherry_log",
|
|
||||||
StrippedDarkOakLog => "minecraft:stripped_dark_oak_log",
|
StrippedDarkOakLog => "minecraft:stripped_dark_oak_log",
|
||||||
StrippedMangroveLog => "minecraft:stripped_mangrove_log",
|
StrippedMangroveLog => "minecraft:stripped_mangrove_log",
|
||||||
StrippedCrimsonStem => "minecraft:stripped_crimson_stem",
|
StrippedCrimsonStem => "minecraft:stripped_crimson_stem",
|
||||||
|
@ -1808,7 +1767,6 @@ enum Item {
|
||||||
StrippedBirchWood => "minecraft:stripped_birch_wood",
|
StrippedBirchWood => "minecraft:stripped_birch_wood",
|
||||||
StrippedJungleWood => "minecraft:stripped_jungle_wood",
|
StrippedJungleWood => "minecraft:stripped_jungle_wood",
|
||||||
StrippedAcaciaWood => "minecraft:stripped_acacia_wood",
|
StrippedAcaciaWood => "minecraft:stripped_acacia_wood",
|
||||||
StrippedCherryWood => "minecraft:stripped_cherry_wood",
|
|
||||||
StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood",
|
StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood",
|
||||||
StrippedMangroveWood => "minecraft:stripped_mangrove_wood",
|
StrippedMangroveWood => "minecraft:stripped_mangrove_wood",
|
||||||
StrippedCrimsonHyphae => "minecraft:stripped_crimson_hyphae",
|
StrippedCrimsonHyphae => "minecraft:stripped_crimson_hyphae",
|
||||||
|
@ -1819,7 +1777,6 @@ enum Item {
|
||||||
BirchWood => "minecraft:birch_wood",
|
BirchWood => "minecraft:birch_wood",
|
||||||
JungleWood => "minecraft:jungle_wood",
|
JungleWood => "minecraft:jungle_wood",
|
||||||
AcaciaWood => "minecraft:acacia_wood",
|
AcaciaWood => "minecraft:acacia_wood",
|
||||||
CherryWood => "minecraft:cherry_wood",
|
|
||||||
DarkOakWood => "minecraft:dark_oak_wood",
|
DarkOakWood => "minecraft:dark_oak_wood",
|
||||||
MangroveWood => "minecraft:mangrove_wood",
|
MangroveWood => "minecraft:mangrove_wood",
|
||||||
CrimsonHyphae => "minecraft:crimson_hyphae",
|
CrimsonHyphae => "minecraft:crimson_hyphae",
|
||||||
|
@ -1829,7 +1786,6 @@ enum Item {
|
||||||
BirchLeaves => "minecraft:birch_leaves",
|
BirchLeaves => "minecraft:birch_leaves",
|
||||||
JungleLeaves => "minecraft:jungle_leaves",
|
JungleLeaves => "minecraft:jungle_leaves",
|
||||||
AcaciaLeaves => "minecraft:acacia_leaves",
|
AcaciaLeaves => "minecraft:acacia_leaves",
|
||||||
CherryLeaves => "minecraft:cherry_leaves",
|
|
||||||
DarkOakLeaves => "minecraft:dark_oak_leaves",
|
DarkOakLeaves => "minecraft:dark_oak_leaves",
|
||||||
MangroveLeaves => "minecraft:mangrove_leaves",
|
MangroveLeaves => "minecraft:mangrove_leaves",
|
||||||
AzaleaLeaves => "minecraft:azalea_leaves",
|
AzaleaLeaves => "minecraft:azalea_leaves",
|
||||||
|
@ -1879,7 +1835,6 @@ enum Item {
|
||||||
Cornflower => "minecraft:cornflower",
|
Cornflower => "minecraft:cornflower",
|
||||||
LilyOfTheValley => "minecraft:lily_of_the_valley",
|
LilyOfTheValley => "minecraft:lily_of_the_valley",
|
||||||
WitherRose => "minecraft:wither_rose",
|
WitherRose => "minecraft:wither_rose",
|
||||||
Torchflower => "minecraft:torchflower",
|
|
||||||
SporeBlossom => "minecraft:spore_blossom",
|
SporeBlossom => "minecraft:spore_blossom",
|
||||||
BrownMushroom => "minecraft:brown_mushroom",
|
BrownMushroom => "minecraft:brown_mushroom",
|
||||||
RedMushroom => "minecraft:red_mushroom",
|
RedMushroom => "minecraft:red_mushroom",
|
||||||
|
@ -1893,7 +1848,6 @@ enum Item {
|
||||||
SugarCane => "minecraft:sugar_cane",
|
SugarCane => "minecraft:sugar_cane",
|
||||||
Kelp => "minecraft:kelp",
|
Kelp => "minecraft:kelp",
|
||||||
MossCarpet => "minecraft:moss_carpet",
|
MossCarpet => "minecraft:moss_carpet",
|
||||||
PinkPetals => "minecraft:pink_petals",
|
|
||||||
MossBlock => "minecraft:moss_block",
|
MossBlock => "minecraft:moss_block",
|
||||||
HangingRoots => "minecraft:hanging_roots",
|
HangingRoots => "minecraft:hanging_roots",
|
||||||
BigDripleaf => "minecraft:big_dripleaf",
|
BigDripleaf => "minecraft:big_dripleaf",
|
||||||
|
@ -1904,7 +1858,6 @@ enum Item {
|
||||||
BirchSlab => "minecraft:birch_slab",
|
BirchSlab => "minecraft:birch_slab",
|
||||||
JungleSlab => "minecraft:jungle_slab",
|
JungleSlab => "minecraft:jungle_slab",
|
||||||
AcaciaSlab => "minecraft:acacia_slab",
|
AcaciaSlab => "minecraft:acacia_slab",
|
||||||
CherrySlab => "minecraft:cherry_slab",
|
|
||||||
DarkOakSlab => "minecraft:dark_oak_slab",
|
DarkOakSlab => "minecraft:dark_oak_slab",
|
||||||
MangroveSlab => "minecraft:mangrove_slab",
|
MangroveSlab => "minecraft:mangrove_slab",
|
||||||
BambooSlab => "minecraft:bamboo_slab",
|
BambooSlab => "minecraft:bamboo_slab",
|
||||||
|
@ -1935,7 +1888,6 @@ enum Item {
|
||||||
Bricks => "minecraft:bricks",
|
Bricks => "minecraft:bricks",
|
||||||
Bookshelf => "minecraft:bookshelf",
|
Bookshelf => "minecraft:bookshelf",
|
||||||
ChiseledBookshelf => "minecraft:chiseled_bookshelf",
|
ChiseledBookshelf => "minecraft:chiseled_bookshelf",
|
||||||
DecoratedPot => "minecraft:decorated_pot",
|
|
||||||
MossyCobblestone => "minecraft:mossy_cobblestone",
|
MossyCobblestone => "minecraft:mossy_cobblestone",
|
||||||
Obsidian => "minecraft:obsidian",
|
Obsidian => "minecraft:obsidian",
|
||||||
Torch => "minecraft:torch",
|
Torch => "minecraft:torch",
|
||||||
|
@ -1963,7 +1915,6 @@ enum Item {
|
||||||
BirchFence => "minecraft:birch_fence",
|
BirchFence => "minecraft:birch_fence",
|
||||||
JungleFence => "minecraft:jungle_fence",
|
JungleFence => "minecraft:jungle_fence",
|
||||||
AcaciaFence => "minecraft:acacia_fence",
|
AcaciaFence => "minecraft:acacia_fence",
|
||||||
CherryFence => "minecraft:cherry_fence",
|
|
||||||
DarkOakFence => "minecraft:dark_oak_fence",
|
DarkOakFence => "minecraft:dark_oak_fence",
|
||||||
MangroveFence => "minecraft:mangrove_fence",
|
MangroveFence => "minecraft:mangrove_fence",
|
||||||
BambooFence => "minecraft:bamboo_fence",
|
BambooFence => "minecraft:bamboo_fence",
|
||||||
|
@ -2035,7 +1986,6 @@ enum Item {
|
||||||
BirchStairs => "minecraft:birch_stairs",
|
BirchStairs => "minecraft:birch_stairs",
|
||||||
JungleStairs => "minecraft:jungle_stairs",
|
JungleStairs => "minecraft:jungle_stairs",
|
||||||
AcaciaStairs => "minecraft:acacia_stairs",
|
AcaciaStairs => "minecraft:acacia_stairs",
|
||||||
CherryStairs => "minecraft:cherry_stairs",
|
|
||||||
DarkOakStairs => "minecraft:dark_oak_stairs",
|
DarkOakStairs => "minecraft:dark_oak_stairs",
|
||||||
MangroveStairs => "minecraft:mangrove_stairs",
|
MangroveStairs => "minecraft:mangrove_stairs",
|
||||||
BambooStairs => "minecraft:bamboo_stairs",
|
BambooStairs => "minecraft:bamboo_stairs",
|
||||||
|
@ -2334,7 +2284,6 @@ enum Item {
|
||||||
BirchButton => "minecraft:birch_button",
|
BirchButton => "minecraft:birch_button",
|
||||||
JungleButton => "minecraft:jungle_button",
|
JungleButton => "minecraft:jungle_button",
|
||||||
AcaciaButton => "minecraft:acacia_button",
|
AcaciaButton => "minecraft:acacia_button",
|
||||||
CherryButton => "minecraft:cherry_button",
|
|
||||||
DarkOakButton => "minecraft:dark_oak_button",
|
DarkOakButton => "minecraft:dark_oak_button",
|
||||||
MangroveButton => "minecraft:mangrove_button",
|
MangroveButton => "minecraft:mangrove_button",
|
||||||
BambooButton => "minecraft:bamboo_button",
|
BambooButton => "minecraft:bamboo_button",
|
||||||
|
@ -2349,7 +2298,6 @@ enum Item {
|
||||||
BirchPressurePlate => "minecraft:birch_pressure_plate",
|
BirchPressurePlate => "minecraft:birch_pressure_plate",
|
||||||
JunglePressurePlate => "minecraft:jungle_pressure_plate",
|
JunglePressurePlate => "minecraft:jungle_pressure_plate",
|
||||||
AcaciaPressurePlate => "minecraft:acacia_pressure_plate",
|
AcaciaPressurePlate => "minecraft:acacia_pressure_plate",
|
||||||
CherryPressurePlate => "minecraft:cherry_pressure_plate",
|
|
||||||
DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate",
|
DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate",
|
||||||
MangrovePressurePlate => "minecraft:mangrove_pressure_plate",
|
MangrovePressurePlate => "minecraft:mangrove_pressure_plate",
|
||||||
BambooPressurePlate => "minecraft:bamboo_pressure_plate",
|
BambooPressurePlate => "minecraft:bamboo_pressure_plate",
|
||||||
|
@ -2361,7 +2309,6 @@ enum Item {
|
||||||
BirchDoor => "minecraft:birch_door",
|
BirchDoor => "minecraft:birch_door",
|
||||||
JungleDoor => "minecraft:jungle_door",
|
JungleDoor => "minecraft:jungle_door",
|
||||||
AcaciaDoor => "minecraft:acacia_door",
|
AcaciaDoor => "minecraft:acacia_door",
|
||||||
CherryDoor => "minecraft:cherry_door",
|
|
||||||
DarkOakDoor => "minecraft:dark_oak_door",
|
DarkOakDoor => "minecraft:dark_oak_door",
|
||||||
MangroveDoor => "minecraft:mangrove_door",
|
MangroveDoor => "minecraft:mangrove_door",
|
||||||
BambooDoor => "minecraft:bamboo_door",
|
BambooDoor => "minecraft:bamboo_door",
|
||||||
|
@ -2373,7 +2320,6 @@ enum Item {
|
||||||
BirchTrapdoor => "minecraft:birch_trapdoor",
|
BirchTrapdoor => "minecraft:birch_trapdoor",
|
||||||
JungleTrapdoor => "minecraft:jungle_trapdoor",
|
JungleTrapdoor => "minecraft:jungle_trapdoor",
|
||||||
AcaciaTrapdoor => "minecraft:acacia_trapdoor",
|
AcaciaTrapdoor => "minecraft:acacia_trapdoor",
|
||||||
CherryTrapdoor => "minecraft:cherry_trapdoor",
|
|
||||||
DarkOakTrapdoor => "minecraft:dark_oak_trapdoor",
|
DarkOakTrapdoor => "minecraft:dark_oak_trapdoor",
|
||||||
MangroveTrapdoor => "minecraft:mangrove_trapdoor",
|
MangroveTrapdoor => "minecraft:mangrove_trapdoor",
|
||||||
BambooTrapdoor => "minecraft:bamboo_trapdoor",
|
BambooTrapdoor => "minecraft:bamboo_trapdoor",
|
||||||
|
@ -2384,7 +2330,6 @@ enum Item {
|
||||||
BirchFenceGate => "minecraft:birch_fence_gate",
|
BirchFenceGate => "minecraft:birch_fence_gate",
|
||||||
JungleFenceGate => "minecraft:jungle_fence_gate",
|
JungleFenceGate => "minecraft:jungle_fence_gate",
|
||||||
AcaciaFenceGate => "minecraft:acacia_fence_gate",
|
AcaciaFenceGate => "minecraft:acacia_fence_gate",
|
||||||
CherryFenceGate => "minecraft:cherry_fence_gate",
|
|
||||||
DarkOakFenceGate => "minecraft:dark_oak_fence_gate",
|
DarkOakFenceGate => "minecraft:dark_oak_fence_gate",
|
||||||
MangroveFenceGate => "minecraft:mangrove_fence_gate",
|
MangroveFenceGate => "minecraft:mangrove_fence_gate",
|
||||||
BambooFenceGate => "minecraft:bamboo_fence_gate",
|
BambooFenceGate => "minecraft:bamboo_fence_gate",
|
||||||
|
@ -2413,8 +2358,6 @@ enum Item {
|
||||||
JungleChestBoat => "minecraft:jungle_chest_boat",
|
JungleChestBoat => "minecraft:jungle_chest_boat",
|
||||||
AcaciaBoat => "minecraft:acacia_boat",
|
AcaciaBoat => "minecraft:acacia_boat",
|
||||||
AcaciaChestBoat => "minecraft:acacia_chest_boat",
|
AcaciaChestBoat => "minecraft:acacia_chest_boat",
|
||||||
CherryBoat => "minecraft:cherry_boat",
|
|
||||||
CherryChestBoat => "minecraft:cherry_chest_boat",
|
|
||||||
DarkOakBoat => "minecraft:dark_oak_boat",
|
DarkOakBoat => "minecraft:dark_oak_boat",
|
||||||
DarkOakChestBoat => "minecraft:dark_oak_chest_boat",
|
DarkOakChestBoat => "minecraft:dark_oak_chest_boat",
|
||||||
MangroveBoat => "minecraft:mangrove_boat",
|
MangroveBoat => "minecraft:mangrove_boat",
|
||||||
|
@ -2518,7 +2461,6 @@ enum Item {
|
||||||
BirchSign => "minecraft:birch_sign",
|
BirchSign => "minecraft:birch_sign",
|
||||||
JungleSign => "minecraft:jungle_sign",
|
JungleSign => "minecraft:jungle_sign",
|
||||||
AcaciaSign => "minecraft:acacia_sign",
|
AcaciaSign => "minecraft:acacia_sign",
|
||||||
CherrySign => "minecraft:cherry_sign",
|
|
||||||
DarkOakSign => "minecraft:dark_oak_sign",
|
DarkOakSign => "minecraft:dark_oak_sign",
|
||||||
MangroveSign => "minecraft:mangrove_sign",
|
MangroveSign => "minecraft:mangrove_sign",
|
||||||
BambooSign => "minecraft:bamboo_sign",
|
BambooSign => "minecraft:bamboo_sign",
|
||||||
|
@ -2529,7 +2471,6 @@ enum Item {
|
||||||
BirchHangingSign => "minecraft:birch_hanging_sign",
|
BirchHangingSign => "minecraft:birch_hanging_sign",
|
||||||
JungleHangingSign => "minecraft:jungle_hanging_sign",
|
JungleHangingSign => "minecraft:jungle_hanging_sign",
|
||||||
AcaciaHangingSign => "minecraft:acacia_hanging_sign",
|
AcaciaHangingSign => "minecraft:acacia_hanging_sign",
|
||||||
CherryHangingSign => "minecraft:cherry_hanging_sign",
|
|
||||||
DarkOakHangingSign => "minecraft:dark_oak_hanging_sign",
|
DarkOakHangingSign => "minecraft:dark_oak_hanging_sign",
|
||||||
MangroveHangingSign => "minecraft:mangrove_hanging_sign",
|
MangroveHangingSign => "minecraft:mangrove_hanging_sign",
|
||||||
BambooHangingSign => "minecraft:bamboo_hanging_sign",
|
BambooHangingSign => "minecraft:bamboo_hanging_sign",
|
||||||
|
@ -2687,7 +2628,6 @@ enum Item {
|
||||||
SkeletonSpawnEgg => "minecraft:skeleton_spawn_egg",
|
SkeletonSpawnEgg => "minecraft:skeleton_spawn_egg",
|
||||||
SkeletonHorseSpawnEgg => "minecraft:skeleton_horse_spawn_egg",
|
SkeletonHorseSpawnEgg => "minecraft:skeleton_horse_spawn_egg",
|
||||||
SlimeSpawnEgg => "minecraft:slime_spawn_egg",
|
SlimeSpawnEgg => "minecraft:slime_spawn_egg",
|
||||||
SnifferSpawnEgg => "minecraft:sniffer_spawn_egg",
|
|
||||||
SnowGolemSpawnEgg => "minecraft:snow_golem_spawn_egg",
|
SnowGolemSpawnEgg => "minecraft:snow_golem_spawn_egg",
|
||||||
SpiderSpawnEgg => "minecraft:spider_spawn_egg",
|
SpiderSpawnEgg => "minecraft:spider_spawn_egg",
|
||||||
SquidSpawnEgg => "minecraft:squid_spawn_egg",
|
SquidSpawnEgg => "minecraft:squid_spawn_egg",
|
||||||
|
@ -2773,7 +2713,6 @@ enum Item {
|
||||||
EndCrystal => "minecraft:end_crystal",
|
EndCrystal => "minecraft:end_crystal",
|
||||||
ChorusFruit => "minecraft:chorus_fruit",
|
ChorusFruit => "minecraft:chorus_fruit",
|
||||||
PoppedChorusFruit => "minecraft:popped_chorus_fruit",
|
PoppedChorusFruit => "minecraft:popped_chorus_fruit",
|
||||||
TorchflowerSeeds => "minecraft:torchflower_seeds",
|
|
||||||
Beetroot => "minecraft:beetroot",
|
Beetroot => "minecraft:beetroot",
|
||||||
BeetrootSeeds => "minecraft:beetroot_seeds",
|
BeetrootSeeds => "minecraft:beetroot_seeds",
|
||||||
BeetrootSoup => "minecraft:beetroot_soup",
|
BeetrootSoup => "minecraft:beetroot_soup",
|
||||||
|
@ -2882,23 +2821,6 @@ enum Item {
|
||||||
PearlescentFroglight => "minecraft:pearlescent_froglight",
|
PearlescentFroglight => "minecraft:pearlescent_froglight",
|
||||||
Frogspawn => "minecraft:frogspawn",
|
Frogspawn => "minecraft:frogspawn",
|
||||||
EchoShard => "minecraft:echo_shard",
|
EchoShard => "minecraft:echo_shard",
|
||||||
Brush => "minecraft:brush",
|
|
||||||
NetheriteUpgradeSmithingTemplate => "minecraft:netherite_upgrade_smithing_template",
|
|
||||||
SentryArmorTrimSmithingTemplate => "minecraft:sentry_armor_trim_smithing_template",
|
|
||||||
DuneArmorTrimSmithingTemplate => "minecraft:dune_armor_trim_smithing_template",
|
|
||||||
CoastArmorTrimSmithingTemplate => "minecraft:coast_armor_trim_smithing_template",
|
|
||||||
WildArmorTrimSmithingTemplate => "minecraft:wild_armor_trim_smithing_template",
|
|
||||||
WardArmorTrimSmithingTemplate => "minecraft:ward_armor_trim_smithing_template",
|
|
||||||
EyeArmorTrimSmithingTemplate => "minecraft:eye_armor_trim_smithing_template",
|
|
||||||
VexArmorTrimSmithingTemplate => "minecraft:vex_armor_trim_smithing_template",
|
|
||||||
TideArmorTrimSmithingTemplate => "minecraft:tide_armor_trim_smithing_template",
|
|
||||||
SnoutArmorTrimSmithingTemplate => "minecraft:snout_armor_trim_smithing_template",
|
|
||||||
RibArmorTrimSmithingTemplate => "minecraft:rib_armor_trim_smithing_template",
|
|
||||||
SpireArmorTrimSmithingTemplate => "minecraft:spire_armor_trim_smithing_template",
|
|
||||||
PotteryShardArcher => "minecraft:pottery_shard_archer",
|
|
||||||
PotteryShardPrize => "minecraft:pottery_shard_prize",
|
|
||||||
PotteryShardArmsUp => "minecraft:pottery_shard_arms_up",
|
|
||||||
PotteryShardSkull => "minecraft:pottery_shard_skull",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3085,10 +3007,6 @@ enum MemoryModuleKind {
|
||||||
LikedNoteblock => "minecraft:liked_noteblock",
|
LikedNoteblock => "minecraft:liked_noteblock",
|
||||||
LikedNoteblockCooldownTicks => "minecraft:liked_noteblock_cooldown_ticks",
|
LikedNoteblockCooldownTicks => "minecraft:liked_noteblock_cooldown_ticks",
|
||||||
ItemPickupCooldownTicks => "minecraft:item_pickup_cooldown_ticks",
|
ItemPickupCooldownTicks => "minecraft:item_pickup_cooldown_ticks",
|
||||||
SnifferExploredPositions => "minecraft:sniffer_explored_positions",
|
|
||||||
SnifferSniffingTarget => "minecraft:sniffer_sniffing_target",
|
|
||||||
SnifferDigging => "minecraft:sniffer_digging",
|
|
||||||
SnifferHappy => "minecraft:sniffer_happy",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3114,7 +3032,6 @@ enum Menu {
|
||||||
Loom => "minecraft:loom",
|
Loom => "minecraft:loom",
|
||||||
Merchant => "minecraft:merchant",
|
Merchant => "minecraft:merchant",
|
||||||
ShulkerBox => "minecraft:shulker_box",
|
ShulkerBox => "minecraft:shulker_box",
|
||||||
LegacySmithing => "minecraft:legacy_smithing",
|
|
||||||
Smithing => "minecraft:smithing",
|
Smithing => "minecraft:smithing",
|
||||||
Smoker => "minecraft:smoker",
|
Smoker => "minecraft:smoker",
|
||||||
CartographyTable => "minecraft:cartography_table",
|
CartographyTable => "minecraft:cartography_table",
|
||||||
|
@ -3226,9 +3143,6 @@ enum ParticleKind {
|
||||||
Firework => "minecraft:firework",
|
Firework => "minecraft:firework",
|
||||||
Fishing => "minecraft:fishing",
|
Fishing => "minecraft:fishing",
|
||||||
Flame => "minecraft:flame",
|
Flame => "minecraft:flame",
|
||||||
DrippingCherryLeaves => "minecraft:dripping_cherry_leaves",
|
|
||||||
FallingCherryLeaves => "minecraft:falling_cherry_leaves",
|
|
||||||
LandingCherryLeaves => "minecraft:landing_cherry_leaves",
|
|
||||||
SculkSoul => "minecraft:sculk_soul",
|
SculkSoul => "minecraft:sculk_soul",
|
||||||
SculkCharge => "minecraft:sculk_charge",
|
SculkCharge => "minecraft:sculk_charge",
|
||||||
SculkChargePop => "minecraft:sculk_charge_pop",
|
SculkChargePop => "minecraft:sculk_charge_pop",
|
||||||
|
@ -3407,9 +3321,6 @@ enum RecipeSerializer {
|
||||||
CampfireCooking => "minecraft:campfire_cooking",
|
CampfireCooking => "minecraft:campfire_cooking",
|
||||||
Stonecutting => "minecraft:stonecutting",
|
Stonecutting => "minecraft:stonecutting",
|
||||||
Smithing => "minecraft:smithing",
|
Smithing => "minecraft:smithing",
|
||||||
SmithingTransform => "minecraft:smithing_transform",
|
|
||||||
SmithingTrim => "minecraft:smithing_trim",
|
|
||||||
CraftingDecoratedPot => "minecraft:crafting_decorated_pot",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3640,8 +3551,6 @@ enum SoundEvent {
|
||||||
ItemBottleFill => "minecraft:item.bottle.fill",
|
ItemBottleFill => "minecraft:item.bottle.fill",
|
||||||
ItemBottleFillDragonbreath => "minecraft:item.bottle.fill_dragonbreath",
|
ItemBottleFillDragonbreath => "minecraft:item.bottle.fill_dragonbreath",
|
||||||
BlockBrewingStandBrew => "minecraft:block.brewing_stand.brew",
|
BlockBrewingStandBrew => "minecraft:block.brewing_stand.brew",
|
||||||
ItemBrushBrushing => "minecraft:item.brush.brushing",
|
|
||||||
ItemBrushBrushSandCompleted => "minecraft:item.brush.brush_sand_completed",
|
|
||||||
BlockBubbleColumnBubblePop => "minecraft:block.bubble_column.bubble_pop",
|
BlockBubbleColumnBubblePop => "minecraft:block.bubble_column.bubble_pop",
|
||||||
BlockBubbleColumnUpwardsAmbient => "minecraft:block.bubble_column.upwards_ambient",
|
BlockBubbleColumnUpwardsAmbient => "minecraft:block.bubble_column.upwards_ambient",
|
||||||
BlockBubbleColumnUpwardsInside => "minecraft:block.bubble_column.upwards_inside",
|
BlockBubbleColumnUpwardsInside => "minecraft:block.bubble_column.upwards_inside",
|
||||||
|
@ -3707,36 +3616,6 @@ enum SoundEvent {
|
||||||
BlockChainHit => "minecraft:block.chain.hit",
|
BlockChainHit => "minecraft:block.chain.hit",
|
||||||
BlockChainPlace => "minecraft:block.chain.place",
|
BlockChainPlace => "minecraft:block.chain.place",
|
||||||
BlockChainStep => "minecraft:block.chain.step",
|
BlockChainStep => "minecraft:block.chain.step",
|
||||||
BlockCherryWoodBreak => "minecraft:block.cherry_wood.break",
|
|
||||||
BlockCherryWoodFall => "minecraft:block.cherry_wood.fall",
|
|
||||||
BlockCherryWoodHit => "minecraft:block.cherry_wood.hit",
|
|
||||||
BlockCherryWoodPlace => "minecraft:block.cherry_wood.place",
|
|
||||||
BlockCherryWoodStep => "minecraft:block.cherry_wood.step",
|
|
||||||
BlockCherrySaplingBreak => "minecraft:block.cherry_sapling.break",
|
|
||||||
BlockCherrySaplingFall => "minecraft:block.cherry_sapling.fall",
|
|
||||||
BlockCherrySaplingHit => "minecraft:block.cherry_sapling.hit",
|
|
||||||
BlockCherrySaplingPlace => "minecraft:block.cherry_sapling.place",
|
|
||||||
BlockCherrySaplingStep => "minecraft:block.cherry_sapling.step",
|
|
||||||
BlockCherryLeavesBreak => "minecraft:block.cherry_leaves.break",
|
|
||||||
BlockCherryLeavesFall => "minecraft:block.cherry_leaves.fall",
|
|
||||||
BlockCherryLeavesHit => "minecraft:block.cherry_leaves.hit",
|
|
||||||
BlockCherryLeavesPlace => "minecraft:block.cherry_leaves.place",
|
|
||||||
BlockCherryLeavesStep => "minecraft:block.cherry_leaves.step",
|
|
||||||
BlockCherryWoodHangingSignStep => "minecraft:block.cherry_wood_hanging_sign.step",
|
|
||||||
BlockCherryWoodHangingSignBreak => "minecraft:block.cherry_wood_hanging_sign.break",
|
|
||||||
BlockCherryWoodHangingSignFall => "minecraft:block.cherry_wood_hanging_sign.fall",
|
|
||||||
BlockCherryWoodHangingSignHit => "minecraft:block.cherry_wood_hanging_sign.hit",
|
|
||||||
BlockCherryWoodHangingSignPlace => "minecraft:block.cherry_wood_hanging_sign.place",
|
|
||||||
BlockCherryWoodDoorClose => "minecraft:block.cherry_wood_door.close",
|
|
||||||
BlockCherryWoodDoorOpen => "minecraft:block.cherry_wood_door.open",
|
|
||||||
BlockCherryWoodTrapdoorClose => "minecraft:block.cherry_wood_trapdoor.close",
|
|
||||||
BlockCherryWoodTrapdoorOpen => "minecraft:block.cherry_wood_trapdoor.open",
|
|
||||||
BlockCherryWoodButtonClickOff => "minecraft:block.cherry_wood_button.click_off",
|
|
||||||
BlockCherryWoodButtonClickOn => "minecraft:block.cherry_wood_button.click_on",
|
|
||||||
BlockCherryWoodPressurePlateClickOff => "minecraft:block.cherry_wood_pressure_plate.click_off",
|
|
||||||
BlockCherryWoodPressurePlateClickOn => "minecraft:block.cherry_wood_pressure_plate.click_on",
|
|
||||||
BlockCherryWoodFenceGateClose => "minecraft:block.cherry_wood_fence_gate.close",
|
|
||||||
BlockCherryWoodFenceGateOpen => "minecraft:block.cherry_wood_fence_gate.open",
|
|
||||||
BlockChestClose => "minecraft:block.chest.close",
|
BlockChestClose => "minecraft:block.chest.close",
|
||||||
BlockChestLocked => "minecraft:block.chest.locked",
|
BlockChestLocked => "minecraft:block.chest.locked",
|
||||||
BlockChestOpen => "minecraft:block.chest.open",
|
BlockChestOpen => "minecraft:block.chest.open",
|
||||||
|
@ -3799,12 +3678,6 @@ enum SoundEvent {
|
||||||
ItemCrossbowQuickCharge2 => "minecraft:item.crossbow.quick_charge_2",
|
ItemCrossbowQuickCharge2 => "minecraft:item.crossbow.quick_charge_2",
|
||||||
ItemCrossbowQuickCharge3 => "minecraft:item.crossbow.quick_charge_3",
|
ItemCrossbowQuickCharge3 => "minecraft:item.crossbow.quick_charge_3",
|
||||||
ItemCrossbowShoot => "minecraft:item.crossbow.shoot",
|
ItemCrossbowShoot => "minecraft:item.crossbow.shoot",
|
||||||
BlockDecoratedPotBreak => "minecraft:block.decorated_pot.break",
|
|
||||||
BlockDecoratedPotFall => "minecraft:block.decorated_pot.fall",
|
|
||||||
BlockDecoratedPotHit => "minecraft:block.decorated_pot.hit",
|
|
||||||
BlockDecoratedPotStep => "minecraft:block.decorated_pot.step",
|
|
||||||
BlockDecoratedPotPlace => "minecraft:block.decorated_pot.place",
|
|
||||||
BlockDecoratedPotShatter => "minecraft:block.decorated_pot.shatter",
|
|
||||||
BlockDeepslateBricksBreak => "minecraft:block.deepslate_bricks.break",
|
BlockDeepslateBricksBreak => "minecraft:block.deepslate_bricks.break",
|
||||||
BlockDeepslateBricksFall => "minecraft:block.deepslate_bricks.fall",
|
BlockDeepslateBricksFall => "minecraft:block.deepslate_bricks.fall",
|
||||||
BlockDeepslateBricksHit => "minecraft:block.deepslate_bricks.hit",
|
BlockDeepslateBricksHit => "minecraft:block.deepslate_bricks.hit",
|
||||||
|
@ -3947,11 +3820,6 @@ enum SoundEvent {
|
||||||
EntityFoxSniff => "minecraft:entity.fox.sniff",
|
EntityFoxSniff => "minecraft:entity.fox.sniff",
|
||||||
EntityFoxSpit => "minecraft:entity.fox.spit",
|
EntityFoxSpit => "minecraft:entity.fox.spit",
|
||||||
EntityFoxTeleport => "minecraft:entity.fox.teleport",
|
EntityFoxTeleport => "minecraft:entity.fox.teleport",
|
||||||
BlockSuspiciousSandBreak => "minecraft:block.suspicious_sand.break",
|
|
||||||
BlockSuspiciousSandStep => "minecraft:block.suspicious_sand.step",
|
|
||||||
BlockSuspiciousSandPlace => "minecraft:block.suspicious_sand.place",
|
|
||||||
BlockSuspiciousSandHit => "minecraft:block.suspicious_sand.hit",
|
|
||||||
BlockSuspiciousSandFall => "minecraft:block.suspicious_sand.fall",
|
|
||||||
BlockFroglightBreak => "minecraft:block.froglight.break",
|
BlockFroglightBreak => "minecraft:block.froglight.break",
|
||||||
BlockFroglightFall => "minecraft:block.froglight.fall",
|
BlockFroglightFall => "minecraft:block.froglight.fall",
|
||||||
BlockFroglightHit => "minecraft:block.froglight.hit",
|
BlockFroglightHit => "minecraft:block.froglight.hit",
|
||||||
|
@ -4218,11 +4086,6 @@ enum SoundEvent {
|
||||||
BlockMossCarpetHit => "minecraft:block.moss_carpet.hit",
|
BlockMossCarpetHit => "minecraft:block.moss_carpet.hit",
|
||||||
BlockMossCarpetPlace => "minecraft:block.moss_carpet.place",
|
BlockMossCarpetPlace => "minecraft:block.moss_carpet.place",
|
||||||
BlockMossCarpetStep => "minecraft:block.moss_carpet.step",
|
BlockMossCarpetStep => "minecraft:block.moss_carpet.step",
|
||||||
BlockPinkPetalsBreak => "minecraft:block.pink_petals.break",
|
|
||||||
BlockPinkPetalsFall => "minecraft:block.pink_petals.fall",
|
|
||||||
BlockPinkPetalsHit => "minecraft:block.pink_petals.hit",
|
|
||||||
BlockPinkPetalsPlace => "minecraft:block.pink_petals.place",
|
|
||||||
BlockPinkPetalsStep => "minecraft:block.pink_petals.step",
|
|
||||||
BlockMossBreak => "minecraft:block.moss.break",
|
BlockMossBreak => "minecraft:block.moss.break",
|
||||||
BlockMossFall => "minecraft:block.moss.fall",
|
BlockMossFall => "minecraft:block.moss.fall",
|
||||||
BlockMossHit => "minecraft:block.moss.hit",
|
BlockMossHit => "minecraft:block.moss.hit",
|
||||||
|
@ -4281,7 +4144,6 @@ enum SoundEvent {
|
||||||
MusicOverworldJungleAndForest => "minecraft:music.overworld.jungle_and_forest",
|
MusicOverworldJungleAndForest => "minecraft:music.overworld.jungle_and_forest",
|
||||||
MusicOverworldOldGrowthTaiga => "minecraft:music.overworld.old_growth_taiga",
|
MusicOverworldOldGrowthTaiga => "minecraft:music.overworld.old_growth_taiga",
|
||||||
MusicOverworldMeadow => "minecraft:music.overworld.meadow",
|
MusicOverworldMeadow => "minecraft:music.overworld.meadow",
|
||||||
MusicOverworldCherryGrove => "minecraft:music.overworld.cherry_grove",
|
|
||||||
MusicNetherNetherWastes => "minecraft:music.nether.nether_wastes",
|
MusicNetherNetherWastes => "minecraft:music.nether.nether_wastes",
|
||||||
MusicOverworldFrozenPeaks => "minecraft:music.overworld.frozen_peaks",
|
MusicOverworldFrozenPeaks => "minecraft:music.overworld.frozen_peaks",
|
||||||
MusicOverworldSnowySlopes => "minecraft:music.overworld.snowy_slopes",
|
MusicOverworldSnowySlopes => "minecraft:music.overworld.snowy_slopes",
|
||||||
|
@ -4311,7 +4173,6 @@ enum SoundEvent {
|
||||||
BlockNetherWoodPressurePlateClickOn => "minecraft:block.nether_wood_pressure_plate.click_on",
|
BlockNetherWoodPressurePlateClickOn => "minecraft:block.nether_wood_pressure_plate.click_on",
|
||||||
BlockNetherWoodFenceGateClose => "minecraft:block.nether_wood_fence_gate.close",
|
BlockNetherWoodFenceGateClose => "minecraft:block.nether_wood_fence_gate.close",
|
||||||
BlockNetherWoodFenceGateOpen => "minecraft:block.nether_wood_fence_gate.open",
|
BlockNetherWoodFenceGateOpen => "minecraft:block.nether_wood_fence_gate.open",
|
||||||
IntentionallyEmpty => "minecraft:intentionally_empty",
|
|
||||||
BlockPackedMudBreak => "minecraft:block.packed_mud.break",
|
BlockPackedMudBreak => "minecraft:block.packed_mud.break",
|
||||||
BlockPackedMudFall => "minecraft:block.packed_mud.fall",
|
BlockPackedMudFall => "minecraft:block.packed_mud.fall",
|
||||||
BlockPackedMudHit => "minecraft:block.packed_mud.hit",
|
BlockPackedMudHit => "minecraft:block.packed_mud.hit",
|
||||||
|
@ -4684,18 +4545,6 @@ enum SoundEvent {
|
||||||
EntitySlimeSquishSmall => "minecraft:entity.slime.squish_small",
|
EntitySlimeSquishSmall => "minecraft:entity.slime.squish_small",
|
||||||
BlockSmithingTableUse => "minecraft:block.smithing_table.use",
|
BlockSmithingTableUse => "minecraft:block.smithing_table.use",
|
||||||
BlockSmokerSmoke => "minecraft:block.smoker.smoke",
|
BlockSmokerSmoke => "minecraft:block.smoker.smoke",
|
||||||
EntitySnifferStep => "minecraft:entity.sniffer.step",
|
|
||||||
EntitySnifferEat => "minecraft:entity.sniffer.eat",
|
|
||||||
EntitySnifferIdle => "minecraft:entity.sniffer.idle",
|
|
||||||
EntitySnifferHurt => "minecraft:entity.sniffer.hurt",
|
|
||||||
EntitySnifferDeath => "minecraft:entity.sniffer.death",
|
|
||||||
EntitySnifferDropSeed => "minecraft:entity.sniffer.drop_seed",
|
|
||||||
EntitySnifferScenting => "minecraft:entity.sniffer.scenting",
|
|
||||||
EntitySnifferSniffing => "minecraft:entity.sniffer.sniffing",
|
|
||||||
EntitySnifferSearching => "minecraft:entity.sniffer.searching",
|
|
||||||
EntitySnifferDigging => "minecraft:entity.sniffer.digging",
|
|
||||||
EntitySnifferDiggingStop => "minecraft:entity.sniffer.digging_stop",
|
|
||||||
EntitySnifferHappy => "minecraft:entity.sniffer.happy",
|
|
||||||
EntitySnowballThrow => "minecraft:entity.snowball.throw",
|
EntitySnowballThrow => "minecraft:entity.snowball.throw",
|
||||||
BlockSnowBreak => "minecraft:block.snow.break",
|
BlockSnowBreak => "minecraft:block.snow.break",
|
||||||
BlockSnowFall => "minecraft:block.snow.fall",
|
BlockSnowFall => "minecraft:block.snow.fall",
|
||||||
|
@ -4885,14 +4734,14 @@ enum SoundEvent {
|
||||||
BlockWoodenDoorOpen => "minecraft:block.wooden_door.open",
|
BlockWoodenDoorOpen => "minecraft:block.wooden_door.open",
|
||||||
BlockWoodenTrapdoorClose => "minecraft:block.wooden_trapdoor.close",
|
BlockWoodenTrapdoorClose => "minecraft:block.wooden_trapdoor.close",
|
||||||
BlockWoodenTrapdoorOpen => "minecraft:block.wooden_trapdoor.open",
|
BlockWoodenTrapdoorOpen => "minecraft:block.wooden_trapdoor.open",
|
||||||
|
BlockWoodBreak => "minecraft:block.wood.break",
|
||||||
BlockWoodenButtonClickOff => "minecraft:block.wooden_button.click_off",
|
BlockWoodenButtonClickOff => "minecraft:block.wooden_button.click_off",
|
||||||
BlockWoodenButtonClickOn => "minecraft:block.wooden_button.click_on",
|
BlockWoodenButtonClickOn => "minecraft:block.wooden_button.click_on",
|
||||||
BlockWoodenPressurePlateClickOff => "minecraft:block.wooden_pressure_plate.click_off",
|
|
||||||
BlockWoodenPressurePlateClickOn => "minecraft:block.wooden_pressure_plate.click_on",
|
|
||||||
BlockWoodBreak => "minecraft:block.wood.break",
|
|
||||||
BlockWoodFall => "minecraft:block.wood.fall",
|
BlockWoodFall => "minecraft:block.wood.fall",
|
||||||
BlockWoodHit => "minecraft:block.wood.hit",
|
BlockWoodHit => "minecraft:block.wood.hit",
|
||||||
BlockWoodPlace => "minecraft:block.wood.place",
|
BlockWoodPlace => "minecraft:block.wood.place",
|
||||||
|
BlockWoodenPressurePlateClickOff => "minecraft:block.wooden_pressure_plate.click_off",
|
||||||
|
BlockWoodenPressurePlateClickOn => "minecraft:block.wooden_pressure_plate.click_on",
|
||||||
BlockWoodStep => "minecraft:block.wood.step",
|
BlockWoodStep => "minecraft:block.wood.step",
|
||||||
BlockWoolBreak => "minecraft:block.wool.break",
|
BlockWoolBreak => "minecraft:block.wool.break",
|
||||||
BlockWoolFall => "minecraft:block.wool.fall",
|
BlockWoolFall => "minecraft:block.wool.fall",
|
||||||
|
@ -5136,7 +4985,6 @@ enum WorldgenFoliagePlacerKind {
|
||||||
MegaPineFoliagePlacer => "minecraft:mega_pine_foliage_placer",
|
MegaPineFoliagePlacer => "minecraft:mega_pine_foliage_placer",
|
||||||
DarkOakFoliagePlacer => "minecraft:dark_oak_foliage_placer",
|
DarkOakFoliagePlacer => "minecraft:dark_oak_foliage_placer",
|
||||||
RandomSpreadFoliagePlacer => "minecraft:random_spread_foliage_placer",
|
RandomSpreadFoliagePlacer => "minecraft:random_spread_foliage_placer",
|
||||||
CherryFoliagePlacer => "minecraft:cherry_foliage_placer",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5326,17 +5174,5 @@ enum WorldgenTrunkPlacerKind {
|
||||||
FancyTrunkPlacer => "minecraft:fancy_trunk_placer",
|
FancyTrunkPlacer => "minecraft:fancy_trunk_placer",
|
||||||
BendingTrunkPlacer => "minecraft:bending_trunk_placer",
|
BendingTrunkPlacer => "minecraft:bending_trunk_placer",
|
||||||
UpwardsBranchingTrunkPlacer => "minecraft:upwards_branching_trunk_placer",
|
UpwardsBranchingTrunkPlacer => "minecraft:upwards_branching_trunk_placer",
|
||||||
CherryTrunkPlacer => "minecraft:cherry_trunk_placer",
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
registry! {
|
|
||||||
enum DecoratedPotPatterns {
|
|
||||||
PotteryPatternArcher => "minecraft:pottery_pattern_archer",
|
|
||||||
PotteryPatternPrize => "minecraft:pottery_pattern_prize",
|
|
||||||
PotteryPatternArmsUp => "minecraft:pottery_pattern_arms_up",
|
|
||||||
PotteryPatternSkull => "minecraft:pottery_pattern_skull",
|
|
||||||
DecoratedPotSide => "minecraft:decorated_pot_side",
|
|
||||||
DecoratedPotBase => "minecraft:decorated_pot_base",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
//! Define some types needed for entity metadata.
|
//! Define some types needed for entity metadata.
|
||||||
|
|
||||||
|
use azalea_block::BlockState;
|
||||||
use azalea_buf::{
|
use azalea_buf::{
|
||||||
BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable,
|
BufReadError, McBuf, McBufReadable, McBufVarReadable, McBufVarWritable, McBufWritable,
|
||||||
};
|
};
|
||||||
use azalea_chat::FormattedText;
|
use azalea_chat::FormattedText;
|
||||||
use azalea_core::{BlockPos, Direction, GlobalPos, Particle, Slot, Vec3};
|
use azalea_core::{BlockPos, Direction, GlobalPos, Particle, Slot};
|
||||||
use bevy_ecs::component::Component;
|
use bevy_ecs::component::Component;
|
||||||
use derive_more::Deref;
|
use derive_more::Deref;
|
||||||
use enum_as_inner::EnumAsInner;
|
use enum_as_inner::EnumAsInner;
|
||||||
|
@ -49,8 +50,6 @@ impl McBufWritable for EntityMetadataItems {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note: This enum is partially generated and parsed by
|
|
||||||
// codegen/lib/code/entity.py
|
|
||||||
#[derive(Clone, Debug, EnumAsInner, McBuf)]
|
#[derive(Clone, Debug, EnumAsInner, McBuf)]
|
||||||
pub enum EntityDataValue {
|
pub enum EntityDataValue {
|
||||||
Byte(u8),
|
Byte(u8),
|
||||||
|
@ -67,9 +66,9 @@ pub enum EntityDataValue {
|
||||||
OptionalBlockPos(Option<BlockPos>),
|
OptionalBlockPos(Option<BlockPos>),
|
||||||
Direction(Direction),
|
Direction(Direction),
|
||||||
OptionalUuid(Option<Uuid>),
|
OptionalUuid(Option<Uuid>),
|
||||||
BlockState(azalea_block::BlockState),
|
// 0 for absent (implies air); otherwise, a block state ID as per the global palette
|
||||||
/// If this is air, that means it's absent,
|
// this is a varint
|
||||||
OptionalBlockState(azalea_block::BlockState),
|
BlockState(BlockState),
|
||||||
CompoundTag(azalea_nbt::Tag),
|
CompoundTag(azalea_nbt::Tag),
|
||||||
Particle(Particle),
|
Particle(Particle),
|
||||||
VillagerData(VillagerData),
|
VillagerData(VillagerData),
|
||||||
|
@ -80,22 +79,11 @@ pub enum EntityDataValue {
|
||||||
FrogVariant(azalea_registry::FrogVariant),
|
FrogVariant(azalea_registry::FrogVariant),
|
||||||
OptionalGlobalPos(Option<GlobalPos>),
|
OptionalGlobalPos(Option<GlobalPos>),
|
||||||
PaintingVariant(azalea_registry::PaintingVariant),
|
PaintingVariant(azalea_registry::PaintingVariant),
|
||||||
SnifferState(SnifferState),
|
|
||||||
Vector3(Vec3),
|
|
||||||
Quaternion(Quaternion),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
pub struct OptionalUnsignedInt(pub Option<u32>);
|
pub struct OptionalUnsignedInt(pub Option<u32>);
|
||||||
|
|
||||||
#[derive(Clone, Debug, McBuf)]
|
|
||||||
pub struct Quaternion {
|
|
||||||
pub x: f32,
|
|
||||||
pub y: f32,
|
|
||||||
pub z: f32,
|
|
||||||
pub w: f32,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl McBufReadable for OptionalUnsignedInt {
|
impl McBufReadable for OptionalUnsignedInt {
|
||||||
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
fn read_from(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError> {
|
||||||
let val = u32::var_read_from(buf)?;
|
let val = u32::var_read_from(buf)?;
|
||||||
|
@ -172,15 +160,3 @@ impl TryFrom<EntityMetadataItems> for Vec<EntityDataValue> {
|
||||||
Ok(data)
|
Ok(data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, Copy, Clone, McBuf, Default)]
|
|
||||||
pub enum SnifferState {
|
|
||||||
#[default]
|
|
||||||
Idling,
|
|
||||||
FeelingHappy,
|
|
||||||
Scenting,
|
|
||||||
Sniffing,
|
|
||||||
Searching,
|
|
||||||
Digging,
|
|
||||||
Rising,
|
|
||||||
}
|
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -9,9 +9,9 @@ version_id = lib.code.version.get_version_id()
|
||||||
mappings = lib.download.get_mappings_for_version(version_id)
|
mappings = lib.download.get_mappings_for_version(version_id)
|
||||||
burger_data = lib.extract.get_burger_data_for_version(version_id)
|
burger_data = lib.extract.get_burger_data_for_version(version_id)
|
||||||
|
|
||||||
burger_entities_data = burger_data[0]['entities']
|
burger_entity_data = burger_data[0]['entities']['entity']
|
||||||
|
|
||||||
lib.code.entity.generate_entity_metadata(burger_entities_data, mappings)
|
lib.code.entity.generate_entity_metadata(burger_entity_data, mappings)
|
||||||
|
|
||||||
lib.code.utils.fmt()
|
lib.code.utils.fmt()
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
from lib.utils import to_camel_case, to_snake_case, get_dir_location, upper_first_letter
|
from lib.utils import to_camel_case, to_snake_case, get_dir_location, upper_first_letter
|
||||||
from lib.code.packet import burger_instruction_to_code
|
|
||||||
from lib.code.utils import burger_type_to_rust_type
|
|
||||||
from lib.mappings import Mappings
|
from lib.mappings import Mappings
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
import re
|
import re
|
||||||
|
@ -8,91 +6,35 @@ import re
|
||||||
METADATA_RS_DIR = get_dir_location(
|
METADATA_RS_DIR = get_dir_location(
|
||||||
'../azalea-world/src/entity/metadata.rs')
|
'../azalea-world/src/entity/metadata.rs')
|
||||||
|
|
||||||
DATA_RS_DIR = get_dir_location(
|
|
||||||
'../azalea-world/src/entity/data.rs')
|
|
||||||
|
|
||||||
def generate_metadata_names(burger_dataserializers: dict, mappings: Mappings):
|
def generate_entity_metadata(burger_entity_data: dict, mappings: Mappings):
|
||||||
serializer_names = [None] * len(burger_dataserializers)
|
# TODO: auto generate this and use it for generating the EntityDataValue enum
|
||||||
for burger_serializer in burger_dataserializers.values():
|
metadata_types = [
|
||||||
print(burger_serializer)
|
{'name': 'Byte', 'type': 'u8'},
|
||||||
|
{'name': 'Int', 'type': 'i32', 'var': True},
|
||||||
# burger gives us the wrong class, so we do this instead
|
{'name': 'Long', 'type': 'i64'},
|
||||||
data_serializers_class = mappings.get_class_from_deobfuscated_name('net.minecraft.network.syncher.EntityDataSerializers')
|
{'name': 'Float', 'type': 'f32'},
|
||||||
mojmap_name = mappings.get_field(data_serializers_class, burger_serializer['field']).lower()
|
{'name': 'String', 'type': 'String'},
|
||||||
|
{'name': 'FormattedText', 'type': 'FormattedText'},
|
||||||
if mojmap_name == 'component':
|
{'name': 'OptionalFormattedText', 'type': 'Option<FormattedText>'},
|
||||||
mojmap_name = 'formatted_text'
|
{'name': 'ItemStack', 'type': 'Slot'},
|
||||||
elif mojmap_name == 'optional_component':
|
{'name': 'Boolean', 'type': 'bool'},
|
||||||
mojmap_name = 'optional_formatted_text'
|
{'name': 'Rotations', 'type': 'Rotations'},
|
||||||
|
{'name': 'BlockPos', 'type': 'BlockPos'},
|
||||||
serializer_names[burger_serializer['id']] = upper_first_letter(to_camel_case(mojmap_name))
|
{'name': 'OptionalBlockPos', 'type': 'Option<BlockPos>'},
|
||||||
return serializer_names
|
{'name': 'Direction', 'type': 'Direction'},
|
||||||
|
{'name': 'OptionalUuid', 'type': 'Option<Uuid>'},
|
||||||
def parse_metadata_types_from_code():
|
{'name': 'BlockState', 'type': 'BlockState'},
|
||||||
with open(DATA_RS_DIR, 'r') as f:
|
{'name': 'CompoundTag', 'type': 'azalea_nbt::Tag'},
|
||||||
lines = f.read().splitlines()
|
{'name': 'Particle', 'type': 'Particle'},
|
||||||
|
{'name': 'VillagerData', 'type': 'VillagerData'},
|
||||||
data = []
|
{'name': 'OptionalUnsignedInt', 'type': 'OptionalUnsignedInt'},
|
||||||
|
{'name': 'Pose', 'type': 'Pose'},
|
||||||
in_enum = False
|
{'name': 'CatVariant', 'type': 'azalea_registry::CatVariant'},
|
||||||
for line in lines:
|
{'name': 'FrogVariant', 'type': 'azalea_registry::FrogVariant'},
|
||||||
if line == 'pub enum EntityDataValue {':
|
{'name': 'GlobalPos', 'type': 'GlobalPos'},
|
||||||
in_enum = True
|
{'name': 'PaintingVariant', 'type': 'azalea_registry::PaintingVariant'}
|
||||||
elif line == '}':
|
]
|
||||||
in_enum = False
|
|
||||||
elif in_enum:
|
|
||||||
line = line.strip()
|
|
||||||
if line.startswith('//'): continue
|
|
||||||
name, type = line.rstrip('),').split('(')
|
|
||||||
is_var = False
|
|
||||||
if type.startswith('#[var] '):
|
|
||||||
is_var = True
|
|
||||||
type = type[len('#[var] '):]
|
|
||||||
data.append({
|
|
||||||
'name': name,
|
|
||||||
'type': type,
|
|
||||||
'var': is_var
|
|
||||||
})
|
|
||||||
print(data)
|
|
||||||
return data
|
|
||||||
|
|
||||||
def generate_entity_metadata(burger_entities_data: dict, mappings: Mappings):
|
|
||||||
burger_entity_metadata = burger_entities_data['entity']
|
|
||||||
|
|
||||||
new_metadata_names = generate_metadata_names(burger_entities_data['dataserializers'], mappings)
|
|
||||||
parsed_metadata_types = parse_metadata_types_from_code()
|
|
||||||
|
|
||||||
parsed_metadata_names = []
|
|
||||||
for t in parsed_metadata_types:
|
|
||||||
parsed_metadata_names.append(t['name'])
|
|
||||||
|
|
||||||
with open(DATA_RS_DIR, 'r') as f:
|
|
||||||
lines = f.read().splitlines()
|
|
||||||
# add the metadata names that weren't there before to the end of the enum.
|
|
||||||
# this technically might cause them to be in the wrong order but i decided
|
|
||||||
# making it correct while preserving comments was too annoying so i didn't
|
|
||||||
added_metadata_names = []
|
|
||||||
for n in new_metadata_names:
|
|
||||||
if n not in parsed_metadata_names:
|
|
||||||
added_metadata_names.append(n)
|
|
||||||
if added_metadata_names != []:
|
|
||||||
in_enum = False
|
|
||||||
for i, line in enumerate(list(lines)):
|
|
||||||
if line == 'pub enum EntityDataValue {':
|
|
||||||
in_enum = True
|
|
||||||
elif in_enum and line == '}':
|
|
||||||
in_enum = False
|
|
||||||
for n in added_metadata_names:
|
|
||||||
lines.insert(i, f'{n}(TODO),')
|
|
||||||
i += 1
|
|
||||||
print(lines)
|
|
||||||
with open(DATA_RS_DIR, 'w') as f:
|
|
||||||
f.write('\n'.join(lines))
|
|
||||||
print('Expected metadata types:\n' + '\n'.join(new_metadata_names))
|
|
||||||
print('Updated metadata types in azalea-world/src/entity/data.rs, go make sure they\'re correct and then press enter')
|
|
||||||
input()
|
|
||||||
|
|
||||||
metadata_types = parse_metadata_types_from_code()
|
|
||||||
|
|
||||||
code = []
|
code = []
|
||||||
code.append('''#![allow(clippy::single_match)]
|
code.append('''#![allow(clippy::single_match)]
|
||||||
|
@ -100,12 +42,10 @@ def generate_entity_metadata(burger_entities_data: dict, mappings: Mappings):
|
||||||
// This file is generated from codegen/lib/code/entity.py.
|
// This file is generated from codegen/lib/code/entity.py.
|
||||||
// Don't change it manually!
|
// Don't change it manually!
|
||||||
|
|
||||||
use super::{
|
use super::{EntityDataItem, EntityDataValue, OptionalUnsignedInt, Pose, Rotations, VillagerData};
|
||||||
EntityDataItem, EntityDataValue, OptionalUnsignedInt, Pose, Quaternion, Rotations,
|
use azalea_block::BlockState;
|
||||||
SnifferState, VillagerData
|
|
||||||
};
|
|
||||||
use azalea_chat::FormattedText;
|
use azalea_chat::FormattedText;
|
||||||
use azalea_core::{BlockPos, Direction, Particle, Slot, Vec3};
|
use azalea_core::{BlockPos, Direction, Particle, Slot};
|
||||||
use bevy_ecs::{bundle::Bundle, component::Component};
|
use bevy_ecs::{bundle::Bundle, component::Component};
|
||||||
use derive_more::{Deref, DerefMut};
|
use derive_more::{Deref, DerefMut};
|
||||||
use thiserror::Error;
|
use thiserror::Error;
|
||||||
|
@ -134,9 +74,9 @@ impl From<EntityDataValue> for UpdateMetadataError {
|
||||||
# build the duplicate_field_names set
|
# build the duplicate_field_names set
|
||||||
previous_field_names = set()
|
previous_field_names = set()
|
||||||
duplicate_field_names = set()
|
duplicate_field_names = set()
|
||||||
for entity_id in burger_entity_metadata.keys():
|
for entity_id in burger_entity_data.keys():
|
||||||
field_name_map[entity_id] = {}
|
field_name_map[entity_id] = {}
|
||||||
for field_name_or_bitfield in get_entity_metadata_names(entity_id, burger_entity_metadata, mappings).values():
|
for field_name_or_bitfield in get_entity_metadata_names(entity_id, burger_entity_data, mappings).values():
|
||||||
if isinstance(field_name_or_bitfield, str):
|
if isinstance(field_name_or_bitfield, str):
|
||||||
if field_name_or_bitfield in previous_field_names:
|
if field_name_or_bitfield in previous_field_names:
|
||||||
duplicate_field_names.add(field_name_or_bitfield)
|
duplicate_field_names.add(field_name_or_bitfield)
|
||||||
|
@ -159,8 +99,8 @@ impl From<EntityDataValue> for UpdateMetadataError {
|
||||||
raise Exception(f'{name} should only exist once')
|
raise Exception(f'{name} should only exist once')
|
||||||
|
|
||||||
# and now figure out what to rename them to
|
# and now figure out what to rename them to
|
||||||
for entity_id in burger_entity_metadata.keys():
|
for entity_id in burger_entity_data.keys():
|
||||||
for index, field_name_or_bitfield in get_entity_metadata_names(entity_id, burger_entity_metadata, mappings).items():
|
for index, field_name_or_bitfield in get_entity_metadata_names(entity_id, burger_entity_data, mappings).items():
|
||||||
if isinstance(field_name_or_bitfield, str):
|
if isinstance(field_name_or_bitfield, str):
|
||||||
new_field_name = field_name_or_bitfield
|
new_field_name = field_name_or_bitfield
|
||||||
if new_field_name == 'type':
|
if new_field_name == 'type':
|
||||||
|
@ -189,14 +129,14 @@ impl From<EntityDataValue> for UpdateMetadataError {
|
||||||
return field_name_map[entity_ids_for_all_field_names_or_bitfields[index]][name]
|
return field_name_map[entity_ids_for_all_field_names_or_bitfields[index]][name]
|
||||||
return name
|
return name
|
||||||
|
|
||||||
parents = get_entity_parents(entity_id, burger_entity_metadata)
|
parents = get_entity_parents(entity_id, burger_entity_data)
|
||||||
for parent_id in list(reversed(parents)):
|
for parent_id in list(reversed(parents)):
|
||||||
for index, name_or_bitfield in get_entity_metadata_names(parent_id, burger_entity_metadata, mappings).items():
|
for index, name_or_bitfield in get_entity_metadata_names(parent_id, burger_entity_data, mappings).items():
|
||||||
assert index == len(all_field_names_or_bitfields)
|
assert index == len(all_field_names_or_bitfields)
|
||||||
all_field_names_or_bitfields.append(name_or_bitfield)
|
all_field_names_or_bitfields.append(name_or_bitfield)
|
||||||
entity_ids_for_all_field_names_or_bitfields.append(parent_id)
|
entity_ids_for_all_field_names_or_bitfields.append(parent_id)
|
||||||
entity_metadatas.extend(get_entity_metadata(
|
entity_metadatas.extend(get_entity_metadata(
|
||||||
parent_id, burger_entity_metadata))
|
parent_id, burger_entity_data))
|
||||||
parent_id = parents[1] if len(parents) > 1 else None
|
parent_id = parents[1] if len(parents) > 1 else None
|
||||||
|
|
||||||
# now add all the fields/component structs
|
# now add all the fields/component structs
|
||||||
|
@ -324,7 +264,7 @@ impl From<EntityDataValue> for UpdateMetadataError {
|
||||||
if parent_struct_name:
|
if parent_struct_name:
|
||||||
code.append(
|
code.append(
|
||||||
f' parent: {parent_struct_name}MetadataBundle,')
|
f' parent: {parent_struct_name}MetadataBundle,')
|
||||||
for index, name_or_bitfield in get_entity_metadata_names(entity_id, burger_entity_metadata, mappings).items():
|
for index, name_or_bitfield in get_entity_metadata_names(entity_id, burger_entity_data, mappings).items():
|
||||||
if isinstance(name_or_bitfield, str):
|
if isinstance(name_or_bitfield, str):
|
||||||
name_or_bitfield = maybe_rename_field(
|
name_or_bitfield = maybe_rename_field(
|
||||||
name_or_bitfield, index)
|
name_or_bitfield, index)
|
||||||
|
@ -370,7 +310,7 @@ impl From<EntityDataValue> for UpdateMetadataError {
|
||||||
# if it has a parent, put it (do recursion)
|
# if it has a parent, put it (do recursion)
|
||||||
# parent: AbstractCreatureBundle { ... },
|
# parent: AbstractCreatureBundle { ... },
|
||||||
this_entity_parent_ids = get_entity_parents(
|
this_entity_parent_ids = get_entity_parents(
|
||||||
this_entity_id, burger_entity_metadata)
|
this_entity_id, burger_entity_data)
|
||||||
this_entity_parent_id = this_entity_parent_ids[1] if len(
|
this_entity_parent_id = this_entity_parent_ids[1] if len(
|
||||||
this_entity_parent_ids) > 1 else None
|
this_entity_parent_ids) > 1 else None
|
||||||
if this_entity_parent_id:
|
if this_entity_parent_id:
|
||||||
|
@ -382,7 +322,7 @@ impl From<EntityDataValue> for UpdateMetadataError {
|
||||||
code.append(
|
code.append(
|
||||||
' },')
|
' },')
|
||||||
|
|
||||||
for index, name_or_bitfield in get_entity_metadata_names(this_entity_id, burger_entity_metadata, mappings).items():
|
for index, name_or_bitfield in get_entity_metadata_names(this_entity_id, burger_entity_data, mappings).items():
|
||||||
default = next(filter(lambda i: i['index'] == index, entity_metadatas)).get(
|
default = next(filter(lambda i: i['index'] == index, entity_metadatas)).get(
|
||||||
'default', 'Default::default()')
|
'default', 'Default::default()')
|
||||||
if isinstance(name_or_bitfield, str):
|
if isinstance(name_or_bitfield, str):
|
||||||
|
@ -427,21 +367,11 @@ impl From<EntityDataValue> for UpdateMetadataError {
|
||||||
elif type_name == 'ItemStack':
|
elif type_name == 'ItemStack':
|
||||||
default = f'Slot::Present({default})' if default != 'Empty' else 'Slot::Empty'
|
default = f'Slot::Present({default})' if default != 'Empty' else 'Slot::Empty'
|
||||||
elif type_name == 'BlockState':
|
elif type_name == 'BlockState':
|
||||||
default = f'{default}' if default != 'Empty' else 'azalea_block::BlockState::AIR'
|
default = f'{default}' if default != 'Empty' else 'BlockState::AIR'
|
||||||
elif type_name == 'OptionalBlockState':
|
|
||||||
default = f'{default}' if default != 'Empty' else 'azalea_block::BlockState::AIR'
|
|
||||||
elif type_name == 'OptionalFormattedText':
|
elif type_name == 'OptionalFormattedText':
|
||||||
default = f'Some({default})' if default != 'Empty' else 'None'
|
default = f'Some({default})' if default != 'Empty' else 'None'
|
||||||
elif type_name == 'CompoundTag':
|
elif type_name == 'CompoundTag':
|
||||||
default = f'azalea_nbt::Tag::Compound({default})' if default != 'Empty' else 'azalea_nbt::Tag::Compound(Default::default())'
|
default = f'azalea_nbt::Tag::Compound({default})' if default != 'Empty' else 'azalea_nbt::Tag::Compound(Default::default())'
|
||||||
elif type_name == 'Quaternion':
|
|
||||||
default = f'Quaternion {{ x: {float(default["x"])}, y: {float(default["y"])}, z: {float(default["z"])}, w: {float(default["w"])} }}'
|
|
||||||
elif type_name == 'Vector3':
|
|
||||||
default = f'Vec3 {{ x: {float(default["x"])}, y: {float(default["y"])}, z: {float(default["z"])} }}'
|
|
||||||
elif type_name == 'Byte':
|
|
||||||
# in 1.19.4 TextOpacity is a -1 by default
|
|
||||||
if default < 0:
|
|
||||||
default += 128
|
|
||||||
if name in single_use_imported_types:
|
if name in single_use_imported_types:
|
||||||
code.append(f' {name}: {default},')
|
code.append(f' {name}: {default},')
|
||||||
else:
|
else:
|
||||||
|
@ -465,7 +395,7 @@ impl From<EntityDataValue> for UpdateMetadataError {
|
||||||
code.append('')
|
code.append('')
|
||||||
|
|
||||||
# parent_field_name = None
|
# parent_field_name = None
|
||||||
for entity_id in burger_entity_metadata:
|
for entity_id in burger_entity_data:
|
||||||
new_entity(entity_id)
|
new_entity(entity_id)
|
||||||
|
|
||||||
# and now make the main apply_metadata
|
# and now make the main apply_metadata
|
||||||
|
@ -489,7 +419,7 @@ impl From<EntityDataValue> for UpdateMetadataError {
|
||||||
items: Vec<EntityDataItem>,
|
items: Vec<EntityDataItem>,
|
||||||
) -> Result<(), UpdateMetadataError> {{
|
) -> Result<(), UpdateMetadataError> {{
|
||||||
match entity_kind {{''')
|
match entity_kind {{''')
|
||||||
for entity_id in burger_entity_metadata:
|
for entity_id in burger_entity_data:
|
||||||
if entity_id.startswith('~'):
|
if entity_id.startswith('~'):
|
||||||
# not actually an entity
|
# not actually an entity
|
||||||
continue
|
continue
|
||||||
|
@ -516,7 +446,7 @@ impl From<EntityDataValue> for UpdateMetadataError {
|
||||||
code.append(
|
code.append(
|
||||||
'pub fn apply_default_metadata(entity: &mut bevy_ecs::system::EntityCommands, kind: azalea_registry::EntityKind) {')
|
'pub fn apply_default_metadata(entity: &mut bevy_ecs::system::EntityCommands, kind: azalea_registry::EntityKind) {')
|
||||||
code.append(' match kind {')
|
code.append(' match kind {')
|
||||||
for entity_id in burger_entity_metadata:
|
for entity_id in burger_entity_data:
|
||||||
if entity_id.startswith('~'):
|
if entity_id.startswith('~'):
|
||||||
# not actually an entity
|
# not actually an entity
|
||||||
continue
|
continue
|
||||||
|
@ -534,22 +464,22 @@ impl From<EntityDataValue> for UpdateMetadataError {
|
||||||
f.write('\n'.join(code))
|
f.write('\n'.join(code))
|
||||||
|
|
||||||
|
|
||||||
def get_entity_parents(entity_id: str, burger_entity_metadata: dict):
|
def get_entity_parents(entity_id: str, burger_entity_data: dict):
|
||||||
parents = []
|
parents = []
|
||||||
while entity_id:
|
while entity_id:
|
||||||
parents.append(entity_id)
|
parents.append(entity_id)
|
||||||
entity_id = get_entity_parent(entity_id, burger_entity_metadata)
|
entity_id = get_entity_parent(entity_id, burger_entity_data)
|
||||||
return parents
|
return parents
|
||||||
|
|
||||||
|
|
||||||
def get_entity_parent(entity_id: str, burger_entity_metadata: dict):
|
def get_entity_parent(entity_id: str, burger_entity_data: dict):
|
||||||
entity_metadata = burger_entity_metadata[entity_id]['metadata']
|
entity_metadata = burger_entity_data[entity_id]['metadata']
|
||||||
first_metadata = entity_metadata[0]
|
first_metadata = entity_metadata[0]
|
||||||
return first_metadata.get('entity')
|
return first_metadata.get('entity')
|
||||||
|
|
||||||
|
|
||||||
def get_entity_metadata(entity_id: str, burger_entity_metadata: dict):
|
def get_entity_metadata(entity_id: str, burger_entity_data: dict):
|
||||||
entity_metadata = burger_entity_metadata[entity_id]['metadata']
|
entity_metadata = burger_entity_data[entity_id]['metadata']
|
||||||
entity_useful_metadata = []
|
entity_useful_metadata = []
|
||||||
for metadata_item in entity_metadata:
|
for metadata_item in entity_metadata:
|
||||||
if 'data' in metadata_item:
|
if 'data' in metadata_item:
|
||||||
|
@ -564,8 +494,8 @@ def get_entity_metadata(entity_id: str, burger_entity_metadata: dict):
|
||||||
# returns a dict of {index: (name or bitfield)}
|
# returns a dict of {index: (name or bitfield)}
|
||||||
|
|
||||||
|
|
||||||
def get_entity_metadata_names(entity_id: str, burger_entity_metadata: dict, mappings: Mappings):
|
def get_entity_metadata_names(entity_id: str, burger_entity_data: dict, mappings: Mappings):
|
||||||
entity_metadata = burger_entity_metadata[entity_id]['metadata']
|
entity_metadata = burger_entity_data[entity_id]['metadata']
|
||||||
mapped_metadata_names = {}
|
mapped_metadata_names = {}
|
||||||
|
|
||||||
for metadata_item in entity_metadata:
|
for metadata_item in entity_metadata:
|
||||||
|
|
|
@ -222,7 +222,7 @@ def get_packets(direction: str, state: str):
|
||||||
return packet_ids, packet_class_names
|
return packet_ids, packet_class_names
|
||||||
|
|
||||||
|
|
||||||
def burger_instruction_to_code(instructions: list[dict], index: int, generated_packet_code: list[str], mappings: Mappings, obfuscated_class_name: str, uses: set, extra_code: list[str], known_variable_types={}) -> Optional[int]:
|
def burger_instruction_to_code(instructions: list[dict], index: int, generated_packet_code: list[str], mappings: Mappings, obfuscated_class_name: str, uses: set, extra_code: list[str]) -> Optional[int]:
|
||||||
'''
|
'''
|
||||||
Generate a field for an instruction, returns the number of instructions to skip (if any).
|
Generate a field for an instruction, returns the number of instructions to skip (if any).
|
||||||
'''
|
'''
|
||||||
|
@ -237,14 +237,12 @@ def burger_instruction_to_code(instructions: list[dict], index: int, generated_p
|
||||||
field_type_rs = None
|
field_type_rs = None
|
||||||
field_comment = None
|
field_comment = None
|
||||||
|
|
||||||
print('instruction', instruction)
|
|
||||||
|
|
||||||
# iterators
|
# iterators
|
||||||
if instruction['operation'] == 'write' and instruction['field'].endswith('.size()') and next_instruction and next_instruction['type'] == 'Iterator' and next_next_instruction and next_next_instruction['operation'] == 'loop':
|
if instruction['operation'] == 'write' and instruction['field'].endswith('.size()') and next_instruction and next_instruction['type'] == 'Iterator' and next_next_instruction and next_next_instruction['operation'] == 'loop':
|
||||||
obfuscated_field_name = instruction['field'].split('.')[
|
field_obfuscated_name = instruction['field'].split('.')[
|
||||||
0]
|
0]
|
||||||
field_name = mappings.get_field(
|
field_name = mappings.get_field(
|
||||||
obfuscated_class_name, obfuscated_field_name)
|
obfuscated_class_name, field_obfuscated_name)
|
||||||
|
|
||||||
# figure out what kind of iterator it is
|
# figure out what kind of iterator it is
|
||||||
loop_instructions = next_next_instruction['instructions']
|
loop_instructions = next_next_instruction['instructions']
|
||||||
|
@ -284,21 +282,10 @@ def burger_instruction_to_code(instructions: list[dict], index: int, generated_p
|
||||||
|
|
||||||
# Option<T>
|
# Option<T>
|
||||||
elif instruction['operation'] == 'write' and (instruction['field'].endswith('.isPresent()') or instruction['field'].endswith(' != null')) and next_instruction and (next_instruction.get('condition', '').endswith('.isPresent()') or next_instruction.get('condition', '').endswith(' != null')):
|
elif instruction['operation'] == 'write' and (instruction['field'].endswith('.isPresent()') or instruction['field'].endswith(' != null')) and next_instruction and (next_instruction.get('condition', '').endswith('.isPresent()') or next_instruction.get('condition', '').endswith(' != null')):
|
||||||
print('ok is option')
|
field_obfuscated_name = instruction['field'].split('.')[
|
||||||
obfuscated_field_name = instruction['field'].split('.')[
|
|
||||||
0].split(' ')[0]
|
0].split(' ')[0]
|
||||||
|
|
||||||
if obfuscated_field_name in known_variable_types:
|
|
||||||
# just use the known name since it's not gonna be in the mappings
|
|
||||||
obfuscated_field_name = known_variable_types[obfuscated_field_name]
|
|
||||||
|
|
||||||
field_name = mappings.get_field(
|
field_name = mappings.get_field(
|
||||||
obfuscated_class_name, obfuscated_field_name)
|
obfuscated_class_name, field_obfuscated_name)
|
||||||
|
|
||||||
if field_name is None: field_name = obfuscated_field_name.split('/')[-1]
|
|
||||||
if '<' in field_name:
|
|
||||||
field_name = 'value'
|
|
||||||
|
|
||||||
condition_instructions = next_instruction['instructions']
|
condition_instructions = next_instruction['instructions']
|
||||||
|
|
||||||
condition_types_rs = []
|
condition_types_rs = []
|
||||||
|
@ -325,34 +312,23 @@ def burger_instruction_to_code(instructions: list[dict], index: int, generated_p
|
||||||
field_type_rs, is_var, instruction_uses, instruction_extra_code = burger_type_to_rust_type(
|
field_type_rs, is_var, instruction_uses, instruction_extra_code = burger_type_to_rust_type(
|
||||||
field_type, field_name, instruction, mappings, obfuscated_class_name)
|
field_type, field_name, instruction, mappings, obfuscated_class_name)
|
||||||
|
|
||||||
if obfuscated_field_name in known_variable_types:
|
if '.' in obfuscated_field_name or ' ' in obfuscated_field_name or '(' in obfuscated_field_name:
|
||||||
# just use the known name since it's not gonna be in the mappings
|
|
||||||
field_name = obfuscated_field_name
|
|
||||||
|
|
||||||
elif '.' in obfuscated_field_name or ' ' in obfuscated_field_name or '(' in obfuscated_field_name:
|
|
||||||
field_type_rs2, obfuscated_field_name, field_comment = burger_field_to_type(
|
field_type_rs2, obfuscated_field_name, field_comment = burger_field_to_type(
|
||||||
obfuscated_field_name, mappings, obfuscated_class_name, known_variable_types)
|
obfuscated_field_name, mappings, obfuscated_class_name)
|
||||||
if not field_type_rs2:
|
if not field_type_rs2:
|
||||||
generated_packet_code.append(f'// TODO: {instruction}')
|
generated_packet_code.append(f'// TODO: {instruction}')
|
||||||
return
|
return
|
||||||
if obfuscated_field_name in known_variable_types:
|
|
||||||
# just use the known name since it's not gonna be in the mappings
|
|
||||||
obfuscated_field_name = known_variable_types[obfuscated_field_name]
|
|
||||||
print('got obfuscated_field_name', obfuscated_field_name)
|
|
||||||
|
|
||||||
# try to get the field name again with the new stuff we know
|
# try to get the field name again with the new stuff we know
|
||||||
field_name = mappings.get_field(
|
field_name = mappings.get_field(
|
||||||
obfuscated_class_name, obfuscated_field_name) or mappings.get_field(
|
obfuscated_class_name, obfuscated_field_name) or mappings.get_field(
|
||||||
obfuscated_class_name.split('$')[0], obfuscated_field_name)
|
obfuscated_class_name.split('$')[0], obfuscated_field_name)
|
||||||
if field_name is None:
|
|
||||||
field_name = obfuscated_field_name.split('/')[-1]
|
|
||||||
uses.update(instruction_uses)
|
uses.update(instruction_uses)
|
||||||
extra_code.extend(instruction_extra_code)
|
extra_code.extend(instruction_extra_code)
|
||||||
|
|
||||||
if not field_name:
|
if not field_name:
|
||||||
generated_packet_code.append(
|
generated_packet_code.append(
|
||||||
f'// TODO: unknown field {instruction}')
|
f'// TODO: unknown field {instruction}')
|
||||||
return skip
|
return
|
||||||
|
|
||||||
if is_var:
|
if is_var:
|
||||||
generated_packet_code.append('#[var]')
|
generated_packet_code.append('#[var]')
|
||||||
|
@ -364,7 +340,7 @@ def burger_instruction_to_code(instructions: list[dict], index: int, generated_p
|
||||||
return skip
|
return skip
|
||||||
|
|
||||||
|
|
||||||
def burger_field_to_type(field, mappings: Mappings, obfuscated_class_name: str, known_variable_types={}) -> tuple[Optional[str], str, Optional[str]]:
|
def burger_field_to_type(field, mappings: Mappings, obfuscated_class_name: str) -> tuple[Optional[str], str, Optional[str]]:
|
||||||
'''
|
'''
|
||||||
Returns field_type_rs, obfuscated_field_name, field_comment
|
Returns field_type_rs, obfuscated_field_name, field_comment
|
||||||
'''
|
'''
|
||||||
|
@ -377,12 +353,9 @@ def burger_field_to_type(field, mappings: Mappings, obfuscated_class_name: str,
|
||||||
print('field', field)
|
print('field', field)
|
||||||
obfuscated_first = field.split('.')[0]
|
obfuscated_first = field.split('.')[0]
|
||||||
obfuscated_second = field.split('.')[1].split('(')[0]
|
obfuscated_second = field.split('.')[1].split('(')[0]
|
||||||
# first = mappings.get_field(obfuscated_class_name, obfuscated_first)
|
first = mappings.get_field(obfuscated_class_name, obfuscated_first)
|
||||||
if obfuscated_first in known_variable_types:
|
first_type = mappings.get_field_type(
|
||||||
first_type = known_variable_types[obfuscated_first]
|
obfuscated_class_name, obfuscated_first)
|
||||||
else:
|
|
||||||
first_type = mappings.get_field_type(
|
|
||||||
obfuscated_class_name, obfuscated_first)
|
|
||||||
first_obfuscated_class_name: Optional[str] = mappings.get_class_from_deobfuscated_name(
|
first_obfuscated_class_name: Optional[str] = mappings.get_class_from_deobfuscated_name(
|
||||||
first_type)
|
first_type)
|
||||||
if first_obfuscated_class_name:
|
if first_obfuscated_class_name:
|
||||||
|
@ -395,8 +368,6 @@ def burger_field_to_type(field, mappings: Mappings, obfuscated_class_name: str,
|
||||||
else:
|
else:
|
||||||
second = obfuscated_second
|
second = obfuscated_second
|
||||||
first_type_short = first_type.split('.')[-1]
|
first_type_short = first_type.split('.')[-1]
|
||||||
if second in {'byteValue'}:
|
|
||||||
return (first_type_short, obfuscated_first, None)
|
|
||||||
return (first_type_short, obfuscated_first, f'TODO: Does {first_type_short}::{second}, may not be implemented')
|
return (first_type_short, obfuscated_first, f'TODO: Does {first_type_short}::{second}, may not be implemented')
|
||||||
return None, field, None
|
return None, field, None
|
||||||
|
|
||||||
|
|
|
@ -97,12 +97,8 @@ def burger_type_to_rust_type(burger_type, field_name: Optional[str] = None, inst
|
||||||
|
|
||||||
print('hm', enum_name)
|
print('hm', enum_name)
|
||||||
else:
|
else:
|
||||||
try:
|
enum_name = mappings.get_field_type(
|
||||||
enum_name = mappings.get_field_type(
|
obfuscated_class_name, enum_field)
|
||||||
obfuscated_class_name, enum_field)
|
|
||||||
except:
|
|
||||||
enum_name = mappings.get_class(obfuscated_class_name)
|
|
||||||
print(f'failed getting {obfuscated_class_name}.{enum_field} but continuing with {enum_name} anyways')
|
|
||||||
print('enum_name', enum_name)
|
print('enum_name', enum_name)
|
||||||
enum_obfuscated_name = mappings.get_class_from_deobfuscated_name(
|
enum_obfuscated_name = mappings.get_class_from_deobfuscated_name(
|
||||||
enum_name)
|
enum_name)
|
||||||
|
|
|
@ -177,11 +177,7 @@ def clear_version_cache():
|
||||||
if os.path.exists(get_dir_location(f'downloads/{file}')):
|
if os.path.exists(get_dir_location(f'downloads/{file}')):
|
||||||
os.remove(get_dir_location(f'downloads/{file}'))
|
os.remove(get_dir_location(f'downloads/{file}'))
|
||||||
|
|
||||||
burger_path = get_dir_location("downloads/Burger")
|
os.system(
|
||||||
if os.path.exists(burger_path):
|
f'cd {get_dir_location("downloads/Burger")} && git pull')
|
||||||
os.system(
|
os.system(
|
||||||
f'cd {burger_path} && git pull')
|
f'cd {get_dir_location("downloads/pixlyzer")} && git pull')
|
||||||
pixlyzer_path = get_dir_location('downloads/pixlyzer')
|
|
||||||
if os.path.exists(pixlyzer_path):
|
|
||||||
os.system(
|
|
||||||
f'cd {pixlyzer_path} && git pull')
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ def get_pixlyzer_data(version_id: str, category: str):
|
||||||
|
|
||||||
# TODO: right now this False is hard-coded, it should retry with this
|
# TODO: right now this False is hard-coded, it should retry with this
|
||||||
# enabled if # initially getting the data fails
|
# enabled if # initially getting the data fails
|
||||||
if True or (os.path.exists(target_dir) and not os.path.exists(f'{target_dir}/{category}.min.json')):
|
if False or (os.path.exists(target_dir) and not os.path.exists(f'{target_dir}/{category}.min.json')):
|
||||||
print('Downloading', category, 'from pixlyzer-data.')
|
print('Downloading', category, 'from pixlyzer-data.')
|
||||||
data = requests.get(f'https://gitlab.com/Bixilon/pixlyzer-data/-/raw/master/version/{version_id}/{category}.min.json?inline=false').text
|
data = requests.get(f'https://gitlab.com/Bixilon/pixlyzer-data/-/raw/master/version/{version_id}/{category}.min.json?inline=false').text
|
||||||
try:
|
try:
|
||||||
|
@ -219,8 +219,6 @@ def get_pixlyzer_data(version_id: str, category: str):
|
||||||
pom_xml = open(f'{pixlyzer_dir}/pom.xml', 'r').read()
|
pom_xml = open(f'{pixlyzer_dir}/pom.xml', 'r').read()
|
||||||
pom_xml = re.sub(
|
pom_xml = re.sub(
|
||||||
'<dependencies>.*?</dependencies>', f'<dependencies>{pom_xml_dependencies}</dependencies>', pom_xml, flags=re.DOTALL)
|
'<dependencies>.*?</dependencies>', f'<dependencies>{pom_xml_dependencies}</dependencies>', pom_xml, flags=re.DOTALL)
|
||||||
pom_xml = re.sub(
|
|
||||||
'<minecraft\.version>.*?</minecraft\.version>', f'<minecraft.version>{version_id}</minecraft.version>', pom_xml, flags=re.DOTALL)
|
|
||||||
open(f'{pixlyzer_dir}/pom.xml', 'w').write(pom_xml)
|
open(f'{pixlyzer_dir}/pom.xml', 'w').write(pom_xml)
|
||||||
|
|
||||||
# compile
|
# compile
|
||||||
|
|
|
@ -68,13 +68,6 @@ class Mappings:
|
||||||
return self.fields.get(obfuscated_class_name, {}).get(obfuscated_field_name)
|
return self.fields.get(obfuscated_class_name, {}).get(obfuscated_field_name)
|
||||||
|
|
||||||
def get_class(self, obfuscated_class_name):
|
def get_class(self, obfuscated_class_name):
|
||||||
if '<' in obfuscated_class_name:
|
|
||||||
first_part, args = obfuscated_class_name.split('<')
|
|
||||||
args = args.rstrip('>').strip(';').split(';')
|
|
||||||
print(args)
|
|
||||||
assert len(args) == 1
|
|
||||||
arg = self.get_class(args[0][1:])
|
|
||||||
return f'{first_part}<{arg}>'
|
|
||||||
return self.classes[obfuscated_class_name]
|
return self.classes[obfuscated_class_name]
|
||||||
|
|
||||||
def get_method(self, obfuscated_class_name, obfuscated_method_name, obfuscated_signature):
|
def get_method(self, obfuscated_class_name, obfuscated_method_name, obfuscated_signature):
|
||||||
|
|
|
@ -6,7 +6,6 @@ import lib.code.version
|
||||||
import lib.code.blocks
|
import lib.code.blocks
|
||||||
import lib.code.packet
|
import lib.code.packet
|
||||||
import lib.code.shapes
|
import lib.code.shapes
|
||||||
import lib.code.entity
|
|
||||||
import lib.code.utils
|
import lib.code.utils
|
||||||
import lib.download
|
import lib.download
|
||||||
import lib.extract
|
import lib.extract
|
||||||
|
@ -135,10 +134,6 @@ print('Generating registries...')
|
||||||
registries = lib.extract.get_registries_report(new_version_id)
|
registries = lib.extract.get_registries_report(new_version_id)
|
||||||
lib.code.registry.generate_registries(registries)
|
lib.code.registry.generate_registries(registries)
|
||||||
|
|
||||||
print('Generating entity metadata...')
|
|
||||||
burger_entities_data = new_burger_data[0]['entities']
|
|
||||||
lib.code.entity.generate_entity_metadata(burger_entities_data, new_mappings)
|
|
||||||
|
|
||||||
print('Finishing touches, setting version in README and formatting code...')
|
print('Finishing touches, setting version in README and formatting code...')
|
||||||
lib.code.version.set_version_id(new_version_id)
|
lib.code.version.set_version_id(new_version_id)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue