diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/amethyst_torch.yml b/common-files/src/main/resources/resources/default/configuration/blocks/amethyst_torch.yml index 5abdab95c..cf70f13a9 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/amethyst_torch.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/amethyst_torch.yml @@ -3,13 +3,7 @@ items: material: nether_brick data: item-name: - model: - type: minecraft:model - path: minecraft:item/custom/amethyst_torch - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:block/custom/amethyst_torch + texture: minecraft:block/custom/amethyst_torch behavior: - type: wall_block_item block: default:amethyst_wall_torch diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/copper_coil.yml b/common-files/src/main/resources/resources/default/configuration/blocks/copper_coil.yml index 7615f1fb6..d8bf26b7f 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/copper_coil.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/copper_coil.yml @@ -16,7 +16,6 @@ items: settings: template: - default:sound/metal - - default:pickaxe_power/level_1 overrides: hardness: 3.0 resistance: 4.5 @@ -27,6 +26,8 @@ items: map-color: 15 tags: - minecraft:mineable/pickaxe + correct-tools: + template: default:pickaxe_power/level_1 behavior: type: lamp_block states: diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/ender_pearl_flower.yml b/common-files/src/main/resources/resources/default/configuration/blocks/ender_pearl_flower.yml index 258f99c92..2d5b218de 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/ender_pearl_flower.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/ender_pearl_flower.yml @@ -3,10 +3,7 @@ items: material: nether_brick data: item-name: - model: - template: default:model/simplified_generated - arguments: - path: minecraft:item/custom/ender_pearl_flower_seeds + texture: minecraft:item/custom/ender_pearl_flower_seeds behavior: type: block_item block: default:ender_pearl_flower diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/fairy_flower.yml b/common-files/src/main/resources/resources/default/configuration/blocks/fairy_flower.yml index 08debd5e8..99c970515 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/fairy_flower.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/fairy_flower.yml @@ -3,10 +3,7 @@ items: material: nether_brick data: item-name: - model: - template: default:model/simplified_generated - arguments: - path: minecraft:item/custom/fairy_flower + texture: minecraft:item/custom/fairy_flower behavior: type: block_item block: diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/flame_cane.yml b/common-files/src/main/resources/resources/default/configuration/blocks/flame_cane.yml index dd50822f0..8b1e352ae 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/flame_cane.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/flame_cane.yml @@ -3,10 +3,7 @@ items: material: nether_brick data: item-name: - model: - template: default:model/simplified_generated - arguments: - path: minecraft:item/custom/flame_cane + texture: minecraft:item/custom/flame_cane behavior: type: block_item block: diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/gunpowder_block.yml b/common-files/src/main/resources/resources/default/configuration/blocks/gunpowder_block.yml index 17bf82ce5..4d34d26e0 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/gunpowder_block.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/gunpowder_block.yml @@ -51,13 +51,14 @@ items: settings: template: - default:sound/stone - - default:pickaxe_power/level_1 - default:settings/solid_1x1x1 overrides: hardness: 1.8 resistance: 1.8 instrument: basedrum map-color: 45 + correct-tools: + template: default:pickaxe_power/level_1 state: auto-state: solid model: diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/hami_melon.yml b/common-files/src/main/resources/resources/default/configuration/blocks/hami_melon.yml index 67de31a05..6a4621d4b 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/hami_melon.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/hami_melon.yml @@ -1,6 +1,7 @@ items: default:hami_melon_slice: material: melon_slice + texture: minecraft:item/custom/hami_melon_slice data: item-name: $$>=1.20.5: @@ -13,10 +14,6 @@ items: food: nutrition: 2 saturation: 1.0 - model: - template: default:model/simplified_generated - arguments: - path: minecraft:item/custom/hami_melon_slice default:hami_melon: material: nether_brick data: @@ -32,10 +29,7 @@ items: material: nether_brick data: item-name: - model: - template: default:model/simplified_generated - arguments: - path: minecraft:item/custom/hami_melon_seeds + texture: minecraft:item/custom/hami_melon_seeds behavior: type: block_item block: default:hami_melon_stem diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/magma_plant.yml b/common-files/src/main/resources/resources/default/configuration/blocks/magma_plant.yml index b608b57b9..7e5ed5a14 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/magma_plant.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/magma_plant.yml @@ -1,10 +1,7 @@ items: default:magma_fruit: material: carrot - model: - template: default:model/simplified_generated - arguments: - path: minecraft:item/custom/magma_fruit + texture: minecraft:item/custom/magma_fruit data: item-name: $$>=1.20.5: diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/netherite_anvil.yml b/common-files/src/main/resources/resources/default/configuration/blocks/netherite_anvil.yml index 86fbecd35..e254d34bd 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/netherite_anvil.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/netherite_anvil.yml @@ -30,21 +30,19 @@ items: - type: expression expression: '!' settings: - template: - - default:pickaxe_power/level_4 - overrides: - tags: - - minecraft:mineable/pickaxe - sounds: - break: minecraft:block.anvil.break - step: minecraft:block.anvil.step - place: minecraft:block.anvil.place - hit: minecraft:block.anvil.hit - fall: minecraft:block.anvil.fall - map-color: 29 - hardness: 10.0 - resistance: 1200 - push-reaction: block + sounds: + break: minecraft:block.anvil.break + step: minecraft:block.anvil.step + place: minecraft:block.anvil.place + hit: minecraft:block.anvil.hit + fall: minecraft:block.anvil.fall + map-color: 29 + hardness: 10.0 + resistance: 1200 + push-reaction: block + correct-tools: + template: default:pickaxe_power/level_4 + tags: ["minecraft:mineable/pickaxe"] states: properties: facing_clockwise: diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/palm_tree.yml b/common-files/src/main/resources/resources/default/configuration/blocks/palm_tree.yml index b3835f599..af84fef10 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/palm_tree.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/palm_tree.yml @@ -157,11 +157,7 @@ items: lore: - "Requires the datapack tree configuration to function." - "If not configured, an oak tree will grow by default." - model: - template: default:model/generated - arguments: - model: minecraft:item/custom/palm_sapling - texture: minecraft:block/custom/palm_sapling + texture: minecraft:block/custom/palm_sapling behavior: type: block_item block: @@ -284,10 +280,7 @@ items: item-name: settings: fuel-time: 200 - model: - template: default:model/simplified_generated - arguments: - path: minecraft:item/custom/palm_door + texture: minecraft:item/custom/palm_door behavior: type: double_high_block_item block: @@ -693,15 +686,15 @@ recipes: default:palm_planks: template: default:recipe/planks arguments: - wood_type: palm + wood_type: default:palm default:palm_wood: template: default:recipe/log_2_wood arguments: - wood_type: palm + wood_type: default:palm default:stripped_palm_wood: template: default:recipe/log_2_wood arguments: - wood_type: stripped_palm + wood_type: default:stripped_palm default:palm_trapdoor: type: shaped pattern: diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/pebble.yml b/common-files/src/main/resources/resources/default/configuration/blocks/pebble.yml index d9dd1ef1f..9d6c631aa 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/pebble.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/pebble.yml @@ -3,10 +3,7 @@ items: material: nether_brick data: item-name: - model: - template: default:model/simplified_generated - arguments: - path: minecraft:item/custom/pebble + texture: minecraft:item/custom/pebble behavior: - type: block_item block: diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/reed.yml b/common-files/src/main/resources/resources/default/configuration/blocks/reed.yml index 49ce9b22d..0fab82454 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/reed.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/reed.yml @@ -3,10 +3,7 @@ items: material: nether_brick data: item-name: - model: - template: default:model/simplified_generated - arguments: - path: minecraft:item/custom/reed + texture: minecraft:item/custom/reed behavior: type: liquid_collision_block_item block: diff --git a/common-files/src/main/resources/resources/default/configuration/blocks/topaz_ore.yml b/common-files/src/main/resources/resources/default/configuration/blocks/topaz_ore.yml index 00d5621a5..0c8cdad6c 100644 --- a/common-files/src/main/resources/resources/default/configuration/blocks/topaz_ore.yml +++ b/common-files/src/main/resources/resources/default/configuration/blocks/topaz_ore.yml @@ -32,10 +32,7 @@ items: percent: 0.25 data: item-name: <#FF8C00> - model: - template: default:model/simplified_generated - arguments: - path: minecraft:item/custom/topaz + texture: minecraft:item/custom/topaz blocks: default:topaz_ore: loot: @@ -75,26 +72,42 @@ blocks: path: minecraft:block/custom/deepslate_topaz_ore recipes: default:topaz_from_smelting_topaz_ore: - template: default:recipe/smelting_ore - arguments: - exp: 1.0 - ingredient: default:topaz_ore - result: default:topaz + type: smelting + experience: 1.0 + category: misc + group: topaz + time: 200 + ingredient: default:topaz_ore + result: + id: default:topaz + count: 1 default:topaz_from_smelting_deepslate_topaz_ore: - template: default:recipe/smelting_ore - arguments: - exp: 1.0 - ingredient: default:deepslate_topaz_ore - result: default:topaz + type: smelting + experience: 1.0 + category: misc + group: topaz + time: 200 + ingredient: default:deepslate_topaz_ore + result: + id: default:topaz + count: 1 default:topaz_from_blasting_topaz_ore: - template: default:recipe/blasting_ore - arguments: - exp: 1.0 - ingredient: default:topaz_ore - result: default:topaz + type: blasting + experience: 1.0 + category: misc + group: topaz + time: 100 + ingredient: default:topaz_ore + result: + id: default:topaz + count: 1 default:topaz_from_blasting_deepslate_topaz_ore: - template: default:recipe/blasting_ore - arguments: - exp: 1.0 - ingredient: default:deepslate_topaz_ore - result: default:topaz \ No newline at end of file + type: blasting + experience: 1.0 + category: misc + group: topaz + time: 100 + ingredient: default:deepslate_topaz_ore + result: + id: default:topaz + count: 1 \ No newline at end of file diff --git a/common-files/src/main/resources/resources/default/configuration/emoji.yml b/common-files/src/main/resources/resources/default/configuration/emoji.yml index aa001996e..4fe4b0e69 100644 --- a/common-files/src/main/resources/resources/default/configuration/emoji.yml +++ b/common-files/src/main/resources/resources/default/configuration/emoji.yml @@ -1,6 +1,6 @@ templates: default:emoji/basic: - content: '> + content: '> emoji: default:emoji_smiley: template: default:emoji/basic diff --git a/common-files/src/main/resources/resources/default/configuration/furniture/flower_basket.yml b/common-files/src/main/resources/resources/default/configuration/furniture/flower_basket.yml index 0dd2ac5c2..c67d7cea9 100644 --- a/common-files/src/main/resources/resources/default/configuration/furniture/flower_basket.yml +++ b/common-files/src/main/resources/resources/default/configuration/furniture/flower_basket.yml @@ -3,10 +3,7 @@ items: material: nether_brick data: item-name: - model: - template: default:model/simplified_generated - arguments: - path: minecraft:item/custom/flower_basket_2d + texture: minecraft:item/custom/flower_basket_2d behavior: type: furniture_item furniture: default:flower_basket diff --git a/common-files/src/main/resources/resources/default/configuration/furniture/wooden_chair.yml b/common-files/src/main/resources/resources/default/configuration/furniture/wooden_chair.yml index 24471cfb1..9ea08846d 100644 --- a/common-files/src/main/resources/resources/default/configuration/furniture/wooden_chair.yml +++ b/common-files/src/main/resources/resources/default/configuration/furniture/wooden_chair.yml @@ -3,9 +3,7 @@ items: material: nether_brick data: item-name: - model: - type: minecraft:model - path: minecraft:item/custom/wooden_chair + model: minecraft:item/custom/wooden_chair behavior: type: furniture_item furniture: diff --git a/common-files/src/main/resources/resources/default/configuration/items/topaz_tool_weapon.yml b/common-files/src/main/resources/resources/default/configuration/items/topaz_tool_weapon.yml index 04a893078..0755312bf 100644 --- a/common-files/src/main/resources/resources/default/configuration/items/topaz_tool_weapon.yml +++ b/common-files/src/main/resources/resources/default/configuration/items/topaz_tool_weapon.yml @@ -53,10 +53,7 @@ items: item-name: <#FF8C00> tooltip-style: minecraft:topaz max-damage: 64 - model: - template: default:model/simplified_handheld - arguments: - path: minecraft:item/custom/topaz_pickaxe + texture: minecraft:item/custom/topaz_pickaxe default:topaz_axe: material: golden_axe settings: @@ -66,10 +63,7 @@ items: item-name: <#FF8C00> tooltip-style: minecraft:topaz max-damage: 64 - model: - template: default:model/simplified_handheld - arguments: - path: minecraft:item/custom/topaz_axe + texture: minecraft:item/custom/topaz_axe default:topaz_hoe: material: golden_hoe settings: @@ -79,36 +73,25 @@ items: item-name: <#FF8C00> tooltip-style: minecraft:topaz max-damage: 64 - model: - template: default:model/simplified_handheld - arguments: - path: minecraft:item/custom/topaz_hoe + texture: minecraft:item/custom/topaz_hoe default:topaz_shovel: material: golden_shovel settings: - tags: - - default:topaz_tools + tags: ["default:topaz_tools"] data: item-name: <#FF8C00> tooltip-style: minecraft:topaz max-damage: 64 - model: - template: default:model/simplified_handheld - arguments: - path: minecraft:item/custom/topaz_shovel + texture: minecraft:item/custom/topaz_shovel default:topaz_sword: material: golden_sword settings: - tags: - - default:topaz_tools + tags: ["default:topaz_tools"] data: item-name: <#FF8C00> tooltip-style: minecraft:topaz max-damage: 64 - model: - template: default:model/simplified_handheld - arguments: - path: minecraft:item/custom/topaz_sword + texture: minecraft:item/custom/topaz_sword $$>=1.21.4#topaz_trident: default:topaz_trident: material: trident diff --git a/common-files/src/main/resources/resources/default/configuration/templates/block_settings.yml b/common-files/src/main/resources/resources/default/configuration/templates/block_settings.yml new file mode 100644 index 000000000..18e232369 --- /dev/null +++ b/common-files/src/main/resources/resources/default/configuration/templates/block_settings.yml @@ -0,0 +1,216 @@ +templates#settings: + default:settings/solid_1x1x1: + is-suffocating: true + replaceable: false + is-view-blocking: true + is-redstone-conductor: true + can-occlude: true + default:settings/transparent_1x1x1: + is-suffocating: false + replaceable: false + is-view-blocking: false + is-redstone-conductor: false + can-occlude: false + default:settings/sapling: + burnable: false + template: + - default:hardness/none + - default:sound/grass + overrides: + push-reaction: destroy + is-randomly-ticking: true + tags: + - minecraft:mineable/axe + - minecraft:saplings + - minecraft:sword_efficient + default:settings/leaves: + template: + - default:sound/grass + - default:burn_data/leaves + - default:hardness/leaves + - default:settings/transparent_1x1x1 + overrides: + hardness: 0.2 + resistance: 0.2 + push-reaction: destroy + instrument: harp + tags: + - minecraft:mineable/hoe + - minecraft:sword_efficient + - minecraft:leaves + - minecraft:replaceable_by_trees + default:settings/wood: + template: + - default:sound/wood + - default:burn_data/wood + - default:hardness/wood + overrides: + instrument: bass + tags: + - minecraft:mineable/axe + - minecraft:logs_that_burn + - minecraft:logs + - minecraft:completes_find_tree_tutorial + default:settings/planks: + template: + - default:sound/wood + - default:burn_data/planks + - default:hardness/planks + - default:settings/solid_1x1x1 + overrides: + instrument: bass + tags: ["minecraft:mineable/axe"] + default:settings/ore: + template: + - default:sound/stone + - default:settings/solid_1x1x1 + overrides: + hardness: 3.0 + resistance: 3.0 + instrument: basedrum + map-color: 11 + tags: ["minecraft:mineable/pickaxe"] + correct-tools::template: default:pickaxe_power/level_${break_power} + default:settings/deepslate_ore: + template: + - default:sound/deepslate + - default:settings/solid_1x1x1 + - default:hardness/deepslate + overrides: + hardness: 4.5 + resistance: 3.0 + instrument: basedrum + map-color: 59 + tags: ["minecraft:mineable/pickaxe"] + correct-tools::template: default:pickaxe_power/level_${break_power} + +templates#hardness: + default:hardness/none: + hardness: 0 + resistance: 0 + default:hardness/leaves: + hardness: 0.2 + resistance: 0.2 + default:hardness/glass: + hardness: 0.3 + resistance: 0.3 + default:hardness/stone: + hardness: 1.5 + resistance: 6.0 + default:hardness/deepslate: + hardness: 3.0 + resistance: 6.0 + default:hardness/obsidian: + hardness: 50.0 + resistance: 1200.0 + default:hardness/wool: + hardness: 0.8 + resistance: 0.8 + default:hardness/wood: + hardness: 2.0 + resistance: 2.0 + default:hardness/planks: + hardness: 2.0 + resistance: 3.0 + default:hardness/button: + hardness: 0.5 + resistance: 0.5 + default:hardness/melon: + hardness: 1.0 + resistance: 1.0 + +templates#burn_data: + default:burn_data/leaves: + burnable: true + burn-chance: 30 + fire-spread-chance: 60 + default:burn_data/wood: + burnable: true + burn-chance: 5 + fire-spread-chance: 5 + default:burn_data/planks: + burnable: true + burn-chance: 5 + fire-spread-chance: 20 + default:burn_data/wool: + burnable: true + burn-chance: 30 + fire-spread-chance: 60 + default:burn_data/vine: + burnable: true + burn-chance: 15 + fire-spread-chance: 100 + default:burn_data/carpet: + burnable: true + burn-chance: 60 + fire-spread-chance: 20 + default:burn_data/coal: + burnable: true + burn-chance: 5 + fire-spread-chance: 5 + default:burn_data/grass: + burnable: true + burn-chance: 60 + fire-spread-chance: 100 + +templates#sounds: + default:sound/block_template: + sounds: + break: minecraft:block.${block_type}.break + step: minecraft:block.${block_type}.step + place: minecraft:block.${block_type}.place + hit: minecraft:block.${block_type}.hit + fall: minecraft:block.${block_type}.fall + default:sound/crop: + sounds: + break: minecraft:block.crop.break + step: minecraft:block.grass.step + place: minecraft:item.crop.plant + hit: minecraft:block.grass.hit + fall: minecraft:block.grass.fall + default:sound/stem_crop: + sounds: + break: minecraft:block.crop.break + step: minecraft:block.wood.step + place: minecraft:item.crop.plant + hit: minecraft:block.wood.hit + fall: minecraft:block.wood.fall + default:sound/grass: + template: default:sound/block_template + arguments::block_type: grass + default:sound/wood: + template: default:sound/block_template + arguments::block_type: wood + default:sound/stone: + template: default:sound/block_template + arguments::block_type: stone + default:sound/deepslate: + template: default:sound/block_template + arguments::block_type: deepslate + default:sound/glass: + template: default:sound/block_template + arguments::block_type: glass + default:sound/sand: + template: default:sound/block_template + arguments::block_type: sand + default:sound/gravel: + template: default:sound/block_template + arguments::block_type: gravel + default:sound/metal: + template: default:sound/block_template + arguments::block_type: metal + default:sound/snow: + template: default:sound/block_template + arguments::block_type: snow + default:sound/bamboo: + template: default:sound/block_template + arguments::block_type: bamboo + default:sound/vine: + template: default:sound/block_template + arguments::block_type: vine + default:sound/lantern: + template: default:sound/block_template + arguments::block_type: lantern + default:sound/amethyst_block: + template: default:sound/block_template + arguments::block_type: amethyst_block \ No newline at end of file diff --git a/common-files/src/main/resources/resources/default/configuration/templates.yml b/common-files/src/main/resources/resources/default/configuration/templates/block_states.yml similarity index 73% rename from common-files/src/main/resources/resources/default/configuration/templates.yml rename to common-files/src/main/resources/resources/default/configuration/templates/block_states.yml index d22288ef0..df459b4d2 100644 --- a/common-files/src/main/resources/resources/default/configuration/templates.yml +++ b/common-files/src/main/resources/resources/default/configuration/templates/block_states.yml @@ -1,859 +1,4 @@ -# This file contains some useful template data. If you have good ideas, you are welcome to contribute your template! - -# blocks -templates#models#block: - # template: default:model/cube_all - # arguments: - # model: model_path - # texture: texture_path - default:model/cube_all: - path: ${model} - generation: - parent: minecraft:block/cube_all - textures: - all: ${texture} - # template: default:model/simplified_cube_all - # arguments: - # path: [model/texture]_path - default:model/simplified_cube_all: - path: ${path} - generation: - parent: minecraft:block/cube_all - textures: - all: ${path} - # template: default:model/cube_column - # arguments: - # model: model_path - # end_texture: end_texture_path - # side_texture: side_texture_path - default:model/cube_column: - path: ${model} - generation: - parent: minecraft:block/cube_column - textures: - end: ${end_texture} - side: ${side_texture} - # template: default:model/cube - # arguments: - # model: model_path - # particle_texture: particle_texture_path - # down_texture: down_texture_path - # up_texture: up_texture_path - # north_texture: north_texture_path - # east_texture: east_texture_path - # south_texture: south_texture_path - # west_texture: west_texture_path - default:model/cube: - path: ${model} - generation: - parent: minecraft:block/cube_column - textures: - particle: ${particle_texture} - down: ${down_texture} - up: ${up_texture} - north: ${north_texture} - east: ${east_texture} - south: ${south_texture} - west: ${west_texture} - -# 2D items -templates#models#2d: - # template: default:model/generated - # arguments: - # model: model_path - # texture: texture_path - default:model/generated: - type: minecraft:model - path: ${model} - generation: - parent: minecraft:item/generated - textures: - layer0: ${texture} - # template: default:model/simplified_generated - # arguments: - # path: [model/texture]_path - default:model/simplified_generated: - type: minecraft:model - path: ${path} - generation: - parent: minecraft:item/generated - textures: - layer0: ${path} - # template: default:model/2_layer_generated - # arguments: - # model: model_path - # layer0: texture_path - # layer1: texture_path - default:model/2_layer_generated: - type: minecraft:model - path: ${model} - generation: - parent: minecraft:item/generated - textures: - layer0: ${layer0} - layer1: ${layer1} - # template: default:model/handheld - # arguments: - # model: model_path - # texture: texture_path - default:model/handheld: - type: minecraft:model - path: ${model} - generation: - parent: minecraft:item/handheld - textures: - layer0: ${texture} - # template: default:model/simplified_handheld - # arguments: - # path: [model/texture]_path - default:model/simplified_handheld: - type: minecraft:model - path: ${path} - generation: - parent: minecraft:item/handheld - textures: - layer0: ${path} - # template: default:model/elytra - # arguments: - # model: model_path - # broken_model: broken_model_path - # texture: texture_path - # broken_texture: broken_texture_path - default:model/elytra: - type: minecraft:condition - property: minecraft:broken - on-false: - path: ${model} - generation: - parent: minecraft:item/generated - textures: - layer0: ${texture} - on-true: - path: ${broken_model} - generation: - parent: minecraft:item/generated - textures: - layer0: ${broken_texture} - # template: default:model/simplified_elytra - # arguments: - # path: [model/texture]_path - # broken_path: broken_[model/texture]_path - default:model/simplified_elytra: - template: default:model/elytra - arguments: - model: ${path} - texture: ${path} - broken_model: ${broken_path} - broken_texture: ${broken_path} - # template: default:model/armor_trim - # arguments: - # material: armor material type - # part: slot type - default:model/armor_trim: - type: minecraft:select - property: minecraft:trim_material - fallback: - type: minecraft:model - path: minecraft:item/custom/${material}_${part} - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - cases: - - when: minecraft:quartz - model: - type: minecraft:model - path: minecraft:item/custom/${material}_${part}_quartz_trim - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - layer1: minecraft:trims/items/${part}_trim_quartz - - when: minecraft:iron - model: - type: minecraft:model - path: minecraft:item/custom/${material}_${part}_iron_trim - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - layer1: minecraft:trims/items/${part}_trim_iron - - when: minecraft:netherite - model: - type: minecraft:model - path: minecraft:item/custom/${material}_${part}_netherite_trim - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - layer1: minecraft:trims/items/${part}_trim_netherite - - when: minecraft:redstone - model: - type: minecraft:model - path: minecraft:item/custom/${material}_${part}_redstone_trim - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - layer1: minecraft:trims/items/${part}_trim_redstone - - when: minecraft:copper - model: - type: minecraft:model - path: minecraft:item/custom/${material}_${part}_copper_trim - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - layer1: minecraft:trims/items/${part}_trim_copper - - when: minecraft:gold - model: - type: minecraft:model - path: minecraft:item/custom/${material}_${part}_gold_trim - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - layer1: minecraft:trims/items/${part}_trim_gold - - when: minecraft:emerald - model: - type: minecraft:model - path: minecraft:item/custom/${material}_${part}_emerald_trim - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - layer1: minecraft:trims/items/${part}_trim_emerald - - when: minecraft:diamond - model: - type: minecraft:model - path: minecraft:item/custom/${material}_${part}_diamond_trim - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - layer1: minecraft:trims/items/${part}_trim_diamond - - when: minecraft:lapis - model: - type: minecraft:model - path: minecraft:item/custom/${material}_${part}_lapis_trim - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - layer1: minecraft:trims/items/${part}_trim_lapis - - when: minecraft:amethyst - model: - type: minecraft:model - path: minecraft:item/custom/${material}_${part}_amethyst_trim - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - layer1: minecraft:trims/items/${part}_trim_amethyst - - when: minecraft:resin - model: - type: minecraft:model - path: minecraft:item/custom/${material}_${part}_resin_trim - generation: - parent: minecraft:item/generated - textures: - layer0: minecraft:item/custom/${material}_${part} - layer1: minecraft:trims/items/${part}_trim_resin - -# shield -templates#models#shield: - # template: default:model/shield_3d - # arguments: - # model: shield_model_path - # block_model: shield_block_model_path - default:model/shield_3d: - type: minecraft:condition - property: minecraft:using_item - on-false: - type: minecraft:model - path: ${model} - on-true: - type: minecraft:model - path: ${block_model} - -# fishing rods -templates#models#fishing_rod: - # template: default:model/fishing_rod_3d - # arguments: - # model: rod_model_path - # cast_model: rod_cast_model_path - default:model/fishing_rod_3d: - type: minecraft:condition - property: minecraft:fishing_rod/cast - on-false: - type: minecraft:model - path: ${model} - on-true: - type: minecraft:model - path: ${cast_model} - # template: default:model/fishing_rod_2d - # arguments: - # model: rod_model_path - # cast_model: rod_cast_model_path - # texture: rod_texture_path - # cast_texture: rod_cast_texture_path - default:model/fishing_rod_2d: - type: minecraft:condition - property: minecraft:fishing_rod/cast - on-false: - type: minecraft:model - path: ${model} - generation: - parent: minecraft:item/fishing_rod - textures: - layer0: ${texture} - on-true: - type: minecraft:model - path: ${cast_model} - generation: - parent: minecraft:item/fishing_rod - textures: - layer0: ${cast_texture} - # template: default:model/simplified_fishing_rod_2d - # arguments: - # path: rod_[model/texture]_path - # cast_path: rod_cast_[model/texture]_path - default:model/simplified_fishing_rod_2d: - template: default:model/fishing_rod_2d - arguments: - texture: ${path} - model: ${path} - cast_texture: ${cast_path} - cast_model: ${cast_path} - -# bows -templates#models#bow: - # template: default:model/bow_3d - # arguments: - # model: bow_model_path - # pulling_0_model: bow_pulling_0_model_path - # pulling_1_model: bow_pulling_1_model_path - # pulling_2_model: bow_pulling_2_model_path - default:model/bow_3d: - type: minecraft:condition - property: minecraft:using_item - on-false: - type: minecraft:model - path: ${model} - on-true: - type: minecraft:range_dispatch - property: minecraft:use_duration - scale: 0.05 - entries: - - model: - type: minecraft:model - path: ${pulling_1_model} - threshold: 0.65 - - model: - type: minecraft:model - path: ${pulling_2_model} - threshold: 0.9 - fallback: - type: minecraft:model - path: ${pulling_0_model} - # template: default:model/bow_2d - # arguments: - # model: bow_model_path - # pulling_0_model: bow_pulling_0_model_path - # pulling_1_model: bow_pulling_1_model_path - # pulling_2_model: bow_pulling_2_model_path - # texture: bow_texture_path - # pulling_0_texture: bow_pulling_0_texture_path - # pulling_1_texture: bow_pulling_1_texture_path - # pulling_2_texture: bow_pulling_2_texture_path - default:model/bow_2d: - type: minecraft:condition - property: minecraft:using_item - on-false: - type: minecraft:model - path: ${model} - generation: - parent: minecraft:item/bow - textures: - layer0: ${texture} - on-true: - type: minecraft:range_dispatch - property: minecraft:use_duration - scale: 0.05 - entries: - - model: - type: minecraft:model - path: ${pulling_1_model} - generation: - parent: minecraft:item/bow_pulling_1 - textures: - layer0: ${pulling_1_texture} - threshold: 0.65 - - model: - type: minecraft:model - path: ${pulling_2_model} - generation: - parent: minecraft:item/bow_pulling_2 - textures: - layer0: ${pulling_2_texture} - threshold: 0.9 - fallback: - type: minecraft:model - path: ${pulling_0_model} - generation: - parent: minecraft:item/bow_pulling_0 - textures: - layer0: ${pulling_0_texture} - # template: default:model/simplified_bow_2d - # arguments: - # path: bow_[model/texture]_path - # pulling_0_path: bow_pulling_0_[model/texture]_path - # pulling_1_path: bow_pulling_1_[model/texture]_path - # pulling_2_path: bow_pulling_2_[model/texture]_path - default:model/simplified_bow_2d: - template: default:model/bow_2d - arguments: - model: ${path} - pulling_0_model: ${pulling_0_path} - pulling_1_model: ${pulling_1_path} - pulling_2_model: ${pulling_2_path} - texture: ${path} - pulling_0_texture: ${pulling_0_path} - pulling_1_texture: ${pulling_1_path} - pulling_2_texture: ${pulling_2_path} - -# crossbows -templates#models#crossbow: - # template: default:model/crossbow_3d - # arguments: - # model: crossbow_model_path - # arrow_model: crossbow_arrow_model_path - # firework_model: crossbow_firework_model_path - # pulling_0_model: crossbow_pulling_0_model_path - # pulling_1_model: crossbow_pulling_1_model_path - # pulling_2_model: crossbow_pulling_2_model_path - default:model/crossbow_3d: - type: minecraft:condition - property: minecraft:using_item - on-false: - type: minecraft:select - property: minecraft:charge_type - cases: - - when: arrow - model: - type: minecraft:model - path: ${arrow_model} - - when: rocket - model: - type: minecraft:model - path: ${firework_model} - fallback: - type: minecraft:model - path: ${model} - on-true: - type: minecraft:range_dispatch - property: minecraft:crossbow/pull - entries: - - model: - type: minecraft:model - path: ${pulling_1_model} - threshold: 0.58 - - model: - type: minecraft:model - path: ${pulling_2_model} - threshold: 1.0 - fallback: - type: minecraft:model - path: ${pulling_0_model} - # template: default:model/crossbow_2d - # arguments: - # model: crossbow_model_path - # texture: crossbow_texture_path - # arrow_model: crossbow_arrow_model_path - # arrow_texture: crossbow_arrow_texture_path - # firework_model: crossbow_firework_model_path - # firework_texture: crossbow_firework_texture_path - # pulling_0_model: crossbow_pulling_0_model_path - # pulling_0_texture: crossbow_pulling_0_texture_path - # pulling_1_model: crossbow_pulling_1_model_path - # pulling_1_texture: crossbow_pulling_1_texture_path - # pulling_2_model: crossbow_pulling_2_model_path - # pulling_2_texture: crossbow_pulling_2_texture_path - default:model/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: ${arrow_model} - generation: - parent: minecraft:item/crossbow_arrow - textures: - layer0: ${arrow_texture} - - when: rocket - model: - type: minecraft:model - path: ${firework_model} - generation: - parent: minecraft:item/crossbow_firework - textures: - layer0: ${firework_texture} - fallback: - type: minecraft:model - path: ${model} - generation: - parent: minecraft:item/crossbow - textures: - layer0: ${texture} - on-true: - type: minecraft:range_dispatch - property: minecraft:crossbow/pull - entries: - - model: - type: minecraft:model - path: ${pulling_1_model} - generation: - parent: minecraft:item/crossbow_pulling_1 - textures: - layer0: ${pulling_1_texture} - threshold: 0.58 - - model: - type: minecraft:model - path: ${pulling_2_model} - generation: - parent: minecraft:item/crossbow_pulling_2 - textures: - layer0: ${pulling_2_texture} - threshold: 1.0 - fallback: - type: minecraft:model - path: ${pulling_0_model} - generation: - parent: minecraft:item/crossbow_pulling_0 - textures: - layer0: ${pulling_0_texture} - # template: default:model/simplified_crossbow_2d - # arguments: - # path: crossbow_[model/texture]_path - # arrow_path: crossbow_arrow_[model/texture]_path - # firework_path: crossbow_firework_[model/texture]_path - # pulling_0_path: crossbow_pulling_0_[model/texture]_path - # pulling_1_path: crossbow_pulling_1_[model/texture]_path - # pulling_2_path: crossbow_pulling_2_[model/texture]_path - default:model/simplified_crossbow_2d: - template: default:model/crossbow_2d - arguments: - model: ${path} - texture: ${path} - arrow_model: ${arrow_path} - arrow_texture: ${arrow_path} - firework_model: ${firework_path} - firework_texture: ${firework_path} - pulling_0_model: ${pulling_0_path} - pulling_0_texture: ${pulling_0_path} - pulling_1_model: ${pulling_1_path} - pulling_1_texture: ${pulling_1_path} - pulling_2_model: ${pulling_2_path} - pulling_2_texture: ${pulling_2_path} - -# sounds -templates#settings#sounds: - default:sound/block_template: - sounds: - break: minecraft:block.${block_type}.break - step: minecraft:block.${block_type}.step - place: minecraft:block.${block_type}.place - hit: minecraft:block.${block_type}.hit - fall: minecraft:block.${block_type}.fall - default:sound/crop: - sounds: - break: minecraft:block.crop.break - step: minecraft:block.grass.step - place: minecraft:item.crop.plant - hit: minecraft:block.grass.hit - fall: minecraft:block.grass.fall - default:sound/stem_crop: - sounds: - break: minecraft:block.crop.break - step: minecraft:block.wood.step - place: minecraft:item.crop.plant - hit: minecraft:block.wood.hit - fall: minecraft:block.wood.fall - default:sound/grass: - template: default:sound/block_template - arguments: - block_type: grass - default:sound/wood: - template: default:sound/block_template - arguments: - block_type: wood - default:sound/stone: - template: default:sound/block_template - arguments: - block_type: stone - default:sound/deepslate: - template: default:sound/block_template - arguments: - block_type: deepslate - default:sound/glass: - template: default:sound/block_template - arguments: - block_type: glass - default:sound/sand: - template: default:sound/block_template - arguments: - block_type: sand - default:sound/gravel: - template: default:sound/block_template - arguments: - block_type: gravel - default:sound/metal: - template: default:sound/block_template - arguments: - block_type: metal - default:sound/snow: - template: default:sound/block_template - arguments: - block_type: snow - default:sound/bamboo: - template: default:sound/block_template - arguments: - block_type: bamboo - default:sound/vine: - template: default:sound/block_template - arguments: - block_type: vine - default:sound/lantern: - template: default:sound/block_template - arguments: - block_type: lantern - default:sound/amethyst_block: - template: default:sound/block_template - arguments: - block_type: amethyst_block - -# burn data -templates#settings#burn: - default:burn_data/leaves: - burnable: true - burn-chance: 30 - fire-spread-chance: 60 - default:burn_data/wood: - burnable: true - burn-chance: 5 - fire-spread-chance: 5 - default:burn_data/planks: - burnable: true - burn-chance: 5 - fire-spread-chance: 20 - default:burn_data/wool: - burnable: true - burn-chance: 30 - fire-spread-chance: 60 - default:burn_data/vine: - burnable: true - burn-chance: 15 - fire-spread-chance: 100 - default:burn_data/carpet: - burnable: true - burn-chance: 60 - fire-spread-chance: 20 - default:burn_data/coal: - burnable: true - burn-chance: 5 - fire-spread-chance: 5 - default:burn_data/grass: - burnable: true - burn-chance: 60 - fire-spread-chance: 100 - -# hardness & resistance -templates#settings#hardness: - default:hardness/none: - hardness: 0 - resistance: 0 - default:hardness/leaves: - hardness: 0.2 - resistance: 0.2 - default:hardness/glass: - hardness: 0.3 - resistance: 0.3 - default:hardness/stone: - hardness: 1.5 - resistance: 6.0 - default:hardness/deepslate: - hardness: 3.0 - resistance: 6.0 - default:hardness/obsidian: - hardness: 50.0 - resistance: 1200.0 - default:hardness/wool: - hardness: 0.8 - resistance: 0.8 - default:hardness/wood: - hardness: 2.0 - resistance: 2.0 - default:hardness/planks: - hardness: 2.0 - resistance: 3.0 - default:hardness/button: - hardness: 0.5 - resistance: 0.5 - default:hardness/melon: - hardness: 1.0 - resistance: 1.0 - -# break level -templates#settings#break_level: - default:pickaxe_power/level_1: - correct-tools: - - minecraft:wooden_pickaxe - - minecraft:stone_pickaxe - - minecraft:iron_pickaxe - - minecraft:golden_pickaxe - - minecraft:diamond_pickaxe - - minecraft:netherite_pickaxe - - default:topaz_pickaxe - default:pickaxe_power/level_2: - correct-tools: - - minecraft:stone_pickaxe - - minecraft:iron_pickaxe - - minecraft:golden_pickaxe - - minecraft:diamond_pickaxe - - minecraft:netherite_pickaxe - - default:topaz_pickaxe - default:pickaxe_power/level_3: - correct-tools: - - minecraft:iron_pickaxe - - minecraft:golden_pickaxe - - minecraft:diamond_pickaxe - - minecraft:netherite_pickaxe - - default:topaz_pickaxe - default:pickaxe_power/level_4: - correct-tools: - - minecraft:diamond_pickaxe - - minecraft:netherite_pickaxe - -# block settings -templates#settings#blocks: - default:settings/middle_click_pick_itself: - item: ${__NAMESPACE__}:${__ID__} - default:settings/solid_1x1x1: - is-suffocating: true - replaceable: false - is-view-blocking: true - is-redstone-conductor: true - can-occlude: true - default:settings/transparent_1x1x1: - is-suffocating: false - replaceable: false - is-view-blocking: false - can-occlude: false - # sapling - default:settings/sapling: - burnable: false - template: - - default:hardness/none - - default:sound/grass - overrides: - push-reaction: destroy - is-randomly-ticking: true - map-color: 7 - tags: - - minecraft:mineable/axe - - minecraft:saplings - - minecraft:sword_efficient - # leaves - default:settings/leaves: - template: - - default:sound/grass - - default:burn_data/leaves - - default:hardness/leaves - overrides: - hardness: 0.2 - resistance: 0.2 - push-reaction: destroy - replaceable: false - is-redstone-conductor: false - is-suffocating: false - instrument: harp - tags: - - minecraft:mineable/hoe - - minecraft:sword_efficient - - minecraft:leaves - - minecraft:replaceable_by_trees - # wood - default:settings/wood: - template: - - default:sound/wood - - default:burn_data/wood - - default:hardness/wood - overrides: - push-reaction: normal - replaceable: false - is-redstone-conductor: true - is-suffocating: true - instrument: bass - can-occlude: true - tags: - - minecraft:mineable/axe - - minecraft:logs_that_burn - - minecraft:logs - - minecraft:completes_find_tree_tutorial - # plank - default:settings/planks: - template: - - default:sound/wood - - default:burn_data/planks - - default:hardness/planks - overrides: - push-reaction: normal - replaceable: false - is-redstone-conductor: true - is-suffocating: true - instrument: bass - can-occlude: true - tags: - - minecraft:mineable/axe - # ore - default:settings/ore: - template: - - default:sound/stone - - default:pickaxe_power/level_${break_power} - overrides: - hardness: 3.0 - resistance: 3.0 - push-reaction: normal - is-redstone-conductor: true - is-suffocating: true - instrument: basedrum - can-occlude: true - map-color: 11 - tags: - - minecraft:mineable/pickaxe - # deepslate ore - default:settings/deepslate_ore: - template: - - default:sound/deepslate - - default:pickaxe_power/level_${break_power} - overrides: - hardness: 4.5 - resistance: 3.0 - push-reaction: normal - is-redstone-conductor: true - is-suffocating: true - instrument: basedrum - can-occlude: true - map-color: 59 - tags: - - minecraft:mineable/pickaxe - -# block states -templates#block_states: +templates: # pillar/log blocks default:block_state/pillar: properties: @@ -938,18 +83,15 @@ templates#block_states: # any leaves block default:block_state/leaves: template: default:block_state/__leaves__ - arguments: - auto_state: leaves + arguments::auto_state: leaves # tintable leaves block default:block_state/tintable_leaves: template: default:block_state/__leaves__ - arguments: - auto_state: tintable_leaves + arguments::auto_state: tintable_leaves # non-tintable leaves block default:block_state/non_tintable_leaves: template: default:block_state/__leaves__ - arguments: - auto_state: non_tintable_leaves + arguments::auto_state: non_tintable_leaves # trapdoor block default:block_state/trapdoor: properties: @@ -3099,331 +2241,4 @@ templates#block_states: east=false,north=true,south=true,waterlogged=true,west=true: appearance: east=false,north=true,south=true,waterlogged=true,west=true east=true,north=true,south=true,waterlogged=true,west=true: - appearance: east=true,north=true,south=true,waterlogged=true,west=true - -# recipes -templates#recipes: - default:recipe/planks: - type: shapeless - category: building - group: planks - ingredients: - - '#default:${wood_type}_logs' - result: - id: default:${wood_type}_planks - count: 4 - default:recipe/log_2_wood: - type: shaped - category: building - group: bark - pattern: - - AA - - AA - ingredients: - A: default:${wood_type}_log - result: - id: default:${wood_type}_wood - count: 3 - default:recipe/smelting_ore: - type: smelting - experience: ${exp} - category: misc - group: topaz - time: 200 - ingredient: ${ingredient} - result: - id: ${result} - count: 1 - default:recipe/blasting_ore: - type: blasting - experience: ${exp} - category: misc - group: topaz - time: 100 - ingredient: ${ingredient} - result: - id: ${result} - count: 1 - -# loot tables -templates#loot_tables: - - # drop itself - - # template: default:loot_table/self - default:loot_table/self: - pools: - - rolls: 1 - conditions: - - type: survives_explosion - entries: - - type: item - item: ${__NAMESPACE__}:${__ID__} - - # drop one item - - # template: default:loot_table/basic - # arguments: - # item: the item - default:loot_table/basic: - pools: - - rolls: 1 - conditions: - - type: survives_explosion - entries: - - type: item - item: ${item} - - # drop the original furniture item or a fallback item - - # template: default:loot_table/furniture - # arguments: - # item: the fallback item - default:loot_table/furniture: - pools: - - rolls: 1 - entries: - - type: furniture_item - item: ${item} - - # drop the door - - # template: default:loot_table/door - default:loot_table/door: - pools: - - rolls: 1 - entries: - - type: item - item: ${__NAMESPACE__}:${__ID__} - conditions: - - type: match_block_property - properties: - half: lower - - # drop with silk touch - - # template: default:loot_table/silk_touch - # arguments: - # item: the item - default:loot_table/silk_touch: - pools: - - rolls: 1 - conditions: - - type: enchantment - predicate: minecraft:silk_touch>=1 - entries: - - type: item - item: ${item} - - # drop 1/2 slabs - - # template: default:loot_table/slab - default:loot_table/slab: - pools: - - rolls: 1 - entries: - - type: item - item: ${__NAMESPACE__}:${__ID__} - functions: - - type: set_count - count: 2 - add: false - conditions: - - type: match_block_property - properties: - type: double - - type: explosion_decay - - # crop drops - - # - # This template is suitable for crops such as wheat and beetroot - # - # template: default:loot_table/seed_crop - # arguments: - # crop_item: the mature crop item - # crop_item_count: quantity of mature crop items - # crop_seed: the seed item of the crop - # extra_seed_count: additional seeds dropped when crop reaches maturity - # ripe_age: the max age - default:loot_table/seed_crop: - pools: - - rolls: 1 - entries: - - type: alternatives - children: - - type: item - item: ${crop_item} - conditions: - - type: match_block_property - properties: - age: ${ripe_age} - functions: - - type: set_count - add: false - count: ${crop_item_count:-1} - - type: item - item: ${crop_seed} - - rolls: 1 - conditions: - - type: match_block_property - properties: - age: ${ripe_age} - entries: - - type: item - item: ${crop_seed} - functions: - - type: apply_bonus - enchantment: minecraft:fortune - formula: - type: binomial_with_bonus_count - extra: ${extra_seed_count:-3} - probability: 0.5714286 - # - # This template is suitable for crops like carrots and potatoes. - # - # template: default:loot_table/crop - # arguments: - # crop_item: the crop item - # extra_crop_count: additional crops dropped when crop reaches maturity - # ripe_age: the max age - default:loot_table/crop: - pools: - - rolls: 1 - entries: - - type: item - item: ${crop_item} - - rolls: 1 - conditions: - - type: match_block_property - properties: - age: ${ripe_age} - entries: - - type: item - item: ${crop_item} - functions: - - type: apply_bonus - enchantment: minecraft:fortune - formula: - type: binomial_with_bonus_count - extra: ${extra_crop_count:-3} - probability: 0.5714286 - - # ore drops - - # template: default:loot_table/ore - # arguments: - # ore_block: the ore block - # ore_drop: the drops of the ore - # min_exp: the min exp to drop - # max_exp: the max exp to drop - default:loot_table/ore: - pools: - - rolls: 1 - entries: - - type: alternatives - children: - - type: item - item: ${ore_block} - conditions: - - type: enchantment - predicate: minecraft:silk_touch>=1 - - type: item - item: ${ore_drop} - functions: - - type: apply_bonus - enchantment: minecraft:fortune - formula: - type: ore_drops - - type: explosion_decay - - type: drop_exp - count: - type: uniform - min: ${min_exp:-2} - max: ${max_exp:-4} - - # template: default:loot_table/ore_no_exp - # arguments: - # ore_block: the ore block - # ore_drop: the drops of the ore - default:loot_table/ore_no_exp: - pools: - - rolls: 1 - entries: - - type: alternatives - children: - - type: item - item: ${ore_block} - conditions: - - type: enchantment - predicate: minecraft:silk_touch>=1 - - type: item - item: ${ore_drop} - functions: - - type: apply_bonus - enchantment: minecraft:fortune - formula: - type: ore_drops - - type: explosion_decay - - # leaves drops - - # template: default:loot_table/leaves - # arguments: - # leaves: the leaves block - # sapling: the sapling item - default:loot_table/leaves: - pools: - - rolls: 1 - entries: - - type: alternatives - children: - - type: item - item: ${leaves} - conditions: - - type: any_of - terms: - - type: match_item - id: minecraft:shears - - type: enchantment - predicate: minecraft:silk_touch>=1 - - type: item - item: ${sapling} - conditions: - - type: survives_explosion - - type: table_bonus - enchantment: minecraft:fortune - chances: - - 0.05 - - 0.0625 - - 0.083333333 - - 0.1 - - rolls: 1 - conditions: - - type: inverted - term: - type: any_of - terms: - - type: match_item - id: minecraft:shears - - type: enchantment - predicate: minecraft:silk_touch>=1 - entries: - - type: item - item: minecraft:stick - conditions: - - type: table_bonus - enchantment: minecraft:fortune - chances: - - 0.02 - - 0.022222222 - - 0.025 - - 0.033333333 - - 0.1 - functions: - - type: set_count - count: - type: uniform - min: 1 - max: 2 - - type: explosion_decay + appearance: east=true,north=true,south=true,waterlogged=true,west=true \ No newline at end of file diff --git a/common-files/src/main/resources/resources/default/configuration/templates/loot_tables.yml b/common-files/src/main/resources/resources/default/configuration/templates/loot_tables.yml new file mode 100644 index 000000000..99a366d26 --- /dev/null +++ b/common-files/src/main/resources/resources/default/configuration/templates/loot_tables.yml @@ -0,0 +1,270 @@ +templates: + + # Drop itself. + # Suitable for the vast majority of loot items. + # Only requires the template ID to be filled in during use, with no parameter requirements. + + # template: default:loot_table/self + default:loot_table/self: + pools: + - rolls: 1 + conditions: + - type: survives_explosion + entries: + - type: item + item: ${__NAMESPACE__}:${__ID__} + + # Drop the original furniture item or a fallback item. + + # template: default:loot_table/furniture + # arguments: + # item: the fallback item + default:loot_table/furniture: + pools: + - rolls: 1 + entries: + - type: furniture_item + item: ${item} + + # Drop one or more items. + + # template: default:loot_table/basic + # arguments: + # item: the item + # count: the amount of the item + default:loot_table/basic: + pools: + - rolls: 1 + conditions: + - type: survives_explosion + entries: + - type: item + item: ${item} + functions: + - type: set_count + add: false + count: ${count:-1} + + # Drop the door. + # Since a door consists of two blocks, if both of them have drop items, it will cause duplication. + + # template: default:loot_table/door + default:loot_table/door: + pools: + - rolls: 1 + entries: + - type: item + item: ${__NAMESPACE__}:${__ID__} + conditions: + - type: match_block_property + properties: + half: lower + + # Drop with silk touch + # This template is used for loot that only drops when harvested with Silk Touch. + + # template: default:loot_table/silk_touch + # arguments: + # item: the item + # count: the amount of the item + default:loot_table/silk_touch: + pools: + - rolls: 1 + conditions: + - type: enchantment + predicate: minecraft:silk_touch>=1 + entries: + - type: item + item: ${item} + functions: + - type: set_count + add: false + count: ${count:-1} + + # Drop slabs + # When two slabs are stacked, the loot table should be set to drop two items. + + # template: default:loot_table/slab + default:loot_table/slab: + pools: + - rolls: 1 + entries: + - type: item + item: ${__NAMESPACE__}:${__ID__} + functions: + - type: set_count + count: 2 + add: false + conditions: + - type: match_block_property + properties: + type: double + - type: explosion_decay + + # This loot table is for crops that are grown from seeds. Example: wheat. + + # template: default:loot_table/seed_crop + # arguments: + # crop_item: the mature crop item + # crop_item_count: quantity of mature crop items + # crop_seed: the seed item of the crop + # extra_seed_count: additional seeds dropped when crop reaches maturity + # ripe_age: the max age + default:loot_table/seed_crop: + pools: + - rolls: 1 + entries: + - type: alternatives + children: + - type: item + item: ${crop_item} + conditions: + - type: match_block_property + properties: + age: ${ripe_age} + functions: + - type: set_count + add: false + count: ${crop_item_count:-1} + - type: item + item: ${crop_seed} + - rolls: 1 + conditions: + - type: match_block_property + properties: + age: ${ripe_age} + entries: + - type: item + item: ${crop_seed} + functions: + - type: apply_bonus + enchantment: minecraft:fortune + formula: + type: binomial_with_bonus_count + extra: ${extra_seed_count:-3} + probability: 0.5714286 + + # This loot table is for crops that are grown from themselves. Example: carrots. + + # template: default:loot_table/crop + # arguments: + # crop_item: the crop item + # extra_crop_count: additional crops dropped when crop reaches maturity + # ripe_age: the max age + default:loot_table/crop: + pools: + - rolls: 1 + entries: + - type: item + item: ${crop_item} + - rolls: 1 + conditions: + - type: match_block_property + properties: + age: ${ripe_age} + entries: + - type: item + item: ${crop_item} + functions: + - type: apply_bonus + enchantment: minecraft:fortune + formula: + type: binomial_with_bonus_count + extra: ${extra_crop_count:-3} + probability: 0.5714286 + + # When Silk Touch is used, it drops the ore block itself. When Fortune is used, it increases the drops of the materials. + + # template: default:loot_table/ore + # arguments: + # ore_block: the ore block + # ore_drop: the drops of the ore + # ore_drop_count: the amount of the ore materials + # exp: the exp to drop + default:loot_table/ore: + pools: + - rolls: 1 + entries: + - type: alternatives + children: + - type: item + item: ${ore_block} + conditions: + - type: enchantment + predicate: minecraft:silk_touch>=1 + - type: item + item: ${ore_drop} + functions: + - type: set_count + count: ${ore_drop_count:-1} + add: false + - type: apply_bonus + enchantment: minecraft:fortune + formula: + type: ore_drops + - type: explosion_decay + - type: drop_exp + count: ${exp:-2~4} + + # Using Silk Touch or shears will cause the leaves block itself to drop. + # Using Fortune, however, increases the drop rates of sticks and saplings. + + # template: default:loot_table/leaves + # arguments: + # leaves: the leaves block + # sapling: the sapling item + default:loot_table/leaves: + pools: + - rolls: 1 + entries: + - type: alternatives + children: + - type: item + item: ${leaves} + conditions: + - type: any_of + terms: + - type: match_item + id: minecraft:shears + - type: enchantment + predicate: minecraft:silk_touch>=1 + - type: item + item: ${sapling} + conditions: + - type: survives_explosion + - type: table_bonus + enchantment: minecraft:fortune + chances: + - 0.05 + - 0.0625 + - 0.083333333 + - 0.1 + - rolls: 1 + conditions: + - type: inverted + term: + type: any_of + terms: + - type: match_item + id: minecraft:shears + - type: enchantment + predicate: minecraft:silk_touch>=1 + entries: + - type: item + item: minecraft:stick + conditions: + - type: table_bonus + enchantment: minecraft:fortune + chances: + - 0.02 + - 0.022222222 + - 0.025 + - 0.033333333 + - 0.1 + functions: + - type: set_count + count: + type: uniform + min: 1 + max: 2 + - type: explosion_decay diff --git a/common-files/src/main/resources/resources/default/configuration/templates/models.yml b/common-files/src/main/resources/resources/default/configuration/templates/models.yml new file mode 100644 index 000000000..c63b7d8b1 --- /dev/null +++ b/common-files/src/main/resources/resources/default/configuration/templates/models.yml @@ -0,0 +1,559 @@ +# blocks +templates#models#block: + # template: default:model/cube_all + # arguments: + # model: model_path + # texture: texture_path + default:model/cube_all: + path: ${model} + generation: + parent: minecraft:block/cube_all + textures: + all: ${texture} + # template: default:model/simplified_cube_all + # arguments: + # path: [model/texture]_path + default:model/simplified_cube_all: + path: ${path} + generation: + parent: minecraft:block/cube_all + textures: + all: ${path} + # template: default:model/cube_column + # arguments: + # model: model_path + # end_texture: end_texture_path + # side_texture: side_texture_path + default:model/cube_column: + path: ${model} + generation: + parent: minecraft:block/cube_column + textures: + end: ${end_texture} + side: ${side_texture} + # template: default:model/cube + # arguments: + # model: model_path + # particle_texture: particle_texture_path + # down_texture: down_texture_path + # up_texture: up_texture_path + # north_texture: north_texture_path + # east_texture: east_texture_path + # south_texture: south_texture_path + # west_texture: west_texture_path + default:model/cube: + path: ${model} + generation: + parent: minecraft:block/cube_column + textures: + particle: ${particle_texture} + down: ${down_texture} + up: ${up_texture} + north: ${north_texture} + east: ${east_texture} + south: ${south_texture} + west: ${west_texture} + +# 2D items +templates#models#2d: + # template: default:model/generated + # arguments: + # model: model_path + # texture: texture_path + default:model/generated: + type: minecraft:model + path: ${model} + generation: + parent: minecraft:item/generated + textures: + layer0: ${texture} + # template: default:model/simplified_generated + # arguments: + # path: [model/texture]_path + default:model/simplified_generated: + type: minecraft:model + path: ${path} + generation: + parent: minecraft:item/generated + textures: + layer0: ${path} + # template: default:model/2_layer_generated + # arguments: + # model: model_path + # layer0: texture_path + # layer1: texture_path + default:model/2_layer_generated: + type: minecraft:model + path: ${model} + generation: + parent: minecraft:item/generated + textures: + layer0: ${layer0} + layer1: ${layer1} + # template: default:model/handheld + # arguments: + # model: model_path + # texture: texture_path + default:model/handheld: + type: minecraft:model + path: ${model} + generation: + parent: minecraft:item/handheld + textures: + layer0: ${texture} + # template: default:model/simplified_handheld + # arguments: + # path: [model/texture]_path + default:model/simplified_handheld: + type: minecraft:model + path: ${path} + generation: + parent: minecraft:item/handheld + textures: + layer0: ${path} + # template: default:model/elytra + # arguments: + # model: model_path + # broken_model: broken_model_path + # texture: texture_path + # broken_texture: broken_texture_path + default:model/elytra: + type: minecraft:condition + property: minecraft:broken + on-false: + path: ${model} + generation: + parent: minecraft:item/generated + textures: + layer0: ${texture} + on-true: + path: ${broken_model} + generation: + parent: minecraft:item/generated + textures: + layer0: ${broken_texture} + # template: default:model/simplified_elytra + # arguments: + # path: [model/texture]_path + # broken_path: broken_[model/texture]_path + default:model/simplified_elytra: + template: default:model/elytra + arguments: + model: ${path} + texture: ${path} + broken_model: ${broken_path} + broken_texture: ${broken_path} + # template: default:model/armor_trim + # arguments: + # material: armor material type + # part: slot type + default:model/armor_trim: + type: minecraft:select + property: minecraft:trim_material + fallback: + type: minecraft:model + path: minecraft:item/custom/${material}_${part} + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + cases: + - when: minecraft:quartz + model: + type: minecraft:model + path: minecraft:item/custom/${material}_${part}_quartz_trim + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + layer1: minecraft:trims/items/${part}_trim_quartz + - when: minecraft:iron + model: + type: minecraft:model + path: minecraft:item/custom/${material}_${part}_iron_trim + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + layer1: minecraft:trims/items/${part}_trim_iron + - when: minecraft:netherite + model: + type: minecraft:model + path: minecraft:item/custom/${material}_${part}_netherite_trim + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + layer1: minecraft:trims/items/${part}_trim_netherite + - when: minecraft:redstone + model: + type: minecraft:model + path: minecraft:item/custom/${material}_${part}_redstone_trim + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + layer1: minecraft:trims/items/${part}_trim_redstone + - when: minecraft:copper + model: + type: minecraft:model + path: minecraft:item/custom/${material}_${part}_copper_trim + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + layer1: minecraft:trims/items/${part}_trim_copper + - when: minecraft:gold + model: + type: minecraft:model + path: minecraft:item/custom/${material}_${part}_gold_trim + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + layer1: minecraft:trims/items/${part}_trim_gold + - when: minecraft:emerald + model: + type: minecraft:model + path: minecraft:item/custom/${material}_${part}_emerald_trim + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + layer1: minecraft:trims/items/${part}_trim_emerald + - when: minecraft:diamond + model: + type: minecraft:model + path: minecraft:item/custom/${material}_${part}_diamond_trim + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + layer1: minecraft:trims/items/${part}_trim_diamond + - when: minecraft:lapis + model: + type: minecraft:model + path: minecraft:item/custom/${material}_${part}_lapis_trim + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + layer1: minecraft:trims/items/${part}_trim_lapis + - when: minecraft:amethyst + model: + type: minecraft:model + path: minecraft:item/custom/${material}_${part}_amethyst_trim + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + layer1: minecraft:trims/items/${part}_trim_amethyst + - when: minecraft:resin + model: + type: minecraft:model + path: minecraft:item/custom/${material}_${part}_resin_trim + generation: + parent: minecraft:item/generated + textures: + layer0: minecraft:item/custom/${material}_${part} + layer1: minecraft:trims/items/${part}_trim_resin + +# shield +templates#models#shield: + # template: default:model/shield_3d + # arguments: + # model: shield_model_path + # block_model: shield_block_model_path + default:model/shield_3d: + type: minecraft:condition + property: minecraft:using_item + on-false: + type: minecraft:model + path: ${model} + on-true: + type: minecraft:model + path: ${block_model} + +# fishing rods +templates#models#fishing_rod: + # template: default:model/fishing_rod_3d + # arguments: + # model: rod_model_path + # cast_model: rod_cast_model_path + default:model/fishing_rod_3d: + type: minecraft:condition + property: minecraft:fishing_rod/cast + on-false: + type: minecraft:model + path: ${model} + on-true: + type: minecraft:model + path: ${cast_model} + # template: default:model/fishing_rod_2d + # arguments: + # model: rod_model_path + # cast_model: rod_cast_model_path + # texture: rod_texture_path + # cast_texture: rod_cast_texture_path + default:model/fishing_rod_2d: + type: minecraft:condition + property: minecraft:fishing_rod/cast + on-false: + type: minecraft:model + path: ${model} + generation: + parent: minecraft:item/fishing_rod + textures: + layer0: ${texture} + on-true: + type: minecraft:model + path: ${cast_model} + generation: + parent: minecraft:item/fishing_rod + textures: + layer0: ${cast_texture} + # template: default:model/simplified_fishing_rod_2d + # arguments: + # path: rod_[model/texture]_path + # cast_path: rod_cast_[model/texture]_path + default:model/simplified_fishing_rod_2d: + template: default:model/fishing_rod_2d + arguments: + texture: ${path} + model: ${path} + cast_texture: ${cast_path} + cast_model: ${cast_path} + +# bows +templates#models#bow: + # template: default:model/bow_3d + # arguments: + # model: bow_model_path + # pulling_0_model: bow_pulling_0_model_path + # pulling_1_model: bow_pulling_1_model_path + # pulling_2_model: bow_pulling_2_model_path + default:model/bow_3d: + type: minecraft:condition + property: minecraft:using_item + on-false: + type: minecraft:model + path: ${model} + on-true: + type: minecraft:range_dispatch + property: minecraft:use_duration + scale: 0.05 + entries: + - model: + type: minecraft:model + path: ${pulling_1_model} + threshold: 0.65 + - model: + type: minecraft:model + path: ${pulling_2_model} + threshold: 0.9 + fallback: + type: minecraft:model + path: ${pulling_0_model} + # template: default:model/bow_2d + # arguments: + # model: bow_model_path + # pulling_0_model: bow_pulling_0_model_path + # pulling_1_model: bow_pulling_1_model_path + # pulling_2_model: bow_pulling_2_model_path + # texture: bow_texture_path + # pulling_0_texture: bow_pulling_0_texture_path + # pulling_1_texture: bow_pulling_1_texture_path + # pulling_2_texture: bow_pulling_2_texture_path + default:model/bow_2d: + type: minecraft:condition + property: minecraft:using_item + on-false: + type: minecraft:model + path: ${model} + generation: + parent: minecraft:item/bow + textures: + layer0: ${texture} + on-true: + type: minecraft:range_dispatch + property: minecraft:use_duration + scale: 0.05 + entries: + - model: + type: minecraft:model + path: ${pulling_1_model} + generation: + parent: minecraft:item/bow_pulling_1 + textures: + layer0: ${pulling_1_texture} + threshold: 0.65 + - model: + type: minecraft:model + path: ${pulling_2_model} + generation: + parent: minecraft:item/bow_pulling_2 + textures: + layer0: ${pulling_2_texture} + threshold: 0.9 + fallback: + type: minecraft:model + path: ${pulling_0_model} + generation: + parent: minecraft:item/bow_pulling_0 + textures: + layer0: ${pulling_0_texture} + # template: default:model/simplified_bow_2d + # arguments: + # path: bow_[model/texture]_path + # pulling_0_path: bow_pulling_0_[model/texture]_path + # pulling_1_path: bow_pulling_1_[model/texture]_path + # pulling_2_path: bow_pulling_2_[model/texture]_path + default:model/simplified_bow_2d: + template: default:model/bow_2d + arguments: + model: ${path} + pulling_0_model: ${pulling_0_path} + pulling_1_model: ${pulling_1_path} + pulling_2_model: ${pulling_2_path} + texture: ${path} + pulling_0_texture: ${pulling_0_path} + pulling_1_texture: ${pulling_1_path} + pulling_2_texture: ${pulling_2_path} + +# crossbows +templates#models#crossbow: + # template: default:model/crossbow_3d + # arguments: + # model: crossbow_model_path + # arrow_model: crossbow_arrow_model_path + # firework_model: crossbow_firework_model_path + # pulling_0_model: crossbow_pulling_0_model_path + # pulling_1_model: crossbow_pulling_1_model_path + # pulling_2_model: crossbow_pulling_2_model_path + default:model/crossbow_3d: + type: minecraft:condition + property: minecraft:using_item + on-false: + type: minecraft:select + property: minecraft:charge_type + cases: + - when: arrow + model: + type: minecraft:model + path: ${arrow_model} + - when: rocket + model: + type: minecraft:model + path: ${firework_model} + fallback: + type: minecraft:model + path: ${model} + on-true: + type: minecraft:range_dispatch + property: minecraft:crossbow/pull + entries: + - model: + type: minecraft:model + path: ${pulling_1_model} + threshold: 0.58 + - model: + type: minecraft:model + path: ${pulling_2_model} + threshold: 1.0 + fallback: + type: minecraft:model + path: ${pulling_0_model} + # template: default:model/crossbow_2d + # arguments: + # model: crossbow_model_path + # texture: crossbow_texture_path + # arrow_model: crossbow_arrow_model_path + # arrow_texture: crossbow_arrow_texture_path + # firework_model: crossbow_firework_model_path + # firework_texture: crossbow_firework_texture_path + # pulling_0_model: crossbow_pulling_0_model_path + # pulling_0_texture: crossbow_pulling_0_texture_path + # pulling_1_model: crossbow_pulling_1_model_path + # pulling_1_texture: crossbow_pulling_1_texture_path + # pulling_2_model: crossbow_pulling_2_model_path + # pulling_2_texture: crossbow_pulling_2_texture_path + default:model/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: ${arrow_model} + generation: + parent: minecraft:item/crossbow_arrow + textures: + layer0: ${arrow_texture} + - when: rocket + model: + type: minecraft:model + path: ${firework_model} + generation: + parent: minecraft:item/crossbow_firework + textures: + layer0: ${firework_texture} + fallback: + type: minecraft:model + path: ${model} + generation: + parent: minecraft:item/crossbow + textures: + layer0: ${texture} + on-true: + type: minecraft:range_dispatch + property: minecraft:crossbow/pull + entries: + - model: + type: minecraft:model + path: ${pulling_1_model} + generation: + parent: minecraft:item/crossbow_pulling_1 + textures: + layer0: ${pulling_1_texture} + threshold: 0.58 + - model: + type: minecraft:model + path: ${pulling_2_model} + generation: + parent: minecraft:item/crossbow_pulling_2 + textures: + layer0: ${pulling_2_texture} + threshold: 1.0 + fallback: + type: minecraft:model + path: ${pulling_0_model} + generation: + parent: minecraft:item/crossbow_pulling_0 + textures: + layer0: ${pulling_0_texture} + # template: default:model/simplified_crossbow_2d + # arguments: + # path: crossbow_[model/texture]_path + # arrow_path: crossbow_arrow_[model/texture]_path + # firework_path: crossbow_firework_[model/texture]_path + # pulling_0_path: crossbow_pulling_0_[model/texture]_path + # pulling_1_path: crossbow_pulling_1_[model/texture]_path + # pulling_2_path: crossbow_pulling_2_[model/texture]_path + default:model/simplified_crossbow_2d: + template: default:model/crossbow_2d + arguments: + model: ${path} + texture: ${path} + arrow_model: ${arrow_path} + arrow_texture: ${arrow_path} + firework_model: ${firework_path} + firework_texture: ${firework_path} + pulling_0_model: ${pulling_0_path} + pulling_0_texture: ${pulling_0_path} + pulling_1_model: ${pulling_1_path} + pulling_1_texture: ${pulling_1_path} + pulling_2_model: ${pulling_2_path} + pulling_2_texture: ${pulling_2_path} \ No newline at end of file diff --git a/common-files/src/main/resources/resources/default/configuration/templates/recipes.yml b/common-files/src/main/resources/resources/default/configuration/templates/recipes.yml new file mode 100644 index 000000000..88dc3bb78 --- /dev/null +++ b/common-files/src/main/resources/resources/default/configuration/templates/recipes.yml @@ -0,0 +1,28 @@ +templates: + # template: default:recipe/planks + # arguments: + # wood_type: the wood type, for instance 'default:palm' + default:recipe/planks: + type: shapeless + category: building + group: planks + ingredients: + - '#${wood_type}_logs' + result: + id: ${wood_type}_planks + count: 4 + # template: default:recipe/log_2_wood + # arguments: + # wood_type: the wood type, for instance 'default:palm' + default:recipe/log_2_wood: + type: shaped + category: building + group: bark + pattern: + - AA + - AA + ingredients: + A: ${wood_type}_log + result: + id: ${wood_type}_wood + count: 3 \ No newline at end of file diff --git a/common-files/src/main/resources/resources/default/configuration/templates/tool_levels.yml b/common-files/src/main/resources/resources/default/configuration/templates/tool_levels.yml new file mode 100644 index 000000000..6478378d3 --- /dev/null +++ b/common-files/src/main/resources/resources/default/configuration/templates/tool_levels.yml @@ -0,0 +1,25 @@ +templates: + default:pickaxe_power/level_1: + - minecraft:wooden_pickaxe + - minecraft:stone_pickaxe + - minecraft:iron_pickaxe + - minecraft:golden_pickaxe + - minecraft:diamond_pickaxe + - minecraft:netherite_pickaxe + - default:topaz_pickaxe + default:pickaxe_power/level_2: + - minecraft:stone_pickaxe + - minecraft:iron_pickaxe + - minecraft:golden_pickaxe + - minecraft:diamond_pickaxe + - minecraft:netherite_pickaxe + - default:topaz_pickaxe + default:pickaxe_power/level_3: + - minecraft:iron_pickaxe + - minecraft:golden_pickaxe + - minecraft:diamond_pickaxe + - minecraft:netherite_pickaxe + - default:topaz_pickaxe + default:pickaxe_power/level_4: + - minecraft:diamond_pickaxe + - minecraft:netherite_pickaxe \ No newline at end of file diff --git a/core/src/main/java/net/momirealms/craftengine/core/item/AbstractItemManager.java b/core/src/main/java/net/momirealms/craftengine/core/item/AbstractItemManager.java index 92d8269f8..971a0806b 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/item/AbstractItemManager.java +++ b/core/src/main/java/net/momirealms/craftengine/core/item/AbstractItemManager.java @@ -10,16 +10,14 @@ import net.momirealms.craftengine.core.item.updater.ItemUpdateConfig; import net.momirealms.craftengine.core.item.updater.ItemUpdateResult; import net.momirealms.craftengine.core.item.updater.ItemUpdater; import net.momirealms.craftengine.core.item.updater.ItemUpdaters; -import net.momirealms.craftengine.core.pack.AbstractPackManager; -import net.momirealms.craftengine.core.pack.LoadingSequence; -import net.momirealms.craftengine.core.pack.Pack; -import net.momirealms.craftengine.core.pack.ResourceLocation; +import net.momirealms.craftengine.core.pack.*; import net.momirealms.craftengine.core.pack.allocator.IdAllocator; import net.momirealms.craftengine.core.pack.model.*; import net.momirealms.craftengine.core.pack.model.generation.AbstractModelGenerator; import net.momirealms.craftengine.core.pack.model.generation.ModelGeneration; import net.momirealms.craftengine.core.pack.model.select.ChargeTypeSelectProperty; import net.momirealms.craftengine.core.pack.model.select.TrimMaterialSelectProperty; +import net.momirealms.craftengine.core.pack.model.simplified.SimplifiedModelReader; import net.momirealms.craftengine.core.plugin.CraftEngine; import net.momirealms.craftengine.core.plugin.config.Config; import net.momirealms.craftengine.core.plugin.config.ConfigParser; @@ -518,18 +516,56 @@ public abstract class AbstractItemManager extends AbstractModelGenerator impl CustomItem.Builder itemBuilder = createPlatformItemBuilder(uniqueId, material, clientBoundMaterial); - // 模型配置区域,如果这里被配置了,那么用户必须要配置custom-model-data或item-model + // 模型配置区域,如果这里被配置了,那么用户可以配置custom-model-data或item-model // model可以是一个string也可以是一个区域 Object modelSection = section.get("model"); Map legacyModelSection = MiscUtils.castToMap(section.get("legacy-model"), true); - boolean hasModelSection = modelSection != null || legacyModelSection != null; + // model可以是一个map,也可以是一个string或list + boolean hasModelSection = modelSection instanceof Map || legacyModelSection != null; + if (!hasModelSection) { + Object texture = ResourceConfigUtils.get(section, "textures", "texture"); + // 如果使用的是textures,那么model指的是 + if (texture != null) { + // 获取textures列表 + List textures = texture instanceof List ? MiscUtils.getAsStringList(texture) : List.of(texture.toString()); + if (!textures.isEmpty()) { + // 获取可选的模型列表,此时的model不可能是map了 + List modelPath = modelSection != null ? MiscUtils.getAsStringList(modelSection) : List.of(); + // 根据父item model选择处理方案 + Key templateModel = itemModel != null && AbstractPackManager.PRESET_MODERN_MODELS_ITEM.containsKey(itemModel) ? itemModel : clientBoundMaterial; + SimplifiedModelReader simplifiedModelReader = AbstractPackManager.SIMPLIFIED_MODEL_READERS.get(templateModel); + if (simplifiedModelReader != null) { + modelSection = simplifiedModelReader.convert(textures, modelPath, id); + if (modelSection != null) { + hasModelSection = true; + } + } + } + } + // 如果没有配贴图,且model为string或list,直接生成相应类型的模型 + else if (modelSection != null) { + if (modelSection instanceof String singleModel) { + modelSection = Map.of( + "type", "model", + "path", singleModel + ); + hasModelSection = true; + } else if (modelSection instanceof List) { + modelSection = List.of( + "type", "composite", + "models", MiscUtils.getAsStringList(modelSection) + ); + hasModelSection = true; + } + } + } if (customModelData > 0 && (hasModelSection || forceCustomModelData)) { - if (clientBoundModel) itemBuilder.clientBoundDataModifier(new CustomModelDataModifier<>(customModelData)); + if (clientBoundModel) itemBuilder.clientBoundDataModifier(new OverwritableCustomModelDataModifier<>(customModelData)); else itemBuilder.dataModifier(new CustomModelDataModifier<>(customModelData)); } if (itemModel != null && (hasModelSection || forceItemModel)) { - if (clientBoundModel) itemBuilder.clientBoundDataModifier(new ItemModelModifier<>(itemModel)); + if (clientBoundModel) itemBuilder.clientBoundDataModifier(new OverwritableItemModelModifier<>(itemModel)); else itemBuilder.dataModifier(new ItemModelModifier<>(itemModel)); } diff --git a/core/src/main/java/net/momirealms/craftengine/core/item/modifier/ItemDataModifiers.java b/core/src/main/java/net/momirealms/craftengine/core/item/modifier/ItemDataModifiers.java index e35e432fb..b0064ce8e 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/item/modifier/ItemDataModifiers.java +++ b/core/src/main/java/net/momirealms/craftengine/core/item/modifier/ItemDataModifiers.java @@ -15,6 +15,7 @@ public final class ItemDataModifiers { private ItemDataModifiers() {} public static final Key ITEM_MODEL = Key.of("craftengine:item-model"); + public static final Key OVERWRITABLE_ITEM_MODEL = Key.of("craftengine:overwritable-item-model"); public static final Key ID = Key.of("craftengine:id"); public static final Key HIDE_TOOLTIP = Key.of("craftengine:hide-tooltip"); public static final Key FOOD = Key.of("craftengine:food"); @@ -27,6 +28,7 @@ public final class ItemDataModifiers { public static final Key DISPLAY_NAME = Key.of("craftengine:display-name"); public static final Key CUSTOM_NAME = Key.of("craftengine:custom-name"); public static final Key CUSTOM_MODEL_DATA = Key.of("craftengine:custom-model-data"); + public static final Key OVERWRITABLE_CUSTOM_MODEL_DATA = Key.of("craftengine:overwritable-custom-model-data"); public static final Key COMPONENTS = Key.of("craftengine:components"); public static final Key COMPONENT = Key.of("craftengine:component"); public static final Key ATTRIBUTE_MODIFIERS = Key.of("craftengine:attribute-modifiers"); diff --git a/core/src/main/java/net/momirealms/craftengine/core/item/modifier/OverwritableCustomModelDataModifier.java b/core/src/main/java/net/momirealms/craftengine/core/item/modifier/OverwritableCustomModelDataModifier.java new file mode 100644 index 000000000..1d0227a15 --- /dev/null +++ b/core/src/main/java/net/momirealms/craftengine/core/item/modifier/OverwritableCustomModelDataModifier.java @@ -0,0 +1,58 @@ +package net.momirealms.craftengine.core.item.modifier; + +import net.momirealms.craftengine.core.item.DataComponentKeys; +import net.momirealms.craftengine.core.item.Item; +import net.momirealms.craftengine.core.item.ItemBuildContext; +import net.momirealms.craftengine.core.item.ItemDataModifierFactory; +import net.momirealms.craftengine.core.util.Key; +import net.momirealms.craftengine.core.util.ResourceConfigUtils; +import org.jetbrains.annotations.Nullable; + +public class OverwritableCustomModelDataModifier implements SimpleNetworkItemDataModifier { + public static final Factory FACTORY = new Factory<>(); + private final int argument; + + public OverwritableCustomModelDataModifier(int argument) { + this.argument = argument; + } + + public int customModelData() { + return this.argument; + } + + @Override + public Key type() { + return ItemDataModifiers.OVERWRITABLE_CUSTOM_MODEL_DATA; + } + + @Override + public Item apply(Item item, ItemBuildContext context) { + if (item.customModelData().isPresent()) return item; + item.customModelData(this.argument); + return item; + } + + @Override + public @Nullable Key componentType(Item item, ItemBuildContext context) { + return DataComponentKeys.CUSTOM_MODEL_DATA; + } + + @Override + public @Nullable Object[] nbtPath(Item item, ItemBuildContext context) { + return new Object[]{"CustomModelData"}; + } + + @Override + public String nbtPathString(Item item, ItemBuildContext context) { + return "CustomModelData"; + } + + public static class Factory implements ItemDataModifierFactory { + + @Override + public ItemDataModifier create(Object arg) { + int customModelData = ResourceConfigUtils.getAsInt(arg, "custom-model-data"); + return new OverwritableCustomModelDataModifier<>(customModelData); + } + } +} diff --git a/core/src/main/java/net/momirealms/craftengine/core/item/modifier/OverwritableItemModelModifier.java b/core/src/main/java/net/momirealms/craftengine/core/item/modifier/OverwritableItemModelModifier.java new file mode 100644 index 000000000..9e54d05bc --- /dev/null +++ b/core/src/main/java/net/momirealms/craftengine/core/item/modifier/OverwritableItemModelModifier.java @@ -0,0 +1,46 @@ +package net.momirealms.craftengine.core.item.modifier; + +import net.momirealms.craftengine.core.item.DataComponentKeys; +import net.momirealms.craftengine.core.item.Item; +import net.momirealms.craftengine.core.item.ItemBuildContext; +import net.momirealms.craftengine.core.item.ItemDataModifierFactory; +import net.momirealms.craftengine.core.util.Key; +import org.jetbrains.annotations.Nullable; + +public class OverwritableItemModelModifier implements SimpleNetworkItemDataModifier { + public static final Factory FACTORY = new Factory<>(); + private final Key data; + + public OverwritableItemModelModifier(Key data) { + this.data = data; + } + + public Key data() { + return data; + } + + @Override + public Key type() { + return ItemDataModifiers.OVERWRITABLE_CUSTOM_MODEL_DATA; + } + + @Override + public Item apply(Item item, ItemBuildContext context) { + if (item.hasNonDefaultComponent(DataComponentKeys.ITEM_MODEL)) return item; + return item.itemModel(this.data.asString()); + } + + @Override + public @Nullable Key componentType(Item item, ItemBuildContext context) { + return DataComponentKeys.ITEM_MODEL; + } + + public static class Factory implements ItemDataModifierFactory { + + @Override + public ItemDataModifier create(Object arg) { + String id = arg.toString(); + return new OverwritableItemModelModifier<>(Key.of(id)); + } + } +} diff --git a/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomBlastingRecipe.java b/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomBlastingRecipe.java index 4cd515793..a013537a3 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomBlastingRecipe.java +++ b/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomBlastingRecipe.java @@ -42,7 +42,7 @@ public class CustomBlastingRecipe extends CustomCookingRecipe { parseResult(arguments), arguments.containsKey("group") ? arguments.get("group").toString() : null, cookingRecipeCategory(arguments), singleInputIngredient(arguments), ResourceConfigUtils.getAsInt(arguments.getOrDefault("time", 80), "time"), - ResourceConfigUtils.getAsFloat(arguments.getOrDefault("experience", 0.0f), "experience") + ResourceConfigUtils.getAsFloat(ResourceConfigUtils.get(arguments, "exp", "experience"), "experience") ); } diff --git a/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomCampfireRecipe.java b/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomCampfireRecipe.java index 16fa94a62..4c8545e1a 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomCampfireRecipe.java +++ b/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomCampfireRecipe.java @@ -42,7 +42,7 @@ public class CustomCampfireRecipe extends CustomCookingRecipe { parseResult(arguments), arguments.containsKey("group") ? arguments.get("group").toString() : null, cookingRecipeCategory(arguments), singleInputIngredient(arguments), ResourceConfigUtils.getAsInt(arguments.getOrDefault("time", 80), "time"), - ResourceConfigUtils.getAsFloat(arguments.getOrDefault("experience", 0.0f), "experience") + ResourceConfigUtils.getAsFloat(ResourceConfigUtils.get(arguments, "exp", "experience"), "experience") ); } diff --git a/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomSmeltingRecipe.java b/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomSmeltingRecipe.java index 9df7351f2..cbb2663c5 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomSmeltingRecipe.java +++ b/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomSmeltingRecipe.java @@ -42,7 +42,7 @@ public class CustomSmeltingRecipe extends CustomCookingRecipe { parseResult(arguments), arguments.containsKey("group") ? arguments.get("group").toString() : null, cookingRecipeCategory(arguments), singleInputIngredient(arguments), ResourceConfigUtils.getAsInt(arguments.getOrDefault("time", 80), "time"), - ResourceConfigUtils.getAsFloat(arguments.getOrDefault("experience", 0.0f), "experience") + ResourceConfigUtils.getAsFloat(ResourceConfigUtils.get(arguments, "exp", "experience"), "experience") ); } diff --git a/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomSmokingRecipe.java b/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomSmokingRecipe.java index 357d047f4..8002009b6 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomSmokingRecipe.java +++ b/core/src/main/java/net/momirealms/craftengine/core/item/recipe/CustomSmokingRecipe.java @@ -42,7 +42,7 @@ public class CustomSmokingRecipe extends CustomCookingRecipe { parseResult(arguments), arguments.containsKey("group") ? arguments.get("group").toString() : null, cookingRecipeCategory(arguments), singleInputIngredient(arguments), ResourceConfigUtils.getAsInt(arguments.getOrDefault("time", 80), "time"), - ResourceConfigUtils.getAsFloat(arguments.getOrDefault("experience", 0.0f), "experience") + ResourceConfigUtils.getAsFloat(ResourceConfigUtils.get(arguments, "exp", "experience"), "experience") ); } diff --git a/core/src/main/java/net/momirealms/craftengine/core/loot/function/ApplyDataFunction.java b/core/src/main/java/net/momirealms/craftengine/core/loot/function/ApplyDataFunction.java index 168d9e6fa..2d870d95f 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/loot/function/ApplyDataFunction.java +++ b/core/src/main/java/net/momirealms/craftengine/core/loot/function/ApplyDataFunction.java @@ -3,12 +3,9 @@ package net.momirealms.craftengine.core.loot.function; import net.momirealms.craftengine.core.item.Item; import net.momirealms.craftengine.core.item.ItemBuildContext; import net.momirealms.craftengine.core.item.modifier.ItemDataModifier; -import net.momirealms.craftengine.core.item.recipe.result.ApplyItemDataPostProcessor; import net.momirealms.craftengine.core.loot.LootConditions; import net.momirealms.craftengine.core.loot.LootContext; import net.momirealms.craftengine.core.plugin.context.Condition; -import net.momirealms.craftengine.core.plugin.context.number.NumberProvider; -import net.momirealms.craftengine.core.plugin.context.number.NumberProviders; import net.momirealms.craftengine.core.registry.BuiltInRegistries; import net.momirealms.craftengine.core.util.Key; import net.momirealms.craftengine.core.util.ResourceConfigUtils; diff --git a/core/src/main/java/net/momirealms/craftengine/core/pack/AbstractPackManager.java b/core/src/main/java/net/momirealms/craftengine/core/pack/AbstractPackManager.java index 6981623e8..0a3ad98b6 100644 --- a/core/src/main/java/net/momirealms/craftengine/core/pack/AbstractPackManager.java +++ b/core/src/main/java/net/momirealms/craftengine/core/pack/AbstractPackManager.java @@ -22,6 +22,9 @@ import net.momirealms.craftengine.core.pack.model.RangeDispatchItemModel; import net.momirealms.craftengine.core.pack.model.generation.ModelGeneration; import net.momirealms.craftengine.core.pack.model.generation.ModelGenerator; import net.momirealms.craftengine.core.pack.model.rangedisptach.CustomModelDataRangeDispatchProperty; +import net.momirealms.craftengine.core.pack.model.simplified.GeneratedModelReader; +import net.momirealms.craftengine.core.pack.model.simplified.HandheldModelReader; +import net.momirealms.craftengine.core.pack.model.simplified.SimplifiedModelReader; import net.momirealms.craftengine.core.pack.revision.Revision; import net.momirealms.craftengine.core.pack.revision.Revisions; import net.momirealms.craftengine.core.plugin.CraftEngine; @@ -67,16 +70,28 @@ import static net.momirealms.craftengine.core.util.MiscUtils.castToMap; @SuppressWarnings("DuplicatedCode") public abstract class AbstractPackManager implements PackManager { + // 1.21.4+物品模型 public static final Map PRESET_MODERN_MODELS_ITEM = new HashMap<>(); + // 旧版本的物品模型 public static final Map PRESET_LEGACY_MODELS_ITEM = new HashMap<>(); + // 全版本的方块模型 public static final Map PRESET_MODELS_BLOCK = new HashMap<>(); + // 1.21.4+物品模型定义 public static final Map PRESET_ITEMS = new HashMap<>(); + + // 原版资产id public static final Set VANILLA_TEXTURES = new HashSet<>(); public static final Set VANILLA_MODELS = new HashSet<>(); public static final Set VANILLA_SOUNDS = new HashSet<>(); + + // 简化的model读取器 + public static final Map SIMPLIFIED_MODEL_READERS = new HashMap<>(); + public static final String NEW_TRIM_MATERIAL = "custom"; + public static final Set ALLOWED_VANILLA_EQUIPMENT = Set.of("chainmail", "diamond", "gold", "iron", "netherite"); public static final Set ALLOWED_MODEL_TAGS = Set.of("parent", "ambientocclusion", "display", "textures", "elements", "gui_light", "overrides"); + private static final byte[] EMPTY_1X1_IMAGE; private static final byte[] EMPTY_EQUIPMENT_IMAGE; private static final byte[] EMPTY_16X16_IMAGE; @@ -166,6 +181,15 @@ public abstract class AbstractPackManager implements PackManager { loadInternalData("internal/models/item/_all.json", ((key, jsonObject) -> { PRESET_MODERN_MODELS_ITEM.put(key, jsonObject); VANILLA_MODELS.add(Key.of(key.namespace(), "item/" + key.value())); + JsonElement parent = jsonObject.get("parent"); + if (parent instanceof JsonPrimitive primitive) { + String parentModel = primitive.getAsString(); + if (parentModel.equals("minecraft:item/handheld")) { + SIMPLIFIED_MODEL_READERS.put(key, HandheldModelReader.INSTANCE); + } else { + SIMPLIFIED_MODEL_READERS.put(key, GeneratedModelReader.INSTANCE); + } + } })); loadInternalData("internal/models/block/_all.json", ((key, jsonObject) -> { PRESET_MODELS_BLOCK.put(key, jsonObject); @@ -428,7 +452,12 @@ public abstract class AbstractPackManager implements PackManager { plugin.saveResource("resources/default/resourcepack/pack.mcmeta"); plugin.saveResource("resources/default/resourcepack/pack.png"); // configs - plugin.saveResource("resources/default/configuration/templates.yml"); + plugin.saveResource("resources/default/configuration/templates/block_settings.yml"); + plugin.saveResource("resources/default/configuration/templates/block_states.yml"); + plugin.saveResource("resources/default/configuration/templates/models.yml"); + plugin.saveResource("resources/default/configuration/templates/loot_tables.yml"); + plugin.saveResource("resources/default/configuration/templates/recipes.yml"); + plugin.saveResource("resources/default/configuration/templates/tool_levels.yml"); plugin.saveResource("resources/default/configuration/categories.yml"); plugin.saveResource("resources/default/configuration/emoji.yml"); plugin.saveResource("resources/default/configuration/translations.yml"); diff --git a/core/src/main/java/net/momirealms/craftengine/core/pack/model/simplified/GeneratedModelReader.java b/core/src/main/java/net/momirealms/craftengine/core/pack/model/simplified/GeneratedModelReader.java new file mode 100644 index 000000000..9119ce3de --- /dev/null +++ b/core/src/main/java/net/momirealms/craftengine/core/pack/model/simplified/GeneratedModelReader.java @@ -0,0 +1,38 @@ +package net.momirealms.craftengine.core.pack.model.simplified; + +import net.momirealms.craftengine.core.util.Key; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class GeneratedModelReader implements SimplifiedModelReader { + public static final GeneratedModelReader INSTANCE = new GeneratedModelReader(); + + @Override + public Map convert(List textures, List optionalModelPaths, Key id) { + boolean autoModelPath = optionalModelPaths.size() != 1; + Map texturesProperty; + switch (textures.size()) { + case 1 -> texturesProperty = Map.of("layer0", textures.getFirst()); + case 2 -> texturesProperty = Map.of( + "layer0", textures.get(0), + "layer1", textures.get(1) + ); + default -> { + texturesProperty = new HashMap<>(); + for (int i = 0; i < textures.size(); i++) { + texturesProperty.put("layer" + i, textures.get(i)); + } + } + } + return Map.of( + "type", "model", + "path", autoModelPath ? id.namespace() + ":item/" + id.value() : optionalModelPaths.getFirst(), + "generation", Map.of( + "parent", "item/generated", + "textures", texturesProperty + ) + ); + } +} diff --git a/core/src/main/java/net/momirealms/craftengine/core/pack/model/simplified/HandheldModelReader.java b/core/src/main/java/net/momirealms/craftengine/core/pack/model/simplified/HandheldModelReader.java new file mode 100644 index 000000000..ded2f4d87 --- /dev/null +++ b/core/src/main/java/net/momirealms/craftengine/core/pack/model/simplified/HandheldModelReader.java @@ -0,0 +1,38 @@ +package net.momirealms.craftengine.core.pack.model.simplified; + +import net.momirealms.craftengine.core.util.Key; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class HandheldModelReader implements SimplifiedModelReader { + public static final HandheldModelReader INSTANCE = new HandheldModelReader(); + + @Override + public Map convert(List textures, List optionalModelPaths, Key id) { + boolean autoModelPath = optionalModelPaths.size() != 1; + Map texturesProperty; + switch (textures.size()) { + case 1 -> texturesProperty = Map.of("layer0", textures.getFirst()); + case 2 -> texturesProperty = Map.of( + "layer0", textures.get(0), + "layer1", textures.get(1) + ); + default -> { + texturesProperty = new HashMap<>(); + for (int i = 0; i < textures.size(); i++) { + texturesProperty.put("layer" + i, textures.get(i)); + } + } + } + return Map.of( + "type", "model", + "path", autoModelPath ? id.namespace() + ":item/" + id.value() : optionalModelPaths.getFirst(), + "generation", Map.of( + "parent", "item/handheld", + "textures", texturesProperty + ) + ); + } +} diff --git a/core/src/main/java/net/momirealms/craftengine/core/pack/model/simplified/SimplifiedModelReader.java b/core/src/main/java/net/momirealms/craftengine/core/pack/model/simplified/SimplifiedModelReader.java new file mode 100644 index 000000000..895429c3b --- /dev/null +++ b/core/src/main/java/net/momirealms/craftengine/core/pack/model/simplified/SimplifiedModelReader.java @@ -0,0 +1,13 @@ +package net.momirealms.craftengine.core.pack.model.simplified; + +import net.momirealms.craftengine.core.util.Key; +import org.jetbrains.annotations.Nullable; + +import java.util.List; +import java.util.Map; + +public interface SimplifiedModelReader { + + @Nullable + Map convert(List textures, List optionalModelPaths, Key id); +} diff --git a/gradle.properties b/gradle.properties index 81a263711..0ea73a669 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx1G # Project settings # Rule: [major update].[feature update].[bug fix] -project_version=0.0.65.6 +project_version=0.0.65.7 config_version=54 lang_version=38 project_group=net.momirealms @@ -49,7 +49,7 @@ byte_buddy_version=1.17.8 ahocorasick_version=0.6.3 snake_yaml_version=2.5 anti_grief_version=1.0.4 -nms_helper_version=1.0.129 +nms_helper_version=1.0.128 evalex_version=3.5.0 reactive_streams_version=1.0.4 amazon_awssdk_version=2.34.5