forked from VoxeLibre/VoxeLibre
Set use_texture_alpha for some nodes (#4262)
* Tall flowers with mesh drawtype (sunflower) * Clovers * End rod and its colored variants Reviewed-on: MineClone2/MineClone2#4262 Reviewed-by: Mikita Wiśniewski <rudzik8@protonmail.com> Co-authored-by: JoseDouglas26 <josedouglas20002014@gmail.com> Co-committed-by: JoseDouglas26 <josedouglas20002014@gmail.com>
This commit is contained in:
parent
538c206985
commit
2430953a81
|
@ -74,6 +74,7 @@ local end_rod_def = {
|
||||||
light_source = minetest.LIGHT_MAX,
|
light_source = minetest.LIGHT_MAX,
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
groups = { dig_immediate=3, deco_block=1, destroy_by_lava_flow=1, end_rod=1 },
|
groups = { dig_immediate=3, deco_block=1, destroy_by_lava_flow=1, end_rod=1 },
|
||||||
|
use_texture_alpha = "clip",
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
|
@ -153,6 +154,7 @@ for num, row in ipairs(colored_end_rods) do
|
||||||
def.description = desc
|
def.description = desc
|
||||||
def._doc_items_longdesc = nil
|
def._doc_items_longdesc = nil
|
||||||
def._doc_items_create_entry = false
|
def._doc_items_create_entry = false
|
||||||
|
def.use_texture_alpha = "clip"
|
||||||
local side_tex
|
local side_tex
|
||||||
if name == "pink" then
|
if name == "pink" then
|
||||||
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. end_rod_mask .. "^[multiply:" .. name .. "^[hsl:0:300)"
|
def.tiles[1] = def.tiles[1] .. "^(" .. def.tiles[1] .. end_rod_mask .. "^[multiply:" .. name .. "^[hsl:0:300)"
|
||||||
|
|
|
@ -195,6 +195,7 @@ def_clover.tiles = { "mcl_flowers_clover.png" }
|
||||||
def_clover.inventory_image = "mcl_flowers_clover_inv.png"
|
def_clover.inventory_image = "mcl_flowers_clover_inv.png"
|
||||||
def_clover.wield_image = "mcl_flowers_clover_inv.png"
|
def_clover.wield_image = "mcl_flowers_clover_inv.png"
|
||||||
def_clover.drop = nil
|
def_clover.drop = nil
|
||||||
|
def_clover.use_texture_alpha = "clip"
|
||||||
def_clover.selection_box = {
|
def_clover.selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -4/16, -0.5, -4/16, 4/16, 0, 4/16 },
|
fixed = { -4/16, -0.5, -4/16, 4/16, 0, 4/16 },
|
||||||
|
@ -210,6 +211,7 @@ def_4l_clover.mesh = "mcl_clover_4leaf.obj"
|
||||||
def_4l_clover.tiles = { "mcl_flowers_fourleaf_clover.png" }
|
def_4l_clover.tiles = { "mcl_flowers_fourleaf_clover.png" }
|
||||||
def_4l_clover.inventory_image = "mcl_flowers_fourleaf_clover_inv.png"
|
def_4l_clover.inventory_image = "mcl_flowers_fourleaf_clover_inv.png"
|
||||||
def_4l_clover.wield_image = "mcl_flowers_fourleaf_clover_inv.png"
|
def_4l_clover.wield_image = "mcl_flowers_fourleaf_clover_inv.png"
|
||||||
|
def_4l_clover.use_texture_alpha = "clip"
|
||||||
|
|
||||||
minetest.register_node("mcl_flowers:fourleaf_clover", def_4l_clover)
|
minetest.register_node("mcl_flowers:fourleaf_clover", def_4l_clover)
|
||||||
|
|
||||||
|
@ -268,6 +270,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
||||||
end
|
end
|
||||||
-- Sunflower mesh and tiles
|
-- Sunflower mesh and tiles
|
||||||
local top_drawtype, bottom_drawtype
|
local top_drawtype, bottom_drawtype
|
||||||
|
local alpha = nil
|
||||||
local bottom_tiles = {}
|
local bottom_tiles = {}
|
||||||
if not mesh then
|
if not mesh then
|
||||||
top_drawtype = "plantlike"
|
top_drawtype = "plantlike"
|
||||||
|
@ -277,6 +280,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
||||||
top_drawtype = "airlike"
|
top_drawtype = "airlike"
|
||||||
bottom_drawtype = "mesh"
|
bottom_drawtype = "mesh"
|
||||||
bottom_tiles = bottom_img
|
bottom_tiles = bottom_img
|
||||||
|
alpha = "clip"
|
||||||
end
|
end
|
||||||
-- Bottom
|
-- Bottom
|
||||||
minetest.register_node("mcl_flowers:"..name, {
|
minetest.register_node("mcl_flowers:"..name, {
|
||||||
|
@ -298,6 +302,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
||||||
_mcl_shears_drop = shears_drop,
|
_mcl_shears_drop = shears_drop,
|
||||||
_mcl_fortune_drop = fortune_drop,
|
_mcl_fortune_drop = fortune_drop,
|
||||||
node_placement_prediction = "",
|
node_placement_prediction = "",
|
||||||
|
use_texture_alpha = alpha,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -selbox_radius, -0.5, -selbox_radius, selbox_radius, 0.5, selbox_radius },
|
fixed = { -selbox_radius, -0.5, -selbox_radius, selbox_radius, 0.5, selbox_radius },
|
||||||
|
@ -397,6 +402,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
|
||||||
palette = palette,
|
palette = palette,
|
||||||
walkable = false,
|
walkable = false,
|
||||||
buildable_to = false,
|
buildable_to = false,
|
||||||
|
use_texture_alpha = alpha,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = { -selbox_radius, -0.5, -selbox_radius, selbox_radius, selbox_top_height, selbox_radius },
|
fixed = { -selbox_radius, -0.5, -selbox_radius, selbox_radius, selbox_top_height, selbox_radius },
|
||||||
|
|
Loading…
Reference in New Issue