forked from VoxeLibre/VoxeLibre
[mcl_core] fix warnings
This commit is contained in:
parent
30e83088d4
commit
f9a86947e5
|
@ -990,9 +990,8 @@ for i=1,8 do
|
||||||
local itemcount = itemstack:get_count()
|
local itemcount = itemstack:get_count()
|
||||||
local fakestack = ItemStack(itemstring.." "..itemcount)
|
local fakestack = ItemStack(itemstring.." "..itemcount)
|
||||||
fakestack:set_name("mcl_core:snow_"..math.min(8, (i+g)))
|
fakestack:set_name("mcl_core:snow_"..math.min(8, (i+g)))
|
||||||
local success
|
itemstack = minetest.item_place(fakestack, placer, pointed_thing)
|
||||||
itemstack, success = minetest.item_place(fakestack, placer, pointed_thing)
|
minetest.sound_play(mcl_sounds.node_sound_snow_defaults().place, {pos = pointed_thing.under}, true)
|
||||||
minetest.sound_play(mcl_sounds.node_sound_snow_defaults().place, {pos = below}, true)
|
|
||||||
itemstack:set_name(itemstring)
|
itemstack:set_name(itemstring)
|
||||||
return itemstack
|
return itemstack
|
||||||
end
|
end
|
||||||
|
|
|
@ -120,7 +120,6 @@ minetest.register_node("mcl_core:vine", {
|
||||||
local node = minetest.get_node(under)
|
local node = minetest.get_node(under)
|
||||||
local def = minetest.registered_nodes[node.name]
|
local def = minetest.registered_nodes[node.name]
|
||||||
if not def then return itemstack end
|
if not def then return itemstack end
|
||||||
local groups = def.groups
|
|
||||||
|
|
||||||
-- Check special rightclick action of pointed node
|
-- Check special rightclick action of pointed node
|
||||||
if def and def.on_rightclick then
|
if def and def.on_rightclick then
|
||||||
|
|
|
@ -20,7 +20,7 @@ minetest.register_node("mcl_core:glass", {
|
||||||
})
|
})
|
||||||
|
|
||||||
------------------------
|
------------------------
|
||||||
-- Create Color Glass --
|
-- Create Color Glass --
|
||||||
------------------------
|
------------------------
|
||||||
local canonical_color = "yellow"
|
local canonical_color = "yellow"
|
||||||
function mcl_core.add_stained_glass(desc, recipeitem, colorgroup, color)
|
function mcl_core.add_stained_glass(desc, recipeitem, colorgroup, color)
|
||||||
|
@ -54,7 +54,7 @@ function mcl_core.add_stained_glass(desc, recipeitem, colorgroup, color)
|
||||||
_mcl_hardness = 0.3,
|
_mcl_hardness = 0.3,
|
||||||
_mcl_silk_touch_drop = true,
|
_mcl_silk_touch_drop = true,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = 'mcl_core:glass_'..color..' 8',
|
output = 'mcl_core:glass_'..color..' 8',
|
||||||
recipe = {
|
recipe = {
|
||||||
|
|
|
@ -3,7 +3,10 @@
|
||||||
local S = minetest.get_translator("mcl_core")
|
local S = minetest.get_translator("mcl_core")
|
||||||
local N = function(s) return s end
|
local N = function(s) return s end
|
||||||
|
|
||||||
local WATER_ALPHA = 179
|
local vector = vector
|
||||||
|
local math = math
|
||||||
|
|
||||||
|
--local WATER_ALPHA = 179
|
||||||
local WATER_VISC = 1
|
local WATER_VISC = 1
|
||||||
local LAVA_VISC = 7
|
local LAVA_VISC = 7
|
||||||
local LIGHT_LAVA = minetest.LIGHT_MAX
|
local LIGHT_LAVA = minetest.LIGHT_MAX
|
||||||
|
@ -215,7 +218,7 @@ local emit_lava_particle = function(pos)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local ppos = vector.add(pos, { x = math.random(-7, 7)/16, y = 0.45, z = math.random(-7, 7)/16})
|
local ppos = vector.add(pos, { x = math.random(-7, 7)/16, y = 0.45, z = math.random(-7, 7)/16})
|
||||||
local spos = vector.add(ppos, { x = 0, y = -0.2, z = 0 })
|
--local spos = vector.add(ppos, { x = 0, y = -0.2, z = 0 })
|
||||||
local vel = { x = math.random(-3, 3)/10, y = math.random(4, 7), z = math.random(-3, 3)/10 }
|
local vel = { x = math.random(-3, 3)/10, y = math.random(4, 7), z = math.random(-3, 3)/10 }
|
||||||
local acc = { x = 0, y = -9.81, z = 0 }
|
local acc = { x = 0, y = -9.81, z = 0 }
|
||||||
-- Lava droplet
|
-- Lava droplet
|
||||||
|
|
|
@ -31,7 +31,7 @@ minetest.register_node("mcl_core:slimeblock", {
|
||||||
node_box = {
|
node_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
fixed = {
|
fixed = {
|
||||||
{-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
|
{-0.25, -0.25, -0.25, 0.25, 0.25, 0.25},
|
||||||
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -39,7 +39,6 @@ minetest.register_node("mcl_core:slimeblock", {
|
||||||
type = "regular",
|
type = "regular",
|
||||||
},
|
},
|
||||||
tiles = {"mcl_core_slime.png"},
|
tiles = {"mcl_core_slime.png"},
|
||||||
paramtype = "light",
|
|
||||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
|
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
|
||||||
stack_max = 64,
|
stack_max = 64,
|
||||||
-- According to Minecraft Wiki, bouncing off a slime block from a height off 255 blocks should result in a bounce height of 50 blocks
|
-- According to Minecraft Wiki, bouncing off a slime block from a height off 255 blocks should result in a bounce height of 50 blocks
|
||||||
|
@ -213,7 +212,7 @@ minetest.register_node("mcl_core:barrier", {
|
||||||
-- Same as barrier, but non-pointable. This node is only to be used internally to separate realms.
|
-- Same as barrier, but non-pointable. This node is only to be used internally to separate realms.
|
||||||
-- It must NOT be used for anything else.
|
-- It must NOT be used for anything else.
|
||||||
-- This node only exists because Minetest does not have support for “dimensions” yet and needs to
|
-- This node only exists because Minetest does not have support for “dimensions” yet and needs to
|
||||||
-- be removed when support for this is implemented.
|
-- be removed when support for this is implemented.
|
||||||
minetest.register_node("mcl_core:realm_barrier", {
|
minetest.register_node("mcl_core:realm_barrier", {
|
||||||
description = S("Realm Barrier"),
|
description = S("Realm Barrier"),
|
||||||
_doc_items_create_entry = false,
|
_doc_items_create_entry = false,
|
||||||
|
|
|
@ -81,7 +81,7 @@ local register_stripped_trunk = function(subname, description_stripped_trunk, de
|
||||||
_mcl_blast_resistance = 2,
|
_mcl_blast_resistance = 2,
|
||||||
_mcl_hardness = 2,
|
_mcl_hardness = 2,
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "mcl_core:"..subname.."_bark 3",
|
output = "mcl_core:"..subname.."_bark 3",
|
||||||
recipe = {
|
recipe = {
|
||||||
|
@ -107,13 +107,12 @@ local register_wooden_planks = function(subname, description, tiles)
|
||||||
end
|
end
|
||||||
|
|
||||||
local register_leaves = function(subname, description, longdesc, tiles, sapling, drop_apples, sapling_chances, leafdecay_distance)
|
local register_leaves = function(subname, description, longdesc, tiles, sapling, drop_apples, sapling_chances, leafdecay_distance)
|
||||||
local drop
|
|
||||||
if leafdecay_distance == nil then
|
if leafdecay_distance == nil then
|
||||||
leafdecay_distance = 4
|
leafdecay_distance = 4
|
||||||
end
|
end
|
||||||
local apple_chances = {200, 180, 160, 120, 40}
|
local apple_chances = {200, 180, 160, 120, 40}
|
||||||
local stick_chances = {50, 45, 30, 35, 10}
|
local stick_chances = {50, 45, 30, 35, 10}
|
||||||
|
|
||||||
local function get_drops(fortune_level)
|
local function get_drops(fortune_level)
|
||||||
local drop = {
|
local drop = {
|
||||||
max_items = 1,
|
max_items = 1,
|
||||||
|
|
Loading…
Reference in New Issue