Merge pull request 'Release 1.10' (#261) from compatibility into production-compatible

Reviewed-on: MineClone5/MineClone5#261
This commit is contained in:
kay27 2022-04-23 19:24:47 +00:00
commit 2d525a45da
123 changed files with 2083 additions and 1116 deletions

View File

@ -71,6 +71,7 @@ Please read <http://minecraft.gamepedia.com/Breaking> to learn how digging times
* `coral_block=X`: Coral block (1 = alive, 2 = dead)
* `coral_species=X`: Specifies the species of a coral; equal X means equal species
* `set_on_fire=X`: Sets any (not fire-resistant) mob or player on fire for X seconds when touching
* `compostability`: Amount from 1 to 100 that defines the percentage of likelyhood that the composter will advance a level.
#### Footnotes

View File

@ -325,7 +325,7 @@ minetest.register_on_generated(function(minp, maxp, chunkseed)
-- mcl_mapgen.register_mapgen_lvm(function(vm_context), order_number) --
-- --
for _, v in pairs(queue_chunks_lvm) do
vm_context = v.f(vm_context)
v.f(vm_context)
end
-- --
-- mcl_mapgen.register_mapgen(function(minp, maxp, chunkseed, vm_context), order_number) --

View File

@ -417,6 +417,7 @@ function mcl_util.deal_damage(target, damage, mcl_reason)
-- target:punch(puncher, 1.0, {full_punch_interval = 1.0, damage_groups = {fleshy = damage}}, vector.direction(puncher:get_pos(), target:get_pos()), damage)
if luaentity.health > 0 then
luaentity.health = luaentity.health - damage
luaentity.pause_timer = 0.4
end
return
end

View File

@ -152,3 +152,23 @@ minetest.register_globalstep(function(dtime)
dimtimer = 0
end
end)
function mcl_worlds.get_cloud_parameters()
if mcl_mapgen.name == "valleys" then
return {
height = 384,
speed = {x=-2, z=0},
thickness=5,
color="#FFF0FEF",
ambient = "#201060",
}
else
-- MC-style clouds: Layer 127, thickness 4, fly to the “West”
return {
height = mcl_worlds.layer_to_y(127),
speed = {x=-2, z=0},
thickness = 4,
color = "#FFF0FEF",
}
end
end

View File

@ -246,4 +246,4 @@ water-16,
water)
--spawn egg
mobs:register_egg("extra_mobs:dolphin", S("dolphin"), "extra_mobs_spawn_icon_dolphin.png", 0)
mobs:register_egg("extra_mobs:dolphin", S("Dolphin"), "extra_mobs_spawn_icon_dolphin.png", 0)

View File

@ -0,0 +1,17 @@
# textdomain:extra_mobs
Hoglin=Hoglin
piglin=Piglin
piglin Brute=Piglin Barbare
Strider=Arpenteur
Fox=Renard
Cod=Poisson
Salmon=Saumon
dolphin=Dauphin
Glow Squid=Pieuvre Lumineuse
Glow Ink Sac=Sac d'Encre Lumineuse
Use it to craft the Glow Item Frame.=Utilisez le pour fabriquer le Cadre à Objet Lumineux
Use the Glow Ink Sac and the normal Item Frame to craft the Glow Item Frame.=Utiliser le Sac d'Encre Lumineuse et le Cadre à Objet normal pour fabriquer le Cadre à Objet Lumineux.
Glow Item Frame=Cadre à Objet Lumineux
Can hold an item and glows=Peut exposer un objet et éclairer
Glow Item frames are decorative blocks in which items can be placed.=les Cadres à Objet Lumineux sont des blocs décoratifs pouvant contenir des objets.
Just place any item on the item frame. Use the item frame again to retrieve the item.=Placer n'importe quel objet sur le cadre. Récupérer l'objet en faisant un clic droit sur le cadre.

View File

@ -296,5 +296,5 @@ minetest.LIGHT_MAX+1,
mobs_mc.spawn_height.nether_min,
mobs_mc.spawn_height.nether_max)
-- spawn eggs
mobs:register_egg("extra_mobs:piglin", S("piglin"), "extra_mobs_spawn_icon_piglin.png", 0)
mobs:register_egg("extra_mobs:piglin_brute", S("piglin Brute"), "extra_mobs_spawn_icon_piglin.png", 0)
mobs:register_egg("extra_mobs:piglin", S("Piglin"), "extra_mobs_spawn_icon_piglin.png", 0)
mobs:register_egg("extra_mobs:piglin_brute", S("Piglin Brute"), "extra_mobs_spawn_icon_piglin.png", 0)

View File

@ -166,11 +166,13 @@ function boat.on_activate(self, staticdata, dtime_s)
self._last_v = self._v
self._itemstring = data.itemstring
while #data.textures < 5 do
table.insert(data.textures, data.textures[1])
end
if data.textures then
while #data.textures < 5 do
table.insert(data.textures, data.textures[1])
end
self.object:set_properties({textures = data.textures})
self.object:set_properties({textures = data.textures})
end
end
end

View File

@ -6,6 +6,7 @@ Boats are used to travel on the surface of water.=Les bateaux sont utilisés pou
Dark Oak Boat=Bateau en Chêne Noir
Jungle Boat=Bateau en Acajou
Oak Boat=Bateau en Chêne
Obsidian Boat=Bateau en Obsidienne
Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=Faites un clic droit sur une source d'eau pour placer le bateau. Faites un clic droit sur le bateau pour y entrer. Utilisez [Gauche] et [Droite] pour diriger, [Avant] pour accélérer et [Arrière] pour ralentir ou reculer. Utilisez [Sneak] pour le quitter, frappez le bateau pour le faire tomber en tant qu'objet.
Spruce Boat=Bateau en Sapin
Water vehicle=Véhicule aquatique

View File

@ -65,6 +65,8 @@ mcl_item_entity.register_pickup_achievement("tree", "mcl:mineWood")
mcl_item_entity.register_pickup_achievement("mcl_mobitems:blaze_rod", "mcl:blazeRod")
mcl_item_entity.register_pickup_achievement("mcl_mobitems:leather", "mcl:killCow")
mcl_item_entity.register_pickup_achievement("mcl_core:diamond", "mcl:diamonds")
mcl_item_entity.register_pickup_achievement("mcl_core:crying_obsidian", "mcl:whosCuttingOnions")
mcl_item_entity.register_pickup_achievement("mcl_nether:ancient_debris", "mcl:hiddenInTheDepths")
local function check_pickup_achievements(object, player)
if has_awards then

View File

@ -227,6 +227,11 @@ functions needed for the mob to work properly which contains the following:
older mobs.
'pushable' Allows players, & other mobs to push the mob.
'spawn_with_armor' If set to true, the mob has a small chance of spawning with
random matched armor. If set to a string, the string represents
the material type of the armor. Any materials used by
mcl_armor will work. Example: "gold"
It is assumed that the first texture is for armor.
MineClone 2 extensions:

View File

@ -375,6 +375,7 @@ function mobs:register_mob(name, def)
--moves the wrong way
swap_y_with_x = def.swap_y_with_x or false,
reverse_head_yaw = def.reverse_head_yaw or false,
_spawn_with_armor = def.spawn_with_armor,
--END HEAD CODE VARIABLES
@ -401,6 +402,7 @@ function mobs:register_mob(name, def)
ignited_by_sunlight = def.ignited_by_sunlight or false,
eye_height = def.eye_height or 1.5,
defuse_reach = def.defuse_reach or 4,
spawn = def.spawn,
-- End of MCL2 extensions
on_spawn = def.on_spawn,

View File

@ -13,8 +13,13 @@ mobs.can_despawn = function(self)
if self.tamed or self.bred or self.nametag then return false end
local mob_pos = self.object:get_pos()
if not mob_pos then return true end
local players = minetest_get_connected_players()
if #players == 0 then return false end
-- If no players, probably this is being called from get_staticdata() at server shutdown time
-- Minetest is to buggy (as of 5.5) to delete entities at server shutdown time anyway
local distance = 999
for _, player in pairs(minetest_get_connected_players()) do
for _, player in pairs(players) do
if player and player:get_hp() > 0 then
local player_pos = player:get_pos()
local new_distance = vector_distance(player_pos, mob_pos)
@ -62,6 +67,102 @@ mobs.mob_staticdata = function(self)
return minetest.serialize(tmp)
end
mobs.armor_setup = function(self)
if not self._armor_items then
local armor = {}
-- Source: https://minecraft.fandom.com/wiki/Zombie
local materials = {
{name = "leather", chance = 0.3706},
{name = "gold", chance = 0.4873},
{name = "chain", chance = 0.129},
{name = "iron", chance = 0.0127},
{name = "diamond", chance = 0.0004}
}
local types = {
{name = "helmet", chance = 0.15},
{name = "chestplate", chance = 0.75},
{name = "leggings", chance = 0.75},
{name = "boots", chance = 0.75}
}
local material
if type(self._spawn_with_armor) == "string" then
material = self._spawn_with_armor
else
local chance = 0
for i, m in pairs(materials) do
chance = chance + m.chance
if math.random() <= chance then
material = m.name
break
end
end
end
for i, t in pairs(types) do
if math.random() <= t.chance then
armor[t.name] = material
else
break
end
end
-- Save armor items in lua entity
self._armor_items = {}
for atype, material in pairs(armor) do
local item = "mcl_armor:" .. atype .. "_" .. material
self._armor_items[atype] = item
end
-- Setup armor drops
for atype, material in pairs(armor) do
local wear = math.random(1, 65535)
local item = "mcl_armor:" .. atype .. "_" .. material .. " 1 " .. wear
self.drops = table.copy(self.drops)
table.insert(self.drops, {
name = item,
chance = 1/0.085, -- 8.5%
min = 1,
max = 1,
looting = "rare",
looting_factor = 0.01 / 3,
})
end
-- Configure textures
local t = ""
local first_image = true
for atype, material in pairs(armor) do
if not first_image then
t = t .. "^"
end
t = t .. "mcl_armor_" .. atype .. "_" .. material .. ".png"
first_image = false
end
if t ~= "" then
self.base_texture = table.copy(self.base_texture)
self.base_texture[1] = t
end
-- Configure damage groups based on armor
-- Source: https://minecraft.fandom.com/wiki/Armor#Armor_points
local points = 2
for atype, material in pairs(armor) do
local item_name = "mcl_armor:" .. atype .. "_" .. material
points = points + minetest.get_item_group(item_name, "mcl_armor_points")
end
local armor_strength = 100 - 4 * points
local armor_groups = self.object:get_armor_groups()
armor_groups.fleshy = armor_strength
self.armor = armor_groups
-- Helmet protects mob from sun damage
if armor.helmet then
self.ignited_by_sunlight = false
end
end
end
-- activate mob and reload settings
mobs.mob_activate = function(self, staticdata, def, dtime)
@ -104,6 +205,11 @@ mobs.mob_activate = function(self, staticdata, def, dtime)
self.base_colbox = self.collisionbox
self.base_selbox = self.selectionbox
end
-- Setup armor on mobs
if self._spawn_with_armor then
mobs.armor_setup(self)
end
-- for current mobs that dont have this set
if not self.base_selbox then

View File

@ -267,6 +267,8 @@ function mobs:spawn_setup(def)
local day_toggle = def.day_toggle
local on_spawn = def.on_spawn
local check_position = def.check_position
local group_size_min = def.group_size_min or 1
local group_size_max = def.group_size_max or 1
-- chance/spawn number override in minetest.conf for registered mob
local numbers = minetest.settings:get(name)
@ -300,10 +302,23 @@ function mobs:spawn_setup(def)
day_toggle = day_toggle,
check_position = check_position,
on_spawn = on_spawn,
group_size_min = group_size_min,
group_size_max = group_size_max,
}
summary_chance = summary_chance + chance
end
function mobs.spawn_mob(name, pos)
local def = minetest.registered_entities[name]
if not def then return end
if def.spawn then
return def.spawn(pos)
end
return minetest.add_entity(pos, name)
end
local spawn_mob = mobs.spawn_mob
function mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_light, max_light, interval, chance, aoc, min_height, max_height, day_toggle, on_spawn)
-- Do mobs spawn at all?
@ -341,6 +356,8 @@ function mobs:spawn_specific(name, dimension, type_of_spawning, biomes, min_ligh
spawn_dictionary[key]["min_height"] = min_height
spawn_dictionary[key]["max_height"] = max_height
spawn_dictionary[key]["day_toggle"] = day_toggle
spawn_dictionary[key]["group_size_min"] = 1
spawn_dictionary[key]["group_size_max"] = 3
summary_chance = summary_chance + chance
end
@ -442,9 +459,9 @@ if mobs_spawn then
and (mob_def.check_position and mob_def.check_position(spawning_position) or true)
then
--everything is correct, spawn mob
local object = minetest.add_entity(spawning_position, mob_def.name)
local object = spawn_mob(mob_def.name, spawning_position)
if object then
return mob_def.on_spawn and mob_def.on_spawn(object, pos)
return mob_def.on_spawn and mob_def.on_spawn(object, spawning_position)
end
end
current_summary_chance = current_summary_chance - mob_chance

View File

@ -2,118 +2,27 @@
local S = minetest.get_translator(minetest.get_current_modname())
local rabbit = {
description = S("Rabbit"),
type = "animal",
spawn_class = "passive",
passive = true,
reach = 1,
rotate = 270,
hp_min = 3,
hp_max = 3,
xp_min = 1,
xp_max = 3,
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.49, 0.2},
local mob_name = "mobs_mc:rabbit"
visual = "mesh",
mesh = "mobs_mc_rabbit.b3d",
textures = {
local textures = {
{"mobs_mc_rabbit_brown.png"},
{"mobs_mc_rabbit_gold.png"},
{"mobs_mc_rabbit_white.png"},
{"mobs_mc_rabbit_white_splotched.png"},
{"mobs_mc_rabbit_salt.png"},
{"mobs_mc_rabbit_black.png"},
},
visual_size = {x=1.5, y=1.5},
sounds = {
random = "mobs_mc_rabbit_random",
damage = "mobs_mc_rabbit_hurt",
death = "mobs_mc_rabbit_death",
attack = "mobs_mc_rabbit_attack",
eat = "mobs_mc_animal_eat_generic",
distance = 16,
},
makes_footstep_sound = false,
walk_velocity = 1,
run_velocity = 3.7,
follow_velocity = 1.1,
floats = 1,
runaway = true,
jump = true,
drops = {
{name = mobs_mc.items.rabbit_raw, chance = 1, min = 0, max = 1, looting = "common",},
{name = mobs_mc.items.rabbit_hide, chance = 1, min = 0, max = 1, looting = "common",},
{name = mobs_mc.items.rabbit_foot, chance = 10, min = 0, max = 1, looting = "rare", looting_factor = 0.03,},
},
fear_height = 4,
animation = {
speed_normal = 25, speed_run = 50,
stand_start = 0, stand_end = 0,
walk_start = 0, walk_end = 20,
run_start = 0, run_end = 20,
},
-- Follow (yellow) dangelions, carrots and golden carrots
follow = mobs_mc.follow.rabbit,
view_range = 8,
-- Eat carrots and reduce their growth stage by 1
replace_rate = 10,
replace_what = mobs_mc.replace.rabbit,
on_rightclick = function(self, clicker)
-- Feed, tame protect or capture
if mobs:feed_tame(self, clicker, 1, true, true) then return end
end,
do_custom = function(self)
-- Easter egg: Change texture if rabbit is named “Toast”
if self.nametag == "Toast" and not self._has_toast_texture then
self._original_rabbit_texture = self.base_texture
self.base_texture = { "mobs_mc_rabbit_toast.png" }
self.object:set_properties({ textures = self.base_texture })
self._has_toast_texture = true
elseif self.nametag ~= "Toast" and self._has_toast_texture then
self.base_texture = self._original_rabbit_texture
self.object:set_properties({ textures = self.base_texture })
self._has_toast_texture = false
end
end,
}
mobs:register_mob("mobs_mc:rabbit", rabbit)
local sounds = {
random = "mobs_mc_rabbit_random",
damage = "mobs_mc_rabbit_hurt",
death = "mobs_mc_rabbit_death",
attack = "mobs_mc_rabbit_attack",
eat = "mobs_mc_animal_eat_generic",
distance = 16,
}
-- The killer bunny (Only with spawn egg)
local killer_bunny = table.copy(rabbit)
killer_bunny.description = S("Killer Bunny")
killer_bunny.type = "monster"
killer_bunny.spawn_class = "hostile"
killer_bunny.attack_type = "dogfight"
killer_bunny.specific_attack = { "player", "mobs_mc:wolf", "mobs_mc:dog" }
killer_bunny.damage = 8
killer_bunny.passive = false
-- 8 armor points
killer_bunny.armor = 50
killer_bunny.textures = { "mobs_mc_rabbit_caerbannog.png" }
killer_bunny.view_range = 16
killer_bunny.replace_rate = nil
killer_bunny.replace_what = nil
killer_bunny.on_rightclick = nil
killer_bunny.run_velocity = 6
killer_bunny.do_custom = function(self)
if not self._killer_bunny_nametag_set then
self.nametag = S("The Killer Bunny")
self._killer_bunny_nametag_set = true
end
end
mobs:register_mob("mobs_mc:killer_bunny", killer_bunny)
-- Mob spawning rules.
-- Different skins depending on spawn location <- we'll get to this when the spawning algorithm is fleshed out
mobs:spawn_specific(
"mobs_mc:rabbit",
"overworld",
"ground",
{
local biome_list = {
"FlowerForest_beach",
"Forest_beach",
"StoneBeach",
@ -161,73 +70,149 @@ mobs:spawn_specific(
"MesaBryce",
"JungleEdge",
"SavannaM",
},
9,
minetest.LIGHT_MAX+1,
30,
15000,
8,
mobs_mc.spawn_height.overworld_min,
mobs_mc.spawn_height.overworld_max)
--[[
local spawn = {
name = "mobs_mc:rabbit",
neighbors = {"air"},
chance = 15000,
active_object_count = 10,
min_light = 0,
max_light = minetest.LIGHT_MAX+1,
min_height = mobs_mc.spawn_height.overworld_min,
max_height = mobs_mc.spawn_height.overworld_max,
}
local spawn_desert = table.copy(spawn)
spawn_desert.nodes = mobs_mc.spawn.desert
spawn_desert.on_spawn = function(self, pos)
local texture = "mobs_mc_rabbit_gold.png"
self.base_texture = { "mobs_mc_rabbit_gold.png" }
self.object:set_properties({textures = self.base_texture})
end
mobs:spawn(spawn_desert)
local spawn_snow = table.copy(spawn)
spawn_snow.nodes = mobs_mc.spawn.snow
spawn_snow.on_spawn = function(self, pos)
local function spawn_rabbit(pos)
local biome_data = minetest.get_biome_data(pos)
local biome_name = biome_data and minetest.get_biome_name(biome_data.biome) or ""
local mob = minetest.add_entity(pos, mob_name)
if not mob then return end
local self = mob:get_luaentity()
local texture
local r = math.random(1, 100)
-- 80% white fur
if r <= 80 then
texture = "mobs_mc_rabbit_white.png"
-- 20% black and white fur
if biome_name:find("Desert") then
texture = "mobs_mc_rabbit_gold.png"
else
texture = "mobs_mc_rabbit_white_splotched.png"
local r = math.random(1, 100)
if biome_name:find("Ice") or biome_name:find("snow") or biome_name:find("Cold") then
-- 80% white fur
if r <= 80 then
texture = "mobs_mc_rabbit_white.png"
-- 20% black and white fur
else
texture = "mobs_mc_rabbit_white_splotched.png"
end
else
-- 50% brown fur
if r <= 50 then
texture = "mobs_mc_rabbit_brown.png"
-- 40% salt fur
elseif r <= 90 then
texture = "mobs_mc_rabbit_salt.png"
-- 10% black fur
else
texture = "mobs_mc_rabbit_black.png"
end
end
end
self.base_texture = { texture }
self.object:set_properties({textures = self.base_texture})
self.base_texture = {texture}
self.object:set_properties({textures = {texture}})
end
mobs:spawn(spawn_snow)
local spawn_grass = table.copy(spawn)
spawn_grass.nodes = mobs_mc.spawn.grassland
spawn_grass.on_spawn = function(self, pos)
local texture
local r = math.random(1, 100)
-- 50% brown fur
if r <= 50 then
texture = "mobs_mc_rabbit_brown.png"
-- 40% salt fur
elseif r <= 90 then
texture = "mobs_mc_rabbit_salt.png"
-- 10% black fur
else
texture = "mobs_mc_rabbit_black.png"
local function do_custom_rabbit(self)
-- Easter egg: Change texture if rabbit is named “Toast”
if self.nametag == "Toast" and not self._has_toast_texture then
self._original_rabbit_texture = self.base_texture
self.base_texture = { "mobs_mc_rabbit_toast.png" }
self.object:set_properties({ textures = self.base_texture })
self._has_toast_texture = true
elseif self.nametag ~= "Toast" and self._has_toast_texture then
self.base_texture = self._original_rabbit_texture
self.object:set_properties({ textures = self.base_texture })
self._has_toast_texture = false
end
self.base_texture = { texture }
self.object:set_properties({textures = self.base_texture})
end
mobs:spawn(spawn_grass)
]]--
local rabbit = {
description = S("Rabbit"),
type = "animal",
spawn_class = "passive",
passive = true,
reach = 1,
rotate = 270,
hp_min = 3,
hp_max = 3,
xp_min = 1,
xp_max = 3,
collisionbox = {-0.2, -0.01, -0.2, 0.2, 0.49, 0.2},
visual = "mesh",
mesh = "mobs_mc_rabbit.b3d",
textures = textures,
visual_size = {x=1.5, y=1.5},
sounds = sounds,
makes_footstep_sound = false,
walk_velocity = 1,
run_velocity = 3.7,
follow_velocity = 1.1,
floats = 1,
runaway = true,
jump = true,
drops = {
{name = mobs_mc.items.rabbit_raw, chance = 1, min = 0, max = 1, looting = "common",},
{name = mobs_mc.items.rabbit_hide, chance = 1, min = 0, max = 1, looting = "common",},
{name = mobs_mc.items.rabbit_foot, chance = 10, min = 0, max = 1, looting = "rare", looting_factor = 0.03,},
},
fear_height = 4,
animation = {
speed_normal = 25, speed_run = 50,
stand_start = 0, stand_end = 0,
walk_start = 0, walk_end = 20,
run_start = 0, run_end = 20,
},
-- Follow (yellow) dangelions, carrots and golden carrots
follow = mobs_mc.follow.rabbit,
view_range = 8,
-- Eat carrots and reduce their growth stage by 1
replace_rate = 10,
replace_what = mobs_mc.replace.rabbit,
on_rightclick = function(self, clicker)
-- Feed, tame protect or capture
if mobs:feed_tame(self, clicker, 1, true, true) then return end
end,
do_custom = do_custom_rabbit,
spawn = spawn_rabbit
}
mobs:register_mob(mob_name, rabbit)
-- The killer bunny (Only with spawn egg)
local killer_bunny = table.copy(rabbit)
killer_bunny.description = S("Killer Bunny")
killer_bunny.type = "monster"
killer_bunny.spawn_class = "hostile"
killer_bunny.attack_type = "dogfight"
killer_bunny.specific_attack = { "player", "mobs_mc:wolf", "mobs_mc:dog" }
killer_bunny.damage = 8
killer_bunny.passive = false
-- 8 armor points
killer_bunny.armor = 50
killer_bunny.textures = { "mobs_mc_rabbit_caerbannog.png" }
killer_bunny.view_range = 16
killer_bunny.replace_rate = nil
killer_bunny.replace_what = nil
killer_bunny.on_rightclick = nil
killer_bunny.run_velocity = 6
killer_bunny.do_custom = function(self)
if not self._killer_bunny_nametag_set then
self.nametag = S("The Killer Bunny")
self._killer_bunny_nametag_set = true
end
end
mobs:register_mob("mobs_mc:killer_bunny", killer_bunny)
-- Mob spawning rules.
-- Different skins depending on spawn location <- we customized spawn function
mobs:spawn_setup({
name = mob_name,
min_light = 9,
chance = 1000,
aoc = 8,
biomes = biome_list,
group_size_max = 1,
baby_min = 1,
baby_max = 2,
})
-- Spawn egg
mobs:register_egg("mobs_mc:rabbit", S("Rabbit"), "mobs_mc_spawn_icon_rabbit.png", 0)

View File

@ -204,6 +204,7 @@ local zombie = {
attack_type = "punch",
punch_timer_cooloff = 0.5,
harmed_by_heal = true,
spawn_with_armor = true,
}
mobs:register_mob("mobs_mc:zombie", zombie)

View File

@ -238,8 +238,8 @@ after(5, function(dtime)
end)
minetest.register_chatcommand("lightning", {
params = "[<X> <Y> <Z>]",
description = S("Let lightning strike at the specified position or yourself"),
params = "[<X> <Y> <Z> | <player name>]",
description = S("Let lightning strike at the specified position or player. No parameter will strike yourself."),
privs = { maphack = true },
func = function(name, param)
local pos = {}
@ -247,21 +247,21 @@ minetest.register_chatcommand("lightning", {
pos.x = tonumber(pos.x)
pos.y = tonumber(pos.y)
pos.z = tonumber(pos.z)
local player_to_strike
if not (pos.x and pos.y and pos.z) then
pos = nil
player_to_strike = minetest.get_player_by_name(param)
if not player_to_strike and param == "" then
player_to_strike = minetest.get_player_by_name(name)
end
end
if name == "" and pos == nil then
if not player_to_strike and pos == nil then
return false, "No position specified and unknown player"
end
if pos then
lightning.strike(pos)
else
local player = minetest.get_player_by_name(name)
if player then
lightning.strike(player:get_pos())
else
return false, S("No position specified and unknown player")
end
elseif player_to_strike then
lightning.strike(player_to_strike:get_pos())
end
return true
end,

View File

@ -1,4 +1,4 @@
# textdomain: lightning
@1 was struck by lightning.=
Let lightning strike at the specified position or yourself=
Let lightning strike at the specified position or player. No parameter will strike yourself.=
No position specified and unknown player=

View File

@ -285,7 +285,7 @@ local function initsky(player)
end
-- MC-style clouds: Layer 127, thickness 4, fly to the “West”
player:set_clouds({height=mcl_worlds.layer_to_y(127), speed={x=-2, z=0}, thickness=4, color="#FFF0FEF"})
player:set_clouds(mcl_worlds:get_cloud_parameters() or {height=mcl_worlds.layer_to_y(127), speed={x=-2, z=0}, thickness=4, color="#FFF0FEF"})
end
minetest.register_on_joinplayer(initsky)

View File

@ -101,6 +101,18 @@ awards.register_achievement("mcl:bookcase", {
}
})
awards.register_achievement("mcl:buildIronPickaxe", {
title = S("Isn't It Iron Pick"),
-- TODO: This achievement should support all non-wood pickaxes
description = S("Craft a iron pickaxe using sticks and iron."),
icon = "default_tool_steelpick.png",
trigger = {
type = "craft",
item = "mcl_tools:pick_iron",
target = 1
}
})
-- Item pickup achievements: These are awarded when picking up a certain item.
-- The achivements are manually given in the mod mcl_item_entity.
awards.register_achievement("mcl:diamonds", {
@ -125,6 +137,24 @@ awards.register_achievement("mcl:mineWood", {
icon = "default_tree.png",
})
awards.register_achievement("mcl:whosCuttingOnions", {
title = S("Who is Cutting Onions?"),
description = S("Pick up a crying obsidian from the floor."),
icon = "default_obsidian.png^mcl_core_crying_obsidian.png",
})
awards.register_achievement("mcl:hiddenInTheDepths", {
title = S("Hidden in the Depths"),
description = S("Pick up an Ancient Debris from the floor."),
icon = "mcl_nether_ancient_debris_side.png",
})
awards.register_achievement("mcl:notQuiteNineLives", {
title = S('Not Quite "Nine" Lives'),
description = S("Charge a Respawn Anchor to the maximum."),
icon = "respawn_anchor_side4.png",
})
-- Smelting achivements: These are awarded when picking up an item from a furnace
-- output. They are given in mcl_furnaces.
awards.register_achievement("mcl:acquireIron", {
@ -163,6 +193,12 @@ awards.register_achievement("mcl:buildNetherPortal", {
icon = "default_obsidian.png",
})
awards.register_achievement("mcl:enterEndPortal", {
title = S("The End?"),
description = S("Or the beginning?\nHint: Enter an end portal."),
icon = "mcl_end_end_stone.png",
})
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
if non_pc_achievements then

View File

@ -10,7 +10,7 @@ Craft a stone pickaxe using sticks and cobblestone.=Fabriquez une pioche en pier
Craft a wooden sword using wooden planks and sticks on a crafting table.=Fabriquez une épée en bois à l'aide de planches et de bâtons en bois sur un établi.
DIAMONDS!=DIAMANTS!
Delicious Fish=Délicieux Poisson
Dispense With This=Dispenser de ça
Dispense With This=Dispensé de ça
Eat a cooked porkchop.=Mangez du porc cuit.
Eat a cooked rabbit.=Mangez du lapin cuit.
Get really desperate and eat rotten flesh.=Soyez vraiment désespéré et mangez de la chair pourrie.
@ -47,3 +47,19 @@ Use a crafting table to craft a wooden hoe from wooden planks and sticks.=Utilis
Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.=Utilisez un établi pour fabriquer une pioche en bois à partir de planches et de bâtons en bois.
Use obsidian and a fire starter to construct a Nether portal.=Utilisez de l'obsidienne et un briquet pour construire un portail du Nether.
Use wheat to craft a bread.=Utilisez du blé pour fabriquer un pain.
Stone Age=L'Age de Pierre
Mine a stone with new pickaxe.=Miner de la roche avec une nouvelle pioche
Hot Stuff=Chaud Devant !
Put lava in a bucket.=Remplir un Seau de lave
Ice Bucket Challenge=Le défi du seau d'eau glacée
Obtain an obsidian block.=Obtenir un bloc d'obsidienne
Isn't It Iron Pick=Bonne Pioche !
Craft a iron pickaxe using sticks and iron.=Fabriquer une pioche de fer avec des batons et du fer
Who is Cutting Onions?=Qui épluche des oignons ?
Pick up a crying obsidian from the floor.=Ramasser une obsidienne pleureuse sur le sol.
Hidden in the Depths=Caché dans les profondeurs
Pick up an Ancient Debris from the floor.=Ramasser un Ancien Débris
Not Quite "Nine" Lives=Presque "neuf" vies
Charge a Respawn Anchor to the maximum.=Charger une Ancre de Réapparition au maximum.
The End?=L'End ?
Or the beginning?\nHint: Enter an end portal.=Ou le commencement ?\nAstuce : Entrer dans un portail de l'End.

View File

@ -53,3 +53,13 @@ Hot Stuff=
Put lava in a bucket.=
Ice Bucket Challenge=
Obtain an obsidian block.=
Isn't It Iron Pick=
Craft a iron pickaxe using sticks and iron.=
Who is Cutting Onions?=
Pick up a crying obsidian from the floor.=
Hidden in the Depths=
Pick up an Ancient Debris from the floor.=
Not Quite "Nine" Lives=
Charge a Respawn Anchor to the maximum.=
The End?=
Or the beginning?\nHint: Enter an end portal.=

View File

@ -5,3 +5,4 @@ Error: Too many parameters!=Erreur: Trop de paramètres!
Error: Incorrect value of XP=Erreur: Valeur incorrecte de XP
Error: Player not found=Erreur: Joueur introuvable
Added @1 XP to @2, total: @3, experience level: @4=Ajout de @1 XP à @2, total: @3, niveau d'expérience: @4
Bottle o' Enchanting=Fiole d'expérience

View File

@ -89,7 +89,7 @@ minetest.register_chatcommand("debug",{
minetest.chat_send_player(name, S("Error! Possible values are integer numbers from @1 to @2", 0, 3))
return
end
if dbg == default_dbg then
if dbg == default_debug then
player_dbg[name] = nil
else
player_dbg[name] = dbg

View File

@ -0,0 +1,4 @@
# textdomain: mcl_info
Set debug bit mask: 0 @= disable, 1 @= biome name, 2 @= coordinates, 3 @= all=Réglage du masque de débugage : 0 @= désactiver, 1 @= nom de biome, 2 @= coordonnées, 3 @= tout=
Error! Possible values are integer numbers from @1 to @2=Erreur ! Les valeurs autorisées sont des nombres entiers de @1 à @2
Debug bit mask set to @1=Masque de débugage réglé à @1

View File

@ -0,0 +1,2 @@
# textdomain: mcl_observers
Bell=Cloche

View File

@ -0,0 +1,70 @@
local S = minetest.get_translator("mcl_target")
local mod_farming = minetest.get_modpath("mcl_farming")
mcl_target = {}
function mcl_target.hit(pos, time)
minetest.set_node(pos, {name="mcl_target:target_on"})
mesecon.receptor_on(pos, mesecon.rules.alldirs)
local timer = minetest.get_node_timer(pos)
timer:start(time)
end
minetest.register_node("mcl_target:target_off", {
description = S("Target"),
_doc_items_longdesc = S("A target is a block that provides a temporary redstone charge when hit by a projectile."),
_doc_items_usagehelp = S("Throw a projectile on the target to activate it."),
tiles = {"mcl_target_target_top.png", "mcl_target_target_top.png", "mcl_target_target_side.png"},
groups = {hoey = 1},
sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.1},
}),
mesecons = {
receptor = {
state = mesecon.state.off,
rules = mesecon.rules.alldirs,
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
minetest.register_node("mcl_target:target_on", {
description = S("Target"),
_doc_items_create_entry = false,
tiles = {"mcl_target_target_top.png", "mcl_target_target_top.png", "mcl_target_target_side.png"},
groups = {hoey = 1, not_in_creative_inventory = 1},
drop = "mcl_target:target_off",
sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.1},
}),
on_timer = function(pos, elapsed)
local node = minetest.get_node(pos)
if node.name == "mcl_target:target_on" then --has not been dug
minetest.set_node(pos, {name="mcl_target:target_off"})
mesecon.receptor_off(pos, mesecon.rules.alldirs)
end
end,
mesecons = {
receptor = {
state = mesecon.state.on,
rules = mesecon.rules.alldirs,
},
},
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
if mod_farming then
minetest.register_craft({
output = "mcl_target:target_off",
recipe = {
{"", "mesecons:redstone", ""},
{"mesecons:redstone", "mcl_farming:hay_block", "mesecons:redstone"},
{"", "mesecons:redstone", ""},
},
})
end

View File

@ -0,0 +1,4 @@
# textdomain: mcl_target
Target=Cible
A target is a block that provides a temporary redstone charge when hit by a projectile.=La cible est un bloc qui se comporte comme une source d'énergie temporaire quand elle est frappée par un projectile.
Throw a projectile on the target to activate it.=Lancer un projectile sur la cible pour l'activer.

View File

@ -0,0 +1,4 @@
# textdomain: mcl_target
Target=
A target is a block that provides a temporary redstone charge when hit by a projectile.=
Throw a projectile on the target to activate it.=

View File

@ -0,0 +1,3 @@
name = mcl_target
author = AFCMS
depends = mesecons, mcl_sounds

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

View File

@ -216,6 +216,18 @@ mesecon.register_button(
S("A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."),
"mesecons_button_push")
mesecon.register_button(
"polished_blackstone",
S("Polished Blackstone Button"),
"mcl_blackstone_polished.png",
"mcl_blackstone:blackstone_polished",
mcl_sounds.node_sound_stone_defaults(),
{material_stone=1,handy=1,pickaxey=1},
1,
false,
S("A polished blackstone button is a redstone component made out of polished blackstone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."),
"mesecons_button_push")
local woods = {
{ "wood", "mcl_core:wood", "default_wood.png", S("Oak Button") },
{ "acaciawood", "mcl_core:acaciawood", "default_acacia_wood.png", S("Acacia Button") },
@ -223,6 +235,8 @@ local woods = {
{ "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", S("Dark Oak Button") },
{ "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", S("Spruce Button") },
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Button") },
{ "warped_hyphae_wood", "mcl_mushroom:warped_hyphae_wood", "warped_hyphae_wood.png", S("Warped Hyphae Button") },
{ "crimson_hyphae_wood", "mcl_mushroom:crimson_hyphae_wood", "crimson_hyphae_wood.png", S("Crimson Hyphae Button") },
}
for w=1, #woods do

View File

@ -1,6 +1,7 @@
# textdomain: mesecons_button
Use the button to push it.=Utilisez le bouton pour le pousser.
Stone Button=Bouton de pierre
Polished Blackstone Button=Bouton de Pierre Noire Polie
A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=Un bouton en pierre est un composant Redstone en pierre qui peut être poussé pour fournir de la puissance Redstone. Lorsqu'il est poussé, il alimente les composants Redstone adjacents pendant 1 seconde.
Oak Button=Bouton en Chêne
Acacia Button=Bouton en Acacia
@ -8,6 +9,8 @@ Birch Button=Bouton en Bouleau
Dark Oak Button=Bouton en Chêne Noir
Spruce Button=Bouton en Sapin
Jungle Button=Bouton en Acajou
Warped Hyphae Button=Bouton en Hyphae Tordu
Crimson Hyphae Button=Bouton en Hyphae Ecarlate
A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=Un bouton en bois est un composant de redstone en bois qui peut être poussé pour fournir une puissance de redstone. Lorsqu'il est poussé, il alimente les composants Redstone adjacents pendant 1,5 seconde. Les boutons en bois peuvent également être poussés par des flèches.
Provides redstone power when pushed=Fournit une puissance de redstone lorsqu'il est poussé
Push duration: @1s=Durée de poussée: @1s

View File

@ -1,6 +1,7 @@
# textdomain: mesecons_button
Use the button to push it.=
Stone Button=
Polished Blackstone Button=
A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=
Oak Button=
Acacia Button=
@ -8,6 +9,8 @@ Birch Button=
Dark Oak Button=
Spruce Button=
Jungle Button=
Warped Hyphae Button=
Crimson Hyphae Button=
A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=
Provides redstone power when pushed=
Push duration: @1s=

View File

@ -164,6 +164,8 @@ local woods = {
{ "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", S("Dark Oak Pressure Plate" )},
{ "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", S("Spruce Pressure Plate") },
{ "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Pressure Plate") },
{ "warped_hyphae_wood", "mcl_mushrooom:warped_hyphae_wood", "warped_hyphae_wood.png", S("Warped Hyphae Pressure Plate")},
{ "crimson_hyphae_wood", "mcl_mushrooom:crimson_hyphae_wood", "crimson_hyphae_wood.png", S("Crimson Hyphae Pressure Plate")},
}
for w=1, #woods do
@ -201,6 +203,19 @@ mesecon.register_pressure_plate(
{ player = true, mob = true },
S("A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else."))
mesecon.register_pressure_plate(
"mesecons_pressureplates:pressure_plate_polished_blackstone",
S("Polished Blackstone Pressure Plate"),
{"mcl_blackstone_polished.png"},
{"mcl_blackstone_polished.png"},
"default_stone.png",
nil,
{{"mcl_blackstone:blackstone_polished", "mcl_blackstone:blackstone_polished"}},
mcl_sounds.node_sound_stone_defaults(),
{pickaxey=1, material_stone=1},
{ player = true, mob = true },
S("A polished blackstone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else."))
mesecon.register_pressure_plate(
"mesecons_pressureplates:pressure_plate_gold",
S("Light-Weighted Pressure Plate"),
@ -211,5 +226,18 @@ mesecon.register_pressure_plate(
{{"mcl_core:gold_ingot", "mcl_core:gold_ingot"}},
mcl_sounds.node_sound_metal_defaults(),
{pickaxey=1},
{ player = true, mob = true },
S("A light-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else."))
nil,
S("A light-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it."))
mesecon.register_pressure_plate(
"mesecons_pressureplates:pressure_plate_iron",
S("Heavy-Weighted Pressure Plate"),
{"default_steel_block.png"},
{"default_steel_block.png"},
"default_steel_block.png",
nil,
{{"mcl_core:iron_ingot", "mcl_core:iron_ingot"}},
mcl_sounds.node_sound_metal_defaults(),
{pickaxey=1},
nil,
S("A heavy-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it."))

View File

@ -6,10 +6,18 @@ Birch Pressure Plate=Plaque de pression en Bouleau
Dark Oak Pressure Plate=Plaque de pression en Chêne Noir
Spruce Pressure Plate=Plaque de pression en Sapin
Jungle Pressure Plate=Plaque de pression en Acajou
Warped Hyphae Pressure Plate=Plaque de pression en Hyphae Tordue
Crimson Hyphae Pressure Plate=Plaque de pression en Hyphae Ecarlate
A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=Une plaque de pression en bois est un composant de redstone qui alimente ses blocs environnants en puissance de redstone tandis que tout objet mobile (y compris les objets lâchés, les joueurs et les mobs) repose dessus.
Stone Pressure Plate=Plaque de pression en pierre
A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=Une plaque de pression en pierre est un composant de redstone qui alimente ses blocs environnants en puissance de redstone pendant qu'un joueur ou un mob se tient au-dessus. Il n'est déclenché par rien d'autre.
Provides redstone power when pushed=Fournit une puissance de redstone lorsqu'il est poussé
Polished Blackstone Pressure Plate=Plaque de pression en pierre noire polie
A polished blackstone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=Une plaque de pression en pierre noire polie est un composant de redstone qui alimente ses blocs environnants en puissance de redstone pendant qu'un joueur ou un mob se tient au-dessus. Il n'est déclenché par rien d'autre.
Light-Weighted Pressure Plate=Plaque de pression pondérée légère
A light-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=Une plaque de pression pondérée légère est un composant de redstone qui alimente ses blocs environnants en puissance de redstone tandis que tout objet mobile (y compris les objets lâchés, les joueurs et les mobs) repose dessus.
Heavy-Weighted Pressure Plate=Plaque de pression pondérée lourde
A heavy-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=Une plaque de pression pondérée lourde est un composant de redstone qui alimente ses blocs environnants en puissance de redstone tandis que tout objet mobile (y compris les objets lâchés, les joueurs et les mobs) repose dessus.
Provides redstone power when pushed=Fournit une puissance de redstone lorsque poussé
Pushable by players, mobs and objects=Poussable par les joueurs, les mobs et les objets
Pushable by players and mobs=Poussable par les joueurs et les mobs
Pushable by players=Poussable par les joueurs

View File

@ -6,9 +6,17 @@ Birch Pressure Plate=
Dark Oak Pressure Plate=
Spruce Pressure Plate=
Jungle Pressure Plate=
Warped Hyphae Pressure Plate=
Crimson Hyphae Pressure Plate=
A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=
Stone Pressure Plate=
A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=
Polished Blackstone Pressure Plate=
A polished blackstone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=
Light-Weighted Pressure Plate=
A light-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=
Heavy-Weighted Pressure Plate=
A heavy-weighted pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=
Provides redstone power when pushed=
Pushable by players, mobs and objects=
Pushable by players and mobs=

View File

@ -4,9 +4,11 @@ mcl_beds.pos = {}
mcl_beds.bed_pos = {}
local modpath = minetest.get_modpath("mcl_beds")
local S = minetest.get_translator(minetest.get_current_modname())
-- Load files
dofile(modpath .. "/functions.lua")
dofile(modpath .. "/api.lua")
dofile(modpath .. "/beds.lua")
dofile(modpath .. "/respawn_anchor.lua")

View File

@ -39,3 +39,4 @@ You're sleeping.=Tu dors.
You will fall asleep when all players are in bed.=Vous vous endormirez lorsque tous les joueurs seront au lit.
You're in bed.=Tu es au lit.
Allows you to sleep=Vous permet de dormir
Respawn Anchor=Ancre de Réapparition

View File

@ -40,3 +40,4 @@ You will fall asleep when all players are in bed.=
You will fall asleep when @1% of all players are in bed.=
You're in bed.=
Allows you to sleep=
Respawn Anchor=

View File

@ -2,4 +2,4 @@ name = mcl_beds
author = BlockMen
description =
depends = playerphysics
optional_depends = mcl_sounds, mcl_worlds, mcl_wool, mcl_dye, mcl_explosions, mcl_weather, mcl_spawn, doc
optional_depends = mcl_sounds, mcl_worlds, mcl_wool, mcl_dye, mcl_explosions, mcl_weather, mcl_spawn, doc, mcl_nether

View File

@ -0,0 +1,177 @@
--TODO: Add sounds for the respawn anchor
--Nether ends at y -29077
--Nether roof at y -28933
local S = minetest.get_translator(minetest.get_current_modname())
--local mod_doc = minetest.get_modpath("doc") -> maybe add documentation ?
minetest.register_node("mcl_beds:respawn_anchor",{
description=S("Respawn Anchor"),
tiles = {
"respawn_anchor_top_off.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side0.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
{-0.5, -0.5, -0.5, 0.5, -0.47, 0.5}, -- Bottom level, -0.47 because -0.5 is so low that you can see the texture of the block below through
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_1"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
end
end
end,
groups = {pickaxey=1, material_stone=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_1",{
description=S("Respawn Anchor"),
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side1.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_2"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_2",{
description=S("Respawn Anchor"),
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side2.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_3"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_3",{
description=S("Respawn Anchor"),
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side3.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack) == "mcl_nether:glowstone" then
minetest.set_node(pos, {name="mcl_beds:respawn_anchor_charged_4"})
itemstack:take_item()
else
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
end
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_node("mcl_beds:respawn_anchor_charged_4",{
description=S("Respawn Anchor"),
tiles = {
"portal.png",
"respawn_anchor_bottom.png",
"respawn_anchor_side4.png"
},
drawtype = "nodebox",
node_box= { --Reused the composter nodebox, since it is basicly the same
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall
{ 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall
{-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall
{-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level
}
},
on_rightclick = function(pos, node, player, itemstack)
if pos.y < -29077 or pos.y > -28933 then
mcl_explosions.explode(pos, 5, {drop_chance = 0, fire = true})
else
mcl_spawn.set_spawn_pos(player, pos, nil)
awards.unlock(player:get_player_name(), "mcl:notQuiteNineLives")
end
end,
groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1},
_mcl_hardness = 22.5
})
minetest.register_craft({ output = "mcl_beds:respawn_anchor",
recipe = {
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"},
{"mcl_nether:glowstone", "mcl_nether:glowstone", "mcl_nether:glowstone"},
{"mcl_core:crying_obsidian", "mcl_core:crying_obsidian", "mcl_core:crying_obsidian"}
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -1,149 +1,149 @@
--[[
#!#!#!#Cake mod created by Jordan4ibanez#!#!#
#!#!#!#Released under CC Attribution-ShareAlike 3.0 Unported #!#!#
]]--
local CAKE_HUNGER_POINTS = 2
local S = minetest.get_translator(minetest.get_current_modname())
local cake_texture = {"cake_top.png","cake_bottom.png","cake_inner.png","cake_side.png","cake_side.png","cake_side.png"}
local slice_1 = { -7/16, -8/16, -7/16, -5/16, 0/16, 7/16}
local slice_2 = { -7/16, -8/16, -7/16, -3/16, 0/16, 7/16}
local slice_3 = { -7/16, -8/16, -7/16, -1/16, 0/16, 7/16}
local slice_4 = { -7/16, -8/16, -7/16, 1/16, 0/16, 7/16}
local slice_5 = { -7/16, -8/16, -7/16, 3/16, 0/16, 7/16}
local slice_6 = { -7/16, -8/16, -7/16, 5/16, 0/16, 7/16}
local full_cake = { -7/16, -8/16, -7/16, 7/16, 0/16, 7/16}
minetest.register_craft({
output = "mcl_cake:cake",
recipe = {
{"mcl_mobitems:milk_bucket", "mcl_mobitems:milk_bucket", "mcl_mobitems:milk_bucket"},
{"mcl_core:sugar", "mcl_throwing:egg", "mcl_core:sugar"},
{"mcl_farming:wheat_item", "mcl_farming:wheat_item", "mcl_farming:wheat_item"},
},
replacements = {
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
},
})
minetest.register_node("mcl_cake:cake", {
description = S("Cake"),
_tt_help = S("With 7 tasty slices!").."\n"..S("Hunger points: +@1 per slice", CAKE_HUNGER_POINTS),
_doc_items_longdesc = S("Cakes can be placed and eaten to restore hunger points. A cake has 7 slices. Each slice restores 2 hunger points and 0.4 saturation points. Cakes will be destroyed when dug or when the block below them is broken."),
_doc_items_usagehelp = S("Place the cake anywhere, then rightclick it to eat a single slice. You can't eat from the cake when your hunger bar is full."),
tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
inventory_image = "cake.png",
wield_image = "cake.png",
paramtype = "light",
is_ground_content = false,
drawtype = "nodebox",
selection_box = {
type = "fixed",
fixed = full_cake
},
node_box = {
type = "fixed",
fixed = full_cake
},
stack_max = 1,
groups = {handy=1, cake=7, food=2,no_eat_delay=1, attached_node=1, dig_by_piston=1, comparator_signal=14},
drop = "",
on_rightclick = function(pos, node, clicker, itemstack)
-- Cake is subject to protection
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(2, ItemStack("mcl_cake:cake_6"), ItemStack("mcl_cake:cake"), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= "mcl_cake:cake" or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.add_node(pos,{type="node",name="mcl_cake:cake_6",param2=0})
end
end,
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_saturation = 0.4,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
local register_slice = function(level, nodebox, desc)
local this = "mcl_cake:cake_"..level
local after_eat = "mcl_cake:cake_"..(level-1)
local on_rightclick
if level > 1 then
on_rightclick = function(pos, node, clicker, itemstack)
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(CAKE_HUNGER_POINTS, ItemStack(after_eat), ItemStack(this), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= this or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.add_node(pos,{type="node",name=after_eat,param2=0})
end
end
else
-- Last slice
on_rightclick = function(pos, node, clicker, itemstack)
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(CAKE_HUNGER_POINTS, ItemStack("mcl:cake:cake 0"), ItemStack("mcl_cake:cake_1"), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= this or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.remove_node(pos)
minetest.check_for_falling(pos)
end
end
end
minetest.register_node(this, {
description = desc,
_doc_items_create_entry = false,
tiles = cake_texture,
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
paramtype = "light",
is_ground_content = false,
drawtype = "nodebox",
selection_box = {
type = "fixed",
fixed = nodebox,
},
node_box = {
type = "fixed",
fixed = nodebox,
},
groups = {handy=1, cake=level, food=2,no_eat_delay=1,attached_node=1,not_in_creative_inventory=1,dig_by_piston=1,comparator_signal=level*2},
drop = "",
on_rightclick = on_rightclick,
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_saturation = 0.4,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mcl_cake:cake", "nodes", "mcl_cake:cake_"..level)
end
end
register_slice(6, slice_6, S("Cake (6 Slices Left)"))
register_slice(5, slice_5, S("Cake (5 Slices Left)"))
register_slice(4, slice_4, S("Cake (4 Slices Left)"))
register_slice(3, slice_3, S("Cake (3 Slices Left)"))
register_slice(2, slice_2, S("Cake (2 Slices Left)"))
register_slice(1, slice_1, S("Cake (1 Slice Left)"))
--[[
#!#!#!#Cake mod created by Jordan4ibanez#!#!#
#!#!#!#Released under CC Attribution-ShareAlike 3.0 Unported #!#!#
]]--
local CAKE_HUNGER_POINTS = 2
local S = minetest.get_translator(minetest.get_current_modname())
local cake_texture = {"cake_top.png","cake_bottom.png","cake_inner.png","cake_side.png","cake_side.png","cake_side.png"}
local slice_1 = { -7/16, -8/16, -7/16, -5/16, 0/16, 7/16}
local slice_2 = { -7/16, -8/16, -7/16, -3/16, 0/16, 7/16}
local slice_3 = { -7/16, -8/16, -7/16, -1/16, 0/16, 7/16}
local slice_4 = { -7/16, -8/16, -7/16, 1/16, 0/16, 7/16}
local slice_5 = { -7/16, -8/16, -7/16, 3/16, 0/16, 7/16}
local slice_6 = { -7/16, -8/16, -7/16, 5/16, 0/16, 7/16}
local full_cake = { -7/16, -8/16, -7/16, 7/16, 0/16, 7/16}
minetest.register_craft({
output = "mcl_cake:cake",
recipe = {
{"mcl_mobitems:milk_bucket", "mcl_mobitems:milk_bucket", "mcl_mobitems:milk_bucket"},
{"mcl_core:sugar", "mcl_throwing:egg", "mcl_core:sugar"},
{"mcl_farming:wheat_item", "mcl_farming:wheat_item", "mcl_farming:wheat_item"},
},
replacements = {
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
{"mcl_mobitems:milk_bucket", "mcl_buckets:bucket_empty"},
},
})
minetest.register_node("mcl_cake:cake", {
description = S("Cake"),
_tt_help = S("With 7 tasty slices!").."\n"..S("Hunger points: +@1 per slice", CAKE_HUNGER_POINTS),
_doc_items_longdesc = S("Cakes can be placed and eaten to restore hunger points. A cake has 7 slices. Each slice restores 2 hunger points and 0.4 saturation points. Cakes will be destroyed when dug or when the block below them is broken."),
_doc_items_usagehelp = S("Place the cake anywhere, then rightclick it to eat a single slice. You can't eat from the cake when your hunger bar is full."),
tiles = {"cake_top.png","cake_bottom.png","cake_side.png","cake_side.png","cake_side.png","cake_side.png"},
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
inventory_image = "cake.png",
wield_image = "cake.png",
paramtype = "light",
is_ground_content = false,
drawtype = "nodebox",
selection_box = {
type = "fixed",
fixed = full_cake
},
node_box = {
type = "fixed",
fixed = full_cake
},
stack_max = 1,
groups = {handy=1, cake=7, food=2, no_eat_delay=1, compostability=100, attached_node=1, dig_by_piston=1, comparator_signal=14},
drop = "",
on_rightclick = function(pos, node, clicker, itemstack)
-- Cake is subject to protection
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(2, ItemStack("mcl_cake:cake_6"), ItemStack("mcl_cake:cake"), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= "mcl_cake:cake" or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.add_node(pos,{type="node",name="mcl_cake:cake_6",param2=0})
end
end,
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_saturation = 0.4,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
local register_slice = function(level, nodebox, desc)
local this = "mcl_cake:cake_"..level
local after_eat = "mcl_cake:cake_"..(level-1)
local on_rightclick
if level > 1 then
on_rightclick = function(pos, node, clicker, itemstack)
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(CAKE_HUNGER_POINTS, ItemStack(after_eat), ItemStack(this), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= this or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.add_node(pos,{type="node",name=after_eat,param2=0})
end
end
else
-- Last slice
on_rightclick = function(pos, node, clicker, itemstack)
local name = clicker:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return
end
local newcake = minetest.do_item_eat(CAKE_HUNGER_POINTS, ItemStack("mcl:cake:cake 0"), ItemStack("mcl_cake:cake_1"), clicker, {type="nothing"})
-- Check if we were allowed to eat
if newcake:get_name() ~= this or minetest.is_creative_enabled(clicker:get_player_name()) then
minetest.remove_node(pos)
minetest.check_for_falling(pos)
end
end
end
minetest.register_node(this, {
description = desc,
_doc_items_create_entry = false,
tiles = cake_texture,
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
paramtype = "light",
is_ground_content = false,
drawtype = "nodebox",
selection_box = {
type = "fixed",
fixed = nodebox,
},
node_box = {
type = "fixed",
fixed = nodebox,
},
groups = {handy=1, cake=level, food=2, no_eat_delay=1, compostability=100, attached_node=1, not_in_creative_inventory=1, dig_by_piston=1, comparator_signal=level*2},
drop = "",
on_rightclick = on_rightclick,
sounds = mcl_sounds.node_sound_leaves_defaults(),
_food_particles = false,
_mcl_saturation = 0.4,
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", "mcl_cake:cake", "nodes", "mcl_cake:cake_"..level)
end
end
register_slice(6, slice_6, S("Cake (6 Slices Left)"))
register_slice(5, slice_5, S("Cake (5 Slices Left)"))
register_slice(4, slice_4, S("Cake (4 Slices Left)"))
register_slice(3, slice_3, S("Cake (3 Slices Left)"))
register_slice(2, slice_2, S("Cake (2 Slices Left)"))
register_slice(1, slice_1, S("Cake (1 Slice Left)"))

View File

@ -128,8 +128,9 @@ minetest.register_craft({
minetest.register_abm({
label = "cauldrons",
nodenames = {"group:cauldron_filled"},
interval = 0.5,
interval = 1,
chance = 1,
-- TODO: Move to playerinfo/playerplus/mob api
action = function(pos, node)
for _, obj in pairs(minetest.get_objects_inside_radius(pos, 0.4)) do
if mcl_burning.is_burning(obj) then

View File

@ -1,3 +1,5 @@
--TODO: Add advancement
local S = minetest.get_translator(minetest.get_current_modname())
mcl_compass = {}
@ -9,28 +11,58 @@ local compass_frames = 32
-- Timer for random compass spinning
local random_timer = 0
local random_timer_trigger = 0.5 -- random compass spinning tick in seconds. Increase if there are performance problems
local random_timer_trigger = 0.5 -- random compass spinning tick in seconds. Incr ease if there are performance problems
local random_frame = math.random(0, compass_frames-1)
function mcl_compass.get_compass_image(pos, dir)
function mcl_compass.get_compass_image(pos, dir, x, y, z)
-- Compasses do not work in certain zones
if mcl_worlds.compass_works(pos) then
local spawn = {x=0,y=0,z=0}
local ssp = minetest.setting_get_pos("static_spawnpoint")
if ssp then
spawn = ssp
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
spawn = {x=0,y=0,z=0}
if mcl_worlds.compass_works(pos) and x ~= nil and y ~= nil and z ~= nil then
local _, dim = mcl_worlds.y_to_layer(y)
local _, playerdim = mcl_worlds.y_to_layer(pos.y)
if dim == playerdim then --Check if player and compass target are in the same dimension, above check is just if the diemension is valid for the non lodestone compass
local spawn = {x=x,y=y,z=z}
local ssp = minetest.setting_get_pos("static_spawnpoint")
if ssp and x == 0 and y == 0 and z == 0 then
spawn = ssp
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
spawn = {x=0,y=0,z=0}
end
end
local angle_north = math.deg(math.atan2(spawn.x - pos.x, spawn.z - pos.z))
if angle_north < 0 then angle_north = angle_north + 360 end
local angle_dir = -math.deg(dir)
local angle_relative = (angle_north - angle_dir + 180) % 360
return math.floor((angle_relative/11.25) + 0.5) % compass_frames
else
return random_frame
end
local angle_north = math.deg(math.atan2(spawn.x - pos.x, spawn.z - pos.z))
if angle_north < 0 then angle_north = angle_north + 360 end
local angle_dir = -math.deg(dir)
local angle_relative = (angle_north - angle_dir + 180) % 360
return math.floor((angle_relative/11.25) + 0.5) % compass_frames
else
return random_frame
if x ~= 0 and y ~= 0 and z~= 0 and x ~= nil and y ~= nil and x~= nil then
local _, dim = mcl_worlds.y_to_layer(y)
local _, playerdim = mcl_worlds.y_to_layer(pos.y)
if dim == playerdim then --already explained that very same if statement above
local spawn = {x=x,y=y,z=z}
local ssp = minetest.setting_get_pos("static_spawnpoint")
if ssp and x == 0 and y == 0 and z == 0 then
spawn = ssp
if type(spawn) ~= "table" or type(spawn.x) ~= "number" or type(spawn.y) ~= "number" or type(spawn.z) ~= "number" then
spawn = {x=0,y=0,z=0}
end
end
local angle_north = math.deg(math.atan2(spawn.x - pos.x, spawn.z - pos.z))
if angle_north < 0 then angle_north = angle_north + 360 end
local angle_dir = -math.deg(dir)
local angle_relative = (angle_north - angle_dir + 180) % 360
return math.floor((angle_relative/11.25) + 0.5) % compass_frames
else
return random_frame
end
else
return random_frame
end
end
end
@ -52,9 +84,39 @@ minetest.register_globalstep(function(dtime)
end
if has_compass(player) then
local pos = player:get_pos()
local compass_image = mcl_compass.get_compass_image(pos, player:get_look_horizontal())
for j,stack in pairs(player:get_inventory():get_list("main")) do
x = stack:get_meta():get_string("x") -- i know i could write the pos in meta, but i like this method more, and it is basicly the same, since else there would be one table with 3 values, and i have 3 values on their own
y = stack:get_meta():get_string("y")
z = stack:get_meta():get_string("z")
x = tonumber(x)
y = tonumber(y)
z = tonumber(z)
if x == nil or y == nil or z == nil then --checking if the compass has lodestone meta
compass_image = mcl_compass.get_compass_image(pos, player:get_look_horizontal(), 0, 0, 0) --no lodestone meta
else
checkblock = {x = x, y = y, z = z}
local function get_far_node(pos) --function that tries to read node normally, and does it even if its unloaded https://dev.minetest.net/minetest.get_node
local node = minetest.get_node(pos)
if node.name == "ignore" then
minetest.get_voxel_manip():read_from_map(pos, pos)
node = minetest.get_node(pos)
end
return node
end
if get_far_node(checkblock).name == "mcl_compass:lodestone" then --check if lodestone still exists
compass_image = mcl_compass.get_compass_image(pos, player:get_look_horizontal(), x, y, z)
compass_image = compass_image .. "_lodestone"
else -- lodestone got destroyed
compass_image = random_frame .. "_lodestone"
end
end
if minetest.get_item_group(stack:get_name(), "compass") ~= 0 and
minetest.get_item_group(stack:get_name(), "compass")-1 ~= compass_image then
local itemname = "mcl_compass:"..compass_image
@ -81,8 +143,8 @@ for i,img in ipairs(images) do
inv = 0
end
local use_doc, longdesc, tt
--Why is there no usage help? This should be fixed.
--local usagehelp
--Why is there no usage help? This should be fixed.
--local usagehelp
use_doc = i == stereotype_frame
if use_doc then
tt = S("Points to the world origin")
@ -100,6 +162,18 @@ for i,img in ipairs(images) do
stack_max = 64,
groups = {not_in_creative_inventory=inv, compass=i, tool=1, disable_repair=1 }
})
minetest.register_craftitem(itemstring .. "_lodestone", {
description = S("Lodestone Compass"),
_tt_help = tt,
_doc_items_create_entry = use_doc,
_doc_items_longdesc = longdesc,
--_doc_items_usagehelp = usagehelp,
inventory_image = img .. "^[colorize:purple:50",
wield_image = img .. "^[colorize:purple:50",
stack_max = 64,
groups = {not_in_creative_inventory=1, compass=i, tool=1, disable_repair=1 }
})
-- Help aliases. Makes sure the lookup tool works correctly
if not use_doc and doc_mod then
@ -116,9 +190,42 @@ minetest.register_craft({
}
})
minetest.register_craft({
output = "mcl_compass:lodestone",
recipe = {
{"mcl_core:stonebrickcarved","mcl_core:stonebrickcarved","mcl_core:stonebrickcarved"},
{"mcl_core:stonebrickcarved", "mcl_nether:netherite_ingot", "mcl_core:stonebrickcarved"},
{"mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved"}
}
})
minetest.register_alias("mcl_compass:compass", "mcl_compass:"..stereotype_frame)
-- Export stereotype item for other mods to use
mcl_compass.stereotype = "mcl_compass:"..tostring(stereotype_frame)
minetest.register_node("mcl_compass:lodestone",{
description=S("Lodestone"),
on_rightclick = function(pos, node, player, itemstack)
if itemstack.get_name(itemstack).match(itemstack.get_name(itemstack),"mcl_compass:") then
if itemstack.get_name(itemstack) ~= "mcl_compass:lodestone" then
itemstack:get_meta():set_string("x", pos.x)
itemstack:get_meta():set_string("y", pos.y)
itemstack:get_meta():set_string("z", pos.z)
end
end
end,
tiles = {
"lodestone_top.png",
"lodestone_bottom.png",
"lodestone_side1.png",
"lodestone_side2.png",
"lodestone_side3.png",
"lodestone_side4.png"
},
groups = {pickaxey=1, material_stone=1},
_mcl_hardness = 1.5,
_mcl_blast_resistance = 6,
sounds = mcl_sounds.node_sound_stone_defaults()
})

View File

@ -2,3 +2,5 @@
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=Les boussoles sont des outils qui pointent vers l'origine du monde (X@=0,Z@=0) ou le point d'apparition dans l'Overworld.
Compass=Boussole
Points to the world origin=Pointe vers l'origine mondiale
Lodestone Compass=Boussole magnétisée
Lodestone=Magnétite

View File

@ -2,3 +2,5 @@
Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=
Compass=
Points to the world origin=
Lodestone Compass=
Lodestone=

View File

@ -1,4 +1,4 @@
name = mcl_compass
description = A compass item which points towards the world origin.
depends = mcl_core, mcl_worlds, mesecons
optional_depends = doc
depends = mcl_core, mcl_worlds, mesecons, mcl_nether, mcl_sounds
optional_depends = doc

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

View File

@ -32,108 +32,6 @@ minetest.register_craft({
}
})
local compostability = {
["mcl_cake:cake"] = 100,
["mcl_farming:pumpkin_pie"] = 100,
["mcl_farming:potato_item_baked"] = 85,
["mcl_farming:bread"] = 85,
["mcl_farming:cookie"] = 85,
["mcl_farming:hay_block"] = 85,
-- mushroom cap block have 64 variants, wtf!?
["mcl_mushrooms:brown_mushroom_block_cap_111111"] = 85,
["mcl_mushrooms:red_mushroom_block_cap_111111"] = 85,
["mcl_nether:nether_wart_block"] = 85,
["mcl_mushroom:warped_wart_block"] = 85,
["mcl_core:apple"] = 65,
-- missing: azalea
["mcl_farming:beetroot_item"] = 65,
-- missing: big dripleaf
["mcl_farming:carrot_item"] = 65,
-- what's up with cocoa beans?
["mcl_dye:brown"] = 65,
["mcl_flowers:fern"] = 65,
["mcl_flowers:double_fern"] = 65,
["mcl_flowers:allium"] = 65,
["mcl_flowers:azure_bluet"] = 65,
["mcl_flowers:blue_orchid"] = 65,
["mcl_flowers:dandelion"] = 65,
["mcl_flowers:lilac"] = 65,
["mcl_flowers:oxeye_daisy"] = 65,
["mcl_flowers:poppy"] = 65,
["mcl_flowers:tulip_orange"] = 65,
["mcl_flowers:tulip_pink"] = 65,
["mcl_flowers:tulip_red"] = 65,
["mcl_flowers:tulip_white"] = 65,
["mcl_flowers:peony"] = 65,
["mcl_flowers:rose_bush"] = 65,
["mcl_flowers:sunflower"] = 65,
["mcl_flowers:waterlily"] = 65,
["mcl_farming:melon"] = 65,
["mcl_core:moss"] = 65,
-- mushroom aliases below?
["mcl_farming:mushroom_brown"] = 65,
["mcl_mushrooms:mushroom_brown"] = 65,
["mcl_farming:mushroom_red"] = 65,
["mcl_mushrooms:mushroom_red"] = 65,
["mcl_mushrooms:brown_mushroom_block_stem_full"] = 65,
["mcl_mushrooms:red_mushroom_block_stem_full"] = 65,
-- nether wart
["mcl_farming:potato_item"] = 65,
["mcl_farming:pumpkin"] = 65,
["mcl_farming:pumpkin_face_light"] = 65,
["mcl_ocean:sea_pickle_"] = 65,
["mcl_mushroom:shroomlight"] = 65,
-- missing: spore blossom
["mcl_farming:wheat_item"] = 65,
["mcl_mushroom:crimson_fungus"] = 65,
["mcl_mushroom:warped_fungus"] = 65,
["mcl_mushroom:crimson_roots"] = 65,
["mcl_mushroom:warped_roots"] = 65,
["mcl_core:cactus"] = 50,
["mcl_ocean:dried_kelp_block"] = 50,
-- missing: flowering azalea leaves
-- missing: glow lichen
["mcl_farming:melon_item"] = 50,
["mcl_mushroom:nether_sprouts"] = 50,
["mcl_core:reeds"] = 50,
["mcl_flowers:double_grass"] = 50,
["mcl_core:vine"] = 50,
-- missing: weeping vines
["mcl_mushroom:twisting_vines"] = 50,
["mcl_flowers:tallgrass"] = 30,
["mcl_farming:beetroot_seeds"] = 30,
["mcl_core:dirt_with_grass"] = 30,
["mcl_core:tallgrass"] = 30,
["mcl_ocean:dried_kelp"] = 30,
["mcl_ocean:kelp"] = 30,
["mcl_core:leaves"] = 30,
["mcl_core:acacialeaves"] = 30,
["mcl_core:birchleaves"] = 30,
["mcl_core:darkleaves"] = 30,
["mcl_core:jungleleaves"] = 30,
["mcl_core:spruceleaves"] = 30,
--
["mcl_farming:melon_seeds"] = 30,
["mcl_core:moss_carpet"] = 30,
["mcl_farming:pumpkin_seeds"] = 30,
["mcl_core:sapling"] = 30,
["mcl_core:acaciasapling"] = 30,
["mcl_core:birchsapling"] = 30,
["mcl_core:darksapling"] = 30,
["mcl_core:junglesapling"] = 30,
["mcl_core:sprucesapling"] = 30,
["mcl_ocean:seagrass"] = 30,
-- missing: small dripleaf
["mcl_sweet_berry:sweet_berry"] = 30,
["mcl_farming:sweet_berry"] = 30,
["mcl_farming:wheat_seeds"] = 30,
}
local function composter_add_item(pos, node, player, itemstack, pointed_thing)
--
-- handler for filling the composter when rightclicked
@ -147,8 +45,9 @@ local function composter_add_item(pos, node, player, itemstack, pointed_thing)
return itemstack
end
local itemname = itemstack:get_name()
local chance = compostability[itemname]
if chance then
local chance = minetest.get_item_group(itemname, "compostability")
if chance > 0 then
if not minetest.is_creative_enabled(player:get_player_name()) then
itemstack:take_item()
end

View File

@ -21,6 +21,14 @@ MIT License.
The textures are taken from the Minecraft resource pack “Faithful 1.11” by Vattic and
xMrVizzy and contributers.
CC BY-SA 4.0
mcl_core_lava_spark.png is based on the Pixel Perfection resource pack for Minecraft 1.11,
authored by XSSheep.
Source: <https://www.planetminecraft.com/texture_pack/131pixel-perfection/>
License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)
Sounds
======
All sounds included in this mod are under the MIT License.

View File

@ -139,7 +139,7 @@ minetest.register_craftitem("mcl_core:apple", {
stack_max = 64,
on_place = minetest.item_eat(4),
on_secondary_use = minetest.item_eat(4),
groups = { food = 2, eatable = 4 },
groups = { food = 2, eatable = 4, compostability=65 },
_mcl_saturation = 2.4,
})

View File

@ -54,6 +54,137 @@ minetest.register_abm({
end,
})
--
-- Production of sparks from lava
--
local LAVA_SPARK_ABM_INTERVAL = 5
local lava_spark_limit = minetest.settings:get("mcl_core_lava_spark_limit")
if lava_spark_limit == nil then
lava_spark_limit = 10
else
lava_spark_limit = tonumber(lava_spark_limit)
end
local lava_spark_chance = 0
local lava_spark_abm_census = 0
local lava_spark_census = 0
function mcl_core.lava_spark_set_chance()
lava_spark_chance = lava_spark_limit / lava_spark_abm_census
minetest.after(LAVA_SPARK_ABM_INTERVAL, mcl_core.lava_spark_set_chance)
lava_spark_abm_census = 0
lava_spark_census = 0
end
if lava_spark_limit > 0 then
mcl_core.lava_spark_set_chance()
minetest.register_abm({
label = "Lava produce sparks",
nodenames = {"group:lava"},
neighbors = {"air"},
interval = LAVA_SPARK_ABM_INTERVAL,
chance = 18,
action = function(pos, node)
local above = minetest.get_node(vector.new(pos.x, pos.y + 1, pos.z))
if above.name ~= "air" then return end
lava_spark_abm_census = lava_spark_abm_census + 1
if lava_spark_census >= lava_spark_limit then return end
if math.random() > lava_spark_chance then return end
lava_spark_census = lava_spark_census + 1
minetest.after(math.random() * LAVA_SPARK_ABM_INTERVAL, mcl_core.lava_spark_add, pos)
end
})
end
function mcl_core.lava_spark_add(pos)
local node = minetest.get_node(pos)
if minetest.get_node_group(node.name, "lava") == 0 then return end
local above = minetest.get_node(vector.new(pos.x, pos.y + 1, pos.z))
if above.name ~= "air" then return end
local pos_addend = vector.new(
(math.random() - 0.5) * 0.8,
(math.random() - 0.5) * 0.8,
(math.random() - 0.5) * 0.8
)
local spark_pos = vector.add(pos, pos_addend)
local spark = minetest.add_entity(spark_pos, "mcl_core:lava_spark")
if not spark then return end
local velocity = vector.new(
(math.random() - 0.5) * 3,
(math.random() + 2) * 2,
(math.random() - 0.5) * 3
)
spark:set_velocity(velocity)
spark:set_acceleration(vector.new(0, -9, 0))
-- Set a random size
local size = 0.2 + math.random() * 0.2
local props = spark:get_properties()
if not props then return end
props.visual_size = vector.new(size, size, size)
spark:set_properties(props)
local luaentity = spark:get_luaentity()
if not luaentity then return end
luaentity._life_timer = 0.4 + math.random()
end
minetest.register_entity("mcl_core:lava_spark", {
physical = true,
visual = "sprite",
collide_with_objects = true,
textures = {"mcl_core_lava_spark.png"},
glow = 10,
static_save = false,
_smoke_timer = 0.1,
_life_timer = 1,
on_step = function(self, dtime)
if not self or not self.object then return end
self._life_timer = self._life_timer - dtime
if self._life_timer <= 0 then
self.object:remove()
return
end
self._smoke_timer = self._smoke_timer - dtime
if self._smoke_timer > 0 then return end
self._smoke_timer = 0.2 + math.random() * 0.3
local pos = self.object:get_pos()
-- Add smoke
minetest.add_particlespawner({
amount = 3,
time = 0.001,
minpos = pos,
maxpos = pos,
minvel = vector.new(-0.1, 1, -0.1),
maxvel = vector.new(0.1, 1.5, 0.1),
minexptime = 0.1,
maxexptime = 0.6,
minsize = 0.5,
maxsize = 1.5,
texture = "mcl_particles_smoke_anim.png",
animation = {
type = "vertical_frames",
aspect_w = 8,
aspect_h = 8,
}
})
end
})
--
-- Papyrus and cactus growing
--

View File

@ -92,6 +92,7 @@ Diorite=Diorite
Diorite is an igneous rock.=La diorite est une roche volcanique.
Dirt=Terre
Dirt acts as a soil for a few plants. When in light, this block may grow a grass or mycelium cover if such blocks are nearby.=La terre agit comme un sol pour quelques plantes. Lorsqu'il est à la lumière, ce bloc peut faire pousser une couverture d'herbe ou de mycélium si ces blocs sont à proximité.
Enchanted Golden Apple=Pomme Dorée Enchantée
Emerald=Emeraude
Emerald Ore=Minerai d'Emeraude
Emerald ore is the ore of emeralds. It is very rare and can be found alone, not in clusters.=Le minerai d'émeraude produit des émeraudes. Il est très rare et ne peut être trouvé que seul, pas en filons.
@ -154,6 +155,8 @@ Oak Wood Planks=Planches de Chêne
Oak leaves are grown from oak trees.=Les feuilles de chêne sont cultivées à partir de chênes.
Obsidian=Obsidienne
Obsidian is an extremely hard mineral with an enourmous blast-resistance. Obsidian is formed when water meets lava.=L'obsidienne est un minéral extrêmement dur avec une énorme résistance à l'explosion. L'obsidienne se forme lorsque l'eau rencontre la lave.
Crying Obsidian=Obsidienne Pleureuse
Crying obsidian is a luminous obsidian that can generate as part of ruined portals.=L'obsidienne pleureuse est de l'obsidienne lumineuse générée comme composant des portails en ruines.
One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava.=L'un des blocs les plus courants au monde, presque tout le sous-sol est en pierre. Il contient parfois des minerais. La pierre peut être créée lorsque l'eau rencontre la lave.
Orange Stained Glass=Verre Orange
Packed Ice=Glace Compactée
@ -202,20 +205,45 @@ Stained glass is a decorative and mostly transparent block which comes in variou
Stick=Bâton
Sticks are a very versatile crafting material; used in countless crafting recipes.=Les bâtons sont un matériau d'artisanat très polyvalent; utilisé dans d'innombrables recettes d'artisanat.
Stone=Roche
Stripped Acacia Log=Bois d'Acacia
Stripped Acacia Wood=Bois Ecorché d'Acacia
Stripped Birch Log=Bois de Bouleau
Stripped Birch Wood=Bois Ecorché de Bouleau
Stripped Dark Oak Log=Bois de Chêne Noir
Stripped Dark Oak Wood=Bois Ecorché de Chêne Noir
Stripped Jungle Log=Bois d'Acajou
Stripped Jungle Wood=Bois Ecorché d'Acajou
Stripped Oak Log=Bois de Chêne
Stripped Oak Wood=Bois Ecorché de Chêne
Stripped Spruce Log=Bois de Sapin
Stripped Spruce Wood=Bois Ecorché de Sapin
Stone Bricks=Pierre Taillée
Sugar=Sucre
Sugar Canes=Canne à Sucre
Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.=Les cannes à sucre sont une plante qui a certaines utilisations dans l'artisanat. Les cannes à sucre poussent lentement jusqu'à 3 blocs lorsqu'elles sont à côté de l'eau et sont placées sur un bloc d'herbe, de terre, de sable, de sable rouge, de podzol ou de terre stérile. Lorsqu'une canne à sucre est cassée, toutes les cannes à sucre connectées au-dessus se brisent également.
Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.=Les cannes à sucre ne peuvent être placées que sur d'autres cannes à sucre et sur des blocs sur lesquels elles poussent.
Sugar comes from sugar canes and is used to make sweet foods.=Le sucre provient des cannes à sucre et est utilisé pour fabriquer des aliments sucrés.
The stripped trunk of an acacia tree.=Le tronc écorché d'un acacia.
The stripped trunk of a birch tree.=Le tronc écorché d'un bouleau.
The stripped trunk of a dark oak tree.=Le tronc écorché d'un chêne noir.
The stripped trunk of a jungle tree.=Le tronc écorché d'un acajou.
The stripped trunk of an oak tree.=Le tronc écorché d'un chêne.
The stripped trunk of a spruce tree.=Le tronc écorché d'un sapin.
The trunk of a birch tree.=Le tronc d'un bouleau.
The trunk of a dark oak tree.=Le tronc d'un chêne noir.
The trunk of a jungle tree.=Le tronc d'un acajou.
The trunk of a spruce tree.=Le tronc d'un sapin.
The trunk of an acacia.=Le tronc d'un acacia
The trunk of an oak tree.=Le tronc d'un chêne.
The stripped wood of an acacia tree.=Les planches écorchée d'un acacia.
The stripped wood of a birch tree.=Les planches écorchée d'un bouleau.
The stripped wood of a dark oak tree.=Les planches écorchée d'un chêne noir.
The stripped wood of a jungle tree.=Les planches écorchée d'un acajou.
The stripped wood of an oak tree.=Les planches écorchée d'un chêne.
The stripped wood of a spruce tree.=Les planches écorchée d'un sapin.
This block consists of a couple of loose stones and can't support itself.=Ce bloc se compose de quelques pierres lâches et ne peut pas se soutenir.
This is a decorative block surrounded by the bark of a tree trunk.=Il s'agit d'un bloc décoratif entouré par l'écorce d'un tronc d'arbre.
This is a decorative block.=Il s'agit d'un bloc décoratif.
This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.=Ceci est un bloc de neige complet. La neige de cette épaisseur se trouve généralement dans les zones de froid extrême.
This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well.=Il s'agit d'un morceau de cactus que l'on trouve couramment dans les zones sèches, en particulier dans les déserts. Au fil du temps, les cactus pousseront jusqu'à 3 blocs de haut sur le sable ou le sable rouge. Un cactus blesse les êtres vivants qui le touchent avec des dégâts de 1 HP toutes les demi-secondes. Lorsqu'un bloc de cactus est brisé, tous les blocs de cactus connectés au-dessus se brisent également.
This stone contains pure gold, a rare metal.=Cette pierre contient de l'or pur, un métal rare.
@ -256,3 +284,7 @@ Slows down movement=Ralentit le mouvement
2×2 saplings @= large tree=2×2 pousses @= grand arbre
Grows on sand or dirt next to water=Pousse sur le sable ou la terre près de l'eau
Stackable=Empilable
Moss=Mousse
Moss Carpet=Tapis de Mousse
A moss block is a natural block that can be spread to some other blocks by using bone meal.=Un bloc de mousse est un bloc naturel qui peut se propager à d'autres blocs en utilisant de la farine d'os.
Moss Carpets are a thin decorative variant of the moss block.=Les tapis de mousse sont une fine variante décorative du bloc de mousse.

View File

@ -284,3 +284,7 @@ Slows down movement=
2×2 saplings @= large tree=
Grows on sand or dirt next to water=
Stackable=
Moss=
Moss Carpet=
A moss block is a natural block that can be spread to some other blocks by using bone meal.=
Moss Carpets are a thin decorative variant of the moss block.=

View File

@ -369,7 +369,7 @@ minetest.register_node("mcl_core:dirt_with_grass", {
color = "#8EB971",
is_ground_content = true,
stack_max = 64,
groups = {handy=1,shovely=1,dirt=2,grass_block=1, grass_block_no_snow=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1},
groups = {handy=1,shovely=1,dirt=2,grass_block=1, grass_block_no_snow=1, soil=1, soil_sapling=2, soil_sugarcane=1, cultivatable=2, spreading_dirt_type=1, enderman_takable=1, building_block=1, compostability=30},
drop = "mcl_core:dirt",
sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.1},
@ -473,7 +473,7 @@ minetest.register_node("mcl_core:moss", {
tiles = {"mcl_core_moss_block.png"},
is_ground_content = true,
stack_max = 64,
groups = {handy=1, hoey=1},
groups = {handy=1, hoey=1, compostability=65},
--sounds = TODO: add sound
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
@ -1096,7 +1096,7 @@ minetest.register_node("mcl_core:moss", {
tiles = {"mcl_core_moss_block.png"},
is_ground_content = true,
stack_max = 64,
groups = {handy=1, hoey=1},
groups = {handy=1, hoey=1, compostability=65},
--sounds = TODO: add sound
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,
@ -1153,7 +1153,7 @@ minetest.register_node("mcl_core:moss_carpet", {
{-8/16, -8/16, -8/16, 8/16, -7/16, 8/16},
},
},
groups = {handy=1, hoey=1},
groups = {handy=1, hoey=1, compostability=30},
--sounds = TODO: add sound
_mcl_blast_resistance = 0.1,
_mcl_hardness = 0.1,

View File

@ -12,7 +12,7 @@ minetest.register_node("mcl_core:cactus", {
tiles = {"mcl_core_cactus_top.png", "mcl_core_cactus_bottom.png", "mcl_core_cactus_side.png"},
is_ground_content = true,
stack_max = 64,
groups = {handy=1, attached_node=1, plant=1, deco_block=1, dig_by_piston=1, enderman_takable=1},
groups = {handy=1, attached_node=1, plant=1, deco_block=1, dig_by_piston=1, enderman_takable=1, compostability=50},
sounds = mcl_sounds.node_sound_wood_defaults(),
paramtype = "light",
sunlight_propagates = true,
@ -79,7 +79,7 @@ minetest.register_node("mcl_core:reeds", {
},
},
stack_max = 64,
groups = {dig_immediate=3, craftitem=1, deco_block=1, plant=1, non_mycelium_plant=1, dig_by_piston=1},
groups = {dig_immediate=3, craftitem=1, deco_block=1, plant=1, non_mycelium_plant=1, dig_by_piston=1, compostability=50},
sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "",
drop = "mcl_core:reeds", -- to prevent color inheritation

View File

@ -104,7 +104,7 @@ minetest.register_node("mcl_core:vine", {
type = "wallmounted",
},
stack_max = 64,
groups = {handy=1,axey=1,shearsy=1,swordy=1, flammable=2,deco_block=1,destroy_by_lava_flow=1,dig_by_piston=1, fire_encouragement=15, fire_flammability=100},
groups = {handy=1,axey=1,shearsy=1,swordy=1, flammable=2,deco_block=1,destroy_by_lava_flow=1,dig_by_piston=1, fire_encouragement=15, fire_flammability=100, compostability=50},
sounds = mcl_sounds.node_sound_leaves_defaults(),
drop = "",
_mcl_shears_drop = true,

View File

@ -162,7 +162,8 @@ local function register_leaves(subname, description, longdesc, tiles, sapling, d
deco_block=1,
dig_by_piston=1,
fire_encouragement=30,
fire_flammability=60
fire_flammability=60,
compostability=30
},
drop = get_drops(0),
_mcl_shears_drop = true,
@ -194,7 +195,7 @@ local function register_sapling(subname, description, longdesc, tt_help, texture
fixed = selbox
},
stack_max = 64,
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1},
groups = {dig_immediate=3, plant=1,sapling=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,dig_by_piston=1,destroy_by_lava_flow=1,deco_block=1, compostability=30},
sounds = mcl_sounds.node_sound_leaves_defaults(),
on_construct = function(pos)
local meta = minetest.get_meta(pos)
@ -275,4 +276,4 @@ register_leaves("birchleaves", S("Birch Leaves"), S("Birch leaves are grown from
-- Node aliases
minetest.register_alias("default:acacia_tree", "mcl_core:acaciatree")
minetest.register_alias("default:acacia_leaves", "mcl_core:acacialeaves")
minetest.register_alias("default:acacia_leaves", "mcl_core:acacialeaves")

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -78,7 +78,7 @@ dyelocal.dyes = {
{"dark_green", "dye_dark_green", S("Cactus Green"),{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}},
{"green", "mcl_dye_lime", S("Lime Dye"), {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}},
{"yellow", "dye_yellow", S("Dandelion Yellow"), {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}},
{"brown", "mcl_dye_brown", S("Cocoa Beans"), {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1}},
{"brown", "mcl_dye_brown", S("Cocoa Beans"), {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1, compostability=65}},
{"orange", "dye_orange", S("Orange Dye"), {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}},
{"red", "dye_red", S("Rose Red"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}},
{"magenta", "dye_magenta", S("Magenta Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 939 B

View File

@ -5,7 +5,7 @@ minetest.register_craftitem("mcl_farming:beetroot_seeds", {
_tt_help = S("Grows on farmland"),
_doc_items_longdesc = S("Grows into a beetroot plant. Chickens like beetroot seeds."),
_doc_items_usagehelp = S("Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds."),
groups = { craftitem=1 },
groups = { craftitem=1, compostability=30 },
inventory_image = "mcl_farming_beetroot_seeds.png",
wield_image = "mcl_farming_beetroot_seeds.png",
on_place = function(itemstack, placer, pointed_thing)
@ -133,7 +133,7 @@ minetest.register_craftitem("mcl_farming:beetroot_item", {
wield_image = "mcl_farming_beetroot.png",
on_place = minetest.item_eat(1),
on_secondary_use = minetest.item_eat(1),
groups = { food = 2, eatable = 1 },
groups = { food = 2, eatable = 1, compostability=65 },
_mcl_saturation = 1.2,
})

View File

@ -86,7 +86,7 @@ minetest.register_craftitem("mcl_farming:carrot_item", {
_doc_items_longdesc = S("Carrots can be eaten and planted. Pigs and rabbits like carrots."),
_doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."),
inventory_image = "farming_carrot.png",
groups = { food = 2, eatable = 3 },
groups = { food = 2, eatable = 3, compostability=65 },
_mcl_saturation = 3.6,
on_secondary_use = minetest.item_eat(3),
on_place = function(itemstack, placer, pointed_thing)

View File

@ -7,7 +7,7 @@ minetest.register_craftitem("mcl_farming:melon_seeds", {
_doc_items_longdesc = S("Grows into a melon stem which in turn grows melons. Chickens like melon seeds."),
_doc_items_usagehelp = S("Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melon stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem will attempt to grow a melon at the side. Rightclick an animal to feed it melon seeds."),
stack_max = 64,
groups = { craftitem=1 },
groups = { craftitem=1, compostability=30 },
inventory_image = "mcl_farming_melon_seeds.png",
on_place = function(itemstack, placer, pointed_thing)
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:melontige_1")
@ -21,7 +21,7 @@ local melon_base_def = {
_doc_items_longdesc = S("A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices."),
stack_max = 64,
tiles = {"farming_melon_top.png", "farming_melon_top.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png", "farming_melon_side.png"},
groups = {handy=1,axey=1, plant=1,building_block=1,enderman_takable=1,dig_by_piston=1},
groups = {handy=1,axey=1, plant=1,building_block=1,enderman_takable=1,dig_by_piston=1, compostability=65},
drop = {
max_items = 1,
items = {
@ -134,7 +134,7 @@ minetest.register_craftitem("mcl_farming:melon_item", {
inventory_image = "farming_melon.png",
on_place = minetest.item_eat(2),
on_secondary_use = minetest.item_eat(2),
groups = { food = 2, eatable = 2 },
groups = { food = 2, eatable = 2, compostability=50 },
_mcl_saturation = 1.2,
})

View File

@ -91,7 +91,7 @@ minetest.register_craftitem("mcl_farming:potato_item", {
_doc_items_longdesc = S("Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes."),
_doc_items_usagehelp = S("Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it."),
inventory_image = "farming_potato.png",
groups = { food = 2, eatable = 1 },
groups = { food = 2, eatable = 1, compostability=65 },
_mcl_saturation = 0.6,
stack_max = 64,
on_secondary_use = minetest.item_eat(1),
@ -112,7 +112,7 @@ minetest.register_craftitem("mcl_farming:potato_item_baked", {
inventory_image = "farming_potato_baked.png",
on_place = minetest.item_eat(5),
on_secondary_use = minetest.item_eat(5),
groups = { food = 2, eatable = 5 },
groups = { food = 2, eatable = 5, compostability = 85 },
_mcl_saturation = 6.0,
})

View File

@ -15,7 +15,7 @@ minetest.register_craftitem("mcl_farming:pumpkin_seeds", {
_doc_items_usagehelp = S("Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkin stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem attempts to grow a pumpkin next to it. Rightclick an animal to feed it pumpkin seeds."),
stack_max = 64,
inventory_image = "mcl_farming_pumpkin_seeds.png",
groups = { craftitem=1 },
groups = { craftitem=1, compostability=30 },
on_place = function(itemstack, placer, pointed_thing)
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:pumpkin_1")
end
@ -99,7 +99,7 @@ local pumpkin_base_def = {
stack_max = 64,
paramtype2 = "facedir",
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png"},
groups = {handy=1,axey=1, plant=1,building_block=1, dig_by_piston=1, enderman_takable=1},
groups = {handy=1,axey=1, plant=1,building_block=1, dig_by_piston=1, enderman_takable=1, compostability=65},
sounds = mcl_sounds.node_sound_wood_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 1,
@ -192,7 +192,7 @@ minetest.register_node("mcl_farming:pumpkin_face_light", {
paramtype2 = "facedir",
light_source = minetest.LIGHT_MAX,
tiles = {"farming_pumpkin_top.png", "farming_pumpkin_top.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_side.png", "farming_pumpkin_face_light.png"},
groups = {handy=1,axey=1, building_block=1, dig_by_piston=1 },
groups = {handy=1,axey=1, building_block=1, dig_by_piston=1, compostability=65 },
sounds = mcl_sounds.node_sound_wood_defaults(),
on_construct = function(pos)
-- Attempt to spawn iron golem or snow golem
@ -230,7 +230,7 @@ minetest.register_craftitem("mcl_farming:pumpkin_pie", {
wield_image = "mcl_farming_pumpkin_pie.png",
on_place = minetest.item_eat(8),
on_secondary_use = minetest.item_eat(8),
groups = { food = 2, eatable = 8 },
groups = { food = 2, eatable = 8, compostability=100 },
_mcl_saturation = 4.8,
})

View File

@ -31,7 +31,7 @@ minetest.register_craftitem("mcl_farming:sweet_berry", {
inventory_image = "mcl_farming_sweet_berry.png",
_mcl_saturation = 0.2,
stack_max = 64,
groups = { food = 2, eatable = 1 },
groups = { food = 2, eatable = 1, compostability=30 },
on_secondary_use = minetest.item_eat(1),
on_place = function(itemstack, placer, pointed_thing)
local new = mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_sweet_berry:sweet_berry_bush_0")

View File

@ -9,7 +9,7 @@ minetest.register_craftitem("mcl_farming:wheat_seeds", {
Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant.
They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds.
]]),
groups = { craftitem=1 },
groups = { craftitem=1, compostability=30 },
inventory_image = "mcl_farming_wheat_seeds.png",
on_place = function(itemstack, placer, pointed_thing)
return mcl_farming:place_seed(itemstack, placer, pointed_thing, "mcl_farming:wheat_1")
@ -104,7 +104,7 @@ minetest.register_craftitem("mcl_farming:wheat_item", {
_doc_items_longdesc = S("Wheat is used in crafting. Some animals like wheat."),
_doc_items_usagehelp = S("Use the “Place” key on an animal to try to feed it wheat."),
inventory_image = "farming_wheat_harvested.png",
groups = { craftitem = 1 },
groups = { craftitem = 1, compostability=65 },
})
minetest.register_craft({
@ -125,7 +125,7 @@ minetest.register_craftitem("mcl_farming:cookie", {
description = S("Cookie"),
_doc_items_longdesc = S("This is a food item which can be eaten."),
inventory_image = "farming_cookie.png",
groups = {food=2, eatable=2},
groups = {food=2, eatable=2, compostability=85},
_mcl_saturation = 0.4,
on_place = minetest.item_eat(2),
on_secondary_use = minetest.item_eat(2),
@ -136,7 +136,7 @@ minetest.register_craftitem("mcl_farming:bread", {
description = S("Bread"),
_doc_items_longdesc = S("This is a food item which can be eaten."),
inventory_image = "farming_bread.png",
groups = {food=2, eatable=5},
groups = {food=2, eatable=5, compostability=85},
_mcl_saturation = 6.0,
on_place = minetest.item_eat(5),
on_secondary_use = minetest.item_eat(5),
@ -156,8 +156,7 @@ minetest.register_node("mcl_farming:hay_block", {
stack_max = 64,
paramtype2 = "facedir",
on_place = mcl_util.rotate_axis,
groups = {handy=1, hoey=1, flammable=2, fire_encouragement=60,
fire_flammability=20, building_block=1, fall_damage_add_percent=-80},
groups = {handy=1, hoey=1, compostability=85, flammable=2, fire_encouragement=60, fire_flammability=20, building_block=1, fall_damage_add_percent=-80},
sounds = mcl_sounds.node_sound_leaves_defaults(),
on_rotate = on_rotate,
_mcl_blast_resistance = 0.5,

View File

@ -385,7 +385,7 @@ minetest.register_tool("mcl_fishing:fishing_rod", {
_doc_items_usagehelp = S("Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?"),
groups = { tool=1, fishing_rod=1, enchantability=1 },
inventory_image = "mcl_fishing_fishing_rod.png",
wield_image = "mcl_fishing_fishing_rod.png^[transformR270",
wield_image = "mcl_fishing_fishing_rod.png^[transformFY^[transformR90",
wield_scale = { x = 1.5, y = 1.5, z = 1 },
stack_max = 1,
on_place = fish,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@ -80,7 +80,7 @@ function mcl_flowers.register_simple_flower(name, def)
walkable = false,
stack_max = 64,
drop = def.drop,
groups = {dig_immediate=3,flammable=2,fire_encouragement=60,fire_flammability=100,plant=1,flower=1,place_flowerlike=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1},
groups = {dig_immediate=3,flammable=2,fire_encouragement=60,fire_flammability=100,plant=1,flower=1,place_flowerlike=1,non_mycelium_plant=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1, compostability=65},
sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "",
on_place = on_place_flower,
@ -143,7 +143,7 @@ local def_tallgrass = {
walkable = false,
buildable_to = true,
is_ground_content = true,
groups = {handy=1,shearsy=1, flammable=3,fire_encouragement=60,fire_flammability=100,attached_node=1,plant=1,place_flowerlike=2,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1},
groups = {handy=1,shearsy=1, flammable=3,fire_encouragement=60,fire_flammability=100,attached_node=1,plant=1,place_flowerlike=2,non_mycelium_plant=1,dig_by_water=1,destroy_by_lava_flow=1,deco_block=1, compostability=30},
sounds = mcl_sounds.node_sound_leaves_defaults(),
drop = wheat_seed_drop,
_mcl_shears_drop = true,
@ -163,6 +163,7 @@ def_fern._doc_items_longdesc = S("Ferns are small plants which occur naturally i
def_fern.tiles = { "mcl_flowers_fern.png" }
def_fern.inventory_image = "mcl_flowers_fern_inv.png"
def_fern.wield_image = "mcl_flowers_fern_inv.png"
def_fern.groups.compostability=65
def_fern.selection_box = {
type = "fixed",
fixed = { -6/16, -0.5, -6/16, 6/16, 5/16, 6/16 },
@ -205,6 +206,13 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
bottom_groups.not_in_creative_inventory = 1
create_entry = false
end
-- some special cases for the composter group
if name == "double_fern" or "peony" or "rose_bush" or "lilac" or "sunflower" then
bottom_groups.compostability = 65
end
if name == "double_grass" then
bottom_groups.compostability = 50
end
-- Drop itself by default
local drop_bottom, drop_top
if not drop then
@ -410,7 +418,7 @@ minetest.register_node("mcl_flowers:waterlily", {
liquids_pointable = true,
walkable = true,
sunlight_propagates = true,
groups = {dig_immediate = 3, plant=1, dig_by_water = 1,destroy_by_lava_flow=1, dig_by_piston = 1, deco_block=1, dig_by_boat=1},
groups = {dig_immediate = 3, plant=1, dig_by_water = 1,destroy_by_lava_flow=1, dig_by_piston = 1, deco_block=1, dig_by_boat=1, compostability=65},
sounds = mcl_sounds.node_sound_leaves_defaults(),
node_placement_prediction = "",
node_box = {

View File

@ -7,3 +7,7 @@ Burning Furnace=Four Allumé
Recipe book=Livre de Recette
Inventory=Inventaire
Uses fuel to smelt or cook items=Utilise du carburant pour fondre ou cuire des articles
Blast Furnace=Haut Fourneau
Blast Furnaces cook or smelt several items, using a furnace fuel, into something else, but faster than a normal furnace.=Un haut fourneau peut cuire ou fondre plusieurs objets, en quelque chose d'autre, en utilisant du carburant, plus vite qu'un four normal.
Smoker=Fumoir
Smokers cook or smelt several items, using a furnace fuel, into something else, but faster than a normal furnace.=Le Fumoir peut cuire ou fondre plusieurs objets, en quelque chose d'autre, en utilisant du carburant, plus vite qu'un four normal.

View File

@ -7,3 +7,7 @@ Burning Furnace=
Recipe book=
Inventory=
Uses fuel to smelt or cook items=
Blast Furnace=
Blast Furnaces cook or smelt several items, using a furnace fuel, into something else, but faster than a normal furnace.=
Smoker=
Smokers cook or smelt several items, using a furnace fuel, into something else, but faster than a normal furnace.=

View File

@ -1,5 +1,5 @@
local S = minetest.get_translator("mcl_lanterns")
local modpath = minetest.get_modpath("mcl_lanterns")
local S = minetest.get_translator(minetest.get_current_modname())
local modpath = minetest.get_modpath(minetest.get_current_modname())
mcl_lanterns = {}

View File

@ -0,0 +1,6 @@
# textdomain: mcl_lanterns
Chain=Chaine
Chains are metallic decoration blocks.=Les chaines sont des blocs de décoration métalliques.
Lantern=Lanterne
Lanterns are light sources which can be placed on the top or the bottom of most blocks.=Les lanternes sont des sources de lumières qui peuvent être placées au sommet ou en-dessous de la plupart des blocs.
Soul Lantern=Lanterne des âmes

View File

@ -0,0 +1,6 @@
# textdomain: mcl_lanterns
Chain=
Chains are metallic decoration blocks.=
Lantern=
Lanterns are light sources which can be placed on the top or the bottom of most blocks.=
Soul Lantern=

View File

@ -1,4 +1,4 @@
local S = minetest.get_translator("mcl_lanterns")
local S = minetest.get_translator(minetest.get_current_modname())
mcl_lanterns.register_lantern("lantern", {
description = S("Lantern"),

View File

@ -321,7 +321,7 @@ minetest.register_tool("mcl_mobitems:carrot_on_a_stick", {
_tt_help = S("Lets you ride a saddled pig"),
_doc_items_longdesc = S("A carrot on a stick can be used on saddled pigs to ride them."),
_doc_items_usagehelp = S("Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick."),
wield_image = "mcl_mobitems_carrot_on_a_stick.png",
wield_image = "mcl_mobitems_carrot_on_a_stick.png^[transformFY^[transformR90",
inventory_image = "mcl_mobitems_carrot_on_a_stick.png",
groups = { transport = 1 },
_mcl_toollike_wield = true,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 536 B

After

Width:  |  Height:  |  Size: 6.2 KiB

File diff suppressed because it is too large Load Diff

View File

@ -3,7 +3,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
local vector = vector
local template = {
groups = {handy=1,axey=1, building_block = 1, material_wood = 1, flammable = -1 },
groups = {handy=1,axey=1, building_block = 1, material_wood = 1, flammable = -1, compostability=85 },
sounds = mcl_sounds.node_sound_wood_defaults(),
is_ground_content = true,
_mcl_blast_resistance = 0.2,
@ -51,6 +51,7 @@ local function register_mushroom(color, species_id, template, d_cap, d_stem, d_s
stem_full.tiles = { "mcl_mushrooms_mushroom_block_skin_stem.png" }
stem_full.groups.huge_mushroom = species_id
stem_full.groups.huge_mushroom_stem = 2
stem_full.groups.compostability=65
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem_full", stem_full)
-- Stem
@ -60,6 +61,7 @@ local function register_mushroom(color, species_id, template, d_cap, d_stem, d_s
stem.tiles = { "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_inside.png", "mcl_mushrooms_mushroom_block_skin_stem.png" }
stem.groups.huge_mushroom = species_id
stem.groups.huge_mushroom_stem = 1
stem.groups.compostability=65
minetest.register_node("mcl_mushrooms:"..color.."_mushroom_block_stem", stem)
-- Mushroom block (cap)

View File

@ -38,7 +38,7 @@ minetest.register_node("mcl_mushrooms:mushroom_brown", {
sunlight_propagates = true,
paramtype = "light",
walkable = false,
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1},
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1, compostability=65},
sounds = mcl_sounds.node_sound_leaves_defaults(),
light_source = 1,
selection_box = {
@ -62,7 +62,7 @@ minetest.register_node("mcl_mushrooms:mushroom_red", {
sunlight_propagates = true,
paramtype = "light",
walkable = false,
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1},
groups = {dig_immediate=3,mushroom=1,attached_node=1,dig_by_water=1,destroy_by_lava_flow=1,dig_by_piston=1,enderman_takable=1,deco_block=1, compostability=65},
sounds = mcl_sounds.node_sound_leaves_defaults(),
selection_box = {
type = "fixed",

View File

@ -0,0 +1,3 @@
Mod mcl_nether : basic nether blocs, forked from Mineclone 2
Texture of mcl_nether_netheritebloc.png from PixelPerfection Legacy by XSSheep edited by Nova_Wostra (CC-BY-SA 4.0)

View File

@ -77,8 +77,7 @@ minetest.register_node("mcl_nether:netheriteblock", {
sounds = mcl_sounds.node_sound_stone_defaults(),
_mcl_blast_resistance = 1200,
_mcl_hardness = 50,
_mcl_silk_touch_drop = true,
_mcl_fortune_drop = mcl_core.fortune_drop_ore
_mcl_silk_touch_drop = true
})
-- For eternal fire on top of netherrack and magma blocks
@ -202,7 +201,7 @@ minetest.register_node("mcl_nether:nether_wart_block", {
stack_max = 64,
tiles = {"mcl_nether_nether_wart_block.png"},
is_ground_content = false,
groups = {handy=1, hoey=1, building_block=1},
groups = {handy=1, hoey=1, building_block=1, compostability=85},
sounds = mcl_sounds.node_sound_leaves_defaults(
{
footstep={name="default_dirt_footstep", gain=0.7},

View File

@ -150,7 +150,7 @@ minetest.register_craftitem("mcl_nether:nether_wart_item", {
end
end
end,
groups = { craftitem = 1, brewitem=1 },
groups = { craftitem = 1, brewitem=1, compostability=30 },
})
local names = {"mcl_nether:nether_wart_0", "mcl_nether:nether_wart_1", "mcl_nether:nether_wart_2"}

Some files were not shown because too many files have changed in this diff Show More