diff --git a/kubejs/startup_scripts/wheat_plus.js b/kubejs/startup_scripts/wheat_plus.js index 3369419..5ef27bb 100644 --- a/kubejs/startup_scripts/wheat_plus.js +++ b/kubejs/startup_scripts/wheat_plus.js @@ -290,6 +290,46 @@ onEvent('block.registry', (event) => { }); +// 注册方块 - 灯 +onEvent('block.registry', (event) => { + + console.info(`${LOG_PREFIX} 注册方块 - 灯 - 开始`); + + const keys = Object.keys(COLORS); + + keys.forEach((key) => { + + const color = COLORS[key]; + const id = `${MOD_ID}:lamp_modern_${color.CODE}`; + const block = event.create(id, 'basic'); + + // 纹理文件路径前缀 + // wheat_plus:block/lamp_modern/color_ + const tBase = `${PATH_TEXTURE}lamp_modern/${color.CODE}`; + + setBlockProps(block, { + boxType: 'full', + displayName: `现代${color.LABEL_CN}灯`, + lightLevel: 1, + material: 'glass', + renderType: 'translucent', + }); + + block.modelJson = { + parent: `${PATH_MODEL}lamp_modern`, + textures: { + glow: `${tBase}_glow`, + core: `${tBase}_core`, + particle: `${tBase}_core` + } + }; + + }); + + console.info(`${LOG_PREFIX} 注册方块 - 灯 - 完成`); + +}); + // 注册物品 // onEvent('item.registry', (event) => { // console.info(`${LOG_PREFIX} 注册物品 - 开始`); diff --git a/resourcepack/assets/wheat_plus/models/block/lamp_modern.json b/resourcepack/assets/wheat_plus/models/block/lamp_modern.json new file mode 100644 index 0000000..3259e98 --- /dev/null +++ b/resourcepack/assets/wheat_plus/models/block/lamp_modern.json @@ -0,0 +1,35 @@ +{ + "credit": "Create by Frost-ZX using Blockbench.", + "parent": "block/block", + "ambientocclusion": false, + "elements": [ + { + "name": "core", + "from": [0, 0, 0], + "to": [16, 16, 16], + "shade": false, + "faces": { + "north": {"uv": [0, 0, 16, 16], "texture": "#core"}, + "east": {"uv": [0, 0, 16, 16], "texture": "#core"}, + "south": {"uv": [0, 0, 16, 16], "texture": "#core"}, + "west": {"uv": [0, 0, 16, 16], "texture": "#core"}, + "up": {"uv": [0, 0, 16, 16], "texture": "#core"}, + "down": {"uv": [0, 0, 16, 16], "texture": "#core"} + } + }, + { + "name": "glow", + "from": [-0.75, -0.75, -0.75], + "to": [16.75, 16.75, 16.75], + "shade": false, + "faces": { + "north": {"uv": [3, 3, 13, 13], "texture": "#glow"}, + "east": {"uv": [3, 3, 13, 13], "texture": "#glow"}, + "south": {"uv": [3, 3, 13, 13], "texture": "#glow"}, + "west": {"uv": [3, 3, 13, 13], "texture": "#glow"}, + "up": {"uv": [3, 3, 13, 13], "texture": "#glow"}, + "down": {"uv": [3, 3, 13, 13], "texture": "#glow"} + } + } + ] +} \ No newline at end of file diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/black_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/black_core.png new file mode 100644 index 0000000..439020f Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/black_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/black_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/black_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/black_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/black_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/black_glow_l.png new file mode 100644 index 0000000..bbc5085 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/black_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/blue_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/blue_core.png new file mode 100644 index 0000000..62991cb Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/blue_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/blue_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/blue_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/blue_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/blue_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/blue_glow_l.png new file mode 100644 index 0000000..aafd899 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/blue_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/brown_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/brown_core.png new file mode 100644 index 0000000..73e49cf Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/brown_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/brown_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/brown_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/brown_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/brown_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/brown_glow_l.png new file mode 100644 index 0000000..8b6217a Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/brown_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/cyan_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/cyan_core.png new file mode 100644 index 0000000..0c143b5 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/cyan_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/cyan_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/cyan_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/cyan_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/cyan_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/cyan_glow_l.png new file mode 100644 index 0000000..0d020b2 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/cyan_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/gray_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/gray_core.png new file mode 100644 index 0000000..76a06e0 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/gray_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/gray_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/gray_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/gray_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/gray_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/gray_glow_l.png new file mode 100644 index 0000000..3b36c87 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/gray_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/green_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/green_core.png new file mode 100644 index 0000000..734fe10 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/green_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/green_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/green_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/green_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/green_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/green_glow_l.png new file mode 100644 index 0000000..7797360 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/green_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_blue_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_blue_core.png new file mode 100644 index 0000000..a220591 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_blue_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_blue_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_blue_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_blue_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_blue_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_blue_glow_l.png new file mode 100644 index 0000000..5feba27 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_blue_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_gray_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_gray_core.png new file mode 100644 index 0000000..cfd2c39 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_gray_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_gray_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_gray_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_gray_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_gray_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_gray_glow_l.png new file mode 100644 index 0000000..9756ea8 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/light_gray_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/lime_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/lime_core.png new file mode 100644 index 0000000..3d00dcf Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/lime_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/lime_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/lime_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/lime_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/lime_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/lime_glow_l.png new file mode 100644 index 0000000..b603e8f Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/lime_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/magenta_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/magenta_core.png new file mode 100644 index 0000000..08bc923 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/magenta_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/magenta_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/magenta_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/magenta_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/magenta_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/magenta_glow_l.png new file mode 100644 index 0000000..48207c3 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/magenta_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/orange_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/orange_core.png new file mode 100644 index 0000000..b2e90ce Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/orange_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/orange_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/orange_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/orange_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/orange_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/orange_glow_l.png new file mode 100644 index 0000000..ebf8988 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/orange_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/pink_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/pink_core.png new file mode 100644 index 0000000..3933fa3 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/pink_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/pink_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/pink_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/pink_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/pink_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/pink_glow_l.png new file mode 100644 index 0000000..048ce8e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/pink_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/purple_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/purple_core.png new file mode 100644 index 0000000..9193cef Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/purple_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/purple_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/purple_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/purple_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/purple_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/purple_glow_l.png new file mode 100644 index 0000000..5b9bdb5 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/purple_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/red_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/red_core.png new file mode 100644 index 0000000..43d08c4 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/red_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/red_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/red_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/red_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/red_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/red_glow_l.png new file mode 100644 index 0000000..dda03c8 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/red_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/white_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/white_core.png new file mode 100644 index 0000000..b10739d Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/white_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/white_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/white_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/white_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/white_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/white_glow_l.png new file mode 100644 index 0000000..5c3df36 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/white_glow_l.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/yellow_core.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/yellow_core.png new file mode 100644 index 0000000..c680315 Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/yellow_core.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/yellow_glow.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/yellow_glow.png new file mode 100644 index 0000000..983a01e Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/yellow_glow.png differ diff --git a/resourcepack/assets/wheat_plus/textures/block/lamp_modern/yellow_glow_l.png b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/yellow_glow_l.png new file mode 100644 index 0000000..aca508a Binary files /dev/null and b/resourcepack/assets/wheat_plus/textures/block/lamp_modern/yellow_glow_l.png differ