Fix 5.4.0 texture alpha deprecations

This commit is contained in:
Wuzzy 2021-02-24 16:27:30 +01:00
parent a33b69a5b7
commit 8f3c416920
12 changed files with 35 additions and 3 deletions

View File

@ -209,6 +209,7 @@ for _, anvil in ipairs(anvils) do
minetest.register_node("anvil:anvil_"..anvil[1], {
description = anvil[2] .. " Anvil",
tiles = {"anvil_"..anvil[1].."_top.png","anvil_"..anvil[1].."_top.png","anvil_"..anvil[1].."_side.png"},
use_texture_alpha = "clip",
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",

View File

@ -31,6 +31,7 @@ realtest.add_bonfire_fuel("minerals:charcoal")
minetest.register_node("bonfire:self", {
description = "Bonfire",
tiles = {"bonfire_top.png", "bonfire_bottom.png", "bonfire_side.png"},
use_texture_alpha = "clip",
particle_image = {"bonfire_bottom.png"},
drawtype = "nodebox",
paramtype = "light",
@ -77,6 +78,7 @@ minetest.register_node("bonfire:self_active", {
{name="bonfire_flame.png",
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.8}},
},
use_texture_alpha = "clip",
particle_image = {"bonfire_bottom.png"},
drawtype = "nodebox",
paramtype = "light",

View File

@ -15,6 +15,7 @@ function realtest.register_stair(name, recipeitem, groups, images, description,
description = description,
drawtype = "nodebox",
tiles = images,
use_texture_alpha = "clip",
drop = drop,
paramtype = "light",
paramtype2 = "facedir",
@ -58,6 +59,7 @@ function realtest.register_stair(name, recipeitem, groups, images, description,
drop = drop,
drawtype = "nodebox",
tiles = images,
use_texture_alpha = "clip",
paramtype = "light",
paramtype2 = "facedir",
groups = groups,
@ -114,6 +116,7 @@ function realtest.register_slab(name, recipeitem, groups, images, description, s
minetest.register_node(":"..name.."_slab_r", {
drawtype = "nodebox",
tiles = images,
use_texture_alpha = "clip",
drop = drop,
paramtype = "light",
paramtype2 = "wallmounted",
@ -139,6 +142,7 @@ function realtest.register_slab(name, recipeitem, groups, images, description, s
groups = groups,
sounds = sounds,
tiles = images,
use_texture_alpha = "clip",
paramtype = "light",
paramtype2 = "facedir",
node_box = {

View File

@ -50,6 +50,7 @@ for _, mineral in ipairs(decor_minerals) do
collision_box = pyr_cbox,
paramtype = "light",
tiles = {"decorations_"..mineral[1]..".png"},
use_texture_alpha = "clip",
particle_image = {"minerals_"..mineral[1]..".png"},
groups = {cracky = 3},
sounds = default.node_sound_stone_defaults(),
@ -66,6 +67,7 @@ for _, mineral in ipairs(decor_minerals) do
"decorations_"..mineral[1]..".png",
tree.textures.planks
},
use_texture_alpha = "clip",
groups = {cracky=3, oddly_breakable_by_hand = 2},
sounds = default.node_sound_stone_defaults(),
})
@ -87,6 +89,7 @@ for _, mineral in ipairs(decor_minerals) do
"decorations_"..mineral[1]..".png",
"decorations_"..mineral[1].."_casket_front.png"
},
use_texture_alpha = "clip",
paramtype = "light",
paramtype2 = "facedir",
selection_box = casket_cbox,
@ -233,6 +236,7 @@ for _, mineral in ipairs(decor_minerals) do
mesh = "decorations_cylinder.obj",
paramtype = "light",
tiles = {"decorations_"..mineral[1]..".png"},
use_texture_alpha = "clip",
particle_image = {"minerals_"..mineral[1]..".png"},
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
@ -244,6 +248,7 @@ for _, mineral in ipairs(decor_minerals) do
mesh = "decorations_vase.obj",
paramtype = "light",
tiles = {"decorations_"..mineral[1]..".png"},
use_texture_alpha = "clip",
groups = {cracky=3, oddly_breakable_by_hand = 2},
sounds = default.node_sound_stone_defaults(),
})
@ -256,6 +261,7 @@ for _, mineral in ipairs(decor_minerals) do
collision_box = bowl_cbox,
paramtype = "light",
tiles = {"decorations_"..mineral[1]..".png"},
use_texture_alpha = "clip",
groups = {cracky=3, oddly_breakable_by_hand = 2},
sounds = default.node_sound_stone_defaults(),
})
@ -272,6 +278,7 @@ for _, mineral in ipairs(decor_minerals) do
{name="decorations_coals.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}},
"decorations_"..mineral[1]..".png"
},
use_texture_alpha = "clip",
groups = {cracky=3, oddly_breakable_by_hand = 2},
sounds = default.node_sound_stone_defaults(),
})

View File

@ -3,7 +3,6 @@
-- The API documentation in here was moved into doc/lua_api.txt
local WATER_ALPHA = 160
local WATER_VISC = 1
local LAVA_VISC = 7
@ -297,6 +296,7 @@ minetest.register_node("default:brick", {
minetest.register_node("default:cactus", {
description = "Cactus",
tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"},
use_texture_alpha = "clip",
groups = {snappy=2,choppy=3,flammable=2,dropping_node=1,drop_on_dig=1},
drawtype = "nodebox",
paramtype = "light",
@ -434,6 +434,7 @@ minetest.register_node("default:glass", {
description = "Glass",
drawtype = "glasslike",
tiles = {"default_glass.png"},
use_texture_alpha = "clip",
particle_image = {"default_glass.png"},
paramtype = "light",
sunlight_propagates = true,
@ -459,7 +460,7 @@ minetest.register_node("default:water_flowing", {
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=0.8}
},
},
alpha = WATER_ALPHA,
use_texture_alpha = "blend",
paramtype = "light",
walkable = false,
pointable = false,
@ -485,8 +486,8 @@ minetest.register_node("default:water_source", {
-- New-style water source material (mostly unused)
{name="default_water.png", backface_culling=false},
},
use_texture_alpha = "blend",
drop = "",
alpha = WATER_ALPHA,
paramtype = "light",
walkable = false,
pointable = false,

View File

@ -128,6 +128,7 @@ function doors:register_door(name, def)
minetest.register_node(name.."_b_1", {
tiles = {tb[2], tb[2], tb[2], tb[2], tb[1], tb[1].."^[transformfx"},
use_texture_alpha = "clip",
paramtype = "light",
paramtype2 = "facedir",
drop = name,
@ -159,6 +160,7 @@ function doors:register_door(name, def)
minetest.register_node(name.."_t_1", {
tiles = {tt[2], tt[2], tt[2], tt[2], tt[1], tt[1].."^[transformfx"},
use_texture_alpha = "clip",
paramtype = "light",
paramtype2 = "facedir",
drop = name,
@ -190,6 +192,7 @@ function doors:register_door(name, def)
minetest.register_node(name.."_b_2", {
tiles = {tb[2], tb[2], tb[2], tb[2], tb[1].."^[transformfx", tb[1]},
use_texture_alpha = "clip",
paramtype = "light",
paramtype2 = "facedir",
drop = name,
@ -221,6 +224,7 @@ function doors:register_door(name, def)
minetest.register_node(name.."_t_2", {
tiles = {tt[2], tt[2], tt[2], tt[2], tt[1].."^[transformfx", tt[1]},
use_texture_alpha = "clip",
paramtype = "light",
paramtype2 = "facedir",
drop = name,

View File

@ -44,6 +44,7 @@ for i=1,4 do
drawtype = "nodebox",
description = desc.." Seeds",
tiles = {"farming_seed_placed.png","blank.png"},
use_texture_alpha = "clip",
inventory_image = "farming_"..name.."_seed.png",
groups = {snappy=3, plant=1, attached_node=1},
sounds = default.node_sound_defaults(),
@ -170,6 +171,7 @@ minetest.register_node("farming:cake", {
drawtype = "nodebox",
description = "Cake",
tiles = {"farming_cake_top.png","farming_cake_base.png","farming_cake_side.png"},
use_texture_alpha = "clip",
groups = {crumbly=3},
sounds = default.node_sound_defaults(),
paramtype = "light",
@ -332,6 +334,7 @@ minetest.register_node("farming:rope",{
drawtype = "nodebox",
sunlight_propagates = true,
tiles = {"farming_rope.png"},
use_texture_alpha = "clip",
inventory_image = "farming_rope_inv.png",
wield_image = "farming_rope_inv.png",
groups = {choppy=3,snappy=3,oddly_breakable_by_hand=3,flammable=1},

View File

@ -46,6 +46,7 @@ for i in ipairs(lilies_list) do
"flowers_waterlily"..deg2..".png",
"flowers_waterlily"..deg2..".png^[transformFY"
},
use_texture_alpha = "clip",
inventory_image = "flowers_waterlily.png",
wield_image = "flowers_waterlily.png",
sunlight_propagates = true,
@ -146,6 +147,7 @@ for i in ipairs(algae_list) do
"flowers_seaweed"..num..".png",
"flowers_seaweed"..num..".png^[transformFY"
},
use_texture_alpha = "clip",
inventory_image = "flowers_seaweed_2.png",
wield_image = "flowers_seaweed_2.png",
sunlight_propagates = true,
@ -238,6 +240,7 @@ minetest.register_node(":flowers:sunflower", {
inventory_image = "flowers_sunflower_inv.png",
mesh = "flowers_sunflower.obj",
tiles = { "flowers_sunflower.png" },
use_texture_alpha = "clip",
walkable = false,
buildable_to = true,
is_ground_content = true,

View File

@ -2,6 +2,7 @@ minetest.register_node("light:streetlight", {
description = "Streetlight",
drawtype = "nodebox",
tiles = {"light_streetlight_top.png", "light_streetlight_top.png", "light_streetlight.png",},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
light_source = 14,

View File

@ -47,6 +47,7 @@ for i, tree_name in ipairs(realtest.registered_trees_list) do
},
},
tiles = {texture_top, texture_bottom, texture_side, texture_side, texture_side, texture_side},
use_texture_alpha = "clip",
drop = "scaffolding:scaffolding_"..tree.name:remove_modname_prefix(),
paramtype = "light",
sunlight_propagates = false,
@ -70,6 +71,7 @@ for i, tree_name in ipairs(realtest.registered_trees_list) do
local scaffolding_sub = copy_table(scaffolding_top)
scaffolding_sub.tiles = {texture_side, texture_side, texture_side, texture_side, texture_side, texture_side}
scaffolding_sub.use_texture_alpha = "clip"
scaffolding_sub.sunlight_propagates = true
minetest.register_node("scaffolding:scaffolding_"..tree.name:remove_modname_prefix(), scaffolding)

View File

@ -112,6 +112,7 @@ minetest.register_node("tnt:tnt", {
},
},
tiles = {"tnt_top.png", "tnt_bottom.png", "tnt_side.png"},
use_texture_alpha = "clip",
groups = {dig_immediate=2, mesecon=2, falling_node=1},
sounds = default.node_sound_wood_defaults(),
on_punch = function(pos, node, puncher)
@ -147,6 +148,7 @@ minetest.register_node("tnt:tnt_burning", {
},
},
tiles = {"tnt_top_burning.png", "tnt_bottom.png", "tnt_side.png"},
use_texture_alpha = "clip",
light_source = 5,
drop = "",
groups = {falling_node=1},

View File

@ -72,6 +72,7 @@ for i = 1, 15 do
minetest.register_node("xpanes:pane_"..i, {
drawtype = "nodebox",
tiles = {"xpanes_white.png", "xpanes_white.png", texture},
use_texture_alpha = "clip",
paramtype = "light",
groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3,drop_on_dig=1},
drop = "xpanes:pane",
@ -90,6 +91,7 @@ end
minetest.register_node("xpanes:pane", {
description = "Glass Pane",
tiles = {"xpanes_space.png"},
use_texture_alpha = "clip",
inventory_image = "xpanes_pane.png",
wield_image = "xpanes_pane.png",
node_placement_prediction = "",