diff --git a/mods/CORE/mcl_loot/init.lua b/mods/CORE/mcl_loot/init.lua index cb371c284..e3db73be1 100644 --- a/mods/CORE/mcl_loot/init.lua +++ b/mods/CORE/mcl_loot/init.lua @@ -69,7 +69,7 @@ function mcl_loot.get_loot(loot_definitions, pr) local wear_min = math.floor(item.wear_min / 10) local wear_max = math.floor(item.wear_max / 10) local wear = pr:next(wear_min, wear_max) * 10 - + if not item.amount_min and not item.amount_max then itemstring = itemstring .. " 1" end diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index e35d73d20..be7086e8d 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -664,7 +664,7 @@ local item_drop = function(self, cooked, looting_level) local dropdef = self.drops[n] local chance = 1 / dropdef.chance local looting_type = dropdef.looting - + if looting_level > 0 then local chance_function = dropdef.looting_chance_function if chance_function then @@ -673,7 +673,7 @@ local item_drop = function(self, cooked, looting_level) chance = chance + (dropdef.looting_factor or 0.01) * looting_level end end - + local num = 0 local do_common_looting = (looting_level > 0 and looting_type == "common") if random() < chance then @@ -681,11 +681,11 @@ local item_drop = function(self, cooked, looting_level) elseif not dropdef.looting_ignore_chance then do_common_looting = false end - + if do_common_looting then num = num + math.floor(math.random(0, looting_level) + 0.5) end - + if num > 0 then item = dropdef.name @@ -2962,7 +2962,7 @@ local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) * tmp * ((armor[group] or 0) / 100.0) end end - + if weapon then local fire_aspect_level = mcl_enchanting.get_enchantment(weapon, "fire_aspect") if fire_aspect_level > 0 then @@ -3379,11 +3379,11 @@ end -- main mob function local mob_step = function(self, dtime) - + if not self.fire_resistant then mcl_burning.tick(self.object, dtime) end - + if use_cmi then cmi.notify_step(self.object, dtime) end diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 477392b7d..bc819547b 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -170,7 +170,7 @@ local professions = { { E1, { "mcl_core:glass", 3, 5 } }, { { "mcl_core:emerald", 5, 64 }, { "mcl_enchanting:book_enchanted", 1 ,1 }}, }, - + { { { "mcl_core:emerald", 5, 64 }, { "mcl_enchanting:book_enchanted", 1 ,1 }}, }, @@ -402,7 +402,7 @@ local init_trades = function(self, inv) local wanted1_count = math.random(trade[1][2], trade[1][3]) local offered_item = trade[2][1] local offered_count = math.random(trade[2][2], trade[2][3]) - + local offered_stack = ItemStack({name = offered_item, count = offered_count}) if mcl_enchanting.is_enchanted(offered_item) then if mcl_enchanting.is_book(offered_item) then @@ -411,7 +411,7 @@ local init_trades = function(self, inv) mcl_enchanting.enchant_randomly(offered_stack, math.random(5, 19), false, false, true) end end - + local wanted = { wanted1_item .. " " ..wanted1_count } if trade[1][4] then local wanted2_item = trade[1][4] @@ -499,7 +499,7 @@ local function show_trade_formspec(playername, trader, tradenum) local wanted1 = inv:get_stack("wanted", 1) local wanted2 = inv:get_stack("wanted", 2) local offered = inv:get_stack("offered", 1) - + local w2_formspec = "" if not wanted2:is_empty() then w2_formspec = "item_image[3,1;1,1;"..wanted2:to_string().."]" diff --git a/mods/HUD/mcl_experience/init.lua b/mods/HUD/mcl_experience/init.lua index 2368ee761..556f419d4 100644 --- a/mods/HUD/mcl_experience/init.lua +++ b/mods/HUD/mcl_experience/init.lua @@ -183,7 +183,7 @@ minetest.register_on_joinplayer(function(player) number = 0x80FF20, offset = {x = 0, y = -(48 + 24 + 24)}, z_index = 12, - }) + }) end) function mcl_experience.xp_to_level(xp) diff --git a/mods/ITEMS/mcl_enchanting/enchantments.lua b/mods/ITEMS/mcl_enchanting/enchantments.lua index d2803be14..d79cb8375 100644 --- a/mods/ITEMS/mcl_enchanting/enchantments.lua +++ b/mods/ITEMS/mcl_enchanting/enchantments.lua @@ -353,7 +353,7 @@ function minetest.calculate_knockback(player, hitter, time_from_last_punch, tool return knockback end --- implemented in mcl_mobs and mobs_mc +-- implemented in mcl_mobs and mobs_mc mcl_enchanting.enchantments.looting = { name = S("Looting"), max_level = 3, diff --git a/mods/ITEMS/mcl_enchanting/engine.lua b/mods/ITEMS/mcl_enchanting/engine.lua index 43127b30d..ead8bb6eb 100644 --- a/mods/ITEMS/mcl_enchanting/engine.lua +++ b/mods/ITEMS/mcl_enchanting/engine.lua @@ -543,7 +543,7 @@ function mcl_enchanting.on_inventory_action(player, action, inventory, inventory if stack:get_name() == "mcl_dye:blue" then result_list = "enchanting_lapis" stack:add_item(inventory:get_stack("enchanting_lapis", 1)) - else + else result_list = "enchanting_item" end inventory:set_stack(result_list, 1, stack) diff --git a/mods/ITEMS/mcl_furnaces/init.lua b/mods/ITEMS/mcl_furnaces/init.lua index 82e82807e..a0b946955 100644 --- a/mods/ITEMS/mcl_furnaces/init.lua +++ b/mods/ITEMS/mcl_furnaces/init.lua @@ -79,7 +79,7 @@ local function drop_xp(pos) meta:set_int("xp", 0) end end -end +end -- -- Node callback functions that are the same for active and inactive furnace @@ -357,7 +357,7 @@ local function furnace_node_timer(pos, elapsed) srclist = inv:get_list("src") src_time = 0 - + meta:set_int("xp", meta:get_int("xp") + 1) -- ToDo give each recipe an idividial XP count end end @@ -491,7 +491,7 @@ minetest.register_node("mcl_furnaces:furnace", { furnace_reset_delta_time(pos) -- start timer function, it will helpful if player clears dst slot minetest.get_node_timer(pos):start(1.0) - + if listname == "dst" then drop_xp(pos) end