Merge pull request 'Replace lighting rod nodebox by 3d model' (#3042) from mcl-lightning-rod-model into master

Reviewed-on: https://git.minetest.land/MineClone2/MineClone2/pulls/3042
Reviewed-by: 𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 <mrrar@noreply.git.minetest.land>
This commit is contained in:
𝕵𝖔𝖍𝖆𝖓𝖓𝖊𝖘 𝕱𝖗𝖎𝖙𝖟 2022-12-04 17:20:29 +00:00
commit e57551f764
2 changed files with 94 additions and 24 deletions

View File

@ -9,32 +9,19 @@ local cbox = {
},
}
local text_top = "[combine:16x16:6,6=mcl_lightning_rods_rod.png"
local text_side = "[combine:16x16:7,0=mcl_lightning_rods_rod.png:-6,0=mcl_lightning_rods_rod.png\\^[transformR270"
local text_top_active = "[combine:16x16:6,6=mcl_lightning_rods_rod.png\\^[brighten"
local text_side_active = "[combine:16x16:7,0=mcl_lightning_rods_rod.png\\^[brighten:-6,0=mcl_lightning_rods_rod.png\\^[transformR270\\^[brighten"
---@type node_definition
local rod_def = {
description = S("Lightning Rod"),
_doc_items_longdesc = S("A block that attracts lightning"),
tiles = {
text_top,
text_top,
text_side,
text_side,
text_side,
text_side,
},
drawtype = "nodebox",
tiles = { "mcl_lightning_rods_rod.png" },
drawtype = "mesh",
mesh = "mcl_lightning_rods_rod.obj",
is_ground_content = false,
paramtype = "light",
paramtype2 = "facedir",
use_texture_alpha = "opaque",
groups = { pickaxey = 2, attracts_lightning = 1 },
sounds = mcl_sounds.node_sound_metal_defaults(),
node_box = cbox,
selection_box = cbox,
collision_box = cbox,
node_placement_prediction = "",
@ -80,14 +67,7 @@ minetest.register_node("mcl_lightning_rods:rod", rod_def)
local rod_def_a = table.copy(rod_def)
rod_def_a.tiles = {
text_top_active,
text_top_active,
text_side_active,
text_side_active,
text_side_active,
text_side_active,
}
rod_def_a.tiles = { "mcl_lightning_rods_rod.png^[brighten" }
rod_def_a.groups.not_in_creative_inventory = 1

View File

@ -0,0 +1,90 @@
# Blender 3.3.1
# www.blender.org
o Cube
v -0.062500 -0.500000 0.062500
v -0.062500 0.250000 0.062500
v -0.062500 -0.500000 -0.062500
v -0.062500 0.250000 -0.062500
v 0.062500 -0.500000 0.062500
v 0.062500 0.250000 0.062500
v 0.062500 -0.500000 -0.062500
v 0.062500 0.250000 -0.062500
v -0.125000 0.250000 0.125000
v -0.125000 0.250000 -0.125000
v 0.125000 0.250000 -0.125000
v 0.125000 0.250000 0.125000
v -0.125000 0.500000 0.125000
v -0.125000 0.500000 -0.125000
v 0.125000 0.500000 -0.125000
v 0.125000 0.500000 0.125000
vn -1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 -1.0000
vn 1.0000 -0.0000 -0.0000
vn -0.0000 -0.0000 1.0000
vn -0.0000 -1.0000 -0.0000
vn -0.0000 1.0000 -0.0000
vt 0.000000 0.750000
vt 0.125000 0.750000
vt 0.062500 0.937500
vt 0.000000 0.000000
vt 0.125000 0.000000
vt 0.187500 0.812500
vt 0.062500 0.937500
vt 0.125000 0.750000
vt -0.000000 0.750000
vt 0.062500 0.812500
vt 0.125000 0.000000
vt 0.000000 -0.000000
vt 0.062500 0.812500
vt 0.187500 0.937500
vt 0.125000 0.750000
vt -0.000000 0.750000
vt 0.187500 0.937500
vt 0.125000 -0.000000
vt 0.000000 -0.000000
vt 0.062500 0.812500
vt 0.187500 0.937500
vt 0.125000 0.750000
vt 0.000000 0.750000
vt 0.187500 0.812500
vt 0.125000 -0.000000
vt -0.000000 0.000000
vt 0.187500 0.812500
vt 0.062500 0.937500
vt 0.000000 1.000000
vt 0.250000 0.750000
vt -0.000000 0.750000
vt 0.250025 0.999950
vt -0.000000 0.750000
vt 0.250000 0.750000
vt 0.250000 0.750000
vt 0.000000 1.000000
vt -0.000000 0.750000
vt 0.000000 0.750000
vt 0.250000 1.000000
vt 0.250000 0.750000
vt 0.250000 1.000000
vt -0.000000 1.000000
vt 0.250000 0.750000
vt 0.000100 0.999900
vt 0.250000 1.000000
vt 0.250000 1.000000
vt 0.000000 0.750000
vt 0.000100 0.999900
vt 0.000000 1.000000
vt 0.250000 1.000000
s 0
f 1/1/1 2/4/1 4/11/1 3/8/1
f 3/9/2 4/12/2 8/25/2 7/22/2
f 7/23/3 8/26/3 6/18/3 5/15/3
f 5/16/4 6/19/4 2/5/4 1/2/4
f 3/10/5 7/24/5 5/17/5 1/3/5
f 8/27/5 4/13/5 10/33/5 11/35/5
f 12/38/3 11/35/3 15/46/3 16/49/3
f 6/20/5 8/28/5 11/36/5 12/38/5
f 4/14/5 2/6/5 9/30/5 10/32/5
f 2/7/5 6/21/5 12/39/5 9/29/5
f 15/47/6 14/43/6 13/41/6 16/49/6
f 10/33/1 9/30/1 13/41/1 14/44/1
f 9/31/4 12/40/4 16/50/4 13/42/4
f 11/37/2 10/34/2 14/45/2 15/48/2