mirror of
https://github.com/mat-1/azalea.git
synced 2025-08-02 14:26:04 +00:00
metadata.rs codegen
This commit is contained in:
parent
e1ff4f7300
commit
a9b1b54cb1
5 changed files with 7 additions and 8 deletions
|
@ -47,7 +47,6 @@ impl McBufWritable for EntityMetadata {
|
|||
#[derive(Clone, Debug, EnumAsInner)]
|
||||
pub enum EntityDataValue {
|
||||
Byte(u8),
|
||||
// varint
|
||||
Int(i32),
|
||||
Float(f32),
|
||||
String(String),
|
||||
|
|
|
@ -6,16 +6,16 @@
|
|||
//! code, since everything from azalea_client is re-exported in azalea.
|
||||
//!
|
||||
//! # Installation
|
||||
//!
|
||||
//!
|
||||
//! First, install Rust nightly with `rustup install nightly` and `rustup
|
||||
//! default nightly`.
|
||||
//!
|
||||
//!
|
||||
//! Then, add one of the following lines to your Cargo.toml.\
|
||||
//! Latest bleeding-edge version:
|
||||
//! `azalea = { git="https://github.com/mat-1/Cargo.toml" }`
|
||||
//! Latest "stable" release:
|
||||
//! `azalea = "0.3"`
|
||||
//!
|
||||
//!
|
||||
//! # Examples
|
||||
//!
|
||||
//! ```rust,no_run
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from typing import Optional
|
||||
from lib.code.utils import burger_type_to_rust_type, write_packet_file
|
||||
from lib.utils import padded_hex, to_snake_case, to_camel_case, get_dir_location
|
||||
from lib.code.utils import burger_type_to_rust_type, write_packet_file
|
||||
from lib.mappings import Mappings
|
||||
from typing import Optional
|
||||
import os
|
||||
import re
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
from typing import Optional
|
||||
from lib.utils import to_snake_case, upper_first_letter, get_dir_location, to_camel_case
|
||||
from ..mappings import Mappings
|
||||
from typing import Optional
|
||||
import re
|
||||
|
||||
REGISTRIES_DIR = get_dir_location('../azalea-registry/src/lib.rs')
|
||||
|
|
|
@ -71,7 +71,7 @@ class Mappings:
|
|||
return self.classes[obfuscated_class_name]
|
||||
|
||||
def get_method(self, obfuscated_class_name, obfuscated_method_name, obfuscated_signature):
|
||||
print(obfuscated_class_name, self.methods[obfuscated_class_name])
|
||||
# print(obfuscated_class_name, self.methods[obfuscated_class_name])
|
||||
return self.methods[obfuscated_class_name][f'{obfuscated_method_name}({obfuscated_signature})']
|
||||
|
||||
def get_field_type(self, obfuscated_class_name, obfuscated_field_name) -> str:
|
||||
|
|
Loading…
Add table
Reference in a new issue