1
0
Fork 0

Compare commits

..

2 Commits

Author SHA1 Message Date
SmokeyDope f990504e24 Add optimized theme.ogg 2023-09-06 01:54:01 +00:00
SmokeyDope 821405be98 delete unoptimized theme.ogg 2023-09-06 01:52:59 +00:00
214 changed files with 509 additions and 1971 deletions

View File

@ -178,7 +178,6 @@
* Faerraven / Michieal
* Nicu
* Exhale
* Aeonix_Aeon
* Wbjitscool
* SmokeyDope

View File

@ -42,10 +42,6 @@ The glazed terracotta textures have been created by [MysticTempest](https://gith
Source: <https://www.planetminecraft.com/texture_pack/131pixel-perfection/>
License: [CC BY-SA 4.0](http://creativecommons.org/licenses/by-sa/4.0/)
Armor trim models were created by Aeonix_Aeon
Source: <https://www.curseforge.com/minecraft/texture-packs/ozocraft-remix>
License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
The main menu images are released under: [CC0](https://creativecommons.org/publicdomain/zero/1.0/)
All other files, unless mentioned otherwise, fall under:

View File

@ -27,7 +27,7 @@ Or you can play in “creative mode” in which you can build almost anything in
## How to play (quick start)
### Getting started
* **Punch a tree** trunk until it breaks and collect wood
* Place the **wood into the 2×2 grid** (your “crafting grid” in your inventory menu) and craft 4 wood planks
* Place the **wood into the 2×2 grid** (your “crafting grid” in your inventory menu and craft 4 wood planks
* Place the 4 wood planks in a 2×2 shape in the crafting grid to **make a crafting table**
* **Rightclick the crafting table** for a 3×3 crafting grid to craft more complex things
* Use the **crafting guide** (book icon) to learn all the possible crafting recipes
@ -37,15 +37,15 @@ Or you can play in “creative mode” in which you can build almost anything in
### Farming
* Find seeds
* Craft a hoe
* Rightclick dirt or a similar block with a hoe to create farmland
* Craft hoe
* Rightclick dirt or similar block with hoe to create farmland
* Place seeds on farmland and watch them grow
* Collect plants when fully grown
* Collect plant when fully grown
* If near water, farmland becomes wet and speeds up growth
### Furnace
* Craft a furnace
* The furnace allows you to obtain more items
* Craft furnace
* Furnace allows you to obtain more items
* Upper slot must contain a smeltable item (example: iron ore)
* Lower slot must contain a fuel item (example: coal)
* See tooltips in crafting guide to learn about fuels and smeltable items
@ -162,7 +162,7 @@ Bonus features (not found in Minecraft):
* Built-in crafting guide which shows you crafting and smelting recipes
* In-game help system containing extensive help about gameplay basics, blocks, items and more
* Temporary crafting recipes. They only exist to make some otherwise unaccessible items available when you're not in creative mode. These recipes will be removed as development goes on an more features become available
* Saplings in chests in [mapgen v6](https://wiki.minetest.net/Map_generator#v6)
* Saplings in chests in mapgen v6
* Fully moddable (thanks to Minetest's powerful Lua API)
* New blocks and items:
* Lookup tool, shows you the help for whatever it touches

View File

@ -137,7 +137,7 @@ Fonctionnalités bonus (absentes de Minecraft) :
* Guide d'artisanat intégré au jeu qui montre les recettes d'artisanat et de cuisson
* Système d'aide intégré au jeu contenant des informations à propos des techniques de base, blocs, objets et plus
* Recettes d'artisanat temporaires. Elles existent uniquement pour rendre des objets accessibles qui ne le seraient pas autrement sauf en mode créatif. Elles seront retirées au cours de l'avancement du développement et de l'ajout de nouvelles fonctionnalités.
* Pousses dans les coffres en [mapgen v6](https://wiki.minetest.net/Map_generator#v6)
* Pousses dans les coffres en mapgen v6
* Entièrement moddable (grâce la puissante API Lua de Minetest)
* Nouveaux blocs et objets :
* Outil de recherche, montre l'aide de ce qu'il touche

View File

@ -154,12 +154,12 @@ Mineclone2, то ветка master обычно относительно ста
* Некоторые вагонетки (с сундуком и с воронкой уже работают)
* Пара нетривиальных блоков и предметов
Бонусные возможности (нет в Minecraft-е):
Бонусные воронкой (нет в Minecraft-е):
* Встроенный гайд для крафта покажет вам рецепты крафта и переплавки
* Внутриигровая справка содержит всестороннюю информацию об основах игры, блоках, предметах и прочее
* Временные рецепты крафта. Они существуют, чтобы получить доступ к ранее недоступным предметам вне творческого режима. Они будут удалены как только разработка позволит им стать доступными
* Саженцы в сундуках в [mapgen v6](https://wiki.minetest.net/Map_generator#v6)
* Саженцы в сундуках мапгена v6
* Полностью модифицируема (благодаря мощному Lua API в Minetest)
* Новые блоки и предметы:
* Инструмент просмотра покажет справку о том чего коснется
@ -177,7 +177,7 @@ Mineclone2, то ветка master обычно относительно ста
* Недостающие блоки, предметы, мобы
* Некоторые предметы с другими названиями, чтобы лучше их различать
* Другая музыка для проигрывателей
* Другие текстуры (Pixel Perfection)
* Другие текступы (Pixel Perfection)
* Другие звуки (разные источники)
* Другой движок (Minetest)
* Другие пасхалки

Binary file not shown.

View File

@ -11,4 +11,4 @@ For example, Copper Blocks have the definition arguement of `_mcl_waxed_variant
For waxed nodes, scraping is easy. Start by putting `waxed = 1` into the list of groups of the waxed node.
Next put `_mcl_stripped_variant = item string of the unwaxed variant of the node` into the defintion table.
Waxed Copper Blocks can be scrapped into normal Copper Blocks because of the definition `_mcl_stripped_variant = "mcl_copper:block"`.
Wxaed Copper Blocks can be scrapped into normal Copper Blocks because of the definition `_mcl_stripped_variant = "mcl_copper:block"`.

View File

@ -74,18 +74,6 @@ function mcl_util.check_dtime_timer(self, dtime, timer_name, threshold)
return false
end
-- While we should always favour the new minetest vector functions such as vector.new or vector.offset which validate on
-- creation. There may be cases where state gets corrupted and we may have to check the vector is valid if created the
-- old way. This allows us to do this as a tactical solution until old style vectors are completely removed.
function mcl_util.validate_vector (vect)
if vect then
if tonumber(vect.x) and tonumber(vect.y) and tonumber(vect.z) then
return true
end
end
return false
end
-- Minetest 5.3.0 or less can only measure the light level. This came in at 5.4
-- This function has been known to fail in multiple places so the error handling is added increase safety and improve
-- debugging. See:
@ -624,7 +612,7 @@ function mcl_util.deal_damage(target, damage, mcl_reason)
end
return
end
elseif not target:is_player() then return end
end
local is_immortal = target:get_armor_groups().immortal or 0
if is_immortal>0 then

View File

@ -62,13 +62,8 @@ end
local function set_double_attach(boat)
boat._driver:set_attach(boat.object, "",
{x = 0, y = 0.42, z = 0.8}, {x = 0, y = 0, z = 0})
if boat._passenger:is_player() then
boat._passenger:set_attach(boat.object, "",
{x = 0, y = 0.42, z = -6.2}, {x = 0, y = 0, z = 0})
else
boat._passenger:set_attach(boat.object, "",
{x = 0, y = 0.42, z = -4.5}, {x = 0, y = 270, z = 0})
end
boat._passenger:set_attach(boat.object, "",
{x = 0, y = 0.42, z = -2.2}, {x = 0, y = 0, z = 0})
end
local function set_choat_attach(boat)
boat._driver:set_attach(boat.object, "",
@ -160,7 +155,7 @@ local boat = {
minetest.register_on_respawnplayer(detach_object)
function boat.on_rightclick(self, clicker)
if self._passenger or not clicker or clicker:get_attach() or (self.name == "mcl_boats:chest_boat" and self._driver) then
if self._passenger or not clicker or clicker:get_attach() then
return
end
attach_object(self, clicker)

View File

@ -12,7 +12,6 @@ Water vehicle=Véhicule aquatique
Sneak to dismount=Se baisser pour descendre
Obsidian Boat=Bateau en obsidienne
Mangrove Boat=Bateau en palétuvier
Cherry Boat=Bateau en cerisier
Oak Chest Boat=Bateau en chêne avec coffre
Spruce Chest Boat=Bateau en sapin avec coffre
Birch Chest Boat=Bateau en bouleau avec coffre
@ -20,4 +19,3 @@ Jungle Chest Boat=Bateau en acajou avec coffre
Acacia Chest Boat=Bateau en acacia avec coffre
Dark Oak Chest Boat=Bateau en chêne noir avec coffre
Mangrove Chest Boat=Bateau en palétuvier avec coffre
Cherry Chest Boat=Bateau en cerisier avec coffre

View File

@ -21,7 +21,7 @@ mcl_dripping.register_drop({
-- The group the liquid's nodes belong to
liquid = "water",
-- The texture used (particles will take a random 2x2 area of it)
texture = "mcl_core_water_source_animation.png",
texture = "default_water_source_animated.png",
-- Define particle glow, ranges from `0` to `minetest.LIGHT_MAX`
light = 1,
-- The nodes (or node group) the particles will spawn under

View File

@ -82,7 +82,7 @@ end
mcl_dripping.register_drop({
liquid = "water",
texture = "mcl_core_water_source_animation.png",
texture = "default_water_source_animated.png",
light = 1,
nodes = { "group:opaque", "group:leaves" },
sound = "drippingwater_drip",
@ -92,7 +92,7 @@ mcl_dripping.register_drop({
mcl_dripping.register_drop({
liquid = "lava",
texture = "mcl_core_lava_source_animation.png",
texture = "default_lava_source_animated.png",
light = math.max(7, minetest.registered_nodes["mcl_core:lava_source"].light_source - 3),
nodes = { "group:opaque" },
sound = "drippingwater_lavadrip",

View File

@ -21,8 +21,6 @@ local function atan(x)
end
end
mcl_mobs.effect_functions = {}
-- check if daytime and also if mob is docile during daylight hours
function mob_class:day_docile()
@ -384,8 +382,7 @@ function mob_class:monster_attack()
-- find specific mob to attack, failing that attack player/npc/animal
if specific_attack(self.specific_attack, name)
and (type == "player" or ( type == "npc" and self.attack_npcs )
or (type == "animal" and self.attack_animals == true)
or (self.extra_hostile and not self.attack_exception(player))) then
or (type == "animal" and self.attack_animals == true)) then
p = player:get_pos()
sp = s
@ -1106,11 +1103,6 @@ function mob_class:do_states_attack (dtime)
full_punch_interval = 1.0,
damage_groups = {fleshy = self.damage}
}, nil)
if self.dealt_effect then
mcl_mobs.effect_functions[self.dealt_effect.name](
self.attack, self.dealt_effect.factor, self.dealt_effect.dur
)
end
end
else
self.custom_attack(self, p)
@ -1217,9 +1209,6 @@ function mob_class:do_states_attack (dtime)
end
end
end
elseif self.attack_type == "custom" and self.attack_state then
self.attack_state(self, dtime)
else
end

View File

@ -1,7 +1,5 @@
local math, tonumber, vector, minetest, mcl_mobs = math, tonumber, vector, minetest, mcl_mobs
local mob_class = mcl_mobs.mob_class
local validate_vector = mcl_util.validate_vector
local active_particlespawners = {}
local disable_blood = minetest.settings:get_bool("mobs_disable_blood")
local DEFAULT_FALL_SPEED = -9.81*1.5
@ -11,6 +9,16 @@ local PATHFINDING = "gowp"
local player_transfer_distance = tonumber(minetest.settings:get("player_transfer_distance")) or 128
if player_transfer_distance == 0 then player_transfer_distance = math.huge end
local function validate_vector (vect)
if vect then
if tonumber(vect.x) and tonumber(vect.y) and tonumber(vect.z) then
return true
end
end
return false
end
-- custom particle effects
function mcl_mobs.effect(pos, amount, texture, min_size, max_size, radius, gravity, glow, go_down)
@ -410,7 +418,7 @@ function mob_class:check_head_swivel(dtime)
--final_rotation = vector.new(0,0,0)
end
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horizontal_head_height), final_rotation)
mcl_util.set_bone_position(self.object,self.head_swivel, vector.new(0,self.bone_eye_height,self.horrizonatal_head_height), final_rotation)
end

View File

@ -147,7 +147,7 @@ function mcl_mobs.register_mob(name, def)
head_eye_height = def.head_eye_height or def.bone_eye_height or 0, -- how hight aproximatly the mobs head is fromm the ground to tell the mob how high to look up at the player
curiosity = def.curiosity or 1, -- how often mob will look at player on idle
head_yaw = def.head_yaw or "y", -- axis to rotate head on
horizontal_head_height = def.horizontal_head_height or 0,
horrizonatal_head_height = def.horrizonatal_head_height or 0,
wears_armor = def.wears_armor, -- a number value used to index texture slot for armor
stepheight = def.stepheight or 0.6,
name = name,
@ -287,7 +287,6 @@ function mcl_mobs.register_mob(name, def)
spawn_in_group_min = def.spawn_in_group_min,
noyaw = def.noyaw or false,
particlespawners = def.particlespawners,
spawn_check = def.spawn_check,
-- End of MCL2 extensions
on_spawn = def.on_spawn,
on_blast = def.on_blast or function(self,damage)
@ -298,7 +297,6 @@ function mcl_mobs.register_mob(name, def)
return false, true, {}
end,
do_punch = def.do_punch,
deal_damage = def.deal_damage,
on_breed = def.on_breed,
on_grown = def.on_grown,
on_pick_up = def.on_pick_up,
@ -313,15 +311,8 @@ function mcl_mobs.register_mob(name, def)
return self:mob_activate(staticdata, def, dtime)
end,
attack_state = def.attack_state,
harmed_by_heal = def.harmed_by_heal,
is_boss = def.is_boss,
dealt_effect = def.dealt_effect,
on_lightning_strike = def.on_lightning_strike,
extra_hostile = def.extra_hostile,
attack_exception = def.attack_exception or function(p) return false end,
_spawner = def._spawner,
on_lightning_strike = def.on_lightning_strike
}
minetest.register_entity(name, setmetatable(final_def,mcl_mobs.mob_class_meta))
@ -352,10 +343,9 @@ function mcl_mobs.register_arrow(name, def)
collisionbox = {0, 0, 0, 0, 0, 0}, -- remove box around arrows
timer = 0,
switch = 0,
_lifetime = def._lifetime or 150,
owner_id = def.owner_id,
rotate = def.rotate,
on_punch = def.on_punch or function(self)
on_punch = function(self)
local vel = self.object:get_velocity()
self.object:set_velocity({x=vel.x * -1, y=vel.y * -1, z=vel.z * -1})
end,
@ -372,7 +362,7 @@ function mcl_mobs.register_arrow(name, def)
local pos = self.object:get_pos()
if self.switch == 0
or self.timer > self._lifetime
or self.timer > 150
or not within_limits(pos, 0) then
mcl_burning.extinguish(self.object)
self.object:remove();

View File

@ -1,6 +1,5 @@
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
local mob_class = mcl_mobs.mob_class
local validate_vector = mcl_util.validate_vector
local ENTITY_CRAMMING_MAX = 24
local CRAMMING_DAMAGE = 3
@ -356,7 +355,7 @@ function mob_class:set_yaw(yaw, delay, dtime)
if math.abs(target_shortest_path_nums) > 10 then
self.object:set_yaw(self.object:get_yaw()+(target_shortest_path*(3.6*ddtime)))
if validate_vector(self.acc) then
if self.acc then
self.acc=vector.rotate_around_axis(self.acc,vector.new(0,1,0), target_shortest_path*(3.6*ddtime))
end
end
@ -682,9 +681,6 @@ function mob_class:do_env_damage()
-- don't fall when on ignore, just stand still
if self.standing_in == "ignore" then
self.object:set_velocity({x = 0, y = 0, z = 0})
-- wither rose effect
elseif self.standing_in == "mcl_flowers:wither_rose" then
mcl_potions.withering_func(self.object, 1, 2)
end
local nodef = minetest.registered_nodes[self.standing_in]

View File

@ -2,13 +2,6 @@
local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs
local mob_class = mcl_mobs.mob_class
local modern_lighting = minetest.settings:get_bool("mcl_mobs_modern_lighting", true)
local nether_threshold = tonumber(minetest.settings:get("mcl_mobs_nether_threshold")) or 11
local end_threshold = tonumber(minetest.settings:get("mcl_mobs_end_threshold")) or 0
local overworld_threshold = tonumber(minetest.settings:get("mcl_mobs_overworld_threshold")) or 0
local overworld_sky_threshold = tonumber(minetest.settings:get("mcl_mobs_overworld_sky_threshold")) or 7
local overworld_passive_threshold = tonumber(minetest.settings:get("mcl_mobs_overworld_passive_threshold")) or 7
local get_node = minetest.get_node
local get_item_group = minetest.get_item_group
local get_node_light = minetest.get_node_light
@ -716,6 +709,9 @@ local function spawn_check(pos, spawn_def)
and spawn_def.dimension == dimension
and biome_check(spawn_def.biomes, gotten_biome) then
--mcl_log("Level 1 spawn check passed")
--minetest.log("Mob: " .. mob_def.name)
if (is_ground or spawn_def.type_of_spawning ~= "ground")
and (spawn_def.type_of_spawning ~= "ground" or not is_leaf)
and (not is_farm_animal(spawn_def.name) or is_grass)
@ -725,42 +721,20 @@ local function spawn_check(pos, spawn_def)
and (spawn_def.check_position and spawn_def.check_position(pos) or spawn_def.check_position == nil)
and ( not spawn_protected or not minetest.is_protected(pos, "") ) then
--mcl_log("Level 2 spawn check passed")
local gotten_light = get_node_light(pos)
if modern_lighting then
local my_node = get_node(pos)
local sky_light = minetest.get_natural_light(pos)
local art_light = minetest.get_artificial_light(my_node.param1)
if dimension == "nether" then
if art_light <= nether_threshold then
return true
end
elseif dimension == "end" then
if art_light <= end_threshold then
return true
end
elseif dimension == "overworld" then
if mob_type == "monster" then
if mob_def.spawn_check then
return mob_def.spawn_check(pos, gotten_light, art_light, sky_light)
elseif art_light <= overworld_threshold and sky_light <= overworld_sky_threshold then
return true
end
else
if mob_def.spawn_check then
return mob_def.spawn_check(pos, gotten_light, art_light, sky_light)
elseif gotten_light > overworld_passive_threshold then
return true
end
end
end
if gotten_light >= spawn_def.min_light and gotten_light <= spawn_def.max_light then
--mcl_log("Level 3 spawn check passed")
return true
else
if gotten_light >= spawn_def.min_light and gotten_light <= spawn_def.max_light then
return true
end
--mcl_log("Spawn check level 3 failed")
end
else
--mcl_log("Spawn check level 2 failed")
end
else
--mcl_log("Spawn check level 1 failed")
end
return false
end

View File

@ -2,9 +2,6 @@ local dim = {"x", "z"}
local modpath = minetest.get_modpath(minetest.get_current_modname())
local anti_troll = minetest.settings:get_bool("wither_anti_troll_measures", false)
local peaceful = minetest.settings:get_bool("only_peaceful_mobs", false)
local function load_schem(filename)
local file = io.open(modpath .. "/schems/" .. filename, "r")
local data = minetest.deserialize(file:read())
@ -12,14 +9,6 @@ local function load_schem(filename)
return data
end
local wboss_overworld = 0
local wboss_nether = 0
local wboss_end = 0
local LIM_OVERWORLD = tonumber(minetest.settings:get("wither_cap_overworld")) or 3
local LIM_NETHER = tonumber(minetest.settings:get("wither_cap_nether")) or 10
local LIM_END = tonumber(minetest.settings:get("wither_cap_end")) or 5
local wither_spawn_schems = {}
for _, d in pairs(dim) do
@ -27,13 +16,8 @@ for _, d in pairs(dim) do
end
local function check_schem(pos, schem)
local cn_name
for _, n in pairs(schem) do
cn_name = minetest.get_node(vector.add(pos, n)).name
if string.find(cn_name, "mcl_heads:wither_skeleton") then
cn_name = "mcl_heads:wither_skeleton"
end
if cn_name ~= n.name then
if minetest.get_node(vector.add(pos, n)).name ~= n.name then
return false
end
end
@ -46,32 +30,14 @@ local function remove_schem(pos, schem)
end
end
local function check_limit(pos)
local dim = mcl_worlds.pos_to_dimension(pos)
if dim == "overworld" and wboss_overworld >= LIM_OVERWORLD then return false
elseif dim == "end" and wboss_end >= LIM_END then return false
elseif wboss_nether >= LIM_NETHER then return false
else return true end
end
local function wither_spawn(pos, player)
if peaceful then return end
local function wither_spawn(pos)
for _, d in pairs(dim) do
for i = 0, 2 do
local p = vector.add(pos, {x = 0, y = -2, z = 0, [d] = -i})
local schem = wither_spawn_schems[d]
if check_schem(p, schem) and (not anti_troll or check_limit(pos)) then
if check_schem(p, schem) then
remove_schem(p, schem)
local wither = minetest.add_entity(vector.add(p, {x = 0, y = 1, z = 0, [d] = 1}), "mobs_mc:wither")
if not wither then return end
local wither_ent = wither:get_luaentity()
wither_ent._spawner = player:get_player_name()
local dim = mcl_worlds.pos_to_dimension(pos)
if dim == "overworld" then
wboss_overworld = wboss_overworld + 1
elseif dim == "end" then
wboss_end = wboss_end + 1
else wboss_nether = wboss_nether + 1 end
minetest.add_entity(vector.add(p, {x = 0, y = 1, z = 0, [d] = 1}), "mobs_mc:wither")
local objects = minetest.get_objects_inside_radius(pos, 20)
for _, players in ipairs(objects) do
if players:is_player() then
@ -88,19 +54,7 @@ local old_on_place = wither_head.on_place
function wither_head.on_place(itemstack, placer, pointed)
local n = minetest.get_node(vector.offset(pointed.above,0,-1,0))
if n and n.name == "mcl_nether:soul_sand" then
minetest.after(0, wither_spawn, pointed.above, placer)
minetest.after(0, wither_spawn, pointed.above)
end
return old_on_place(itemstack, placer, pointed)
end
if anti_troll then
-- pull wither counts per dimension
minetest.register_globalstep(function(dtime)
wboss_overworld = mobs_mc.wither_count_overworld
wboss_nether = mobs_mc.wither_count_nether
wboss_end = mobs_mc.wither_count_end
mobs_mc.wither_count_overworld = 0
mobs_mc.wither_count_nether = 0
mobs_mc.wither_count_end = 0
end)
end

View File

@ -13,7 +13,7 @@ local axolotl = {
head_swivel = "head.control",
bone_eye_height = -1,
head_eye_height = -0.5,
horizontal_head_height = 0,
horrizonatal_head_height = 0,
curiosity = 10,
head_yaw="z",
@ -78,6 +78,7 @@ local axolotl = {
attack_animals = true,
specific_attack = {
"extra_mobs_cod",
"mobs_mc:sheep",
"extra_mobs_glow_squid",
"extra_mobs_salmon",
"extra_mobs_tropical_fish",

View File

@ -2,18 +2,6 @@
local S = minetest.get_translator("mobs_mc")
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
local date = os.date("*t")
local maxlight
if (date.month == 10 and date.day >= 20) or (date.month == 11 and date.day <= 3) then
maxlight = 6
else
maxlight = 3
end
return artificial_light <= maxlight
end
mcl_mobs.register_mob("mobs_mc:bat", {
description = S("Bat"),
type = "animal",
@ -62,7 +50,6 @@ mcl_mobs.register_mob("mobs_mc:bat", {
jump = false,
fly = true,
makes_footstep_sound = false,
spawn_check = spawn_check,
})

View File

@ -11,9 +11,6 @@ local mod_target = minetest.get_modpath("mcl_target")
--################### BLAZE
--###################
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
return artificial_light <= 11
end
mcl_mobs.register_mob("mobs_mc:blaze", {
description = S("Blaze"),
@ -140,7 +137,6 @@ mcl_mobs.register_mob("mobs_mc:blaze", {
},
})
end,
spawn_check = spawn_check,
})
mcl_mobs:spawn_specific(

View File

@ -23,7 +23,7 @@ mcl_mobs.register_mob("mobs_mc:chicken", {
head_swivel = "head.control",
bone_eye_height = 4,
head_eye_height = 1.5,
horizontal_head_height = -.3,
horrizonatal_head_height = -.3,
curiosity = 10,
head_yaw="z",
visual_size = {x=1,y=1},

View File

@ -24,7 +24,7 @@ local cow_def = {
head_swivel = "head.control",
bone_eye_height = 10,
head_eye_height = 1.1,
horizontal_head_height=-1.8,
horrizonatal_head_height=-1.8,
curiosity = 2,
head_yaw="z",
makes_footstep_sound = true,

View File

@ -50,7 +50,7 @@ mcl_mobs.register_mob("mobs_mc:creeper", {
explosion_strength = 3,
explosion_radius = 3.5,
explosion_damage_radius = 3.5,
explosiontimer_reset_radius = 3,
explosiontimer_reset_radius = 6,
reach = 3,
explosion_timer = 1.5,
allow_fuse_reset = true,
@ -172,7 +172,7 @@ mcl_mobs.register_mob("mobs_mc:creeper_charged", {
explosion_strength = 6,
explosion_radius = 8,
explosion_damage_radius = 8,
explosiontimer_reset_radius = 3,
explosiontimer_reset_radius = 6,
reach = 3,
explosion_timer = 1.5,
allow_fuse_reset = true,

View File

@ -136,7 +136,6 @@ mcl_mobs.register_mob("mobs_mc:enderdragon", {
end
end,
fire_resistant = true,
is_boss = true,
})

View File

@ -4,14 +4,12 @@
--License for code WTFPL and otherwise stated in readmes
local S = minetest.get_translator("mobs_mc")
local allow_nav_hacks = minetest.settings:get_bool("mcl_mob_allow_nav_hacks ",false)
--###################
--################### IRON GOLEM
--###################
local walk_dist = 40
local tele_dist = 80
local etime = 0
mcl_mobs.register_mob("mobs_mc:iron_golem", {
description = S("Iron Golem"),
@ -87,23 +85,11 @@ mcl_mobs.register_mob("mobs_mc:iron_golem", {
punch_start = 40, punch_end = 50,
},
jump = true,
do_custom = function(self, dtime)
self.home_timer = (self.home_timer or 0) + dtime
if self.home_timer > 10 then
self.home_timer = 0
if self._home and self.state ~= "attack" then
local dist = vector.distance(self._home,self.object:get_pos())
if allow_nav_hacks and dist >= tele_dist then
self.object:set_pos(self._home)
self.state = "stand"
self.order = "follow"
elseif dist >= walk_dist then
self:gopath(self._home, function(self)
self.state = "stand"
self.order = "follow"
end)
end
on_step = function(self,dtime)
etime = etime + dtime
if etime > 10 then
if self._home and vector.distance(self._home,self.object:get_pos()) > 50 then
self:gopath(self._home)
end
end
end,

View File

@ -62,7 +62,7 @@ mcl_mobs.register_mob("mobs_mc:llama", {
head_swivel = "head.control",
bone_eye_height = 11,
head_eye_height = 3,
horizontal_head_height=0,
horrizonatal_head_height=0,
curiosity = 60,
head_yaw = "z",

View File

@ -21,7 +21,6 @@ Mule=Mule
Iron Golem=Golem de fer
Llama=Lama
Ocelot=Ocelot
Cat=Chat
Parrot=Perroquet
Pig=Cochon
Polar Bear=Ours blanc
@ -49,15 +48,8 @@ Witch=Sorcière
Wither=Wither
Wolf=Loup
Husk=Zombie Momifié
Baby Husk=Bébé Zombie Momifié
Zombie=Zombie
Baby Zombie=Bébé Zombie
Piglin=Piglin
Baby Piglin=Bébé Piglin
Zombie Piglin=Piglin Zombie
Baby Zombie Piglin=Bébé Piglin Zombie
Sword Piglin=Piglin avec une épée
Piglin Brute=Piglin Barbare
Zombie Piglin=Zombie Cochon
Farmer=Fermier
Fisherman=Pêcheur
Fletcher=Archer
@ -77,7 +69,5 @@ Dolphin=Dauphin
Pillager=Pilleur
Tropical fish=Poisson tropical
Hoglin=Hoglin
Baby hoglin=Bébé Hoglin
Zoglin=Zoglin
Strider=Arpenteur
Glow Squid=Poulpe Brillant

View File

@ -2,4 +2,4 @@ name = mobs_mc
author = maikerumine
description = Adds Minecraft-like monsters and animals.
depends = mcl_init, mcl_particles, mcl_mobs, mcl_wip, mcl_core, mcl_util
optional_depends = default, mcl_tnt, mcl_bows, mcl_throwing, mcl_fishing, bones, mesecons_materials, doc_items, mcl_worlds
optional_depends = default, mcl_tnt, mcl_bows, mcl_throwing, mcl_fishing, bones, mesecons_materials, doc_items

View File

@ -39,7 +39,7 @@ local ocelot = {
head_swivel = "head.control",
bone_eye_height = 6.2,
head_eye_height = 0.4,
horizontal_head_height=-0,
horrizonatal_head_height=-0,
head_yaw="z",
curiosity = 4,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.69, 0.3},

View File

@ -137,7 +137,7 @@ mcl_mobs.register_mob("mobs_mc:parrot", {
xp_max = 3,
head_swivel = "head.control",
bone_eye_height = 1.1,
horizontal_head_height=0,
horrizonatal_head_height=0,
curiosity = 10,
collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.89, 0.25},
visual = "mesh",

View File

@ -22,7 +22,7 @@ mcl_mobs.register_mob("mobs_mc:pig", {
head_swivel = "head.control",
bone_eye_height = 7.5,
head_eye_height = 0.8,
horizontal_head_height=-1,
horrizonatal_head_height=-1,
curiosity = 3,
head_yaw="z",
makes_footstep_sound = true,

View File

@ -219,10 +219,6 @@ mcl_mobs.register_mob("mobs_mc:sword_piglin", sword_piglin)
-- Zombified Piglin --
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
return artificial_light <= 11
end
local zombified_piglin = {
description = S("Zombie Piglin"),
-- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked
@ -260,7 +256,6 @@ local zombified_piglin = {
},
jump = true,
makes_footstep_sound = true,
spawn_check = spawn_check,
walk_velocity = .8,
run_velocity = 2.6,
pathfinding = 1,

View File

@ -27,7 +27,7 @@ mcl_mobs.register_mob("mobs_mc:polar_bear", {
head_swivel = "head.control",
bone_eye_height = 2.6,
head_eye_height = 1,
horizontal_head_height = 0,
horrizonatal_head_height = 0,
curiosity = 20,
head_yaw="z",
visual_size = {x=3.0, y=3.0},

View File

@ -18,7 +18,7 @@ local rabbit = {
head_swivel = "head.control",
bone_eye_height = 2,
head_eye_height = 0.5,
horizontal_head_height = -.3,
horrizonatal_head_height = -.3,
curiosity = 20,
head_yaw="z",
visual = "mesh",

View File

@ -67,7 +67,7 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
head_swivel = "head.control",
bone_eye_height = 3.3,
head_eye_height = 1.1,
horizontal_head_height=-.7,
horrizonatal_head_height=-.7,
curiosity = 6,
head_yaw="z",
visual = "mesh",

View File

@ -4,10 +4,6 @@
local S = minetest.get_translator("mobs_mc")
local function spawn_check(pos, environmental_light, artificial_light, sky_light)
return artificial_light <= 11
end
mcl_mobs.register_mob("mobs_mc:silverfish", {
description = S("Silverfish"),
type = "monster",
@ -57,7 +53,6 @@ mcl_mobs.register_mob("mobs_mc:silverfish", {
view_range = 16,
attack_type = "dogfight",
damage = 1,
spawn_check = spawn_check,
})
mcl_mobs.register_egg("mobs_mc:silverfish", S("Silverfish"), "#6d6d6d", "#313131", 0)

View File

@ -96,11 +96,6 @@ mcl_mobs.register_mob("mobs_mc:witherskeleton", {
fear_height = 4,
harmed_by_heal = true,
fire_resistant = true,
dealt_effect = {
name = "withering",
factor = 1,
dur = 10,
},
})
--spawn

View File

@ -161,18 +161,6 @@ local spawn_children_on_die = function(child_mob, spawn_distance, eject_speed)
end
end
local swamp_light_max = 7
local function slime_spawn_check(pos, environmental_light, artificial_light, sky_light)
local maxlight = swamp_light_max
if is_slime_chunk(pos) then
maxlight = minetest.LIGHT_MAX + 1
end
return artificial_light <= maxlight
end
-- Slime
local slime_big = {
description = S("Slime"),
@ -225,7 +213,6 @@ local slime_big = {
spawn_small_alternative = "mobs_mc:slime_small",
on_die = spawn_children_on_die("mobs_mc:slime_small", 1.0, 1.5),
use_texture_alpha = true,
spawn_check = slime_spawn_check,
}
mcl_mobs.register_mob("mobs_mc:slime_big", slime_big)
@ -310,6 +297,7 @@ local cave_min = mcl_vars.mg_overworld_min
local cave_max = water_level - 23
local swampy_biomes = {"Swampland", "MangroveSwamp"}
local swamp_light_max = 7
local swamp_min = water_level
local swamp_max = water_level + 27

View File

@ -114,7 +114,9 @@ mcl_mobs.register_mob("mobs_mc:spider", spider)
local cave_spider = table.copy(spider)
cave_spider.description = S("Cave Spider")
cave_spider.textures = { {"mobs_mc_cave_spider.png^(mobs_mc_spider_eyes.png^[makealpha:0,0,0)"} }
cave_spider.damage = 2
-- TODO: Poison damage
-- TODO: Revert damage to 2
cave_spider.damage = 3 -- damage increased to undo non-existing poison
cave_spider.hp_min = 1
cave_spider.hp_max = 12
cave_spider.collisionbox = {-0.35, -0.01, -0.35, 0.35, 0.46, 0.35}
@ -136,11 +138,6 @@ cave_spider.walk_velocity = 1.3
cave_spider.run_velocity = 3.2
cave_spider.sounds = table.copy(spider.sounds)
cave_spider.sounds.base_pitch = 1.25
cave_spider.dealt_effect = {
name = "poison",
factor = 2.5,
dur = 7,
}
mcl_mobs.register_mob("mobs_mc:cave_spider", cave_spider)

View File

@ -70,11 +70,6 @@ mcl_mobs.register_mob("mobs_mc:witch", {
},
view_range = 16,
fear_height = 4,
deal_damage = function(self, damage, mcl_reason)
local factor = 1
if mcl_reason.type == "magic" then factor = 0.15 end
self.health = self.health - factor*damage
end,
})
-- potion projectile (EXPERIMENTAL)

View File

@ -1,72 +1,14 @@
--MCmobs v0.4
--maikerumine
--updated by Herowl
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local S = minetest.get_translator("mobs_mc")
local mobs_griefing = minetest.settings:get_bool("mobs_griefing", true)
local follow_spawner = minetest.settings:get_bool("wither_follow_spawner", false)
local w_strafes = minetest.settings:get_bool("wither_strafes", true)
local anti_troll = minetest.settings:get_bool("wither_anti_troll_measures", false)
local WITHER_INIT_BOOM = 7
local WITHER_MELEE_COOLDOWN = 3
local function atan(x)
if not x or x ~= x then
return 0
else
return math.atan(x)
end
end
--###################
--################### WITHER
--###################
local function wither_unstuck(self)
local pos = self.object:get_pos()
if mobs_griefing then -- destroy blocks very nearby (basically, colliding with)
local col = self.collisionbox
local pos1 = vector.offset(pos, col[1], col[2], col[3])
local pos2 = vector.offset(pos, col[4], col[5], col[6])
for z = pos1.z, pos2.z do for y = pos1.y, pos2.y do for x = pos1.x, pos2.x do
local npos = vector.new(x,y,z)
local name = minetest.get_node(npos).name
if name ~= "air" then
local ndef = minetest.registered_nodes[name]
if ndef and ndef._mcl_hardness and ndef._mcl_hardness >= 0 then
local drops = minetest.get_node_drops(name, "")
if minetest.dig_node(npos) then
for _, item in ipairs(drops) do
if type(item) ~= "string" then
item = item:get_name() .. item:get_count()
end
minetest.add_item(npos, item)
end
end
end
end
end end end
end
mcl_mobs.mob_class.safe_boom(self, pos, 2)
end
local function get_dim_relative_y(pos)
if (pos.y >= mcl_vars.mg_realm_barrier_overworld_end_max) then
return pos.y
elseif (pos.y <= mcl_vars.mg_nether_max + 200) then
return (pos.y - mcl_vars.mg_nether_min - 20)
else
return (pos.y - mcl_vars.mg_end_min - 50)
end
end
mobs_mc.wither_count_overworld = 0
mobs_mc.wither_count_nether = 0
mobs_mc.wither_count_end = 0
mcl_mobs.register_mob("mobs_mc:wither", {
description = S("Wither"),
type = "monster",
@ -84,11 +26,11 @@ mcl_mobs.register_mob("mobs_mc:wither", {
{"mobs_mc_wither.png"},
},
visual_size = {x=4, y=4},
view_range = 50,
makes_footstep_sound = true,
view_range = 16,
fear_height = 4,
walk_velocity = 2,
run_velocity = 4,
strafes = w_strafes,
sounds = {
shoot_attack = "mobs_mc_ender_dragon_shoot",
attack = "mobs_mc_ender_dragon_attack",
@ -99,8 +41,9 @@ mcl_mobs.register_mob("mobs_mc:wither", {
jump_height = 10,
fly = true,
makes_footstep_sound = false,
dogshoot_switch = 1, -- unused
dogshoot_count_max = 1, -- unused
dogshoot_switch = 1,
dogshoot_count_max = 1,
attack_animals = true,
can_despawn = false,
drops = {
{name = "mcl_mobitems:nether_star",
@ -110,13 +53,13 @@ mcl_mobs.register_mob("mobs_mc:wither", {
},
lava_damage = 0,
fire_damage = 0,
attack_type = "custom",
attack_type = "dogshoot",
explosion_strength = 8,
dogshoot_stop = true,
arrow = "mobs_mc:wither_skull",
reach = 5,
shoot_interval = 1,
shoot_offset = -0.5,
shoot_interval = 0.5,
shoot_offset = -1,
animation = {
walk_speed = 12, run_speed = 12, stand_speed = 12,
stand_start = 0, stand_end = 20,
@ -124,377 +67,57 @@ mcl_mobs.register_mob("mobs_mc:wither", {
run_start = 0, run_end = 20,
},
harmed_by_heal = true,
is_boss = true,
extra_hostile = true,
attack_exception = function(p)
local ent = p:get_luaentity()
if p:is_player() then return false end
if not ent or not ent.is_mob or ent.harmed_by_heal or string.find(ent.name, "ghast") then return true
else return false end
end,
do_custom = function(self, dtime)
if self._spawning then
-- "loading" bar while spawning
if not self._spw_max then self._spw_max = self._spawning end
self._spawning = self._spawning - dtime
local bardef = {
color = "dark_purple",
text = "Wither spawning",
percentage = math.floor((self._spw_max - self._spawning) / self._spw_max * 100),
}
local pos = self.object:get_pos()
for _, player in pairs(minetest.get_connected_players()) do
local d = vector.distance(pos, player:get_pos())
if d <= 80 then
mcl_bossbars.add_bar(player, bardef, true, d)
end
end
-- turn around and flash while spawning
self.object:set_yaw(self._spawning*10)
local factor = math.floor((math.sin(self._spawning*10)+1.5) * 85)
local str = minetest.colorspec_to_colorstring({r=factor, g=factor, b=factor})
self.object:set_texture_mod("^[brighten^[multiply:"..str)
-- when fully spawned, explode
if self._spawning <= 0 then
if mobs_griefing and not minetest.is_protected(pos, "") then
mcl_explosions.explode(pos, WITHER_INIT_BOOM, { drop_chance = 1.0 }, self.object)
else
mcl_mobs.mob_class.safe_boom(self, pos, WITHER_INIT_BOOM)
end
self.object:set_texture_mod("")
self._spawning = nil
self._spw_max = nil
else
return false
end
end
-- passive regeneration
self._custom_timer = self._custom_timer + dtime
if self._custom_timer > 1 then
self.health = math.min(self.health + 1, self.hp_max)
self._custom_timer = self._custom_timer - 1
end
-- anti-troll measures
if anti_troll then
if self._spawner then
local spawner = minetest.get_player_by_name(self._spawner)
if follow_spawner and spawner then
self._death_timer = 0
local pos = self.object:get_pos()
local spw = spawner:get_pos()
local dist = vector.distance(pos, spw)
if dist > 60 then -- teleport to the player who spawned the wither
local R = 10
pos.x = spw.x + math.random(-R, R)
pos.y = spw.y + math.random(-R, R)
pos.z = spw.z + math.random(-R, R)
self.object:set_pos(pos)
end
else -- despawn automatically after set time
-- HP changes impact timer: taking damage sets it back
self._death_timer = self._death_timer + self.health - self._health_old
if self.health == self._health_old then self._death_timer = self._death_timer + dtime end
if self._death_timer > 100 then
self.object:remove()
return false
end
self._health_old = self.health
end
end
-- count withers per dimension
local dim = mcl_worlds.pos_to_dimension(self.object:get_pos())
if dim == "overworld" then mobs_mc.wither_count_overworld = mobs_mc.wither_count_overworld + 1
elseif dim == "nether" then mobs_mc.wither_count_nether = mobs_mc.wither_count_nether + 1
elseif dim == "end" then mobs_mc.wither_count_end = mobs_mc.wither_count_end + 1 end
end
-- update things dependent on HP
local rand_factor
do_custom = function(self)
if self.health < (self.hp_max / 2) then
self.base_texture = "mobs_mc_wither_half_health.png"
self.fly = false
self._arrow_resistant = true
rand_factor = 3
else
self.base_texture = "mobs_mc_wither.png"
self.fly = true
self._arrow_resistant = false
rand_factor = 10
self.object:set_properties({textures={self.base_texture}})
self.armor = {undead = 80, fleshy = 80}
end
if not self.attack then
local y = get_dim_relative_y(self.object:get_pos())
if y > 0 then
self.fly = false
else
self.fly = true
local vel = self.object:get_velocity()
self.object:set_velocity(vector.new(vel.x, self.walk_velocity, vel.z))
end
end
self.object:set_properties({textures={self.base_texture}})
mcl_bossbars.update_boss(self.object, "Wither", "dark_purple")
if math.random(1, rand_factor) < 2 then
self.arrow = "mobs_mc:wither_skull_strong"
else
self.arrow = "mobs_mc:wither_skull"
end
end,
attack_state = function(self, dtime)
local s = self.object:get_pos()
local p = self.attack:get_pos() or s
p.y = p.y - .5
s.y = s.y + .5
local dist = vector.distance(p, s)
local vec = {
x = p.x - s.x,
y = p.y - s.y,
z = p.z - s.z
}
local yaw = (atan(vec.z / vec.x) +math.pi/ 2) - self.rotate
if p.x > s.x then yaw = yaw +math.pi end
yaw = self:set_yaw( yaw, 0, dtime)
local stay_away_from_player = vector.zero()
--strafe back and fourth
--stay away from player so as to shoot them
if dist < self.avoid_distance and self.shooter_avoid_enemy then
self:set_animation( "shoot")
stay_away_from_player=vector.multiply(vector.direction(p, s), 0.33)
end
if self.fly then
local vel = self.object:get_velocity()
local diff = s.y - p.y
local FLY_FACTOR = self.walk_velocity
if diff < 10 then
self.object:set_velocity({x=vel.x, y= FLY_FACTOR, z=vel.z})
elseif diff > 15 then
self.object:set_velocity({x=vel.x, y=-FLY_FACTOR, z=vel.z})
end
for i=1, 15 do
if minetest.get_node(vector.offset(s, 0, -i, 0)).name ~= "air" then
self.object:set_velocity({x=vel.x, y= FLY_FACTOR, z=vel.z})
break
elseif minetest.get_node(vector.offset(s, 0, i, 0)).name ~= "air" then
self.object:set_velocity({x=vel.x, y=-FLY_FACTOR/i, z=vel.z})
break
end
end
end
if self.strafes then
if not self.strafe_direction then
self.strafe_direction = 1.57
end
if math.random(40) == 1 then
self.strafe_direction = self.strafe_direction*-1
end
local dir = vector.rotate_around_axis(vector.direction(s, p), vector.new(0,1,0), self.strafe_direction)
local dir2 = vector.multiply(dir, 0.3 * self.walk_velocity)
if dir2 and stay_away_from_player then
self.acc = vector.add(dir2, stay_away_from_player)
end
else
self:set_velocity(0)
end
if dist > 30 then self.acc = vector.add(self.acc, vector.direction(s, p)*0.01) end
local side_cor = vector.new(0.7*math.cos(yaw), 0, 0.7*math.sin(yaw))
local m = self.object:get_pos() -- position of the middle head
local sr = self.object:get_pos() + side_cor -- position of side right head
local sl = self.object:get_pos() - side_cor -- position of side left head
-- height corrections
m.y = m.y + self.collisionbox[5]
sr.y = sr.y + self.collisionbox[5] - 0.3
sl.y = sl.y + self.collisionbox[5] - 0.3
local rand_pos = math.random(1,3)
if rand_pos == 1 then m = sr
elseif rand_pos == 2 then m = sl end
-- melee attack
if not self._melee_timer then
self._melee_timer = 0
end
if self._melee_timer < WITHER_MELEE_COOLDOWN then
self._melee_timer = self._melee_timer + dtime
else
self._melee_timer = 0
local pos = table.copy(s)
pos.y = pos.y + 2
local objs = minetest.get_objects_inside_radius(pos, self.reach)
local obj_pos, dist
local hit_some = false
for n = 1, #objs do
objs[n]:punch(objs[n], 1.0, {
full_punch_interval = 1.0,
damage_groups = {fleshy = 4},
}, pos)
local ent = objs[n]:get_luaentity()
if objs[n]:is_player() or (ent and ent ~= self and (not ent._shooter or ent._shooter ~= self)) then
mcl_util.deal_damage(objs[n], 8, {type = "magic"})
hit_some = true
end
mcl_mobs.effect_functions["withering"](objs[n], 0.5, 10)
end
if hit_some then
mcl_mobs.effect(pos, 32, "mcl_particles_soul_fire_flame.png", 5, 10, self.reach, 1, 0)
end
end
if dist < self.reach then
self.shoot_interval = 3
else
self.shoot_interval = 1
end
if self.shoot_interval
and self.timer > self.shoot_interval
and not minetest.raycast(vector.add(m, vector.new(0,self.shoot_offset,0)), vector.add(self.attack:get_pos(), vector.new(0,1.5,0)), false, false):next()
and math.random(1, 100) <= 60 then
self.timer = 0
self:set_animation( "shoot")
-- play shoot attack sound
self:mob_sound("shoot_attack")
-- Shoot arrow
if minetest.registered_entities[self.arrow] then
local arrow, ent
local v = 1
if not self.shoot_arrow then
self.firing = true
minetest.after(1, function()
self.firing = false
end)
arrow = minetest.add_entity(m, self.arrow)
ent = arrow:get_luaentity()
if ent.velocity then
v = ent.velocity
end
ent.switch = 1
ent.owner_id = tostring(self.object) -- add unique owner id to arrow
-- important for mcl_shields
ent._shooter = self.object
ent._saved_shooter_pos = self.object:get_pos()
end
local amount = (vec.x * vec.x + vec.y * vec.y + vec.z * vec.z) ^ 0.5
-- offset makes shoot aim accurate
vec.y = vec.y + self.shoot_offset
vec.x = vec.x * (v / amount)
vec.y = vec.y * (v / amount)
vec.z = vec.z * (v / amount)
if self.shoot_arrow then
vec = vector.normalize(vec)
self:shoot_arrow(m, vec)
else
arrow:set_velocity(vec)
end
end
end
end,
do_punch = function(self, hitter, tflp, tool_capabilities, dir)
if self._spawning or hitter == self.object then return false end
local ent = hitter:get_luaentity()
if ent and self._arrow_resistant and (string.find(ent.name, "arrow") or string.find(ent.name, "rocket")) then return false end
wither_unstuck(self)
return true
end,
deal_damage = function(self, damage, mcl_reason)
if self._spawning then return end
if self._arrow_resistant and mcl_reason.type == "magic" then return end
wither_unstuck(self)
self.health = self.health - damage
end,
on_spawn = function(self)
minetest.sound_play("mobs_mc_wither_spawn", {object=self.object, gain=1.0, max_hear_distance=64})
self._custom_timer = 0.0
self._death_timer = 0.0
self._health_old = self.hp_max
self._spawning = 10
return true
end,
})
local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false
local wither_rose_soil = { "group:grass_block", "mcl_core:dirt", "mcl_core:coarse_dirt", "mcl_nether:netherrack", "group:soul_block", "mcl_mud:mud", "mcl_moss:moss" }
local function spawn_wither_rose(obj)
local n = minetest.find_node_near(obj:get_pos(),2,wither_rose_soil)
if n then
local p = vector.offset(n,0,1,0)
if minetest.get_node(p).name == "air" then
if not ( mobs_griefing and minetest.place_node(p,{name="mcl_flowers:wither_rose"}) ) then
minetest.add_item(p,"mcl_flowers:wither_rose")
end
end
end
end
mcl_mobs.register_arrow("mobs_mc:wither_skull", {
visual = "cube",
visual_size = {x = 0.3, y = 0.3},
textures = {
"mobs_mc_wither_projectile.png^[verticalframe:6:0", -- top
"mobs_mc_wither_projectile.png^[verticalframe:6:1", -- bottom
"mobs_mc_wither_projectile.png^[verticalframe:6:2", -- left
"mobs_mc_wither_projectile.png^[verticalframe:6:3", -- right
"mobs_mc_wither_projectile.png^[verticalframe:6:4", -- back
"mobs_mc_wither_projectile.png^[verticalframe:6:5", -- front
},
velocity = 7,
rotate = 90,
_lifetime = 350,
on_punch = function(self) end,
visual = "sprite",
visual_size = {x = 0.75, y = 0.75},
-- TODO: 3D projectile, replace tetxture
textures = {"mobs_mc_TEMP_wither_projectile.png"},
velocity = 6,
-- direct hit
hit_player = function(self, player)
local pos = vector.new(self.object:get_pos())
mcl_mobs.effect_functions["withering"](player, 0.5, 10)
player:punch(self.object, 1.0, {
full_punch_interval = 0.5,
damage_groups = {fleshy = 8},
}, nil)
mcl_mobs.mob_class.boom(self, pos, 1)
if player:get_hp() <= 0 then
local shooter = self._shooter:get_luaentity()
if shooter then shooter.health = shooter.health + 5 end
spawn_wither_rose(player)
end
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1)
end,
hit_mob = function(self, mob)
local pos = vector.new(self.object:get_pos())
mcl_mobs.effect_functions["withering"](mob, 0.5, 10)
mob:punch(self.object, 1.0, {
full_punch_interval = 0.5,
damage_groups = {fleshy = 8},
}, nil)
mcl_mobs.mob_class.boom(self, pos, 1)
mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1)
local l = mob:get_luaentity()
if l and l.health - 8 <= 0 then
local shooter = self._shooter:get_luaentity()
if shooter then shooter.health = shooter.health + 5 end
spawn_wither_rose(mob)
local n = minetest.find_node_near(mob:get_pos(),2,wither_rose_soil)
if n then
local p = vector.offset(n,0,1,0)
if minetest.get_node(p).name == "air" then
if not ( mobs_griefing and minetest.place_node(p,{name="mcl_flowers:wither_rose"}) ) then
minetest.add_item(p,"mcl_flowers:wither_rose")
end
end
end
end
end,
@ -503,75 +126,10 @@ mcl_mobs.register_arrow("mobs_mc:wither_skull", {
mcl_mobs.mob_class.boom(self,pos, 1)
end
})
mcl_mobs.register_arrow("mobs_mc:wither_skull_strong", {
visual = "cube",
visual_size = {x = 0.35, y = 0.35},
textures = {
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:0", -- top
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:1", -- bottom
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:2", -- left
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:3", -- right
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:4", -- back
"mobs_mc_wither_projectile_strong.png^[verticalframe:6:5", -- front
},
velocity = 4,
rotate = 90,
_lifetime = 500,
on_punch = function(self) end,
-- direct hit
hit_player = function(self, player)
local pos = vector.new(self.object:get_pos())
mcl_mobs.effect_functions["withering"](player, 0.5, 10)
player:punch(self.object, 1.0, {
full_punch_interval = 0.5,
damage_groups = {fleshy = 12},
}, nil)
if mobs_griefing and not minetest.is_protected(pos, "") then
mcl_explosions.explode(pos, 1, { drop_chance = 1.0, max_blast_resistance = 0, }, self.object)
else
mcl_mobs.mob_class.safe_boom(self, pos, 1) --need to call it this way bc self is the "arrow" object here
end
if player:get_hp() <= 0 then
local shooter = self._shooter:get_luaentity()
if shooter then shooter.health = shooter.health + 5 end
spawn_wither_rose(player)
end
end,
hit_mob = function(self, mob)
local pos = vector.new(self.object:get_pos())
mcl_mobs.effect_functions["withering"](mob, 0.5, 10)
mob:punch(self.object, 1.0, {
full_punch_interval = 0.5,
damage_groups = {fleshy = 12},
}, nil)
if mobs_griefing and not minetest.is_protected(pos, "") then
mcl_explosions.explode(pos, 1, { drop_chance = 1.0, max_blast_resistance = 0, }, self.object)
else
mcl_mobs.mob_class.safe_boom(self, pos, 1) --need to call it this way bc self is the "arrow" object here
end
local l = mob:get_luaentity()
if l and l.health - 8 <= 0 then
local shooter = self._shooter:get_luaentity()
if shooter then shooter.health = shooter.health + 5 end
spawn_wither_rose(mob)
end
end,
-- node hit, explode
hit_node = function(self, pos, node)
if mobs_griefing and not minetest.is_protected(pos, "") then
mcl_explosions.explode(pos, 1, { drop_chance = 1.0, max_blast_resistance = 0, }, self.object)
else
mcl_mobs.mob_class.safe_boom(self, pos, 1) --need to call it this way bc self is the "arrow" object here
end
end
})
-- TODO: Add blue wither skull
--Spawn egg
mcl_mobs.register_egg("mobs_mc:wither", S("Wither"), "#4f4f4f", "#4f4f4f", 0, true)
mcl_wip.register_wip_item("mobs_mc:wither")
mcl_mobs:non_spawn_specific("mobs_mc:wither","overworld",0,minetest.LIGHT_MAX+1)

View File

@ -29,7 +29,7 @@ local wolf = {
head_swivel = "head.control",
bone_eye_height = 3.5,
head_eye_height = 1.1,
horizontal_head_height=0,
horrizonatal_head_height=0,
curiosity = 3,
head_yaw="z",
sounds = {

View File

@ -1,2 +0,0 @@
# textdomain: mcl_raids
Ominous Banner=Bannière de mauvais augure

View File

@ -774,7 +774,7 @@ local function search(data)
for i = 1, #data.items_raw do
local item = data.items_raw[i]
local def = reg_items[item]
local desc = string.lower(M.get_translated_string(data.lang_code, def.description))
local desc = lower(def.description)
local search_in = item .. desc
local to_add
@ -838,7 +838,6 @@ local function init_data(name)
iX = sfinv_only and 8 or DEFAULT_SIZE,
items = init_items,
items_raw = init_items,
lang_code = M.get_player_information(name).lang_code or 'en',
}
end

View File

@ -2,7 +2,6 @@
Water can flow into this block and cause it to drop as an item.=
This block can be turned into dirt with a hoe.=
This block can be turned into farmland with a hoe.=
This block can be turned into grass path with a shovel.=
This block acts as a soil for all saplings.=
This block acts as a soil for some saplings.=
Sugar canes will grow on this block.=

View File

@ -62,9 +62,3 @@ Advancement “@1” does not exist.=Le progrès «@1» n'existe pas.
Mine a block: @1=Miner un bloc : @1
Mine blocks: @1×@2=Miner des blocs : @1×@2
Awards are disabled, enable them first by using /awards enable!=Les récompenses sont désactivées, activez les d'abord en utilisant /awards enable !
Goal Completed:=Objectif atteint :
Goal Completed!=Objectif atteint !
Goal Completed: @1=Objectif atteint : @1
Challenge Completed:=Défi relevé :
Challenge Completed!=Défi relevé !
Challenge Completed: @1=Défi relevé : @1

21
mods/HUD/mcl_achievements/init.lua Executable file → Normal file
View File

@ -431,27 +431,6 @@ awards.register_achievement("mcl:wax_off", {
group = "Husbandry",
})
-- Triggered in mcl_smithing_table
awards.register_achievement("mcl:trim", {
title = S("Crafting a New Look"),
description = S("Craft a trimmed armor at a Smithing Table"),
icon = "dune_armor_trim_smithing_template.png",
type = "Advancement",
group = "Adventure",
})
awards.register_achievement("mcl:lots_of_trimming", {
title = S("Smithing with Style"),
description = S("Apply these smithing templates at least once: Spire, Snout, Rib, Ward, Silence, Vex, Tide, Wayfinder"),
icon = "silence_armor_trim_smithing_template.png",
type = "Advancement",
group = "Adventure",
on_unlock = function(name, awdef)
-- delete json that is no longer needed
minetest.get_player_by_name(name):get_meta():set_string("mcl_smithing_table:achievement_trims", "")
end,
})
-- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.)
if non_pc_achievements then

View File

@ -51,7 +51,3 @@ Bring Home the Beacon=Den Nachbarn heimleuchten
Use a beacon.=Benutzen Sie ein Leuchtfeuer.
Beaconator=Leuchtturmwärter
Use a fully powered beacon.=Benutzen Sie ein vollständiges Leuchtfeuer.
Crafting a New Look=Ein neues Aussehen
Craft a trimmed armor at a Smithing Table=Versieh ein Rüstungsteil an einem Schmiedetisch mit einem Rüstungsbesatz
Smithing with Style=Schmieden mit Stil
Apply these smithing templates at least once: Spire, Snout, Rib, Ward, Silence, Vex, Tide, Wayfinder=Wende jede dieser Schmiedevorlagen mindestens einmal an: Turmspitze, Schnauze, Rippe, Warthof, Stille, Plagegeist, Gezeiten und Wegfinder

View File

@ -111,7 +111,3 @@ Voluntary Exile=Exil volontaire
Kill a raid captain. Maybe consider staying away from the local villages for the time being...=Tuez un capitaine de pillards. Mieux vaut rester loin des villages pour l'instant...
Tactical Fishing=Pêche tactique
Catch a fish... without a fishing rod!=Attrapez un poisson... sans canne à pêche !
Crafting a New Look=Motif de Jalousie
Craft a trimmed armor at a Smithing Table=Fabriquez une pièce d'armure ornée sur la table de forge
Smithing with Style=La classe de la cuirasse
Apply these smithing templates at least once: Spire, Snout, Rib, Ward, Silence, Vex, Tide, Wayfinder=Appliquez ces modèles de forge au moins une fois : Tour, Groin, Côte, Abîme, Silence, Vex, Marée, Éclaireur

4
mods/HUD/mcl_achievements/locale/template.txt Executable file → Normal file
View File

@ -111,7 +111,3 @@ Voluntary Exile=
Kill a raid captain. Maybe consider staying away from the local villages for the time being...=
Tactical Fishing=
Catch a fish... without a fishing rod!=
Crafting a New Look=
Craft a trimmed armor at a Smithing Table=
Smithing with Style=
Apply these smithing templates at least once: Spire, Snout, Rib, Ward, Silence, Vex, Tide, Wayfinder=

View File

@ -5,15 +5,10 @@ Contributors=Contributeurs
Creator of MineClone=Créateur de MineClone
Creator of MineClone2=Créateur de MineClone2
Developers=Développeurs
Past Developers=Anciens Développeurs
Jump to speed up (additionally sprint)=Saut pour accélérer (peut être combiné avec sprint)
Maintainers=Mainteneurs
Previous Maintainers=Anciens Mainteneurs
MineClone5=MineClone5
Original Mod Authors=Auteurs des mods originaux
Sneak to skip=Shift pour passer
Textures=Textures
Translations=Traductions
Music=Musique
Funders=Fondateurs
Special thanks=Remerciements spéciaux

View File

@ -741,14 +741,12 @@ if minetest.is_creative_enabled("") then
for _, item in ipairs(drops) do
minetest.add_item(pos, item)
end
else
-- If there is a player
local inv = digger:get_inventory()
if inv then
for _, item in ipairs(drops) do
if not inv:contains_item("main", item, true) then
inv:add_item("main", item)
end
end
local inv = digger:get_inventory()
if inv then
for _, item in ipairs(drops) do
if not inv:contains_item("main", item, true) then
inv:add_item("main", item)
end
end
end

View File

@ -1,3 +1,2 @@
# textdomain: mcl_ver_info
Sorry, but your version of Minetest doesn't support the latest API. Please upgrade your minetest.=Désolé, mais votre version de Minetest ne supporte la dernière API. Veuillez mettre à jour minetest.
Display Mineclone 2 game version.=Affiche la version de Mineclone 2.

View File

@ -246,15 +246,6 @@ function mesecon.mergetable(source, dest)
return rval
end
--
function mesecon.join_table(t1, t2)
local rval = mesecon.tablecopy(t2)
for i, v in ipairs(t1) do
table.insert(rval, mesecon.tablecopy(v))
end
return rval
end
function mesecon.register_node(name, spec_common, spec_off, spec_on)
spec_common.drop = spec_common.drop or name .. "_off"
spec_common.on_blast = spec_common.on_blast or mesecon.on_blastnode

View File

@ -108,7 +108,7 @@ function mesecon.register_button(basename, description, texture, recipeitem, sou
if groups_off.material_wood ~= 0 then
longdesc = S("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.")
else
longdesc = S("A button is a redstone component which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.", button_timer)
longdesc = S("A button is a redstone compent which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.", button_timer)
end
end
@ -211,11 +211,6 @@ function mesecon.register_button(basename, description, texture, recipeitem, sou
output = "mesecons_button:button_"..basename.."_off",
recipe = {{ recipeitem }},
})
if minetest.get_modpath("mesecons_mvps") then
mesecon.register_mvps_unsticky("mesecons_button:button_"..basename.."_off")
mesecon.register_mvps_unsticky("mesecons_button:button_"..basename.."_on")
end
end
mesecon.register_button(

View File

@ -17,4 +17,3 @@ A wooden button is a redstone component made out of wood which can be pushed to
Provides redstone power when pushed=Fournit une puissance de redstone lorsqu'il est poussé
Push duration: @1s=Durée de poussée : @1s
Pushable by arrow=Poussable par une flèche
A button is a redstone component which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.=Un bouton est un composant redstone qui peut être poussé afin de fournir de la puissance redstone. Lorsqu'il est poussé, il fournit de la puissance redstone pendant @1 seconde.

View File

@ -17,4 +17,4 @@ A wooden button is a redstone component made out of wood which can be pushed to
Provides redstone power when pushed=Выдаёт сигнал редстоуна при нажатии
Push duration: @1s=Длительность нажатия: @1с
Pushable by arrow=Нажимается стрелами
A button is a redstone component which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.=Кнопка это компонент редстоуна, её можно нажать, чтобы получить сигнал редстоуна. При нажатии она включает соседние компоненты редстоуна на @1 с.
A button is a redstone compent which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.=Кнопка это компонент редстоуна, её можно нажать, чтобы получить сигнал редстоуна. При нажатии она включает соседние компоненты редстоуна на @1 с.

View File

@ -17,4 +17,4 @@ A wooden button is a redstone component made out of wood which can be pushed to
Provides redstone power when pushed=
Push duration: @1s=
Pushable by arrow=
A button is a redstone component which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.=
A button is a redstone compent which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for @1 seconds.=

View File

@ -117,7 +117,7 @@ local function is_available(pos)
return false, n
end
if minetest.registered_nodes[name] then
return minetest.registered_nodes[name].buildable_to or minetest.get_item_group(name, "dig_by_piston") == 1, n or false, n
return minetest.registered_nodes[name].buildable_to, n or false, n
end
return false, n
end
@ -126,7 +126,6 @@ end
function mesecon.mvps_get_stack(pos, dir, maximum, piston_pos)
-- determine the number of nodes to be pushed
local nodes = {}
local dig_nodes = {}
local frontiers = {pos}
while #frontiers > 0 do
@ -141,50 +140,47 @@ function mesecon.mvps_get_stack(pos, dir, maximum, piston_pos)
return
end
if minetest.get_item_group(nn.name, "dig_by_piston") == 1 then
-- if we want the node to drop, e.g. sugar cane, do not count towards push limit
table.insert(dig_nodes, {node = nn, pos = {x=np.x, y=np.y, z=np.z}})
else
if not node_replaceable(nn.name) then
table.insert(nodes, {node = nn, pos = {x=np.x, y=np.y, z=np.z}})
if #nodes > maximum then return nil, nil, false, true end
if not node_replaceable(nn.name) then
if #nodes >= maximum then return nil, false end
table.insert(nodes, {node = nn, pos = {x=np.x, y=np.y, z=np.z}})
-- add connected nodes to frontiers, connected is a vector list
-- the vectors must be absolute positions
local connected = {}
local has_loop
if minetest.registered_nodes[nn.name] and minetest.registered_nodes[nn.name].mvps_sticky then
connected, has_loop = minetest.registered_nodes[nn.name].mvps_sticky(np, nn, piston_pos)
if has_loop then
return {}, {}, true, false
-- add connected nodes to frontiers, connected is a vector list
-- the vectors must be absolute positions
local connected = {}
local has_loop
if minetest.registered_nodes[nn.name]
and minetest.registered_nodes[nn.name].mvps_sticky then
connected, has_loop = minetest.registered_nodes[nn.name].mvps_sticky(np, nn, piston_pos)
if has_loop then
return {}, true
end
end
table.insert(connected, vector.add(np, dir))
-- Make sure there are no duplicates in frontiers / nodes before
-- adding nodes in "connected" to frontiers
for _, cp in ipairs(connected) do
local duplicate = false
for _, rp in ipairs(nodes) do
if vector.equals(cp, rp.pos) then
duplicate = true
end
end
table.insert(connected, vector.add(np, dir))
-- Make sure there are no duplicates in frontiers / nodes before
-- adding nodes in "connected" to frontiers
for _, cp in ipairs(connected) do
local duplicate = false
for _, rp in ipairs(nodes) do
if vector.equals(cp, rp.pos) then
duplicate = true
end
end
for _, fp in ipairs(frontiers) do
if vector.equals(cp, fp) then
duplicate = true
end
end
if not duplicate and not mesecon.is_mvps_stopper(minetest.get_node(cp)) and minetest.get_item_group(nn.name, "dig_by_piston") == 0 then
table.insert(frontiers, cp)
for _, fp in ipairs(frontiers) do
if vector.equals(cp, fp) then
duplicate = true
end
end
if not duplicate and not mesecon.is_mvps_stopper(minetest.get_node(cp)) then
table.insert(frontiers, cp)
end
end
end
table.remove(frontiers, 1)
end
return nodes, dig_nodes, false, false
return nodes, false
end
function mesecon.mvps_set_owner(pos, placer)
@ -207,11 +203,6 @@ local function are_protected(nodes, player_name)
end
function mesecon.mvps_push(pos, dir, maximum, player_name, piston_pos)
-- check if the node in front of the piston is protected against player_name (to prevent replacing air)
if minetest.is_protected(pos, player_name) then
return false
end
return mesecon.mvps_push_or_pull(pos, dir, dir, maximum, player_name, piston_pos)
end
@ -231,9 +222,9 @@ end
-- movedir: direction of actual movement
-- maximum: maximum nodes to be pushed
function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, player_name, piston_pos)
local nodes, dig_nodes, has_loop, too_many = mesecon.mvps_get_stack(pos, movedir, maximum, piston_pos)
local nodes, has_loop = mesecon.mvps_get_stack(pos, movedir, maximum, piston_pos)
if has_loop or too_many then
if has_loop then
return false
end
@ -246,9 +237,6 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, player_name,
if (newpos[i].x == piston_pos.x) and (newpos[i].y == piston_pos.y) and (newpos[i].z == piston_pos.z) then
return
end
if minetest.is_protected(newpos[i], player_name) then
return
end
if not is_available(newpos[i]) then
local available = false
for j in ipairs(nodes) do
@ -265,35 +253,18 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, player_name,
end
end
local all_nodes = nodes
if dig_nodes and #dig_nodes > 0 then all_nodes = mesecon.join_table(dig_nodes, nodes) end
if are_protected(all_nodes, player_name) then
if are_protected(nodes, player_name) then
return
end
local first_dropper = nil
-- remove all nodes
for id, n in ipairs(all_nodes) do
for id, n in ipairs(nodes) do
n.meta = minetest.get_meta(n.pos):to_table()
local is_dropper = mesecon.is_mvps_dropper(n.node, movedir, all_nodes, id)
local is_dropper = mesecon.is_mvps_dropper(n.node, movedir, nodes, id)
if is_dropper then
-- if current node has already been destroyed (e.g. chain reaction of sugar cane breaking), skip it
if minetest.get_node(n.pos).name == n.node.name then
-- simulate dig_node using handle_node_drops
local drops = minetest.get_node_drops(n.node.name, "")
local counted_drops = {}
minetest.remove_node(n.pos)
for _, callback in pairs(minetest.registered_on_dignodes) do
callback(n.pos, n)
end
for _, item in ipairs(drops) do
if type(item) ~= "string" then
item = item:get_name() .. item:get_count()
end
table.insert(counted_drops, item)
end
minetest.handle_node_drops(n.pos, counted_drops)
end
--local drops = minetest.get_node_drops(n.node.name, "")
minetest.dig_node(n.pos)
else
minetest.remove_node(n.pos)
local node_timer = minetest.get_node_timer(n.pos)
@ -302,13 +273,13 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, player_name,
end
end
if is_dropper then
-- get id of the first dropper, but we still let everything else drop, so don't break here
if not first_dropper then first_dropper = id end
first_dropper = id
break
end
end
-- update mesecons for removed nodes ( has to be done after all nodes have been removed )
for id, n in ipairs(all_nodes) do
for id, n in ipairs(nodes) do
if first_dropper and id >= first_dropper then
break
end
@ -316,7 +287,7 @@ function mesecon.mvps_push_or_pull(pos, stackdir, movedir, maximum, player_name,
end
-- add nodes
for id, n in ipairs(all_nodes) do
for id, n in ipairs(nodes) do
if first_dropper and id >= first_dropper then
break
end
@ -423,7 +394,6 @@ mesecon.register_mvps_stopper("mcl_core:realm_barrier")
mesecon.register_mvps_stopper("mcl_core:void")
mesecon.register_mvps_stopper("mcl_core:bedrock")
mesecon.register_mvps_stopper("mcl_core:obsidian")
mesecon.register_mvps_stopper("mcl_core:crying_obsidian")
mesecon.register_mvps_stopper("mcl_chests:ender_chest")
mesecon.register_mvps_stopper("mcl_chests:ender_chest_small")
mesecon.register_mvps_stopper("mcl_mobspawners:spawner")
@ -441,9 +411,10 @@ mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_on")
mesecon.register_mvps_stopper("mesecons_solarpanel:solar_panel_inverted_off")
mesecon.register_mvps_stopper("mcl_banners:hanging_banner")
mesecon.register_mvps_stopper("mcl_banners:standing_banner")
mesecon.register_mvps_stopper("mcl_beehives:bee_nest")
mesecon.register_mvps_stopper("mcl_beehives:beehive")
mesecon.register_mvps_stopper("mcl_compass:lodestone")
mesecon.register_mvps_stopper("mcl_campfires:campfire")
mesecon.register_mvps_stopper("mcl_campfires:campfire_lit")
mesecon.register_mvps_stopper("mcl_campfires:soul_campfire")
mesecon.register_mvps_stopper("mcl_campfires:soul_campfire_lit")
-- Unmovable by technical restrictions.
-- Open formspec would screw up if node is destroyed (minor problem)
@ -474,14 +445,13 @@ mesecon.register_mvps_stopper("mcl_chests:trapped_chest")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_small")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_left")
mesecon.register_mvps_stopper("mcl_chests:trapped_chest_right")
mesecon.register_mvps_stopper("mcl_signs:wall_sign")
mesecon.register_mvps_stopper("mcl_signs:standing_sign")
mesecon.register_mvps_stopper("mcl_signs:standing_sign22_5")
mesecon.register_mvps_stopper("mcl_signs:standing_sign45")
mesecon.register_mvps_stopper("mcl_signs:standing_sign67_5")
mesecon.register_mvps_stopper("mcl_barrels:barrel_open")
mesecon.register_mvps_stopper("mcl_barrels:barrel_closed")
mesecon.register_mvps_stopper("mcl_campfires:campfire")
mesecon.register_mvps_stopper("mcl_campfires:campfire_lit")
mesecon.register_mvps_stopper("mcl_campfires:soul_campfire")
mesecon.register_mvps_stopper("mcl_campfires:soul_campfire_lit")
mesecon.register_mvps_stopper("mcl_lectern:lectern")
mesecon.register_mvps_stopper("mcl_grindstone:grindstone")
-- Unmovable by design: objects
@ -525,6 +495,8 @@ mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_2")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_3")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_door")
mesecon.register_mvps_unsticky("mcl_bamboo:bamboo_trapdoor")
mesecon.register_mvps_unsticky("mcl_signs:wall_sign_bamboo")
mesecon.register_mvps_unsticky("mcl_bamboo:scaffolding")
-- Beds
@ -560,6 +532,21 @@ mesecon.register_mvps_unsticky("mcl_beds:bed_white_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_white_bottom")
mesecon.register_mvps_unsticky("mcl_beds:bed_yellow_top")
mesecon.register_mvps_unsticky("mcl_beds:bed_yellow_bottom")
-- Buttons
mesecon.register_mvps_unsticky("mesecons_button:button_stone_off")
mesecon.register_mvps_unsticky("mesecons_button:button_stone_on")
mesecon.register_mvps_unsticky("mesecons_button:button_wood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_wood_on")
mesecon.register_mvps_unsticky("mesecons_button:button_acaciawood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_acaciawood_on")
mesecon.register_mvps_unsticky("mesecons_button:button_birchwood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_birchwood_on")
mesecon.register_mvps_unsticky("mesecons_button:button_darkwood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_darkwood_on")
mesecon.register_mvps_unsticky("mesecons_button:button_sprucewood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_sprucewood_on")
mesecon.register_mvps_unsticky("mesecons_button:button_junglewood_off")
mesecon.register_mvps_unsticky("mesecons_button:button_junglewood_on")
-- Cactus, Sugarcane & Vines
mesecon.register_mvps_unsticky("mcl_core:cactus")
mesecon.register_mvps_unsticky("mcl_core:reeds")
@ -572,6 +559,23 @@ mesecon.register_mvps_unsticky("mcl_cake:cake_4")
mesecon.register_mvps_unsticky("mcl_cake:cake_5")
mesecon.register_mvps_unsticky("mcl_cake:cake_6")
mesecon.register_mvps_unsticky("mcl_cake:cake")
-- Carpet
mesecon.register_mvps_unsticky("mcl_wool:black_carpet")
mesecon.register_mvps_unsticky("mcl_wool:blue_carpet")
mesecon.register_mvps_unsticky("mcl_wool:brown_carpet")
mesecon.register_mvps_unsticky("mcl_wool:cyan_carpet")
mesecon.register_mvps_unsticky("mcl_wool:green_carpet")
mesecon.register_mvps_unsticky("mcl_wool:grey_carpet")
mesecon.register_mvps_unsticky("mcl_wool:light_blue_carpet")
mesecon.register_mvps_unsticky("mcl_wool:lime_carpet")
mesecon.register_mvps_unsticky("mcl_wool:orange_carpet")
mesecon.register_mvps_unsticky("mcl_wool:magenta_carpet")
mesecon.register_mvps_unsticky("mcl_wool:pink_carpet")
mesecon.register_mvps_unsticky("mcl_wool:purple_carpet")
mesecon.register_mvps_unsticky("mcl_wool:red_carpet")
mesecon.register_mvps_unsticky("mcl_wool:silver_carpet")
mesecon.register_mvps_unsticky("mcl_wool:white_carpet")
mesecon.register_mvps_unsticky("mcl_wool:yellow_carpet")
-- Carved & Jack O'Lantern Pumpkins, Pumpkin & Melon
mesecon.register_mvps_unsticky("mcl_farming:pumpkin_face")
mesecon.register_mvps_unsticky("mcl_farming:pumpkin_face_light")
@ -903,16 +907,16 @@ mesecon.register_mvps_unsticky("mcl_chests:black_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:blue_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:brown_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:cyan_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:dark_green_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:dark_grey_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:lightblue_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:green_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:grey_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:light_blue_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:lime_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:orange_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:magenta_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:pink_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:violet_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:purple_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:red_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:grey_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:silver_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:white_shulker_box_small")
mesecon.register_mvps_unsticky("mcl_chests:yellow_shulker_box_small")
-- Snow

View File

@ -138,6 +138,8 @@ local function piston_off(pos, node)
end
local function piston_orientate(pos, placer)
mesecon.mvps_set_owner(pos, placer)
-- not placed by player
if not placer then return end
@ -151,9 +153,6 @@ local function piston_orientate(pos, placer)
elseif pitch < -55 then
minetest.add_node(pos, {name=pistonspec.piston_down})
end
-- set owner meta after setting node, or it will not keep
mesecon.mvps_set_owner(pos, placer)
end

85
mods/ITEMS/mcl_armor/api.lua Executable file → Normal file
View File

@ -85,31 +85,6 @@ function mcl_armor.equip_on_use(itemstack, player, pointed_thing)
return mcl_armor.equip(itemstack, player)
end
local function get_armor_texture(textures, name, modname, itemname, itemstring)
local core_texture = textures[name] or modname .. "_" .. itemname .. ".png"
if type(core_texture) == "function" then return core_texture end
mcl_armor.trims.core_textures[itemstring] = core_texture
local func = function(obj, itemstack)
local overlay = itemstack:get_meta():get_string("mcl_armor:trim_overlay")
local core_armor_texture
local stack_name = mcl_grindstone.remove_enchant_name(itemstack) -- gets original itemstring if enchanted, no need to store (nearly) identical values
local core_armor_texture = mcl_armor.trims.core_textures[stack_name]
if mcl_enchanting.is_enchanted(itemstack:get_name()) then -- working with the original stack to know wether to apply enchanting overlay or not
-- Far, Far in the future we may no longer _enchanted itemstrings...
-- To fix this code, simply put the unmodified itemstring in stack_name's place
-- DO NOT REMOVE THIS if UNLESS YOU KNOW WHAT YOU'RE TRYING TO ACHIEVE!
core_armor_texture = core_armor_texture .. mcl_enchanting.overlay
end
if overlay == "" then return core_armor_texture end -- key not present; armor not trimmed
return core_armor_texture .. overlay
end
return func
end
function mcl_armor.register_set(def)
local modname = minetest.get_current_modname()
local S = minetest.get_translator(modname)
@ -161,7 +136,7 @@ function mcl_armor.register_set(def)
_on_unequip = on_unequip_callbacks[name] or def.on_unequip,
_on_break = on_break_callbacks[name] or def.on_break,
_mcl_armor_element = name,
_mcl_armor_texture = get_armor_texture(textures, name, modname, itemname, itemstring),
_mcl_armor_texture = textures[name] or modname .. "_" .. itemname .. ".png",
_mcl_upgradable = def._mcl_upgradable,
_mcl_upgrade_item = upgrade_item
})
@ -282,61 +257,3 @@ function mcl_armor.update(obj)
end
end
function mcl_armor.trim(itemstack, overlay, color_string)
local def = itemstack:get_definition()
if not def._mcl_armor_texture and not mcl_armor.trims.blacklisted[itemstack:get_name()] then return end
local meta = itemstack:get_meta()
local piece_overlay = overlay
local inv_overlay = ""
local piece_type = def._mcl_armor_element
if piece_type == "head" then --helmet
inv_overlay = "^(helmet_trim.png"
piece_overlay = piece_overlay .. "_helmet"
elseif piece_type == "torso" then --chestplate
inv_overlay = "^(chestplate_trim.png"
piece_overlay = piece_overlay .. "_chestplate"
elseif piece_type == "legs" then --leggings
inv_overlay = "^(leggings_trim.png"
piece_overlay = piece_overlay .. "_leggings"
elseif piece_type == "feet" then --boots
inv_overlay = "^(boots_trim.png"
piece_overlay = piece_overlay .. "_boots"
end
local color = mcl_armor.trims.colors[color_string]
inv_overlay = inv_overlay .. "^[colorize:" .. color .. ":150)"
piece_overlay = piece_overlay .. ".png"
piece_overlay = "^(" .. piece_overlay .. "^[colorize:" .. color .. ":150)"
meta:set_string("mcl_armor:trim_overlay" , piece_overlay) -- set textures to render on the player, will work for clients below 5.8 as well
meta:set_string("mcl_armor:inv", inv_overlay) -- make 5.8+ clients display the fancy inv image, older ones will see no change in the *inventory* image
meta:set_string("inventory_image", def.inventory_image .. inv_overlay) -- dont use reload_inv_image as it's a one liner in this enviorment
end
function mcl_armor.reload_trim_inv_image(itemstack)
local meta = itemstack:get_meta()
local inv_overlay = meta:get_string("mcl_armor:inv")
local def = itemstack:get_definition()
if inv_overlay == "" then return end
meta:set_string("inventory_image", def.inventory_image .. inv_overlay)
end
tt.register_snippet(function(itemstring, toolcaps, stack)
if not stack then return nil end
local meta = stack:get_meta()
if not mcl_armor.is_trimmed(stack) then return nil end
-- we need to get the part of the overlay image between the overlay begin ( and the trim name end _
-- we COULD easily store this info in meta, but that would bloat the meta storage, as the same few values would be stored over and over again on every trimmed item
-- this is fine here as this code gets only executed when you put armor and a trim in a smithing table
local full_overlay = meta:get_string("mcl_armor:trim_overlay")
local trim_name = full_overlay:match("%((.-)%_")
return "Upgrade:\n " .. trim_name:gsub("^%l", string.upper) .. " Armor Trim"
end)
function mcl_armor.is_trimmed(itemstack)
-- this meta value will be there for every trimmed armor piece
-- remember, get_string returns "" if the key doesn't exist
return itemstack:get_meta():get_string("mcl_armor:trim_overlay") ~= ""
end

View File

@ -57,12 +57,6 @@ mcl_armor = {
}
},
player_view_range_factors = {},
trims = {
core_textures = {},
blacklisted = {["mcl_armor:elytra"]=true, ["mcl_armor:elytra_enchanted"]=true},
overlays = {"sentry","dune","coast","wild","tide","ward","vex","rib","snout","eye","spire","silence","wayfinder"},
colors = {["amethyst"]="#8246a5",["gold"]="#ce9627",["emerald"]="#1b9958",["copper"]="#c36447",["diamond"]="#5faed8",["iron"]="#938e88",["lapis"]="#1c306b",["netherite"]="#302a26",["quartz"]="#c9bcb9",["redstone"]="#af2c23"},
},
}
local modpath = minetest.get_modpath("mcl_armor")
@ -72,4 +66,3 @@ dofile(modpath .. "/player.lua")
dofile(modpath .. "/damage.lua")
dofile(modpath .. "/register.lua")
dofile(modpath .. "/alias.lua")
dofile(modpath .. "/trims.lua")

View File

@ -21,6 +21,3 @@ Iron Boots=Eisenstiefel
Golden Boots=Goldstiefel
Diamond Boots=Diamantstiefel
Chain Boots=Kettenstiefel
Smithing Template '@1'=Schiedevorlage '@1'

View File

@ -47,5 +47,4 @@ Thorns=Épines
Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=Reflète une partie des dégâts subis lors de la frappe, au prix d'une réduction de la durabilité à chaque déclenchement.
Aqua Affinity=Affinité aquatique
#Translations for armor trims
Smithing Template '@1'=Modèle à forger '@1'

View File

@ -46,6 +46,3 @@ Reduces most types of damage by 4% for each level.=
Thorns=
Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=
Aqua Affinity=
#Translations for armor trims
Smithing Template '@1'=

View File

@ -1,5 +1,5 @@
name = mcl_armor
author = stu
description = Adds craftable armor that is visible to other players.
depends = mcl_core, mcl_player, mcl_enchanting, mcl_damage, mcl_grindstone
depends = mcl_core, mcl_player, mcl_enchanting, mcl_damage
optional_depends = mcl_fire, ethereal, bakedclay

View File

@ -1,64 +0,0 @@
local mod_registername = minetest.get_current_modname() .. ":"
local S = minetest.get_translator(minetest.get_current_modname())
for _, template_name in pairs(mcl_armor.trims.overlays) do
minetest.register_craftitem(mod_registername .. template_name, {
description = S("Smithing Template '@1'", template_name),
inventory_image = template_name .. "_armor_trim_smithing_template.png",
})
minetest.register_craft({
output = mod_registername .. template_name .. " 2",
recipe = {
{"mcl_core:diamond",mod_registername .. template_name,"mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:cobble","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
end
--temp craft recipies, missing structures
minetest.register_craft({
output = mod_registername .. "eye",
recipe = {
{"mcl_core:diamond","mcl_end:ender_eye","mcl_core:diamond"},
{"mcl_core:diamond","mcl_end:ender_eye","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
minetest.register_craft({
output = mod_registername .. "ward",
recipe = {
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:apple_gold_enchanted","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
minetest.register_craft({
output = mod_registername .. "snout",
recipe = {
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:goldblock","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
minetest.register_craft({
output = mod_registername .. "silence",
recipe = {
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
{"mcl_core:diamond", mod_registername.."ward","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})
minetest.register_craft({
output = mod_registername .. "wayfinder",
recipe = {
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
{"mcl_core:diamond", "mcl_maps:empty_map","mcl_core:diamond"},
{"mcl_core:diamond","mcl_core:diamond","mcl_core:diamond"},
}
})

View File

@ -3,7 +3,7 @@ mcl_bamboo
This mod adds working, familiar bamboo nodes to your Mineclone 2 world.
Code: Michieal. Original (basic, used as inspiration) bamboo code by: Small Joker. Updates to the code: Mineclone Dev Team, Michieal.
Code: MineClone2 dev team. Original (basic) bamboo code by: Small Joker.
License for code: GPLv3.
License for images / textures: CC-BY-SA except where noted.

View File

@ -86,11 +86,6 @@ local bamboo_def = {
on_rotate = on_rotate,
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing then
return itemstack
end
if pointed_thing.type ~= "node" then
return itemstack
end
@ -206,7 +201,7 @@ local bamboo_def = {
local node_above_name = minetest.get_node(pointed_thing.above).name
mcl_bamboo.mcl_log("\n\n\nnode_above name: " .. node_above_name)
if node_above_name ~= "mcl_core:water_source" and node_above_name ~= "mcl_core:lava_source"
and node_above_name ~= "mcl_nether:nether_lava_source" then
and node_above_name ~= "mcl_nether:nether_lava_source" then
local _, position = minetest.item_place(place_item, placer, pointed_thing, fdir)
if position then
if not minetest.is_creative_enabled(placer:get_player_name()) then
@ -251,7 +246,7 @@ local bamboo_def = {
minetest.register_node(BAMBOO, bamboo_def)
local bamboo_top = table.copy(bamboo_def)
bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, dig_by_piston = 1, plant = 1, non_mycelium_plant = 1, flammable = 3}
bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3}
bamboo_top.tiles = {"mcl_bamboo_endcap.png"}
bamboo_top.drawtype = "plantlike_rooted" --"plantlike"
--bamboo_top.paramtype2 = "meshoptions"
@ -281,13 +276,6 @@ local bamboo_block_def = {
_mcl_hardness = 2,
_mcl_stripped_variant = "mcl_bamboo:bamboo_block_stripped", -- this allows us to use the built in Axe's strip block.
on_place = function(itemstack, placer, pointed_thing)
if not pointed_thing then
return itemstack
end
if pointed_thing.type ~= "node" then -- make sure that pointed_thing is not null and is pointing at a node.
return itemstack
end
local pos = pointed_thing.under
@ -361,7 +349,7 @@ bamboo_one_def.selection_box = {
{-0.05, -0.5, 0.285, -0.275, 0.5, 0.06},
}
}
bamboo_one_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, dig_by_piston = 1, plant = 1, non_mycelium_plant = 1, flammable = 3}
bamboo_one_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3}
mcl_bamboo.mcl_log(dump(mcl_bamboo.bamboo_index))
minetest.register_node(mcl_bamboo.bamboo_index[2], bamboo_one_def)
local bamboo_two_def = table.copy(bamboo_def)
@ -385,7 +373,7 @@ bamboo_two_def.selection_box = {
{0.25, -0.5, 0.325, 0.025, 0.5, 0.100},
}
}
bamboo_two_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, dig_by_piston = 1, plant = 1, non_mycelium_plant = 1, flammable = 3}
bamboo_two_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3}
minetest.register_node(mcl_bamboo.bamboo_index[3], bamboo_two_def)
local bamboo_three_def = table.copy(bamboo_def)
@ -408,5 +396,5 @@ bamboo_three_def.selection_box = {
{-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125},
}
}
bamboo_three_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, dig_by_piston = 1, plant = 1, non_mycelium_plant = 1, flammable = 3}
bamboo_three_def.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3}
minetest.register_node(mcl_bamboo.bamboo_index[4], bamboo_three_def)

View File

@ -192,23 +192,10 @@ if minetest.get_modpath("mcl_fences") then
local wood_groups = { handy = 1, axey = 1, flammable = 2, fence_wood = 1, fire_encouragement = 5, fire_flammability = 20 }
local wood_connect = { "group:fence_wood" }
local fence_id = mcl_fences.register_fence(
id,
S("Bamboo Fence"),
"mcl_bamboo_fence_bamboo.png",
wood_groups,
minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
wood_connect, node_sound)
local gate_id = mcl_fences.register_fence_gate(
id,
S("Bamboo Fence Gate"),
"mcl_bamboo_fence_gate_bamboo.png",
wood_groups,
minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
node_sound) -- note: about missing params.. will use defaults.
local fence_id = mcl_fences.register_fence(id, S("Bamboo Fence"), "mcl_bamboo_fence_bamboo.png", wood_groups,
2, 15, wood_connect, node_sound)
local gate_id = mcl_fences.register_fence_gate(id, S("Bamboo Fence Gate"), "mcl_bamboo_fence_gate_bamboo.png",
wood_groups, 2, 15, node_sound) -- note: about missing params.. will use defaults.
mcl_bamboo.mcl_log(dump(fence_id))
mcl_bamboo.mcl_log(dump(gate_id))

View File

@ -67,7 +67,7 @@ end
local BAMBOO_ENDCAP_NAME = "mcl_bamboo:bamboo_endcap"
-- check if supporting block is broken. pistons now break the bamboo plant.
-- For when I learn more about the pistons...
function mcl_bamboo.break_orphaned(pos)
mcl_bamboo.mcl_log("Break_Orphaned called.")
local node_below = minetest.get_node(vector.offset(pos, 0, -1, 0))

View File

@ -24,7 +24,6 @@ Bamboo Mosaic Stair=Escalier mosaïque de bambou
Bamboo Plank Slab=Dalle de planches de bambou
Bamboo Plank Stair=Escalier de planches de bambou
Bamboo Pressure Plate=Plaque de pression de bambou
Bamboo Sign=Panneau de bambou
Bamboo Slab=Dalle de bambou
Bamboo Stair=Escalier de bambou
Bamboo Trapdoor=Trappe de bambou

View File

@ -76,4 +76,3 @@ You can copy the pattern of a banner by placing two banners of the same color in
And one additional layer=Et une couche supplémentaire
And @1 additional layers=Et @1 couches supplémentaires
Paintable decoration=Décoration à peindre
Preview Banner=Aperçu de la bannière

View File

@ -41,9 +41,3 @@ You will fall asleep when @1% of all players are in bed.=Vous vous endormirez lo
You're in bed.=Tu es au lit.
Allows you to sleep=Vous permet de dormir
Respawn Anchor=Ancre de réapparition
Chat:=Discussion
send!=envoyé !
You are missing the 'shout' privilege! It's required in order to talk in chat...=Il vous manque le privilège 'shout' ! C'est indispensable pour participer à la discussion...
You exceeded the maximum number of messages per 10 seconds!=Vous avez dépassé le nombre maximal de message par 10 secondes !
Hey! Would you guys mind sleeping?=Eh, vous ne voulez pas dormir ?
Sorry, but you have to wait @1 seconds until you may use this button again!=Désolé, mais il faut attendre @1 seconde avant de réutiliser ce bouton !

View File

@ -33,7 +33,7 @@ minetest.register_node("mcl_bells:bell", {
"mcl_bells_bell_side.png",
},
is_ground_content = false,
groups = {pickaxey=2, deco_block=1, dig_by_piston=1 },
groups = {pickaxey=2, deco_block=1 },
sounds = mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance = 5,
_mcl_hardness = 5,

View File

@ -199,11 +199,7 @@ mcl_stairs.register_stair_and_slab_simple("blackstone_chiseled_polished", "mcl_b
mcl_stairs.register_stair_and_slab_simple("blackstone_brick_polished", "mcl_blackstone:blackstone_brick_polished", S("Polished Blackstone Brick Stair"), S("Polished Blackstone Brick Slab"), S("Double Polished Blackstone Brick Slab"))
--Wall
mcl_walls.register_wall(
"mcl_blackstone:wall",
S("Blackstone Wall"),
"mcl_blackstone:blackstone"
)
mcl_walls.register_wall("mcl_blackstone:wall", S("Blackstone Wall"), "mcl_blackstone:blackstone")
--lavacooling

View File

@ -15,4 +15,4 @@ Damage from dispenser: 3=Dégâts du distributeur : 3
Launches arrows=Lance des flèches
Crossbow=Arbalète
Crossbows are ranged weapons to shoot arrows at your foes.=Les arbalètes sont des armes à distance pour tirer des flèches sur vos ennemis.
To use the crossbow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to load an arrow into the chamber, then to shoot press left mouse.=Pour utiliser l'arbalète, vous devez d'abord avoir au moins une flèche n'importe où dans votre inventaire (sauf en mode créatif). Maintenez enfoncé le bouton droit de la souris pour charger, relâchez pour charger la flèche dans la chambre, puis pour tirer cliquez droit.
To use the crossbow, you first need to have at least one arrow anywhere in your inventory (unless in Creative Mode). Hold down the right mouse button to charge, release to shoot.=Pour utiliser l'arbalète, vous devez d'abord avoir au moins une flèche n'importe où dans votre inventaire (sauf en mode créatif). Maintenez enfoncé le bouton droit de la souris pour charger, relâchez pour tirer.

View File

@ -18,21 +18,13 @@ local function on_place_fish(itemstack, placer, pointed_thing)
return new_stack
end
if pointed_thing.type ~= "node" then return end
local pos = pointed_thing.above
local n = minetest.get_node(pointed_thing.above)
local def = minetest.registered_nodes[minetest.get_node(pointed_thing.under).name]
if ( def and def.buildable_to ) or n.name == "mcl_portals:portal" then
pos = pointed_thing.under
n = minetest.get_node(pointed_thing.under)
end
local fish = itemstack:get_definition()._mcl_buckets_fish
if fish_names[fish] then
local o = minetest.add_entity(pos, "mobs_mc:" .. fish)
if o and o:get_pos() then
local pos = pointed_thing.above or pointed_thing.under
if not pos then return end
local n = minetest.get_node_or_nil(pos)
if n.name and minetest.registered_nodes[n.name].buildable_to or n.name == "mcl_portals:portal" then
local fish = itemstack:get_name():gsub(fishbucket_prefix,"")
if fish_names[fish] then
local o = minetest.add_entity(pos, "mobs_mc:" .. fish)
local props = itemstack:get_meta():get_string("properties")
if props ~= "" then
o:set_properties(minetest.deserialize(props))
@ -68,7 +60,6 @@ for techname, fishname in pairs(fish_names) do
stack_max = 1,
groups = {bucket = 1, fish_bucket = 1},
liquids_pointable = false,
_mcl_buckets_fish = techname,
on_place = on_place_fish,
on_secondary_use = on_place_fish,
_on_dispense = function(stack, pos, droppos, dropnode, dropdir)

View File

@ -9,10 +9,9 @@ Authors:
Gerold55 - Code Start + Models?
PrairieWind - Improved and Cleaned Up Code, and added the soul campfire and crafting recipes.
cora - Added burning damage.
DinoNuggies4665 - Cooking logic implemented.
thunder1035 - Redesigned model and texture tweaks.
DinoNuggies4665 - Cooking logic implemented
thunder1035 - Redesigned model and texture tweaks
AncientMariner - Changed smoke to particle spawner and tweaked particle configuration.
Michieal - Fixed misc. errors.
License of media
----------------

View File

@ -332,9 +332,6 @@ function mcl_campfires.register_campfire(name, def)
elseif minetest.get_item_group(itemstack:get_name(), "campfire_cookable") ~= 0 then
mcl_campfires.take_item(pos, node, player, itemstack)
else
if not pointed_thing then
return itemstack
end
minetest.item_place_node(itemstack, player, pointed_thing)
end
end,

View File

@ -67,12 +67,12 @@ local function register_filled_cauldron(water_level, description, liquid)
local water_tex
if liquid == "river_water" then
id = id .. "r"
water_tex = "mcl_core_water_source_animation.png^[verticalframe:16:0^[multiply:#0084FF"
water_tex = "default_water_source_animated.png^[verticalframe:16:0^[multiply:#0084FF"
elseif liquid == "lava" then
id = id .. "_lava"
water_tex = "mcl_core_lava_source_animation.png^[verticalframe:16:0"
water_tex = "default_lava_source_animated.png^[verticalframe:16:0"
else
water_tex = "mcl_core_water_source_animation.png^[verticalframe:16:0^[multiply:#3F76E4"
water_tex = "default_water_source_animated.png^[verticalframe:16:0^[multiply:#3F76E4"
end
minetest.register_node(id, {
description = description,

View File

@ -1,24 +0,0 @@
# textdomain: mcl_cherry_blossom
Cherry Log=Bûche de cerisier
The trunk of a cherry blossom tree.=Le tronc d'un cerisier.
Stripped Cherry Log=Bûche de cerisier écorcée
The stripped trunk of a cherry blossom tree.=Le tronc écorcé d'un cerisier.
Cherry Bark=Bois de cerisier
This is a decorative block surrounded by the bark of a tree trunk.=Ceci est un bloc décoratif entouré de bois de cerisier
Stripped Cherry Wood=Bois de cerisier écorcé
The stripped wood of a cherry blossom tree.=Le bois écorcé d'un cerisier
Cherry Wood Planks=Planches de cerisier
Cherry Leaves=Feuilles de cerisier
Cherry blossom leaves are grown from cherry blossom trees.=Les feuilles de cerisier poussent sur les cerisiers
Cherry Sapling=Pousse de cerisier
Cherry blossom sapling can be planted to grow cherry trees.=Les pousses de cerisier peuvent être plantées pour faire pousser des cerisiers.
Cherry Door=Porte en cerisier
Cherry Trapdoor=Trappe en cerisier
Cherry Stairs=Escalier en cerisier
Cherry Slab=Dalle en cerisier
Double Cherry Slab=Double Dalle en cerisier
Cherry Sign=Panneau de cerisier
Cherry Fence=Barrière en cerisier
Cherry Gate=Portillion en cerisier
Cherry Pressure Plate=Plaque de pression en cerisier
Cherry Button=Bouton de Cerisier

View File

@ -66,16 +66,9 @@ mcl_signs.register_sign_custom("mcl_cherry_blossom", "_cherrywood",
"mcl_cherry_blossom_sign_inv.png", "mcl_cherry_blossom_sign_inv.png", S("Cherry Sign"))
-- Fences & Gates
mcl_fences.register_fence_and_fence_gate(
"cherry_fence",
S("Cherry Fence"),
S("Cherry Gate"),
"mcl_cherry_blossom_planks.png",
{handy=1, axey=1, flammable=2, fence_wood=1, fire_encouragement=5, fire_flammability=20},
minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
{"group:fence_wood"},
mcl_sounds.node_sound_wood_defaults())
mcl_fences.register_fence_and_fence_gate("cherry_fence", S("Cherry Fence"), S("Cherry Gate"),
"mcl_cherry_blossom_planks.png", {handy=1, axey=1, flammable=2, fence_wood=1, fire_encouragement=5, fire_flammability=20}, 2, 15,
{"group:fence_wood"}, mcl_sounds.node_sound_wood_defaults())
-- Redstone
mesecon.register_pressure_plate(

View File

@ -532,12 +532,9 @@ local function register_chest(basename, desc, longdesc, usagehelp, tt_help, tile
_mcl_hardness = 2.5,
on_rightclick = function(pos, node, clicker)
local topnode = minetest.get_node({ x = pos.x, y = pos.y + 1, z = pos.z })
if topnode and topnode.name and minetest.registered_nodes[topnode.name] then
if minetest.registered_nodes[topnode.name].groups.opaque == 1 then
-- won't open if there is no space from the top
return false
end
if minetest.registered_nodes[minetest.get_node({ x = pos.x, y = pos.y + 1, z = pos.z }).name].groups.opaque == 1 then
-- won't open if there is no space from the top
return false
end
local name = minetest.get_meta(pos):get_string("name")
if name == "" then

View File

@ -1581,7 +1581,7 @@ end
-- MUST NOT be called if there is a snow cover node above pos.
function mcl_core.clear_snow_dirt(pos, node)
local def = minetest.registered_nodes[node.name]
if def and def._mcl_snowless then
if def._mcl_snowless then
minetest.swap_node(pos, {name = def._mcl_snowless, param2=node.param2})
end
end
@ -1602,7 +1602,7 @@ function mcl_core.on_snowable_construct(pos)
-- Make snowed if needed
if minetest.get_item_group(anode.name, "snow_cover") == 1 then
local def = minetest.registered_nodes[node.name]
if def and def._mcl_snowed then
if def._mcl_snowed then
minetest.swap_node(pos, {name = def._mcl_snowed, param2=node.param2})
end
end
@ -1623,7 +1623,7 @@ function mcl_core.on_snow_construct(pos)
local npos = {x=pos.x, y=pos.y-1, z=pos.z}
local node = minetest.get_node(npos)
local def = minetest.registered_nodes[node.name]
if def and def._mcl_snowed then
if def._mcl_snowed then
minetest.swap_node(npos, {name = def._mcl_snowed, param2=node.param2})
end
end

View File

@ -406,7 +406,7 @@ mcl_core.register_snowed_node("mcl_core:dirt_with_grass_snow", "mcl_core:dirt_wi
minetest.register_node("mcl_core:grass_path", {
tiles = {"mcl_core_grass_path_top.png", "default_dirt.png", "mcl_core_grass_path_side.png"},
description = S("Grass Path"),
_doc_items_longdesc = S("Grass paths are a decorative variant of grass blocks. Their top has a different color and they are a bit lower than grass blocks, making them useful to build footpaths. Grass paths can be created by right clicking with a shovel. A grass path turns into dirt when it is below a solid block or when shift+right clicked with a shovel."),
_doc_items_longdesc = S("Grass paths are a decorative variant of grass blocks. Their top has a different color and they are a bit lower than grass blocks, making them useful to build footpaths. Grass paths can be created with a shovel. A grass path turns into dirt when it is below a solid block."),
drop = "mcl_core:dirt",
is_ground_content = true,
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false,
@ -419,7 +419,7 @@ minetest.register_node("mcl_core:grass_path", {
{-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
}
},
groups = {handy=1,shovely=1, cultivatable=2, dirtifies_below_solid=1, dirtifier=1, deco_block=1, path_remove_possible=1 },
groups = {handy=1,shovely=1, cultivatable=2, dirtifies_below_solid=1, dirtifier=1, deco_block=1 },
sounds = mcl_sounds.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.1},
}),
@ -1038,7 +1038,7 @@ for i=1,8 do
-- Get position where snow would be placed
local target
if def and def.buildable_to then
if minetest.registered_nodes[unode.name].buildable_to then
target = under
else
target = above

View File

@ -11,39 +11,12 @@ local function rotate_climbable(pos, node, user, mode)
return false
end
---Updates the trapdoor above (if any).
---
---@param pos mt.Vector The position of the ladder.
---@param event "place" | "destruct" The place or destruct event.
function mcl_core.update_trapdoor(pos, event)
local top_pos = vector.offset(pos, 0, 1, 0)
local top_node = minetest.get_node_or_nil(top_pos)
if top_node and minetest.get_item_group(top_node.name, "trapdoor") == 2 then
local new_name = top_node.name
if event == "place" then
new_name = string.gsub(new_name, "open$", "ladder")
elseif event == "destruct" then
new_name = string.gsub(new_name, "ladder$", "open")
end
-- If node above is an opened trapdoor
minetest.swap_node(top_pos, {
name = new_name,
param1 = top_node.param1,
param2 = top_node.param2,
})
end
end
-- TODO: Move ladders into their own API.
minetest.register_node("mcl_core:ladder", {
description = S("Ladder"),
_doc_items_longdesc = S(
"A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks and not on glass, leaves, ice, slabs, glowstone, nor sea lanterns."),
_doc_items_longdesc = S("A piece of ladder which allows you to climb vertically. Ladders can only be placed on the side of solid blocks and not on glass, leaves, ice, slabs, glowstone, nor sea lanterns."),
drawtype = "signlike",
is_ground_content = false,
tiles = { "default_ladder.png" },
tiles = {"default_ladder.png"},
inventory_image = "default_ladder.png",
wield_image = "default_ladder.png",
paramtype = "light",
@ -53,21 +26,14 @@ minetest.register_node("mcl_core:ladder", {
climbable = true,
node_box = {
type = "wallmounted",
wall_side = { -0.5, -0.5, -0.5, -7 / 16, 0.5, 0.5 },
wall_side = { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 },
},
selection_box = {
type = "wallmounted",
wall_side = { -0.5, -0.5, -0.5, -7 / 16, 0.5, 0.5 },
wall_side = { -0.5, -0.5, -0.5, -7/16, 0.5, 0.5 },
},
stack_max = 64,
groups = {
handy = 1,
axey = 1,
attached_node = 1,
deco_block = 1,
dig_by_piston = 1,
ladder = 1
},
groups = {handy=1,axey=1, attached_node=1, deco_block=1, dig_by_piston=1},
sounds = mcl_sounds.node_sound_wood_defaults(),
node_placement_prediction = "",
-- Restrict placement of ladders
@ -87,7 +53,7 @@ minetest.register_node("mcl_core:ladder", {
-- Don't allow to place the ladder at particular nodes
if (groups and (groups.glass or groups.leaves or groups.slab)) or
node.name == "mcl_core:ladder" or node.name == "mcl_core:ice" or node.name == "mcl_nether:glowstone" or node.name == "mcl_ocean:sea_lantern" then
node.name == "mcl_core:ladder" or node.name == "mcl_core:ice" or node.name == "mcl_nether:glowstone" or node.name == "mcl_ocean:sea_lantern" then
return itemstack
end
@ -109,17 +75,12 @@ minetest.register_node("mcl_core:ladder", {
if success then
if idef.sounds and idef.sounds.place then
minetest.sound_play(idef.sounds.place, { pos = above, gain = 1 }, true)
minetest.sound_play(idef.sounds.place, {pos=above, gain=1}, true)
end
end
return itemstack
end,
after_destruct = function(pos, old)
mcl_core.update_trapdoor(pos, "destruct")
end,
after_place_node = function(pos)
mcl_core.update_trapdoor(pos, "place")
end,
_mcl_blast_resistance = 0.4,
_mcl_hardness = 0.4,
on_rotate = rotate_climbable,
@ -128,10 +89,9 @@ minetest.register_node("mcl_core:ladder", {
minetest.register_node("mcl_core:vine", {
description = S("Vines"),
_doc_items_longdesc = S(
"Vines are climbable blocks which can be placed on the sides of solid full-cube blocks. Vines slowly grow and spread."),
_doc_items_longdesc = S("Vines are climbable blocks which can be placed on the sides of solid full-cube blocks. Vines slowly grow and spread."),
drawtype = "signlike",
tiles = { "mcl_core_vine.png" },
tiles = {"mcl_core_vine.png"},
color = "#48B518",
inventory_image = "mcl_core_vine.png",
wield_image = "mcl_core_vine.png",
@ -147,19 +107,9 @@ minetest.register_node("mcl_core:vine", {
},
stack_max = 64,
groups = {
handy = 1,
axey = 1,
shearsy = 1,
swordy = 1,
deco_block = 1,
dig_by_piston = 1,
destroy_by_lava_flow = 1,
compostability = 50,
flammable = 2,
fire_encouragement = 15,
fire_flammability = 100,
foliage_palette_wallmounted = 1,
ladder = 1
handy = 1, axey = 1, shearsy = 1, swordy = 1, deco_block = 1,
dig_by_piston = 1, destroy_by_lava_flow = 1, compostability = 50,
flammable = 2, fire_encouragement = 15, fire_flammability = 100, foliage_palette_wallmounted = 1
},
sounds = mcl_sounds.node_sound_leaves_defaults(),
drop = "",
@ -201,7 +151,7 @@ minetest.register_node("mcl_core:vine", {
if success then
if idef.sounds and idef.sounds.place then
minetest.sound_play(idef.sounds.place, { pos = above, gain = 1 }, true)
minetest.sound_play(idef.sounds.place, {pos=above, gain=1}, true)
end
end
return itemstack
@ -224,19 +174,13 @@ minetest.register_node("mcl_core:vine", {
-- If dug, also dig a “dependant” vine below it.
-- A vine is dependant if it hangs from this node and has no supporting block.
on_dig = function(pos, node, digger)
local below = vector.offset(pos, 0, -1, 0)
local below = vector.offset(pos,0,-1,0)
local belownode = minetest.get_node(below)
minetest.node_dig(pos, node, digger)
if belownode.name == node.name and (not mcl_core.check_vines_supported(below, belownode)) then
minetest.registered_nodes[node.name].on_dig(below, node, digger)
end
end,
after_destruct = function(pos, old)
mcl_core.update_trapdoor(pos, "destruct")
end,
after_place_node = function(pos)
mcl_core.update_trapdoor(pos, "place")
end,
_mcl_blast_resistance = 0.2,

View File

@ -18,17 +18,17 @@ end
minetest.register_node("mcl_core:water_flowing", {
description = S("Flowing Water"),
_doc_items_create_entry = false,
wield_image = "mcl_core_water_flow_animation.png^[verticalframe:64:0",
wield_image = "default_water_flowing_animated.png^[verticalframe:64:0",
drawtype = "flowingliquid",
tiles = {"mcl_core_water_flow_animation.png^[verticalframe:64:0"},
tiles = {"default_water_flowing_animated.png^[verticalframe:64:0"},
special_tiles = {
{
image="mcl_core_water_flow_animation.png",
image="default_water_flowing_animated.png",
backface_culling=false,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.5}
},
{
image="mcl_core_water_flow_animation.png",
image="default_water_flowing_animated.png",
backface_culling=false,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=1.5}
},
@ -71,12 +71,12 @@ S("• When water is directly below lava, the water turns into stone."),
drawtype = "liquid",
waving = 3,
tiles = {
{name="mcl_core_water_source_animation.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}
{name="default_water_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}
},
special_tiles = {
-- New-style water source material (mostly unused)
{
name="mcl_core_water_source_animation.png",
name="default_water_source_animated.png",
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0},
backface_culling = false,
}
@ -119,17 +119,17 @@ S("• When water is directly below lava, the water turns into stone."),
minetest.register_node("mcl_core:lava_flowing", {
description = S("Flowing Lava"),
_doc_items_create_entry = false,
wield_image = "mcl_core_lava_flow_animation.png^[verticalframe:64:0",
wield_image = "default_lava_flowing_animated.png^[verticalframe:64:0",
drawtype = "flowingliquid",
tiles = {"mcl_core_lava_flow_animation.png^[verticalframe:64:0"},
tiles = {"default_lava_flowing_animated.png^[verticalframe:64:0"},
special_tiles = {
{
image="mcl_core_lava_flow_animation.png",
image="default_lava_flowing_animated.png",
backface_culling=false,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=6.6}
},
{
image="mcl_core_lava_flow_animation.png",
image="default_lava_flowing_animated.png",
backface_culling=false,
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=6.6}
},
@ -182,12 +182,12 @@ S("• When flowing water touches flowing lava either from above or horizontally
S("• When lava is directly above water, the water turns into stone."),
drawtype = "liquid",
tiles = {
{name="mcl_core_lava_source_animation.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}
{name="default_lava_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}}
},
special_tiles = {
-- New-style lava source material (mostly unused)
{
name="mcl_core_lava_source_animation.png",
name="default_lava_source_animated.png",
animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0},
backface_culling = false,
}

View File

@ -139,8 +139,8 @@ minetest.register_node("mcl_core:deadbush", {
sunlight_propagates = true,
walkable = false,
buildable_to = true,
groups = {handy = 1, shearsy = 1, flammable = 3, attached_node = 1, plant = 1, non_mycelium_plant = 1, dig_by_piston = 1,
dig_by_water = 1, destroy_by_lava_flow = 1, deco_block = 1, fire_encouragement = 60, fire_flammability = 100},
groups = {handy = 1, shearsy = 1, flammable = 3, attached_node = 1, plant = 1, non_mycelium_plant = 1, dig_by_water = 1,
destroy_by_lava_flow = 1, deco_block = 1, fire_encouragement = 60, fire_flammability = 100},
drop = {
max_items = 1,
items = {

View File

@ -218,10 +218,7 @@ local function register_deepslate_variant(item, desc, longdesc)
end
if item ~= "chiseled" then
mcl_stairs.register_stair_and_slab_simple("deepslate_"..item, "mcl_deepslate:deepslate_"..item, S(desc.." Stairs"), S(desc.." Slab"), S("Double "..desc.." Slab"))
mcl_walls.register_wall(
"mcl_deepslate:deepslate"..item.."wall",
S(desc.." Wall"),
"mcl_deepslate:deepslate_"..item)
mcl_walls.register_wall("mcl_deepslate:deepslate"..item.."wall", S(desc.." Wall"), "mcl_deepslate:deepslate_"..item)
end
end

View File

@ -67,23 +67,12 @@ function mcl_doors:register_trapdoor(name, def)
local tmp_node
-- Close
if minetest.get_item_group(me.name, "trapdoor") == 2 then
minetest.sound_play(def.sound_close, { pos = pos, gain = 0.3, max_hear_distance = 16 }, true)
tmp_node = { name = name, param1 = me.param1, param2 = me.param2 }
-- Open
minetest.sound_play(def.sound_close, {pos = pos, gain = 0.3, max_hear_distance = 16}, true)
tmp_node = {name=name, param1=me.param1, param2=me.param2}
-- Open
else
minetest.sound_play(def.sound_open, { pos = pos, gain = 0.3, max_hear_distance = 16 }, true)
local bottom_node = minetest.get_node_or_nil(vector.offset(pos, 0, -1, 0))
local name_end = "_open"
-- Checking if there is something underneath the trapdoor
if bottom_node then
local is_ladder = minetest.get_item_group(bottom_node.name, "ladder")
if is_ladder > 0 then
name_end = "_ladder"
end
end
tmp_node = { name = name .. name_end, param1 = me.param1, param2 = me.param2 }
minetest.sound_play(def.sound_open, {pos = pos, gain = 0.3, max_hear_distance = 16}, true)
tmp_node = {name=name.."_open", param1=me.param1, param2=me.param2}
end
minetest.set_node(pos, tmp_node)
end
@ -100,22 +89,20 @@ function mcl_doors:register_trapdoor(name, def)
longdesc = def._doc_items_longdesc
if not longdesc then
if def.only_redstone_can_open then
longdesc = S(
"Trapdoors are horizontal barriers which can be opened or closed and climbed like a ladder when open. They occupy the upper or lower part of a block, depending on how they have been placed. This trapdoor can only be opened or closed by redstone power.")
longdesc = S("Trapdoors are horizontal barriers which can be opened or closed and climbed like a ladder when open. They occupy the upper or lower part of a block, depending on how they have been placed. This trapdoor can only be opened or closed by redstone power.")
else
longdesc = S(
"Trapdoors are horizontal barriers which can be opened or closed and climbed like a ladder when open. They occupy the upper or lower part of a block, depending on how they have been placed. This trapdoor can be opened or closed by hand or redstone power.")
longdesc = S("Trapdoors are horizontal barriers which can be opened or closed and climbed like a ladder when open. They occupy the upper or lower part of a block, depending on how they have been placed. This trapdoor can be opened or closed by hand or redstone power.")
end
end
usagehelp = def._doc_items_usagehelp
if not usagehelp and not def.only_redstone_can_open then
usagehelp = S("To open or close this trapdoor, rightclick it or send a redstone signal to it.")
end
if def.only_redstone_can_open then
tt_help = S("Openable by redstone power")
else
tt_help = S("Openable by players and redstone power")
end
if def.only_redstone_can_open then
tt_help = S("Openable by redstone power")
else
tt_help = S("Openable by players and redstone power")
end
-- Closed trapdoor
@ -141,7 +128,7 @@ function mcl_doors:register_trapdoor(name, def)
_doc_items_usagehelp = usagehelp,
drawtype = "nodebox",
tiles = tiles_closed,
use_texture_alpha = "clip",
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
inventory_image = def.inventory_image,
wield_image = def.wield_image,
is_ground_content = false,
@ -156,15 +143,13 @@ function mcl_doors:register_trapdoor(name, def)
node_box = {
type = "fixed",
fixed = {
{ -8 / 16, -8 / 16, -8 / 16, 8 / 16, -5 / 16, 8 / 16 }, },
},
mesecons = {
effector = {
action_on = (function(pos, node)
punch(pos)
end),
}
{-8/16, -8/16, -8/16, 8/16, -5/16, 8/16},},
},
mesecons = {effector = {
action_on = (function(pos, node)
punch(pos)
end),
}},
on_place = function(itemstack, placer, pointed_thing)
local p0 = pointed_thing.under
local p1 = pointed_thing.above
@ -179,7 +164,7 @@ function mcl_doors:register_trapdoor(name, def)
--local origname = itemstack:get_name()
if p0.y - 1 == p1.y or (fpos > 0 and fpos < 0.5)
or (fpos < -0.5 and fpos > -0.999999999) then
or (fpos < -0.5 and fpos > -0.999999999) then
param2 = param2 + 20
if param2 == 21 then
param2 = 23
@ -208,44 +193,16 @@ function mcl_doors:register_trapdoor(name, def)
groups_open.trapdoor = 2
groups_open.not_in_creative_inventory = 1
-- Non-climbable opened
minetest.register_node(name .. "_open", {
minetest.register_node(name.."_open", {
drawtype = "nodebox",
tiles = tiles_open,
use_texture_alpha = "clip",
is_ground_content = false,
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
pointable = true,
groups = groups_open,
_mcl_hardness = def._mcl_hardness,
_mcl_blast_resistance = def._mcl_blast_resistance,
sounds = def.sounds,
drop = name,
node_box = {
type = "fixed",
fixed = { -0.5, -0.5, 5 / 16, 0.5, 0.5, 0.5 }
},
on_rightclick = on_rightclick,
mesecons = {
effector = {
action_off = (function(pos, node)
punch(pos)
end),
}
},
on_rotate = on_rotate,
})
-- Climbable opened
minetest.register_node(name .. "_ladder", {
drawtype = "nodebox",
tiles = tiles_open,
use_texture_alpha = "clip",
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
is_ground_content = false,
paramtype = "light",
paramtype2 = "facedir",
-- TODO: Implement Minecraft behaviour: Climbable if directly above
-- ladder w/ matching orientation.
-- Current behavour: Always climbable
climbable = true,
sunlight_propagates = true,
pointable = true,
@ -256,20 +213,19 @@ function mcl_doors:register_trapdoor(name, def)
drop = name,
node_box = {
type = "fixed",
fixed = { -0.5, -0.5, 5 / 16, 0.5, 0.5, 0.5 }
fixed = {-0.5, -0.5, 5/16, 0.5, 0.5, 0.5}
},
on_rightclick = on_rightclick,
mesecons = {
effector = {
action_off = (function(pos, node)
punch(pos)
end),
}
},
mesecons = {effector = {
action_off = (function(pos, node)
punch(pos)
end),
}},
on_rotate = on_rotate,
})
if minetest.get_modpath("doc") then
doc.add_entry_alias("nodes", name, "nodes", name .. "_open")
doc.add_entry_alias("nodes", name, "nodes", name.."_open")
end
end

View File

@ -22,5 +22,3 @@ Iron Trapdoor=Trappe en fer
Iron trapdoors are horizontal barriers which can only be opened and closed by redstone signals, but not by hand. They occupy the upper or lower part of a block, depending on how they have been placed. When open, they can be climbed like a ladder.=Les trappes en fer sont des barrières horizontales qui ne peuvent être ouvertes et fermées que par des signaux de redstone, mais pas à la main. Ils occupent la partie supérieure ou inférieure d'un bloc, selon la façon dont ils ont été placés. Lorsqu'elles sont ouvertes, elles peuvent être montées comme une échelle.
Openable by players and redstone power=Ouvrable par les joueurs et puissance redstone
Openable by redstone power=Ouvrable par la puissance redstone
This door is a 2-block high barrier which can only be opened by redstone power, not by hand.=Cette porte est une barrière d'une hauteur de 2 blocs qui ne peut être ouverte que par la puissance redstone et pas à la main.
This door is a 2-block high barrier which can be opened or closed by hand or by redstone power.=Cette porte est une barrière d'une hauteur de 2 blocs qui peut être ouverte ou fermée à la main ou par la puissance redstone.

View File

@ -180,18 +180,16 @@ function mcl_enchanting.combine(itemstack, combine_with)
return false
end
local enchantments = mcl_enchanting.get_enchantments(itemstack)
local any_new_enchantment = false
for enchantment, combine_level in pairs(mcl_enchanting.get_enchantments(combine_with)) do
local enchantment_def = mcl_enchanting.enchantments[enchantment]
local enchantment_level = enchantments[enchantment]
if enchantment_level then -- The enchantment already exist in the provided item
if enchantment_level then
if enchantment_level == combine_level then
enchantment_level = math.min(enchantment_level + 1, enchantment_def.max_level)
else
enchantment_level = math.max(enchantment_level, combine_level)
end
any_new_enchantment = any_new_enchantment or ( enchantment_level ~= enchantments[enchantment] )
elseif mcl_enchanting.item_supports_enchantment(itemname, enchantment) then -- this is a new enchantement to try to add
elseif mcl_enchanting.item_supports_enchantment(itemname, enchantment) then
local supported = true
for incompatible in pairs(enchantment_def.incompatible) do
if enchantments[incompatible] then
@ -201,18 +199,24 @@ function mcl_enchanting.combine(itemstack, combine_with)
end
if supported then
enchantment_level = combine_level
any_new_enchantment = true
end
end
if enchantment_level and enchantment_level > 0 then
enchantments[enchantment] = enchantment_level
end
end
if any_new_enchantment then
itemstack:set_name(enchanted_itemname)
mcl_enchanting.set_enchantments(itemstack, enchantments)
local any_enchantment = false
for enchantment, enchantment_level in pairs(enchantments) do
if enchantment_level > 0 then
any_enchantment = true
break
end
end
return any_new_enchantment
if any_enchantment then
itemstack:set_name(enchanted_itemname)
end
mcl_enchanting.set_enchantments(itemstack, enchantments)
return true
end
function mcl_enchanting.enchantments_snippet(_, _, itemstack)

View File

@ -155,8 +155,7 @@ minetest.register_node("mcl_end:chorus_flower", {
1) On top of end stone or chorus plant
2) On top of air and horizontally adjacent to exactly 1 chorus plant ]]
local pos
local def = minetest.registered_nodes[node_under.name]
if def and def.buildable_to then
if minetest.registered_nodes[node_under.name].buildable_to then
pos = pointed_thing.under
else
pos = pointed_thing.above
@ -284,8 +283,7 @@ minetest.register_node("mcl_end:chorus_plant", {
condition is met:
- placed on end stone or any chorus node ]]
local pos_place, node_check
local def = minetest.registered_nodes[node_under.name]
if def and def.buildable_to then
if minetest.registered_nodes[node_under.name].buildable_to then
pos_place = pointed_thing.under
node_check = node_above
else

View File

@ -269,16 +269,7 @@ for w=1, #woods do
id = wood[1].."_fence"
id_gate = wood[1].."_fence_gate"
end
mcl_fences.register_fence_and_fence_gate(
id,
wood[2],
wood[3],
wood[4],
wood_groups,
minetest.registered_nodes["mcl_core:wood"]._mcl_hardness,
minetest.registered_nodes["mcl_core:wood"]._mcl_blast_resistance,
wood_connect,
wood_sounds)
mcl_fences.register_fence_and_fence_gate(id, wood[2], wood[3], wood[4], wood_groups, 2, 15, wood_connect, wood_sounds)
minetest.register_craft({
output = "mcl_fences:"..id.." 3",
@ -298,15 +289,7 @@ end
-- Nether Brick Fence (without fence gate!)
mcl_fences.register_fence(
"nether_brick_fence",
S("Nether Brick Fence"),
"mcl_fences_fence_nether_brick.png",
{pickaxey=1, deco_block=1, fence_nether_brick=1},
minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_hardness,
minetest.registered_nodes["mcl_nether:nether_brick"]._mcl_blast_resistance,
{"group:fence_nether_brick"},
mcl_sounds.node_sound_stone_defaults())
mcl_fences.register_fence("nether_brick_fence", S("Nether Brick Fence"), "mcl_fences_fence_nether_brick.png", {pickaxey=1, deco_block=1, fence_nether_brick=1}, 2, 30, {"group:fence_nether_brick"}, mcl_sounds.node_sound_stone_defaults())
minetest.register_craft({
output = "mcl_fences:nether_brick_fence 6",

View File

@ -24,4 +24,3 @@ Flower Pot=Pot de fleurs
Flower pots are decorative blocks in which flowers and other small plants can be placed.=Les pots de fleurs sont des blocs décoratifs dans lesquels des fleurs et d'autres petites plantes peuvent être placées.
Just place a plant on the flower pot. Flower pots can hold small flowers (not higher than 1 block), saplings, ferns, dead bushes, mushrooms and cacti. Rightclick a potted plant to retrieve the plant.=Placez simplement une plante sur le pot de fleurs. Les pots de fleurs peuvent contenir de petites fleurs (pas plus d'un bloc), des pousses, des fougères, des buissons morts, des champignons et des cactus. Cliquez avec le bouton droit sur une plante en pot pour récupérer la plante.
Can hold a small flower or plant=Peut contenir une petite fleur ou plante
Cherry Sapling Flower Pot=Pousse de Cerisier en pot

View File

@ -128,6 +128,8 @@ local fortune_wheat_seed_drop = {
overwrite = true,
}
-- CHECKME: How does tall grass behave when pushed by a piston?
--- Tall Grass ---
local def_tallgrass = {
description = S("Tall Grass"),
@ -153,7 +155,7 @@ local def_tallgrass = {
groups = {
handy = 1, shearsy = 1, attached_node = 1, deco_block = 1,
plant = 1, place_flowerlike = 2, non_mycelium_plant = 1,
flammable = 3, fire_encouragement = 60, fire_flammability = 10, dig_by_piston = 1,
flammable = 3, fire_encouragement = 60, fire_flammability = 100,
dig_by_water = 1, destroy_by_lava_flow = 1, compostability = 30, grass_palette = 1
},
sounds = mcl_sounds.node_sound_leaves_defaults(),
@ -250,7 +252,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
paramtype2 = paramtype2,
palette = palette,
walkable = false,
buildable_to = false,
buildable_to = true,
drop = drop_bottom,
_mcl_shears_drop = shears_drop,
_mcl_fortune_drop = fortune_drop,
@ -352,7 +354,7 @@ local function add_large_plant(name, desc, longdesc, bottom_img, top_img, inv_im
paramtype2 = paramtype2,
palette = palette,
walkable = false,
buildable_to = false,
buildable_to = true,
selection_box = {
type = "fixed",
fixed = { -selbox_radius, -0.5, -selbox_radius, selbox_radius, selbox_top_height, selbox_radius },

View File

@ -1,7 +1,5 @@
-- Code based from mcl_anvils
mcl_grindstone = {}
local S = minetest.get_translator(minetest.get_current_modname())
local F = minetest.formspec_escape
local C = minetest.colorize
@ -57,7 +55,7 @@ local function create_new_item(name_item, meta, wear)
end
-- If an item has an enchanment then remove "_enchanted" from the name
function mcl_grindstone.remove_enchant_name(stack)
local function remove_enchant_name(stack)
if mcl_enchanting.is_enchanted(stack:get_name()) then
local name = stack:get_name()
return name.sub(name, 1, -11)
@ -118,8 +116,8 @@ local function update_grindstone_slots(meta)
local def1 = input1:get_definition()
local def2 = input2:get_definition()
-- Remove enchant name if they have one
local name1 = mcl_grindstone.remove_enchant_name(input1)
local name2 = mcl_grindstone.remove_enchant_name(input2)
local name1 = remove_enchant_name(input1)
local name2 = remove_enchant_name(input2)
-- Calculate repair
local function calculate_repair(dur1, dur2)
@ -145,7 +143,7 @@ local function update_grindstone_slots(meta)
local def1 = input1:get_definition()
local meta = input1:get_meta()
if def1.type == "tool" and mcl_enchanting.is_enchanted(input1:get_name()) then
local name = mcl_grindstone.remove_enchant_name(input1)
local name = remove_enchant_name(input1)
local wear = input1:get_wear()
local new_item = create_new_item(name, meta, wear)
new_output = transfer_curse(input1, new_item)
@ -159,7 +157,7 @@ local function update_grindstone_slots(meta)
local def2 = input2:get_definition()
local meta = input2:get_meta()
if def2.type == "tool" and mcl_enchanting.is_enchanted(input2:get_name()) then
local name = mcl_grindstone.remove_enchant_name(input2)
local name = remove_enchant_name(input2)
local wear = input2:get_wear()
local new_item = create_new_item(name, meta, wear)
new_output = transfer_curse(input2, new_item)

View File

@ -118,7 +118,7 @@ function mcl_lanterns.register_lantern(name, def)
node_placement_prediction = "",
sunlight_propagates = true,
light_source = def.light_level,
groups = {pickaxey = 1, attached_node = 1, deco_block = 1, lantern = 1, dig_by_piston=1},
groups = {pickaxey = 1, attached_node = 1, deco_block = 1, lantern = 1},
selection_box = {
type = "fixed",
fixed = {

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