Skip to content

OpenYSM/YSMParser

Repository files navigation

logo

YSMParser

.ysm模型一键解密、转换为Blockbench工程,全版本加密格式支持。

One-click decryption of .ysm models and conversion to Blockbench projects, with support for all encrypted format versions.

语言 / Language: 简体中文 | English

perview.mp4

简体中文

切换到 English

总览

是,史蒂夫模型是一款《我的世界》模型载入模组。由于作者TartaricAcid拟似患上偏执型人格障碍,在原有的不安全加密方案出现公共攻击之后为了保护他的兒子,使用C++重写了加密和渲染,且渲染使用C++编写完全为了防止Java Hooks导出模型。为了防止社区认为他是精神障碍患者,其在Modrinth主页上声称使用被盗的VMProtect和没有缓存的jni渲染是极大的提升了渲染效率。

本项目提供了完全解密其C++重写版本的加密及所有旧版本加密的方案。

1

功能

  • 支援全部格式版本
  • 当模型仅保存顶点/法线/UV 时,自动还原BlockBench的 origin、size、pivot、rotation与各面uv字段
  • 还原工程文件: modelsanimationscontrollertexturessoundslangavatarysm.json

格式支持

格式 支援
V1
V2
V3 (format < 4)
V3 (format 4 ~ 15)
V3 (format > 15)
V3 (format ≥ 26)
V3 (format ≥ 32)

教学

  1. 构建或者下载符合您的作业系统的可执行文件
  2. 创建一个输入目录,将所有需要解密的.ysm文件放入
  3. 运行命令列
YSMParser -i <输入目录> -o <输出目录> [-v] [-j <线程数>]
参数 说明
-i, --input 输入目录(必须),将处理其中的全部 .ysm 文件
-o, --output 输出根目录(必须)
-v, --verbose 详细输出模式(强制单线程)
-j, --threads 并行线程数(默认 0 = 自动检测 CPU 核心数)
--version 显示版本号

示例:

# 所有文件放入input文件夹
YSMParser -i input -o output

构建

环境:

  • CMake ≥ 3.12
  • C++20 Compiler

可执行文件构建

# 配置 (Windows x64 Release)
cmake --preset x64-release

# 编译
cmake --build --preset x64-release

WASM构建

# Node.js
cmake --preset wasm-release
cmake --build --preset wasm-release

# Web
cmake --preset wasm-web-release
cmake --build --preset wasm-web-release

WASM构建需要EMSDK环境变量指向Emscripten安装目录。

FAQ

Q:为什么还原出的模型参数(如长宽高、旋转角、中心点)与我的未加密原文件不同?

A: 因为 YSM 导出会将模型 “烘焙” 为最底层的顶点和面数据,丢失了原本直观的尺寸参数。为了让模型能在 BlockBench 中再次编辑,YSMParser 使用了几何反推算法,通过点和面重新“猜”出模型的参数。由于多种不同的参数组合能拼凑出完全相同的外观,因此反推参数可能与原文件有出入,但请放心,模型在实际渲染时的视觉外观是完全一致的

Q:为什么我还原出来的模型完全错位,甚至方块扭曲崩塌了?

A: 这通常是因为几何反推算法出现了误判。如果原模型包含极其复杂的嵌套旋转、极近的重合顶点或非标准几何体,算法可能会算错特定骨骼的中心点(Pivot)或旋转方向,从而导致关联部件错位或崩塌。如果您遇到了这种情况,欢迎提交 Issue 并附带出错的 .ysm 文件。如果条件允许,请尽量附带该模型的未加密原文件,这会对我们优化算法、修复问题提供极大的帮助!

鸣谢

依赖库

所有依赖以源码形式vendored在external下。

依赖
zstd
zlib
cityhash
xchacha20
AES
md5
cpp-base64
fpng
json
CLI11

English

Switch to 简体中文

Overview

Yes Steve Model is a Minecraft model-loading mod. Because its author, TartaricAcid, allegedly appears to suffer from paranoid personality disorder, after public attacks emerged against the original insecure encryption scheme, he rewrote the encryption and rendering in C++ in order to protect his son, and wrote the renderer in C++ entirely to prevent model exporting through Java hooks. To prevent the community from thinking that he is mentally ill, he claimed on the Modrinth page that using a stolen copy of VMProtect and uncached JNI rendering greatly improved rendering performance.

This project provides a complete decryption solution for both the C++-rewritten encrypted version and all older encrypted versions.

1

Features

  • Supports all format versions
  • When a model stores only vertices/normals/UVs, automatically reconstructs BlockBench origin, size, pivot, rotation, and per-face uv fields
  • Restores project files: models, animations, controller, textures, sounds, lang, avatar, ysm.json

Format Support

Format Support
V1
V2
V3 (format < 4)
V3 (format 4 ~ 15)
V3 (format > 15)
V3 (format ≥ 26)
V3 (format ≥ 32)

Tutorial

  1. Build or download the executable that matches your operating system
  2. Create an input directory and place all .ysm files that need to be decrypted into it
  3. Run the command line
YSMParser -i <input-directory> -o <output-directory> [-v] [-j <thread-count>]
Parameter Description
-i, --input Input directory (required); all .ysm files inside it will be processed
-o, --output Output root directory (required)
-v, --verbose Verbose output mode (forces single-threaded execution)
-j, --threads Parallel thread count (default 0 = automatically detect CPU core count)
--version Show version

Example:

# Put all files into the input folder
YSMParser -i input -o output

Build

Environment:

  • CMake ≥ 3.12
  • C++20 Compiler

Executable Build

# Configure (Windows x64 Release)
cmake --preset x64-release

# Build
cmake --build --preset x64-release

WASM Build

# Node.js
cmake --preset wasm-release
cmake --build --preset wasm-release

# Web
cmake --preset wasm-web-release
cmake --build --preset wasm-web-release

The WASM build requires the EMSDK environment variable to point to the Emscripten installation directory.

FAQ

Q: Why are the restored model parameters, such as dimensions, rotation angles, and pivot points, different from my original unencrypted file?

A: This is because YSM export "bakes" the model down into raw vertex and face data, losing the original intuitive size parameters. To make the model editable again in BlockBench, YSMParser uses a geometric reverse-inference algorithm to "guess" the model parameters back from points and faces. Since many different parameter combinations can produce exactly the same visual appearance, the inferred parameters may differ from the original file. However, the actual rendered visual result remains exactly the same.

Q: Why is my restored model completely misaligned, or even twisted and collapsed?

A: This is usually caused by a misjudgment in the geometric reverse-inference algorithm. If the original model contains extremely complex nested rotations, very closely overlapping vertices, or non-standard geometry, the algorithm may infer the pivot point or rotation direction of certain bones incorrectly, causing related parts to shift or collapse. If you encounter this, feel free to submit an Issue and attach the problematic .ysm file. If possible, please also include the original unencrypted source file of the model, as that would greatly help us optimize the algorithm and fix the issue.

Acknowledgements

  • TartaricAcid: Downloaded a stolen copy of VMProtect, and through misconfiguration left all key functions unencrypted, then randomly pressed the numpad to input new magic constants for encryption arithmetic as recommended by ChatGPT 4o (Free tier)
  • Ivan Permyakov: Created VMProtect
  • Geoff Pike: Created CityHash64
  • Makoto Matsumoto: Created MT19937_64
  • Scott Arciszewski: Created XChaCha20
  • ChatGPT 4o: Helped TartaricAcid create the encryption scheme

Dependencies

All dependencies are vendored in source form under external.

Dependency
zstd
zlib
cityhash
xchacha20
AES
md5
cpp-base64
fpng
json
CLI11

About

A Parser to recover Yes-Steve-Model Encrypted Binaries.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors