9
0
mirror of https://github.com/Xiao-MoMi/craft-engine.git synced 2026-01-04 15:41:38 +00:00

improve auto-state for leaves

This commit is contained in:
XiaoMoMi
2025-10-20 16:57:48 +08:00
parent f12e01db01
commit 83861b7df2
3 changed files with 57 additions and 62 deletions

View File

@@ -198,10 +198,7 @@ items:
material: oak_leaves
data:
item-name: <!i><i18n:item.palm_leaves>
block-state:
distance: '1'
persistent: 'false'
waterlogged: 'false'
block-state: default:palm_leaves[persistent=true,waterlogged=false,distance=7]
model:
type: minecraft:model
path: minecraft:item/custom/palm_leaves
@@ -223,7 +220,7 @@ items:
settings:
template: default:settings/leaves
states:
template: default:block_state/leaves
template: default:block_state/tintable_leaves
arguments:
model_path: minecraft:block/custom/palm_leaves
texture_path: minecraft:block/custom/palm_leaves

View File

@@ -898,8 +898,7 @@ templates#block_states:
appearance: axisY
axis=z:
appearance: axisZ
# leaves block
default:block_state/leaves:
default:block_state/__leaves__:
properties:
waterlogged:
type: boolean
@@ -913,7 +912,7 @@ templates#block_states:
range: 1~7
appearances:
default:
auto-state: leaves
auto-state: ${auto_state}
model:
path: ${model_path}
generation:
@@ -921,7 +920,7 @@ templates#block_states:
textures:
all: ${texture_path}
waterlogged:
auto-state: waterlogged_leaves
auto-state: waterlogged_${auto_state}
model:
path: ${model_path}
variants:
@@ -936,44 +935,21 @@ templates#block_states:
distance=7,persistent=false:
settings:
is-randomly-ticking: true
# leaves (no tint) block
# any leaves block
default:block_state/leaves:
properties:
waterlogged:
type: boolean
default: false
persistent:
type: boolean
default: true
distance:
type: int
default: 7
range: 1~7
appearances:
default:
auto-state: leaves_no_tint
model:
path: ${model_path}
generation:
parent: minecraft:block/leaves
textures:
all: ${texture_path}
waterlogged:
auto-state: waterlogged_leaves_no_tint
model:
path: ${model_path}
variants:
waterlogged=false:
appearance: default
waterlogged=true:
appearance: waterlogged
settings:
resistance: 1200.0
burnable: false
fluid-state: water
distance=7,persistent=false:
settings:
is-randomly-ticking: true
template: default:block_state/__leaves__
arguments:
auto_state: leaves
# tintable leaves block
default:block_state/tintable_leaves:
template: default:block_state/__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
# trapdoor block
default:block_state/trapdoor:
properties: