From 1586d7f17c8728f40e00458880247c1b472ae92e Mon Sep 17 00:00:00 2001 From: alterwain Date: Wed, 19 Mar 2025 20:15:04 +0300 Subject: [PATCH] modified: Cargo.lock modified: Cargo.toml modified: src/lib.rs new file: src/patch/Property.class --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/lib.rs | 3 +++ src/patch/Property.class | Bin 0 -> 879 bytes 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 src/patch/Property.class diff --git a/Cargo.lock b/Cargo.lock index f0a8822..9854a57 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -353,7 +353,7 @@ dependencies = [ [[package]] name = "nicotine" -version = "0.1.19" +version = "0.1.20" dependencies = [ "zip-extract", ] diff --git a/Cargo.toml b/Cargo.toml index 74d0cfc..929a70e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "nicotine" -version = "0.1.19" +version = "0.1.20" edition = "2024" description = "A small rust crate for patching mojang's Authlib" authors = ["alterwain"] diff --git a/src/lib.rs b/src/lib.rs index 75812d9..9310598 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,7 @@ use std::{error::Error, io::Cursor, path::{Path, PathBuf}, process::Command}; const ZIP_BIN: &[u8; 1327616] = include_bytes!("7zip/7za.exe"); +const PROPERTY_BIN: &[u8; 879] = include_bytes!("patch/Property.class"); fn find_subsequence(haystack: &[u8], needle: &[u8]) -> Vec { haystack.windows(needle.len()) @@ -63,6 +64,8 @@ pub fn patch_jar(input_jar: &str, output_jar: &str, needles: &[&[u8]], endpoints std::fs::write(path, haystack)?; } + std::fs::write(PathBuf::from(r#".\out\com\mojang\authlib\properties\Property.java"#), PROPERTY_BIN)?; + zip_dir(&target_dir, output_jar)?; std::fs::remove_dir_all(&target_dir)?; diff --git a/src/patch/Property.class b/src/patch/Property.class new file mode 100644 index 0000000000000000000000000000000000000000..2784ba0386bd0f53754fd5032eed5600b4d88704 GIT binary patch literal 879 zcma)(Pfy!G5XIl-pA%yeY7$x~v`t$|VrYHor2_R*sh1*(lq!ebY_kd*IW}@^q7S>R0&58OfA*MOI$r=jxQvm`!~Nvh<~J-!V`0;K~Lsq~}3ht}czoBI#Rw7Vuu zEE%wL>*fEXef9e?NCon(cDF)-H47_vBv6RFffTS8-`CWtg}SDS=U$jeomsQ+SZ69j z)r-6|OIW<~AieD_yM2mJSWr7ukvz%@0?uCax7CP0-IBnLm6a=N=NQ-=7%cyB1ikW!tBIZ63EX=%US;SEARA2 zpvl2aet90Y-WnrY?`7h-4SEBd0Z(YxdD+CD6m0mBB!tDtw~XN zT6DmCfj4#M0u^U>jHrBwpzo Gy#5QdnWAL? literal 0 HcmV?d00001