diff --git a/kubejs/startup_scripts/_main_.js b/kubejs/startup_scripts/_main_.js index 375ae07..3f2501a 100644 --- a/kubejs/startup_scripts/_main_.js +++ b/kubejs/startup_scripts/_main_.js @@ -132,6 +132,8 @@ global.setBlockProps = function (block, opts) { let soundType = defaults(opts.soundType, 'stone'); let textureAll = defaults(opts.textureAll, ''); let textureSide = defaults(opts.textureSide, ''); + let textureSideNS = defaults(opts.textureSideNS, ''); + let textureSideWE = defaults(opts.textureSideWE, ''); let textureUpDown = defaults(opts.textureUpDown, ''); if (boxType === 'custom') { @@ -184,6 +186,20 @@ global.setBlockProps = function (block, opts) { ], textureSide); } + if (textureSideNS) { + block.texture([ + Direction.NORTH, + Direction.SOUTH, + ], textureSideNS); + } + + if (textureSideWE) { + block.texture([ + Direction.WEST, + Direction.EAST, + ], textureSideWE); + } + if (textureUpDown) { block.texture([ Direction.UP, diff --git a/kubejs/startup_scripts/wheat_plus.js b/kubejs/startup_scripts/wheat_plus.js index 492728a..045a6bb 100644 --- a/kubejs/startup_scripts/wheat_plus.js +++ b/kubejs/startup_scripts/wheat_plus.js @@ -305,6 +305,18 @@ function regBlockCommon(event) { let blockList = [ // 普通方块 + { + name: 'carton_a', + label: '纸箱', + blockstate: null, + box: null, + model: '', + texture: '', + textureSideNS: 'common/carton_a_ns', + textureSideWE: 'common/carton_a_we', + textureUpDown: 'common/carton_a_ud', + type: '', + }, { name: 'crash_barriar_a', label: '防撞墩(石头)', @@ -1185,6 +1197,10 @@ function regBlockCommon(event) { let textureAllPath1 = textureAllPath0 || ''; let textureSidePath0 = config.textureSide; let textureSidePath1 = textureSidePath0 || ''; + let textureSideNSPath0 = config.textureSideNS; + let textureSideNSPath1 = textureSideNSPath0 || ''; + let textureSideWEPath0 = config.textureSideWE; + let textureSideWEPath1 = textureSideWEPath0 || ''; let textureUpDownPath0 = config.textureUpDown; let textureUpDownPath1 = textureUpDownPath0 || ''; @@ -1195,6 +1211,12 @@ function regBlockCommon(event) { if (textureSidePath0 && !textureSidePath0.includes(':')) { textureSidePath1 = `${P_BLOCK}/${textureSidePath0}`; } + if (textureSideNSPath0 && !textureSideNSPath0.includes(':')) { + textureSideNSPath1 = `${P_BLOCK}/${textureSideNSPath0}`; + } + if (textureSideWEPath0 && !textureSideWEPath0.includes(':')) { + textureSideWEPath1 = `${P_BLOCK}/${textureSideWEPath0}`; + } if (textureUpDownPath0 && !textureUpDownPath0.includes(':')) { textureUpDownPath1 = `${P_BLOCK}/${textureUpDownPath0}`; } @@ -1222,6 +1244,8 @@ function regBlockCommon(event) { } : null, textureAll: textureAllPath1, textureSide: textureSidePath1, + textureSideNS: textureSideNSPath1, + textureSideWE: textureSideWEPath1, textureUpDown: textureUpDownPath1, }; diff --git a/resourcepack/assets/wheat_plus/textures/block/common/carton_a_ns.png b/resourcepack/assets/wheat_plus/textures/block/common/carton_a_ns.png new file mode 100644 index 0000000..5eb8788 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/common/carton_a_ns.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/common/carton_a_ud.png b/resourcepack/assets/wheat_plus/textures/block/common/carton_a_ud.png new file mode 100644 index 0000000..7541418 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/common/carton_a_ud.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/common/carton_a_we.png b/resourcepack/assets/wheat_plus/textures/block/common/carton_a_we.png new file mode 100644 index 0000000..f6bb0b7 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/common/carton_a_we.png differ