9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2025-12-24 17:39:30 +00:00

Merge pull request #11 from Xiao-MoMi/main

上游更新
This commit is contained in:
jhqwqmc
2025-02-12 21:35:57 +08:00
committed by GitHub
25 changed files with 192 additions and 23 deletions

View File

@@ -1,25 +1,49 @@
items:
default:beginner_rod:
default:topaz_rod:
material: fishing_rod
custom-model-data: 1000
data:
display-name: "Beginner Rod"
lore:
- "This is the description"
display-name: "<!i><#FF8C00>Topaz Rod"
model:
type: "minecraft:condition"
property: "minecraft:fishing_rod/cast"
on-false:
type: "minecraft:model"
path: "minecraft:item/custom/beginner_rod"
generation:
parent: "minecraft:item/fishing_rod"
textures:
"layer0": "minecraft:item/custom/beginner_rod"
on-true:
type: "minecraft:model"
path: "minecraft:item/custom/beginner_rod_cast"
generation:
parent: "minecraft:item/fishing_rod"
textures:
"layer0": "minecraft:item/custom/beginner_rod_cast"
template: models:fishing_rod_2d
arguments:
rod_model: minecraft:item/custom/topaz_rod
rod_texture: minecraft:item/custom/topaz_rod
rod_cast_model: minecraft:item/custom/topaz_rod_cast
rod_cast_texture: minecraft:item/custom/topaz_rod_cast
default:topaz_bow:
material: bow
custom-model-data: 1000
data:
display-name: "<!i><#FF8C00>Topaz Bow"
model:
template: models:bow_2d
arguments:
bow_model: minecraft:item/custom/topaz_bow
bow_texture: minecraft:item/custom/topaz_bow
bow_pulling_0_model: minecraft:item/custom/topaz_bow_pulling_0
bow_pulling_0_texture: minecraft:item/custom/topaz_bow_pulling_0
bow_pulling_1_model: minecraft:item/custom/topaz_bow_pulling_1
bow_pulling_1_texture: minecraft:item/custom/topaz_bow_pulling_1
bow_pulling_2_model: minecraft:item/custom/topaz_bow_pulling_2
bow_pulling_2_texture: minecraft:item/custom/topaz_bow_pulling_2
default:topaz_crossbow:
material: crossbow
custom-model-data: 1000
data:
display-name: "<!i><#FF8C00>Topaz Crossbow"
model:
template: models:crossbow_2d
arguments:
crossbow_model: minecraft:item/custom/topaz_crossbow
crossbow_texture: minecraft:item/custom/topaz_crossbow
crossbow_pulling_0_model: minecraft:item/custom/topaz_crossbow_pulling_0
crossbow_pulling_0_texture: minecraft:item/custom/topaz_crossbow_pulling_0
crossbow_pulling_1_model: minecraft:item/custom/topaz_crossbow_pulling_1
crossbow_pulling_1_texture: minecraft:item/custom/topaz_crossbow_pulling_1
crossbow_pulling_2_model: minecraft:item/custom/topaz_crossbow_pulling_2
crossbow_pulling_2_texture: minecraft:item/custom/topaz_crossbow_pulling_2
crossbow_arrow_texture: minecraft:item/custom/topaz_crossbow_arrow
crossbow_arrow_model: minecraft:item/custom/topaz_crossbow_arrow
crossbow_firework_texture: minecraft:item/custom/topaz_crossbow_firework
crossbow_firework_model: minecraft:item/custom/topaz_crossbow_firework

View File

@@ -29,7 +29,7 @@ items:
material: paper
custom-model-data: 1012
data:
display-name: "<!i>Topaz"
display-name: "<!i><#FF8C00>Topaz"
model:
template: models:generated
arguments:

View File

@@ -222,6 +222,16 @@ items:
behavior:
type: block_item
block: default:palm_planks
default:palm_sapling:
material: paper
custom-model-data: 1005
data:
display-name: "<!i>Palm Sapling"
model:
template: models:generated
arguments:
model_path: "minecraft:item/custom/palm_sapling"
texture_path: "minecraft:block/custom/palm_sapling"
default:palm_leaves:
material: oak_leaves
custom-model-data: 1000

View File

@@ -8,6 +8,118 @@ templates:
parent: "minecraft:item/generated"
textures:
"layer0": "{texture_path}"
models:fishing_rod_2d:
type: "minecraft:condition"
property: "minecraft:fishing_rod/cast"
on-false:
type: "minecraft:model"
path: "{rod_model}"
generation:
parent: "minecraft:item/fishing_rod"
textures:
"layer0": "{rod_texture}"
on-true:
type: "minecraft:model"
path: "{rod_cast_model}"
generation:
parent: "minecraft:item/fishing_rod"
textures:
"layer0": "{rod_cast_texture}"
models:bow_2d:
type: "minecraft:condition"
property: "minecraft:using_item"
on-false:
type: "minecraft:model"
path: "{bow_model}"
generation:
parent: "minecraft:item/bow"
textures:
"layer0": "{bow_texture}"
on-true:
type: "minecraft:range_dispatch"
property: "minecraft:use_duration"
scale: 0.05
entries:
- model:
type: minecraft:model
path: "{bow_pulling_1_model}"
generation:
parent: "minecraft:item/bow_pulling_1"
textures:
"layer0": "{bow_pulling_1_texture}"
threshold: 0.65
- model:
type: minecraft:model
path: "{bow_pulling_2_model}"
generation:
parent: "minecraft:item/bow_pulling_2"
textures:
"layer0": "{bow_pulling_2_texture}"
threshold: 0.65
fallback:
type: minecraft:model
path: "{bow_pulling_0_model}"
generation:
parent: "minecraft:item/bow_pulling_0"
textures:
"layer0": "{bow_pulling_0_texture}"
models:crossbow_2d:
type: "minecraft:condition"
property: "minecraft:using_item"
on-false:
type: "minecraft:select"
property: "minecraft:charge_type"
cases:
- when: arrow
model:
type: minecraft:model
path: "{crossbow_arrow_model}"
generation:
parent: "minecraft:item/crossbow_arrow"
textures:
"layer0": "{crossbow_arrow_texture}"
- when: rocket
model:
type: minecraft:model
path: "{crossbow_firework_model}"
generation:
parent: "minecraft:item/crossbow_firework"
textures:
"layer0": "{crossbow_firework_texture}"
fallback:
type: minecraft:model
path: "{crossbow_model}"
generation:
parent: "minecraft:item/crossbow"
textures:
"layer0": "{crossbow_texture}"
on-true:
type: "minecraft:range_dispatch"
property: "minecraft:crossbow/pull"
entries:
- model:
type: minecraft:model
path: "{crossbow_pulling_1_model}"
generation:
parent: "minecraft:item/crossbow_pulling_1"
textures:
"layer0": "{crossbow_pulling_1_texture}"
threshold: 0.58
- model:
type: minecraft:model
path: "{crossbow_pulling_2_model}"
generation:
parent: "minecraft:item/crossbow_pulling_2"
textures:
"layer0": "{crossbow_pulling_2_texture}"
threshold: 1.0
fallback:
type: minecraft:model
path: "{crossbow_pulling_0_model}"
generation:
parent: "minecraft:item/crossbow_pulling_0"
textures:
"layer0": "{crossbow_pulling_0_texture}"
# Block Settings
block_settings:surface_decoration:

View File

@@ -0,0 +1,6 @@
{
"animation": {
"interpolate": true,
"frametime": 10
}
}

View File

@@ -0,0 +1,6 @@
{
"animation": {
"interpolate": true,
"frametime": 10
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 984 B

View File

@@ -130,8 +130,18 @@ public class PackManagerImpl implements PackManager {
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/font/image/icons.png");
// items
plugin.saveResource("resources/default/configuration/items.yml");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/beginner_rod.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/beginner_rod_cast.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_rod.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_rod_cast.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_bow.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_bow_pulling_0.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_bow_pulling_1.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_bow_pulling_2.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_crossbow_arrow.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_crossbow_firework.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_crossbow_pulling_0.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_crossbow_pulling_1.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_crossbow_pulling_2.png");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/item/custom/topaz_crossbow.png");
// ores
plugin.saveResource("resources/default/configuration/ores.yml");
plugin.saveResource("resources/default/resourcepack/assets/minecraft/textures/block/custom/deepslate_topaz_ore.png");

View File

@@ -62,6 +62,7 @@ public class RangeDispatchItemModel implements ItemModel {
jo.add("model", model.get());
array.add(jo);
}
json.add("entries", array);
if (scale != 1) {
json.addProperty("scale", scale);
}