[mcl_core] fix warnings

This commit is contained in:
AFCMS 2021-05-23 00:09:07 +02:00
parent 30e83088d4
commit f9a86947e5
6 changed files with 13 additions and 14 deletions

@ -990,9 +990,8 @@ for i=1,8 do
local itemcount = itemstack:get_count()
local fakestack = ItemStack(itemstring.." "..itemcount)
fakestack:set_name("mcl_core:snow_"..math.min(8, (i+g)))
local success
itemstack, success = minetest.item_place(fakestack, placer, pointed_thing)
minetest.sound_play(mcl_sounds.node_sound_snow_defaults().place, {pos = below}, true)
itemstack = minetest.item_place(fakestack, placer, pointed_thing)
minetest.sound_play(mcl_sounds.node_sound_snow_defaults().place, {pos = pointed_thing.under}, true)
itemstack:set_name(itemstring)
return itemstack
end

@ -120,7 +120,6 @@ minetest.register_node("mcl_core:vine", {
local node = minetest.get_node(under)
local def = minetest.registered_nodes[node.name]
if not def then return itemstack end
local groups = def.groups
-- Check special rightclick action of pointed node
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"
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_silk_touch_drop = true,
})
minetest.register_craft({
output = 'mcl_core:glass_'..color..' 8',
recipe = {

@ -3,7 +3,10 @@
local S = minetest.get_translator("mcl_core")
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 LAVA_VISC = 7
local LIGHT_LAVA = minetest.LIGHT_MAX
@ -215,7 +218,7 @@ local emit_lava_particle = function(pos)
return
end
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 acc = { x = 0, y = -9.81, z = 0 }
-- Lava droplet

@ -31,7 +31,7 @@ minetest.register_node("mcl_core:slimeblock", {
node_box = {
type = "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},
}
},
@ -39,7 +39,6 @@ minetest.register_node("mcl_core:slimeblock", {
type = "regular",
},
tiles = {"mcl_core_slime.png"},
paramtype = "light",
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true,
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
@ -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.
-- It must NOT be used for anything else.
-- 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", {
description = S("Realm Barrier"),
_doc_items_create_entry = false,

@ -81,7 +81,7 @@ local register_stripped_trunk = function(subname, description_stripped_trunk, de
_mcl_blast_resistance = 2,
_mcl_hardness = 2,
})
minetest.register_craft({
output = "mcl_core:"..subname.."_bark 3",
recipe = {
@ -107,13 +107,12 @@ local register_wooden_planks = function(subname, description, tiles)
end
local register_leaves = function(subname, description, longdesc, tiles, sapling, drop_apples, sapling_chances, leafdecay_distance)
local drop
if leafdecay_distance == nil then
leafdecay_distance = 4
end
local apple_chances = {200, 180, 160, 120, 40}
local stick_chances = {50, 45, 30, 35, 10}
local function get_drops(fortune_level)
local drop = {
max_items = 1,