Skip to content

Commit

Permalink
+ 为所有默认骨骼添加root骨骼,翅膀等附加物在坐下时也会跟随向下移动了
Browse files Browse the repository at this point in the history
+ 为模型包转换器增加root骨骼的设置步骤,此前版本的皮肤包不在适用,需要重新生成
  • Loading branch information
ENIACJushi committed Jul 17, 2024
1 parent 6566a8b commit 10f003a
Show file tree
Hide file tree
Showing 128 changed files with 312 additions and 81,155 deletions.
53 changes: 53 additions & 0 deletions .Tools/json压缩(文件版).html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="utf-8" content="text/html; charset=GBK">
<meta name="viewport" content="width=device-width">
<title>将json压缩成1行</title>
</head>
<body>
<h1>将json压缩成1行</h1>

<input type="file" id="file" name="file" style="padding:10px;" multiple/>

<hr>

<div style="text-indent: 10px;">

</div>

<!-- 样式 -->
<style type="text/css">
table td{padding:5px;}
</style>

<!-- 主要处理 -->
<script>
const fileUploader = document.getElementById('file');
fileUploader.addEventListener('change', (event) => {


for(let file of event.target.files){

const reader = new FileReader();

reader.onload = function(e) {
let input = e.target.result;
input = JSON.parse(input);
input = JSON.stringify(input);

var aTag = document.createElement('a');
var blob = new Blob([input]);
aTag.download = file.name;
aTag.href = URL.createObjectURL(blob);
aTag.click();
URL.revokeObjectURL(blob);
};

reader.readAsText(file, file.name);
}
});
</script>
</body>
</html>

53 changes: 53 additions & 0 deletions .Tools/新版本模型转为旧版本.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="utf-8" content="text/html; charset=GBK">
<meta name="viewport" content="width=device-width">
<title>新版本模型转为旧版本(1.10)</title>
</head>
<body>
<h1>新版本模型转为旧版本</h1>

<input type="file" id="file" name="file" style="padding:10px;" multiple/>

<hr>

<div style="text-indent: 10px;">

</div>

<!-- 样式 -->
<style type="text/css">
table td{padding:5px;}
</style>

<!-- 主要处理 -->
<script>
const fileUploader = document.getElementById('file');
fileUploader.addEventListener('change', (event) => {


for(let file of event.target.files){

const reader = new FileReader();

reader.onload = function(e) {
let input = e.target.result;
input = JSON.parse(input);
input = JSON.stringify(input);

var aTag = document.createElement('a');
var blob = new Blob([input]);
aTag.download = file.name;
aTag.href = URL.createObjectURL(blob);
aTag.click();
URL.revokeObjectURL(blob);
};

reader.readAsText(file, file.name);
}
});
</script>
</body>
</html>

10 changes: 8 additions & 2 deletions Docs/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,15 @@ NTR工具:开墓碑
- 记录了放置者的id/name、方块的位置和方向(为了避免意外位移)
- 每60秒,先检查原位置的方块隙间是否还在,然后检查自身是否还在原位置,接着以原位置为基点,将附近属于放置者的女仆的物品放入其对着的容器内
- 有九格容积,只能由放置者打开,在将女仆背包内的物品转移到箱子时,会按种类和数量保留这些物品
- *女仆在背包充满时,会暂停农业扫描,并主动前往最近的、属于同一主人的隙间
- *农业模式下,女仆在背包充满时,会暂停农业扫描,并主动前往最近的、属于同一主人的隙间

基础教程书(无UI版)

一键打包脚本,包含版本号修改、json文件压缩功能

去除假日创造者 https://feedback.minecraft.net/hc/en-us/articles/28486285876237-Minecraft-Beta-Preview-1-21-20-23

- 为祭坛合成的 tag 匹配补充原版的组件 tag,原 tag 方案改为 group 以作区分
- 庭灯:可以存储P点、为附近的女仆提供buff,打掉之后P点会以lore的形式存储在物品之中(需要测试lore中是否能包含translate文本)
- 更新默认包女仆模型
- 御币改为长按连发
Expand All @@ -25,7 +31,7 @@ NTR工具:开墓碑
- 每人持有女仆的上限
- 提供外部数据导入接口
- 参考美西螈制作水下移动
- 利用鹦鹉的骑乘来做女仆的骑乘模式
- 利用鹦鹉的骑乘来做女仆的抱起模式

适配动画
- 初步探索,修改动画,用爱丽丝的模型试验(进行中)
Expand Down
38 changes: 27 additions & 11 deletions SkinPacksConvertor/模型包转换器.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,12 @@ <h1>车万女仆模型包转换器</h1>
}
}

//// 文件列表 ////
//// 页面交互 ////
// 文件列表
var fileList = []; // [ {"name":"xxx.xx"} ]
var processing = false; // 正在处理

//// 添加文件事件 ////
// 添加文件事件
const fileUploader = document.getElementById('file');
fileUploader.addEventListener('change', (event) => {
const files = event.target.files;
Expand All @@ -159,7 +160,7 @@ <h1>车万女仆模型包转换器</h1>
res.innerHTML = msg;
}

//// 改变文件位置 ////
// 改变文件位置
function file_up(num){
if(num == 0 || processing) return;
var temp = fileList[num-1];
Expand All @@ -181,6 +182,29 @@ <h1>车万女仆模型包转换器</h1>
}

//// 转换并输出 ////
// 骨骼处理
function processBone(bones){
if(bones===undefined) return false;

// 添加根骨骼 root
let hasRoot = false;
let _xxx = new Set();
for(let bone of bones){
if(bone["name"] === "root"){
hasRoot = true;
continue;
}
// 对于没有父骨骼的骨骼,将父骨骼设为"root"
if(bone["parent"] === undefined){
bone["parent"] = "root";
}
}
// 如果没有root骨骼,则创建root骨骼
if(!hasRoot) bones.unshift(rootBone);

return true;
}
// 主函数
function startConvert(){
if(processing) return;
console.log("Start converting..");
Expand Down Expand Up @@ -310,14 +334,6 @@ <h1>车万女仆模型包转换器</h1>
processBone(input[key]["bones"])
}
}
function processBone(bones){
for(let bone of bones){
// 对于没有父骨骼的骨骼,将父骨骼设为"root"
if(bone["parent"] === undefined){
bone["parent"] = "root";
}
}
}

bedrock = JSON.stringify(bedrock);

Expand Down
4 changes: 3 additions & 1 deletion TouHouLittleMaid_BP/blocks/skull/fairy_skull_2.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,9 @@
"components": {

"minecraft:geometry": "geometry.touhou_little_maid.fairy_skull_block_up",
"minecraft:material_instances": { "*": { "texture": "fairy_skull_2", "render_method": "alpha_test" } },
"minecraft:material_instances": {
"*": { "texture": "fairy_skull_2", "render_method": "alpha_test" }
},
"minecraft:map_color": "#B5E61D",
"minecraft:destructible_by_mining": {
"seconds_to_destroy": 1.0
Expand Down
2 changes: 1 addition & 1 deletion TouHouLittleMaid_BP/entities/maid/maid.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
"status:follow_standard":{
"minecraft:behavior.follow_owner": {
"priority": 6,
"speed_multiplier": 1.25,
"speed_multiplier": 1.4,
"start_distance": 10,
"stop_distance": 3,
"can_teleport": true
Expand Down
19 changes: 19 additions & 0 deletions TouHouLittleMaid_BP/items/7fc2dcef9d9b81fbf0a3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"format_version": "1.20.50",
"minecraft:item": {
"description": {

"identifier": "touhou_little_maid:wireless_io"
},
"components": {
"minecraft:max_stack_size": 64,
"minecraft:interact_button": "item.oreville:yvcmer.iprxztw",
"minecraft:display_name": {
"value": "item.oreville:yvcmer.name"
},
"minecraft:icon": {
"texture": "touhou_little_maid.dragon_skull"
}
}
}
}
53 changes: 20 additions & 33 deletions TouHouLittleMaid_RP/animations/entity/maid.animation.json
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
{
"format_version": "1.8.0",
"animations": {
"animation.touhou_little_maid.statue_base":{
"loop":true,
"animation.touhou_little_maid.statue_base": {
"loop": true,
"bones": {
"statue_base" : {
"position" : [ 0, -5.5, 0 ],
"scale":[0.5, 0.5, 0.5]
"statue_base": {
"position": [0, -5.5, 0],
"scale": [0.5, 0.5, 0.5]
}
}
},
"animation.touhou_little_maid.maid.backpack_offset":{
"loop":true,
"animation.touhou_little_maid.maid.backpack_offset": {
"loop": true,
"bones": {
"backpack" : {
"position" : [ 0, 8, 4 ]
"backpack": {
"position": [0, 8, 4]
}
}
},
"animation.touhou_little_maid.emote": {
"loop": true,
"bones": {
"emote": {
"rotation": [
0,
"query.camera_rotation(1) - q.body_y_rotation",
0
],
"position":[0, 28, 0]
}
"emote": {
"rotation": [0, "query.camera_rotation(1) - q.body_y_rotation", 0],
"position": [0, 28, 0]
}
}
},

"animation.touhou_little_maid.maid.beg": {
"loop": true,
"bones": {
Expand All @@ -48,28 +43,25 @@
"animation.touhou_little_maid.maid.sit": {
"loop": true,
"bones": {
"body": {
"root": {
"position": [0, -7, 0]
},
"armLeft": {
"rotation": [-50.60796, 20.86371, 14.12716],
"position": [0, -7, 0]
"rotation": [-50.60796, 20.86371, 14.12716]
},
"LeftForeArm": {
"rotation": [-60.94031, 19.61291, -8.71337],
"position": [0, 0, 0]
},
"armRight": {
"rotation": [-53.54725, -27.24469, -9.67384],
"position": [0, -7, 0]
"rotation": [-53.54725, -27.24469, -9.67384]
},
"RightForeArm": {
"rotation": [-47.5, 0, 0],
"position": [0, 0, 0]
},
"legLeft": {
"rotation": [-76.18803, -4.56361, -11.06107],
"position": [0, -7, 0]
"rotation": [-76.18803, -4.56361, -11.06107]
},
"LeftLowerLeg": {
"rotation": [105, 0, 0],
Expand All @@ -80,20 +72,15 @@
"position": [0, 0, 0]
},
"legRight": {
"rotation": [-76.26839, 3.50905, 10.2682],
"position": [0, -7, 0]
"rotation": [-76.26839, 3.50905, 10.2682]
},
"head": {
"rotation": [-7.5, 0, 0],
"position": [0, -7.3, 0]
"position": [0, -0.3, 0]
},
"sittingRotationSkirt": {
"rotation": [-37.5, 0, 0],
"position": [0, 0.5, 0.8]
},

"robe": {
"position": [0, -7, 0]
"position": [0, 0.5, -0.2]
}
}
}
Expand Down
Loading

0 comments on commit 10f003a

Please sign in to comment.