diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000..8e3084dd35 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +end_of_line = lf + +[*.lua] +charset = utf8 +indent_style = tab +insert_final_newline = true +trim_trailing_whitespace = true +keep_one_space_between_table_and_bracket = false +spaces_around_operators = true diff --git a/.gitignore b/.gitignore index 8228ba34ac..574521980c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ *.blend1 *.blend2 *.blend3 +/.idea/ diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 8086a2f444..ffb1194aa1 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -60,7 +60,7 @@ representative at an online or offline event. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at -eliasfleckenstein@web.de. +ancientmariner_dev@proton.me. All complaints will be reviewed and investigated promptly and fairly. All community leaders are obligated to respect the privacy and security of the diff --git a/CREDITS.md b/CREDITS.md index 665f35c571..9c29301557 100644 --- a/CREDITS.md +++ b/CREDITS.md @@ -8,12 +8,13 @@ ## Maintainers +* AncientMariner * Nicu -* cora ## Previous Maintainers * Fleckenstein * jordan4ibanez +* cora ## Developers * bzoss @@ -34,6 +35,7 @@ * SumianVoice * MrRar * talamh +* Faerraven ## Contributors * Laurent Rocher @@ -89,6 +91,11 @@ * FossFanatic * Herbert West * GuyLiner +* 3raven +* anarquimico +* TheOnlyJoeEnderman +* Ranko Saotome +* Gregor Parzefall ## MineClone5 * kay27 @@ -158,6 +165,7 @@ * MysticTempest * RandomLegoBrick * cora +* Faerraven / Michieal ## Translations * Wuzzy @@ -171,6 +179,7 @@ * Emojigit * snowyu * 3raven +* SakuraRiu ## Funders * 40W @@ -181,3 +190,4 @@ * wsor for working tirelessly in the shadows for the good of all of us, particularly helping with solving contentDB and copyright issues. * The workaholics who spent way too much time writing for the Minecraft Wiki. It's an invaluable resource for creating this game * Notch and Jeb for being the major forces behind Minecraft +* Dark Reaven Music (https://soundcloud.com/dark-reaven-music) for the main menu theme (Calmed Cube), which is licensed under https://creativecommons.org/licenses/by-sa/3.0/ diff --git a/GROUPS.md b/GROUPS.md index 3c954111f1..e6d878990f 100644 --- a/GROUPS.md +++ b/GROUPS.md @@ -74,6 +74,8 @@ Please read to learn how digging times * `coral_species=X`: Specifies the species of a coral; equal X means equal species * `set_on_fire=X`: Sets any (not fire-resistant) mob or player on fire for X seconds when touching * `compostability=X`: Item can be used on a composter block; X (1-100) is the % chance of adding a level of compost +* `leaves=X`: Node will spotaneously decay if no tree trunk nodes remain within 6 blocks distance. +* `leaves_orphan`: See above, these nodes are in the process of decayed. #### Footnotes diff --git a/README.md b/README.md index 40d079a7be..5d9ca077d0 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ An unofficial Minecraft-like game for Minetest. Forked from MineClone by davedevils. Developed by many people. Not developed or endorsed by Mojang AB. -Version: 0.81 (in development) +Version: 0.82 (in development) ### Gameplay You start in a randomly-generated world made entirely of cubes. You can explore diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000000..01eb71e7f1 --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,19 @@ +#File to document release steps with a view to evolving into a script + +#Update CREDITS.md +#Update version in README.md (soon to be game.conf from of 0.82.0) + +lua tools/generate_ingame_credits.lua + +git add CREDITS.md +git add mods/HUD/mcl_credits/people.lua + +git add README.md +# To uncomment when applicable +#git add game.conf + +git commit -m "Pre-release update credits and set version 0.81.1" + +git tag 0.81.1 + +git push origin 0.81.1 \ No newline at end of file diff --git a/game.conf b/game.conf index 9f54e51597..1fa1d66714 100644 --- a/game.conf +++ b/game.conf @@ -1,2 +1,4 @@ title = MineClone 2 description = A survival sandbox game. Survive, gather, hunt, build, explore, and do much more. +disallowed_mapgens = v6 +version=MCL2-0.82-indev \ No newline at end of file diff --git a/menu/HeaderTemplate.png b/menu/HeaderTemplate.png new file mode 100644 index 0000000000..ceddaa1f64 Binary files /dev/null and b/menu/HeaderTemplate.png differ diff --git a/menu/background.1.png b/menu/background.1.png new file mode 100644 index 0000000000..07e1f66726 Binary files /dev/null and b/menu/background.1.png differ diff --git a/menu/background.10.png b/menu/background.10.png new file mode 100644 index 0000000000..5f63b0ea1e Binary files /dev/null and b/menu/background.10.png differ diff --git a/menu/background.2.png b/menu/background.2.png new file mode 100644 index 0000000000..3050cf4112 Binary files /dev/null and b/menu/background.2.png differ diff --git a/menu/background.3.png b/menu/background.3.png new file mode 100644 index 0000000000..a4d1c43581 Binary files /dev/null and b/menu/background.3.png differ diff --git a/menu/background.4.png b/menu/background.4.png new file mode 100644 index 0000000000..c50332f6f8 Binary files /dev/null and b/menu/background.4.png differ diff --git a/menu/background.5.png b/menu/background.5.png new file mode 100644 index 0000000000..1c776a88ec Binary files /dev/null and b/menu/background.5.png differ diff --git a/menu/background.6.png b/menu/background.6.png new file mode 100644 index 0000000000..478c65912c Binary files /dev/null and b/menu/background.6.png differ diff --git a/menu/background.7.png b/menu/background.7.png new file mode 100644 index 0000000000..56c30a08b3 Binary files /dev/null and b/menu/background.7.png differ diff --git a/menu/background.8.png b/menu/background.8.png new file mode 100644 index 0000000000..ed285700c9 Binary files /dev/null and b/menu/background.8.png differ diff --git a/menu/background.9.png b/menu/background.9.png new file mode 100644 index 0000000000..760aaa4e5b Binary files /dev/null and b/menu/background.9.png differ diff --git a/menu/background.png b/menu/background.png new file mode 100644 index 0000000000..51bfb374e2 Binary files /dev/null and b/menu/background.png differ diff --git a/menu/footer.png b/menu/footer.png index 9207b26d39..72f80a43c5 100644 Binary files a/menu/footer.png and b/menu/footer.png differ diff --git a/menu/header.1.png b/menu/header.1.png new file mode 100644 index 0000000000..5204a0d025 Binary files /dev/null and b/menu/header.1.png differ diff --git a/menu/header.2.png b/menu/header.2.png new file mode 100644 index 0000000000..8b131302eb Binary files /dev/null and b/menu/header.2.png differ diff --git a/menu/header.3.png b/menu/header.3.png new file mode 100644 index 0000000000..dc618d7c65 Binary files /dev/null and b/menu/header.3.png differ diff --git a/menu/header.png b/menu/header.png index 11435df510..3c146f3cd4 100644 Binary files a/menu/header.png and b/menu/header.png differ diff --git a/menu/overlay.1.png b/menu/overlay.1.png deleted file mode 100644 index 62790a2029..0000000000 Binary files a/menu/overlay.1.png and /dev/null differ diff --git a/menu/overlay.2.png b/menu/overlay.2.png deleted file mode 100644 index ad1de325a1..0000000000 Binary files a/menu/overlay.2.png and /dev/null differ diff --git a/menu/overlay.3.png b/menu/overlay.3.png deleted file mode 100644 index 390848476f..0000000000 Binary files a/menu/overlay.3.png and /dev/null differ diff --git a/menu/overlay.4.png b/menu/overlay.4.png deleted file mode 100644 index 2480f2c506..0000000000 Binary files a/menu/overlay.4.png and /dev/null differ diff --git a/menu/overlay.5.png b/menu/overlay.5.png deleted file mode 100644 index 482ec23f04..0000000000 Binary files a/menu/overlay.5.png and /dev/null differ diff --git a/menu/overlay.png b/menu/overlay.png deleted file mode 100644 index 5d4f51b6f6..0000000000 Binary files a/menu/overlay.png and /dev/null differ diff --git a/menu/theme.ogg b/menu/theme.ogg new file mode 100644 index 0000000000..00644da4a8 Binary files /dev/null and b/menu/theme.ogg differ diff --git a/mods/CORE/mcl_events/API.md b/mods/CORE/mcl_events/API.md new file mode 100644 index 0000000000..c94328e506 --- /dev/null +++ b/mods/CORE/mcl_events/API.md @@ -0,0 +1,27 @@ +## mcl_events +### Registering Events + `mlc_events.register_event("name",def)` + +#### Event Definition + { + stage = 0, + max_stage = 1, + percent = 100, + bars = {}, + completed = false, + cond_start = function() end, + --return table of paramtables e.g. { { player = playername, pos = position, ... } }, custom parameters will be passed to the event object/table + on_step = function(event) end, + --this function is run every game step when the event is active + on_start = function(event) end, + -- this function is run when the event starts + on_stage_begin = function(event) end, + -- this function runs when a new stage of the event starts + cond_progress = function(event) end, --return false or next stage id + --this function checks if the event should progress to the next (or any other) stage + cond_complete = function(event) end, + --return true if event finished successfully +} + +### Debugging + * /event_start -- starts the given event at the current player coordinates diff --git a/mods/CORE/mcl_events/init.lua b/mods/CORE/mcl_events/init.lua new file mode 100644 index 0000000000..625076baea --- /dev/null +++ b/mods/CORE/mcl_events/init.lua @@ -0,0 +1,155 @@ +mcl_events = {} +mcl_events.registered_events = {} +local disabled_events = minetest.settings:get("mcl_disabled_events") +if disabled_events then disabled_events = disabled_events:split(",") +else disabled_events = {} end +local DBG = minetest.settings:get_bool("mcl_logging_event_api",false) +local active_events = {} + +local event_tpl = { + stage = 0, + max_stage = 1, + percent = 100, + bars = {}, + completed = false, + cond_start = function(event) end, --return table of positions + on_step = function(event) end, + on_start = function(event) end, + on_stage_begin = function(event) end, + cond_progress = function(event) end, --return next stage + cond_complete = function(event) end, --return success +} + +local function mcl_log(m,l) + if DBG then + if not l then l = "action" end + minetest.log(l,"[mcl_events] "..m) + end +end + +function mcl_events.register_event(name,def) + if table.indexof(disabled_events,name) ~= -1 then return end + mcl_events.registered_events[name] = def + mcl_events.registered_events[name].name = name +end + +local function addbars(self) + if not self.enable_bossbar then return end + for _,player in pairs(minetest.get_connected_players()) do + if vector.distance(self.pos,player:get_pos()) < 64 then + local bar = mcl_bossbars.add_bar(player, {color = "red", text = self.readable_name .. ": Wave "..self.stage.." / "..self.max_stage, percentage = self.percent }, true,1) + table.insert(self.bars,bar) + end + end +end + +local function start_event(p,e) + mcl_log("[mcl_events] Event started: "..e.readable_name.." at "..minetest.pos_to_string(vector.round(p.pos))) + local idx = #active_events + 1 + active_events[idx] = table.copy(e) + setmetatable(active_events[idx],{__index = event_tpl}) + for k,v in pairs(p) do active_events[idx][k] = v end + active_events[idx].stage = 0 + active_events[idx].percent = 100 + active_events[idx].bars = {} + active_events[idx].time_start = os.time() + if active_events[idx].on_start then + active_events[idx]:on_start(p.pos) + end + addbars(active_events[idx]) +end + +local function finish_event(self,idx) + mcl_log("[mcl_events] Finished: "..self.readable_name.." at "..minetest.pos_to_string(vector.round(self.pos))) + if self.on_complete then self:on_complete() end + for _,b in pairs(self.bars) do + mcl_bossbars.remove_bar(b) + end + table.remove(active_events,idx) +end + +local etime = 0 +function check_events(dtime) + --process active events + for idx,ae in pairs(active_events) do + if ae.cond_complete and ae:cond_complete() then + ae.finished = true + finish_event(ae,idx) + elseif not ae.cond_complete and ae.max_stage and ae.max_stage <= ae.stage then + ae.finished = true + finish_event(ae,idx) + elseif not ae.finished and ae.cond_progress then + local p = ae:cond_progress() + if p == true then + ae.stage = ae.stage + 1 + if ae:on_stage_begin() == true then + mcl_log("[mcl_events] Event "..ae.readable_name.." at "..minetest.pos_to_string(vector.round(ae.pos)).." failed at stage_begin of stage "..ae.stage ) + active_events[idx] = nil + end + elseif tonumber(p) then + ae.stage = tonumber(p) or ae.stage + 1 + ae:on_stage_begin() + end + elseif not ae.finished and ae.on_step then + ae:on_step(dtime) + end + addbars(ae) + end + -- check if a new event should be started + etime = etime - dtime + if etime > 0 then return end + etime = 10 + for _,e in pairs(mcl_events.registered_events) do + local pp = e.cond_start() + if pp then + --minetest.log("It's gonna start the raid maybe") + for _,p in pairs(pp) do + local start = true + if e.exclusive_to_area then + for _,ae in pairs(active_events) do + if e.name == ae.name and vector.distance(p.pos,ae.pos) < e.exclusive_to_area then start = false end + end + end + if start then + --minetest.log("It's gonna start the raid definitely") + start_event(p,e) + elseif DBG then + mcl_log("[mcl_events] Event "..e.readable_name.." already active at "..minetest.pos_to_string(vector.round(p.pos))) + end + end + else + --minetest.log("Do not start this raid") + end + end + for idx,ae in pairs(active_events) do + local player_near = false + for _,pl in pairs(minetest.get_connected_players()) do + if ae.pos and vector.distance(pl:get_pos(),ae.pos) < 64 then player_near = true end + end + if ae.pos and not player_near then + mcl_log("[mcl_events] Event "..ae.readable_name.." at "..minetest.pos_to_string(vector.round(ae.pos)).." aborted - no players near." ) + active_events[idx] = nil + end + end +end + +minetest.register_globalstep(check_events) + +mcl_info.register_debug_field("Active Events",{ + level = 4, + func = function(pl,pos) + return tostring(#active_events) + end +}) + +minetest.register_chatcommand("event_start",{ + privs = {debug = true}, + description = "Debug command to start events", + func = function(pname,param) + local p = minetest.get_player_by_name(pname) + local evdef = mcl_events.registered_events[param] + if not evdef then return false,"Event "..param.." doesn't exist.'" end + start_event({pos=p:get_pos(),player=pname,factor=1},evdef) + return true,"Started event "..param + end, +}) diff --git a/mods/CORE/mcl_events/mod.conf b/mods/CORE/mcl_events/mod.conf new file mode 100644 index 0000000000..29a45628ac --- /dev/null +++ b/mods/CORE/mcl_events/mod.conf @@ -0,0 +1,3 @@ +name = mcl_events +author = cora +depends = mcl_mobs,mcl_bossbars, mcl_info diff --git a/mods/CORE/mcl_explosions/locale/mcl_explosions.ja.tr b/mods/CORE/mcl_explosions/locale/mcl_explosions.ja.tr new file mode 100644 index 0000000000..ce59ab4b31 --- /dev/null +++ b/mods/CORE/mcl_explosions/locale/mcl_explosions.ja.tr @@ -0,0 +1,2 @@ +# textdomain:mcl_explosions +@1 was caught in an explosion.=@1は爆発に巻き込まれた。 diff --git a/mods/CORE/mcl_init/init.lua b/mods/CORE/mcl_init/init.lua index 3acce957fb..f77b03828e 100644 --- a/mods/CORE/mcl_init/init.lua +++ b/mods/CORE/mcl_init/init.lua @@ -3,26 +3,26 @@ mcl_vars = {} mcl_vars.redstone_tick = 0.1 ---- GUI / inventory menu settings +-- GUI / inventory menu settings mcl_vars.gui_slots = "listcolors[#9990;#FFF7;#FFF0;#000;#FFF]" + -- nonbg is added as formspec prepend in mcl_formspec_prepend -mcl_vars.gui_nonbg = mcl_vars.gui_slots .. - "style_type[image_button;border=false;bgimg=mcl_inventory_button9.png;bgimg_pressed=mcl_inventory_button9_pressed.png;bgimg_middle=2,2]".. - "style_type[button;border=false;bgimg=mcl_inventory_button9.png;bgimg_pressed=mcl_inventory_button9_pressed.png;bgimg_middle=2,2]".. - "style_type[field;textcolor=#323232]".. - "style_type[label;textcolor=#323232]".. - "style_type[textarea;textcolor=#323232]".. - "style_type[checkbox;textcolor=#323232]" +mcl_vars.gui_nonbg = table.concat({ + mcl_vars.gui_slots, + "style_type[image_button;border=false;bgimg=mcl_inventory_button9.png;bgimg_pressed=mcl_inventory_button9_pressed.png;bgimg_middle=2,2]", + "style_type[button;border=false;bgimg=mcl_inventory_button9.png;bgimg_pressed=mcl_inventory_button9_pressed.png;bgimg_middle=2,2]", + "style_type[field;textcolor=#323232]", + "style_type[label;textcolor=#323232]", + "style_type[textarea;textcolor=#323232]", + "style_type[checkbox;textcolor=#323232]", +}) -- Background stuff must be manually added by mods (no formspec prepend) mcl_vars.gui_bg_color = "bgcolor[#00000000]" mcl_vars.gui_bg_img = "background9[1,1;1,1;mcl_base_textures_background9.png;true;7]" --- Legacy -mcl_vars.inventory_header = "" - -- Tool wield size -mcl_vars.tool_wield_scale = { x = 1.8, y = 1.8, z = 1 } +mcl_vars.tool_wield_scale = vector.new(1.8, 1.8, 1) -- Mapgen variables local mg_name = minetest.get_mapgen_setting("mg_name") @@ -35,55 +35,69 @@ mcl_vars.chunksize = math.max(1, tonumber(minetest.get_mapgen_setting("chunksize mcl_vars.MAP_BLOCKSIZE = math.max(1, minetest.MAP_BLOCKSIZE or 16) mcl_vars.mapgen_limit = math.max(1, tonumber(minetest.get_mapgen_setting("mapgen_limit")) or 31000) mcl_vars.MAX_MAP_GENERATION_LIMIT = math.max(1, minetest.MAX_MAP_GENERATION_LIMIT or 31000) + local central_chunk_offset = -math.floor(mcl_vars.chunksize / 2) + mcl_vars.central_chunk_offset_in_nodes = central_chunk_offset * mcl_vars.MAP_BLOCKSIZE mcl_vars.chunk_size_in_nodes = mcl_vars.chunksize * mcl_vars.MAP_BLOCKSIZE + local central_chunk_min_pos = central_chunk_offset * mcl_vars.MAP_BLOCKSIZE local central_chunk_max_pos = central_chunk_min_pos + mcl_vars.chunk_size_in_nodes - 1 local ccfmin = central_chunk_min_pos - mcl_vars.MAP_BLOCKSIZE -- Fullminp/fullmaxp of central chunk, in nodes local ccfmax = central_chunk_max_pos + mcl_vars.MAP_BLOCKSIZE -local mapgen_limit_b = math.floor(math.min(mcl_vars.mapgen_limit, mcl_vars.MAX_MAP_GENERATION_LIMIT) / mcl_vars.MAP_BLOCKSIZE) +local mapgen_limit_b = math.floor(math.min(mcl_vars.mapgen_limit, mcl_vars.MAX_MAP_GENERATION_LIMIT) / + mcl_vars.MAP_BLOCKSIZE) local mapgen_limit_min = -mapgen_limit_b * mcl_vars.MAP_BLOCKSIZE local mapgen_limit_max = (mapgen_limit_b + 1) * mcl_vars.MAP_BLOCKSIZE - 1 local numcmin = math.max(math.floor((ccfmin - mapgen_limit_min) / mcl_vars.chunk_size_in_nodes), 0) -- Number of complete chunks from central chunk local numcmax = math.max(math.floor((mapgen_limit_max - ccfmax) / mcl_vars.chunk_size_in_nodes), 0) -- fullminp/fullmaxp to effective mapgen limits. + mcl_vars.mapgen_edge_min = central_chunk_min_pos - numcmin * mcl_vars.chunk_size_in_nodes mcl_vars.mapgen_edge_max = central_chunk_max_pos + numcmax * mcl_vars.chunk_size_in_nodes +---@param x integer +---@return integer local function coordinate_to_block(x) return math.floor(x / mcl_vars.MAP_BLOCKSIZE) end +---@param x integer +---@return integer local function coordinate_to_chunk(x) return math.floor((coordinate_to_block(x) - central_chunk_offset) / mcl_vars.chunksize) end +---@param pos Vector +---@return Vector function mcl_vars.pos_to_block(pos) - return { - x = coordinate_to_block(pos.x), - y = coordinate_to_block(pos.y), - z = coordinate_to_block(pos.z) - } + return vector.new( + coordinate_to_block(pos.x), + coordinate_to_block(pos.y), + coordinate_to_block(pos.z) + ) end +---@param pos Vector +---@return Vector function mcl_vars.pos_to_chunk(pos) - return { - x = coordinate_to_chunk(pos.x), - y = coordinate_to_chunk(pos.y), - z = coordinate_to_chunk(pos.z) - } + return vector.new( + coordinate_to_chunk(pos.x), + coordinate_to_chunk(pos.y), + coordinate_to_chunk(pos.z) + ) end local k_positive = math.ceil(mcl_vars.MAX_MAP_GENERATION_LIMIT / mcl_vars.chunk_size_in_nodes) local k_positive_z = k_positive * 2 local k_positive_y = k_positive_z * k_positive_z +---@param pos Vector +---@return integer function mcl_vars.get_chunk_number(pos) -- unsigned int local c = mcl_vars.pos_to_chunk(pos) - return - (c.y + k_positive) * k_positive_y + + return (c.y + k_positive) * k_positive_y + (c.z + k_positive) * k_positive_z + - c.x + k_positive + c.x + k_positive end if not superflat and not singlenode then @@ -117,11 +131,8 @@ elseif singlenode then mcl_vars.mg_bedrock_is_rough = false else -- Classic superflat - local ground = minetest.get_mapgen_setting("mgflat_ground_level") - ground = tonumber(ground) - if not ground then - ground = 8 - end + local ground = tonumber(minetest.get_mapgen_setting("mgflat_ground_level")) or 8 + mcl_vars.mg_overworld_min = ground - 3 mcl_vars.mg_overworld_max_official = mcl_vars.mg_overworld_min + minecraft_height_limit mcl_vars.mg_bedrock_overworld_min = mcl_vars.mg_overworld_min @@ -181,14 +192,16 @@ minetest.craftitemdef_default.stack_max = 64 math.randomseed(os.time()) local chunks = {} -- intervals of chunks generated + +---@param pos Vector function mcl_vars.add_chunk(pos) local n = mcl_vars.get_chunk_number(pos) -- unsigned int local prev for i, d in pairs(chunks) do if n <= d[2] then -- we've found it if (n == d[2]) or (n >= d[1]) then return end -- already here - if n == d[1]-1 then -- right before: - if prev and (prev[2] == n-1) then + if n == d[1] - 1 then -- right before: + if prev and (prev[2] == n - 1) then prev[2] = d[2] table.remove(chunks, i) return @@ -196,17 +209,20 @@ function mcl_vars.add_chunk(pos) d[1] = n return end - if prev and (prev[2] == n-1) then --join to previous + if prev and (prev[2] == n - 1) then --join to previous prev[2] = n return end - table.insert(chunks, i, {n, n}) -- insert new interval before i + table.insert(chunks, i, { n, n }) -- insert new interval before i return end prev = d end - chunks[#chunks+1] = {n, n} + chunks[#chunks + 1] = { n, n } end + +---@param pos Vector +---@return boolean function mcl_vars.is_generated(pos) local n = mcl_vars.get_chunk_number(pos) -- unsigned int for i, d in pairs(chunks) do @@ -217,47 +233,46 @@ function mcl_vars.is_generated(pos) return false end --- "Trivial" (actually NOT) function to just read the node and some stuff to not just return "ignore", like mt 5.4 does. --- p: Position, if it's wrong, {name="error"} node will return. --- force: optional (default: false) - Do the maximum to still read the node within us_timeout. --- us_timeout: optional (default: 244 = 0.000244 s = 1/80/80/80), set it at least to 3000000 to let mapgen to finish its job. --- --- returns node definition, eg. {name="air"}. Unfortunately still can return {name="ignore"}. -function mcl_vars.get_node(p, force, us_timeout) +---"Trivial" (actually NOT) function to just read the node and some stuff to not just return "ignore", like mt 5.4 does. +---@param pos Vector Position, if it's wrong, `{name="error"}` node will return. +---@param force? boolean Optional (default: `false`), Do the maximum to still read the node within us_timeout. +---@param us_timeout? number Optional (default: `244 = 0.000244 s = 1/80/80/80`), set it at least to `3000000` to let mapgen to finish its job +---@return node # Node definition, eg. `{name="air"}`. Unfortunately still can return `{name="ignore"}`. +---@nodiscard +function mcl_vars.get_node(pos, force, us_timeout) -- check initial circumstances - if not p or not p.x or not p.y or not p.z then return {name="error"} end + if not pos or not pos.x or not pos.y or not pos.z then return { name = "error" } end -- try common way - local node = minetest.get_node(p) + local node = minetest.get_node(pos) if node.name ~= "ignore" then return node end - -- copy table to get sure it won't changed by other threads - local pos = {x=p.x,y=p.y,z=p.z} + -- copy vector to get sure it won't changed by other threads + local pos_copy = vector.copy(pos) -- try LVM - minetest.get_voxel_manip():read_from_map(pos, pos) - node = minetest.get_node(pos) + minetest.get_voxel_manip():read_from_map(pos_copy, pos_copy) + node = minetest.get_node(pos_copy) if node.name ~= "ignore" or not force then return node end -- all ways failed - need to emerge (or forceload if generated) - local us_timeout = us_timeout or 244 - if mcl_vars.is_generated(pos) then + if mcl_vars.is_generated(pos_copy) then minetest.chat_send_all("IMPOSSIBLE! Please report this to MCL2 issue tracker!") - minetest.forceload_block(pos) + minetest.forceload_block(pos_copy) else - minetest.emerge_area(pos, pos) + minetest.emerge_area(pos_copy, pos_copy) end local t = minetest.get_us_time() - node = minetest.get_node(pos) + node = minetest.get_node(pos_copy) - while (not node or node.name == "ignore") and (minetest.get_us_time() - t < us_timeout) do - node = minetest.get_node(pos) + while (not node or node.name == "ignore") and (minetest.get_us_time() - t < (us_timeout or 244)) do + node = minetest.get_node(pos_copy) end return node diff --git a/mods/CORE/mcl_sounds/README.txt b/mods/CORE/mcl_sounds/README.txt index 9fc2ba28f0..2ede2c1f9e 100644 --- a/mods/CORE/mcl_sounds/README.txt +++ b/mods/CORE/mcl_sounds/README.txt @@ -11,42 +11,22 @@ Creative Commons Attribution 3.0 Unported (CC BY-SA 3.0) http://creativecommons.org/licenses/by/3.0/ Glass breaking sounds (CC BY 3.0): - 1: http://www.freesound.org/people/cmusounddesign/sounds/71947/ - 2: http://www.freesound.org/people/Tomlija/sounds/97669/ - 3: http://www.freesound.org/people/lsprice/sounds/88808/ + 1: http://www.freesound.org/people/cmusounddesign/sounds/71947/ + 2: http://www.freesound.org/people/Tomlija/sounds/97669/ + 3: http://www.freesound.org/people/lsprice/sounds/88808/ default_tool_breaks.ogg by EdgardEdition (CC BY 3.0), http://www.freesound.org/people/EdgardEdition Mito551 (sounds) (CC BY-SA 3.0): - default_dig_choppy.ogg - default_dig_cracky.ogg - default_dig_crumbly.1.ogg - default_dig_crumbly.2.ogg + default_dig_crumbly.ogg default_dig_oddly_breakable_by_hand.ogg - default_dug_node.1.ogg - default_dug_node.2.ogg - default_grass_footstep.1.ogg - default_grass_footstep.2.ogg - default_grass_footstep.3.ogg - default_gravel_footstep.1.ogg - default_gravel_footstep.2.ogg - default_gravel_footstep.3.ogg - default_gravel_footstep.4.ogg - default_grass_footstep.1.ogg - default_place_node.1.ogg - default_place_node.2.ogg - default_place_node.3.ogg - default_place_node_hard.1.ogg - default_place_node_hard.2.ogg - default_hard_footstep.1.ogg - default_hard_footstep.2.ogg - default_hard_footstep.3.ogg - default_sand_footstep.1.ogg - default_sand_footstep.2.ogg - default_wood_footstep.1.ogg - default_wood_footstep.2.ogg - default_dirt_footstep.1.ogg - default_dirt_footstep.2.ogg + default_dug_node.*.ogg + default_grass_footstep.*.ogg + default_gravel_footstep.*.ogg + default_place_node.*.ogg + default_place_node_hard.*.ogg + default_wood_footstep.*.ogg + default_dirt_footstep.*.ogg default_glass_footstep.ogg Metal sounds: @@ -54,35 +34,64 @@ Metal sounds: - https://www.freesound.org/people/yadronoff/sounds/320397/ default_dug_metal.*.ogg - Iwan Gabovitch - qubodup - CC0 - http://opengameart.org/users/qubodup - default_metal_footstep.*.ogg - Ottomaani138 - CC0 - - https://www.freesound.org/people/Ottomaani138/sounds/232692/ + default_metal_footstep.*.ogg - (CC0 1.0) - CC0 1.0 + - https://freesound.org/people/mypantsfelldown/sounds/398937/ default_place_node_metal.*.ogg - Ogrebane - CC0 - http://opengameart.org/content/wood-and-metal-sound-effects-volume-2 -AGFX (CC BY 3.0) +AGFX (CC BY 3.0): https://www.freesound.org/people/AGFX/packs/1253/ - default_water_footstep.1.ogg - default_water_footstep.2.ogg - default_water_footstep.3.ogg -(default_water_footstep.4.ogg is silent) + default_water_footstep.*.ogg -blukotek (CC0 1.0) +blukotek (CC0 1.0): https://www.freesound.org/people/blukotek/sounds/251660/ default_dig_snappy.ogg -sonictechtonic (CC BY 3.0) +sonictechtonic (CC BY 3.0): https://www.freesound.org/people/sonictechtonic/sounds/241872/ player_damage.ogg -Voxelands project (CC BY-SA 3.0) +Sheyvan (CC0 1.0): +https://freesound.org/people/Sheyvan/sounds/476113/ + default_dig_choppy.*.ogg + +lolamadeus (CC0 1.0): +https://freesound.org/people/lolamadeus/sounds/179341/ + default_gravel_dig.*.ogg + default_gravel_dug.*.ogg + +Benboncan (CC BY 3.0): +https://freesound.org/people/Benboncan/sounds/71823/ + default_dig_cracky.*.ogg + +Erdie (CC BY 3.0): +https://freesound.org/people/Erdie/sounds/41579/ + default_hard_footstep.*.ogg + +worthahep88 (CC0 1.0): +https://freesound.org/people/worthahep88/sounds/319224/ + default_sand_footstep.*.ogg + +dheming (CC BY 3.0): +https://freesound.org/people/dheming/sounds/268023/ + default_ice_dig.*.ogg + +InspectorJ (CC BY 3.0): +https://freesound.org/people/InspectorJ/sounds/416967/ + default_ice_footstep.*.ogg + +Angel_Perez_Grandi (CC BY 3.0): +https://freesound.org/people/Angel_Perez_Grandi/sounds/49190/ + default_ice_dug.ogg + +Voxelands project (CC BY-SA 3.0): mcl_sounds_place_node_water.ogg mcl_sounds_dug_water.ogg (Note: Artists from the Voxelands project include: sdzen, darkrose, sapier, Tom Peter, Telaron, juskiddink) -Michel Baradari (CC BY 3.0) - +Michel Baradari (CC BY 3.0): default_place_node_lava.ogg Adam_N (CC0 1.0): @@ -90,7 +99,7 @@ Adam_N (CC0 1.0): Source: Alecia Shepherd (CC BY-SA 4.0): - mcl_sounds_cloth.ogg + mcl_sounds_cloth.*.ogg Source: SnowSong sound and music pack Unknown authors (WTFPL): diff --git a/mods/CORE/mcl_sounds/init.lua b/mods/CORE/mcl_sounds/init.lua index 13ca7bf720..30157060c0 100644 --- a/mods/CORE/mcl_sounds/init.lua +++ b/mods/CORE/mcl_sounds/init.lua @@ -11,7 +11,7 @@ function mcl_sounds.node_sound_defaults(table) table.dug = table.dug or {name="default_dug_node", gain=0.25} table.dig = table.dig or - {name="default_dig_oddly_breakable_by_hand", gain=1.0} + {name="default_dig_oddly_breakable_by_hand", gain=0.5} table.place = table.place or {name="default_place_node_hard", gain=1.0} return table @@ -20,11 +20,11 @@ end function mcl_sounds.node_sound_stone_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_hard_footstep", gain=0.5} + {name="default_hard_footstep", gain=0.2} table.dug = table.dug or {name="default_hard_footstep", gain=1.0} table.dig = table.dig or - {name="default_dig_cracky", gain=1.0} + {name="default_dig_cracky", gain=0.5} mcl_sounds.node_sound_defaults(table) return table end @@ -32,13 +32,13 @@ end function mcl_sounds.node_sound_metal_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_metal_footstep", gain=0.5} + {name="default_metal_footstep", gain=0.2} table.dug = table.dug or - {name="default_dug_metal", gain=1.0} + {name="default_dug_metal", gain=0.5} table.dig = table.dig or - {name="default_dig_metal", gain=1.0} + {name="default_dig_metal", gain=0.5} table.place = table.place or - {name="default_place_node_metal", gain=1.0} + {name="default_place_node_metal", gain=0.5} mcl_sounds.node_sound_defaults(table) return table end @@ -46,11 +46,11 @@ end function mcl_sounds.node_sound_dirt_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_dirt_footstep", gain=1.0} + {name="default_dirt_footstep", gain=0.25} table.dug = table.dug or - {name="default_dirt_footstep", gain=1.5} + {name="default_dirt_footstep", gain=1.0} table.dig = table.dig or - {name="default_dig_crumbly", gain=1.0} + {name="default_dig_crumbly", gain=0.4} table.place = table.place or {name="default_place_node", gain=1.0} mcl_sounds.node_sound_defaults(table) @@ -60,11 +60,25 @@ end function mcl_sounds.node_sound_sand_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_sand_footstep", gain=0.5} + {name="default_sand_footstep", gain=0.05} table.dug = table.dug or - {name="default_sand_footstep", gain=1.0} + {name="default_sand_footstep", gain=0.15} table.dig = table.dig or - {name="default_dig_crumbly", gain=1.0} + {name="default_dig_crumbly", gain=0.4} + table.place = table.place or + {name="default_place_node", gain=1.0} + mcl_sounds.node_sound_defaults(table) + return table +end + +function mcl_sounds.node_sound_gravel_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name="default_gravel_footstep", gain=0.25} + table.dug = table.dug or + {name="default_gravel_dug", gain=1.0} + table.dig = table.dig or + {name="default_gravel_dig", gain=0.35} table.place = table.place or {name="default_place_node", gain=1.0} mcl_sounds.node_sound_defaults(table) @@ -78,21 +92,33 @@ function mcl_sounds.node_sound_snow_defaults(table) table.dug = table.dug or {name="pedology_snow_soft_footstep", gain=1.0} table.dig = table.dig or - {name="default_dig_crumbly", gain=1.0} + {name="pedology_snow_soft_footstep", gain=1.0} table.place = table.place or {name="default_place_node", gain=1.0} mcl_sounds.node_sound_defaults(table) return table end +function mcl_sounds.node_sound_ice_defaults(table) + table = table or {} + table.footstep = table.footstep or + {name="default_ice_footstep", gain=0.15} + table.dug = table.dug or + {name="default_ice_dug", gain=0.5} + table.dig = table.dig or + {name="default_ice_dig", gain=0.5} + mcl_sounds.node_sound_defaults(table) + return table +end + function mcl_sounds.node_sound_wood_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_wood_footstep", gain=0.5} + {name="default_wood_footstep", gain=0.15} table.dug = table.dug or {name="default_wood_footstep", gain=1.0} table.dig = table.dig or - {name="default_dig_choppy", gain=1.0} + {name="default_dig_choppy", gain=0.4} mcl_sounds.node_sound_defaults(table) return table end @@ -128,11 +154,11 @@ end function mcl_sounds.node_sound_glass_defaults(table) table = table or {} table.footstep = table.footstep or - {name="default_glass_footstep", gain=0.5} + {name="default_glass_footstep", gain=0.3} table.dug = table.dug or {name="default_break_glass", gain=1.0} table.dig = table.dig or - {name="default_dig_cracky", gain=1.0} + {name="default_dig_cracky", gain=0.5} mcl_sounds.node_sound_defaults(table) return table end diff --git a/mods/CORE/mcl_sounds/sounds/default_dig_choppy.1.ogg b/mods/CORE/mcl_sounds/sounds/default_dig_choppy.1.ogg new file mode 100644 index 0000000000..95fa6d4e72 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_dig_choppy.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_dig_choppy.2.ogg b/mods/CORE/mcl_sounds/sounds/default_dig_choppy.2.ogg new file mode 100644 index 0000000000..5d3a04443d Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_dig_choppy.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_dig_choppy.3.ogg b/mods/CORE/mcl_sounds/sounds/default_dig_choppy.3.ogg new file mode 100644 index 0000000000..2bb0aceb54 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_dig_choppy.3.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_dig_choppy.ogg b/mods/CORE/mcl_sounds/sounds/default_dig_choppy.ogg deleted file mode 100644 index e2ecd8416a..0000000000 Binary files a/mods/CORE/mcl_sounds/sounds/default_dig_choppy.ogg and /dev/null differ diff --git a/mods/CORE/mcl_sounds/sounds/default_dig_cracky.1.ogg b/mods/CORE/mcl_sounds/sounds/default_dig_cracky.1.ogg new file mode 100644 index 0000000000..ffced27a6f Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_dig_cracky.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_dig_cracky.2.ogg b/mods/CORE/mcl_sounds/sounds/default_dig_cracky.2.ogg new file mode 100644 index 0000000000..d9e8010393 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_dig_cracky.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_dig_cracky.3.ogg b/mods/CORE/mcl_sounds/sounds/default_dig_cracky.3.ogg new file mode 100644 index 0000000000..7d19d40824 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_dig_cracky.3.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_dig_cracky.ogg b/mods/CORE/mcl_sounds/sounds/default_dig_cracky.ogg deleted file mode 100644 index da11679161..0000000000 Binary files a/mods/CORE/mcl_sounds/sounds/default_dig_cracky.ogg and /dev/null differ diff --git a/mods/CORE/mcl_sounds/sounds/default_dirt_footstep.1.ogg b/mods/CORE/mcl_sounds/sounds/default_dirt_footstep.1.ogg index 84a197d2b0..201aa3b2da 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_dirt_footstep.1.ogg and b/mods/CORE/mcl_sounds/sounds/default_dirt_footstep.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_dirt_footstep.2.ogg b/mods/CORE/mcl_sounds/sounds/default_dirt_footstep.2.ogg index 2e23b8a2bd..2667dbc210 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_dirt_footstep.2.ogg and b/mods/CORE/mcl_sounds/sounds/default_dirt_footstep.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_grass_footstep.1.ogg b/mods/CORE/mcl_sounds/sounds/default_grass_footstep.1.ogg index 22d1ad6b82..a04cdb47c0 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_grass_footstep.1.ogg and b/mods/CORE/mcl_sounds/sounds/default_grass_footstep.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_grass_footstep.2.ogg b/mods/CORE/mcl_sounds/sounds/default_grass_footstep.2.ogg index 4ccd8a0f3a..d193068d21 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_grass_footstep.2.ogg and b/mods/CORE/mcl_sounds/sounds/default_grass_footstep.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_grass_footstep.3.ogg b/mods/CORE/mcl_sounds/sounds/default_grass_footstep.3.ogg index 20db84eda3..e1897ea383 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_grass_footstep.3.ogg and b/mods/CORE/mcl_sounds/sounds/default_grass_footstep.3.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_gravel_dig.1.ogg b/mods/CORE/mcl_sounds/sounds/default_gravel_dig.1.ogg new file mode 100644 index 0000000000..baf8fca717 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_gravel_dig.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_gravel_dig.2.ogg b/mods/CORE/mcl_sounds/sounds/default_gravel_dig.2.ogg new file mode 100644 index 0000000000..e0c0c50f95 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_gravel_dig.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_gravel_dug.1.ogg b/mods/CORE/mcl_sounds/sounds/default_gravel_dug.1.ogg new file mode 100644 index 0000000000..1303433559 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_gravel_dug.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_gravel_dug.2.ogg b/mods/CORE/mcl_sounds/sounds/default_gravel_dug.2.ogg new file mode 100644 index 0000000000..ee5ed3309d Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_gravel_dug.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_gravel_dug.3.ogg b/mods/CORE/mcl_sounds/sounds/default_gravel_dug.3.ogg new file mode 100644 index 0000000000..add4c54bf2 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_gravel_dug.3.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_hard_footstep.1.ogg b/mods/CORE/mcl_sounds/sounds/default_hard_footstep.1.ogg index 1748bc56a3..0a08efa8d2 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_hard_footstep.1.ogg and b/mods/CORE/mcl_sounds/sounds/default_hard_footstep.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_hard_footstep.2.ogg b/mods/CORE/mcl_sounds/sounds/default_hard_footstep.2.ogg index fe39fd784b..be52a87011 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_hard_footstep.2.ogg and b/mods/CORE/mcl_sounds/sounds/default_hard_footstep.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_hard_footstep.3.ogg b/mods/CORE/mcl_sounds/sounds/default_hard_footstep.3.ogg index 5030e0607a..a342787dd0 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_hard_footstep.3.ogg and b/mods/CORE/mcl_sounds/sounds/default_hard_footstep.3.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_ice_dig.1.ogg b/mods/CORE/mcl_sounds/sounds/default_ice_dig.1.ogg new file mode 100644 index 0000000000..97399c8310 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_ice_dig.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_ice_dig.2.ogg b/mods/CORE/mcl_sounds/sounds/default_ice_dig.2.ogg new file mode 100644 index 0000000000..8a5da119b3 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_ice_dig.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_ice_dig.3.ogg b/mods/CORE/mcl_sounds/sounds/default_ice_dig.3.ogg new file mode 100644 index 0000000000..765fb9be1b Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_ice_dig.3.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_ice_dug.ogg b/mods/CORE/mcl_sounds/sounds/default_ice_dug.ogg new file mode 100644 index 0000000000..ae37673e09 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_ice_dug.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_ice_footstep.1.ogg b/mods/CORE/mcl_sounds/sounds/default_ice_footstep.1.ogg new file mode 100644 index 0000000000..c235f1eff7 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_ice_footstep.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_ice_footstep.2.ogg b/mods/CORE/mcl_sounds/sounds/default_ice_footstep.2.ogg new file mode 100644 index 0000000000..61d2c990fe Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_ice_footstep.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_ice_footstep.3.ogg b/mods/CORE/mcl_sounds/sounds/default_ice_footstep.3.ogg new file mode 100644 index 0000000000..2ecbb431c0 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_ice_footstep.3.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_metal_footstep.1.ogg b/mods/CORE/mcl_sounds/sounds/default_metal_footstep.1.ogg index 841286bdc3..49fe89ba84 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_metal_footstep.1.ogg and b/mods/CORE/mcl_sounds/sounds/default_metal_footstep.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_metal_footstep.2.ogg b/mods/CORE/mcl_sounds/sounds/default_metal_footstep.2.ogg index aa61ed3386..878711d5bc 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_metal_footstep.2.ogg and b/mods/CORE/mcl_sounds/sounds/default_metal_footstep.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_metal_footstep.3.ogg b/mods/CORE/mcl_sounds/sounds/default_metal_footstep.3.ogg index 4cc1ca47a3..2a566a83ae 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_metal_footstep.3.ogg and b/mods/CORE/mcl_sounds/sounds/default_metal_footstep.3.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_sand_footstep.1.ogg b/mods/CORE/mcl_sounds/sounds/default_sand_footstep.1.ogg index 65b68c7e6e..b92feabbb2 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_sand_footstep.1.ogg and b/mods/CORE/mcl_sounds/sounds/default_sand_footstep.1.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_sand_footstep.2.ogg b/mods/CORE/mcl_sounds/sounds/default_sand_footstep.2.ogg index 57f35f30a2..6bc5da3e86 100644 Binary files a/mods/CORE/mcl_sounds/sounds/default_sand_footstep.2.ogg and b/mods/CORE/mcl_sounds/sounds/default_sand_footstep.2.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_sand_footstep.3.ogg b/mods/CORE/mcl_sounds/sounds/default_sand_footstep.3.ogg new file mode 100644 index 0000000000..880306fd39 Binary files /dev/null and b/mods/CORE/mcl_sounds/sounds/default_sand_footstep.3.ogg differ diff --git a/mods/CORE/mcl_sounds/sounds/default_water_footstep.4.ogg b/mods/CORE/mcl_sounds/sounds/default_water_footstep.4.ogg deleted file mode 100644 index 6f1eab8245..0000000000 Binary files a/mods/CORE/mcl_sounds/sounds/default_water_footstep.4.ogg and /dev/null differ diff --git a/mods/ENTITIES/mcl_boats/init.lua b/mods/ENTITIES/mcl_boats/init.lua index 003af5066a..b4d98b1e29 100644 --- a/mods/ENTITIES/mcl_boats/init.lua +++ b/mods/ENTITIES/mcl_boats/init.lua @@ -109,6 +109,7 @@ local function attach_object(self, obj) end local function detach_object(obj, change_pos) + if not obj or not obj:get_pos() then return end obj:set_detach() obj:set_properties({visual_size = get_visual_size(obj)}) if obj:is_player() then diff --git a/mods/ENTITIES/mcl_boats/locale/mcl_boats.ja.tr b/mods/ENTITIES/mcl_boats/locale/mcl_boats.ja.tr new file mode 100644 index 0000000000..05ff22b1bc --- /dev/null +++ b/mods/ENTITIES/mcl_boats/locale/mcl_boats.ja.tr @@ -0,0 +1,13 @@ +# textdomain: mcl_boats +Acacia Boat=アカシアのボート +Birch Boat=シラカバのボート +Boat=ボート +Boats are used to travel on the surface of water.=ボートは、水面を移動するために使われます。 +Dark Oak Boat=ダークオークのボート +Jungle Boat=ジャングルのボート +Oak Boat=オークのボート +Rightclick on a water source to place the boat. Rightclick the boat to enter it. Use [Left] and [Right] to steer, [Forwards] to speed up and [Backwards] to slow down or move backwards. Use [Sneak] to leave the boat, punch the boat to make it drop as an item.=水源を右クリックすると、ボートが配置されます。ボートを右クリックすると、乗り込みます。[左][右]で舵取り、[前]で加速、[後]で減速または後退します。[スニーク]でボートから離れ、ボートをパンチするとアイテムとしてドロップします。 +Spruce Boat=トウヒのボート +Water vehicle=水上用の乗物 +Sneak to dismount=スニークで降りる +Obsidian Boat=黒曜石のボート \ No newline at end of file diff --git a/mods/ENTITIES/mcl_entity_invs/init.lua b/mods/ENTITIES/mcl_entity_invs/init.lua index cc2badec0c..35af491e1d 100644 --- a/mods/ENTITIES/mcl_entity_invs/init.lua +++ b/mods/ENTITIES/mcl_entity_invs/init.lua @@ -2,6 +2,10 @@ mcl_entity_invs = {} local open_invs = {} +local function mcl_log (message) + mcl_util.mcl_log (message, "[Entity Invs]") +end + local function check_distance(inv,player,count) for _,o in pairs(minetest.get_objects_inside_radius(player:get_pos(),5)) do local l = o:get_luaentity() @@ -22,20 +26,25 @@ local inv_callbacks = { end, } -local function load_inv(ent,size) +function mcl_entity_invs.load_inv(ent,size) + mcl_log("load_inv") if not ent._inv_id then return end + mcl_log("load_inv 2") local inv = minetest.get_inventory({type="detached", name=ent._inv_id}) if not inv then + mcl_log("load_inv 3") inv = minetest.create_detached_inventory(ent._inv_id, inv_callbacks) inv:set_size("main", size) if ent._items then inv:set_list("main",ent._items) end + else + mcl_log("load_inv 4") end return inv end -local function save_inv(ent) +function mcl_entity_invs.save_inv(ent) if ent._inv then ent._items = {} for i,it in ipairs(ent._inv:get_list("main")) do @@ -46,32 +55,60 @@ local function save_inv(ent) end end +local function load_default_formspec (ent, text) + text = text or "" + + local invent_size = ent._inv_size + local div_by_two = invent_size % 2 == 0 + local div_by_three = invent_size % 3 == 0 + + --mcl_log("Div by 3: ".. tostring(div_by_three)) + --mcl_log("Div by 2: ".. tostring(div_by_two)) + --mcl_log("invent_size: ".. tostring(invent_size)) + local rows = 3 + if invent_size > 18 or (div_by_three == true and invent_size > 8) then + --mcl_log("Div by 3") + rows = 3 + elseif (div_by_two == true and invent_size > 3) or invent_size > 9 then + --mcl_log("Div by 2") + rows = 2 + else + --mcl_log("Not div by 2 or 3") + rows = 1 + end + + --local rows = 3 + local cols = (math.ceil(ent._inv_size/rows)) + local spacing = (9 - cols) / 2 + + local formspec = "size[9,8.75]" + .. "label[0,0;" .. minetest.formspec_escape( + minetest.colorize("#313131", ent._inv_title .. " ".. text)) .. "]" + .. "list[detached:"..ent._inv_id..";main;"..spacing..",0.5;"..cols..","..rows..";]" + .. mcl_formspec.get_itemslot_bg(spacing,0.5,cols,rows) + .. "label[0,4.0;" .. minetest.formspec_escape( + minetest.colorize("#313131", "Inventory")) .. "]" + .. "list[current_player;main;0,4.5;9,3;9]" + .. mcl_formspec.get_itemslot_bg(0,4.5,9,3) + .. "list[current_player;main;0,7.74;9,1;]" + .. mcl_formspec.get_itemslot_bg(0,7.74,9,1) + .. "listring[detached:"..ent._inv_id..";main]" + .. "listring[current_player;main]" + return formspec +end + + function mcl_entity_invs.show_inv_form(ent,player,text) if not ent._inv_id then return end if not open_invs[ent] then open_invs[ent] = 0 end - text = text or "" - ent._inv = load_inv(ent,ent._inv_size) + ent._inv = mcl_entity_invs.load_inv(ent,ent._inv_size) open_invs[ent] = open_invs[ent] + 1 + local playername = player:get_player_name() - local rows = 3 - local cols = (math.ceil(ent._inv_size/rows)) - local spacing = (9 - cols) / 2 - local formspec = "size[9,8.75]" - .. "label[0,0;" .. minetest.formspec_escape( - minetest.colorize("#313131", ent._inv_title .. " ".. text)) .. "]" - .. "list[detached:"..ent._inv_id..";main;"..spacing..",0.5;"..cols..","..rows..";]" - .. mcl_formspec.get_itemslot_bg(spacing,0.5,cols,rows) - .. "label[0,4.0;" .. minetest.formspec_escape( - minetest.colorize("#313131", "Inventory")) .. "]" - .. "list[current_player;main;0,4.5;9,3;9]" - .. mcl_formspec.get_itemslot_bg(0,4.5,9,3) - .. "list[current_player;main;0,7.74;9,1;]" - .. mcl_formspec.get_itemslot_bg(0,7.74,9,1) - .. "listring[detached:"..ent._inv_id..";main]" - .. "listring[current_player;main]" - minetest.show_formspec(playername,ent._inv_id,formspec) + + minetest.show_formspec(playername, ent._inv_id, load_default_formspec (ent, text)) end local function drop_inv(ent) @@ -85,9 +122,9 @@ local function drop_inv(ent) end local function on_remove(self,killer,oldf) - save_inv(self) - drop_inv(self) - if oldf then return oldf(self,killer) end + mcl_entity_invs.save_inv(self) + drop_inv(self) + if oldf then return oldf(self,killer) end end minetest.register_on_player_receive_fields(function(player, formname, fields) @@ -95,7 +132,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) if formname == k._inv_id then open_invs[k] = open_invs[k] - 1 if open_invs[k] < 1 then - save_inv(k) + mcl_entity_invs.save_inv(k) open_invs[k] = nil end end @@ -151,7 +188,7 @@ function mcl_entity_invs.register_inv(entity_name,show_name,size,no_on_righclick local old_ode = minetest.registered_entities[entity_name].on_deactivate minetest.registered_entities[entity_name].on_deactivate = function(self,removal) - save_inv(self) + mcl_entity_invs.save_inv(self) if removal then on_remove(self) end diff --git a/mods/ENTITIES/mcl_item_entity/README.txt b/mods/ENTITIES/mcl_item_entity/README.txt index 41e9e6e575..d39ec0ba9a 100644 --- a/mods/ENTITIES/mcl_item_entity/README.txt +++ b/mods/ENTITIES/mcl_item_entity/README.txt @@ -25,4 +25,10 @@ http://minetest.net/ DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - 0. You just DO WHAT THE FUCK YOU WANT TO. + 0. You just DO WHAT THE FUCK YOU WANT TO. + +--------- + +Alterations and contributions are released under GNU GPLv3 after 11/11/2022 and for contributors: + +AncientMariner/ancientmarinerdev \ No newline at end of file diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index 5d91a6aad6..60cfe9dd9d 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -6,22 +6,25 @@ local pool = {} local tick = false + +local LOGGING_ON = minetest.settings:get_bool("mcl_logging_item_entities", false) +local function mcl_log(message) + if LOGGING_ON then + mcl_util.mcl_log(message, "[Item Entities]", true) + end +end + minetest.register_on_joinplayer(function(player) - local name - name = player:get_player_name() - pool[name] = 0 + pool[player:get_player_name()] = 0 end) minetest.register_on_leaveplayer(function(player) - local name - name = player:get_player_name() - pool[name] = nil + pool[player:get_player_name()] = nil end) - local has_awards = minetest.get_modpath("awards") -local mcl_item_entity = {} +mcl_item_entity = {} --basic settings local item_drop_settings = {} --settings table @@ -36,22 +39,29 @@ item_drop_settings.random_item_velocity = true --this sets random item velocity item_drop_settings.drop_single_item = false --if true, the drop control drops 1 item instead of the entire stack, and sneak+drop drops the stack -- drop_single_item is disabled by default because it is annoying to throw away items from the intentory screen -item_drop_settings.magnet_time = 0.75 -- how many seconds an item follows the player before giving up +item_drop_settings.magnet_time = 0.75 -- how many seconds an item follows the player before giving up local function get_gravity() return tonumber(minetest.settings:get("movement_gravity")) or 9.81 end -local registered_pickup_achievement = {} +mcl_item_entity.registered_pickup_achievement = {} ---TODO: remove limitation of 1 award per itemname +---Register an achievement that will be unlocked on pickup. +--- +---TODO: remove limitation of 1 award per itemname +---@param itemname string +---@param award string function mcl_item_entity.register_pickup_achievement(itemname, award) if not has_awards then - minetest.log("warning", "[mcl_item_entity] Trying to register pickup achievement ["..award.."] for ["..itemname.."] while awards missing") - elseif registered_pickup_achievement[itemname] then - minetest.log("error", "[mcl_item_entity] Trying to register already existing pickup achievement ["..award.."] for ["..itemname.."]") + minetest.log("warning", + "[mcl_item_entity] Trying to register pickup achievement [" .. award .. "] for [" .. + itemname .. "] while awards missing") + elseif mcl_item_entity.registered_pickup_achievement[itemname] then + minetest.log("error", + "[mcl_item_entity] Trying to register already existing pickup achievement [" .. award .. "] for [" .. itemname .. "]") else - registered_pickup_achievement[itemname] = award + mcl_item_entity.registered_pickup_achievement[itemname] = award end end @@ -64,11 +74,13 @@ mcl_item_entity.register_pickup_achievement("mcl_nether:ancient_debris", "mcl:hi mcl_item_entity.register_pickup_achievement("mcl_end:dragon_egg", "mcl:PickUpDragonEgg") mcl_item_entity.register_pickup_achievement("mcl_armor:elytra", "mcl:skysTheLimit") +---@param object ObjectRef +---@param player ObjectRef local function check_pickup_achievements(object, player) if has_awards then local itemname = ItemStack(object:get_luaentity().itemstring):get_name() local playername = player:get_player_name() - for name,award in pairs(registered_pickup_achievement) do + for name, award in pairs(mcl_item_entity.registered_pickup_achievement) do if itemname == name or minetest.get_item_group(itemname, name) ~= 0 then awards.unlock(playername, award) end @@ -76,16 +88,23 @@ local function check_pickup_achievements(object, player) end end +---@param object ObjectRef +---@param luaentity Luaentity +---@param ignore_check? boolean local function enable_physics(object, luaentity, ignore_check) if luaentity.physical_state == false or ignore_check == true then luaentity.physical_state = true object:set_properties({ physical = true }) - object:set_acceleration({x=0,y=-get_gravity(),z=0}) + object:set_acceleration(vector.new(0, -get_gravity(), 0)) end end +---@param object ObjectRef +---@param luaentity Luaentity +---@param ignore_check? boolean +---@param reset_movement? boolean local function disable_physics(object, luaentity, ignore_check, reset_movement) if luaentity.physical_state == true or ignore_check == true then luaentity.physical_state = false @@ -93,17 +112,16 @@ local function disable_physics(object, luaentity, ignore_check, reset_movement) physical = false }) if reset_movement ~= false then - object:set_velocity({x=0,y=0,z=0}) - object:set_acceleration({x=0,y=0,z=0}) + object:set_velocity(vector.zero()) + object:set_acceleration(vector.zero()) end end end - -minetest.register_globalstep(function(dtime) +minetest.register_globalstep(function(_) tick = not tick - for _,player in pairs(minetest.get_connected_players()) do + for _, player in pairs(minetest.get_connected_players()) do if player:get_hp() > 0 or not minetest.settings:get_bool("enable_damage") then local name = player:get_player_name() @@ -115,7 +133,7 @@ minetest.register_globalstep(function(dtime) pos = pos, gain = 0.3, max_hear_distance = 16, - pitch = math.random(70,110)/100 + pitch = math.random(70, 110) / 100 }) if pool[name] > 6 then pool[name] = 6 @@ -125,15 +143,18 @@ minetest.register_globalstep(function(dtime) end - local inv = player:get_inventory() - local checkpos = {x=pos.x,y=pos.y + item_drop_settings.player_collect_height,z=pos.z} + local checkpos = vector.offset(pos, 0, item_drop_settings.player_collect_height, 0) --magnet and collection - for _,object in pairs(minetest.get_objects_inside_radius(checkpos, item_drop_settings.xp_radius_magnet)) do - if not object:is_player() and vector.distance(checkpos, object:get_pos()) < item_drop_settings.radius_magnet and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and object:get_luaentity()._magnet_timer and (object:get_luaentity()._insta_collect or (object:get_luaentity().age > item_drop_settings.age)) then + for _, object in pairs(minetest.get_objects_inside_radius(checkpos, item_drop_settings.xp_radius_magnet)) do + if not object:is_player() and vector.distance(checkpos, object:get_pos()) < item_drop_settings.radius_magnet and + object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and object:get_luaentity()._magnet_timer + and (object:get_luaentity()._insta_collect or (object:get_luaentity().age > item_drop_settings.age)) then - if object:get_luaentity()._magnet_timer >= 0 and object:get_luaentity()._magnet_timer < item_drop_settings.magnet_time and inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then + if object:get_luaentity()._magnet_timer >= 0 and + object:get_luaentity()._magnet_timer < item_drop_settings.magnet_time and inv and + inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then -- Collection if not object:get_luaentity()._removed then @@ -148,8 +169,8 @@ minetest.register_globalstep(function(dtime) object:get_luaentity().target = checkpos object:get_luaentity()._removed = true - object:set_velocity({x=0,y=0,z=0}) - object:set_acceleration({x=0,y=0,z=0}) + object:set_velocity(vector.zero()) + object:set_acceleration(vector.zero()) object:move_to(checkpos) @@ -169,7 +190,6 @@ minetest.register_globalstep(function(dtime) local entity = object:get_luaentity() entity.collector = player:get_player_name() entity.collected = true - end end @@ -184,6 +204,11 @@ end) local tmp_id = 0 +---@param drop string|drop_definition +---@param toolname string +---@param param2 integer +---@param paramtype2 paramtype2 +---@return string[] local function get_drops(drop, toolname, param2, paramtype2) tmp_id = tmp_id + 1 local tmp_node_name = "mcl_item_entity:" .. tmp_id @@ -192,7 +217,7 @@ local function get_drops(drop, toolname, param2, paramtype2) drop = drop, paramtype2 = paramtype2 } - local drops = minetest.get_node_drops({name = tmp_node_name, param2 = param2}, toolname) + local drops = minetest.get_node_drops({ name = tmp_node_name, param2 = param2 }, toolname) minetest.registered_nodes[tmp_node_name] = nil return drops end @@ -255,7 +280,7 @@ function minetest.handle_node_drops(pos, drops, digger) * table: Drop every itemstring in this table when dug by shears _mcl_silk_touch_drop ]] - local enchantments = tool and mcl_enchanting.get_enchantments(tool, "silk_touch") + local enchantments = tool and mcl_enchanting.get_enchantments(tool) local silk_touch_drop = false local nodedef = minetest.registered_nodes[dug_node.name] @@ -284,7 +309,8 @@ function minetest.handle_node_drops(pos, drops, digger) local max_count = fortune_drop.max_count + fortune_level * (fortune_drop.factor or 1) local chance = fortune_drop.chance or fortune_drop.get_chance and fortune_drop.get_chance(fortune_level) if not chance or math.random() < chance then - drops = discrete_uniform_distribution(fortune_drop.multiply and drops or fortune_drop.items, min_count, max_count, fortune_drop.cap) + drops = discrete_uniform_distribution(fortune_drop.multiply and drops or fortune_drop.items, min_count, max_count, + fortune_drop.cap) elseif fortune_drop.override then drops = {} end @@ -296,13 +322,13 @@ function minetest.handle_node_drops(pos, drops, digger) end if digger and mcl_experience.throw_xp and not silk_touch_drop then - local experience_amount = minetest.get_item_group(dug_node.name,"xp") + local experience_amount = minetest.get_item_group(dug_node.name, "xp") if experience_amount > 0 then mcl_experience.throw_xp(pos, experience_amount) end end - for _,item in ipairs(drops) do + for _, item in ipairs(drops) do local count if type(item) == "string" then count = ItemStack(item):get_count() @@ -311,7 +337,7 @@ function minetest.handle_node_drops(pos, drops, digger) end local drop_item = ItemStack(item) drop_item:set_count(1) - for i=1,count do + for i = 1, count do local dpos = table.copy(pos) -- Apply offset for plantlike_rooted nodes because of their special shape if nodedef and nodedef.drawtype == "plantlike_rooted" and nodedef.walkable then @@ -338,7 +364,7 @@ end function minetest.item_drop(itemstack, dropper, pos) if dropper and dropper:is_player() then local v = dropper:get_look_dir() - local p = {x=pos.x, y=pos.y+1.2, z=pos.z} + local p = vector.offset(pos, 0, 1.2, 0) local cs = itemstack:get_count() if dropper:get_player_control().sneak then cs = 1 @@ -346,9 +372,9 @@ function minetest.item_drop(itemstack, dropper, pos) local item = itemstack:take_item(cs) local obj = minetest.add_item(p, item) if obj then - v.x = v.x*4 - v.y = v.y*4 + 2 - v.z = v.z*4 + v.x = v.x * 4 + v.y = v.y * 4 + 2 + v.z = v.z * 4 obj:set_velocity(v) -- Force collection delay obj:get_luaentity()._insta_collect = false @@ -366,27 +392,137 @@ end local function cxcz(o, cw, one, zero) if cw < 0 then - table.insert(o, { [one]=1, y=0, [zero]=0 }) - table.insert(o, { [one]=-1, y=0, [zero]=0 }) + table.insert(o, { [one] = 1, y = 0, [zero] = 0 }) + table.insert(o, { [one] = -1, y = 0, [zero] = 0 }) else - table.insert(o, { [one]=-1, y=0, [zero]=0 }) - table.insert(o, { [one]=1, y=0, [zero]=0 }) + table.insert(o, { [one] = -1, y = 0, [zero] = 0 }) + table.insert(o, { [one] = 1, y = 0, [zero] = 0 }) end return o end +local function hopper_take_item(self, pos) + --mcl_log("self.itemstring: ".. self.itemstring) + --mcl_log("self.itemstring: ".. minetest.pos_to_string(pos)) + + local objs = minetest.get_objects_inside_radius(pos, 2) + + if objs and self.itemstring then + --mcl_log("there is an itemstring. Number of objs: ".. #objs) + + for k, v in pairs(objs) do + local ent = v:get_luaentity() + + -- Don't forget actual hoppers + if ent and ent.name == "mcl_minecarts:hopper_minecart" then + local taken_items = false + + mcl_log("ent.name: " .. tostring(ent.name)) + mcl_log("ent pos: " .. tostring(ent.object:get_pos())) + + local inv = mcl_entity_invs.load_inv(ent, 5) + + if not inv then + mcl_log("No inv") + return false + end + + local current_itemstack = ItemStack(self.itemstring) + + mcl_log("inv. size: " .. ent._inv_size) + if inv:room_for_item("main", current_itemstack) then + mcl_log("Room") + inv:add_item("main", current_itemstack) + self.object:get_luaentity().itemstring = "" + self.object:remove() + taken_items = true + else + mcl_log("no Room") + end + + if not taken_items then + local items_remaining = current_itemstack:get_count() + + -- This will take part of a floating item stack if no slot can hold the full amount + for i = 1, ent._inv_size, 1 do + local stack = inv:get_stack("main", i) + + mcl_log("i: " .. tostring(i)) + mcl_log("Items remaining: " .. items_remaining) + mcl_log("Name: " .. tostring(stack:get_name())) + + if current_itemstack:get_name() == stack:get_name() then + mcl_log("We have a match. Name: " .. tostring(stack:get_name())) + + local room_for = stack:get_stack_max() - stack:get_count() + mcl_log("Room for: " .. tostring(room_for)) + + if room_for == 0 then + -- Do nothing + mcl_log("No room") + elseif room_for < items_remaining then + mcl_log("We have more items remaining than space") + + items_remaining = items_remaining - room_for + stack:set_count(stack:get_stack_max()) + inv:set_stack("main", i, stack) + taken_items = true + else + local new_stack_size = stack:get_count() + items_remaining + stack:set_count(new_stack_size) + mcl_log("We have more than enough space. Now holds: " .. new_stack_size) + + inv:set_stack("main", i, stack) + items_remaining = 0 + + self.object:get_luaentity().itemstring = "" + self.object:remove() + + taken_items = true + break + end + + mcl_log("Count: " .. tostring(stack:get_count())) + mcl_log("stack max: " .. tostring(stack:get_stack_max())) + --mcl_log("Is it empty: " .. stack:to_string()) + end + + if i == ent._inv_size and taken_items then + mcl_log("We are on last item and still have items left. Set final stack size: " .. items_remaining) + current_itemstack:set_count(items_remaining) + --mcl_log("Itemstack2: " .. current_itemstack:to_string()) + self.itemstring = current_itemstack:to_string() + end + end + end + + --Add in, and delete + if taken_items then + mcl_log("Saving") + mcl_entity_invs.save_inv(ent) + return taken_items + else + mcl_log("No need to save") + end + end + end + end + + return false +end + minetest.register_entity(":__builtin:item", { initial_properties = { hp_max = 1, physical = true, collide_with_objects = false, - collisionbox = {-0.3, -0.3, -0.3, 0.3, 0.3, 0.3}, + collisionbox = { -0.3, -0.3, -0.3, 0.3, 0.3, 0.3 }, pointable = false, visual = "wielditem", - visual_size = {x = 0.4, y = 0.4}, - textures = {""}, - spritediv = {x = 1, y = 1}, - initial_sprite_basepos = {x = 0, y = 0}, + visual_size = { x = 0.4, y = 0.4 }, + textures = { "" }, + spritediv = { x = 1, y = 1 }, + initial_sprite_basepos = { x = 0, y = 0 }, is_visible = false, infotext = "", }, @@ -424,11 +560,11 @@ minetest.register_entity(":__builtin:item", { if vel and vel.x == 0 and vel.z == 0 and self.random_velocity > 0 then local v = self.random_velocity local x = math.random(5, 10) / 10 * v - if math.random(0,10) < 5 then x = -x end + if math.random(0, 10) < 5 then x = -x end local z = math.random(5, 10) / 10 * v - if math.random(0,10) < 5 then z = -z end - local y = math.random(2,4) - self.object:set_velocity({x=x, y=y, z=z}) + if math.random(0, 10) < 5 then z = -z end + local y = math.random(2, 4) + self.object:set_velocity(vector.new(x, y, z)) end self.random_velocity = 0 end, @@ -456,7 +592,7 @@ minetest.register_entity(":__builtin:item", { local max_count = stack:get_stack_max() if count > max_count then count = max_count - self.itemstring = stack:get_name().." "..max_count + self.itemstring = stack:get_name() .. " " .. max_count end local itemtable = stack:to_table() local itemname = nil @@ -477,9 +613,9 @@ minetest.register_entity(":__builtin:item", { local prop = { is_visible = true, visual = "wielditem", - textures = {itemname}, - visual_size = {x = s, y = s}, - collisionbox = {-c, -c, -c, c, c, c}, + textures = { itemname }, + visual_size = { x = s, y = s }, + collisionbox = { -c, -c, -c, c, c, c }, automatic_rotate = math.pi * 0.5, infotext = description, glow = glow, @@ -575,9 +711,9 @@ minetest.register_entity(":__builtin:item", { self._forcestart = nil self._forcetimer = 0 - self.object:set_armor_groups({immortal = 1}) - -- self.object:set_velocity({x = 0, y = 2, z = 0}) - self.object:set_acceleration({x = 0, y = -get_gravity(), z = 0}) + self.object:set_armor_groups({ immortal = 1 }) + -- self.object:set_velocity(vector.new(0, 2, 0)) + self.object:set_acceleration(vector.new(0, -get_gravity(), 0)) self:set_item(self.itemstring) end, @@ -590,9 +726,9 @@ minetest.register_entity(":__builtin:item", { local stack = ItemStack(entity.itemstring) local name = stack:get_name() if own_stack:get_name() ~= name or - own_stack:get_meta() ~= stack:get_meta() or - own_stack:get_wear() ~= stack:get_wear() or - own_stack:get_free_space() == 0 then + own_stack:get_meta() ~= stack:get_meta() or + own_stack:get_wear() ~= stack:get_wear() or + own_stack:get_free_space() == 0 then -- Can not merge different or full stack return false end @@ -625,8 +761,8 @@ minetest.register_entity(":__builtin:item", { self.object:set_properties({ physical = false }) - self.object:set_velocity({x=0,y=0,z=0}) - self.object:set_acceleration({x=0,y=0,z=0}) + self.object:set_velocity(vector.zero()) + self.object:set_acceleration(vector.zero()) return end self.age = self.age + dtime @@ -641,15 +777,22 @@ minetest.register_entity(":__builtin:item", { -- Delete corrupted item entities. The itemstring MUST be non-empty on its first step, -- otherwise there might have some data corruption. if self.itemstring == "" then - minetest.log("warning", "Item entity with empty itemstring found at "..minetest.pos_to_string(self.object:get_pos()).. "! Deleting it now.") + minetest.log("warning", + "Item entity with empty itemstring found at " .. minetest.pos_to_string(self.object:get_pos()) .. + "! Deleting it now.") self._removed = true self.object:remove() return end local p = self.object:get_pos() - local node = minetest.get_node_or_nil(p) - local in_unloaded = (node == nil) + -- If hopper has taken item, it has gone, and no operations should be conducted on this item + if hopper_take_item(self, p) then + return + end + + local node = minetest.get_node(p) + local in_unloaded = node.name == "ignore" if in_unloaded then -- Don't infinetly fall into unloaded map @@ -659,27 +802,27 @@ minetest.register_entity(":__builtin:item", { if self.is_clock then self.object:set_properties({ - textures = {"mcl_clock:clock_" .. (mcl_worlds.clock_works(p) and mcl_clock.old_time or mcl_clock.random_frame)} + textures = { "mcl_clock:clock_" .. (mcl_worlds.clock_works(p) and mcl_clock.old_time or mcl_clock.random_frame) } }) end local nn = node.name local is_in_water = (minetest.get_item_group(nn, "liquid") ~= 0) - local nn_above = minetest.get_node({x=p.x, y=p.y+0.1, z=p.z}).name + local nn_above = minetest.get_node(vector.offset(p, 0, 0.1, 0)).name -- make sure it's more or less stationary and is at water level local sleep_threshold = 0.3 local is_floating = false local is_stationary = math.abs(self.object:get_velocity().x) < sleep_threshold - and math.abs(self.object:get_velocity().y) < sleep_threshold - and math.abs(self.object:get_velocity().z) < sleep_threshold + and math.abs(self.object:get_velocity().y) < sleep_threshold + and math.abs(self.object:get_velocity().z) < sleep_threshold if is_in_water and is_stationary then is_floating = (is_in_water and (minetest.get_item_group(nn_above, "liquid") == 0)) end if is_floating and self.physical_state == true then - self.object:set_velocity({x = 0, y = 0, z = 0}) - self.object:set_acceleration({x = 0, y = 0, z = 0}) + self.object:set_velocity(vector.zero()) + self.object:set_acceleration(vector.zero()) disable_physics(self.object, self) end -- If no collector was found for a long enough time, declare the magnet as disabled @@ -699,7 +842,7 @@ minetest.register_entity(":__builtin:item", { --Wait 2 seconds to allow mob drops to be cooked, & picked up instead of instantly destroyed. if self.age > 2 and minetest.get_item_group(self.itemstring, "fire_immune") == 0 then if dg ~= 2 then - minetest.sound_play("builtin_item_lava", {pos = self.object:get_pos(), gain = 0.5}) + minetest.sound_play("builtin_item_lava", { pos = self.object:get_pos(), gain = 0.5 }) end self._removed = true self.object:remove() @@ -739,7 +882,7 @@ minetest.register_entity(":__builtin:item", { end -- Check which one of the 4 sides is free - for o=1, #order do + for o = 1, #order do local nn = minetest.get_node(vector.add(p, order[o])).name local def = minetest.registered_nodes[nn] if def and def.walkable == false and nn ~= "ignore" then @@ -749,7 +892,7 @@ minetest.register_entity(":__builtin:item", { end -- If none of the 4 sides is free, shoot upwards if shootdir == nil then - shootdir = { x=0, y=1, z=0 } + shootdir = vector.new(0, 1, 0) local nn = minetest.get_node(vector.add(p, shootdir)).name if nn == "ignore" then -- Do not push into ignore @@ -759,7 +902,7 @@ minetest.register_entity(":__builtin:item", { -- Set new item moving speed accordingly local newv = vector.multiply(shootdir, 3) - self.object:set_acceleration({x = 0, y = 0, z = 0}) + self.object:set_acceleration(vector.zero()) self.object:set_velocity(newv) disable_physics(self.object, self, false, false) @@ -781,10 +924,10 @@ minetest.register_entity(":__builtin:item", { if self._forcetimer > 0 then local cbox = self.object:get_properties().collisionbox local ok = false - if self._force.x > 0 and (p.x > (self._forcestart.x + 0.5 + (cbox[4] - cbox[1])/2)) then ok = true - elseif self._force.x < 0 and (p.x < (self._forcestart.x + 0.5 - (cbox[4] - cbox[1])/2)) then ok = true - elseif self._force.z > 0 and (p.z > (self._forcestart.z + 0.5 + (cbox[6] - cbox[3])/2)) then ok = true - elseif self._force.z < 0 and (p.z < (self._forcestart.z + 0.5 - (cbox[6] - cbox[3])/2)) then ok = true end + if self._force.x > 0 and (p.x > (self._forcestart.x + 0.5 + (cbox[4] - cbox[1]) / 2)) then ok = true + elseif self._force.x < 0 and (p.x < (self._forcestart.x + 0.5 - (cbox[4] - cbox[1]) / 2)) then ok = true + elseif self._force.z > 0 and (p.z > (self._forcestart.z + 0.5 + (cbox[6] - cbox[3]) / 2)) then ok = true + elseif self._force.z < 0 and (p.z < (self._forcestart.z + 0.5 - (cbox[6] - cbox[3]) / 2)) then ok = true end -- Item was successfully forced out. No more pushing if ok then self._forcetimer = -1 @@ -815,7 +958,7 @@ minetest.register_entity(":__builtin:item", { -- Set new item moving speed into the direciton of the liquid local newv = vector.multiply(vec, f) -- Swap to acceleration instead of a static speed to better mimic MC mechanics. - self.object:set_acceleration({x = newv.x, y = -0.22, z = newv.z}) + self.object:set_acceleration(vector.new(newv.x, -0.22, newv.z)) self.physical_state = true self._flowing = true @@ -828,9 +971,10 @@ minetest.register_entity(":__builtin:item", { local cur_vec = self.object:get_velocity() -- apply some acceleration in the opposite direction so it doesn't slide forever local vec = { - x = 0 -cur_vec.x*0.9, - y = 3 -cur_vec.y*0.9, - z = 0 -cur_vec.z*0.9} + x = 0 - cur_vec.x * 0.9, + y = 3 - cur_vec.y * 0.9, + z = 0 - cur_vec.z * 0.9 + } self.object:set_acceleration(vec) -- slow down the item in water local vel = self.object:get_velocity() @@ -854,20 +998,20 @@ minetest.register_entity(":__builtin:item", { end -- If node is not registered or node is walkably solid and resting on nodebox - local nn = minetest.get_node({x=p.x, y=p.y-0.5, z=p.z}).name + local nn = minetest.get_node(vector.offset(p, 0, -0.5, 0)).name local def = minetest.registered_nodes[nn] local v = self.object:get_velocity() local is_on_floor = def and (def.walkable and not def.groups.slippery and v.y == 0) if not minetest.registered_nodes[nn] - or is_floating or is_on_floor then + or is_floating or is_on_floor then local own_stack = ItemStack(self.object:get_luaentity().itemstring) -- Merge with close entities of the same item for _, object in pairs(minetest.get_objects_inside_radius(p, 0.8)) do local obj = object:get_luaentity() if obj and obj.name == "__builtin:item" - and obj.physical_state == false then + and obj.physical_state == false then if self:try_merge_with(own_stack, object, obj) then return end diff --git a/mods/ENTITIES/mcl_minecarts/init.lua b/mods/ENTITIES/mcl_minecarts/init.lua index 992442b7a7..6a837207ff 100644 --- a/mods/ENTITIES/mcl_minecarts/init.lua +++ b/mods/ENTITIES/mcl_minecarts/init.lua @@ -770,8 +770,9 @@ register_minecart( }, "mcl_minecarts_minecart_hopper.png", {"mcl_minecarts:minecart", "mcl_hoppers:hopper"}, - nil, nil, false + nil, nil, true ) +mcl_entity_invs.register_inv("mcl_minecarts:hopper_minecart", "Hopper Minecart", 5, false, true) -- Minecart with TNT register_minecart( @@ -839,16 +840,14 @@ minetest.register_craft({ }, }) --- TODO: Re-enable crafting of special minecarts when they have been implemented - ---[[minetest.register_craft({ +minetest.register_craft({ output = "mcl_minecarts:hopper_minecart", recipe = { {"mcl_hoppers:hopper"}, {"mcl_minecarts:minecart"}, }, }) ---]] + minetest.register_craft({ output = "mcl_minecarts:chest_minecart", @@ -863,5 +862,4 @@ if has_mcl_wip then mcl_wip.register_wip_item("mcl_minecarts:chest_minecart") mcl_wip.register_wip_item("mcl_minecarts:furnace_minecart") mcl_wip.register_wip_item("mcl_minecarts:command_block_minecart") - mcl_wip.register_wip_item("mcl_minecarts:hopper_minecart") end diff --git a/mods/ENTITIES/mcl_minecarts/locale/mcl_minecarts.ja.tr b/mods/ENTITIES/mcl_minecarts/locale/mcl_minecarts.ja.tr new file mode 100644 index 0000000000..30af73c48e --- /dev/null +++ b/mods/ENTITIES/mcl_minecarts/locale/mcl_minecarts.ja.tr @@ -0,0 +1,36 @@ +# textdomain: mcl_minecarts +Minecart=トロッコ +Minecarts can be used for a quick transportion on rails.=トロッコは、レールを使った高速輸送を可能にします。 +Minecarts only ride on rails and always follow the tracks. At a T-junction with no straight way ahead, they turn left. The speed is affected by the rail type.=トロッコはレール上にしか乗らない為、常に線路に沿って走ります。直進できない丁字路では、取り敢えず左折します。速度はレールの種類によって異なります。 +You can place the minecart on rails. Right-click it to enter it. Punch it to get it moving.=レールの上にトロッコを置けます。右クリックで乗り込みます。パンチすると動き出します。 +To obtain the minecart, punch it while holding down the sneak key.=トロッコを入手するには、スニークキーを押しながらパンチします。 +A minecart with TNT is an explosive vehicle that travels on rail.=TNT付きトロッコは、レール上を行きかう爆薬車両です。 +Place it on rails. Punch it to move it. The TNT is ignited with a flint and steel or when the minecart is on an powered activator rail.=レール上に配置。パンチで移動。TNTが着火するのは、火打石と打金を使った時か、稼動中のアクティベーターレール上にトロッコが乗った時です。 +To obtain the minecart and TNT, punch them while holding down the sneak key. You can't do this if the TNT was ignited.=トロッコとTNTを入手するには、スニークキーを押しながらパンチしてください。TNTに火が着いていた場合は、無理です。 +A minecart with furnace is a vehicle that travels on rails. It can propel itself with fuel.=かまど付きトロッコは、レール上を走行する車両です。燃料で自走できます。 +Place it on rails. If you give it some coal, the furnace will start burning for a long time and the minecart will be able to move itself. Punch it to get it moving.=レールの上に置きます。石炭を与えると、かまどが長時間燃え続け、トロッコが自走可能になります。パンチすると動き出します。 +To obtain the minecart and furnace, punch them while holding down the sneak key.=トロッコとかまどを入手するには、スニークキーを押しながらパンチします。 +Minecart with Chest=チェスト付きトロッコ +Minecart with Furnace=かまど付きトロッコ +Minecart with Command Block=コマンドブロック付きトロッコ +Minecart with Hopper=ホッパー付きトロッコ +Minecart with TNT=TNT付きトロッコ +Place them on the ground to build your railway, the rails will automatically connect to each other and will turn into curves, T-junctions, crossings and slopes as needed.=地面に置いて線路を作ると、レール同士が自動的につながり、必要に応じてカーブや丁字路、踏切、坂道などに変化します。 +Rail=レール +Rails can be used to build transport tracks for minecarts. Normal rails slightly slow down minecarts due to friction.=レールを利用して、トロッコの輸送路が敷けます。普通のレールは、摩擦の関係でトロッコが少しずつ減速していきます。 +Powered Rail=パワードレール +Rails can be used to build transport tracks for minecarts. Powered rails are able to accelerate and brake minecarts.=レールを利用して、トロッコの輸送路が敷けます。パワードレールは、トロッコを加速させたり、ブレーキをかけたりできます。 +Without redstone power, the rail will brake minecarts. To make this rail accelerate minecarts, power it with redstone power.=レッドストーン動力なしだと、このレールはトロッコにブレーキをかけます。このレールでトロッコを加速させるには、レッドストーン動力を供給してください。 +Activator Rail=アクティベーターレール +Rails can be used to build transport tracks for minecarts. Activator rails are used to activate special minecarts.=レールを利用して、トロッコの輸送路が敷けます。アクティベーターレールは、特殊なトロッコを作動させるために使われます。 +To make this rail activate minecarts, power it with redstone power and send a minecart over this piece of rail.=このレールでトロッコを作動させるには、レッドストーン動力を与えたレール上にトロッコを送り込みます。 +Detector Rail= +Rails can be used to build transport tracks for minecarts. A detector rail is able to detect a minecart above it and powers redstone mechanisms.=レールを利用して、トロッコの輸送路が敷けます。ディテクターレールは、その上にあるトロッコを検知でき、その際レッドストーン機構の動力源となります。 +To detect a minecart and provide redstone power, connect it to redstone trails or redstone mechanisms and send any minecart over the rail.=トロッコを検知してレッドストーン動力を供給するには、レッドストーン導線またはレッドストーン機構に接続し、任意のトロッコをレール上に送り込みます。 +Track for minecarts=トロッコ用の線路 +Speed up when powered, slow down when not powered=稼動中は加速、非稼動中は減速 +Activates minecarts when powered=稼動中はトロッコを作動 +Emits redstone power when a minecart is detected=トロッコを検知するとレッドストーン動力を放出 +Vehicle for fast travel on rails=レール上を快速移動するための車両 +Can be ignited by tools or powered activator rail=道具や稼動中のアクティベーターレールにより着火が可能 +Sneak to dismount=スニークで降りる diff --git a/mods/ENTITIES/mcl_mobs/api.lua b/mods/ENTITIES/mcl_mobs/api.lua index b306b0fd7c..a898ed9794 100644 --- a/mods/ENTITIES/mcl_mobs/api.lua +++ b/mods/ENTITIES/mcl_mobs/api.lua @@ -1,25 +1,15 @@ +local mob_class = mcl_mobs.mob_class +local mob_class_meta = {__index = mcl_mobs.mob_class} +local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs -- API for Mobs Redo: MineClone 2 Edition (MRM) - -mcl_mobs = {} - local MAX_MOB_NAME_LENGTH = 30 -local HORNY_TIME = 30 -local HORNY_AGAIN_TIME = 300 -local CHILD_GROW_TIME = 60*20 -local DEATH_DELAY = 0.5 local DEFAULT_FALL_SPEED = -9.81*1.5 -local FLOP_HEIGHT = 6 -local FLOP_HOR_SPEED = 1.5 -local ENTITY_CRAMMING_MAX = 24 -local CRAMMING_DAMAGE = 3 local PATHFINDING = "gowp" -- Localize local S = minetest.get_translator("mcl_mobs") -local mob_active_range = tonumber(minetest.settings:get("mcl_mob_active_range")) or 48 - local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_villager",false) local function mcl_log (message) if LOGGING_ON then @@ -27,45 +17,14 @@ local function mcl_log (message) end end -local function shortest_term_of_yaw_rotatoin(self, rot_origin, rot_target, nums) - - if not rot_origin or not rot_target then - return - end - - rot_origin = math.deg(rot_origin) - rot_target = math.deg(rot_target) - - - - if math.abs(rot_target - rot_origin) < 180 then - return rot_target - rot_origin - else - if (rot_target - rot_origin) > 0 then - return 360-(rot_target - rot_origin) - else - return (rot_target - rot_origin)+360 - end - end -end - -- Invisibility mod check mcl_mobs.invis = {} -- localize math functions -local pi = math.pi -local sin = math.sin -local cos = math.cos -local abs = math.abs -local min = math.min -local max = math.max local atann = math.atan -local random = math.random -local floor = math.floor -local ceil = math.ceil -local atan = function(x) +local function atan(x) if not x or x ~= x then return 0 else @@ -73,20 +32,10 @@ local atan = function(x) end end --- Load settings -local damage_enabled = minetest.settings:get_bool("enable_damage") -local disable_blood = minetest.settings:get_bool("mobs_disable_blood") -local mobs_drop_items = minetest.settings:get_bool("mobs_drop_items") ~= false +local remove_far = true local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false local spawn_protected = minetest.settings:get_bool("mobs_spawn_protected") ~= false -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 remove_far = true -local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0 -local show_health = false -local old_spawn_icons = minetest.settings:get_bool("mcl_old_spawn_icons",false) --- Shows helpful debug info above each mob -local mobs_debug = minetest.settings:get_bool("mobs_debug", false) +local mobs_debug = minetest.settings:get_bool("mobs_debug", false) -- Shows helpful debug info above each mob local spawn_logging = minetest.settings:get_bool("mcl_logging_mobs_spawn",true) -- Peaceful mode message so players will know there are no monsters @@ -97,713 +46,23 @@ if minetest.settings:get_bool("only_peaceful_mobs", false) then end) end -local active_particlespawners = {} - - -local function dir_to_pitch(dir) - --local dir2 = vector.normalize(dir) - local xz = math.abs(dir.x) + math.abs(dir.z) - return -math.atan2(-dir.y, xz) +local node_ok = function(pos, fallback) + fallback = fallback or mcl_mobs.fallback_node + local node = minetest.get_node_or_nil(pos) + if node and minetest.registered_nodes[node.name] then + return node + end + return minetest.registered_nodes[fallback] end --- pathfinding settings -local enable_pathfinding = true -local stuck_timeout = 3 -- how long before mob gets stuck in place and starts searching -local stuck_path_timeout = 10 -- how long will mob follow path before giving up - --- default nodes -local node_ice = "mcl_core:ice" -local node_snowblock = "mcl_core:snowblock" -local node_snow = "mcl_core:snow" -mcl_mobs.fallback_node = minetest.registered_aliases["mapgen_dirt"] or "mcl_core:dirt" - -minetest.register_chatcommand("clearmobs",{ - privs={maphack=true}, - params = "||", - description=S("Removes all spawned mobs except nametagged and tamed ones. all removes all mobs, nametagged only nametagged ones and with the range paramter all mobs in a distance of the current player are removed."), - func=function(n,param) - local p = minetest.get_player_by_name(n) - local num=tonumber(param) - for _,o in pairs(minetest.luaentities) do - if o.is_mob then - if param == "all" or - ( param == "nametagged" and o.nametag ) or - ( param == "" and ( not o.nametag or o.nametag == "" ) and not o.tamed ) or - ( num and num > 0 and vector.distance(p:get_pos(),o.object:get_pos()) <= num ) then - o.object:remove() - end - end - end -end}) - -local function remove_particlespawners(pn,self) - if not active_particlespawners[pn] then return end - if not active_particlespawners[pn][self.object] then return end - for k,v in pairs(active_particlespawners[pn][self.object]) do - minetest.delete_particlespawner(v) - end -end - -local function add_particlespawners(pn,self) - if not active_particlespawners[pn] then active_particlespawners[pn] = {} end - if not active_particlespawners[pn][self.object] then active_particlespawners[pn][self.object] = {} end - for _,ps in pairs(self.particlespawners) do - ps.attached = self.object - ps.playername = pn - table.insert(active_particlespawners[pn][self.object],minetest.add_particlespawner(ps)) - end -end - -local function particlespawner_check(self,dtime) - if not self.particlespawners then return end - --minetest.log(dump(active_particlespawners)) - if self._particle_timer and self._particle_timer >= 1 then - self._particle_timer = 0 - local players = {} - for _,player in pairs(minetest.get_connected_players()) do - local pn = player:get_player_name() - table.insert(players,pn) - if not active_particlespawners[pn] then - active_particlespawners[pn] = {} end - - local dst = vector.distance(player:get_pos(),self.object:get_pos()) - if dst < player_transfer_distance and not active_particlespawners[pn][self.object] then - add_particlespawners(pn,self) - elseif dst >= player_transfer_distance and active_particlespawners[pn][self.object] then - remove_particlespawners(pn,self) - end - end - elseif not self._particle_timer then - self._particle_timer = 0 - end - self._particle_timer = self._particle_timer + dtime -end - -minetest.register_on_leaveplayer(function(player) - local pn = player:get_player_name() - if not active_particlespawners[pn] then return end - for _,m in pairs(active_particlespawners[pn]) do - for k,v in pairs(m) do - minetest.delete_particlespawner(v) - end - end - active_particlespawners[pn] = nil -end) - -----For Water Flowing: -local enable_physics = function(object, luaentity, ignore_check) - if luaentity.physical_state == false or ignore_check == true then - luaentity.physical_state = true - object:set_properties({ - physical = true - }) - object:set_velocity({x=0,y=0,z=0}) - object:set_acceleration({x=0,y=DEFAULT_FALL_SPEED,z=0}) - end -end - -local disable_physics = function(object, luaentity, ignore_check, reset_movement) - if luaentity.physical_state == true or ignore_check == true then - luaentity.physical_state = false - object:set_properties({ - physical = false - }) - if reset_movement ~= false then - object:set_velocity({x=0,y=0,z=0}) - object:set_acceleration({x=0,y=0,z=0}) - end - end -end - -local function player_in_active_range(self) - for _,p in pairs(minetest.get_connected_players()) do - if vector.distance(self.object:get_pos(),p:get_pos()) <= mob_active_range then return true end - -- slightly larger than the mc 32 since mobs spawn on that circle and easily stand still immediately right after spawning. - end -end - - --- play sound -local mob_sound = function(self, soundname, is_opinion, fixed_pitch) - - local soundinfo - if self.sounds_child and self.child then - soundinfo = self.sounds_child - elseif self.sounds then - soundinfo = self.sounds - end - if not soundinfo then - return - end - local sound = soundinfo[soundname] - if sound then - if is_opinion and self.opinion_sound_cooloff > 0 then - return - end - local pitch - if not fixed_pitch then - local base_pitch = soundinfo.base_pitch - if not base_pitch then - base_pitch = 1 - end - if self.child and (not self.sounds_child) then - -- Children have higher pitch - pitch = base_pitch * 1.5 - else - pitch = base_pitch - end - -- randomize the pitch a bit - pitch = pitch + random(-10, 10) * 0.005 - end - minetest.sound_play(sound, { - object = self.object, - gain = 1.0, - max_hear_distance = self.sounds.distance, - pitch = pitch, - }, true) - self.opinion_sound_cooloff = 1 - end -end - --- Return true if object is in view_range -local function object_in_range(self, object) - if not object then - return false - end - local factor - -- Apply view range reduction for special player armor - if object:is_player() then - local factors = mcl_armor.player_view_range_factors[object] - factor = factors and factors[self.name] - end - -- Distance check - local dist - if factor and factor == 0 then - return false - elseif factor then - dist = self.view_range * factor - else - dist = self.view_range - end - - local p1, p2 = self.object:get_pos(), object:get_pos() - return p1 and p2 and (vector.distance(p1, p2) <= dist) -end - --- attack player/mob -local do_attack = function(self, player) - - if self.state == "attack" or self.state == "die" then - return - end - - self.attack = player - self.state = "attack" - - -- TODO: Implement war_cry sound without being annoying - --if random(0, 100) < 90 then - --mob_sound(self, "war_cry", true) - --end -end - - --- collision function borrowed amended from jordan4ibanez open_ai mod -local collision = function(self) - - local pos = self.object:get_pos() - if not pos then return {0,0} end - local vel = self.object:get_velocity() - local x = 0 - local z = 0 - local width = -self.collisionbox[1] + self.collisionbox[4] + 0.5 - for _,object in pairs(minetest.get_objects_inside_radius(pos, width)) do - - local ent = object:get_luaentity() - if object:is_player() or (ent and ent.is_mob and object ~= self.object) then - - if object:is_player() and mcl_burning.is_burning(self.object) then - mcl_burning.set_on_fire(object, 4) - end - - local pos2 = object:get_pos() - local vec = {x = pos.x - pos2.x, z = pos.z - pos2.z} - local force = (width + 0.5) - vector.distance( - {x = pos.x, y = 0, z = pos.z}, - {x = pos2.x, y = 0, z = pos2.z}) - - x = x + (vec.x * force) - z = z + (vec.z * force) - end - end - - return({x,z}) -end - --- move mob in facing direction -local set_velocity = function(self, v) - - local c_x, c_y = 0, 0 - - -- can mob be pushed, if so calculate direction - if self.pushable then - c_x, c_y = unpack(collision(self)) - end - - -- halt mob if it has been ordered to stay - if self.order == "stand" or self.order == "sit" then - self.acc=vector.new(0,0,0) - return - end - - local yaw = (self.object:get_yaw() or 0) + self.rotate - local vv = self.object:get_velocity() - if vv then - self.acc={ - x = ((sin(yaw) * -v) + c_x)*.27, - y = 0, - z = ((cos(yaw) * v) + c_y)*.27, - } - end -end - - - --- calculate mob velocity -local get_velocity = function(self) - - local v = self.object:get_velocity() - if v then - return (v.x * v.x + v.z * v.z) ^ 0.5 - end - - return 0 -end - -local function update_roll(self) - local is_Fleckenstein = self.nametag == "Fleckenstein" - local was_Fleckenstein = false - - local rot = self.object:get_rotation() - rot.z = is_Fleckenstein and pi or 0 - self.object:set_rotation(rot) - - local cbox = table.copy(self.collisionbox) - local acbox = self.object:get_properties().collisionbox - - if abs(cbox[2] - acbox[2]) > 0.1 then - was_Fleckenstein = true - end - - if is_Fleckenstein ~= was_Fleckenstein then - local pos = self.object:get_pos() - pos.y = pos.y + (acbox[2] + acbox[5]) - self.object:set_pos(pos) - end - - if is_Fleckenstein then - cbox[2], cbox[5] = -cbox[5], -cbox[2] - self.object:set_properties({collisionbox = cbox}) - -- This leads to child mobs having the wrong collisionbox - -- and seeing as it seems to be nothing but an easter egg - -- i've put it inside the if. Which just makes it be upside - -- down lol. - end - -end - --- set and return valid yaw - - -local set_yaw = function(self, yaw, delay, dtime) - if self.noyaw then return end - - if self.state ~= PATHFINDING then - self._turn_to = yaw - end - - --mcl_log("Yaw is: \t\t" .. tostring(math.deg(yaw))) - --mcl_log("self.object:get_yaw() is: \t" .. tostring(math.deg(self.object:get_yaw()))) - - --clamp our yaw to a 360 range - if math.deg(self.object:get_yaw()) > 360 then - self.object:set_yaw(math.rad(1)) - elseif math.deg(self.object:get_yaw()) < 0 then - self.object:set_yaw(math.rad(359)) - end - - --calculate the shortest way to turn to find our target - local target_shortest_path = shortest_term_of_yaw_rotatoin(self, self.object:get_yaw(), yaw, true) - - --turn in the shortest path possible toward our target. if we are attacking, don't dance. - if (math.abs(target_shortest_path) > 50 and not self._kb_turn) and (self.attack and self.attack:get_pos() or self.following and self.following:get_pos()) then - if self.following then - target_shortest_path = shortest_term_of_yaw_rotatoin(self, self.object:get_yaw(), minetest.dir_to_yaw(vector.direction(self.object:get_pos(), self.following:get_pos())), true) - else - target_shortest_path = shortest_term_of_yaw_rotatoin(self, self.object:get_yaw(), minetest.dir_to_yaw(vector.direction(self.object:get_pos(), self.attack:get_pos())), true) - end - end - - local ddtime = 0.05 --set_tick_rate - - if dtime then - ddtime = dtime - end - - if math.abs(target_shortest_path) > 280*ddtime then - if target_shortest_path > 0 then - self.object:set_yaw(self.object:get_yaw()+3.6*ddtime) - if self.acc then - self.acc=vector.rotate_around_axis(self.acc,vector.new(0,1,0), 3.6*ddtime) - end - else - self.object:set_yaw(self.object:get_yaw()-3.6*ddtime) - if self.acc then - self.acc=vector.rotate_around_axis(self.acc,vector.new(0,1,0), -3.6*ddtime) - end - end - end - - delay = delay or 0 - - yaw = self.object:get_yaw() - - if delay == 0 then - if self.shaking and dtime then - yaw = yaw + (random() * 2 - 1) * 5 * dtime - end - update_roll(self) - return yaw - end - - self.target_yaw = yaw - self.delay = delay - - return self.target_yaw -end - --- global function to set mob yaw -function mcl_mobs:yaw(self, yaw, delay, dtime) - set_yaw(self, yaw, delay, dtime) -end - -local add_texture_mod = function(self, mod) - local full_mod = "" - local already_added = false - for i=1, #self.texture_mods do - if mod == self.texture_mods[i] then - already_added = true - end - full_mod = full_mod .. self.texture_mods[i] - end - if not already_added then - full_mod = full_mod .. mod - table.insert(self.texture_mods, mod) - end - self.object:set_texture_mod(full_mod) -end -local remove_texture_mod = function(self, mod) - local full_mod = "" - local remove = {} - for i=1, #self.texture_mods do - if self.texture_mods[i] ~= mod then - full_mod = full_mod .. self.texture_mods[i] - else - table.insert(remove, i) - end - end - for i=#remove, 1 do - table.remove(self.texture_mods, remove[i]) - end - self.object:set_texture_mod(full_mod) -end - --- are we flying in what we are suppose to? (taikedz) -local flight_check = function(self) - - local nod = self.standing_in - local def = minetest.registered_nodes[nod] - - if not def then return false end -- nil check - - local fly_in - if type(self.fly_in) == "string" then - fly_in = { self.fly_in } - elseif type(self.fly_in) == "table" then - fly_in = self.fly_in - else - return false - end - - for _,checknode in pairs(fly_in) do - if nod == checknode or nod == "ignore" then - return true - end - end - - return false -end - --- set defined animation -local set_animation = function(self, anim, fixed_frame) - if not self.animation or not anim then - return - end - if self.state == "die" and anim ~= "die" and anim ~= "stand" then - return - end - - if self.jockey then - anim = "jockey" - end - - - if flight_check(self) and self.fly and anim == "walk" then anim = "fly" end - - self._current_animation = self._current_animation or "" - - if (anim == self._current_animation - or not self.animation[anim .. "_start"] - or not self.animation[anim .. "_end"]) and self.state ~= "die" then - return - end - - self._current_animation = anim - - local a_start = self.animation[anim .. "_start"] - local a_end - if fixed_frame then - a_end = a_start - else - a_end = self.animation[anim .. "_end"] - end - if a_start and a_end then - self.object:set_animation({ - x = a_start, - y = a_end}, - self.animation[anim .. "_speed"] or self.animation.speed_normal or 15, - 0, self.animation[anim .. "_loop"] ~= false) - end -end - - --- above function exported for mount.lua -function mcl_mobs:set_animation(self, anim) - set_animation(self, anim) -end - --- Returns true is node can deal damage to self -local is_node_dangerous = function(self, nodename) - local nn = nodename - if self.lava_damage > 0 then - if minetest.get_item_group(nn, "lava") ~= 0 then - return true - end - end - if self.fire_damage > 0 then - if minetest.get_item_group(nn, "fire") ~= 0 then - return true - end - end - if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].damage_per_second and minetest.registered_nodes[nn].damage_per_second > 0 then - return true - end - return false -end - - --- Returns true if node is a water hazard -local is_node_waterhazard = function(self, nodename) - local nn = nodename - if self.water_damage > 0 then - if minetest.get_item_group(nn, "water") ~= 0 then - return true - end - end - if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].drowning and minetest.registered_nodes[nn].drowning > 0 then - if self.breath_max ~= -1 then - -- check if the mob is water-breathing _and_ the block is water; only return true if neither is the case - -- this will prevent water-breathing mobs to classify water or e.g. sand below them as dangerous - if not self.breathes_in_water and minetest.get_item_group(nn, "water") ~= 0 then - return true - end - end - end - return false -end - - --- check line of sight (BrunoMine) -local line_of_sight = function(self, pos1, pos2, stepsize) - - stepsize = stepsize or 1 - - local s, pos = minetest.line_of_sight(pos1, pos2, stepsize) - - -- normal walking and flying mobs can see you through air - if s == true then - return true - end - - -- New pos1 to be analyzed - local npos1 = {x = pos1.x, y = pos1.y, z = pos1.z} - - local r, pos = minetest.line_of_sight(npos1, pos2, stepsize) - - -- Checks the return - if r == true then return true end - - -- Nodename found - local nn = minetest.get_node(pos).name - - -- Target Distance (td) to travel - local td = vector.distance(pos1, pos2) - - -- Actual Distance (ad) traveled - local ad = 0 - - -- It continues to advance in the line of sight in search of a real - -- obstruction which counts as 'normal' nodebox. - while minetest.registered_nodes[nn] - and minetest.registered_nodes[nn].walkable == false do - - -- Check if you can still move forward - if td < ad + stepsize then - return true -- Reached the target - end - - -- Moves the analyzed pos - local d = vector.distance(pos1, pos2) - - npos1.x = ((pos2.x - pos1.x) / d * stepsize) + pos1.x - npos1.y = ((pos2.y - pos1.y) / d * stepsize) + pos1.y - npos1.z = ((pos2.z - pos1.z) / d * stepsize) + pos1.z - - -- NaN checks - if d == 0 - or npos1.x ~= npos1.x - or npos1.y ~= npos1.y - or npos1.z ~= npos1.z then - return false - end - - ad = ad + stepsize - - -- scan again - r, pos = minetest.line_of_sight(npos1, pos2, stepsize) - - if r == true then return true end - - -- New Nodename found - nn = minetest.get_node(pos).name - - end - - return false -end - --- custom particle effects -local effect = function(pos, amount, texture, min_size, max_size, radius, gravity, glow, go_down) - - radius = radius or 2 - min_size = min_size or 0.5 - max_size = max_size or 1 - gravity = gravity or DEFAULT_FALL_SPEED - glow = glow or 0 - go_down = go_down or false - - local ym - if go_down then - ym = 0 - else - ym = -radius - end - - minetest.add_particlespawner({ - amount = amount, - time = 0.25, - minpos = pos, - maxpos = pos, - minvel = {x = -radius, y = ym, z = -radius}, - maxvel = {x = radius, y = radius, z = radius}, - minacc = {x = 0, y = gravity, z = 0}, - maxacc = {x = 0, y = gravity, z = 0}, - minexptime = 0.1, - maxexptime = 1, - minsize = min_size, - maxsize = max_size, - texture = texture, - glow = glow, - }) -end - -local damage_effect = function(self, damage) - -- damage particles - if (not disable_blood) and damage > 0 then - - local amount_large = floor(damage / 2) - local amount_small = damage % 2 - - local pos = self.object:get_pos() - - pos.y = pos.y + (self.collisionbox[5] - self.collisionbox[2]) * .5 - - local texture = "mobs_blood.png" - -- full heart damage (one particle for each 2 HP damage) - if amount_large > 0 then - effect(pos, amount_large, texture, 2, 2, 1.75, 0, nil, true) - end - -- half heart damage (one additional particle if damage is an odd number) - if amount_small > 0 then - -- TODO: Use "half heart" - effect(pos, amount_small, texture, 1, 1, 1.75, 0, nil, true) - end - end -end - -mcl_mobs.death_effect = function(pos, yaw, collisionbox, rotate) - local min, max - if collisionbox then - min = {x=collisionbox[1], y=collisionbox[2], z=collisionbox[3]} - max = {x=collisionbox[4], y=collisionbox[5], z=collisionbox[6]} - else - min = { x = -0.5, y = 0, z = -0.5 } - max = { x = 0.5, y = 0.5, z = 0.5 } - end - if rotate then - min = vector.rotate(min, {x=0, y=yaw, z=pi/2}) - max = vector.rotate(max, {x=0, y=yaw, z=pi/2}) - min, max = vector.sort(min, max) - min = vector.multiply(min, 0.5) - max = vector.multiply(max, 0.5) - end - - minetest.add_particlespawner({ - amount = 50, - time = 0.001, - minpos = vector.add(pos, min), - maxpos = vector.add(pos, max), - minvel = vector.new(-5,-5,-5), - maxvel = vector.new(5,5,5), - minexptime = 1.1, - maxexptime = 1.5, - minsize = 1, - maxsize = 2, - collisiondetection = false, - vertical = false, - texture = "mcl_particles_mob_death.png^[colorize:#000000:255", - }) - - minetest.sound_play("mcl_mobs_mob_poof", { - pos = pos, - gain = 1.0, - max_hear_distance = 8, - }, true) -end - -local update_tag = function(self) +function mob_class:update_tag() --update nametag and/or the debug box local tag if mobs_debug then - tag = "nametag = '"..tostring(self.nametag).."'\n".. + local name = self.name + if self.nametag and self.nametag ~= "" then + name = self.nametag + end + tag = "name = '"..tostring(name).."'\n".. "state = '"..tostring(self.state).."'\n".. "order = '"..tostring(self.order).."'\n".. "attack = "..tostring(self.attack).."\n".. @@ -814,3255 +73,20 @@ local update_tag = function(self) "horny = "..tostring(self.horny).."\n".. "hornytimer = "..tostring(self.hornytimer).."\n".. "runaway_timer = "..tostring(self.runaway_timer).."\n".. - "following = "..tostring(self.following) + "following = "..tostring(self.following).."\n".. + "lifetimer = "..tostring(self.lifetimer) else tag = self.nametag end self.object:set_properties({ nametag = tag, }) - - update_roll(self) end --- drop items -local item_drop = function(self, cooked, looting_level) - - -- no drops if disabled by setting - if not mobs_drop_items then return end - - looting_level = looting_level or 0 - - -- no drops for child mobs (except monster) - if (self.child and self.type ~= "monster") then - return - end - - local obj, item, num - local pos = self.object:get_pos() - - self.drops = self.drops or {} -- nil check - - for n = 1, #self.drops do - local dropdef = self.drops[n] - local chance = 1 / dropdef.chance - local looting_type = dropdef.looting - - if looting_level > 0 then - local chance_function = dropdef.looting_chance_function - if chance_function then - chance = chance_function(looting_level) - elseif looting_type == "rare" then - chance = chance + (dropdef.looting_factor or 0.01) * looting_level - end - end - - local num = 0 - local do_common_looting = (looting_level > 0 and looting_type == "common") - if random() < chance then - num = random(dropdef.min or 1, dropdef.max or 1) - elseif not dropdef.looting_ignore_chance then - do_common_looting = false - end - - if do_common_looting then - num = num + floor(random(0, looting_level) + 0.5) - end - - if num > 0 then - item = dropdef.name - - -- cook items when true - if cooked then - - local output = minetest.get_craft_result({ - method = "cooking", width = 1, items = {item}}) - - if output and output.item and not output.item:is_empty() then - item = output.item:get_name() - end - end - - -- add item if it exists - for x = 1, num do - obj = minetest.add_item(pos, ItemStack(item .. " " .. 1)) - end - - if obj and obj:get_luaentity() then - - obj:set_velocity({ - x = random(-10, 10) / 9, - y = 6, - z = random(-10, 10) / 9, - }) - elseif obj then - obj:remove() -- item does not exist - end - end - end - - self.drops = {} -end - - --- check if mob is dead or only hurt -local check_for_death = function(self, cause, cmi_cause) - - if self.state == "die" then - return true - end - - -- has health actually changed? - if self.health == self.old_health and self.health > 0 then - return false - end - - local damaged = self.health < self.old_health - self.old_health = self.health - - -- still got some health? - if self.health > 0 then - - -- make sure health isn't higher than max - if self.health > self.hp_max then - self.health = self.hp_max - end - - -- play damage sound if health was reduced and make mob flash red. - if damaged then - add_texture_mod(self, "^[colorize:#d42222:175") - minetest.after(1, function(self) - if self and self.object then - remove_texture_mod(self, "^[colorize:#d42222:175") - end - end, self) - mob_sound(self, "damage") - end - - -- backup nametag so we can show health stats - if not self.nametag2 then - self.nametag2 = self.nametag or "" - end - - if show_health - and (cmi_cause and cmi_cause.type == "punch") then - - self.htimer = 2 - self.nametag = "♥ " .. self.health .. " / " .. self.hp_max - - update_tag(self) - end - - return false - end - - mob_sound(self, "death") - - local function death_handle(self) - -- dropped cooked item if mob died in fire or lava - if cause == "lava" or cause == "fire" then - item_drop(self, true, 0) - else - local wielditem = ItemStack() - if cause == "hit" then - local puncher = cmi_cause.puncher - if puncher then - wielditem = puncher:get_wielded_item() - end - end - local cooked = mcl_burning.is_burning(self.object) or mcl_enchanting.has_enchantment(wielditem, "fire_aspect") - local looting = mcl_enchanting.get_enchantment(wielditem, "looting") - item_drop(self, cooked, looting) - - if ((not self.child) or self.type ~= "animal") and (minetest.get_us_time() - self.xp_timestamp <= 5000000) then - mcl_experience.throw_xp(self.object:get_pos(), random(self.xp_min, self.xp_max)) - end - end - end - - -- execute custom death function - if self.on_die then - - local pos = self.object:get_pos() - local on_die_exit = self.on_die(self, pos, cmi_cause) - if on_die_exit ~= true then - death_handle(self) - end - - if on_die_exit == true then - self.state = "die" - mcl_burning.extinguish(self.object) - self.object:remove() - return true - end - end - - local collisionbox - if self.collisionbox then - collisionbox = table.copy(self.collisionbox) - end - - self.state = "die" - self.attack = nil - self.v_start = false - self.fall_speed = DEFAULT_FALL_SPEED - self.timer = 0 - self.blinktimer = 0 - remove_texture_mod(self, "^[colorize:#FF000040") - remove_texture_mod(self, "^[brighten") - self.passive = true - - self.object:set_properties({ - pointable = false, - collide_with_objects = false, - }) - - set_velocity(self, 0) - local acc = self.object:get_acceleration() - acc.x, acc.y, acc.z = 0, DEFAULT_FALL_SPEED, 0 - self.object:set_acceleration(acc) - - local length - -- default death function and die animation (if defined) - if self.instant_death then - length = 0 - elseif self.animation - and self.animation.die_start - and self.animation.die_end then - - local frames = self.animation.die_end - self.animation.die_start - local speed = self.animation.die_speed or 15 - length = max(frames / speed, 0) + DEATH_DELAY - set_animation(self, "die") - else - length = 1 + DEATH_DELAY - set_animation(self, "stand", true) - end - - - -- Remove body after a few seconds and drop stuff - local kill = function(self) - if not self.object:get_luaentity() then - return - end - - death_handle(self) - local dpos = self.object:get_pos() - local cbox = self.collisionbox - local yaw = self.object:get_rotation().y - mcl_burning.extinguish(self.object) - self.object:remove() - mcl_mobs.death_effect(dpos, yaw, cbox, not self.instant_death) - end - if length <= 0 then - kill(self) - else - minetest.after(length, kill, self) - end - - return true -end - - --- check if within physical map limits (-30911 to 30927) -local function within_limits(pos, radius) - local wmin, wmax = -30912, 30928 - if mcl_vars then - if mcl_vars.mapgen_edge_min and mcl_vars.mapgen_edge_max then - wmin, wmax = mcl_vars.mapgen_edge_min, mcl_vars.mapgen_edge_max - end - end - if radius then - wmin = wmin - radius - wmax = wmax + radius - end - for _,v in pairs(pos) do - if v < wmin or v > wmax then return false end - end - return true -end - --- get node but use fallback for nil or unknown -local node_ok = function(pos, fallback) - - fallback = fallback or mcl_mobs.fallback_node - - local node = minetest.get_node_or_nil(pos) - - if node and minetest.registered_nodes[node.name] then - return node - end - - return minetest.registered_nodes[fallback] -end - - -local can_jump_cliff = function(self) - local yaw = self.object:get_yaw() - local pos = self.object:get_pos() - local v = self.object:get_velocity() - - local v2 = abs(v.x)+abs(v.z)*.833 - local jump_c_multiplier = 1 - if v2/self.walk_velocity/2>1 then - jump_c_multiplier = v2/self.walk_velocity/2 - end - - -- where is front - local dir_x = -sin(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+0.6 - local dir_z = cos(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+0.6 - - --is there nothing under the block in front? if so jump the gap. - local nodLow = node_ok({ - x = pos.x + dir_x-0.6, - y = pos.y - 0.5, - z = pos.z + dir_z-0.6 - }, "air") - - local nodFar = node_ok({ - x = pos.x + dir_x*2, - y = pos.y - 0.5, - z = pos.z + dir_z*2 - }, "air") - - local nodFar2 = node_ok({ - x = pos.x + dir_x*2.5, - y = pos.y - 0.5, - z = pos.z + dir_z*2.5 - }, "air") - - - if minetest.registered_nodes[nodLow.name] - and minetest.registered_nodes[nodLow.name].walkable ~= true - - - and (minetest.registered_nodes[nodFar.name] - and minetest.registered_nodes[nodFar.name].walkable == true - - or minetest.registered_nodes[nodFar2.name] - and minetest.registered_nodes[nodFar2.name].walkable == true) - - then - --disable fear heigh while we make our jump - self._jumping_cliff = true - minetest.after(1, function() - if self and self.object then - self._jumping_cliff = false - end - end) - return true - else - return false - end -end - --- is mob facing a cliff or danger -local is_at_cliff_or_danger = function(self) - - if self.fear_height == 0 or can_jump_cliff(self) or self._jumping_cliff or not self.object:get_luaentity() then -- 0 for no falling protection! - return false - end - - local yaw = self.object:get_yaw() - local dir_x = -sin(yaw) * (self.collisionbox[4] + 0.5) - local dir_z = cos(yaw) * (self.collisionbox[4] + 0.5) - local pos = self.object:get_pos() - local ypos = pos.y + self.collisionbox[2] -- just above floor - - local free_fall, blocker = minetest.line_of_sight( - {x = pos.x + dir_x, y = ypos, z = pos.z + dir_z}, - {x = pos.x + dir_x, y = ypos - self.fear_height, z = pos.z + dir_z}) - if free_fall then - return true - else - local bnode = minetest.get_node(blocker) - local danger = is_node_dangerous(self, bnode.name) - if danger then - return true - else - local def = minetest.registered_nodes[bnode.name] - if def and def.walkable then - return false - end - end - end - - return false -end - - --- copy the 'mob facing cliff_or_danger check' from above, and rework to avoid water -local is_at_water_danger = function(self) - - - if not self.object:get_luaentity() or can_jump_cliff(self) or self._jumping_cliff then - return false - end - local yaw = self.object:get_yaw() - local dir_x = -sin(yaw) * (self.collisionbox[4] + 0.5) - local dir_z = cos(yaw) * (self.collisionbox[4] + 0.5) - local pos = self.object:get_pos() - local ypos = pos.y + self.collisionbox[2] -- just above floor - - local free_fall, blocker = minetest.line_of_sight( - {x = pos.x + dir_x, y = ypos, z = pos.z + dir_z}, - {x = pos.x + dir_x, y = ypos - 3, z = pos.z + dir_z}) - if free_fall then - return true - else - local bnode = minetest.get_node(blocker) - local waterdanger = is_node_waterhazard(self, bnode.name) - if - waterdanger and (is_node_waterhazard(self, self.standing_in) or is_node_waterhazard(self, self.standing_on)) then - return false - elseif waterdanger and (is_node_waterhazard(self, self.standing_in) or is_node_waterhazard(self, self.standing_on)) == false then - return true - else - local def = minetest.registered_nodes[bnode.name] - if def and def.walkable then - return false - end - end - end - - return false -end - - --- environmental damage (water, lava, fire, light etc.) -local do_env_damage = function(self) - - -- feed/tame text timer (so mob 'full' messages dont spam chat) - if self.htimer > 0 then - self.htimer = self.htimer - 1 - end - - -- reset nametag after showing health stats - if self.htimer < 1 and self.nametag2 then - - self.nametag = self.nametag2 - self.nametag2 = nil - - update_tag(self) - end - - local pos = self.object:get_pos() - - self.time_of_day = minetest.get_timeofday() - - -- remove mob if beyond map limits - if not within_limits(pos, 0) then - mcl_burning.extinguish(self.object) - self.object:remove() - return true - end - - - -- Deal light damage to mob, returns true if mob died - local deal_light_damage = function(self, pos, damage) - if not ((mcl_weather.rain.raining or mcl_weather.state == "snow") and mcl_weather.is_outdoor(pos)) then - self.health = self.health - damage - - effect(pos, 5, "mcl_particles_smoke.png") - - if check_for_death(self, "light", {type = "light"}) then - return true - end - end - end - - local sunlight = 10 - if within_limits(pos,0) then - sunlight = minetest.get_natural_light(pos, self.time_of_day) - end - - -- bright light harms mob - if self.light_damage ~= 0 and (sunlight or 0) > 12 then - if deal_light_damage(self, pos, self.light_damage) then - return true - end - end - local _, dim = mcl_worlds.y_to_layer(pos.y) - if (self.sunlight_damage ~= 0 or self.ignited_by_sunlight) and (sunlight or 0) >= minetest.LIGHT_MAX and dim == "overworld" then - if self.armor_list and not self.armor_list.helmet or not self.armor_list or self.armor_list and self.armor_list.helmet and self.armor_list.helmet == "" then - if self.ignited_by_sunlight then - mcl_burning.set_on_fire(self.object, 10) - else - deal_light_damage(self, pos, self.sunlight_damage) - return true - end - end - end - - local y_level = self.collisionbox[2] - - if self.child then - y_level = self.collisionbox[2] * 0.5 - end - - -- what is mob standing in? - pos.y = pos.y + y_level + 0.25 -- foot level - local pos2 = {x=pos.x, y=pos.y-1, z=pos.z} - self.standing_in = node_ok(pos, "air").name - self.standing_on = node_ok(pos2, "air").name - - -- 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}) - end - - local nodef = minetest.registered_nodes[self.standing_in] - - -- rain - if self.rain_damage > 0 then - if mcl_weather.rain.raining and mcl_weather.is_outdoor(pos) then - - self.health = self.health - self.rain_damage - - if check_for_death(self, "rain", {type = "environment", - pos = pos, node = self.standing_in}) then - return true - end - end - end - - pos.y = pos.y + 1 -- for particle effect position - - -- water damage - if self.water_damage > 0 - and nodef.groups.water then - - if self.water_damage ~= 0 then - - self.health = self.health - self.water_damage - - effect(pos, 5, "mcl_particles_smoke.png", nil, nil, 1, nil) - - if check_for_death(self, "water", {type = "environment", - pos = pos, node = self.standing_in}) then - return true - end - end - - -- lava damage - elseif self.lava_damage > 0 - and (nodef.groups.lava) then - - if self.lava_damage ~= 0 then - - self.health = self.health - self.lava_damage - - effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil) - mcl_burning.set_on_fire(self.object, 10) - - if check_for_death(self, "lava", {type = "environment", - pos = pos, node = self.standing_in}) then - return true - end - end - - -- fire damage - elseif self.fire_damage > 0 - and (nodef.groups.fire) then - - if self.fire_damage ~= 0 then - - self.health = self.health - self.fire_damage - - effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil) - mcl_burning.set_on_fire(self.object, 5) - - if check_for_death(self, "fire", {type = "environment", - pos = pos, node = self.standing_in}) then - return true - end - end - - -- damage_per_second node check - elseif nodef.damage_per_second ~= 0 and not nodef.groups.lava and not nodef.groups.fire then - - self.health = self.health - nodef.damage_per_second - - effect(pos, 5, "mcl_particles_smoke.png") - - if check_for_death(self, "dps", {type = "environment", - pos = pos, node = self.standing_in}) then - return true - end - end - - -- Drowning damage - if self.breath_max ~= -1 then - local drowning = false - if self.breathes_in_water then - if minetest.get_item_group(self.standing_in, "water") == 0 then - drowning = true - end - elseif nodef.drowning > 0 then - drowning = true - end - if drowning then - - self.breath = max(0, self.breath - 1) - - effect(pos, 2, "bubble.png", nil, nil, 1, nil) - if self.breath <= 0 then - local dmg - if nodef.drowning > 0 then - dmg = nodef.drowning - else - dmg = 4 - end - damage_effect(self, dmg) - self.health = self.health - dmg - end - if check_for_death(self, "drowning", {type = "environment", - pos = pos, node = self.standing_in}) then - return true - end - else - self.breath = min(self.breath_max, self.breath + 1) - end - end - - --- suffocation inside solid node - -- FIXME: Redundant with mcl_playerplus - if (self.suffocation == true) - and (nodef.walkable == nil or nodef.walkable == true) - and (nodef.collision_box == nil or nodef.collision_box.type == "regular") - and (nodef.node_box == nil or nodef.node_box.type == "regular") - and (nodef.groups.disable_suffocation ~= 1) - and (nodef.groups.opaque == 1) then - - -- Short grace period before starting to take suffocation damage. - -- This is different from players, who take damage instantly. - -- This has been done because mobs might briefly be inside solid nodes - -- when e.g. climbing up stairs. - -- This is a bit hacky because it assumes that do_env_damage - -- is called roughly every second only. - self.suffocation_timer = self.suffocation_timer + 1 - if self.suffocation_timer >= 3 then - -- 2 damage per second - -- TODO: Deal this damage once every 1/2 second - self.health = self.health - 2 - - if check_for_death(self, "suffocation", {type = "environment", - pos = pos, node = self.standing_in}) then - return true - end - end - else - self.suffocation_timer = 0 - end - - return check_for_death(self, "", {type = "unknown"}) -end - - --- jump if facing a solid node (not fences or gates) -local do_jump = function(self) - if not self.jump - or self.jump_height == 0 - or self.fly - or (self.child and self.type ~= "monster") - or self.order == "stand" then - return false - end - - self.facing_fence = false - - -- something stopping us while moving? - if self.state ~= "stand" - and get_velocity(self) > 0.5 - and self.object:get_velocity().y ~= 0 then - return false - end - - local pos = self.object:get_pos() - local yaw = self.object:get_yaw() - - -- what is mob standing on? - pos.y = pos.y + self.collisionbox[2] - 0.2 - - local nod = node_ok(pos) - - if minetest.registered_nodes[nod.name].walkable == false then - return false - end - - local v = self.object:get_velocity() - local v2 = abs(v.x)+abs(v.z)*.833 - local jump_c_multiplier = 1 - if v2/self.walk_velocity/2>1 then - jump_c_multiplier = v2/self.walk_velocity/2 - end - - -- where is front - local dir_x = -sin(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+0.6 - local dir_z = cos(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+0.6 - - -- what is in front of mob? - nod = node_ok({ - x = pos.x + dir_x, - y = pos.y + 0.5, - z = pos.z + dir_z - }) - - -- this is used to detect if there's a block on top of the block in front of the mob. - -- If there is, there is no point in jumping as we won't manage. - local nodTop = node_ok({ - x = pos.x + dir_x, - y = pos.y + 1.5, - z = pos.z + dir_z - }, "air") - - - -- we don't attempt to jump if there's a stack of blocks blocking - if minetest.registered_nodes[nodTop.name].walkable == true and not (self.attack and self.state == "attack") then - return false - end - - -- thin blocks that do not need to be jumped - if nod.name == node_snow then - return false - end - - local ndef = minetest.registered_nodes[nod.name] - if self.walk_chance == 0 or ndef and ndef.walkable or can_jump_cliff(self) then - - if minetest.get_item_group(nod.name, "fence") == 0 - and minetest.get_item_group(nod.name, "fence_gate") == 0 - and minetest.get_item_group(nod.name, "wall") == 0 then - - local v = self.object:get_velocity() - - v.y = self.jump_height + 0.1 * 3 - - if can_jump_cliff(self) then - v=vector.multiply(v, vector.new(2.8,1,2.8)) - end - - set_animation(self, "jump") -- only when defined - - self.object:set_velocity(v) - - -- when in air move forward - minetest.after(0.3, function(self, v) - if (not self.object) or (not self.object:get_luaentity()) or (self.state == "die") then - return - end - self.object:set_acceleration({ - x = v.x * 2, - y = DEFAULT_FALL_SPEED, - z = v.z * 2, - }) - end, self, v) - - if self.jump_sound_cooloff <= 0 then - mob_sound(self, "jump") - self.jump_sound_cooloff = 0.5 - end - else - self.facing_fence = true - end - - -- if we jumped against a block/wall 4 times then turn - if self.object:get_velocity().x ~= 0 - and self.object:get_velocity().z ~= 0 then - - self.jump_count = (self.jump_count or 0) + 1 - - if self.jump_count == 4 then - - local yaw = self.object:get_yaw() or 0 - - yaw = set_yaw(self, yaw + 1.35, 8) - - self.jump_count = 0 - end - end - - return true - end - - return false -end - - --- blast damage to entities nearby -local entity_physics = function(pos, radius) - - radius = radius * 2 - - local objs = minetest.get_objects_inside_radius(pos, radius) - local obj_pos, dist - - for n = 1, #objs do - - obj_pos = objs[n]:get_pos() - - dist = vector.distance(pos, obj_pos) - if dist < 1 then dist = 1 end - - local damage = floor((4 / dist) * radius) - local ent = objs[n]:get_luaentity() - - -- punches work on entities AND players - objs[n]:punch(objs[n], 1.0, { - full_punch_interval = 1.0, - damage_groups = {fleshy = damage}, - }, pos) - end -end - - --- should mob follow what I'm holding ? -local follow_holding = function(self, clicker) - if self.nofollow then return false end - - if mcl_mobs.invis[clicker:get_player_name()] then - return false - end - - local item = clicker:get_wielded_item() - local t = type(self.follow) - - -- single item - if t == "string" - and item:get_name() == self.follow then - return true - - -- multiple items - elseif t == "table" then - - for no = 1, #self.follow do - - if self.follow[no] == item:get_name() then - return true - end - end - end - - return false -end - - --- find two animals of same type and breed if nearby and horny -local breed = function(self) - - --mcl_log("In breed function") - -- child takes a long time before growing into adult - if self.child == true then - - -- When a child, hornytimer is used to count age until adulthood - self.hornytimer = self.hornytimer + 1 - - if self.hornytimer >= CHILD_GROW_TIME then - - self.child = false - self.hornytimer = 0 - - self.object:set_properties({ - textures = self.base_texture, - mesh = self.base_mesh, - visual_size = self.base_size, - collisionbox = self.base_colbox, - selectionbox = self.base_selbox, - }) - - -- custom function when child grows up - if self.on_grown then - self.on_grown(self) - else - -- jump when fully grown so as not to fall into ground - self.object:set_velocity({ - x = 0, - y = self.jump_height*3, - z = 0 - }) - end - - self.animation = nil - local anim = self._current_animation - self._current_animation = nil -- Mobs Redo does nothing otherwise - mcl_mobs.set_animation(self, anim) - end - - return - end - - -- horny animal can mate for HORNY_TIME seconds, - -- afterwards horny animal cannot mate again for HORNY_AGAIN_TIME seconds - if self.horny == true - and self.hornytimer < HORNY_TIME + HORNY_AGAIN_TIME then - - self.hornytimer = self.hornytimer + 1 - - if self.hornytimer >= HORNY_TIME + HORNY_AGAIN_TIME then - self.hornytimer = 0 - self.horny = false - end - end - - -- find another same animal who is also horny and mate if nearby - if self.horny == true - and self.hornytimer <= HORNY_TIME then - - mcl_log("In breed function. All good. Do the magic.") - - local pos = self.object:get_pos() - - effect({x = pos.x, y = pos.y + 1, z = pos.z}, 8, "heart.png", 3, 4, 1, 0.1) - - local objs = minetest.get_objects_inside_radius(pos, 3) - local num = 0 - local ent = nil - - for n = 1, #objs do - - ent = objs[n]:get_luaentity() - - -- check for same animal with different colour - local canmate = false - - if ent then - - if ent.name == self.name then - canmate = true - else - local entname = string.split(ent.name,":") - local selfname = string.split(self.name,":") - - if entname[1] == selfname[1] then - entname = string.split(entname[2],"_") - selfname = string.split(selfname[2],"_") - - if entname[1] == selfname[1] then - canmate = true - end - end - end - end - - if canmate then mcl_log("In breed function. Can mate.") end - - if ent - and canmate == true - and ent.horny == true - and ent.hornytimer <= HORNY_TIME then - num = num + 1 - end - - -- found your mate? then have a baby - if num > 1 then - - self.hornytimer = HORNY_TIME + 1 - ent.hornytimer = HORNY_TIME + 1 - - -- spawn baby - - - minetest.after(5, function(parent1, parent2, pos) - if not parent1.object:get_luaentity() then - return - end - if not parent2.object:get_luaentity() then - return - end - - mcl_experience.throw_xp(pos, random(1, 7)) - - -- custom breed function - if parent1.on_breed then - -- when false, skip going any further - if parent1.on_breed(parent1, parent2) == false then - return - end - end - - local child = mcl_mobs:spawn_child(pos, parent1.name) - - local ent_c = child:get_luaentity() - - - -- Use texture of one of the parents - local p = random(1, 2) - if p == 1 then - ent_c.base_texture = parent1.base_texture - else - ent_c.base_texture = parent2.base_texture - end - child:set_properties({ - textures = ent_c.base_texture - }) - - -- tamed and owned by parents' owner - ent_c.tamed = true - ent_c.owner = parent1.owner - end, self, ent, pos) - - num = 0 - - break - end - end - end -end - - --- find and replace what mob is looking for (grass, wheat etc.) -local replace = function(self, pos) - - if not self.replace_rate - or not self.replace_what - or self.child == true - or self.object:get_velocity().y ~= 0 - or random(1, self.replace_rate) > 1 then - return - end - - local what, with, y_offset - - if type(self.replace_what[1]) == "table" then - - local num = random(#self.replace_what) - - what = self.replace_what[num][1] or "" - with = self.replace_what[num][2] or "" - y_offset = self.replace_what[num][3] or 0 - else - what = self.replace_what - with = self.replace_with or "" - y_offset = self.replace_offset or 0 - end - - pos.y = pos.y + y_offset - - local node = minetest.get_node(pos) - if node.name == what then - - local oldnode = {name = what, param2 = node.param2} - local newnode = {name = with, param2 = node.param2} - local on_replace_return - - if self.on_replace then - on_replace_return = self.on_replace(self, pos, oldnode, newnode) - end - - if on_replace_return ~= false then - - if mobs_griefing then - minetest.set_node(pos, newnode) - end - - end - end -end - - --- check if daytime and also if mob is docile during daylight hours -local day_docile = function(self) - - if self.docile_by_day == false then - - return false - - elseif self.docile_by_day == true - and self.time_of_day > 0.2 - and self.time_of_day < 0.8 then - - return true - end -end - - -local los_switcher = false -local height_switcher = false - --- path finding and smart mob routine by rnd, line_of_sight and other edits by Elkien3 -local smart_mobs = function(self, s, p, dist, dtime) - - local s1 = self.path.lastpos - - local target_pos = self.attack:get_pos() - - -- is it becoming stuck? - if abs(s1.x - s.x) + abs(s1.z - s.z) < .5 then - self.path.stuck_timer = self.path.stuck_timer + dtime - else - self.path.stuck_timer = 0 - end - - self.path.lastpos = {x = s.x, y = s.y, z = s.z} - - local use_pathfind = false - local has_lineofsight = minetest.line_of_sight( - {x = s.x, y = (s.y) + .5, z = s.z}, - {x = target_pos.x, y = (target_pos.y) + 1.5, z = target_pos.z}, .2) - - -- im stuck, search for path - if not has_lineofsight then - - if los_switcher == true then - use_pathfind = true - los_switcher = false - end -- cannot see target! - else - if los_switcher == false then - - los_switcher = true - use_pathfind = false - - minetest.after(1, function(self) - if not self.object:get_luaentity() then - return - end - if has_lineofsight then self.path.following = false end - end, self) - end -- can see target! - end - - if (self.path.stuck_timer > stuck_timeout and not self.path.following) then - - use_pathfind = true - self.path.stuck_timer = 0 - - minetest.after(1, function(self) - if not self.object:get_luaentity() then - return - end - if has_lineofsight then self.path.following = false end - end, self) - end - - if (self.path.stuck_timer > stuck_path_timeout and self.path.following) then - - use_pathfind = true - self.path.stuck_timer = 0 - - minetest.after(1, function(self) - if not self.object:get_luaentity() then - return - end - if has_lineofsight then self.path.following = false end - end, self) - end - - if abs(vector.subtract(s,target_pos).y) > self.stepheight then - - if height_switcher then - use_pathfind = true - height_switcher = false - end - else - if not height_switcher then - use_pathfind = false - height_switcher = true - end - end - - if use_pathfind then - -- lets try find a path, first take care of positions - -- since pathfinder is very sensitive - local sheight = self.collisionbox[5] - self.collisionbox[2] - - -- round position to center of node to avoid stuck in walls - -- also adjust height for player models! - s.x = floor(s.x + 0.5) - s.z = floor(s.z + 0.5) - - local ssight, sground = minetest.line_of_sight(s, { - x = s.x, y = s.y - 4, z = s.z}, 1) - - -- determine node above ground - if not ssight then - s.y = sground.y + 1 - end - - local p1 = self.attack:get_pos() - - p1.x = floor(p1.x + 0.5) - p1.y = floor(p1.y + 0.5) - p1.z = floor(p1.z + 0.5) - - local dropheight = 12 - if self.fear_height ~= 0 then dropheight = self.fear_height end - local jumpheight = 0 - if self.jump and self.jump_height >= 4 then - jumpheight = min(ceil(self.jump_height / 4), 4) - elseif self.stepheight > 0.5 then - jumpheight = 1 - end - self.path.way = minetest.find_path(s, p1, 16, jumpheight, dropheight, "A*_noprefetch") - - self.state = "" - do_attack(self, self.attack) - - -- no path found, try something else - if not self.path.way then - - self.path.following = false - - -- lets make way by digging/building if not accessible - if self.pathfinding == 2 and mobs_griefing then - - -- is player higher than mob? - if s.y < p1.y then - - -- build upwards - if not minetest.is_protected(s, "") then - - local ndef1 = minetest.registered_nodes[self.standing_in] - - if ndef1 and (ndef1.buildable_to or ndef1.groups.liquid) then - - minetest.set_node(s, {name = mcl_mobs.fallback_node}) - end - end - - local sheight = ceil(self.collisionbox[5]) + 1 - - -- assume mob is 2 blocks high so it digs above its head - s.y = s.y + sheight - - -- remove one block above to make room to jump - if not minetest.is_protected(s, "") then - - local node1 = node_ok(s, "air").name - local ndef1 = minetest.registered_nodes[node1] - - if node1 ~= "air" - and node1 ~= "ignore" - and ndef1 - and not ndef1.groups.level - and not ndef1.groups.unbreakable - and not ndef1.groups.liquid then - - minetest.set_node(s, {name = "air"}) - minetest.add_item(s, ItemStack(node1)) - - end - end - - s.y = s.y - sheight - self.object:set_pos({x = s.x, y = s.y + 2, z = s.z}) - - else -- dig 2 blocks to make door toward player direction - - local yaw1 = self.object:get_yaw() + pi / 2 - local p1 = { - x = s.x + cos(yaw1), - y = s.y, - z = s.z + sin(yaw1) - } - - if not minetest.is_protected(p1, "") then - - local node1 = node_ok(p1, "air").name - local ndef1 = minetest.registered_nodes[node1] - - if node1 ~= "air" - and node1 ~= "ignore" - and ndef1 - and not ndef1.groups.level - and not ndef1.groups.unbreakable - and not ndef1.groups.liquid then - - minetest.add_item(p1, ItemStack(node1)) - minetest.set_node(p1, {name = "air"}) - end - - p1.y = p1.y + 1 - node1 = node_ok(p1, "air").name - ndef1 = minetest.registered_nodes[node1] - - if node1 ~= "air" - and node1 ~= "ignore" - and ndef1 - and not ndef1.groups.level - and not ndef1.groups.unbreakable - and not ndef1.groups.liquid then - - minetest.add_item(p1, ItemStack(node1)) - minetest.set_node(p1, {name = "air"}) - end - - end - end - end - - -- will try again in 2 seconds - self.path.stuck_timer = stuck_timeout - 2 - elseif s.y < p1.y and (not self.fly) then - do_jump(self) --add jump to pathfinding - self.path.following = true - -- Yay, I found path! - -- TODO: Implement war_cry sound without being annoying - --mob_sound(self, "war_cry", true) - else - set_velocity(self, self.walk_velocity) - - -- follow path now that it has it - self.path.following = true - end - end -end - - --- specific attacks -local specific_attack = function(list, what) - - -- no list so attack default (player, animals etc.) - if list == nil then - return true - end - - -- found entity on list to attack? - for no = 1, #list do - - if list[no] == what then - return true - end - end - - return false -end - --- find someone to attack -local monster_attack = function(self) - if not damage_enabled - or self.passive ~= false - or self.state == "attack" - or day_docile(self) then - return - end - - local s = self.object:get_pos() - local p, sp, dist - local player, obj, min_player - local type, name = "", "" - local min_dist = self.view_range + 1 - local objs = minetest.get_objects_inside_radius(s, self.view_range) - local blacklist_attack = {} - - for n = 1, #objs do - if not objs[n]:is_player() then - obj = objs[n]:get_luaentity() - - if obj then - player = obj.object - name = obj.name or "" - end - if obj and obj.type == self.type and obj.passive == false and obj.state == "attack" and obj.attack then - table.insert(blacklist_attack, obj.attack) - end - end - end - - for n = 1, #objs do - - - if objs[n]:is_player() then - if mcl_mobs.invis[ objs[n]:get_player_name() ] or (not object_in_range(self, objs[n])) then - type = "" - elseif (self.type == "monster" or self._aggro) then - player = objs[n] - type = "player" - name = "player" - end - else - obj = objs[n]:get_luaentity() - - if obj then - player = obj.object - type = obj.type - name = obj.name or "" - end - - end - - -- 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)) then - - p = player:get_pos() - sp = s - - dist = vector.distance(p, s) - - -- aim higher to make looking up hills more realistic - p.y = p.y + 1 - sp.y = sp.y + 1 - - local attacked_p = false - for c=1, #blacklist_attack do - if blacklist_attack[c] == player then - attacked_p = true - end - end - -- choose closest player to attack - if dist < min_dist - and not attacked_p - and line_of_sight(self, sp, p, 2) == true then - min_dist = dist - min_player = player - end - end - end - if not min_player and #blacklist_attack > 0 then - min_player=blacklist_attack[math.random(#blacklist_attack)] - end - -- attack player - if min_player then - do_attack(self, min_player) - end -end - - --- npc, find closest monster to attack -local npc_attack = function(self) - - if self.type ~= "npc" - or not self.attacks_monsters - or self.state == "attack" then - return - end - - local p, sp, obj, min_player - local s = self.object:get_pos() - local min_dist = self.view_range + 1 - local objs = minetest.get_objects_inside_radius(s, self.view_range) - - for n = 1, #objs do - - obj = objs[n]:get_luaentity() - - if obj and obj.type == "monster" then - - p = obj.object:get_pos() - sp = s - - local dist = vector.distance(p, s) - - -- aim higher to make looking up hills more realistic - p.y = p.y + 1 - sp.y = sp.y + 1 - - if dist < min_dist - and line_of_sight(self, sp, p, 2) == true then - min_dist = dist - min_player = obj.object - end - end - end - - if min_player then - do_attack(self, min_player) - end -end - - --- specific runaway -local specific_runaway = function(list, what) - - -- no list so do not run - if list == nil then - return false - end - - -- found entity on list to attack? - for no = 1, #list do - - if list[no] == what then - return true - end - end - - return false -end - - --- find someone to runaway from -local runaway_from = function(self) - - if not self.runaway_from and self.state ~= "flop" then - return - end - - local s = self.object:get_pos() - local p, sp, dist - local player, obj, min_player - local type, name = "", "" - local min_dist = self.view_range + 1 - local objs = minetest.get_objects_inside_radius(s, self.view_range) - - for n = 1, #objs do - - if objs[n]:is_player() then - - if mcl_mobs.invis[ objs[n]:get_player_name() ] - or self.owner == objs[n]:get_player_name() - or (not object_in_range(self, objs[n])) then - type = "" - else - player = objs[n] - type = "player" - name = "player" - end - else - obj = objs[n]:get_luaentity() - - if obj then - player = obj.object - type = obj.type - name = obj.name or "" - end - end - - -- find specific mob to runaway from - if name ~= "" and name ~= self.name - and specific_runaway(self.runaway_from, name) then - - p = player:get_pos() - sp = s - - -- aim higher to make looking up hills more realistic - p.y = p.y + 1 - sp.y = sp.y + 1 - - dist = vector.distance(p, s) - - - -- choose closest player/mpb to runaway from - if dist < min_dist - and line_of_sight(self, sp, p, 2) == true then - min_dist = dist - min_player = player - end - end - end - - if min_player then - - local lp = player:get_pos() - local vec = { - x = lp.x - s.x, - y = lp.y - s.y, - z = lp.z - s.z - } - - local yaw = (atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate - - if lp.x > s.x then - yaw = yaw + pi - end - - yaw = set_yaw(self, yaw, 4) - self.state = "runaway" - self.runaway_timer = 3 - self.following = nil - end -end - - --- follow player if owner or holding item, if fish outta water then flop -local follow_flop = function(self) - - -- find player to follow - if (self.follow ~= "" - or self.order == "follow") - and not self.following - and self.state ~= "attack" - and self.order ~= "sit" - and self.state ~= "runaway" then - - local s = self.object:get_pos() - local players = minetest.get_connected_players() - - for n = 1, #players do - - if (object_in_range(self, players[n])) - and not mcl_mobs.invis[ players[n]:get_player_name() ] then - - self.following = players[n] - - break - end - end - end - - if self.type == "npc" - and self.order == "follow" - and self.state ~= "attack" - and self.order ~= "sit" - and self.owner ~= "" then - - -- npc stop following player if not owner - if self.following - and self.owner - and self.owner ~= self.following:get_player_name() then - self.following = nil - end - else - -- stop following player if not holding specific item, - -- mob is horny, fleeing or attacking - if self.following - and self.following:is_player() - and (follow_holding(self, self.following) == false or - self.horny or self.state == "runaway") then - self.following = nil - end - - end - - -- follow that thing - if self.following then - - local s = self.object:get_pos() - local p - - if self.following:is_player() then - - p = self.following:get_pos() - - elseif self.following.object then - - p = self.following.object:get_pos() - end - - if p then - - local dist = vector.distance(p, s) - - -- dont follow if out of range - if (not object_in_range(self, self.following)) then - self.following = nil - else - local vec = { - x = p.x - s.x, - z = p.z - s.z - } - - local yaw = (atan(vec.z / vec.x) + pi / 2) - self.rotate - - if p.x > s.x then yaw = yaw + pi end - - set_yaw(self, yaw, 2.35) - - -- anyone but standing npc's can move along - if dist > 3 - and self.order ~= "stand" then - - set_velocity(self, self.follow_velocity) - - if self.walk_chance ~= 0 then - set_animation(self, "run") - end - else - set_velocity(self, 0) - set_animation(self, "stand") - end - - return - end - end - end - - -- swimmers flop when out of their element, and swim again when back in - if self.fly then - local s = self.object:get_pos() - if flight_check(self, s) == false then - - self.state = "flop" - self.object:set_acceleration({x = 0, y = DEFAULT_FALL_SPEED, z = 0}) - - local p = self.object:get_pos() - local sdef = minetest.registered_nodes[node_ok(vector.add(p, vector.new(0,self.collisionbox[2]-0.2,0))).name] - -- Flop on ground - if sdef and sdef.walkable then - if self.object:get_velocity().y < 0.1 then - mob_sound(self, "flop") - self.object:set_velocity({ - x = random(-FLOP_HOR_SPEED, FLOP_HOR_SPEED), - y = FLOP_HEIGHT, - z = random(-FLOP_HOR_SPEED, FLOP_HOR_SPEED), - }) - end - end - - set_animation(self, "stand", true) - - return - elseif self.state == "flop" then - self.state = "stand" - self.object:set_acceleration({x = 0, y = 0, z = 0}) - set_velocity(self, 0) - end - end -end - - --- dogshoot attack switch and counter function -local dogswitch = function(self, dtime) - - -- switch mode not activated - if not self.dogshoot_switch - or not dtime then - return 0 - end - - self.dogshoot_count = self.dogshoot_count + dtime - - if (self.dogshoot_switch == 1 - and self.dogshoot_count > self.dogshoot_count_max) - or (self.dogshoot_switch == 2 - and self.dogshoot_count > self.dogshoot_count2_max) then - - self.dogshoot_count = 0 - - if self.dogshoot_switch == 1 then - self.dogshoot_switch = 2 - else - self.dogshoot_switch = 1 - end - end - - return self.dogshoot_switch -end - -local function go_to_pos(entity,b) - if not entity then return end - local s=entity.object:get_pos() - if not b then - --self.state = "stand" - return end - if vector.distance(b,s) < 1 then - --set_velocity(entity,0) - return true - end - local v = { x = b.x - s.x, z = b.z - s.z } - local yaw = (atann(v.z / v.x) + pi / 2) - entity.rotate - if b.x > s.x then yaw = yaw + pi end - entity.object:set_yaw(yaw) - set_velocity(entity,entity.follow_velocity) - mcl_mobs:set_animation(entity, "walk") -end - -local function interact_with_door(self, action, target) - local p = self.object:get_pos() - --local t = minetest.get_timeofday() - --local dd = minetest.find_nodes_in_area(vector.offset(p,-1,-1,-1),vector.offset(p,1,1,1),{"group:door"}) - --for _,d in pairs(dd) do - if target then - mcl_log("Door target is: ".. minetest.pos_to_string(target)) - - local n = minetest.get_node(target) - if n.name:find("_b_") or n.name:find("_t_") then - mcl_log("Door") - local def = minetest.registered_nodes[n.name] - local closed = n.name:find("_b_1") or n.name:find("_t_1") - --if self.state == PATHFINDING then - if closed and action == "open" and def.on_rightclick then - mcl_log("Open door") - def.on_rightclick(target,n,self) - end - if not closed and action == "close" and def.on_rightclick then - mcl_log("Close door") - def.on_rightclick(target,n,self) - end - --else - else - mcl_log("Not door") - end - else - mcl_log("no target. cannot try and open or close door") - end - --end -end - -local function do_pathfind_action (self, action) - if action then - mcl_log("Action present") - local type = action["type"] - local action_val = action["action"] - local target = action["target"] - if target then - mcl_log("Target: ".. minetest.pos_to_string(target)) - end - if type and type == "door" then - mcl_log("Type is door") - interact_with_door(self, action_val, target) - end - end -end - -local gowp_etime = 0 - -local function check_gowp(self,dtime) - gowp_etime = gowp_etime + dtime - - -- 0.1 is optimal. - --less frequently = villager will get sent back after passing a point. - --more frequently = villager will fail points they shouldn't they just didn't get there yet - - --if gowp_etime < 0.05 then return end - --gowp_etime = 0 - local p = self.object:get_pos() - - -- no destination - if not p or not self._target then - mcl_log("p: ".. tostring(p)) - mcl_log("self._target: ".. tostring(self._target)) - return - end - - -- arrived at location, finish gowp - local distance_to_targ = vector.distance(p,self._target) - --mcl_log("Distance to targ: ".. tostring(distance_to_targ)) - if distance_to_targ < 2 then - mcl_log("Arrived at _target") - self.waypoints = nil - self._target = nil - self.current_target = nil - self.state = "stand" - self.order = "stand" - self.object:set_velocity({x = 0, y = 0, z = 0}) - self.object:set_acceleration({x = 0, y = 0, z = 0}) - if self.callback_arrived then return self.callback_arrived(self) end - return true - end - - -- More pathing to be done - local distance_to_current_target = 50 - if self.current_target and self.current_target["pos"] then - distance_to_current_target = vector.distance(p,self.current_target["pos"]) - end - - -- 0.6 is working but too sensitive. sends villager back too frequently. 0.7 is quite good, but not with heights - -- 0.8 is optimal for 0.025 frequency checks and also 1... Actually. 0.8 is winning - -- 0.9 and 1.0 is also good. Stick with unless door open or closing issues - if self.waypoints and #self.waypoints > 0 and ( not self.current_target or not self.current_target["pos"] or distance_to_current_target < 0.9 ) then - -- We have waypoints, and no current target, or we're at it. We need a new current_target. - do_pathfind_action (self, self.current_target["action"]) - - local failed_attempts = self.current_target["failed_attempts"] - mcl_log("There after " .. failed_attempts .. " failed attempts. current target:".. minetest.pos_to_string(self.current_target["pos"]) .. ". Distance: " .. distance_to_current_target) - - self.current_target = table.remove(self.waypoints, 1) - go_to_pos(self, self.current_target["pos"]) - return - elseif self.current_target and self.current_target["pos"] then - -- No waypoints left, but have current target. Potentially last waypoint to go to. - self.current_target["failed_attempts"] = self.current_target["failed_attempts"] + 1 - local failed_attempts = self.current_target["failed_attempts"] - if failed_attempts >= 50 then - mcl_log("Failed to reach position (" .. minetest.pos_to_string(self.current_target["pos"]) .. ") too many times. Abandon route. Times tried: " .. failed_attempts) - self.state = "stand" - self.current_target = nil - self.waypoints = nil - self._target = nil - self._pf_last_failed = os.time() - self.object:set_velocity({x = 0, y = 0, z = 0}) - self.object:set_acceleration({x = 0, y = 0, z = 0}) - return - end - - --mcl_log("Not at pos with failed attempts ".. failed_attempts ..": ".. minetest.pos_to_string(p) .. "self.current_target: ".. minetest.pos_to_string(self.current_target["pos"]) .. ". Distance: ".. distance_to_current_target) - go_to_pos(self, self.current_target["pos"]) - -- Do i just delete current_target, and return so we can find final path. - else - -- Not at target, no current waypoints or current_target. Through the door and should be able to path to target. - -- Is a little sensitive and could take 1 - 7 times. A 10 fail count might be a good exit condition. - - mcl_log("We don't have waypoints or a current target. Let's try to path to target") - local final_wp = minetest.find_path(p,self._target,150,1,4) - if final_wp then - mcl_log("We might be able to get to target here.") - -- self.waypoints = final_wp - --go_to_pos(self,self._target) - else - -- Abandon route? - mcl_log("Cannot plot final route to target") - end - end - - -- I don't think we need the following anymore, but test first. - -- Maybe just need something to path to target if no waypoints left - if self.current_target and self.current_target["pos"] and (self.waypoints and #self.waypoints == 0) then - local updated_p = self.object:get_pos() - local distance_to_cur_targ = vector.distance(updated_p,self.current_target["pos"]) - - mcl_log("Distance to current target: ".. tostring(distance_to_cur_targ)) - mcl_log("Current p: ".. minetest.pos_to_string(updated_p)) - - -- 1.6 is good. is 1.9 better? It could fail less, but will it path to door when it isn't after door - if distance_to_cur_targ > 1.9 then - mcl_log("not close to current target: ".. minetest.pos_to_string(self.current_target["pos"])) - go_to_pos(self,self._current_target) - else - mcl_log("close to current target: ".. minetest.pos_to_string(self.current_target["pos"])) - self.current_target = nil - end - - return - end -end - --- execute current state (stand, walk, run, attacks) --- returns true if mob has died -local do_states = function(self, dtime) - --if self.can_open_doors then check_doors(self) end - - local yaw = self.object:get_yaw() or 0 - - if self.state == "stand" then - if random(1, 4) == 1 then - - local s = self.object:get_pos() - local objs = minetest.get_objects_inside_radius(s, 3) - local lp - for n = 1, #objs do - if objs[n]:is_player() then - lp = objs[n]:get_pos() - break - end - end - - -- look at any players nearby, otherwise turn randomly - if lp and self.look_at_players then - - local vec = { - x = lp.x - s.x, - z = lp.z - s.z - } - - yaw = (atan(vec.z / vec.x) + pi / 2) - self.rotate - - if lp.x > s.x then yaw = yaw + pi end - else - yaw = yaw + random(-0.5, 0.5) - end - - yaw = set_yaw(self, yaw, 8) - end - if self.order == "sit" then - set_animation(self, "sit") - set_velocity(self, 0) - else - set_animation(self, "stand") - set_velocity(self, 0) - end - - -- npc's ordered to stand stay standing - if self.order == "stand" or self.order == "sleep" or self.order == "work" then - - else - if self.walk_chance ~= 0 - and self.facing_fence ~= true - and random(1, 100) <= self.walk_chance - and is_at_cliff_or_danger(self) == false then - - set_velocity(self, self.walk_velocity) - self.state = "walk" - set_animation(self, "walk") - end - end - - elseif self.state == PATHFINDING then - check_gowp(self,dtime) - - elseif self.state == "walk" then - local s = self.object:get_pos() - local lp = nil - - -- is there something I need to avoid? - if (self.water_damage > 0 - and self.lava_damage > 0) - or self.breath_max ~= -1 then - - lp = minetest.find_node_near(s, 1, {"group:water", "group:lava"}) - - elseif self.water_damage > 0 then - - lp = minetest.find_node_near(s, 1, {"group:water"}) - - elseif self.lava_damage > 0 then - - lp = minetest.find_node_near(s, 1, {"group:lava"}) - - elseif self.fire_damage > 0 then - - lp = minetest.find_node_near(s, 1, {"group:fire"}) - - end - - local is_in_danger = false - if lp then - -- If mob in or on dangerous block, look for land - if (is_node_dangerous(self, self.standing_in) or - is_node_dangerous(self, self.standing_on)) or (is_node_waterhazard(self, self.standing_in) or is_node_waterhazard(self, self.standing_on)) and (not self.fly) then - is_in_danger = true - - -- If mob in or on dangerous block, look for land - if is_in_danger then - -- Better way to find shore - copied from upstream - lp = minetest.find_nodes_in_area_under_air( - {x = s.x - 5, y = s.y - 0.5, z = s.z - 5}, - {x = s.x + 5, y = s.y + 1, z = s.z + 5}, - {"group:solid"}) - - lp = #lp > 0 and lp[random(#lp)] - - -- did we find land? - if lp then - - local vec = { - x = lp.x - s.x, - z = lp.z - s.z - } - - yaw = (atan(vec.z / vec.x) + pi / 2) - self.rotate - - - if lp.x > s.x then yaw = yaw + pi end - - -- look towards land and move in that direction - yaw = set_yaw(self, yaw, 6) - set_velocity(self, self.walk_velocity) - - end - end - - -- A danger is near but mob is not inside - else - - -- Randomly turn - if random(1, 100) <= 30 then - yaw = yaw + random(-0.5, 0.5) - yaw = set_yaw(self, yaw, 8) - end - end - - yaw = set_yaw(self, yaw, 8) - - -- otherwise randomly turn - elseif random(1, 100) <= 30 then - - yaw = yaw + random(-0.5, 0.5) - yaw = set_yaw(self, yaw, 8) - end - - -- stand for great fall or danger or fence in front - local cliff_or_danger = false - if is_in_danger then - cliff_or_danger = is_at_cliff_or_danger(self) - end - if self.facing_fence == true - or cliff_or_danger - or random(1, 100) <= 30 then - - set_velocity(self, 0) - self.state = "stand" - set_animation(self, "stand") - local yaw = self.object:get_yaw() or 0 - yaw = set_yaw(self, yaw + 0.78, 8) - else - - set_velocity(self, self.walk_velocity) - - if flight_check(self) - and self.animation - and self.animation.fly_start - and self.animation.fly_end then - set_animation(self, "fly") - else - set_animation(self, "walk") - end - end - - -- runaway when punched - elseif self.state == "runaway" then - - self.runaway_timer = self.runaway_timer + 1 - - -- stop after 5 seconds or when at cliff - if self.runaway_timer > 5 - or is_at_cliff_or_danger(self) then - self.runaway_timer = 0 - set_velocity(self, 0) - self.state = "stand" - set_animation(self, "stand") - local yaw = self.object:get_yaw() or 0 - yaw = set_yaw(self, yaw + 0.78, 8) - else - set_velocity(self, self.run_velocity) - set_animation(self, "run") - end - - -- attack routines (explode, dogfight, shoot, dogshoot) - elseif self.state == "attack" then - - local s = self.object:get_pos() - local p = self.attack:get_pos() or s - - -- stop attacking if player invisible or out of range - if not self.attack - or not self.attack:get_pos() - or not object_in_range(self, self.attack) - or self.attack:get_hp() <= 0 - or (self.attack:is_player() and mcl_mobs.invis[ self.attack:get_player_name() ]) then - - self.state = "stand" - set_velocity(self, 0) - set_animation(self, "stand") - self.attack = nil - self.v_start = false - self.timer = 0 - self.blinktimer = 0 - self.path.way = nil - - return - end - - -- calculate distance from mob and enemy - local dist = vector.distance(p, s) - - if self.attack_type == "explode" then - - local vec = { - x = p.x - s.x, - z = p.z - s.z - } - - yaw = (atan(vec.z / vec.x) + pi / 2) - self.rotate - - if p.x > s.x then yaw = yaw + pi end - - yaw = set_yaw(self, yaw, 0, dtime) - - local node_break_radius = self.explosion_radius or 1 - local entity_damage_radius = self.explosion_damage_radius - or (node_break_radius * 2) - - -- start timer when in reach and line of sight - if not self.v_start - and dist <= self.reach - and line_of_sight(self, s, p, 2) then - - self.v_start = true - self.timer = 0 - self.blinktimer = 0 - mob_sound(self, "fuse", nil, false) - - -- stop timer if out of reach or direct line of sight - elseif self.allow_fuse_reset - and self.v_start - and (dist >= self.explosiontimer_reset_radius - or not line_of_sight(self, s, p, 2)) then - self.v_start = false - self.timer = 0 - self.blinktimer = 0 - self.blinkstatus = false - remove_texture_mod(self, "^[brighten") - end - - -- walk right up to player unless the timer is active - if self.v_start and (self.stop_to_explode or dist < self.reach) then - set_velocity(self, 0) - else - set_velocity(self, self.run_velocity) - end - - if self.animation and self.animation.run_start then - set_animation(self, "run") - else - set_animation(self, "walk") - end - - if self.v_start then - - self.timer = self.timer + dtime - self.blinktimer = (self.blinktimer or 0) + dtime - - if self.blinktimer > 0.2 then - - self.blinktimer = 0 - - if self.blinkstatus then - remove_texture_mod(self, "^[brighten") - else - add_texture_mod(self, "^[brighten") - end - - self.blinkstatus = not self.blinkstatus - end - - if self.timer > self.explosion_timer then - - local pos = self.object:get_pos() - - if mobs_griefing and not minetest.is_protected(pos, "") then - mcl_explosions.explode(mcl_util.get_object_center(self.object), self.explosion_strength, { drop_chance = 1.0 }, self.object) - else - minetest.sound_play(self.sounds.explode, { - pos = pos, - gain = 1.0, - max_hear_distance = self.sounds.distance or 32 - }, true) - - entity_physics(pos, entity_damage_radius) - effect(pos, 32, "mcl_particles_smoke.png", nil, nil, node_break_radius, 1, 0) - end - mcl_burning.extinguish(self.object) - self.object:remove() - - return true - end - end - - elseif self.attack_type == "dogfight" - or (self.attack_type == "dogshoot" and dogswitch(self, dtime) == 2) and (dist >= self.avoid_distance or not self.shooter_avoid_enemy) - or (self.attack_type == "dogshoot" and dist <= self.reach and dogswitch(self) == 0) then - - if self.fly - and dist > self.reach then - - local p1 = s - local me_y = floor(p1.y) - local p2 = p - local p_y = floor(p2.y + 1) - local v = self.object:get_velocity() - - if flight_check(self, s) then - - if me_y < p_y then - - self.object:set_velocity({ - x = v.x, - y = 1 * self.walk_velocity, - z = v.z - }) - - elseif me_y > p_y then - - self.object:set_velocity({ - x = v.x, - y = -1 * self.walk_velocity, - z = v.z - }) - end - else - if me_y < p_y then - - self.object:set_velocity({ - x = v.x, - y = 0.01, - z = v.z - }) - - elseif me_y > p_y then - - self.object:set_velocity({ - x = v.x, - y = -0.01, - z = v.z - }) - end - end - - end - - -- rnd: new movement direction - if self.path.following - and self.path.way - and self.attack_type ~= "dogshoot" then - - -- no paths longer than 50 - if #self.path.way > 50 - or dist < self.reach then - self.path.following = false - return - end - - local p1 = self.path.way[1] - - if not p1 then - self.path.following = false - return - end - - if abs(p1.x-s.x) + abs(p1.z - s.z) < 0.6 then - -- reached waypoint, remove it from queue - table.remove(self.path.way, 1) - end - - -- set new temporary target - p = {x = p1.x, y = p1.y, z = p1.z} - end - - local vec = { - x = p.x - s.x, - z = p.z - s.z - } - - yaw = (atan(vec.z / vec.x) + pi / 2) - self.rotate - - if p.x > s.x then yaw = yaw + pi end - - yaw = set_yaw(self, yaw, 0, dtime) - - -- move towards enemy if beyond mob reach - if dist > self.reach then - - -- path finding by rnd - if self.pathfinding -- only if mob has pathfinding enabled - and enable_pathfinding then - - smart_mobs(self, s, p, dist, dtime) - end - - if is_at_cliff_or_danger(self) then - - set_velocity(self, 0) - set_animation(self, "stand") - local yaw = self.object:get_yaw() or 0 - yaw = set_yaw(self, yaw + 0.78, 8) - else - - if self.path.stuck then - set_velocity(self, self.walk_velocity) - else - set_velocity(self, self.run_velocity) - end - - if self.animation and self.animation.run_start then - set_animation(self, "run") - else - set_animation(self, "walk") - end - end - - else -- rnd: if inside reach range - - self.path.stuck = false - self.path.stuck_timer = 0 - self.path.following = false -- not stuck anymore - - set_velocity(self, 0) - - if not self.custom_attack then - - if self.timer > 1 then - - self.timer = 0 - - if self.double_melee_attack - and random(1, 2) == 1 then - set_animation(self, "punch2") - else - set_animation(self, "punch") - end - - local p2 = p - local s2 = s - - p2.y = p2.y + .5 - s2.y = s2.y + .5 - - if line_of_sight(self, p2, s2) == true then - - -- play attack sound - mob_sound(self, "attack") - - -- punch player (or what player is attached to) - local attached = self.attack:get_attach() - if attached then - self.attack = attached - end - self.attack:punch(self.object, 1.0, { - full_punch_interval = 1.0, - damage_groups = {fleshy = self.damage} - }, nil) - end - end - else -- call custom attack every second - if self.custom_attack - and self.timer > 1 then - - self.timer = 0 - - self.custom_attack(self, p) - end - end - end - - elseif self.attack_type == "shoot" - or (self.attack_type == "dogshoot" and dogswitch(self, dtime) == 1) - or (self.attack_type == "dogshoot" and (dist > self.reach or dist < self.avoid_distance and self.shooter_avoid_enemy) and dogswitch(self) == 0) then - - 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 - } - - yaw = (atan(vec.z / vec.x) + pi / 2) - self.rotate - - if p.x > s.x then yaw = yaw + pi end - - yaw = set_yaw(self, yaw, 0, dtime) - - local stay_away_from_player = vector.new(0,0,0) - - --strafe back and fourth - - --stay away from player so as to shoot them - if dist < self.avoid_distance and self.shooter_avoid_enemy then - set_animation(self, "shoot") - stay_away_from_player=vector.multiply(vector.direction(p, s), 0.33) - 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 - self.acc = vector.add(vector.multiply(vector.rotate_around_axis(vector.direction(s, p), vector.new(0,1,0), self.strafe_direction), 0.3*self.walk_velocity), stay_away_from_player) - else - set_velocity(self, 0) - end - - local p = self.object:get_pos() - p.y = p.y + (self.collisionbox[2] + self.collisionbox[5]) / 2 - - if self.shoot_interval - and self.timer > self.shoot_interval - and not minetest.raycast(vector.add(p, vector.new(0,self.shoot_offset,0)), vector.add(self.attack:get_pos(), vector.new(0,1.5,0)), false, false):next() - and random(1, 100) <= 60 then - - self.timer = 0 - set_animation(self, "shoot") - - -- play shoot attack sound - mob_sound(self, "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(p, 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(p, vec) - else - arrow:set_velocity(vec) - end - end - end - else - - end - end -end - -function output_table (wp) - if not wp then return end - mcl_log("wp items: ".. tostring(#wp)) - for a,b in pairs(wp) do - mcl_log(a.. ": ".. tostring(b)) - end -end - -function append_paths (wp1, wp2) - mcl_log("Start append") - if not wp1 or not wp2 then - mcl_log("Cannot append wp's") - return - end - output_table(wp1) - output_table(wp2) - for _,a in pairs (wp2) do - table.insert(wp1, a) - end - mcl_log("End append") -end - -local function output_enriched (wp_out) - mcl_log("Output enriched path") - local i = 0 - for _,outy in pairs (wp_out) do - i = i + 1 - mcl_log("Pos ".. i ..":" .. minetest.pos_to_string(outy["pos"])) - - local action = outy["action"] - if action then - mcl_log("type: " .. action["type"]) - mcl_log("action: " .. action["action"]) - mcl_log("target: " .. minetest.pos_to_string(action["target"])) - end - mcl_log("failed attempts: " .. outy["failed_attempts"]) - end -end - --- This function will take a list of paths, and enrich it with: --- a var for failed attempts --- an action, such as to open or close a door where we know that pos requires that action -local function generate_enriched_path(wp_in, door_open_pos, door_close_pos, cur_door_pos) - local wp_out = {} - for i, cur_pos in pairs(wp_in) do - local action = nil - - local one_down = vector.new(0,-1,0) - local cur_pos_to_add = vector.add(cur_pos, one_down) - if door_open_pos and vector.equals (cur_pos, door_open_pos) then - mcl_log ("Door open match") - --action = {type = "door", action = "open"} - action = {} - action["type"] = "door" - action["action"] = "open" - action["target"] = cur_door_pos - cur_pos_to_add = vector.add(cur_pos, one_down) - elseif door_close_pos and vector.equals(cur_pos, door_close_pos) then - mcl_log ("Door close match") - --action = {type = "door", action = "closed"} - action = {} - action["type"] = "door" - action["action"] = "close" - action["target"] = cur_door_pos - cur_pos_to_add = vector.add(cur_pos, one_down) - elseif cur_door_pos and vector.equals(cur_pos, cur_door_pos) then - mcl_log("Current door pos") - cur_pos_to_add = vector.add(cur_pos, one_down) - action = {} - action["type"] = "door" - action["action"] = "open" - action["target"] = cur_door_pos - else - cur_pos_to_add = cur_pos - --mcl_log ("Pos doesn't match") - end - - wp_out[i] = {} - wp_out[i]["pos"] = cur_pos_to_add - wp_out[i]["failed_attempts"] = 0 - wp_out[i]["action"] = action - - --wp_out[i] = {"pos" = cur_pos, "failed_attempts" = 0, "action" = action} - --output_pos(cur_pos, i) - end - output_enriched(wp_out) - return wp_out -end - -local plane_adjacents = { - vector.new(1,0,0), - vector.new(-1,0,0), - vector.new(0,0,1), - vector.new(0,0,-1), -} - --- This function is used to see if we can path. We could use to check a route, rather than making people move. -local function calculate_path_through_door (p, t, target) - -- target is the same as t, just 1 square difference. Maybe we don't need target - mcl_log("Plot route from mob: " .. minetest.pos_to_string(p) .. ", to target: " .. minetest.pos_to_string(t)) - - local enriched_path = nil - - local cur_door_pos = nil - local pos_closest_to_door = nil - local other_side_of_door = nil - - --Path to door first - local wp = minetest.find_path(p,t,150,1,4) - if not wp then - mcl_log("No direct path. Path through door") - - -- This could improve. There could be multiple doors. Check you can path from door to target first. - local cur_door_pos = minetest.find_node_near(target,16,{"group:door"}) - if cur_door_pos then - mcl_log("Found a door near: " .. minetest.pos_to_string(cur_door_pos)) - for _,v in pairs(plane_adjacents) do - pos_closest_to_door = vector.add(cur_door_pos,v) - - local n = minetest.get_node(pos_closest_to_door) - if n.name == "air" then - wp = minetest.find_path(p,pos_closest_to_door,150,1,4) - if wp then - mcl_log("Found a path to next to door".. minetest.pos_to_string(pos_closest_to_door)) - other_side_of_door = vector.add(cur_door_pos,-v) - mcl_log("Opposite is: ".. minetest.pos_to_string(other_side_of_door)) - - local wp_otherside_door_to_target = minetest.find_path(other_side_of_door,t,150,1,4) - if wp_otherside_door_to_target and #wp_otherside_door_to_target > 0 then - table.insert(wp, cur_door_pos) - append_paths (wp, wp_otherside_door_to_target) - enriched_path = generate_enriched_path(wp, pos_closest_to_door, other_side_of_door, cur_door_pos) - mcl_log("We have a path from outside door to target") - else - mcl_log("We cannot path from outside door to target") - end - break - else - mcl_log("This block next to door doesn't work.") - end - else - mcl_log("Block is not air, it is: ".. n.name) - end - - end - else - mcl_log("No door found") - end - else - mcl_log("We have a direct route") - end - - if wp and not enriched_path then - enriched_path = generate_enriched_path(wp) - end - return enriched_path -end - -local gopath_last = os.time() -function mcl_mobs:gopath(self,target,callback_arrived) - if self.state == PATHFINDING then mcl_log("Already pathfinding, don't set another until done.") return end - - if self._pf_last_failed and (os.time() - self._pf_last_failed) < 30 then - mcl_log("We are not ready to path as last fail is less than threshold: " .. (os.time() - self._pf_last_failed)) - return - else - mcl_log("We are ready to pathfind, no previous fail or we are past threshold") - end - - --if os.time() - gopath_last < 5 then - -- mcl_log("Not ready to path yet") - -- return - --end - --gopath_last = os.time() - - self.order = nil - - local p = self.object:get_pos() - local t = vector.offset(target,0,1,0) - - local wp = calculate_path_through_door(p, t, target) - if not wp then - mcl_log("Could not calculate path") - self._pf_last_failed = os.time() - -- Cover for a flaw in pathfind where it chooses the wrong door and gets stuck. Take a break, allow others. - end - --output_table(wp) - - if wp and #wp > 0 then - self._target = t - self.callback_arrived = callback_arrived - local current_location = table.remove(wp,1) - if current_location and current_location["pos"] then - mcl_log("Removing first co-ord? " .. tostring(current_location["pos"])) - else - mcl_log("Nil pos") - end - self.current_target = current_location - self.waypoints = wp - self.state = PATHFINDING - return true - else - self.state = "walk" - self.waypoints = nil - self.current_target = nil - -- minetest.log("no path found") - end -end - -local function player_near(pos) - for _,o in pairs(minetest.get_objects_inside_radius(pos,2)) do - if o:is_player() then return true end - end -end - -local function get_armor_texture(armor_name) - if armor_name == "" then - return "" - end - if armor_name=="blank.png" then - return "blank.png" - end - local seperator = string.find(armor_name, ":") - return "mcl_armor_"..string.sub(armor_name, seperator+1, -1)..".png^" -end - -local function set_armor_texture(self) - if self.armor_list then - local chestplate=minetest.registered_items[self.armor_list.chestplate] or {name=""} - local boots=minetest.registered_items[self.armor_list.boots] or {name=""} - local leggings=minetest.registered_items[self.armor_list.leggings] or {name=""} - local helmet=minetest.registered_items[self.armor_list.helmet] or {name=""} - - if helmet.name=="" and chestplate.name=="" and leggings.name=="" and boots.name=="" then - helmet={name="blank.png"} - end - local texture = get_armor_texture(chestplate.name)..get_armor_texture(helmet.name)..get_armor_texture(boots.name)..get_armor_texture(leggings.name) - if string.sub(texture, -1,-1) == "^" then - texture=string.sub(texture,1,-2) - end - if self.textures[self.wears_armor] then - self.textures[self.wears_armor]=texture - end - self.object:set_properties({textures=self.textures}) - - local armor_ - if type(self.armor) == "table" then - armor_ = table.copy(self.armor) - armor_.immortal = 1 - else - armor_ = {immortal=1, fleshy = self.armor} - end - - for _,item in pairs(self.armor_list) do - if not item then return end - if type(minetest.get_item_group(item, "mcl_armor_points")) == "number" then - armor_.fleshy=armor_.fleshy-(minetest.get_item_group(item, "mcl_armor_points")*3.5) - end - end - self.object:set_armor_groups(armor_) - end -end - -local function check_item_pickup(self) - if self.pick_up and #self.pick_up > 0 or self.wears_armor then - local p = self.object:get_pos() - for _,o in pairs(minetest.get_objects_inside_radius(p,2)) do - local l=o:get_luaentity() - if l and l.name == "__builtin:item" then - if not player_near(p) and l.itemstring:find("mcl_armor") and self.wears_armor then - local armor_type - if l.itemstring:find("chestplate") then - armor_type = "chestplate" - elseif l.itemstring:find("boots") then - armor_type = "boots" - elseif l.itemstring:find("leggings") then - armor_type = "leggings" - elseif l.itemstring:find("helmet") then - armor_type = "helmet" - end - if not armor_type then - return - end - if not self.armor_list then - self.armor_list={helmet="",chestplate="",boots="",leggings=""} - elseif self.armor_list[armor_type] and self.armor_list[armor_type] ~= "" then - return - end - self.armor_list[armor_type]=ItemStack(l.itemstring):get_name() - o:remove() - end - if self.pick_up then - for k,v in pairs(self.pick_up) do - if not player_near(p) and self.on_pick_up and l.itemstring:find(v) then - local r = self.on_pick_up(self,l) - if r and r.is_empty and not r:is_empty() then - l.itemstring = r:to_string() - elseif r and r.is_empty and r:is_empty() then - o:remove() - end - end - end - end - end - end - end -end - -local check_herd_timer = 0 -local function check_herd(self,dtime) - local pos = self.object:get_pos() - if not pos then return end - check_herd_timer = check_herd_timer + dtime - if check_herd_timer < 4 then return end - check_herd_timer = 0 - for _,o in pairs(minetest.get_objects_inside_radius(pos,self.view_range)) do - local l = o:get_luaentity() - local p,y - if l and l.is_mob and l.name == self.name then - if self.horny and l.horny then - p = l.object:get_pos() - else - y = o:get_yaw() - end - if p then - go_to_pos(self,p) - elseif y then - set_yaw(self,y) - end - end - end -end - -local function damage_mob(self,reason,damage) - if not self.health then return end - damage = floor(damage) - if damage > 0 then - self.health = self.health - damage - - effect(self.object:get_pos(), 5, "mcl_particles_smoke.png", 1, 2, 2, nil) - - if check_for_death(self, reason, {type = reason}) then - return true - end - end -end - -local function check_entity_cramming(self) - local p = self.object:get_pos() - if not p then return end - local oo = minetest.get_objects_inside_radius(p,1) - local mobs = {} - for _,o in pairs(oo) do - local l = o:get_luaentity() - if l and l.is_mob and l.health > 0 then table.insert(mobs,l) end - end - local clear = #mobs < ENTITY_CRAMMING_MAX - local ncram = {} - for _,l in pairs(mobs) do - if l then - if clear then - l.cram = nil - elseif l.cram == nil and not self.child then - table.insert(ncram,l) - elseif l.cram then - damage_mob(l,"cramming",CRAMMING_DAMAGE) - end - end - end - for i,l in pairs(ncram) do - if i > ENTITY_CRAMMING_MAX then - l.cram = true - else - l.cram = nil - end - end -end - --- falling and fall damage --- returns true if mob died -local falling = function(self, pos) - - if self.fly and self.state ~= "die" then - return - end - - if mcl_portals ~= nil then - if mcl_portals.nether_portal_cooloff(self.object) then - return false -- mob has teleported through Nether portal - it's 99% not falling - end - end - - -- floating in water (or falling) - local v = self.object:get_velocity() - - if v.y > 0 then - - -- apply gravity when moving up - self.object:set_acceleration({ - x = 0, - y = DEFAULT_FALL_SPEED, - z = 0 - }) - - elseif v.y <= 0 and v.y > self.fall_speed then - - -- fall downwards at set speed - self.object:set_acceleration({ - x = 0, - y = self.fall_speed, - z = 0 - }) - else - -- stop accelerating once max fall speed hit - self.object:set_acceleration({x = 0, y = 0, z = 0}) - end - - if minetest.registered_nodes[node_ok(pos).name].groups.lava then - - if self.floats_on_lava == 1 then - - self.object:set_acceleration({ - x = 0, - y = -self.fall_speed / (max(1, v.y) ^ 2), - z = 0 - }) - end - end - - -- in water then float up - if minetest.registered_nodes[node_ok(pos).name].groups.water then - - if self.floats == 1 then - - self.object:set_acceleration({ - x = 0, - y = -self.fall_speed / (max(1, v.y) ^ 2), - z = 0 - }) - end - else - - -- fall damage onto solid ground - if self.fall_damage == 1 - and self.object:get_velocity().y == 0 then - local n = node_ok(vector.offset(pos,0,-1,0)).name - local d = (self.old_y or 0) - self.object:get_pos().y - - if d > 5 and n ~= "air" and n ~= "ignore" then - local add = minetest.get_item_group(self.standing_on, "fall_damage_add_percent") - local damage = d - 5 - if add ~= 0 then - damage = damage + damage * (add/100) - end - damage_mob(self,"fall",damage) - end - - self.old_y = self.object:get_pos().y - end - end -end - -local teleport = function(self, target) - if self.do_teleport then - if self.do_teleport(self, target) == false then - return - end - end -end - - --- deal damage and effects when mob punched -local mob_punch = function(self, hitter, tflp, tool_capabilities, dir) - - -- custom punch function - if self.do_punch then - - -- when false skip going any further - if self.do_punch(self, hitter, tflp, tool_capabilities, dir) == false then - return - end - end - - -- error checking when mod profiling is enabled - if not tool_capabilities then - minetest.log("warning", "[mobs] Mod profiling enabled, damage not enabled") - return - end - - local is_player = hitter:is_player() - - if is_player then - -- is mob protected? - if self.protected and minetest.is_protected(self.object:get_pos(), hitter:get_player_name()) then - return - end - - if minetest.is_creative_enabled(hitter:get_player_name()) then - self.health = 0 - end - - -- set/update 'drop xp' timestamp if hitted by player - self.xp_timestamp = minetest.get_us_time() - end - - - -- punch interval - local weapon = hitter:get_wielded_item() - local punch_interval = 1.4 - - -- exhaust attacker - if is_player then - mcl_hunger.exhaust(hitter:get_player_name(), mcl_hunger.EXHAUST_ATTACK) - end - - -- calculate mob damage - local damage = 0 - local armor = self.object:get_armor_groups() or {} - local tmp - - -- quick error check incase it ends up 0 (serialize.h check test) - if tflp == 0 then - tflp = 0.2 - end - - - for group,_ in pairs( (tool_capabilities.damage_groups or {}) ) do - - tmp = tflp / (tool_capabilities.full_punch_interval or 1.4) - - if tmp < 0 then - tmp = 0.0 - elseif tmp > 1 then - tmp = 1.0 - end - - damage = damage + (tool_capabilities.damage_groups[group] or 0) - * tmp * ((armor[group] or 0) / 100.0) - end - - if weapon then - local fire_aspect_level = mcl_enchanting.get_enchantment(weapon, "fire_aspect") - if fire_aspect_level > 0 then - mcl_burning.set_on_fire(self.object, fire_aspect_level * 4) - end - end - - -- check for tool immunity or special damage - for n = 1, #self.immune_to do - - if self.immune_to[n][1] == weapon:get_name() then - - damage = self.immune_to[n][2] or 0 - break - end - end - - -- healing - if damage <= -1 then - self.health = self.health - floor(damage) - return - end - - if tool_capabilities then - punch_interval = tool_capabilities.full_punch_interval or 1.4 - end - - -- add weapon wear manually - -- Required because we have custom health handling ("health" property) - if minetest.is_creative_enabled("") ~= true - and tool_capabilities then - if tool_capabilities.punch_attack_uses then - -- Without this delay, the wear does not work. Quite hacky ... - minetest.after(0, function(name) - local player = minetest.get_player_by_name(name) - if not player then return end - local weapon = hitter:get_wielded_item(player) - local def = weapon:get_definition() - if def.tool_capabilities and def.tool_capabilities.punch_attack_uses then - local wear = floor(65535/tool_capabilities.punch_attack_uses) - weapon:add_wear(wear) - hitter:set_wielded_item(weapon) - end - end, hitter:get_player_name()) - end - end - - local die = false - - - if damage >= 0 then - -- only play hit sound and show blood effects if damage is 1 or over; lower to 0.1 to ensure armor works appropriately. - if damage >= 0.1 then - -- weapon sounds - if weapon:get_definition().sounds ~= nil then - - local s = random(0, #weapon:get_definition().sounds) - - minetest.sound_play(weapon:get_definition().sounds[s], { - object = self.object, --hitter, - max_hear_distance = 8 - }, true) - else - minetest.sound_play("default_punch", { - object = self.object, - max_hear_distance = 5 - }, true) - end - - damage_effect(self, damage) - - -- do damage - self.health = self.health - damage - - -- skip future functions if dead, except alerting others - if check_for_death(self, "hit", {type = "punch", puncher = hitter}) then - die = true - end - end - -- knock back effect (only on full punch) - if self.knock_back - and tflp >= punch_interval then - -- direction error check - dir = dir or {x = 0, y = 0, z = 0} - - local v = self.object:get_velocity() - if not v then return end - local r = 1.4 - min(punch_interval, 1.4) - local kb = r * (abs(v.x)+abs(v.z)) - local up = 2 - - if die==true then - kb=kb*2 - end - - -- if already in air then dont go up anymore when hit - if abs(v.y) > 0.1 - or self.fly then - up = 0 - end - - - -- check if tool already has specific knockback value - if tool_capabilities.damage_groups["knockback"] then - kb = tool_capabilities.damage_groups["knockback"] - else - kb = kb * 1.5 - end - - - local luaentity - if hitter then - luaentity = hitter:get_luaentity() - end - if hitter and is_player then - local wielditem = hitter:get_wielded_item() - kb = kb + 3 * mcl_enchanting.get_enchantment(wielditem, "knockback") - elseif luaentity and luaentity._knockback then - kb = kb + luaentity._knockback - end - self._kb_turn = true - self._turn_to=self.object:get_yaw()-1.57 - self.frame_speed_multiplier=2.3 - if self.animation.run_end then - set_animation(self, "run") - elseif self.animation.walk_end then - set_animation(self, "walk") - end - minetest.after(0.2, function() - if self and self.object then - self.frame_speed_multiplier=1 - self._kb_turn = false - end - end) - self.object:add_velocity({ - x = dir.x * kb, - y = up*2, - z = dir.z * kb - }) - - self.pause_timer = 0.25 - end - end -- END if damage - - -- if skittish then run away - if hitter and is_player and hitter:get_pos() and not die and self.runaway == true and self.state ~= "flop" then - - local yaw = set_yaw(self, minetest.dir_to_yaw(vector.direction(hitter:get_pos(), self.object:get_pos()))) - minetest.after(0.2,function() - if self and self.object and self.object:get_pos() and hitter and is_player and hitter:get_pos() then - yaw = set_yaw(self, minetest.dir_to_yaw(vector.direction(hitter:get_pos(), self.object:get_pos()))) - set_velocity(self, self.run_velocity) - end - end) - self.state = "runaway" - self.runaway_timer = 0 - self.following = nil - end - - local name = hitter:get_player_name() or "" - - -- attack puncher and call other mobs for help - if self.passive == false - and self.state ~= "flop" - and (self.child == false or self.type == "monster") - and hitter:get_player_name() ~= self.owner - and not mcl_mobs.invis[ name ] then - if not die then - -- attack whoever punched mob - self.state = "" - do_attack(self, hitter) - self._aggro= true - end - - -- alert others to the attack - local objs = minetest.get_objects_inside_radius(hitter:get_pos(), self.view_range) - local obj = nil - - for n = 1, #objs do - - obj = objs[n]:get_luaentity() - - if obj then - -- only alert members of same mob or friends - if obj.group_attack - and obj.state ~= "attack" - and obj.owner ~= name then - if obj.name == self.name then - do_attack(obj, hitter) - elseif type(obj.group_attack) == "table" then - for i=1, #obj.group_attack do - if obj.name == obj.group_attack[i] then - obj._aggro = true - do_attack(obj, hitter) - break - end - end - end - end - - -- have owned mobs attack player threat - if obj.owner == name and obj.owner_loyal then - do_attack(obj, self.object) - end - end - end - end -end - -local mob_detach_child = function(self, child) - - if self.detach_child then - if self.detach_child(self, child) then - return - end - end - if self.driver == child then - self.driver = nil - end - -end - --- get entity staticdata -local mob_staticdata = function(self) +function mob_class:get_staticdata() for _,p in pairs(minetest.get_connected_players()) do - remove_particlespawners(p:get_player_name(),self) + self:remove_particlespawners(p:get_player_name()) end -- remove mob when out of range unless tamed if remove_far @@ -4099,15 +123,12 @@ local mob_staticdata = function(self) return minetest.serialize(tmp) end - --- activate mob and reload settings -local mob_activate = function(self, staticdata, def, dtime) +function mob_class:mob_activate(staticdata, def, dtime) if not self.object:get_pos() or staticdata == "remove" then mcl_burning.extinguish(self.object) self.object:remove() return end - -- remove monsters in peaceful mode if self.type == "monster" and minetest.settings:get_bool("only_peaceful_mobs", false) then mcl_burning.extinguish(self.object) @@ -4115,7 +136,6 @@ local mob_activate = function(self, staticdata, def, dtime) return end - -- load entity variables local tmp = minetest.deserialize(staticdata) if tmp then @@ -4124,7 +144,6 @@ local mob_activate = function(self, staticdata, def, dtime) end end - -- select random texture, set model and size if not self.base_texture then -- compatiblity with old simple mobs textures @@ -4135,38 +154,33 @@ local mob_activate = function(self, staticdata, def, dtime) local c = 1 if #def.textures > c then c = #def.textures end - self.base_texture = def.textures[random(c)] + self.base_texture = def.textures[math.random(c)] self.base_mesh = def.mesh self.base_size = self.visual_size self.base_colbox = self.collisionbox self.base_selbox = self.selectionbox end - -- for current mobs that dont have this set if not self.base_selbox then self.base_selbox = self.selectionbox or self.base_colbox end - -- set texture, model and size local textures = self.base_texture local mesh = self.base_mesh local vis_size = self.base_size local colbox = self.base_colbox local selbox = self.base_selbox - -- specific texture if gotten if self.gotten == true and def.gotten_texture then textures = def.gotten_texture end - -- specific mesh if gotten if self.gotten == true and def.gotten_mesh then mesh = def.gotten_mesh end - -- set child objects to half size if self.child == true then vis_size = { @@ -4197,13 +211,12 @@ local mob_activate = function(self, staticdata, def, dtime) end if self.health == 0 then - self.health = random (self.hp_min, self.hp_max) + self.health = math.random (self.hp_min, self.hp_max) end if self.breath == nil then self.breath = self.breath_max end - -- pathfinding init self.path = {} self.path.way = {} -- path to follow, table of positions self.path.lastpos = {x = 0, y = 0, z = 0} @@ -4243,12 +256,10 @@ local mob_activate = function(self, staticdata, def, dtime) self.blinktimer = 0 self.blinkstatus = false - -- check existing nametag if not self.nametag then self.nametag = def.nametag end if not self.custom_visual_size then - -- Remove saved visual_size on old existing entites. self.visual_size = nil self.base_size = self.visual_size if self.child then @@ -4259,17 +270,15 @@ local mob_activate = function(self, staticdata, def, dtime) end end - -- set anything changed above self.object:set_properties(self) - set_yaw(self, (random(0, 360) - 180) / 180 * pi, 6) - update_tag(self) + self:set_yaw( (math.random(0, 360) - 180) / 180 * math.pi, 6) + self:update_tag() self._current_animation = nil - set_animation(self, "stand") + self:set_animation( "stand") - -- run on_spawn function if found if self.on_spawn and not self.on_spawn_run then if self.on_spawn(self) then - self.on_spawn_run = true -- if true, set flag to run once only + self.on_spawn_run = true end end @@ -4279,105 +288,70 @@ local mob_activate = function(self, staticdata, def, dtime) if not self._run_armor_init and self.wears_armor then self.armor_list={helmet="",chestplate="",boots="",leggings=""} - set_armor_texture(self) + self:set_armor_texture() self._run_armor_init = true end - - -- run after_activate if def.after_activate then - def.after_activate(self, staticdata, def, dtime) end end -local function check_aggro(self,dtime) - if not self._aggro or not self.attack then return end - if not self._check_aggro_timer or self._check_aggro_timer > 5 then - self._check_aggro_timer = 0 - if not self.attack:get_pos() or vector.distance(self.attack:get_pos(),self.object:get_pos()) > 128 then - self._aggro = nil - self.attack = nil - self.state = "stand" - end - end - self._check_aggro_timer = self._check_aggro_timer + dtime -end + -- main mob function -local mob_step = function(self, dtime) +function mob_class:on_step(dtime) self.lifetimer = self.lifetimer - dtime - local pos = self.object:get_pos() - -- Despawning: when lifetimer expires, remove mob - if remove_far - and self.can_despawn == true - and ((not self.nametag) or (self.nametag == "")) - and self.state ~= "attack" - and self.following == nil then - if self.despawn_immediately or self.lifetimer <= 0 then - if spawn_logging then - minetest.log("action", "[mcl_mobs] Mob "..self.name.." despawns at "..minetest.pos_to_string(pos, 1) .. " lifetimer ran out") - end - mcl_burning.extinguish(self.object) - self.object:remove() - return - elseif self.lifetimer <= 10 then - if random(10) < 4 then - self.despawn_immediately = true - else - self.lifetimer = 20 - end - end - end + if not pos then return end + if self:check_despawn(pos) then return true end + + local d = 0.85 + if self:check_dying() then d = 0.92 end local v = self.object:get_velocity() - local d = 0.85 - - if (self.state and self.state=="die" or check_for_death(self)) and not self.animation.die_end then - d = 0.92 - local rot = self.object:get_rotation() - rot.z = ((pi/2-rot.z)*.2)+rot.z - self.object:set_rotation(rot) - end - - if not player_in_active_range(self) then - set_animation(self, "stand", true) - local node_under = node_ok(vector.offset(pos,0,-1,0)).name - local acc = self.object:get_acceleration() - if acc.y > 0 or node_under ~= "air" then - self.object:set_acceleration(vector.new(0,0,0)) - self.object:set_velocity(vector.new(0,0,0)) - end - if acc.y == 0 and node_under == "air" then - falling(self, pos) - end - return - end - if v then --diffuse object velocity self.object:set_velocity({x = v.x*d, y = v.y, z = v.z*d}) end - check_item_pickup(self) - check_aggro(self,dtime) - particlespawner_check(self,dtime) + if self:falling(pos) then return end + + self:check_suspend() + self:check_water_flow() + + local yaw = 0 + if self:is_at_water_danger() and self.state ~= "attack" then + if math.random(1, 10) <= 6 then + self:set_velocity(0) + self.state = "stand" + self:set_animation( "stand") + yaw = yaw + math.random(-0.5, 0.5) + yaw = self:set_yaw( yaw, 8) + end + else + if self.move_in_group ~= false then + self:check_herd(dtime) + end + end + + if self:is_at_cliff_or_danger() then + self:set_velocity(0) + self.state = "stand" + self:set_animation( "stand") + local yaw = self.object:get_yaw() or 0 + yaw = self:set_yaw( yaw + 0.78, 8) + end + if not self.fire_resistant then mcl_burning.tick(self.object, dtime, self) -- mcl_burning.tick may remove object immediately if not self.object:get_pos() then return end end - local yaw = 0 + if mobs_debug then self:update_tag() end - if mobs_debug then - update_tag(self) - end - - if self.state == "die" then - return - end + if self.state == "die" then return end if self.jump_sound_cooloff > 0 then self.jump_sound_cooloff = self.jump_sound_cooloff - dtime @@ -4385,151 +359,22 @@ local mob_step = function(self, dtime) if self.opinion_sound_cooloff > 0 then self.opinion_sound_cooloff = self.opinion_sound_cooloff - dtime end - if falling(self, pos) then - -- Return if mob died after falling - return - end --Mob following code. - follow_flop(self) - + self:follow_flop() --set animation speed relitive to velocity - local v = self.object:get_velocity() - if v then - if self.frame_speed_multiplier then - local v2 = abs(v.x)+abs(v.z)*.833 - if not self.animation.walk_speed then - self.animation.walk_speed = 25 - end - if abs(v.x)+abs(v.z) > 0.5 then - self.object:set_animation_frame_speed((v2/math.max(1,self.run_velocity))*self.animation.walk_speed*self.frame_speed_multiplier) - else - self.object:set_animation_frame_speed(25) - end - end + self:set_animation_speed() + self:check_smooth_rotation(dtime) + self:check_head_swivel(dtime) - --set_speed - if self.acc then - self.object:add_velocity(self.acc) - end - end - - - -- smooth rotation by ThomasMonroe314 - if self._turn_to then - set_yaw(self, self._turn_to, .1) - end - - if self.delay and self.delay > 0 then - - local yaw = self.object:get_yaw() or 0 - - if self.delay == 1 then - yaw = self.target_yaw - else - local dif = abs(yaw - self.target_yaw) - - if yaw > self.target_yaw then - - if dif > pi then - dif = 2 * pi - dif -- need to add - yaw = yaw + dif / self.delay - else - yaw = yaw - dif / self.delay -- need to subtract - end - - elseif yaw < self.target_yaw then - - if dif > pi then - dif = 2 * pi - dif - yaw = yaw - dif / self.delay -- need to subtract - else - yaw = yaw + dif / self.delay -- need to add - end - end - - if yaw > (pi * 2) then yaw = yaw - (pi * 2) end - if yaw < 0 then yaw = yaw + (pi * 2) end - end - - self.delay = self.delay - 1 - if self.shaking then - yaw = yaw + (random() * 2 - 1) * 5 * dtime - end - self.object:set_yaw(yaw) - update_roll(self) - end - - -- end rotation - - if self.head_swivel and type(self.head_swivel) == "string" then - local final_rotation = vector.new(0,0,0) - local oldp,oldr = self.object:get_bone_position(self.head_swivel) - - for _, obj in pairs(minetest.get_objects_inside_radius(pos, 10)) do - if obj:is_player() and not self.attack or obj:get_luaentity() and obj:get_luaentity().name == self.name and self ~= obj:get_luaentity() then - if not self._locked_object then - if math.random(5000/self.curiosity) == 1 or vector.distance(pos,obj:get_pos())<4 and obj:is_player() then - self._locked_object = obj - end - else - if math.random(10000/self.curiosity) == 1 then - self._locked_object = nil - end - end - end - end - - if self.attack or self.following then - self._locked_object = self.attack or self.following - end - - if self._locked_object and (self._locked_object:is_player() or self._locked_object:get_luaentity()) and self._locked_object:get_hp() > 0 then - local _locked_object_eye_height = 1.5 - if self._locked_object:get_luaentity() then - _locked_object_eye_height = self._locked_object:get_luaentity().head_eye_height - end - if self._locked_object:is_player() then - _locked_object_eye_height = self._locked_object:get_properties().eye_height - end - if _locked_object_eye_height then - local self_rot = self.object:get_rotation() - if self.object:get_attach() then - self_rot = self.object:get_attach():get_rotation() - end - local player_pos = self._locked_object:get_pos() - local direction_player = vector.direction(vector.add(self.object:get_pos(), vector.new(0, self.head_eye_height*.7, 0)), vector.add(player_pos, vector.new(0, _locked_object_eye_height, 0))) - local mob_yaw = math.deg(-(-(self_rot.y)-(-minetest.dir_to_yaw(direction_player))))+self.head_yaw_offset - local mob_pitch = math.deg(-dir_to_pitch(direction_player))*self.head_pitch_multiplier - - if (mob_yaw < -60 or mob_yaw > 60) and not (self.attack and self.state == "attack" and not self.runaway) then - final_rotation = vector.multiply(oldr, 0.9) - elseif self.attack and self.state == "attack" and not self.runaway then - if self.head_yaw == "y" then - final_rotation = vector.new(mob_pitch, mob_yaw, 0) - elseif self.head_yaw == "z" then - final_rotation = vector.new(mob_pitch, 0, -mob_yaw) - end - - else - - if self.head_yaw == "y" then - final_rotation = vector.new(((mob_pitch-oldr.x)*.3)+oldr.x, ((mob_yaw-oldr.y)*.3)+oldr.y, 0) - elseif self.head_yaw == "z" then - final_rotation = vector.new(((mob_pitch-oldr.x)*.3)+oldr.x, 0, -(((mob_yaw-oldr.y)*.3)+oldr.y)*3) - end - end - end - elseif not self._locked_object and math.abs(oldr.y) > 3 and math.abs(oldr.x) < 3 then - final_rotation = vector.multiply(oldr, 0.9) - else - 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.horrizonatal_head_height), final_rotation) - - end + self:do_jump() + self:set_armor_texture() + self:check_runaway_from() + self:monster_attack() + self:npc_attack() + self:check_breeding() + self:check_aggro(dtime) -- run custom function (defined in mob lua file) if self.do_custom then @@ -4555,9 +400,10 @@ local mob_step = function(self, dtime) if self.timer < 1 then return end - self.timer = 0 end + self:check_particlespawners(dtime) + self:check_item_pickup() -- never go over 100 if self.timer > 100 then @@ -4565,8 +411,8 @@ local mob_step = function(self, dtime) end -- mob plays random sound at times - if random(1, 70) == 1 then - mob_sound(self, "random", true) + if math.random(1, 70) == 1 then + self:mob_sound("random", true) end -- environmental damage timer (every 1 second) @@ -4574,783 +420,25 @@ local mob_step = function(self, dtime) if (self.state == "attack" and self.env_damage_timer > 1) or self.state ~= "attack" then - check_entity_cramming(self) + self:check_entity_cramming() self.env_damage_timer = 0 -- check for environmental damage (water, fire, lava etc.) - if do_env_damage(self) then + if self:do_env_damage() then return end -- node replace check (cow eats grass etc.) - replace(self, pos) + self:replace(pos) end - monster_attack(self) - - npc_attack(self) - - breed(self) - - if do_states(self, dtime) then + if self:do_states(dtime) then return end if not self.object:get_luaentity() then return false end - - do_jump(self) - - set_armor_texture(self) - - runaway_from(self) - - if is_at_water_danger(self) and self.state ~= "attack" then - if random(1, 10) <= 6 then - set_velocity(self, 0) - self.state = "stand" - set_animation(self, "stand") - yaw = yaw + random(-0.5, 0.5) - yaw = set_yaw(self, yaw, 8) - end - else - if self.move_in_group ~= false then - check_herd(self,dtime) - end - end - - -- Add water flowing for mobs from mcl_item_entity - local p, node, nn, def - p = self.object:get_pos() - node = minetest.get_node_or_nil(p) - if node then - nn = node.name - def = minetest.registered_nodes[nn] - end - - -- Move item around on flowing liquids - if def and def.liquidtype == "flowing" then - - --[[ Get flowing direction (function call from flowlib), if there's a liquid. - NOTE: According to Qwertymine, flowlib.quickflow is only reliable for liquids with a flowing distance of 7. - Luckily, this is exactly what we need if we only care about water, which has this flowing distance. ]] - local vec = flowlib.quick_flow(p, node) - -- Just to make sure we don't manipulate the speed for no reason - if vec.x ~= 0 or vec.y ~= 0 or vec.z ~= 0 then - -- Minecraft Wiki: Flowing speed is "about 1.39 meters per second" - local f = 1.39 - -- Set new item moving speed into the direciton of the liquid - local newv = vector.multiply(vec, f) - self.object:set_acceleration({x = 0, y = 0, z = 0}) - self.object:set_velocity({x = newv.x, y = -0.22, z = newv.z}) - - self.physical_state = true - self._flowing = true - self.object:set_properties({ - physical = true - }) - return - end - elseif self._flowing == true then - -- Disable flowing physics if not on/in flowing liquid - self._flowing = false - enable_physics(self.object, self, true) - return - end - - if is_at_cliff_or_danger(self) then - set_velocity(self, 0) - self.state = "stand" - set_animation(self, "stand") - local yaw = self.object:get_yaw() or 0 - yaw = set_yaw(self, yaw + 0.78, 8) - end -end - - --- default function when mobs are blown up with TNT -local do_tnt = function(obj, damage) - - obj.object:punch(obj.object, 1.0, { - full_punch_interval = 1.0, - damage_groups = {fleshy = damage}, - }, nil) - - return false, true, {} -end - - -mcl_mobs.spawning_mobs = {} - --- Code to execute before custom on_rightclick handling -local on_rightclick_prefix = function(self, clicker) - local item = clicker:get_wielded_item() - - -- Name mob with nametag - if not self.ignores_nametag and item:get_name() == "mcl_mobs:nametag" then - - local tag = item:get_meta():get_string("name") - if tag ~= "" then - if string.len(tag) > MAX_MOB_NAME_LENGTH then - tag = string.sub(tag, 1, MAX_MOB_NAME_LENGTH) - end - self.nametag = tag - - update_tag(self) - - if not minetest.is_creative_enabled(clicker:get_player_name()) then - item:take_item() - clicker:set_wielded_item(item) - end - return true - end - - end - return false -end - -local create_mob_on_rightclick = function(on_rightclick) - return function(self, clicker) - local stop = on_rightclick_prefix(self, clicker) - if (not stop) and (on_rightclick) then - on_rightclick(self, clicker) - end - end -end - --- register mob entity -function mcl_mobs:register_mob(name, def) - - mcl_mobs.spawning_mobs[name] = true - -local can_despawn -if def.can_despawn ~= nil then - can_despawn = def.can_despawn -elseif def.spawn_class == "passive" then - can_despawn = false -else - can_despawn = true -end - -local function scale_difficulty(value, default, min, special) - if (not value) or (value == default) or (value == special) then - return default - else - return max(min, value * difficulty) - end -end - -local collisionbox = def.collisionbox or {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25} --- Workaround for : --- Increase upper Y limit to avoid mobs glitching through solid nodes. --- FIXME: Remove workaround if it's no longer needed. -if collisionbox[5] < 0.79 then - collisionbox[5] = 0.79 -end - -minetest.register_entity(name, { - - use_texture_alpha = def.use_texture_alpha, - head_swivel = def.head_swivel or nil, -- bool to activate this function - head_yaw_offset = def.head_yaw_offset or 0, -- for wonkey model bones - head_pitch_multiplier = def.head_pitch_multiplier or 1, --for inverted pitch - bone_eye_height = def.bone_eye_height or 1.4, -- head bone offset - 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 - 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, - description = def.description, - type = def.type, - attack_type = def.attack_type, - fly = def.fly, - fly_in = def.fly_in or {"air", "__airlike"}, - owner = def.owner or "", - order = def.order or "", - on_die = def.on_die, - spawn_small_alternative = def.spawn_small_alternative, - do_custom = def.do_custom, - detach_child = def.detach_child, - jump_height = def.jump_height or 4, -- was 6 - rotate = math.rad(def.rotate or 0), -- 0=front, 90=side, 180=back, 270=side2 - lifetimer = def.lifetimer or 57.73, - hp_min = scale_difficulty(def.hp_min, 5, 1), - hp_max = scale_difficulty(def.hp_max, 10, 1), - xp_min = def.xp_min or 0, - xp_max = def.xp_max or 0, - xp_timestamp = 0, - breath_max = def.breath_max or 15, - breathes_in_water = def.breathes_in_water or false, - physical = true, - collisionbox = collisionbox, - selectionbox = def.selectionbox or def.collisionbox, - visual = def.visual, - visual_size = def.visual_size or {x = 1, y = 1}, - mesh = def.mesh, - makes_footstep_sound = def.makes_footstep_sound or false, - view_range = def.view_range or 16, - walk_velocity = def.walk_velocity or 1, - run_velocity = def.run_velocity or 2, - damage = scale_difficulty(def.damage, 0, 0), - light_damage = def.light_damage or 0, - sunlight_damage = def.sunlight_damage or 0, - water_damage = def.water_damage or 0, - lava_damage = def.lava_damage or 8, - fire_damage = def.fire_damage or 1, - suffocation = def.suffocation or true, - fall_damage = def.fall_damage or 1, - fall_speed = def.fall_speed or DEFAULT_FALL_SPEED, -- must be lower than -2 - drops = def.drops or {}, - armor = def.armor or 100, - on_rightclick = create_mob_on_rightclick(def.on_rightclick), - arrow = def.arrow, - shoot_interval = def.shoot_interval, - sounds = def.sounds or {}, - animation = def.animation or {}, - follow = def.follow, - nofollow = def.nofollow, - can_open_doors = def.can_open_doors, - jump = def.jump ~= false, - automatic_face_movement_max_rotation_per_sec = 300, - walk_chance = def.walk_chance or 50, - attacks_monsters = def.attacks_monsters or false, - group_attack = def.group_attack or false, - passive = def.passive or false, - knock_back = def.knock_back ~= false, - shoot_offset = def.shoot_offset or 0, - floats = def.floats or 1, -- floats in water by default - floats_on_lava = def.floats_on_lava or 0, - replace_rate = def.replace_rate, - replace_what = def.replace_what, - replace_with = def.replace_with, - replace_offset = def.replace_offset or 0, - on_replace = def.on_replace, - timer = 0, - env_damage_timer = 0, - tamed = false, - pause_timer = 0, - horny = false, - hornytimer = 0, - gotten = false, - health = 0, - frame_speed_multiplier = 1, - reach = def.reach or 3, - htimer = 0, - texture_list = def.textures, - child_texture = def.child_texture, - docile_by_day = def.docile_by_day or false, - time_of_day = 0.5, - fear_height = def.fear_height or 0, - runaway = def.runaway, - runaway_timer = 0, - pathfinding = def.pathfinding, - immune_to = def.immune_to or {}, - explosion_radius = def.explosion_radius, -- LEGACY - explosion_damage_radius = def.explosion_damage_radius, -- LEGACY - explosiontimer_reset_radius = def.explosiontimer_reset_radius, - explosion_timer = def.explosion_timer or 3, - allow_fuse_reset = def.allow_fuse_reset ~= false, - stop_to_explode = def.stop_to_explode ~= false, - custom_attack = def.custom_attack, - double_melee_attack = def.double_melee_attack, - dogshoot_switch = def.dogshoot_switch, - dogshoot_count = 0, - dogshoot_count_max = def.dogshoot_count_max or 5, - dogshoot_count2_max = def.dogshoot_count2_max or (def.dogshoot_count_max or 5), - attack_animals = def.attack_animals or false, - attack_npcs = def.attack_npcs or false, - specific_attack = def.specific_attack, - runaway_from = def.runaway_from, - owner_loyal = def.owner_loyal, - facing_fence = false, - is_mob = true, - pushable = def.pushable or true, - - - -- MCL2 extensions - shooter_avoid_enemy = def.shooter_avoid_enemy, - strafes = def.strafes, - avoid_distance = def.avoid_distance or 9, - teleport = teleport, - do_teleport = def.do_teleport, - spawn_class = def.spawn_class, - can_spawn = def.can_spawn, - ignores_nametag = def.ignores_nametag or false, - rain_damage = def.rain_damage or 0, - glow = def.glow, - can_despawn = can_despawn, - child = def.child or false, - texture_mods = {}, - shoot_arrow = def.shoot_arrow, - sounds_child = def.sounds_child, - _child_animations = def.child_animations, - pick_up = def.pick_up, - explosion_strength = def.explosion_strength, - suffocation_timer = 0, - follow_velocity = def.follow_velocity or 2.4, - instant_death = def.instant_death or false, - fire_resistant = def.fire_resistant or false, - fire_damage_resistant = def.fire_damage_resistant or false, - ignited_by_sunlight = def.ignited_by_sunlight or false, - spawn_in_group = def.spawn_in_group, - spawn_in_group_min = def.spawn_in_group_min, - noyaw = def.noyaw or false, - particlespawners = def.particlespawners, - -- End of MCL2 extensions - - on_spawn = def.on_spawn, - - on_blast = def.on_blast or do_tnt, - - on_step = mob_step, - - do_punch = def.do_punch, - - on_punch = mob_punch, - - on_breed = def.on_breed, - - on_grown = def.on_grown, - - on_pick_up = def.on_pick_up, - - on_detach_child = mob_detach_child, - - on_activate = function(self, staticdata, dtime) - --this is a temporary hack so mobs stop - --glitching and acting really weird with the - --default built in engine collision detection - self.is_mob = true - self.object:set_properties({ - collide_with_objects = false, - }) - - return mob_activate(self, staticdata, def, dtime) - end, - - get_staticdata = function(self) - return mob_staticdata(self) - end, - - harmed_by_heal = def.harmed_by_heal, - - on_lightning_strike = def.on_lightning_strike -}) - -if minetest.get_modpath("doc_identifier") ~= nil then - doc.sub.identifier.register_object(name, "basics", "mobs") -end - -end -- END mcl_mobs:register_mob function - - --- register arrow for shoot attack -function mcl_mobs:register_arrow(name, def) - - if not name or not def then return end -- errorcheck - - minetest.register_entity(name, { - - physical = false, - visual = def.visual, - visual_size = def.visual_size, - textures = def.textures, - velocity = def.velocity, - hit_player = def.hit_player, - hit_node = def.hit_node, - hit_mob = def.hit_mob, - hit_object = def.hit_object, - drop = def.drop or false, -- drops arrow as registered item when true - collisionbox = {0, 0, 0, 0, 0, 0}, -- remove box around arrows - timer = 0, - switch = 0, - owner_id = def.owner_id, - rotate = def.rotate, - 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, - collisionbox = def.collisionbox or {0, 0, 0, 0, 0, 0}, - automatic_face_movement_dir = def.rotate - and (def.rotate - (pi / 180)) or false, - - on_activate = def.on_activate, - - on_step = def.on_step or function(self, dtime) - - self.timer = self.timer + 1 - - local pos = self.object:get_pos() - - if self.switch == 0 - or self.timer > 150 - or not within_limits(pos, 0) then - mcl_burning.extinguish(self.object) - self.object:remove(); - - return - end - - -- does arrow have a tail (fireball) - if def.tail - and def.tail == 1 - and def.tail_texture then - - minetest.add_particle({ - pos = pos, - velocity = {x = 0, y = 0, z = 0}, - acceleration = {x = 0, y = 0, z = 0}, - expirationtime = def.expire or 0.25, - collisiondetection = false, - texture = def.tail_texture, - size = def.tail_size or 5, - glow = def.glow or 0, - }) - end - - if self.hit_node then - - local node = node_ok(pos).name - - if minetest.registered_nodes[node].walkable then - - self.hit_node(self, pos, node) - - if self.drop == true then - - pos.y = pos.y + 1 - - self.lastpos = (self.lastpos or pos) - - minetest.add_item(self.lastpos, self.object:get_luaentity().name) - end - - self.object:remove(); - - return - end - end - - if self.hit_player or self.hit_mob or self.hit_object then - - for _,player in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do - - if self.hit_player - and player:is_player() then - - self.hit_player(self, player) - self.object:remove(); - return - end - - local entity = player:get_luaentity() - - if entity - and self.hit_mob - and entity.is_mob == true - and tostring(player) ~= self.owner_id - and entity.name ~= self.object:get_luaentity().name then - self.hit_mob(self, player) - self.object:remove(); - return - end - - if entity - and self.hit_object - and (not entity.is_mob) - and tostring(player) ~= self.owner_id - and entity.name ~= self.object:get_luaentity().name then - self.hit_object(self, player) - self.object:remove(); - return - end - end - end - - self.lastpos = pos - end - }) -end - - --- no damage to nodes explosion -function mcl_mobs:safe_boom(self, pos, strength) - minetest.sound_play(self.sounds and self.sounds.explode or "tnt_explode", { - pos = pos, - gain = 1.0, - max_hear_distance = self.sounds and self.sounds.distance or 32 - }, true) - local radius = strength - entity_physics(pos, radius) - effect(pos, 32, "mcl_particles_smoke.png", radius * 3, radius * 5, radius, 1, 0) -end - - --- make explosion with protection and tnt mod check -function mcl_mobs:boom(self, pos, strength, fire) - if mobs_griefing and not minetest.is_protected(pos, "") then - mcl_explosions.explode(pos, strength, { drop_chance = 1.0, fire = fire }, self.object) - else - mcl_mobs:safe_boom(self, pos, strength) - end - - -- delete the object after it punched the player to avoid nil entities in e.g. mcl_shields!! - self.object:remove() -end - - --- Register spawn eggs - --- Note: This also introduces the “spawn_egg” group: --- * spawn_egg=1: Spawn egg (generic mob, no metadata) --- * spawn_egg=2: Spawn egg (captured/tamed mob, metadata) -function mcl_mobs:register_egg(mob, desc, background_color, overlay_color, addegg, no_creative) - - local grp = {spawn_egg = 1} - - -- do NOT add this egg to creative inventory (e.g. dungeon master) - if no_creative == true then - grp.not_in_creative_inventory = 1 - end - - local invimg = "(spawn_egg.png^[multiply:" .. background_color ..")^(spawn_egg_overlay.png^[multiply:" .. overlay_color .. ")" - if old_spawn_icons then - local mobname = mob:gsub("mobs_mc:","") - local fn = "mobs_mc_spawn_icon_"..mobname..".png" - if mcl_util.file_exists(minetest.get_modpath("mobs_mc").."/textures/"..fn) then - invimg = fn - end - end - if addegg == 1 then - invimg = "mobs_chicken_egg.png^(" .. invimg .. - "^[mask:mobs_chicken_egg_overlay.png)" - end - - -- register old stackable mob egg - minetest.register_craftitem(mob, { - - description = desc, - inventory_image = invimg, - groups = grp, - - _doc_items_longdesc = S("This allows you to place a single mob."), - _doc_items_usagehelp = S("Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns."), - - on_place = function(itemstack, placer, pointed_thing) - - local pos = pointed_thing.above - - -- am I clicking on something with existing on_rightclick function? - local under = minetest.get_node(pointed_thing.under) - local def = minetest.registered_nodes[under.name] - if def and def.on_rightclick then - return def.on_rightclick(pointed_thing.under, under, placer, itemstack) - end - - if pos - and within_limits(pos, 0) - and not minetest.is_protected(pos, placer:get_player_name()) then - - local name = placer:get_player_name() - local privs = minetest.get_player_privs(name) - if under.name == "mcl_mobspawners:spawner" then - if minetest.is_protected(pointed_thing.under, name) then - minetest.record_protection_violation(pointed_thing.under, name) - return itemstack - end - if not privs.maphack then - minetest.chat_send_player(name, S("You need the “maphack” privilege to change the mob spawner.")) - return itemstack - end - mcl_mobspawners.setup_spawner(pointed_thing.under, itemstack:get_name()) - if not minetest.is_creative_enabled(name) then - itemstack:take_item() - end - return itemstack - end - - if not minetest.registered_entities[mob] then - return itemstack - end - - if minetest.settings:get_bool("only_peaceful_mobs", false) - and minetest.registered_entities[mob].type == "monster" then - minetest.chat_send_player(name, S("Only peaceful mobs allowed!")) - return itemstack - end - - pos.y = pos.y - 0.5 - - local mob = minetest.add_entity(pos, mob) - local entityname = itemstack:get_name() - minetest.log("action", "Player " ..name.." spawned "..entityname.." at "..minetest.pos_to_string(pos)) - local ent = mob:get_luaentity() - - -- don't set owner if monster or sneak pressed - if ent.type ~= "monster" - and not placer:get_player_control().sneak then - ent.owner = placer:get_player_name() - ent.tamed = true - end - - -- set nametag - local nametag = itemstack:get_meta():get_string("name") - if nametag ~= "" then - if string.len(nametag) > MAX_MOB_NAME_LENGTH then - nametag = string.sub(nametag, 1, MAX_MOB_NAME_LENGTH) - end - ent.nametag = nametag - update_tag(ent) - end - - -- if not in creative then take item - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item() - end - end - - return itemstack - end, - }) - -end - - --- No-op in MCL2 (capturing mobs is not possible). --- Provided for compability with Mobs Redo -function mcl_mobs:capture_mob(self, clicker, chance_hand, chance_net, chance_lasso, force_take, replacewith) - return false -end - - --- No-op in MCL2 (protecting mobs is not possible). -function mcl_mobs:protect(self, clicker) - return false -end - - --- feeding, taming and breeding (thanks blert2112) -function mcl_mobs:feed_tame(self, clicker, feed_count, breed, tame, notake) - if not self.follow then - return false - end - -- can eat/tame with item in hand - if self.nofollow or follow_holding(self, clicker) then - local consume_food = false - - -- tame if not still a baby - - if tame and not self.child then - if not self.owner or self.owner == "" then - self.tamed = true - self.owner = clicker:get_player_name() - consume_food = true - end - end - - -- increase health - - if self.health < self.hp_max and not consume_food then - consume_food = true - self.health = min(self.health + 4, self.hp_max) - - if self.htimer < 1 then - self.htimer = 5 - end - self.object:set_hp(self.health) - end - - -- make children grow quicker - - if not consume_food and self.child == true then - consume_food = true - -- deduct 10% of the time to adulthood - self.hornytimer = self.hornytimer + ((CHILD_GROW_TIME - self.hornytimer) * 0.1) - end - - -- breed animals - - if breed and not consume_food and self.hornytimer == 0 and not self.horny then - self.food = (self.food or 0) + 1 - consume_food = true - if self.food >= feed_count then - self.food = 0 - self.horny = true - end - end - - update_tag(self) - -- play a sound if the animal used the item and take the item if not in creative - if consume_food then - -- don't consume food if clicker is in creative - if not minetest.is_creative_enabled(clicker:get_player_name()) and not notake then - local item = clicker:get_wielded_item() - item:take_item() - clicker:set_wielded_item(item) - end - -- always play the eat sound if food is used, even in creative - mob_sound(self, "eat", nil, true) - - else - -- make sound when the mob doesn't want food - mob_sound(self, "random", true) - end - return true - end - return false -end - --- Spawn a child -function mcl_mobs:spawn_child(pos, mob_type) - local child = minetest.add_entity(pos, mob_type) - if not child then - return - end - - local ent = child:get_luaentity() - effect(pos, 15, "mcl_particles_smoke.png", 1, 2, 2, 15, 5) - - ent.child = true - - local textures - -- using specific child texture (if found) - if ent.child_texture then - textures = ent.child_texture[1] - end - - -- and resize to half height - child:set_properties({ - textures = textures, - visual_size = { - x = ent.base_size.x * .5, - y = ent.base_size.y * .5, - }, - collisionbox = { - ent.base_colbox[1] * .5, - ent.base_colbox[2] * .5, - ent.base_colbox[3] * .5, - ent.base_colbox[4] * .5, - ent.base_colbox[5] * .5, - ent.base_colbox[6] * .5, - }, - selectionbox = { - ent.base_selbox[1] * .5, - ent.base_selbox[2] * .5, - ent.base_selbox[3] * .5, - ent.base_selbox[4] * .5, - ent.base_selbox[5] * .5, - ent.base_selbox[6] * .5, - }, - }) - - ent.animation = ent._child_animations - ent._current_animation = nil - set_animation(ent, "stand") - - return child end local timer = 0 @@ -5362,10 +450,29 @@ minetest.register_globalstep(function(dtime) for _, obj in pairs(minetest.get_objects_inside_radius(pos, 47)) do local lua = obj:get_luaentity() if lua and lua.is_mob then - lua.lifetimer = max(20, lua.lifetimer) + lua.lifetimer = math.max(20, lua.lifetimer) lua.despawn_immediately = false end end end timer = 0 end) + +minetest.register_chatcommand("clearmobs",{ + privs={maphack=true}, + params = "||", + description=S("Removes all spawned mobs except nametagged and tamed ones. all removes all mobs, nametagged only nametagged ones and with the range paramter all mobs in a distance of the current player are removed."), + func=function(n,param) + local p = minetest.get_player_by_name(n) + local num=tonumber(param) + for _,o in pairs(minetest.luaentities) do + if o.is_mob then + if param == "all" or + ( param == "nametagged" and o.nametag ) or + ( param == "" and ( not o.nametag or o.nametag == "" ) and not o.tamed ) or + ( num and num > 0 and vector.distance(p:get_pos(),o.object:get_pos()) <= num ) then + o.object:remove() + end + end + end +end}) diff --git a/mods/ENTITIES/mcl_mobs/breeding.lua b/mods/ENTITIES/mcl_mobs/breeding.lua new file mode 100644 index 0000000000..9284163cd0 --- /dev/null +++ b/mods/ENTITIES/mcl_mobs/breeding.lua @@ -0,0 +1,352 @@ +local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs +local mob_class = mcl_mobs.mob_class + +local MAX_MOB_NAME_LENGTH = 30 +local HORNY_TIME = 30 +local HORNY_AGAIN_TIME = 300 +local CHILD_GROW_TIME = 60*20 + +local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_villager",false) + +local LOG_MODULE = "[mcl_mobs]" +local function mcl_log (message) + if LOGGING_ON and message then + minetest.log(LOG_MODULE .. " " .. message) + end +end + +-- No-op in MCL2 (capturing mobs is not possible). +-- Provided for compability with Mobs Redo +function mcl_mobs:capture_mob(self, clicker, chance_hand, chance_net, chance_lasso, force_take, replacewith) + return false +end + + +-- No-op in MCL2 (protecting mobs is not possible). +function mcl_mobs:protect(self, clicker) + return false +end + + +-- feeding, taming and breeding (thanks blert2112) +function mob_class:feed_tame(clicker, feed_count, breed, tame, notake) + if not self.follow then + return false + end + -- can eat/tame with item in hand + if self.nofollow or self:follow_holding(clicker) then + local consume_food = false + + -- tame if not still a baby + + if tame and not self.child then + if not self.owner or self.owner == "" then + self.tamed = true + self.owner = clicker:get_player_name() + consume_food = true + end + end + + -- increase health + + if self.health < self.hp_max and not consume_food then + consume_food = true + self.health = math.min(self.health + 4, self.hp_max) + + if self.htimer < 1 then + self.htimer = 5 + end + self.object:set_hp(self.health) + end + + -- make children grow quicker + + if not consume_food and self.child == true then + consume_food = true + -- deduct 10% of the time to adulthood + self.hornytimer = self.hornytimer + ((CHILD_GROW_TIME - self.hornytimer) * 0.1) + end + + -- breed animals + + if breed and not consume_food and self.hornytimer == 0 and not self.horny then + self.food = (self.food or 0) + 1 + consume_food = true + if self.food >= feed_count then + self.food = 0 + self.horny = true + end + end + + self:update_tag() + -- play a sound if the animal used the item and take the item if not in creative + if consume_food then + -- don't consume food if clicker is in creative + if not minetest.is_creative_enabled(clicker:get_player_name()) and not notake then + local item = clicker:get_wielded_item() + item:take_item() + clicker:set_wielded_item(item) + end + -- always play the eat sound if food is used, even in creative + self:mob_sound("eat", nil, true) + + else + -- make sound when the mob doesn't want food + self:mob_sound("random", true) + end + return true + end + return false +end + +-- Spawn a child +function mcl_mobs.spawn_child(pos, mob_type) + local child = minetest.add_entity(pos, mob_type) + if not child then + return + end + + local ent = child:get_luaentity() + mcl_mobs.effect(pos, 15, "mcl_particles_smoke.png", 1, 2, 2, 15, 5) + + ent.child = true + + local textures + -- using specific child texture (if found) + if ent.child_texture then + textures = ent.child_texture[1] + end + + -- and resize to half height + child:set_properties({ + textures = textures, + visual_size = { + x = ent.base_size.x * .5, + y = ent.base_size.y * .5, + }, + collisionbox = { + ent.base_colbox[1] * .5, + ent.base_colbox[2] * .5, + ent.base_colbox[3] * .5, + ent.base_colbox[4] * .5, + ent.base_colbox[5] * .5, + ent.base_colbox[6] * .5, + }, + selectionbox = { + ent.base_selbox[1] * .5, + ent.base_selbox[2] * .5, + ent.base_selbox[3] * .5, + ent.base_selbox[4] * .5, + ent.base_selbox[5] * .5, + ent.base_selbox[6] * .5, + }, + }) + + ent.animation = ent._child_animations + ent._current_animation = nil + ent:set_animation("stand") + + return child +end + +-- find two animals of same type and breed if nearby and horny +function mob_class:check_breeding() + + --mcl_log("In breed function") + -- child takes a long time before growing into adult + if self.child == true then + + -- When a child, hornytimer is used to count age until adulthood + self.hornytimer = self.hornytimer + 1 + + if self.hornytimer >= CHILD_GROW_TIME then + + self.child = false + self.hornytimer = 0 + + self.object:set_properties({ + textures = self.base_texture, + mesh = self.base_mesh, + visual_size = self.base_size, + collisionbox = self.base_colbox, + selectionbox = self.base_selbox, + }) + + -- custom function when child grows up + if self.on_grown then + self.on_grown(self) + else + -- jump when fully grown so as not to fall into ground + self.object:set_velocity({ + x = 0, + y = self.jump_height*3, + z = 0 + }) + end + + self.animation = nil + local anim = self._current_animation + self._current_animation = nil -- Mobs Redo does nothing otherwise + self:set_animation(anim) + end + + return + end + + -- horny animal can mate for HORNY_TIME seconds, + -- afterwards horny animal cannot mate again for HORNY_AGAIN_TIME seconds + if self.horny == true + and self.hornytimer < HORNY_TIME + HORNY_AGAIN_TIME then + + self.hornytimer = self.hornytimer + 1 + + if self.hornytimer >= HORNY_TIME + HORNY_AGAIN_TIME then + self.hornytimer = 0 + self.horny = false + end + end + + -- find another same animal who is also horny and mate if nearby + if self.horny == true + and self.hornytimer <= HORNY_TIME then + + mcl_log("In breed function. All good. Do the magic.") + + local pos = self.object:get_pos() + + mcl_mobs.effect({x = pos.x, y = pos.y + 1, z = pos.z}, 8, "heart.png", 3, 4, 1, 0.1) + + local objs = minetest.get_objects_inside_radius(pos, 3) + local num = 0 + local ent = nil + + for n = 1, #objs do + + ent = objs[n]:get_luaentity() + + -- check for same animal with different colour + local canmate = false + + if ent then + + if ent.name == self.name then + canmate = true + else + local entname = string.split(ent.name,":") + local selfname = string.split(self.name,":") + + if entname[1] == selfname[1] then + entname = string.split(entname[2],"_") + selfname = string.split(selfname[2],"_") + + if entname[1] == selfname[1] then + canmate = true + end + end + end + end + + if canmate then mcl_log("In breed function. Can mate.") end + + if ent + and canmate == true + and ent.horny == true + and ent.hornytimer <= HORNY_TIME then + num = num + 1 + end + + -- found your mate? then have a baby + if num > 1 then + + self.hornytimer = HORNY_TIME + 1 + ent.hornytimer = HORNY_TIME + 1 + + -- spawn baby + + + minetest.after(5, function(parent1, parent2, pos) + if not parent1.object:get_luaentity() then + return + end + if not parent2.object:get_luaentity() then + return + end + + mcl_experience.throw_xp(pos, math.random(1, 7)) + + -- custom breed function + if parent1.on_breed then + -- when false, skip going any further + if parent1.on_breed(parent1, parent2) == false then + return + end + end + + local child = mcl_mobs.spawn_child(pos, parent1.name) + + local ent_c = child:get_luaentity() + + + -- Use texture of one of the parents + local p = math.random(1, 2) + if p == 1 then + ent_c.base_texture = parent1.base_texture + else + ent_c.base_texture = parent2.base_texture + end + child:set_properties({ + textures = ent_c.base_texture + }) + + -- tamed and owned by parents' owner + ent_c.tamed = true + ent_c.owner = parent1.owner + end, self, ent, pos) + + num = 0 + + break + end + end + end +end + +function mob_class:toggle_sit(clicker,p) + if not self.tamed or self.child or self.owner ~= clicker:get_player_name() then + return + end + local pos = self.object:get_pos() + local particle + if not self.order or self.order == "" or self.order == "sit" then + particle = "mobs_mc_wolf_icon_roam.png" + self.order = "roam" + self.state = "stand" + self.walk_chance = default_walk_chance + self.jump = true + self:set_animation("stand") + -- TODO: Add sitting model + else + particle = "mobs_mc_wolf_icon_sit.png" + self.order = "sit" + self.state = "stand" + self.walk_chance = 0 + self.jump = false + if self.animation.sit_start then + self:set_animation("sit") + else + self:set_animation("stand") + end + end + local pp = vector.new(0,1.4,0) + if p then pp = vector.offset(pp,0,p,0) end + -- Display icon to show current order (sit or roam) + minetest.add_particle({ + pos = vector.add(pos, pp), + velocity = {x=0,y=0.2,z=0}, + expirationtime = 1, + size = 4, + texture = particle, + playername = self.owner, + glow = minetest.LIGHT_MAX, + }) +end diff --git a/mods/ENTITIES/mcl_mobs/combat.lua b/mods/ENTITIES/mcl_mobs/combat.lua new file mode 100644 index 0000000000..5577a43612 --- /dev/null +++ b/mods/ENTITIES/mcl_mobs/combat.lua @@ -0,0 +1,796 @@ +local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs +local mob_class = mcl_mobs.mob_class + +local damage_enabled = minetest.settings:get_bool("enable_damage") +local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false + +-- pathfinding settings +local stuck_timeout = 3 -- how long before mob gets stuck in place and starts searching +local stuck_path_timeout = 10 -- how long will mob follow path before giving up + +-- check if daytime and also if mob is docile during daylight hours +function mob_class:day_docile() + if self.docile_by_day == false then + return false + elseif self.docile_by_day == true + and self.time_of_day > 0.2 + and self.time_of_day < 0.8 then + return true + end +end + +-- attack player/mob +function mob_class:do_attack(player) + + if self.state == "attack" or self.state == "die" then + return + end + + self.attack = player + self.state = "attack" + + -- TODO: Implement war_cry sound without being annoying + --if random(0, 100) < 90 then + --self:mob_sound("war_cry", true) + --end +end + +-- blast damage to entities nearby +local function entity_physics(pos,radius) + + radius = radius * 2 + + local objs = minetest.get_objects_inside_radius(pos, radius) + local obj_pos, dist + + for n = 1, #objs do + + obj_pos = objs[n]:get_pos() + + dist = vector.distance(pos, obj_pos) + if dist < 1 then dist = 1 end + + local damage = math.floor((4 / dist) * radius) + local ent = objs[n]:get_luaentity() + + -- punches work on entities AND players + objs[n]:punch(objs[n], 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = damage}, + }, pos) + end +end + +function mob_class:entity_physics(pos,radius) return entity_physics(pos,radius) end + +local los_switcher = false +local height_switcher = false + +-- path finding and smart mob routine by rnd, line_of_sight and other edits by Elkien3 +function mob_class:smart_mobs(s, p, dist, dtime) + + local s1 = self.path.lastpos + + local target_pos = self.attack:get_pos() + + -- is it becoming stuck? + if math.abs(s1.x - s.x) + math.abs(s1.z - s.z) < .5 then + self.path.stuck_timer = self.path.stuck_timer + dtime + else + self.path.stuck_timer = 0 + end + + self.path.lastpos = {x = s.x, y = s.y, z = s.z} + + local use_pathfind = false + local has_lineofsight = minetest.line_of_sight( + {x = s.x, y = (s.y) + .5, z = s.z}, + {x = target_pos.x, y = (target_pos.y) + 1.5, z = target_pos.z}, .2) + + -- im stuck, search for path + if not has_lineofsight then + + if los_switcher == true then + use_pathfind = true + los_switcher = false + end -- cannot see target! + else + if los_switcher == false then + + los_switcher = true + use_pathfind = false + + minetest.after(1, function(self) + if not self.object:get_luaentity() then + return + end + if has_lineofsight then self.path.following = false end + end, self) + end -- can see target! + end + + if (self.path.stuck_timer > stuck_timeout and not self.path.following) then + + use_pathfind = true + self.path.stuck_timer = 0 + + minetest.after(1, function(self) + if not self.object:get_luaentity() then + return + end + if has_lineofsight then self.path.following = false end + end, self) + end + + if (self.path.stuck_timer > stuck_path_timeout and self.path.following) then + + use_pathfind = true + self.path.stuck_timer = 0 + + minetest.after(1, function(self) + if not self.object:get_luaentity() then + return + end + if has_lineofsight then self.path.following = false end + end, self) + end + + if math.abs(vector.subtract(s,target_pos).y) > self.stepheight then + + if height_switcher then + use_pathfind = true + height_switcher = false + end + else + if not height_switcher then + use_pathfind = false + height_switcher = true + end + end + + if use_pathfind then + -- lets try find a path, first take care of positions + -- since pathfinder is very sensitive + local sheight = self.collisionbox[5] - self.collisionbox[2] + + -- round position to center of node to avoid stuck in walls + -- also adjust height for player models! + s.x = math.floor(s.x + 0.5) + s.z = math.floor(s.z + 0.5) + + local ssight, sground = minetest.line_of_sight(s, { + x = s.x, y = s.y - 4, z = s.z}, 1) + + -- determine node above ground + if not ssight then + s.y = sground.y + 1 + end + + local p1 = self.attack:get_pos() + + p1.x = math.floor(p1.x + 0.5) + p1.y = math.floor(p1.y + 0.5) + p1.z = math.floor(p1.z + 0.5) + + local dropheight = 12 + if self.fear_height ~= 0 then dropheight = self.fear_height end + local jumpheight = 0 + if self.jump and self.jump_height >= 4 then + jumpheight = math.min(math.ceil(self.jump_height / 4), 4) + elseif self.stepheight > 0.5 then + jumpheight = 1 + end + self.path.way = minetest.find_path(s, p1, 16, jumpheight, dropheight, "A*_noprefetch") + + self.state = "" + self:do_attack(self.attack) + + -- no path found, try something else + if not self.path.way then + + self.path.following = false + + -- lets make way by digging/building if not accessible + if self.pathfinding == 2 and mobs_griefing then + + -- is player higher than mob? + if s.y < p1.y then + + -- build upwards + if not minetest.is_protected(s, "") then + + local ndef1 = minetest.registered_nodes[self.standing_in] + + if ndef1 and (ndef1.buildable_to or ndef1.groups.liquid) then + + minetest.set_node(s, {name = mcl_mobs.fallback_node}) + end + end + + local sheight = math.ceil(self.collisionbox[5]) + 1 + + -- assume mob is 2 blocks high so it digs above its head + s.y = s.y + sheight + + -- remove one block above to make room to jump + if not minetest.is_protected(s, "") then + + local node1 = node_ok(s, "air").name + local ndef1 = minetest.registered_nodes[node1] + + if node1 ~= "air" + and node1 ~= "ignore" + and ndef1 + and not ndef1.groups.level + and not ndef1.groups.unbreakable + and not ndef1.groups.liquid then + + minetest.set_node(s, {name = "air"}) + minetest.add_item(s, ItemStack(node1)) + + end + end + + s.y = s.y - sheight + self.object:set_pos({x = s.x, y = s.y + 2, z = s.z}) + + else -- dig 2 blocks to make door toward player direction + + local yaw1 = self.object:get_yaw() + math.pi / 2 + local p1 = { + x = s.x + math.cos(yaw1), + y = s.y, + z = s.z + math.sin(yaw1) + } + + if not minetest.is_protected(p1, "") then + + local node1 = node_ok(p1, "air").name + local ndef1 = minetest.registered_nodes[node1] + + if node1 ~= "air" + and node1 ~= "ignore" + and ndef1 + and not ndef1.groups.level + and not ndef1.groups.unbreakable + and not ndef1.groups.liquid then + + minetest.add_item(p1, ItemStack(node1)) + minetest.set_node(p1, {name = "air"}) + end + + p1.y = p1.y + 1 + node1 = node_ok(p1, "air").name + ndef1 = minetest.registered_nodes[node1] + + if node1 ~= "air" + and node1 ~= "ignore" + and ndef1 + and not ndef1.groups.level + and not ndef1.groups.unbreakable + and not ndef1.groups.liquid then + + minetest.add_item(p1, ItemStack(node1)) + minetest.set_node(p1, {name = "air"}) + end + + end + end + end + + -- will try again in 2 seconds + self.path.stuck_timer = stuck_timeout - 2 + elseif s.y < p1.y and (not self.fly) then + self:do_jump() --add jump to pathfinding + self.path.following = true + -- Yay, I found path! + -- TODO: Implement war_cry sound without being annoying + --self:mob_sound("war_cry", true) + else + self:set_velocity(self.walk_velocity) + + -- follow path now that it has it + self.path.following = true + end + end +end + + +-- specific attacks +local specific_attack = function(list, what) + + -- no list so attack default (player, animals etc.) + if list == nil then + return true + end + + -- found entity on list to attack? + for no = 1, #list do + + if list[no] == what then + return true + end + end + + return false +end + +-- find someone to attack +function mob_class:monster_attack() + if not damage_enabled + or self.passive ~= false + or self.state == "attack" + or self:day_docile() then + return + end + + local s = self.object:get_pos() + local p, sp, dist + local player, obj, min_player + local type, name = "", "" + local min_dist = self.view_range + 1 + local objs = minetest.get_objects_inside_radius(s, self.view_range) + local blacklist_attack = {} + + for n = 1, #objs do + if not objs[n]:is_player() then + obj = objs[n]:get_luaentity() + + if obj then + player = obj.object + name = obj.name or "" + end + if obj and obj.type == self.type and obj.passive == false and obj.state == "attack" and obj.attack then + table.insert(blacklist_attack, obj.attack) + end + end + end + + for n = 1, #objs do + + + if objs[n]:is_player() then + if mcl_mobs.invis[ objs[n]:get_player_name() ] or (not self:object_in_range(objs[n])) then + type = "" + elseif (self.type == "monster" or self._aggro) then + player = objs[n] + type = "player" + name = "player" + end + else + obj = objs[n]:get_luaentity() + + if obj then + player = obj.object + type = obj.type + name = obj.name or "" + end + + end + + -- 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)) then + + p = player:get_pos() + sp = s + + dist = vector.distance(p, s) + + -- aim higher to make looking up hills more realistic + p.y = p.y + 1 + sp.y = sp.y + 1 + + local attacked_p = false + for c=1, #blacklist_attack do + if blacklist_attack[c] == player then + attacked_p = true + end + end + -- choose closest player to attack + if dist < min_dist + and not attacked_p + and self:line_of_sight( sp, p, 2) == true then + min_dist = dist + min_player = player + end + end + end + if not min_player and #blacklist_attack > 0 then + min_player=blacklist_attack[math.random(#blacklist_attack)] + end + -- attack player + if min_player then + self:do_attack(min_player) + end +end + + +-- npc, find closest monster to attack +function mob_class:npc_attack() + + if self.type ~= "npc" + or not self.attacks_monsters + or self.state == "attack" then + return + end + + local p, sp, obj, min_player + local s = self.object:get_pos() + local min_dist = self.view_range + 1 + local objs = minetest.get_objects_inside_radius(s, self.view_range) + + for n = 1, #objs do + + obj = objs[n]:get_luaentity() + + if obj and obj.type == "monster" then + + p = obj.object:get_pos() + sp = s + + local dist = vector.distance(p, s) + + -- aim higher to make looking up hills more realistic + p.y = p.y + 1 + sp.y = sp.y + 1 + + if dist < min_dist + and self:line_of_sight( sp, p, 2) == true then + min_dist = dist + min_player = obj.object + end + end + end + + if min_player then + self:do_attack(min_player) + end +end + + + +-- dogshoot attack switch and counter function +function mob_class:dogswitch(dtime) + + -- switch mode not activated + if not self.dogshoot_switch + or not dtime then + return 0 + end + + self.dogshoot_count = self.dogshoot_count + dtime + + if (self.dogshoot_switch == 1 + and self.dogshoot_count > self.dogshoot_count_max) + or (self.dogshoot_switch == 2 + and self.dogshoot_count > self.dogshoot_count2_max) then + + self.dogshoot_count = 0 + + if self.dogshoot_switch == 1 then + self.dogshoot_switch = 2 + else + self.dogshoot_switch = 1 + end + end + + return self.dogshoot_switch +end + +-- no damage to nodes explosion +function mob_class:safe_boom(pos, strength) + minetest.sound_play(self.sounds and self.sounds.explode or "tnt_explode", { + pos = pos, + gain = 1.0, + max_hear_distance = self.sounds and self.sounds.distance or 32 + }, true) + local radius = strength + entity_physics(pos, radius) + mcl_mobs.effect(pos, 32, "mcl_particles_smoke.png", radius * 3, radius * 5, radius, 1, 0) +end + + +-- make explosion with protection and tnt mod check +function mob_class:boom(pos, strength, fire) + if mobs_griefing and not minetest.is_protected(pos, "") then + mcl_explosions.explode(pos, strength, { drop_chance = 1.0, fire = fire }, self.object) + else + mcl_mobs.mob_class.safe_boom(self, pos, strength) --need to call it this way bc self is the "arrow" object here + end + + -- delete the object after it punched the player to avoid nil entities in e.g. mcl_shields!! + self.object:remove() +end + +-- deal damage and effects when mob punched +function mob_class:on_punch(hitter, tflp, tool_capabilities, dir) + + -- custom punch function + if self.do_punch then + + -- when false skip going any further + if self.do_punch(self, hitter, tflp, tool_capabilities, dir) == false then + return + end + end + + -- error checking when mod profiling is enabled + if not tool_capabilities then + minetest.log("warning", "[mobs] Mod profiling enabled, damage not enabled") + return + end + + local is_player = hitter:is_player() + + if is_player then + -- is mob protected? + if self.protected and minetest.is_protected(self.object:get_pos(), hitter:get_player_name()) then + return + end + + if minetest.is_creative_enabled(hitter:get_player_name()) then + self.health = 0 + end + + -- set/update 'drop xp' timestamp if hitted by player + self.xp_timestamp = minetest.get_us_time() + end + + + -- punch interval + local weapon = hitter:get_wielded_item() + local punch_interval = 1.4 + + -- exhaust attacker + if is_player then + mcl_hunger.exhaust(hitter:get_player_name(), mcl_hunger.EXHAUST_ATTACK) + end + + -- calculate mob damage + local damage = 0 + local armor = self.object:get_armor_groups() or {} + local tmp + + -- quick error check incase it ends up 0 (serialize.h check test) + if tflp == 0 then + tflp = 0.2 + end + + + for group,_ in pairs( (tool_capabilities.damage_groups or {}) ) do + + tmp = tflp / (tool_capabilities.full_punch_interval or 1.4) + + if tmp < 0 then + tmp = 0.0 + elseif tmp > 1 then + tmp = 1.0 + end + + damage = damage + (tool_capabilities.damage_groups[group] or 0) + * tmp * ((armor[group] or 0) / 100.0) + end + + if weapon then + local fire_aspect_level = mcl_enchanting.get_enchantment(weapon, "fire_aspect") + if fire_aspect_level > 0 then + mcl_burning.set_on_fire(self.object, fire_aspect_level * 4) + end + end + + -- check for tool immunity or special damage + for n = 1, #self.immune_to do + + if self.immune_to[n][1] == weapon:get_name() then + + damage = self.immune_to[n][2] or 0 + break + end + end + + -- healing + if damage <= -1 then + self.health = self.health - math.floor(damage) + return + end + + if tool_capabilities then + punch_interval = tool_capabilities.full_punch_interval or 1.4 + end + + -- add weapon wear manually + -- Required because we have custom health handling ("health" property) + if minetest.is_creative_enabled("") ~= true + and tool_capabilities then + if tool_capabilities.punch_attack_uses then + -- Without this delay, the wear does not work. Quite hacky ... + minetest.after(0, function(name) + local player = minetest.get_player_by_name(name) + if not player then return end + local weapon = hitter:get_wielded_item(player) + local def = weapon:get_definition() + if def.tool_capabilities and def.tool_capabilities.punch_attack_uses then + local wear = math.floor(65535/tool_capabilities.punch_attack_uses) + weapon:add_wear(wear) + hitter:set_wielded_item(weapon) + end + end, hitter:get_player_name()) + end + end + + local die = false + + + if damage >= 0 then + -- only play hit sound and show blood effects if damage is 1 or over; lower to 0.1 to ensure armor works appropriately. + if damage >= 0.1 then + -- weapon sounds + if weapon:get_definition().sounds ~= nil then + + local s = math.random(0, #weapon:get_definition().sounds) + + minetest.sound_play(weapon:get_definition().sounds[s], { + object = self.object, --hitter, + max_hear_distance = 8 + }, true) + else + minetest.sound_play("default_punch", { + object = self.object, + max_hear_distance = 5 + }, true) + end + + self:damage_effect(damage) + + -- do damage + self.health = self.health - damage + + -- skip future functions if dead, except alerting others + if self:check_for_death( "hit", {type = "punch", puncher = hitter}) then + die = true + end + end + -- knock back effect (only on full punch) + if self.knock_back + and tflp >= punch_interval then + -- direction error check + dir = dir or {x = 0, y = 0, z = 0} + + local v = self.object:get_velocity() + if not v then return end + local r = 1.4 - math.min(punch_interval, 1.4) + local kb = r * (math.abs(v.x)+math.abs(v.z)) + local up = 2 + + if die==true then + kb=kb*2 + end + + -- if already in air then dont go up anymore when hit + if math.abs(v.y) > 0.1 + or self.fly then + up = 0 + end + + + -- check if tool already has specific knockback value + if tool_capabilities.damage_groups["knockback"] then + kb = tool_capabilities.damage_groups["knockback"] + else + kb = kb * 1.5 + end + + + local luaentity + if hitter then + luaentity = hitter:get_luaentity() + end + if hitter and is_player then + local wielditem = hitter:get_wielded_item() + kb = kb + 3 * mcl_enchanting.get_enchantment(wielditem, "knockback") + elseif luaentity and luaentity._knockback then + kb = kb + luaentity._knockback + end + self._kb_turn = true + self._turn_to=self.object:get_yaw()-1.57 + self.frame_speed_multiplier=2.3 + if self.animation.run_end then + self:set_animation( "run") + elseif self.animation.walk_end then + self:set_animation( "walk") + end + minetest.after(0.2, function() + if self and self.object then + self.frame_speed_multiplier=1 + self._kb_turn = false + end + end) + self.object:add_velocity({ + x = dir.x * kb, + y = up*2, + z = dir.z * kb + }) + + self.pause_timer = 0.25 + end + end -- END if damage + + -- if skittish then run away + if hitter and is_player and hitter:get_pos() and not die and self.runaway == true and self.state ~= "flop" then + + local yaw = self:set_yaw( minetest.dir_to_yaw(vector.direction(hitter:get_pos(), self.object:get_pos()))) + minetest.after(0.2,function() + if self and self.object and self.object:get_pos() and hitter and is_player and hitter:get_pos() then + yaw = self:set_yaw( minetest.dir_to_yaw(vector.direction(hitter:get_pos(), self.object:get_pos()))) + self:set_velocity( self.run_velocity) + end + end) + self.state = "runaway" + self.runaway_timer = 0 + self.following = nil + end + + local name = hitter:get_player_name() or "" + + -- attack puncher and call other mobs for help + if self.passive == false + and self.state ~= "flop" + and (self.child == false or self.type == "monster") + and hitter:get_player_name() ~= self.owner + and not mcl_mobs.invis[ name ] then + if not die then + -- attack whoever punched mob + self.state = "" + self:do_attack(hitter) + self._aggro= true + end + + -- alert others to the attack + local objs = minetest.get_objects_inside_radius(hitter:get_pos(), self.view_range) + local obj = nil + + for n = 1, #objs do + + obj = objs[n]:get_luaentity() + + if obj then + -- only alert members of same mob or friends + if obj.group_attack + and obj.state ~= "attack" + and obj.owner ~= name then + if obj.name == self.name then + obj:do_attack(hitter) + elseif type(obj.group_attack) == "table" then + for i=1, #obj.group_attack do + if obj.name == obj.group_attack[i] then + obj._aggro = true + obj:do_attack(hitter) + break + end + end + end + end + + -- have owned mobs attack player threat + if obj.owner == name and obj.owner_loyal then + obj:do_attack(self.object) + end + end + end + end +end + +function mob_class:check_aggro(dtime) + if not self._aggro or not self.attack then return end + if not self._check_aggro_timer or self._check_aggro_timer > 5 then + self._check_aggro_timer = 0 + if not self.attack:get_pos() or vector.distance(self.attack:get_pos(),self.object:get_pos()) > 128 then + self._aggro = nil + self.attack = nil + self.state = "stand" + end + end + self._check_aggro_timer = self._check_aggro_timer + dtime +end diff --git a/mods/ENTITIES/mcl_mobs/compat.lua b/mods/ENTITIES/mcl_mobs/compat.lua new file mode 100644 index 0000000000..020a089b2e --- /dev/null +++ b/mods/ENTITIES/mcl_mobs/compat.lua @@ -0,0 +1,32 @@ + +-- this is to make the register_mob and register egg functions commonly used by mods not break +-- when they use the weird old : notation AND self as first argument +local oldregmob = mcl_mobs.register_mob +function mcl_mobs.register_mob(self,name,def) + if type(self) == "string" then + def = name + name = self + end + return oldregmob(name,def) +end +local oldregegg = mcl_mobs.register_egg +function mcl_mobs.register_egg(self, mob, desc, background_color, overlay_color, addegg, no_creative) + if type(self) == "string" then + no_creative = addegg + addegg = overlay_color + overlay_color = background_color + background_color = desc + desc = mob + mob = self + end + return oldregegg(mob, desc, background_color, overlay_color, addegg, no_creative) +end + +local oldregarrow = mcl_mobs.register_mob +function mcl_mobs.register_mob(self,name,def) + if type(self) == "string" then + def = name + name = self + end + return oldregarrow(name,def) +end diff --git a/mods/ENTITIES/mcl_mobs/effects.lua b/mods/ENTITIES/mcl_mobs/effects.lua new file mode 100644 index 0000000000..476c134691 --- /dev/null +++ b/mods/ENTITIES/mcl_mobs/effects.lua @@ -0,0 +1,384 @@ +local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs +local mob_class = mcl_mobs.mob_class +local active_particlespawners = {} +local disable_blood = minetest.settings:get_bool("mobs_disable_blood") +local DEFAULT_FALL_SPEED = -9.81*1.5 + +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 + + +-- custom particle effects +function mcl_mobs.effect(pos, amount, texture, min_size, max_size, radius, gravity, glow, go_down) + + radius = radius or 2 + min_size = min_size or 0.5 + max_size = max_size or 1 + gravity = gravity or DEFAULT_FALL_SPEED + glow = glow or 0 + go_down = go_down or false + + local ym + if go_down then + ym = 0 + else + ym = -radius + end + + minetest.add_particlespawner({ + amount = amount, + time = 0.25, + minpos = pos, + maxpos = pos, + minvel = {x = -radius, y = ym, z = -radius}, + maxvel = {x = radius, y = radius, z = radius}, + minacc = {x = 0, y = gravity, z = 0}, + maxacc = {x = 0, y = gravity, z = 0}, + minexptime = 0.1, + maxexptime = 1, + minsize = min_size, + maxsize = max_size, + texture = texture, + glow = glow, + }) +end + +function mcl_mobs.death_effect(pos, yaw, collisionbox, rotate) + local min, max + if collisionbox then + min = {x=collisionbox[1], y=collisionbox[2], z=collisionbox[3]} + max = {x=collisionbox[4], y=collisionbox[5], z=collisionbox[6]} + else + min = { x = -0.5, y = 0, z = -0.5 } + max = { x = 0.5, y = 0.5, z = 0.5 } + end + if rotate then + min = vector.rotate(min, {x=0, y=yaw, z=math.pi/2}) + max = vector.rotate(max, {x=0, y=yaw, z=math.pi/2}) + min, max = vector.sort(min, max) + min = vector.multiply(min, 0.5) + max = vector.multiply(max, 0.5) + end + + minetest.add_particlespawner({ + amount = 50, + time = 0.001, + minpos = vector.add(pos, min), + maxpos = vector.add(pos, max), + minvel = vector.new(-5,-5,-5), + maxvel = vector.new(5,5,5), + minexptime = 1.1, + maxexptime = 1.5, + minsize = 1, + maxsize = 2, + collisiondetection = false, + vertical = false, + texture = "mcl_particles_mob_death.png^[colorize:#000000:255", + }) + + minetest.sound_play("mcl_mobs_mob_poof", { + pos = pos, + gain = 1.0, + max_hear_distance = 8, + }, true) +end + + +-- play sound +function mob_class:mob_sound(soundname, is_opinion, fixed_pitch) + + local soundinfo + if self.sounds_child and self.child then + soundinfo = self.sounds_child + elseif self.sounds then + soundinfo = self.sounds + end + if not soundinfo then + return + end + local sound = soundinfo[soundname] + if sound then + if is_opinion and self.opinion_sound_cooloff > 0 then + return + end + local pitch + if not fixed_pitch then + local base_pitch = soundinfo.base_pitch + if not base_pitch then + base_pitch = 1 + end + if self.child and (not self.sounds_child) then + -- Children have higher pitch + pitch = base_pitch * 1.5 + else + pitch = base_pitch + end + -- randomize the pitch a bit + pitch = pitch + math.random(-10, 10) * 0.005 + end + minetest.sound_play(sound, { + object = self.object, + gain = 1.0, + max_hear_distance = self.sounds.distance, + pitch = pitch, + }, true) + self.opinion_sound_cooloff = 1 + end +end + +function mob_class:add_texture_mod(mod) + local full_mod = "" + local already_added = false + for i=1, #self.texture_mods do + if mod == self.texture_mods[i] then + already_added = true + end + full_mod = full_mod .. self.texture_mods[i] + end + if not already_added then + full_mod = full_mod .. mod + table.insert(self.texture_mods, mod) + end + self.object:set_texture_mod(full_mod) +end + +function mob_class:remove_texture_mod(mod) + local full_mod = "" + local remove = {} + for i=1, #self.texture_mods do + if self.texture_mods[i] ~= mod then + full_mod = full_mod .. self.texture_mods[i] + else + table.insert(remove, i) + end + end + for i=#remove, 1 do + table.remove(self.texture_mods, remove[i]) + end + self.object:set_texture_mod(full_mod) +end + +function mob_class:damage_effect(damage) + -- damage particles + if (not disable_blood) and damage > 0 then + + local amount_large = math.floor(damage / 2) + local amount_small = damage % 2 + + local pos = self.object:get_pos() + + pos.y = pos.y + (self.collisionbox[5] - self.collisionbox[2]) * .5 + + local texture = "mobs_blood.png" + -- full heart damage (one particle for each 2 HP damage) + if amount_large > 0 then + mcl_mobs.effect(pos, amount_large, texture, 2, 2, 1.75, 0, nil, true) + end + -- half heart damage (one additional particle if damage is an odd number) + if amount_small > 0 then + -- TODO: Use "half heart" + mcl_mobs.effect(pos, amount_small, texture, 1, 1, 1.75, 0, nil, true) + end + end +end + +function mob_class:remove_particlespawners(pn) + if not active_particlespawners[pn] then return end + if not active_particlespawners[pn][self.object] then return end + for k,v in pairs(active_particlespawners[pn][self.object]) do + minetest.delete_particlespawner(v) + end +end + +function mob_class:add_particlespawners(pn) + if not active_particlespawners[pn] then active_particlespawners[pn] = {} end + if not active_particlespawners[pn][self.object] then active_particlespawners[pn][self.object] = {} end + for _,ps in pairs(self.particlespawners) do + ps.attached = self.object + ps.playername = pn + table.insert(active_particlespawners[pn][self.object],minetest.add_particlespawner(ps)) + end +end + +function mob_class:check_particlespawners(dtime) + if not self.particlespawners then return end + --minetest.log(dump(active_particlespawners)) + if self._particle_timer and self._particle_timer >= 1 then + self._particle_timer = 0 + local players = {} + for _,player in pairs(minetest.get_connected_players()) do + local pn = player:get_player_name() + table.insert(players,pn) + if not active_particlespawners[pn] then + active_particlespawners[pn] = {} end + + local dst = vector.distance(player:get_pos(),self.object:get_pos()) + if dst < player_transfer_distance and not active_particlespawners[pn][self.object] then + self:add_particlespawners(pn) + elseif dst >= player_transfer_distance and active_particlespawners[pn][self.object] then + self:remove_particlespawners(pn) + end + end + elseif not self._particle_timer then + self._particle_timer = 0 + end + self._particle_timer = self._particle_timer + dtime +end + + +-- set defined animation +function mob_class:set_animation(anim, fixed_frame) + if not self.animation or not anim then + return + end + if self.state == "die" and anim ~= "die" and anim ~= "stand" then + return + end + + if self.jockey then + anim = "jockey" + end + + + if self:flight_check() and self.fly and anim == "walk" then anim = "fly" end + + self._current_animation = self._current_animation or "" + + if (anim == self._current_animation + or not self.animation[anim .. "_start"] + or not self.animation[anim .. "_end"]) and self.state ~= "die" then + return + end + + self._current_animation = anim + + local a_start = self.animation[anim .. "_start"] + local a_end + if fixed_frame then + a_end = a_start + else + a_end = self.animation[anim .. "_end"] + end + if a_start and a_end then + self.object:set_animation({ + x = a_start, + y = a_end}, + self.animation[anim .. "_speed"] or self.animation.speed_normal or 15, + 0, self.animation[anim .. "_loop"] ~= false) + end +end + +-- above function exported for mount.lua +function mcl_mobs:set_animation(self, anim) + self:set_animation(anim) +end + +local function dir_to_pitch(dir) + --local dir2 = vector.normalize(dir) + local xz = math.abs(dir.x) + math.abs(dir.z) + return -math.atan2(-dir.y, xz) +end + +function mob_class:check_head_swivel(dtime) + if not self.head_swivel or type(self.head_swivel) ~= "string" then return end + local final_rotation = vector.new(0,0,0) + local oldp,oldr = self.object:get_bone_position(self.head_swivel) + + local pos = self.object:get_pos() + + for _, obj in pairs(minetest.get_objects_inside_radius(pos, 10)) do + if obj:is_player() and not self.attack or obj:get_luaentity() and obj:get_luaentity().name == self.name and self ~= obj:get_luaentity() then + if not self._locked_object then + if math.random(5000/self.curiosity) == 1 or vector.distance(pos,obj:get_pos())<4 and obj:is_player() then + self._locked_object = obj + end + else + if math.random(10000/self.curiosity) == 1 then + self._locked_object = nil + end + end + end + end + + if self.attack or self.following then + self._locked_object = self.attack or self.following + end + + if self._locked_object and (self._locked_object:is_player() or self._locked_object:get_luaentity()) and self._locked_object:get_hp() > 0 then + local _locked_object_eye_height = 1.5 + if self._locked_object:get_luaentity() then + _locked_object_eye_height = self._locked_object:get_luaentity().head_eye_height + end + if self._locked_object:is_player() then + _locked_object_eye_height = self._locked_object:get_properties().eye_height + end + if _locked_object_eye_height then + local self_rot = self.object:get_rotation() + if self.object:get_attach() then + self_rot = self.object:get_attach():get_rotation() + end + if self.rot then + local player_pos = self._locked_object:get_pos() + local direction_player = vector.direction(vector.add(self.object:get_pos(), vector.new(0, self.head_eye_height*.7, 0)), vector.add(player_pos, vector.new(0, _locked_object_eye_height, 0))) + local mob_yaw = math.deg(-(-(self_rot.y)-(-minetest.dir_to_yaw(direction_player))))+self.head_yaw_offset + local mob_pitch = math.deg(-dir_to_pitch(direction_player))*self.head_pitch_multiplier + + if (mob_yaw < -60 or mob_yaw > 60) and not (self.attack and self.state == "attack" and not self.runaway) then + final_rotation = vector.multiply(oldr, 0.9) + elseif self.attack and self.state == "attack" and not self.runaway then + if self.head_yaw == "y" then + final_rotation = vector.new(mob_pitch, mob_yaw, 0) + elseif self.head_yaw == "z" then + final_rotation = vector.new(mob_pitch, 0, -mob_yaw) + end + + else + + if self.head_yaw == "y" then + final_rotation = vector.new(((mob_pitch-oldr.x)*.3)+oldr.x, ((mob_yaw-oldr.y)*.3)+oldr.y, 0) + elseif self.head_yaw == "z" then + final_rotation = vector.new(((mob_pitch-oldr.x)*.3)+oldr.x, 0, -(((mob_yaw-oldr.y)*.3)+oldr.y)*3) + end + end + end + end + elseif not self._locked_object and math.abs(oldr.y) > 3 and math.abs(oldr.x) < 3 then + final_rotation = vector.multiply(oldr, 0.9) + else + 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.horrizonatal_head_height), final_rotation) +end + +function mob_class:set_animation_speed() + local v = self.object:get_velocity() + if v then + if self.frame_speed_multiplier then + local v2 = math.abs(v.x)+math.abs(v.z)*.833 + if not self.animation.walk_speed then + self.animation.walk_speed = 25 + end + if math.abs(v.x)+math.abs(v.z) > 0.5 then + self.object:set_animation_frame_speed((v2/math.max(1,self.run_velocity))*self.animation.walk_speed*self.frame_speed_multiplier) + else + self.object:set_animation_frame_speed(25) + end + end + --set_speed + if self.acc then + self.object:add_velocity(self.acc) + end + end +end + +minetest.register_on_leaveplayer(function(player) + local pn = player:get_player_name() + if not active_particlespawners[pn] then return end + for _,m in pairs(active_particlespawners[pn]) do + for k,v in pairs(m) do + minetest.delete_particlespawner(v) + end + end + active_particlespawners[pn] = nil +end) diff --git a/mods/ENTITIES/mcl_mobs/init.lua b/mods/ENTITIES/mcl_mobs/init.lua index 69246b4706..ed3641dc52 100644 --- a/mods/ENTITIES/mcl_mobs/init.lua +++ b/mods/ENTITIES/mcl_mobs/init.lua @@ -1,14 +1,566 @@ - -local path = minetest.get_modpath(minetest.get_current_modname()) - --- Mob API +mcl_mobs = {} +mcl_mobs.mob_class = {} +mcl_mobs.mob_class_meta = {__index = mcl_mobs.mob_class} +mcl_mobs.registered_mobs = {} +local modname = minetest.get_current_modname() +local path = minetest.get_modpath(modname) +local S = minetest.get_translator(modname) +mcl_mobs.fallback_node = minetest.registered_aliases["mapgen_dirt"] or "mcl_core:dirt" +--api and helpers +-- effects: sounds and particles mostly +dofile(path .. "/effects.lua") +-- physics: involuntary mob movement - particularly falling and death +dofile(path .. "/physics.lua") +-- movement: general voluntary mob movement, walking avoiding cliffs etc. +dofile(path .. "/movement.lua") +-- items: item management for mobs +dofile(path .. "/items.lua") +-- pathfinding: pathfinding to target positions +dofile(path .. "/pathfinding.lua") +-- combat: attack logic +dofile(path .. "/combat.lua") +-- the enity functions themselves dofile(path .. "/api.lua") --- Spawning Algorithm + +--utility functions +dofile(path .. "/breeding.lua") dofile(path .. "/spawning.lua") - --- Rideable Mobs dofile(path .. "/mount.lua") +dofile(path .. "/crafts.lua") +dofile(path .. "/compat.lua") --- Mob Items -dofile(path .. "/crafts.lua") \ No newline at end of file +local DEFAULT_FALL_SPEED = -9.81*1.5 +local MAX_MOB_NAME_LENGTH = 30 + +local old_spawn_icons = minetest.settings:get_bool("mcl_old_spawn_icons",false) +local extended_pet_control = minetest.settings:get_bool("mcl_extended_pet_control",true) +local difficulty = tonumber(minetest.settings:get("mob_difficulty")) or 1.0 + +-- get node but use fallback for nil or unknown +local node_ok = function(pos, fallback) + fallback = fallback or mcl_mobs.fallback_node + local node = minetest.get_node_or_nil(pos) + if node and minetest.registered_nodes[node.name] then + return node + end + return minetest.registered_nodes[fallback] +end + +--#### REGISTER FUNCS + +-- Code to execute before custom on_rightclick handling +local on_rightclick_prefix = function(self, clicker) + if not clicker:is_player() then return end + local item = clicker:get_wielded_item() + if extended_pet_control and self.tamed and self.owner == clicker:get_player_name() then + self:toggle_sit(clicker) + end + -- Name mob with nametag + if not self.ignores_nametag and item:get_name() == "mcl_mobs:nametag" then + + local tag = item:get_meta():get_string("name") + if tag ~= "" then + if string.len(tag) > MAX_MOB_NAME_LENGTH then + tag = string.sub(tag, 1, MAX_MOB_NAME_LENGTH) + end + self.nametag = tag + + self:update_tag() + + if not minetest.is_creative_enabled(clicker:get_player_name()) then + item:take_item() + clicker:set_wielded_item(item) + end + return true + end + + end + + return false +end + +local create_mob_on_rightclick = function(on_rightclick) + return function(self, clicker) + local stop = on_rightclick_prefix(self, clicker) + if (not stop) and (on_rightclick) then + on_rightclick(self, clicker) + end + end +end + +-- check if within physical map limits (-30911 to 30927) +local function within_limits(pos, radius) + local wmin, wmax = -30912, 30928 + if mcl_vars then + if mcl_vars.mapgen_edge_min and mcl_vars.mapgen_edge_max then + wmin, wmax = mcl_vars.mapgen_edge_min, mcl_vars.mapgen_edge_max + end + end + if radius then + wmin = wmin - radius + wmax = wmax + radius + end + for _,v in pairs(pos) do + if v < wmin or v > wmax then return false end + end + return true +end + +mcl_mobs.spawning_mobs = {} +-- register mob entity +function mcl_mobs.register_mob(name, def) + + mcl_mobs.spawning_mobs[name] = true + mcl_mobs.registered_mobs[name] = def + + local can_despawn + if def.can_despawn ~= nil then + can_despawn = def.can_despawn + elseif def.spawn_class == "passive" then + can_despawn = false + else + can_despawn = true + end + + local function scale_difficulty(value, default, min, special) + if (not value) or (value == default) or (value == special) then + return default + else + return math.max(min, value * difficulty) + end + end + + local collisionbox = def.collisionbox or {-0.25, -0.25, -0.25, 0.25, 0.25, 0.25} + -- Workaround for : + -- Increase upper Y limit to avoid mobs glitching through solid nodes. + -- FIXME: Remove workaround if it's no longer needed. + if collisionbox[5] < 0.79 then + collisionbox[5] = 0.79 + end + local final_def = { + use_texture_alpha = def.use_texture_alpha, + head_swivel = def.head_swivel or nil, -- bool to activate this function + head_yaw_offset = def.head_yaw_offset or 0, -- for wonkey model bones + head_pitch_multiplier = def.head_pitch_multiplier or 1, --for inverted pitch + bone_eye_height = def.bone_eye_height or 1.4, -- head bone offset + 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 + 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, + description = def.description, + type = def.type, + attack_type = def.attack_type, + fly = def.fly or false, + fly_in = def.fly_in or {"air", "__airlike"}, + owner = def.owner or "", + order = def.order or "", + on_die = def.on_die, + spawn_small_alternative = def.spawn_small_alternative, + do_custom = def.do_custom, + detach_child = def.detach_child, + jump_height = def.jump_height or 4, -- was 6 + rotate = math.rad(def.rotate or 0), -- 0=front, 90=side, 180=back, 270=side2 + lifetimer = def.lifetimer or 57.73, + hp_min = scale_difficulty(def.hp_min, 5, 1), + hp_max = scale_difficulty(def.hp_max, 10, 1), + xp_min = def.xp_min or 0, + xp_max = def.xp_max or 0, + xp_timestamp = 0, + breath_max = def.breath_max or 15, + breathes_in_water = def.breathes_in_water or false, + physical = true, + collisionbox = collisionbox, + selectionbox = def.selectionbox or def.collisionbox, + visual = def.visual, + visual_size = def.visual_size or {x = 1, y = 1}, + mesh = def.mesh, + makes_footstep_sound = def.makes_footstep_sound or false, + view_range = def.view_range or 16, + walk_velocity = def.walk_velocity or 1, + run_velocity = def.run_velocity or 2, + damage = scale_difficulty(def.damage, 0, 0), + light_damage = def.light_damage or 0, + sunlight_damage = def.sunlight_damage or 0, + water_damage = def.water_damage or 0, + lava_damage = def.lava_damage or 8, + fire_damage = def.fire_damage or 1, + suffocation = def.suffocation or true, + fall_damage = def.fall_damage or 1, + fall_speed = def.fall_speed or DEFAULT_FALL_SPEED, -- must be lower than -2 + drops = def.drops or {}, + armor = def.armor or 100, + on_rightclick = create_mob_on_rightclick(def.on_rightclick), + arrow = def.arrow, + shoot_interval = def.shoot_interval, + sounds = def.sounds or {}, + animation = def.animation or {}, + follow = def.follow, + nofollow = def.nofollow, + can_open_doors = def.can_open_doors, + jump = def.jump ~= false, + automatic_face_movement_max_rotation_per_sec = 300, + walk_chance = def.walk_chance or 50, + attacks_monsters = def.attacks_monsters or false, + group_attack = def.group_attack or false, + passive = def.passive or false, + knock_back = def.knock_back ~= false, + shoot_offset = def.shoot_offset or 0, + floats = def.floats or 1, -- floats in water by default + floats_on_lava = def.floats_on_lava or 0, + replace_rate = def.replace_rate, + replace_what = def.replace_what, + replace_with = def.replace_with, + replace_offset = def.replace_offset or 0, + on_replace = def.on_replace, + timer = 0, + env_damage_timer = 0, + tamed = false, + pause_timer = 0, + horny = false, + hornytimer = 0, + gotten = false, + health = 0, + frame_speed_multiplier = 1, + reach = def.reach or 3, + htimer = 0, + texture_list = def.textures, + child_texture = def.child_texture, + docile_by_day = def.docile_by_day or false, + time_of_day = 0.5, + fear_height = def.fear_height or 0, + runaway = def.runaway, + runaway_timer = 0, + pathfinding = def.pathfinding, + immune_to = def.immune_to or {}, + explosion_radius = def.explosion_radius, -- LEGACY + explosion_damage_radius = def.explosion_damage_radius, -- LEGACY + explosiontimer_reset_radius = def.explosiontimer_reset_radius, + explosion_timer = def.explosion_timer or 3, + allow_fuse_reset = def.allow_fuse_reset ~= false, + stop_to_explode = def.stop_to_explode ~= false, + custom_attack = def.custom_attack, + double_melee_attack = def.double_melee_attack, + dogshoot_switch = def.dogshoot_switch, + dogshoot_count = 0, + dogshoot_count_max = def.dogshoot_count_max or 5, + dogshoot_count2_max = def.dogshoot_count2_max or (def.dogshoot_count_max or 5), + attack_animals = def.attack_animals or false, + attack_npcs = def.attack_npcs or false, + specific_attack = def.specific_attack, + runaway_from = def.runaway_from, + owner_loyal = def.owner_loyal, + facing_fence = false, + is_mob = true, + pushable = def.pushable or true, + + -- MCL2 extensions + shooter_avoid_enemy = def.shooter_avoid_enemy, + strafes = def.strafes, + avoid_distance = def.avoid_distance or 9, + do_teleport = def.do_teleport, + spawn_class = def.spawn_class, + can_spawn = def.can_spawn, + ignores_nametag = def.ignores_nametag or false, + rain_damage = def.rain_damage or 0, + glow = def.glow, + can_despawn = can_despawn, + child = def.child or false, + texture_mods = {}, + shoot_arrow = def.shoot_arrow, + sounds_child = def.sounds_child, + _child_animations = def.child_animations, + pick_up = def.pick_up, + explosion_strength = def.explosion_strength, + suffocation_timer = 0, + follow_velocity = def.follow_velocity or 2.4, + instant_death = def.instant_death or false, + fire_resistant = def.fire_resistant or false, + fire_damage_resistant = def.fire_damage_resistant or false, + ignited_by_sunlight = def.ignited_by_sunlight or false, + spawn_in_group = def.spawn_in_group, + spawn_in_group_min = def.spawn_in_group_min, + noyaw = def.noyaw or false, + particlespawners = def.particlespawners, + -- End of MCL2 extensions + on_spawn = def.on_spawn, + on_blast = def.on_blast or function(self,damage) + self.object:punch(self.object, 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = damage}, + }, nil) + return false, true, {} + end, + do_punch = def.do_punch, + on_breed = def.on_breed, + on_grown = def.on_grown, + on_pick_up = def.on_pick_up, + on_activate = function(self, staticdata, dtime) + --this is a temporary hack so mobs stop + --glitching and acting really weird with the + --default built in engine collision detection + self.is_mob = true + self.object:set_properties({ + collide_with_objects = false, + }) + + return self:mob_activate(staticdata, def, dtime) + end, + harmed_by_heal = def.harmed_by_heal, + on_lightning_strike = def.on_lightning_strike + } + minetest.register_entity(name, setmetatable(final_def,mcl_mobs.mob_class_meta)) + + if minetest.get_modpath("doc_identifier") ~= nil then + doc.sub.identifier.register_object(name, "basics", "mobs") + end + +end -- END mcl_mobs.register_mob function + + +-- register arrow for shoot attack +function mcl_mobs.register_arrow(name, def) + + if not name or not def then return end -- errorcheck + + minetest.register_entity(name, { + + physical = false, + visual = def.visual, + visual_size = def.visual_size, + textures = def.textures, + velocity = def.velocity, + hit_player = def.hit_player, + hit_node = def.hit_node, + hit_mob = def.hit_mob, + hit_object = def.hit_object, + drop = def.drop or false, -- drops arrow as registered item when true + collisionbox = {0, 0, 0, 0, 0, 0}, -- remove box around arrows + timer = 0, + switch = 0, + owner_id = def.owner_id, + rotate = def.rotate, + 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, + collisionbox = def.collisionbox or {0, 0, 0, 0, 0, 0}, + automatic_face_movement_dir = def.rotate + and (def.rotate - (math.pi / 180)) or false, + + on_activate = def.on_activate, + + on_step = def.on_step or function(self, dtime) + + self.timer = self.timer + 1 + + local pos = self.object:get_pos() + + if self.switch == 0 + or self.timer > 150 + or not within_limits(pos, 0) then + mcl_burning.extinguish(self.object) + self.object:remove(); + + return + end + + -- does arrow have a tail (fireball) + if def.tail + and def.tail == 1 + and def.tail_texture then + + minetest.add_particle({ + pos = pos, + velocity = {x = 0, y = 0, z = 0}, + acceleration = {x = 0, y = 0, z = 0}, + expirationtime = def.expire or 0.25, + collisiondetection = false, + texture = def.tail_texture, + size = def.tail_size or 5, + glow = def.glow or 0, + }) + end + + if self.hit_node then + + local node = node_ok(pos).name + + if minetest.registered_nodes[node].walkable then + + self.hit_node(self, pos, node) + + if self.drop == true then + + pos.y = pos.y + 1 + + self.lastpos = (self.lastpos or pos) + + minetest.add_item(self.lastpos, self.object:get_luaentity().name) + end + + self.object:remove(); + + return + end + end + + if self.hit_player or self.hit_mob or self.hit_object then + + for _,player in pairs(minetest.get_objects_inside_radius(pos, 1.5)) do + + if self.hit_player + and player:is_player() then + + self.hit_player(self, player) + self.object:remove(); + return + end + + local entity = player:get_luaentity() + + if entity + and self.hit_mob + and entity.is_mob == true + and tostring(player) ~= self.owner_id + and entity.name ~= self.object:get_luaentity().name then + self.hit_mob(self, player) + self.object:remove(); + return + end + + if entity + and self.hit_object + and (not entity.is_mob) + and tostring(player) ~= self.owner_id + and entity.name ~= self.object:get_luaentity().name then + self.hit_object(self, player) + self.object:remove(); + return + end + end + end + + self.lastpos = pos + end + }) +end + +-- Register spawn eggs + +-- Note: This also introduces the “spawn_egg” group: +-- * spawn_egg=1: Spawn egg (generic mob, no metadata) +-- * spawn_egg=2: Spawn egg (captured/tamed mob, metadata) +function mcl_mobs.register_egg(mob, desc, background_color, overlay_color, addegg, no_creative) + + local grp = {spawn_egg = 1} + + -- do NOT add this egg to creative inventory (e.g. dungeon master) + if no_creative == true then + grp.not_in_creative_inventory = 1 + end + + local invimg = "(spawn_egg.png^[multiply:" .. background_color ..")^(spawn_egg_overlay.png^[multiply:" .. overlay_color .. ")" + if old_spawn_icons then + local mobname = mob:gsub("mobs_mc:","") + local fn = "mobs_mc_spawn_icon_"..mobname..".png" + if mcl_util.file_exists(minetest.get_modpath("mobs_mc").."/textures/"..fn) then + invimg = fn + end + end + if addegg == 1 then + invimg = "mobs_chicken_egg.png^(" .. invimg .. + "^[mask:mobs_chicken_egg_overlay.png)" + end + + -- register old stackable mob egg + minetest.register_craftitem(mob, { + + description = desc, + inventory_image = invimg, + groups = grp, + + _doc_items_longdesc = S("This allows you to place a single mob."), + _doc_items_usagehelp = S("Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns."), + + on_place = function(itemstack, placer, pointed_thing) + + local pos = pointed_thing.above + + -- am I clicking on something with existing on_rightclick function? + local under = minetest.get_node(pointed_thing.under) + local def = minetest.registered_nodes[under.name] + if def and def.on_rightclick then + return def.on_rightclick(pointed_thing.under, under, placer, itemstack) + end + + if pos + and within_limits(pos, 0) + and not minetest.is_protected(pos, placer:get_player_name()) then + + local name = placer:get_player_name() + local privs = minetest.get_player_privs(name) + if under.name == "mcl_mobspawners:spawner" then + if minetest.is_protected(pointed_thing.under, name) then + minetest.record_protection_violation(pointed_thing.under, name) + return itemstack + end + if not privs.maphack then + minetest.chat_send_player(name, S("You need the “maphack” privilege to change the mob spawner.")) + return itemstack + end + mcl_mobspawners.setup_spawner(pointed_thing.under, itemstack:get_name()) + if not minetest.is_creative_enabled(name) then + itemstack:take_item() + end + return itemstack + end + + if not minetest.registered_entities[mob] then + return itemstack + end + + if minetest.settings:get_bool("only_peaceful_mobs", false) + and minetest.registered_entities[mob].type == "monster" then + minetest.chat_send_player(name, S("Only peaceful mobs allowed!")) + return itemstack + end + + pos.y = pos.y - 0.5 + + local mob = minetest.add_entity(pos, mob) + local entityname = itemstack:get_name() + minetest.log("action", "Player " ..name.." spawned "..entityname.." at "..minetest.pos_to_string(pos)) + local ent = mob:get_luaentity() + + -- don't set owner if monster or sneak pressed + if ent.type ~= "monster" + and not placer:get_player_control().sneak then + ent.owner = placer:get_player_name() + ent.tamed = true + end + + -- set nametag + local nametag = itemstack:get_meta():get_string("name") + if nametag ~= "" then + if string.len(nametag) > MAX_MOB_NAME_LENGTH then + nametag = string.sub(nametag, 1, MAX_MOB_NAME_LENGTH) + end + ent.nametag = nametag + update_tag(ent) + end + + -- if not in creative then take item + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + end + + return itemstack + end, + }) + +end diff --git a/mods/ENTITIES/mcl_mobs/items.lua b/mods/ENTITIES/mcl_mobs/items.lua new file mode 100644 index 0000000000..267dd85955 --- /dev/null +++ b/mods/ENTITIES/mcl_mobs/items.lua @@ -0,0 +1,103 @@ +local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs +local mob_class = mcl_mobs.mob_class +--- Item and armor management + +local function player_near(pos) + for _,o in pairs(minetest.get_objects_inside_radius(pos,2)) do + if o:is_player() then return true end + end +end + +local function get_armor_texture(armor_name) + if armor_name == "" then + return "" + end + if armor_name=="blank.png" then + return "blank.png" + end + local seperator = string.find(armor_name, ":") + return "mcl_armor_"..string.sub(armor_name, seperator+1, -1)..".png^" +end + +function mob_class:set_armor_texture() + if self.armor_list then + local chestplate=minetest.registered_items[self.armor_list.chestplate] or {name=""} + local boots=minetest.registered_items[self.armor_list.boots] or {name=""} + local leggings=minetest.registered_items[self.armor_list.leggings] or {name=""} + local helmet=minetest.registered_items[self.armor_list.helmet] or {name=""} + + if helmet.name=="" and chestplate.name=="" and leggings.name=="" and boots.name=="" then + helmet={name="blank.png"} + end + local texture = get_armor_texture(chestplate.name)..get_armor_texture(helmet.name)..get_armor_texture(boots.name)..get_armor_texture(leggings.name) + if string.sub(texture, -1,-1) == "^" then + texture=string.sub(texture,1,-2) + end + if self.textures[self.wears_armor] then + self.textures[self.wears_armor]=texture + end + self.object:set_properties({textures=self.textures}) + + local armor_ + if type(self.armor) == "table" then + armor_ = table.copy(self.armor) + armor_.immortal = 1 + else + armor_ = {immortal=1, fleshy = self.armor} + end + + for _,item in pairs(self.armor_list) do + if not item then return end + if type(minetest.get_item_group(item, "mcl_armor_points")) == "number" then + armor_.fleshy=armor_.fleshy-(minetest.get_item_group(item, "mcl_armor_points")*3.5) + end + end + self.object:set_armor_groups(armor_) + end +end + +function mob_class:check_item_pickup() + if self.pick_up and #self.pick_up > 0 or self.wears_armor then + local p = self.object:get_pos() + if not p then return end + for _,o in pairs(minetest.get_objects_inside_radius(p,2)) do + local l=o:get_luaentity() + if l and l.name == "__builtin:item" then + if not player_near(p) and l.itemstring:find("mcl_armor") and self.wears_armor then + local armor_type + if l.itemstring:find("chestplate") then + armor_type = "chestplate" + elseif l.itemstring:find("boots") then + armor_type = "boots" + elseif l.itemstring:find("leggings") then + armor_type = "leggings" + elseif l.itemstring:find("helmet") then + armor_type = "helmet" + end + if not armor_type then + return + end + if not self.armor_list then + self.armor_list={helmet="",chestplate="",boots="",leggings=""} + elseif self.armor_list[armor_type] and self.armor_list[armor_type] ~= "" then + return + end + self.armor_list[armor_type]=ItemStack(l.itemstring):get_name() + o:remove() + end + if self.pick_up then + for k,v in pairs(self.pick_up) do + if not player_near(p) and self.on_pick_up and l.itemstring:find(v) then + local r = self.on_pick_up(self,l) + if r and r.is_empty and not r:is_empty() then + l.itemstring = r:to_string() + elseif r and r.is_empty and r:is_empty() then + o:remove() + end + end + end + end + end + end + end +end diff --git a/mods/ENTITIES/mcl_mobs/locale/mcl_mobs.ja.tr b/mods/ENTITIES/mcl_mobs/locale/mcl_mobs.ja.tr new file mode 100644 index 0000000000..a97d3e5451 --- /dev/null +++ b/mods/ENTITIES/mcl_mobs/locale/mcl_mobs.ja.tr @@ -0,0 +1,11 @@ +# textdomain: mcl_mobs +Peaceful mode active! No monsters will spawn.=ピースフルモード有効! モンスターは出現しません。 +This allows you to place a single mob.=これにより、1体のMOBを配置できます。 +Just place it where you want the mob to appear. Animals will spawn tamed, unless you hold down the sneak key while placing. If you place this on a mob spawner, you change the mob it spawns.=MOBを出現させたい場所に、置くだけです。スニークキーを押しながら配置しない限り、動物は飼いならされた状態でスポーンします。MOBスポナーに設置すると、スポーンするMOBが変わります。 +You need the “maphack” privilege to change the mob spawner.=MOBスポナーを変更するには、"maphack"権限が必要です。 +Name Tag=名札 +A name tag is an item to name a mob.=名札は、MOBに名前をつけるためのアイテムです。 +Before you use the name tag, you need to set a name at an anvil. Then you can use the name tag to name a mob. This uses up the name tag.=名札を使用する前に、金床で名前の設定をする必要があります。その後、MOBに名前をつけるために名札が使えます。これで名札は使い切ります。 +Only peaceful mobs allowed!=平和的なMOBのみ許可! +Give names to mobs=MOBに名前を付与 +Set name at anvil=金床で名前の設定 diff --git a/mods/ENTITIES/mcl_mobs/mount.lua b/mods/ENTITIES/mcl_mobs/mount.lua index 95a145a4b0..21c52157af 100644 --- a/mods/ENTITIES/mcl_mobs/mount.lua +++ b/mods/ENTITIES/mcl_mobs/mount.lua @@ -1,4 +1,5 @@ - +local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs +local mob_class = mcl_mobs.mob_class -- lib_mount by Blert2112 (edited by TenPlus1) local enable_crash = false @@ -385,7 +386,6 @@ function mcl_mobs.drive(entity, moving_anim, stand_anim, can_fly, dtime) entity.v2 = v end - -- directional flying routine by D00Med (edited by TenPlus1) function mcl_mobs.fly(entity, dtime, speed, shoots, arrow, moving_anim, stand_anim) @@ -446,3 +446,18 @@ function mcl_mobs.fly(entity, dtime, speed, shoots, arrow, moving_anim, stand_an mcl_mobs:set_animation(entity, moving_anim) end end + +mcl_mobs.mob_class.drive = mcl_mobs.drive +mcl_mobs.mob_class.fly = mcl_mobs.fly +mcl_mobs.mob_class.attach = mcl_mobs.attach + +function mob_class:on_detach_child(child) + if self.detach_child then + if self.detach_child(self, child) then + return + end + end + if self.driver == child then + self.driver = nil + end +end diff --git a/mods/ENTITIES/mcl_mobs/movement.lua b/mods/ENTITIES/mcl_mobs/movement.lua new file mode 100644 index 0000000000..2e8b4198c2 --- /dev/null +++ b/mods/ENTITIES/mcl_mobs/movement.lua @@ -0,0 +1,1403 @@ +local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs +local mob_class = mcl_mobs.mob_class +local DEFAULT_FALL_SPEED = -9.81*1.5 +local FLOP_HEIGHT = 6 +local FLOP_HOR_SPEED = 1.5 +local PATHFINDING = "gowp" +local enable_pathfinding = true + +local node_ice = "mcl_core:ice" +local node_snowblock = "mcl_core:snowblock" +local node_snow = "mcl_core:snow" + + +local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false + +local atann = math.atan +local function atan(x) + if not x or x ~= x then + return 0 + else + return atann(x) + end +end + +-- get node but use fallback for nil or unknown +local node_ok = function(pos, fallback) + fallback = fallback or mcl_mobs.fallback_node + local node = minetest.get_node_or_nil(pos) + if node and minetest.registered_nodes[node.name] then + return node + end + return minetest.registered_nodes[fallback] +end + +-- Returns true is node can deal damage to self +function mob_class:is_node_dangerous(nodename) + local nn = nodename + if self.lava_damage > 0 then + if minetest.get_item_group(nn, "lava") ~= 0 then + return true + end + end + if self.fire_damage > 0 then + if minetest.get_item_group(nn, "fire") ~= 0 then + return true + end + end + if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].damage_per_second and minetest.registered_nodes[nn].damage_per_second > 0 then + return true + end + return false +end + + +-- Returns true if node is a water hazard +function mob_class:is_node_waterhazard(nodename) + local nn = nodename + if self.water_damage > 0 then + if minetest.get_item_group(nn, "water") ~= 0 then + return true + end + end + if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].drowning and minetest.registered_nodes[nn].drowning > 0 then + if self.breath_max ~= -1 then + -- check if the mob is water-breathing _and_ the block is water; only return true if neither is the case + -- this will prevent water-breathing mobs to classify water or e.g. sand below them as dangerous + if not self.breathes_in_water and minetest.get_item_group(nn, "water") ~= 0 then + return true + end + end + end + return false +end + +-- check line of sight (BrunoMine) +function mob_class:line_of_sight(pos1, pos2, stepsize) + + stepsize = stepsize or 1 + + local s, pos = minetest.line_of_sight(pos1, pos2, stepsize) + + -- normal walking and flying mobs can see you through air + if s == true then + return true + end + + -- New pos1 to be analyzed + local npos1 = {x = pos1.x, y = pos1.y, z = pos1.z} + + local r, pos = minetest.line_of_sight(npos1, pos2, stepsize) + + -- Checks the return + if r == true then return true end + + -- Nodename found + local nn = minetest.get_node(pos).name + + -- Target Distance (td) to travel + local td = vector.distance(pos1, pos2) + + -- Actual Distance (ad) traveled + local ad = 0 + + -- It continues to advance in the line of sight in search of a real + -- obstruction which counts as 'normal' nodebox. + while minetest.registered_nodes[nn] + and minetest.registered_nodes[nn].walkable == false do + + -- Check if you can still move forward + if td < ad + stepsize then + return true -- Reached the target + end + + -- Moves the analyzed pos + local d = vector.distance(pos1, pos2) + + npos1.x = ((pos2.x - pos1.x) / d * stepsize) + pos1.x + npos1.y = ((pos2.y - pos1.y) / d * stepsize) + pos1.y + npos1.z = ((pos2.z - pos1.z) / d * stepsize) + pos1.z + + -- NaN checks + if d == 0 + or npos1.x ~= npos1.x + or npos1.y ~= npos1.y + or npos1.z ~= npos1.z then + return false + end + + ad = ad + stepsize + + -- scan again + r, pos = minetest.line_of_sight(npos1, pos2, stepsize) + + if r == true then return true end + + -- New Nodename found + nn = minetest.get_node(pos).name + + end + + return false +end + +function mob_class:can_jump_cliff() + local yaw = self.object:get_yaw() + local pos = self.object:get_pos() + local v = self.object:get_velocity() + + local v2 = math.abs(v.x)+math.abs(v.z)*.833 + local jump_c_multiplier = 1 + if v2/self.walk_velocity/2>1 then + jump_c_multiplier = v2/self.walk_velocity/2 + end + + -- where is front + local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+0.6 + local dir_z = math.cos(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+0.6 + + --is there nothing under the block in front? if so jump the gap. + local nodLow = node_ok({ + x = pos.x + dir_x-0.6, + y = pos.y - 0.5, + z = pos.z + dir_z-0.6 + }, "air") + + local nodFar = node_ok({ + x = pos.x + dir_x*2, + y = pos.y - 0.5, + z = pos.z + dir_z*2 + }, "air") + + local nodFar2 = node_ok({ + x = pos.x + dir_x*2.5, + y = pos.y - 0.5, + z = pos.z + dir_z*2.5 + }, "air") + + + if minetest.registered_nodes[nodLow.name] + and minetest.registered_nodes[nodLow.name].walkable ~= true + + + and (minetest.registered_nodes[nodFar.name] + and minetest.registered_nodes[nodFar.name].walkable == true + + or minetest.registered_nodes[nodFar2.name] + and minetest.registered_nodes[nodFar2.name].walkable == true) + + then + --disable fear heigh while we make our jump + self._jumping_cliff = true + minetest.after(1, function() + if self and self.object then + self._jumping_cliff = false + end + end) + return true + else + return false + end +end + +-- is mob facing a cliff or danger +function mob_class:is_at_cliff_or_danger() + if self.fear_height == 0 or self:can_jump_cliff() or self._jumping_cliff or not self.object:get_luaentity() then -- 0 for no falling protection! + return false + end + + local yaw = self.object:get_yaw() + local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5) + local dir_z = math.cos(yaw) * (self.collisionbox[4] + 0.5) + local pos = self.object:get_pos() + local ypos = pos.y + self.collisionbox[2] -- just above floor + + local free_fall, blocker = minetest.line_of_sight( + {x = pos.x + dir_x, y = ypos, z = pos.z + dir_z}, + {x = pos.x + dir_x, y = ypos - self.fear_height, z = pos.z + dir_z}) + if free_fall then + return true + else + local bnode = minetest.get_node(blocker) + local danger = self:is_node_dangerous(bnode.name) + if danger then + return true + else + local def = minetest.registered_nodes[bnode.name] + if def and def.walkable then + return false + end + end + end + + return false +end + + +-- copy the 'mob facing cliff_or_danger check' from above, and rework to avoid water +function mob_class:is_at_water_danger() + if not self.object:get_luaentity() or self:can_jump_cliff() or self._jumping_cliff then + return false + end + local yaw = self.object:get_yaw() + local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5) + local dir_z = math.cos(yaw) * (self.collisionbox[4] + 0.5) + local pos = self.object:get_pos() + local ypos = pos.y + self.collisionbox[2] -- just above floor + + local free_fall, blocker = minetest.line_of_sight( + {x = pos.x + dir_x, y = ypos, z = pos.z + dir_z}, + {x = pos.x + dir_x, y = ypos - 3, z = pos.z + dir_z}) + if free_fall then + return true + else + local bnode = minetest.get_node(blocker) + local waterdanger = self:is_node_waterhazard(bnode.name) + if + waterdanger and (self:is_node_waterhazard(self.standing_in) or self:is_node_waterhazard( self.standing_on)) then + return false + elseif waterdanger and (self:is_node_waterhazard(self.standing_in) or self:is_node_waterhazard(self.standing_on)) == false then + return true + else + local def = minetest.registered_nodes[bnode.name] + if def and def.walkable then + return false + end + end + end + + return false +end + +-- jump if facing a solid node (not fences or gates) +function mob_class:do_jump() + if not self.jump + or self.jump_height == 0 + or self.fly + or self.order == "stand" then + return false + end + + self.facing_fence = false + + -- something stopping us while moving? + if self.state ~= "stand" + and self:get_velocity() > 0.5 + and self.object:get_velocity().y ~= 0 then + return false + end + + local pos = self.object:get_pos() + local yaw = self.object:get_yaw() + + -- what is mob standing on? + pos.y = pos.y + self.collisionbox[2] - 0.2 + + local nod = node_ok(pos) + + if minetest.registered_nodes[nod.name].walkable == false then + return false + end + + local v = self.object:get_velocity() + local v2 = math.abs(v.x)+math.abs(v.z)*.833 + local jump_c_multiplier = 1 + if v2/self.walk_velocity/2>1 then + jump_c_multiplier = v2/self.walk_velocity/2 + end + + -- where is front + local dir_x = -math.sin(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+0.6 + local dir_z = math.cos(yaw) * (self.collisionbox[4] + 0.5)*jump_c_multiplier+0.6 + + -- what is in front of mob? + nod = node_ok({ + x = pos.x + dir_x, + y = pos.y + 0.5, + z = pos.z + dir_z + }) + + -- this is used to detect if there's a block on top of the block in front of the mob. + -- If there is, there is no point in jumping as we won't manage. + local nodTop = node_ok({ + x = pos.x + dir_x, + y = pos.y + 1.5, + z = pos.z + dir_z + }, "air") + + + -- we don't attempt to jump if there's a stack of blocks blocking + if minetest.registered_nodes[nodTop.name].walkable == true and not (self.attack and self.state == "attack") then + return false + end + + -- thin blocks that do not need to be jumped + if nod.name == node_snow then + return false + end + + local ndef = minetest.registered_nodes[nod.name] + if self.walk_chance == 0 or ndef and ndef.walkable or self:can_jump_cliff() then + + if minetest.get_item_group(nod.name, "fence") == 0 + and minetest.get_item_group(nod.name, "fence_gate") == 0 + and minetest.get_item_group(nod.name, "wall") == 0 then + + local v = self.object:get_velocity() + + v.y = self.jump_height + 0.1 * 3 + + if self:can_jump_cliff() then + v=vector.multiply(v, vector.new(2.8,1,2.8)) + end + + self:set_animation( "jump") -- only when defined + + self.object:set_velocity(v) + + -- when in air move forward + minetest.after(0.3, function(self, v) + if (not self.object) or (not self.object:get_luaentity()) or (self.state == "die") then + return + end + self.object:set_acceleration({ + x = v.x * 2, + y = DEFAULT_FALL_SPEED, + z = v.z * 2, + }) + end, self, v) + + if self.jump_sound_cooloff <= 0 then + self:mob_sound("jump") + self.jump_sound_cooloff = 0.5 + end + else + self.facing_fence = true + end + + -- if we jumped against a block/wall 4 times then turn + if self.object:get_velocity().x ~= 0 + and self.object:get_velocity().z ~= 0 then + + self.jump_count = (self.jump_count or 0) + 1 + + if self.jump_count == 4 then + + local yaw = self.object:get_yaw() or 0 + + yaw = self:set_yaw( yaw + 1.35, 8) + + self.jump_count = 0 + end + end + + return true + end + + return false +end + +-- should mob follow what I'm holding ? +function mob_class:follow_holding(clicker) + if self.nofollow then return false end + + if mcl_mobs.invis[clicker:get_player_name()] then + return false + end + + local item = clicker:get_wielded_item() + local t = type(self.follow) + + -- single item + if t == "string" + and item:get_name() == self.follow then + return true + + -- multiple items + elseif t == "table" then + + for no = 1, #self.follow do + + if self.follow[no] == item:get_name() then + return true + end + end + end + + return false +end + + +-- find and replace what mob is looking for (grass, wheat etc.) +function mob_class:replace(pos) + + if not self.replace_rate + or not self.replace_what + or self.child == true + or self.object:get_velocity().y ~= 0 + or math.random(1, self.replace_rate) > 1 then + return + end + + local what, with, y_offset + + if type(self.replace_what[1]) == "table" then + + local num = math.random(#self.replace_what) + + what = self.replace_what[num][1] or "" + with = self.replace_what[num][2] or "" + y_offset = self.replace_what[num][3] or 0 + else + what = self.replace_what + with = self.replace_with or "" + y_offset = self.replace_offset or 0 + end + + pos.y = pos.y + y_offset + + local node = minetest.get_node(pos) + if node.name == what then + + local oldnode = {name = what, param2 = node.param2} + local newnode = {name = with, param2 = node.param2} + local on_replace_return + + if self.on_replace then + on_replace_return = self.on_replace(self, pos, oldnode, newnode) + end + + if on_replace_return ~= false then + + if mobs_griefing then + minetest.set_node(pos, newnode) + end + + end + end +end + +-- specific runaway +local specific_runaway = function(list, what) + if type(list) ~= "table" then + list = {} + end + + -- no list so do not run + if list == nil then + return false + end + + -- found entity on list to attack? + for no = 1, #list do + + if list[no] == what then + return true + end + end + + return false +end + + +-- find someone to runaway from +function mob_class:check_runaway_from() + if not self.runaway_from and self.state ~= "flop" then + return + end + + local s = self.object:get_pos() + local p, sp, dist + local player, obj, min_player + local type, name = "", "" + local min_dist = self.view_range + 1 + local objs = minetest.get_objects_inside_radius(s, self.view_range) + + for n = 1, #objs do + + if objs[n]:is_player() then + + if mcl_mobs.invis[ objs[n]:get_player_name() ] + or self.owner == objs[n]:get_player_name() + or (not self:object_in_range(objs[n])) then + type = "" + else + player = objs[n] + type = "player" + name = "player" + end + else + obj = objs[n]:get_luaentity() + + if obj then + player = obj.object + type = obj.type + name = obj.name or "" + end + end + + -- find specific mob to runaway from + if name ~= "" and name ~= self.name + and specific_runaway(self.runaway_from, name) then + + p = player:get_pos() + sp = s + + -- aim higher to make looking up hills more realistic + p.y = p.y + 1 + sp.y = sp.y + 1 + + dist = vector.distance(p, s) + + + -- choose closest player/mpb to runaway from + if dist < min_dist + and self:line_of_sight(sp, p, 2) == true then + min_dist = dist + min_player = player + end + end + end + + if min_player then + + local lp = player:get_pos() + local vec = { + x = lp.x - s.x, + y = lp.y - s.y, + z = lp.z - s.z + } + + local yaw = (atan(vec.z / vec.x) + 3 *math.pi/ 2) - self.rotate + + if lp.x > s.x then + yaw = yaw + math.pi + end + + yaw = self:set_yaw( yaw, 4) + self.state = "runaway" + self.runaway_timer = 3 + self.following = nil + end +end + + +-- follow player if owner or holding item, if fish outta water then flop +function mob_class:follow_flop() + + -- find player to follow + if (self.follow ~= "" + or self.order == "follow") + and not self.following + and self.state ~= "attack" + and self.order ~= "sit" + and self.state ~= "runaway" then + + local s = self.object:get_pos() + local players = minetest.get_connected_players() + + for n = 1, #players do + + if (self:object_in_range(players[n])) + and not mcl_mobs.invis[ players[n]:get_player_name() ] then + + self.following = players[n] + + break + end + end + end + + if self.type == "npc" + and self.order == "follow" + and self.state ~= "attack" + and self.order ~= "sit" + and self.owner ~= "" then + + -- npc stop following player if not owner + if self.following + and self.owner + and self.owner ~= self.following:get_player_name() then + self.following = nil + end + else + -- stop following player if not holding specific item, + -- mob is horny, fleeing or attacking + if self.following + and self.following:is_player() + and (self:follow_holding(self.following) == false or + self.horny or self.state == "runaway") then + self.following = nil + end + + end + + -- follow that thing + if self.following then + + local s = self.object:get_pos() + local p + + if self.following:is_player() then + + p = self.following:get_pos() + + elseif self.following.object then + + p = self.following.object:get_pos() + end + + if p then + + local dist = vector.distance(p, s) + + -- dont follow if out of range + if (not self:object_in_range(self.following)) then + self.following = nil + else + local vec = { + x = p.x - s.x, + 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 + + self:set_yaw( yaw, 2.35) + + -- anyone but standing npc's can move along + if dist > 3 + and self.order ~= "stand" then + + self:set_velocity(self.follow_velocity) + + if self.walk_chance ~= 0 then + self:set_animation( "run") + end + else + self:set_velocity(0) + self:set_animation( "stand") + end + + return + end + end + end + + -- swimmers flop when out of their element, and swim again when back in + if self.fly then + local s = self.object:get_pos() + if self:flight_check( s) == false then + + self.state = "flop" + self.object:set_acceleration({x = 0, y = DEFAULT_FALL_SPEED, z = 0}) + + local p = self.object:get_pos() + local sdef = minetest.registered_nodes[node_ok(vector.add(p, vector.new(0,self.collisionbox[2]-0.2,0))).name] + -- Flop on ground + if sdef and sdef.walkable then + if self.object:get_velocity().y < 0.1 then + self:mob_sound("flop") + self.object:set_velocity({ + x = math.random(-FLOP_HOR_SPEED, FLOP_HOR_SPEED), + y = FLOP_HEIGHT, + z = math.random(-FLOP_HOR_SPEED, FLOP_HOR_SPEED), + }) + end + end + + self:set_animation( "stand", true) + + return + elseif self.state == "flop" then + self.state = "stand" + self.object:set_acceleration({x = 0, y = 0, z = 0}) + self:set_velocity(0) + end + end +end + +function mob_class:go_to_pos(b) + if not self then return end + local s=self.object:get_pos() + if not b then + --self.state = "stand" + return end + if vector.distance(b,s) < 1 then + --self:set_velocity(0) + return true + end + local v = { x = b.x - s.x, z = b.z - s.z } + local yaw = (atann(v.z / v.x) +math.pi/ 2) - self.rotate + if b.x > s.x then yaw = yaw +math.pi end + self.object:set_yaw(yaw) + self:set_velocity(self.follow_velocity) + self:set_animation("walk") +end + +local check_herd_timer = 0 +function mob_class:check_herd(dtime) + local pos = self.object:get_pos() + if not pos then return end + check_herd_timer = check_herd_timer + dtime + if check_herd_timer < 4 then return end + check_herd_timer = 0 + for _,o in pairs(minetest.get_objects_inside_radius(pos,self.view_range)) do + local l = o:get_luaentity() + local p,y + if l and l.is_mob and l.name == self.name then + if self.horny and l.horny then + p = l.object:get_pos() + else + y = o:get_yaw() + end + if p then + self:go_to_pos(p) + elseif y then + self:set_yaw(y) + end + end + end +end + +function mob_class:teleport(target) + if self.do_teleport then + if self.do_teleport(self, target) == false then + return + end + end +end + +-- execute current state (stand, walk, run, attacks) +-- returns true if mob has died +function mob_class:do_states(dtime) + --if self.can_open_doors then check_doors(self) end + + local yaw = self.object:get_yaw() or 0 + + if self.state == "stand" then + if math.random(1, 4) == 1 then + + local s = self.object:get_pos() + local objs = minetest.get_objects_inside_radius(s, 3) + local lp + for n = 1, #objs do + if objs[n]:is_player() then + lp = objs[n]:get_pos() + break + end + end + + -- look at any players nearby, otherwise turn randomly + if lp and self.look_at_players then + + local vec = { + x = lp.x - s.x, + z = lp.z - s.z + } + + yaw = (atan(vec.z / vec.x) +math.pi/ 2) - self.rotate + + if lp.x > s.x then yaw = yaw +math.pi end + else + yaw = yaw + math.random(-0.5, 0.5) + end + + yaw = self:set_yaw( yaw, 8) + end + if self.order == "sit" then + self:set_animation( "sit") + self:set_velocity(0) + else + self:set_animation( "stand") + self:set_velocity(0) + end + + -- npc's ordered to stand stay standing + if self.order == "stand" or self.order == "sleep" or self.order == "work" then + + else + if self.walk_chance ~= 0 + and self.facing_fence ~= true + and math.random(1, 100) <= self.walk_chance + and self:is_at_cliff_or_danger() == false then + + self:set_velocity(self.walk_velocity) + self.state = "walk" + self:set_animation( "walk") + end + end + + elseif self.state == PATHFINDING then + self:check_gowp(dtime) + + elseif self.state == "walk" then + local s = self.object:get_pos() + local lp = nil + + -- is there something I need to avoid? + if (self.water_damage > 0 + and self.lava_damage > 0) + or self.breath_max ~= -1 then + + lp = minetest.find_node_near(s, 1, {"group:water", "group:lava"}) + + elseif self.water_damage > 0 then + + lp = minetest.find_node_near(s, 1, {"group:water"}) + + elseif self.lava_damage > 0 then + + lp = minetest.find_node_near(s, 1, {"group:lava"}) + + elseif self.fire_damage > 0 then + + lp = minetest.find_node_near(s, 1, {"group:fire"}) + + end + + local is_in_danger = false + if lp then + -- If mob in or on dangerous block, look for land + if (self:is_node_dangerous(self.standing_in) or + self:is_node_dangerous(self.standing_on)) or (self:is_node_waterhazard(self.standing_in) or self:is_node_waterhazard(self.standing_on)) and (not self.fly) then + is_in_danger = true + + -- If mob in or on dangerous block, look for land + if is_in_danger then + -- Better way to find shore - copied from upstream + lp = minetest.find_nodes_in_area_under_air( + {x = s.x - 5, y = s.y - 0.5, z = s.z - 5}, + {x = s.x + 5, y = s.y + 1, z = s.z + 5}, + {"group:solid"}) + + lp = #lp > 0 and lp[math.random(#lp)] + + -- did we find land? + if lp then + + local vec = { + x = lp.x - s.x, + z = lp.z - s.z + } + + yaw = (atan(vec.z / vec.x) +math.pi/ 2) - self.rotate + + + if lp.x > s.x then yaw = yaw +math.pi end + + -- look towards land and move in that direction + yaw = self:set_yaw( yaw, 6) + self:set_velocity(self.walk_velocity) + + end + end + + -- A danger is near but mob is not inside + else + + -- Randomly turn + if math.random(1, 100) <= 30 then + yaw = yaw + math.random(-0.5, 0.5) + yaw = self:set_yaw( yaw, 8) + end + end + + yaw = self:set_yaw( yaw, 8) + + -- otherwise randomly turn + elseif math.random(1, 100) <= 30 then + yaw = yaw + math.random(-0.5, 0.5) + yaw = self:set_yaw( yaw, 8) + end + + -- stand for great fall or danger or fence in front + local cliff_or_danger = false + if is_in_danger then + cliff_or_danger = self:is_at_cliff_or_danger() + end + if self.facing_fence == true + or cliff_or_danger + or math.random(1, 100) <= 30 then + + self:set_velocity(0) + self.state = "stand" + self:set_animation( "stand") + local yaw = self.object:get_yaw() or 0 + yaw = self:set_yaw( yaw + 0.78, 8) + else + + self:set_velocity(self.walk_velocity) + + if self:flight_check() + and self.animation + and self.animation.fly_start + and self.animation.fly_end then + self:set_animation( "fly") + else + self:set_animation( "walk") + end + end + + -- runaway when punched + elseif self.state == "runaway" then + + self.runaway_timer = self.runaway_timer + 1 + + -- stop after 5 seconds or when at cliff + if self.runaway_timer > 5 + or self:is_at_cliff_or_danger() then + self.runaway_timer = 0 + self:set_velocity(0) + self.state = "stand" + self:set_animation( "stand") + local yaw = self.object:get_yaw() or 0 + yaw = self:set_yaw( yaw + 0.78, 8) + else + self:set_velocity( self.run_velocity) + self:set_animation( "run") + end + + -- attack routines (explode, dogfight, shoot, dogshoot) + elseif self.state == "attack" then + + local s = self.object:get_pos() + local p = self.attack:get_pos() or s + + -- stop attacking if player invisible or out of range + if not self.attack + or not self.attack:get_pos() + or not self:object_in_range(self.attack) + or self.attack:get_hp() <= 0 + or (self.attack:is_player() and mcl_mobs.invis[ self.attack:get_player_name() ]) then + + self.state = "stand" + self:set_velocity( 0) + self:set_animation( "stand") + self.attack = nil + self.v_start = false + self.timer = 0 + self.blinktimer = 0 + self.path.way = nil + + return + end + + -- calculate distance from mob and enemy + local dist = vector.distance(p, s) + + if self.attack_type == "explode" then + + local vec = { + x = p.x - s.x, + z = p.z - s.z + } + + 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 node_break_radius = self.explosion_radius or 1 + local entity_damage_radius = self.explosion_damage_radius + or (node_break_radius * 2) + + -- start timer when in reach and line of sight + if not self.v_start + and dist <= self.reach + and self:line_of_sight( s, p, 2) then + + self.v_start = true + self.timer = 0 + self.blinktimer = 0 + self:mob_sound("fuse", nil, false) + + -- stop timer if out of reach or direct line of sight + elseif self.allow_fuse_reset + and self.v_start + and (dist >= self.explosiontimer_reset_radius + or not self:line_of_sight( s, p, 2)) then + self.v_start = false + self.timer = 0 + self.blinktimer = 0 + self.blinkstatus = false + self:remove_texture_mod("^[brighten") + end + + -- walk right up to player unless the timer is active + if self.v_start and (self.stop_to_explode or dist < self.reach) then + self:set_velocity( 0) + else + self:set_velocity( self.run_velocity) + end + + if self.animation and self.animation.run_start then + self:set_animation( "run") + else + self:set_animation( "walk") + end + + if self.v_start then + + self.timer = self.timer + dtime + self.blinktimer = (self.blinktimer or 0) + dtime + + if self.blinktimer > 0.2 then + + self.blinktimer = 0 + + if self.blinkstatus then + self:remove_texture_mod("^[brighten") + else + self:add_texture_mod("^[brighten") + end + + self.blinkstatus = not self.blinkstatus + end + + if self.timer > self.explosion_timer then + + local pos = self.object:get_pos() + + if mobs_griefing and not minetest.is_protected(pos, "") then + mcl_explosions.explode(mcl_util.get_object_center(self.object), self.explosion_strength, { drop_chance = 1.0 }, self.object) + else + minetest.sound_play(self.sounds.explode, { + pos = pos, + gain = 1.0, + max_hear_distance = self.sounds.distance or 32 + }, true) + self:entity_physics(pos,entity_damage_radius) + mcl_mobs.effect(pos, 32, "mcl_particles_smoke.png", nil, nil, node_break_radius, 1, 0) + end + mcl_burning.extinguish(self.object) + self.object:remove() + + return true + end + end + + elseif self.attack_type == "dogfight" + or (self.attack_type == "dogshoot" and self:dogswitch(dtime) == 2) and (dist >= self.avoid_distance or not self.shooter_avoid_enemy) + or (self.attack_type == "dogshoot" and dist <= self.reach and self:dogswitch() == 0) then + + if self.fly + and dist > self.reach then + + local p1 = s + local me_y = math.floor(p1.y) + local p2 = p + local p_y = math.floor(p2.y + 1) + local v = self.object:get_velocity() + + if self:flight_check( s) then + + if me_y < p_y then + + self.object:set_velocity({ + x = v.x, + y = 1 * self.walk_velocity, + z = v.z + }) + + elseif me_y > p_y then + + self.object:set_velocity({ + x = v.x, + y = -1 * self.walk_velocity, + z = v.z + }) + end + else + if me_y < p_y then + + self.object:set_velocity({ + x = v.x, + y = 0.01, + z = v.z + }) + + elseif me_y > p_y then + + self.object:set_velocity({ + x = v.x, + y = -0.01, + z = v.z + }) + end + end + + end + + -- rnd: new movement direction + if self.path.following + and self.path.way + and self.attack_type ~= "dogshoot" then + + -- no paths longer than 50 + if #self.path.way > 50 + or dist < self.reach then + self.path.following = false + return + end + + local p1 = self.path.way[1] + + if not p1 then + self.path.following = false + return + end + + if math.abs(p1.x-s.x) + math.abs(p1.z - s.z) < 0.6 then + -- reached waypoint, remove it from queue + table.remove(self.path.way, 1) + end + + -- set new temporary target + p = {x = p1.x, y = p1.y, z = p1.z} + end + + local vec = { + x = p.x - s.x, + z = p.z - s.z + } + + 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) + + -- move towards enemy if beyond mob reach + if dist > self.reach then + + -- path finding by rnd + if self.pathfinding -- only if mob has pathfinding enabled + and enable_pathfinding then + + self:smart_mobs(s, p, dist, dtime) + end + + if self:is_at_cliff_or_danger() then + + self:set_velocity( 0) + self:set_animation( "stand") + local yaw = self.object:get_yaw() or 0 + yaw = self:set_yaw( yaw + 0.78, 8) + else + + if self.path.stuck then + self:set_velocity( self.walk_velocity) + else + self:set_velocity( self.run_velocity) + end + + if self.animation and self.animation.run_start then + self:set_animation( "run") + else + self:set_animation( "walk") + end + end + + else -- rnd: if inside reach range + + self.path.stuck = false + self.path.stuck_timer = 0 + self.path.following = false -- not stuck anymore + + self:set_velocity( 0) + + if not self.custom_attack then + + if self.timer > 1 then + + self.timer = 0 + + if self.double_melee_attack + and math.random(1, 2) == 1 then + self:set_animation( "punch2") + else + self:set_animation( "punch") + end + + local p2 = p + local s2 = s + + p2.y = p2.y + .5 + s2.y = s2.y + .5 + + if self:line_of_sight( p2, s2) == true then + + -- play attack sound + self:mob_sound("attack") + + -- punch player (or what player is attached to) + local attached = self.attack:get_attach() + if attached then + self.attack = attached + end + self.attack:punch(self.object, 1.0, { + full_punch_interval = 1.0, + damage_groups = {fleshy = self.damage} + }, nil) + end + end + else -- call custom attack every second + if self.custom_attack + and self.timer > 1 then + + self.timer = 0 + + self.custom_attack(self, p) + end + end + end + + elseif self.attack_type == "shoot" + or (self.attack_type == "dogshoot" and self:dogswitch(dtime) == 1) + or (self.attack_type == "dogshoot" and (dist > self.reach or dist < self.avoid_distance and self.shooter_avoid_enemy) and self:dogswitch() == 0) then + + 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 + } + + 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.new(0,0,0) + + --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.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 + self.acc = vector.add(vector.multiply(vector.rotate_around_axis(vector.direction(s, p), vector.new(0,1,0), self.strafe_direction), 0.3*self.walk_velocity), stay_away_from_player) + else + self:set_velocity( 0) + end + + local p = self.object:get_pos() + p.y = p.y + (self.collisionbox[2] + self.collisionbox[5]) / 2 + + if self.shoot_interval + and self.timer > self.shoot_interval + and not minetest.raycast(vector.add(p, 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(p, 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(p, vec) + else + arrow:set_velocity(vec) + end + end + end + else + + end + end +end + +function mob_class:check_smooth_rotation(dtime) + -- smooth rotation by ThomasMonroe314 + if self._turn_to then + self:set_yaw( self._turn_to, .1) + end + + if self.delay and self.delay > 0 then + + local yaw = self.object:get_yaw() or 0 + + if self.delay == 1 then + yaw = self.target_yaw + else + local dif = math.abs(yaw - self.target_yaw) + + if yaw > self.target_yaw then + + if dif > math.pi then + dif = 2 * math.pi - dif -- need to add + yaw = yaw + dif / self.delay + else + yaw = yaw - dif / self.delay -- need to subtract + end + + elseif yaw < self.target_yaw then + + if dif >math.pi then + dif = 2 * math.pi - dif + yaw = yaw - dif / self.delay -- need to subtract + else + yaw = yaw + dif / self.delay -- need to add + end + end + + if yaw > (math.pi * 2) then yaw = yaw - (math.pi * 2) end + if yaw < 0 then yaw = yaw + (math.pi * 2) end + end + + self.delay = self.delay - 1 + if self.shaking then + yaw = yaw + (math.random() * 2 - 1) * 5 * dtime + end + self.object:set_yaw(yaw) + --self:update_roll() + end + -- end rotation +end diff --git a/mods/ENTITIES/mcl_mobs/pathfinding.lua b/mods/ENTITIES/mcl_mobs/pathfinding.lua new file mode 100644 index 0000000000..6cb37434f6 --- /dev/null +++ b/mods/ENTITIES/mcl_mobs/pathfinding.lua @@ -0,0 +1,382 @@ +local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs +local mob_class = mcl_mobs.mob_class + +local LOGGING_ON = minetest.settings:get_bool("mcl_logging_mobs_villager",false) +local PATHFINDING = "gowp" +local enable_pathfinding = true + +local LOG_MODULE = "[Mobs]" +local function mcl_log (message) + if LOGGING_ON and message then + minetest.log(LOG_MODULE .. " " .. message) + end +end + +function output_table (wp) + if not wp then return end + mcl_log("wp items: ".. tostring(#wp)) + for a,b in pairs(wp) do + mcl_log(a.. ": ".. tostring(b)) + end +end + +function append_paths (wp1, wp2) + mcl_log("Start append") + if not wp1 or not wp2 then + mcl_log("Cannot append wp's") + return + end + output_table(wp1) + output_table(wp2) + for _,a in pairs (wp2) do + table.insert(wp1, a) + end + mcl_log("End append") +end + +local function output_enriched (wp_out) + mcl_log("Output enriched path") + local i = 0 + for _,outy in pairs (wp_out) do + i = i + 1 + mcl_log("Pos ".. i ..":" .. minetest.pos_to_string(outy["pos"])) + + local action = outy["action"] + if action then + mcl_log("type: " .. action["type"]) + mcl_log("action: " .. action["action"]) + mcl_log("target: " .. minetest.pos_to_string(action["target"])) + end + mcl_log("failed attempts: " .. outy["failed_attempts"]) + end +end + +-- This function will take a list of paths, and enrich it with: +-- a var for failed attempts +-- an action, such as to open or close a door where we know that pos requires that action +local function generate_enriched_path(wp_in, door_open_pos, door_close_pos, cur_door_pos) + local wp_out = {} + for i, cur_pos in pairs(wp_in) do + local action = nil + + local one_down = vector.new(0,-1,0) + local cur_pos_to_add = vector.add(cur_pos, one_down) + if door_open_pos and vector.equals (cur_pos, door_open_pos) then + mcl_log ("Door open match") + --action = {type = "door", action = "open"} + action = {} + action["type"] = "door" + action["action"] = "open" + action["target"] = cur_door_pos + cur_pos_to_add = vector.add(cur_pos, one_down) + elseif door_close_pos and vector.equals(cur_pos, door_close_pos) then + mcl_log ("Door close match") + --action = {type = "door", action = "closed"} + action = {} + action["type"] = "door" + action["action"] = "close" + action["target"] = cur_door_pos + cur_pos_to_add = vector.add(cur_pos, one_down) + elseif cur_door_pos and vector.equals(cur_pos, cur_door_pos) then + mcl_log("Current door pos") + cur_pos_to_add = vector.add(cur_pos, one_down) + action = {} + action["type"] = "door" + action["action"] = "open" + action["target"] = cur_door_pos + else + cur_pos_to_add = cur_pos + --mcl_log ("Pos doesn't match") + end + + wp_out[i] = {} + wp_out[i]["pos"] = cur_pos_to_add + wp_out[i]["failed_attempts"] = 0 + wp_out[i]["action"] = action + + --wp_out[i] = {"pos" = cur_pos, "failed_attempts" = 0, "action" = action} + --output_pos(cur_pos, i) + end + output_enriched(wp_out) + return wp_out +end + +local plane_adjacents = { + vector.new(1,0,0), + vector.new(-1,0,0), + vector.new(0,0,1), + vector.new(0,0,-1), +} + +-- This function is used to see if we can path. We could use to check a route, rather than making people move. +local function calculate_path_through_door (p, t, target) + -- target is the same as t, just 1 square difference. Maybe we don't need target + mcl_log("Plot route from mob: " .. minetest.pos_to_string(p) .. ", to target: " .. minetest.pos_to_string(t)) + + local enriched_path = nil + + local cur_door_pos = nil + local pos_closest_to_door = nil + local other_side_of_door = nil + + --Path to door first + local wp = minetest.find_path(p,t,150,1,4) + if not wp then + mcl_log("No direct path. Path through door") + + -- This could improve. There could be multiple doors. Check you can path from door to target first. + local cur_door_pos = minetest.find_node_near(target,16,{"group:door"}) + if cur_door_pos then + mcl_log("Found a door near: " .. minetest.pos_to_string(cur_door_pos)) + for _,v in pairs(plane_adjacents) do + pos_closest_to_door = vector.add(cur_door_pos,v) + + local n = minetest.get_node(pos_closest_to_door) + if n.name == "air" then + wp = minetest.find_path(p,pos_closest_to_door,150,1,4) + if wp then + mcl_log("Found a path to next to door".. minetest.pos_to_string(pos_closest_to_door)) + other_side_of_door = vector.add(cur_door_pos,-v) + mcl_log("Opposite is: ".. minetest.pos_to_string(other_side_of_door)) + + local wp_otherside_door_to_target = minetest.find_path(other_side_of_door,t,150,1,4) + if wp_otherside_door_to_target and #wp_otherside_door_to_target > 0 then + table.insert(wp, cur_door_pos) + append_paths (wp, wp_otherside_door_to_target) + enriched_path = generate_enriched_path(wp, pos_closest_to_door, other_side_of_door, cur_door_pos) + mcl_log("We have a path from outside door to target") + else + mcl_log("We cannot path from outside door to target") + end + break + else + mcl_log("This block next to door doesn't work.") + end + else + mcl_log("Block is not air, it is: ".. n.name) + end + + end + else + mcl_log("No door found") + end + else + mcl_log("We have a direct route") + end + + if wp and not enriched_path then + enriched_path = generate_enriched_path(wp) + end + return enriched_path +end + +local gopath_last = os.time() +function mob_class:gopath(target,callback_arrived) + if self.state == PATHFINDING then mcl_log("Already pathfinding, don't set another until done.") return end + + if self._pf_last_failed and (os.time() - self._pf_last_failed) < 30 then + mcl_log("We are not ready to path as last fail is less than threshold: " .. (os.time() - self._pf_last_failed)) + return + else + mcl_log("We are ready to pathfind, no previous fail or we are past threshold") + end + + --if os.time() - gopath_last < 5 then + -- mcl_log("Not ready to path yet") + -- return + --end + --gopath_last = os.time() + + self.order = nil + + local p = self.object:get_pos() + local t = vector.offset(target,0,1,0) + + local wp = calculate_path_through_door(p, t, target) + if not wp then + mcl_log("Could not calculate path") + self._pf_last_failed = os.time() + -- Cover for a flaw in pathfind where it chooses the wrong door and gets stuck. Take a break, allow others. + end + --output_table(wp) + + if wp and #wp > 0 then + self._target = t + self.callback_arrived = callback_arrived + local current_location = table.remove(wp,1) + if current_location and current_location["pos"] then + mcl_log("Removing first co-ord? " .. tostring(current_location["pos"])) + else + mcl_log("Nil pos") + end + self.current_target = current_location + self.waypoints = wp + self.state = PATHFINDING + return true + else + self.state = "walk" + self.waypoints = nil + self.current_target = nil + -- minetest.log("no path found") + end +end + +function mob_class:interact_with_door(action, target) + local p = self.object:get_pos() + --local t = minetest.get_timeofday() + --local dd = minetest.find_nodes_in_area(vector.offset(p,-1,-1,-1),vector.offset(p,1,1,1),{"group:door"}) + --for _,d in pairs(dd) do + if target then + mcl_log("Door target is: ".. minetest.pos_to_string(target)) + + local n = minetest.get_node(target) + if n.name:find("_b_") or n.name:find("_t_") then + mcl_log("Door") + local def = minetest.registered_nodes[n.name] + local closed = n.name:find("_b_1") or n.name:find("_t_1") + --if self.state == PATHFINDING then + if closed and action == "open" and def.on_rightclick then + mcl_log("Open door") + def.on_rightclick(target,n,self) + end + if not closed and action == "close" and def.on_rightclick then + mcl_log("Close door") + def.on_rightclick(target,n,self) + end + --else + else + mcl_log("Not door") + end + else + mcl_log("no target. cannot try and open or close door") + end + --end +end + +function mob_class:do_pathfind_action(action) + if action then + mcl_log("Action present") + local type = action["type"] + local action_val = action["action"] + local target = action["target"] + if target then + mcl_log("Target: ".. minetest.pos_to_string(target)) + end + if type and type == "door" then + mcl_log("Type is door") + self:interact_with_door(action_val, target) + end + end +end + +local gowp_etime = 0 + +function mob_class:check_gowp(dtime) + gowp_etime = gowp_etime + dtime + + -- 0.1 is optimal. + --less frequently = villager will get sent back after passing a point. + --more frequently = villager will fail points they shouldn't they just didn't get there yet + + --if gowp_etime < 0.05 then return end + --gowp_etime = 0 + local p = self.object:get_pos() + + -- no destination + if not p or not self._target then + mcl_log("p: ".. tostring(p)) + mcl_log("self._target: ".. tostring(self._target)) + return + end + + -- arrived at location, finish gowp + local distance_to_targ = vector.distance(p,self._target) + --mcl_log("Distance to targ: ".. tostring(distance_to_targ)) + if distance_to_targ < 2 then + mcl_log("Arrived at _target") + self.waypoints = nil + self._target = nil + self.current_target = nil + self.state = "stand" + self.order = "stand" + self.object:set_velocity({x = 0, y = 0, z = 0}) + self.object:set_acceleration({x = 0, y = 0, z = 0}) + if self.callback_arrived then return self.callback_arrived(self) end + return true + end + + -- More pathing to be done + local distance_to_current_target = 50 + if self.current_target and self.current_target["pos"] then + distance_to_current_target = vector.distance(p,self.current_target["pos"]) + end + + -- 0.6 is working but too sensitive. sends villager back too frequently. 0.7 is quite good, but not with heights + -- 0.8 is optimal for 0.025 frequency checks and also 1... Actually. 0.8 is winning + -- 0.9 and 1.0 is also good. Stick with unless door open or closing issues + if self.waypoints and #self.waypoints > 0 and ( not self.current_target or not self.current_target["pos"] or distance_to_current_target < 0.9 ) then + -- We have waypoints, and no current target, or we're at it. We need a new current_target. + self:do_pathfind_action (self.current_target["action"]) + + local failed_attempts = self.current_target["failed_attempts"] + mcl_log("There after " .. failed_attempts .. " failed attempts. current target:".. minetest.pos_to_string(self.current_target["pos"]) .. ". Distance: " .. distance_to_current_target) + + self.current_target = table.remove(self.waypoints, 1) + self:go_to_pos(self.current_target["pos"]) + return + elseif self.current_target and self.current_target["pos"] then + -- No waypoints left, but have current target. Potentially last waypoint to go to. + self.current_target["failed_attempts"] = self.current_target["failed_attempts"] + 1 + local failed_attempts = self.current_target["failed_attempts"] + if failed_attempts >= 50 then + mcl_log("Failed to reach position (" .. minetest.pos_to_string(self.current_target["pos"]) .. ") too many times. Abandon route. Times tried: " .. failed_attempts) + self.state = "stand" + self.current_target = nil + self.waypoints = nil + self._target = nil + self._pf_last_failed = os.time() + self.object:set_velocity({x = 0, y = 0, z = 0}) + self.object:set_acceleration({x = 0, y = 0, z = 0}) + return + end + + --mcl_log("Not at pos with failed attempts ".. failed_attempts ..": ".. minetest.pos_to_string(p) .. "self.current_target: ".. minetest.pos_to_string(self.current_target["pos"]) .. ". Distance: ".. distance_to_current_target) + self:go_to_pos(self.current_target["pos"]) + -- Do i just delete current_target, and return so we can find final path. + else + -- Not at target, no current waypoints or current_target. Through the door and should be able to path to target. + -- Is a little sensitive and could take 1 - 7 times. A 10 fail count might be a good exit condition. + + mcl_log("We don't have waypoints or a current target. Let's try to path to target") + local final_wp = minetest.find_path(p,self._target,150,1,4) + if final_wp then + mcl_log("We might be able to get to target here.") + -- self.waypoints = final_wp + self:go_to_pos(self._target) + else + -- Abandon route? + mcl_log("Cannot plot final route to target") + end + end + + -- I don't think we need the following anymore, but test first. + -- Maybe just need something to path to target if no waypoints left + if self.current_target and self.current_target["pos"] and (self.waypoints and #self.waypoints == 0) then + local updated_p = self.object:get_pos() + local distance_to_cur_targ = vector.distance(updated_p,self.current_target["pos"]) + + mcl_log("Distance to current target: ".. tostring(distance_to_cur_targ)) + mcl_log("Current p: ".. minetest.pos_to_string(updated_p)) + + -- 1.6 is good. is 1.9 better? It could fail less, but will it path to door when it isn't after door + if distance_to_cur_targ > 1.9 then + mcl_log("not close to current target: ".. minetest.pos_to_string(self.current_target["pos"])) + self:go_to_pos(self._current_target) + else + mcl_log("close to current target: ".. minetest.pos_to_string(self.current_target["pos"])) + self.current_target = nil + end + + return + end +end diff --git a/mods/ENTITIES/mcl_mobs/physics.lua b/mods/ENTITIES/mcl_mobs/physics.lua new file mode 100644 index 0000000000..af206c41c6 --- /dev/null +++ b/mods/ENTITIES/mcl_mobs/physics.lua @@ -0,0 +1,976 @@ +local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs +local mob_class = mcl_mobs.mob_class + +local ENTITY_CRAMMING_MAX = 24 +local CRAMMING_DAMAGE = 3 +local DEATH_DELAY = 0.5 +local DEFAULT_FALL_SPEED = -9.81*1.5 +local FLOP_HEIGHT = 6 +local FLOP_HOR_SPEED = 1.5 +local PATHFINDING = "gowp" +local mobs_debug = minetest.settings:get_bool("mobs_debug", false) +local mobs_drop_items = minetest.settings:get_bool("mobs_drop_items") ~= false +local mob_active_range = tonumber(minetest.settings:get("mcl_mob_active_range")) or 48 +local show_health = false + +-- get node but use fallback for nil or unknown +local node_ok = function(pos, fallback) + + fallback = fallback or mcl_mobs.fallback_node + + local node = minetest.get_node_or_nil(pos) + + if node and minetest.registered_nodes[node.name] then + return node + end + + return minetest.registered_nodes[fallback] +end + +-- check if within physical map limits (-30911 to 30927) +local function within_limits(pos, radius) + local wmin, wmax = -30912, 30928 + if mcl_vars then + if mcl_vars.mapgen_edge_min and mcl_vars.mapgen_edge_max then + wmin, wmax = mcl_vars.mapgen_edge_min, mcl_vars.mapgen_edge_max + end + end + if radius then + wmin = wmin - radius + wmax = wmax + radius + end + if not pos then return true end + for _,v in pairs(pos) do + if v < wmin or v > wmax then return false end + end + return true +end + +function mob_class:player_in_active_range() + for _,p in pairs(minetest.get_connected_players()) do + if vector.distance(self.object:get_pos(),p:get_pos()) <= mob_active_range then return true end + -- slightly larger than the mc 32 since mobs spawn on that circle and easily stand still immediately right after spawning. + end +end + +-- Return true if object is in view_range +function mob_class:object_in_range(object) + if not object then + return false + end + local factor + -- Apply view range reduction for special player armor + if object:is_player() then + local factors = mcl_armor.player_view_range_factors[object] + factor = factors and factors[self.name] + end + -- Distance check + local dist + if factor and factor == 0 then + return false + elseif factor then + dist = self.view_range * factor + else + dist = self.view_range + end + + local p1, p2 = self.object:get_pos(), object:get_pos() + return p1 and p2 and (vector.distance(p1, p2) <= dist) +end + +function mob_class:item_drop(cooked, looting_level) + + if not mobs_drop_items then return end + + looting_level = looting_level or 0 + + if (self.child and self.type ~= "monster") then + return + end + + local obj, item, num + local pos = self.object:get_pos() + + self.drops = self.drops or {} + + for n = 1, #self.drops do + local dropdef = self.drops[n] + local chance = 1 / dropdef.chance + local looting_type = dropdef.looting + + if looting_level > 0 then + local chance_function = dropdef.looting_chance_function + if chance_function then + chance = chance_function(looting_level) + elseif looting_type == "rare" then + chance = chance + (dropdef.looting_factor or 0.01) * looting_level + end + end + + local num = 0 + local do_common_looting = (looting_level > 0 and looting_type == "common") + if math.random() < chance then + num = math.random(dropdef.min or 1, dropdef.max or 1) + elseif not dropdef.looting_ignore_chance then + do_common_looting = false + end + + if do_common_looting then + num = num + math.floor(math.random(0, looting_level) + 0.5) + end + + if num > 0 then + item = dropdef.name + + if cooked then + + local output = minetest.get_craft_result({ + method = "cooking", width = 1, items = {item}}) + + if output and output.item and not output.item:is_empty() then + item = output.item:get_name() + end + end + + for x = 1, num do + obj = minetest.add_item(pos, ItemStack(item .. " " .. 1)) + end + + if obj and obj:get_luaentity() then + + obj:set_velocity({ + x = math.random(-10, 10) / 9, + y = 6, + z = math.random(-10, 10) / 9, + }) + elseif obj then + obj:remove() -- item does not exist + end + end + end + + self.drops = {} +end + +-- collision function borrowed amended from jordan4ibanez open_ai mod +function mob_class:collision() + local pos = self.object:get_pos() + if not pos then return {0,0} end + local vel = self.object:get_velocity() + local x = 0 + local z = 0 + local width = -self.collisionbox[1] + self.collisionbox[4] + 0.5 + for _,object in pairs(minetest.get_objects_inside_radius(pos, width)) do + + local ent = object:get_luaentity() + if object:is_player() or (ent and ent.is_mob and object ~= self.object) then + + if object:is_player() and mcl_burning.is_burning(self.object) then + mcl_burning.set_on_fire(object, 4) + end + + local pos2 = object:get_pos() + local vec = {x = pos.x - pos2.x, z = pos.z - pos2.z} + local force = (width + 0.5) - vector.distance( + {x = pos.x, y = 0, z = pos.z}, + {x = pos2.x, y = 0, z = pos2.z}) + + x = x + (vec.x * force) + z = z + (vec.z * force) + end + end + + return({x,z}) +end + +-- move mob in facing direction +function mob_class:set_velocity(v) + local c_x, c_y = 0, 0 + + -- can mob be pushed, if so calculate direction + if self.pushable then + c_x, c_y = unpack(self:collision()) + end + + -- halt mob if it has been ordered to stay + if self.order == "stand" or self.order == "sit" then + self.acc=vector.new(0,0,0) + return + end + + local yaw = (self.object:get_yaw() or 0) + self.rotate + local vv = self.object:get_velocity() + if vv then + self.acc={ + x = ((math.sin(yaw) * -v) + c_x)*.27, + y = 0, + z = ((math.cos(yaw) * v) + c_y)*.27, + } + end +end + +-- calculate mob velocity +function mob_class:get_velocity() + local v = self.object:get_velocity() + if v then + return (v.x * v.x + v.z * v.z) ^ 0.5 + end + + return 0 +end + +function mob_class:update_roll() + local is_Fleckenstein = self.nametag == "Fleckenstein" + local was_Fleckenstein = false + + local rot = self.object:get_rotation() + rot.z = is_Fleckenstein and pi or 0 + self.object:set_rotation(rot) + + local cbox = table.copy(self.collisionbox) + local acbox = self.object:get_properties().collisionbox + + if math.abs(cbox[2] - acbox[2]) > 0.1 then + was_Fleckenstein = true + end + + if is_Fleckenstein ~= was_Fleckenstein then + local pos = self.object:get_pos() + pos.y = pos.y + (acbox[2] + acbox[5]) + self.object:set_pos(pos) + end + + if is_Fleckenstein then + cbox[2], cbox[5] = -cbox[5], -cbox[2] + self.object:set_properties({collisionbox = cbox}) + -- This leads to child mobs having the wrong collisionbox + -- and seeing as it seems to be nothing but an easter egg + -- i've put it inside the if. Which just makes it be upside + -- down lol. + end + +end + +local function shortest_term_of_yaw_rotation(self, rot_origin, rot_target, nums) + + if not rot_origin or not rot_target then + return + end + + rot_origin = math.deg(rot_origin) + rot_target = math.deg(rot_target) + + if rot_origin < rot_target then + if math.abs(rot_origin-rot_target)<180 then + if nums then + return rot_target-rot_origin + else + return 1 + end + else + if nums then + return -(rot_origin-(rot_target-360)) + else + return -1 + end + end + else + if math.abs(rot_origin-rot_target)<180 then + if nums then + return rot_target-rot_origin + else + return -1 + end + else + if nums then + return (rot_target-(rot_origin-360)) + else + return 1 + end + end + end + +end + + + +-- set and return valid yaw +function mob_class:set_yaw(yaw, delay, dtime) + if self.noyaw then return end + + if self.state ~= PATHFINDING then + self._turn_to = yaw + end + + --mcl_log("Yaw is: \t\t" .. tostring(math.deg(yaw))) + --mcl_log("self.object:get_yaw() is: \t" .. tostring(math.deg(self.object:get_yaw()))) + + --clamp our yaw to a 360 range + if math.deg(self.object:get_yaw()) > 360 then + self.object:set_yaw(math.rad(0)) + elseif math.deg(self.object:get_yaw()) < 0 then + self.object:set_yaw(math.rad(360)) + end + + if math.deg(yaw) > 360 then + yaw=yaw%360 + elseif math.deg(yaw) < 0 then + yaw=((360*5)-yaw)%360 + end + + --calculate the shortest way to turn to find our target + local target_shortest_path = shortest_term_of_yaw_rotation(self, self.object:get_yaw(), yaw, false) + local target_shortest_path_nums = shortest_term_of_yaw_rotation(self, self.object:get_yaw(), yaw, true) + + --turn in the shortest path possible toward our target. if we are attacking, don't dance. + if (math.abs(target_shortest_path) > 50 and not self._kb_turn) and (self.attack and self.attack:get_pos() or self.following and self.following:get_pos()) then + if self.following then + target_shortest_path = shortest_term_of_yaw_rotation(self, self.object:get_yaw(), minetest.dir_to_yaw(vector.direction(self.object:get_pos(), self.following:get_pos())), true) + target_shortest_path_nums = shortest_term_of_yaw_rotation(self, self.object:get_yaw(), minetest.dir_to_yaw(vector.direction(self.object:get_pos(), self.following:get_pos())), false) + else + target_shortest_path = shortest_term_of_yaw_rotation(self, self.object:get_yaw(), minetest.dir_to_yaw(vector.direction(self.object:get_pos(), self.attack:get_pos())), true) + target_shortest_path_nums = shortest_term_of_yaw_rotation(self, self.object:get_yaw(), minetest.dir_to_yaw(vector.direction(self.object:get_pos(), self.attack:get_pos())), false) + end + end + + local ddtime = 0.05 --set_tick_rate + + if dtime then + ddtime = dtime + end + + if math.abs(target_shortest_path_nums) > 5 then + self.object:set_yaw(self.object:get_yaw()+(target_shortest_path*(3.6*ddtime))) + 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 + + delay = delay or 0 + + yaw = self.object:get_yaw() + + if delay == 0 then + if self.shaking and dtime then + yaw = yaw + (math.random() * 2 - 1) * 5 * dtime + end + --self:update_roll() + return yaw + end + + self.target_yaw = yaw + self.delay = delay + + return self.target_yaw +end + +-- global function to set mob yaw +function mcl_mobs.yaw(self, yaw, delay, dtime) + return mob_class.set_yaw(self, yaw, delay, dtime) +end + +-- are we flying in what we are suppose to? (taikedz) +function mob_class:flight_check() + + local nod = self.standing_in + local def = minetest.registered_nodes[nod] + + if not def then return false end -- nil check + + local fly_in + if type(self.fly_in) == "string" then + fly_in = { self.fly_in } + elseif type(self.fly_in) == "table" then + fly_in = self.fly_in + else + return false + end + + for _,checknode in pairs(fly_in) do + if nod == checknode or nod == "ignore" then + return true + end + end + + return false +end + +-- check if mob is dead or only hurt +function mob_class:check_for_death(cause, cmi_cause) + + if self.state == "die" then + return true + end + + -- has health actually changed? + if self.health == self.old_health and self.health > 0 then + return false + end + + local damaged = self.health < self.old_health + self.old_health = self.health + + -- still got some health? + if self.health > 0 then + + -- make sure health isn't higher than max + if self.health > self.hp_max then + self.health = self.hp_max + end + + -- play damage sound if health was reduced and make mob flash red. + if damaged then + self:add_texture_mod("^[colorize:#d42222:175") + minetest.after(1, function(self) + if self and self.object then + self:remove_texture_mod("^[colorize:#d42222:175") + end + end, self) + self:mob_sound("damage") + end + + -- backup nametag so we can show health stats + if not self.nametag2 then + self.nametag2 = self.nametag or "" + end + + if show_health + and (cmi_cause and cmi_cause.type == "punch") then + + self.htimer = 2 + self.nametag = "♥ " .. self.health .. " / " .. self.hp_max + + self:update_tag() + end + + return false + end + + self:mob_sound("death") + + local function death_handle(self) + -- dropped cooked item if mob died in fire or lava + if cause == "lava" or cause == "fire" then + self:item_drop(true, 0) + else + local wielditem = ItemStack() + if cause == "hit" then + local puncher = cmi_cause.puncher + if puncher then + wielditem = puncher:get_wielded_item() + end + end + local cooked = mcl_burning.is_burning(self.object) or mcl_enchanting.has_enchantment(wielditem, "fire_aspect") + local looting = mcl_enchanting.get_enchantment(wielditem, "looting") + self:item_drop(cooked, looting) + + if ((not self.child) or self.type ~= "animal") and (minetest.get_us_time() - self.xp_timestamp <= math.huge) then + mcl_experience.throw_xp(self.object:get_pos(), math.random(self.xp_min, self.xp_max)) + end + end + end + + -- execute custom death function + if self.on_die then + + local pos = self.object:get_pos() + local on_die_exit = self.on_die(self, pos, cmi_cause) + if on_die_exit ~= true then + death_handle(self) + end + + if on_die_exit == true then + self.state = "die" + mcl_burning.extinguish(self.object) + self.object:remove() + return true + end + end + + local collisionbox + if self.collisionbox then + collisionbox = table.copy(self.collisionbox) + end + + self.state = "die" + self.attack = nil + self.v_start = false + self.fall_speed = DEFAULT_FALL_SPEED + self.timer = 0 + self.blinktimer = 0 + self:remove_texture_mod("^[colorize:#FF000040") + self:remove_texture_mod("^[brighten") + self.passive = true + + self.object:set_properties({ + pointable = false, + collide_with_objects = false, + }) + + self:set_velocity(0) + local acc = self.object:get_acceleration() + acc.x, acc.y, acc.z = 0, DEFAULT_FALL_SPEED, 0 + self.object:set_acceleration(acc) + + local length + -- default death function and die animation (if defined) + if self.instant_death then + length = 0 + elseif self.animation + and self.animation.die_start + and self.animation.die_end then + + local frames = self.animation.die_end - self.animation.die_start + local speed = self.animation.die_speed or 15 + length = math.max(frames / speed, 0) + DEATH_DELAY + self:set_animation( "die") + else + length = 1 + DEATH_DELAY + self:set_animation( "stand", true) + end + + + -- Remove body after a few seconds and drop stuff + local kill = function(self) + if not self.object:get_luaentity() then + return + end + + death_handle(self) + local dpos = self.object:get_pos() + local cbox = self.collisionbox + local yaw = self.object:get_rotation().y + mcl_burning.extinguish(self.object) + self.object:remove() + mcl_mobs.death_effect(dpos, yaw, cbox, not self.instant_death) + end + if length <= 0 then + kill(self) + else + minetest.after(length, kill, self) + end + + return true +end + +-- Deal light damage to mob, returns true if mob died +function mob_class:deal_light_damage(pos, damage) + if not ((mcl_weather.rain.raining or mcl_weather.state == "snow") and mcl_weather.is_outdoor(pos)) then + self.health = self.health - damage + + mcl_mobs.effect(pos, 5, "mcl_particles_smoke.png") + + if self:check_for_death("light", {type = "light"}) then + return true + end + end +end + +-- environmental damage (water, lava, fire, light etc.) +function mob_class:do_env_damage() + -- feed/tame text timer (so mob 'full' messages dont spam chat) + if self.htimer > 0 then + self.htimer = self.htimer - 1 + end + + -- reset nametag after showing health stats + if self.htimer < 1 and self.nametag2 then + + self.nametag = self.nametag2 + self.nametag2 = nil + + self:update_tag() + end + + local pos = self.object:get_pos() + if not pos then return end + + self.time_of_day = minetest.get_timeofday() + + -- remove mob if beyond map limits + if not within_limits(pos, 0) then + mcl_burning.extinguish(self.object) + self.object:remove() + return true + end + + local sunlight = minetest.get_natural_light(pos, self.time_of_day) + + -- bright light harms mob + if self.light_damage ~= 0 and (sunlight or 0) > 12 then + if self:deal_light_damage(pos, self.light_damage) then + return true + end + end + local _, dim = mcl_worlds.y_to_layer(pos.y) + if (self.sunlight_damage ~= 0 or self.ignited_by_sunlight) and (sunlight or 0) >= minetest.LIGHT_MAX and dim == "overworld" then + if self.armor_list and not self.armor_list.helmet or not self.armor_list or self.armor_list and self.armor_list.helmet and self.armor_list.helmet == "" then + if self.ignited_by_sunlight then + mcl_burning.set_on_fire(self.object, 10) + else + self:deal_light_damage(pos, self.sunlight_damage) + return true + end + end + end + + local y_level = self.collisionbox[2] + + if self.child then + y_level = self.collisionbox[2] * 0.5 + end + + -- what is mob standing in? + pos.y = pos.y + y_level + 0.25 -- foot level + local pos2 = {x=pos.x, y=pos.y-1, z=pos.z} + self.standing_in = node_ok(pos, "air").name + self.standing_on = node_ok(pos2, "air").name + + -- 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}) + end + + local nodef = minetest.registered_nodes[self.standing_in] + + -- rain + if self.rain_damage > 0 then + if mcl_weather.rain.raining and mcl_weather.is_outdoor(pos) then + + self.health = self.health - self.rain_damage + + if self:check_for_death("rain", {type = "environment", + pos = pos, node = self.standing_in}) then + return true + end + end + end + + pos.y = pos.y + 1 -- for particle effect position + + -- water damage + if self.water_damage > 0 + and nodef.groups.water then + + if self.water_damage ~= 0 then + + self.health = self.health - self.water_damage + + mcl_mobs.effect(pos, 5, "mcl_particles_smoke.png", nil, nil, 1, nil) + + if self:check_for_death("water", {type = "environment", + pos = pos, node = self.standing_in}) then + return true + end + end + + -- lava damage + elseif self.lava_damage > 0 + and (nodef.groups.lava) then + + if self.lava_damage ~= 0 then + + self.health = self.health - self.lava_damage + + mcl_mobs.effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil) + mcl_burning.set_on_fire(self.object, 10) + + if self:check_for_death("lava", {type = "environment", + pos = pos, node = self.standing_in}) then + return true + end + end + + -- fire damage + elseif self.fire_damage > 0 + and (nodef.groups.fire) then + + if self.fire_damage ~= 0 then + + self.health = self.health - self.fire_damage + + mcl_mobs.effect(pos, 5, "fire_basic_flame.png", nil, nil, 1, nil) + mcl_burning.set_on_fire(self.object, 5) + + if self:check_for_death("fire", {type = "environment", + pos = pos, node = self.standing_in}) then + return true + end + end + + -- damage_per_second node check + elseif nodef.damage_per_second ~= 0 and not nodef.groups.lava and not nodef.groups.fire then + + self.health = self.health - nodef.damage_per_second + + mcl_mobs.effect(pos, 5, "mcl_particles_smoke.png") + + if self:check_for_death("dps", {type = "environment", + pos = pos, node = self.standing_in}) then + return true + end + end + + -- Drowning damage + if self.breath_max ~= -1 then + local drowning = false + if self.breathes_in_water then + if minetest.get_item_group(self.standing_in, "water") == 0 then + drowning = true + end + elseif nodef.drowning > 0 then + drowning = true + end + if drowning then + + self.breath = math.max(0, self.breath - 1) + + mcl_mobs.effect(pos, 2, "bubble.png", nil, nil, 1, nil) + if self.breath <= 0 then + local dmg + if nodef.drowning > 0 then + dmg = nodef.drowning + else + dmg = 4 + end + self:damage_effect(dmg) + self.health = self.health - dmg + end + if self:check_for_death("drowning", {type = "environment", + pos = pos, node = self.standing_in}) then + return true + end + else + self.breath = math.min(self.breath_max, self.breath + 1) + end + end + + --- suffocation inside solid node + -- FIXME: Redundant with mcl_playerplus + if (self.suffocation == true) + and (nodef.walkable == nil or nodef.walkable == true) + and (nodef.collision_box == nil or nodef.collision_box.type == "regular") + and (nodef.node_box == nil or nodef.node_box.type == "regular") + and (nodef.groups.disable_suffocation ~= 1) + and (nodef.groups.opaque == 1) then + + -- Short grace period before starting to take suffocation damage. + -- This is different from players, who take damage instantly. + -- This has been done because mobs might briefly be inside solid nodes + -- when e.g. climbing up stairs. + -- This is a bit hacky because it assumes that do_env_damage + -- is called roughly every second only. + self.suffocation_timer = self.suffocation_timer + 1 + if self.suffocation_timer >= 3 then + -- 2 damage per second + -- TODO: Deal this damage once every 1/2 second + self.health = self.health - 2 + + if self:check_for_death("suffocation", {type = "environment", + pos = pos, node = self.standing_in}) then + return true + end + end + else + self.suffocation_timer = 0 + end + + return self:check_for_death("", {type = "unknown"}) +end + +function mob_class:damage_mob(reason,damage) + if not self.health then return end + damage = math.floor(damage) + if damage > 0 then + self.health = self.health - damage + + mcl_mobs.effect(self.object:get_pos(), 5, "mcl_particles_smoke.png", 1, 2, 2, nil) + + if self:check_for_death(reason, {type = reason}) then + return true + end + end +end + +function mob_class:check_entity_cramming() + local p = self.object:get_pos() + if not p then return end + local oo = minetest.get_objects_inside_radius(p,1) + local mobs = {} + for _,o in pairs(oo) do + local l = o:get_luaentity() + if l and l.is_mob and l.health > 0 then table.insert(mobs,l) end + end + local clear = #mobs < ENTITY_CRAMMING_MAX + local ncram = {} + for _,l in pairs(mobs) do + if l then + if clear then + l.cram = nil + elseif l.cram == nil and not self.child then + table.insert(ncram,l) + elseif l.cram then + l:damage_mob("cramming",CRAMMING_DAMAGE) + end + end + end + for i,l in pairs(ncram) do + if i > ENTITY_CRAMMING_MAX then + l.cram = true + else + l.cram = nil + end + end +end + +-- falling and fall damage +-- returns true if mob died +function mob_class:falling(pos) + + if self.fly and self.state ~= "die" then + return + end + + if not self.fall_speed then self.fall_speed = DEFAULT_FALL_SPEED end + + if mcl_portals ~= nil then + if mcl_portals.nether_portal_cooloff(self.object) then + return false -- mob has teleported through Nether portal - it's 99% not falling + end + end + + -- floating in water (or falling) + local v = self.object:get_velocity() + + if v.y > 0 then + + -- apply gravity when moving up + self.object:set_acceleration({ + x = 0, + y = DEFAULT_FALL_SPEED, + z = 0 + }) + + elseif v.y <= 0 and v.y > self.fall_speed then + + -- fall downwards at set speed + self.object:set_acceleration({ + x = 0, + y = self.fall_speed, + z = 0 + }) + else + -- stop accelerating once max fall speed hit + self.object:set_acceleration({x = 0, y = 0, z = 0}) + end + + if minetest.registered_nodes[node_ok(pos).name].groups.lava then + + if self.floats_on_lava == 1 then + + self.object:set_acceleration({ + x = 0, + y = -self.fall_speed / (math.max(1, v.y) ^ 2), + z = 0 + }) + end + end + + -- in water then float up + if minetest.registered_nodes[node_ok(pos).name].groups.water then + + if self.floats == 1 then + + self.object:set_acceleration({ + x = 0, + y = -self.fall_speed / (math.max(1, v.y) ^ 2), + z = 0 + }) + end + else + + -- fall damage onto solid ground + if self.fall_damage == 1 + and self.object:get_velocity().y == 0 then + local n = node_ok(vector.offset(pos,0,-1,0)).name + local d = (self.old_y or 0) - self.object:get_pos().y + + if d > 5 and n ~= "air" and n ~= "ignore" then + local add = minetest.get_item_group(self.standing_on, "fall_damage_add_percent") + local damage = d - 5 + if add ~= 0 then + damage = damage + damage * (add/100) + end + self:damage_mob("fall",damage) + end + + self.old_y = self.object:get_pos().y + end + end +end + +function mob_class:check_water_flow() + -- Add water flowing for mobs from mcl_item_entity + local p, node, nn, def + p = self.object:get_pos() + node = minetest.get_node_or_nil(p) + if node then + nn = node.name + def = minetest.registered_nodes[nn] + end + + -- Move item around on flowing liquids + if def and def.liquidtype == "flowing" then + + --[[ Get flowing direction (function call from flowlib), if there's a liquid. + NOTE: According to Qwertymine, flowlib.quickflow is only reliable for liquids with a flowing distance of 7. + Luckily, this is exactly what we need if we only care about water, which has this flowing distance. ]] + local vec = flowlib.quick_flow(p, node) + -- Just to make sure we don't manipulate the speed for no reason + if vec.x ~= 0 or vec.y ~= 0 or vec.z ~= 0 then + -- Minecraft Wiki: Flowing speed is "about 1.39 meters per second" + local f = 1.39 + -- Set new item moving speed into the direciton of the liquid + local newv = vector.multiply(vec, f) + self.object:set_acceleration({x = 0, y = 0, z = 0}) + self.object:set_velocity({x = newv.x, y = -0.22, z = newv.z}) + + self.physical_state = true + self._flowing = true + self.object:set_properties({ + physical = true + }) + return + end + elseif self._flowing == true then + -- Disable flowing physics if not on/in flowing liquid + self._flowing = false + return + end +end + +function mob_class:check_dying() + if ((self.state and self.state=="die") or self:check_for_death()) and not self.animation.die_end then + local rot = self.object:get_rotation() + rot.z = ((math.pi/2-rot.z)*.2)+rot.z + self.object:set_rotation(rot) + return true + end +end + +function mob_class:check_suspend() + if not self:player_in_active_range() then + local pos = self.object:get_pos() + local node_under = node_ok(vector.offset(pos,0,-1,0)).name + local acc = self.object:get_acceleration() + self:set_animation( "stand", true) + if acc.y > 0 or node_under ~= "air" then + self.object:set_acceleration(vector.new(0,0,0)) + self.object:set_velocity(vector.new(0,0,0)) + end + if acc.y == 0 and node_under == "air" then + self:falling(pos) + end + return true + end +end diff --git a/mods/ENTITIES/mcl_mobs/spawning.lua b/mods/ENTITIES/mcl_mobs/spawning.lua index d7e3deb2b5..01ef2a823d 100644 --- a/mods/ENTITIES/mcl_mobs/spawning.lua +++ b/mods/ENTITIES/mcl_mobs/spawning.lua @@ -1,5 +1,7 @@ --lua locals -local minetest,vector,math,table = minetest,vector,math,table +local math, vector, minetest, mcl_mobs = math, vector, minetest, mcl_mobs +local mob_class = mcl_mobs.mob_class + local get_node = minetest.get_node local get_item_group = minetest.get_item_group local get_node_light = minetest.get_node_light @@ -29,6 +31,7 @@ local dbg_spawn_succ = 0 local dbg_spawn_counts = {} -- range for mob count local aoc_range = 136 +local remove_far = true local mob_cap = { monster = tonumber(minetest.settings:get("mcl_mob_cap_monster")) or 70, @@ -399,11 +402,9 @@ local two_pi = 2 * math.pi local function get_next_mob_spawn_pos(pos) local distance = math_random(25, 32) local angle = math_random() * two_pi - return { - x = math_round(pos.x + distance * math_cos(angle)), - y = pos.y, - z = math_round(pos.z + distance * math_sin(angle)) - } + local xoff = math_round(distance * math_cos(angle)) + local yoff = math_round(distance * math_sin(angle)) + return vector.offset(pos, xoff, 0, yoff) end local function decypher_limits(posy) @@ -556,7 +557,7 @@ local S = minetest.get_translator("mcl_mobs") minetest.register_chatcommand("spawn_mob",{ privs = { debug = true }, - description=S("spawn_mob is a chatcommand that allows you to type in the name of a mob without 'typing mobs_mc:' all the time like so; 'spawn_mob spider'. however, there is more you can do with this special command, currently you can edit any number, boolian, and string variable you choose with this format: spawn_mob 'any_mob:var:'. any_mob being your mob of choice, mobs_variable being the variable, and variable value being the value of the chosen variable. and example of this format: \n spawn_mob skeleton:var:\n this would spawn a skeleton that wouldn't attack you. REMEMBER-THIS> when changing a number value always prefix it with 'NUM', example: \n spawn_mob skeleton:var:\n this setting the skelly's jump height to 10. if you want to make multiple changes to a mob, you can, example: \n spawn_mob skeleton:var::var::var::var:\n etc."), + description=S("spawn_mob is a chatcommand that allows you to type in the name of a mob without 'typing mobs_mc:' all the time like so; 'spawn_mob spider'. however, there is more you can do with this special command, currently you can edit any number, boolean, and string variable you choose with this format: spawn_mob 'any_mob:var:'. any_mob being your mob of choice, mobs_variable being the variable, and variable value being the value of the chosen variable. and example of this format: \n spawn_mob skeleton:var:\n this would spawn a skeleton that wouldn't attack you. REMEMBER-THIS> when changing a number value always prefix it with 'NUM', example: \n spawn_mob skeleton:var:\n this setting the skelly's jump height to 10. if you want to make multiple changes to a mob, you can, example: \n spawn_mob skeleton:var::var::var::var:\n etc."), func = function(n,param) local pos = minetest.get_player_by_name(n):get_pos() @@ -576,15 +577,14 @@ minetest.register_chatcommand("spawn_mob",{ local mob = mcl_mobs.spawn(pos,mobname) - for c=1, #modifiers do - modifs = modifiers[c] + if mob then + for c=1, #modifiers do + modifs = modifiers[c] - local mod1 = string.find(modifs, ":") - local mod_start = string.find(modifs, "<") - local mod_vals = string.find(modifs, "=") - local mod_end = string.find(modifs, ">") - local mod_end = string.find(modifs, ">") - if mob then + local mod1 = string.find(modifs, ":") + local mod_start = string.find(modifs, "<") + local mod_vals = string.find(modifs, "=") + local mod_end = string.find(modifs, ">") local mob_entity = mob:get_luaentity() if string.sub(modifs, mod1+1, mod1+3) == "var" then if mod1 and mod_start and mod_vals and mod_end then @@ -615,14 +615,12 @@ minetest.register_chatcommand("spawn_mob",{ minetest.log("warning", n.." couldn't modify "..mobname.." at "..minetest.pos_to_string(pos).. ", missing modification type") end end - end - - if mob then - return true, mobname.." spawned at "..minetest.pos_to_string(pos), minetest.log("action", n.." spawned "..mobname.." at "..minetest.pos_to_string(pos)) + return true, mobname.." spawned at "..minetest.pos_to_string(pos) + else + return false, "Couldn't spawn "..mobname end - return false, "Couldn't spawn "..mobname end }) @@ -661,34 +659,36 @@ if mobs_spawn then end local mob_def = mob_library_worker_table[mob_index] --minetest.log(mob_def.name.." "..step_chance.. " "..mob_chance) - local spawn_in_group = minetest.registered_entities[mob_def.name].spawn_in_group or 4 - local spawn_in_group_min = minetest.registered_entities[mob_def.name].spawn_in_group_min or 1 - local mob_type = minetest.registered_entities[mob_def.name].type - if spawn_check(spawning_position,mob_def) then - if mob_def.type_of_spawning == "water" then - spawning_position = get_water_spawn(spawning_position) - if not spawning_position then - minetest.log("warning","[mcl_mobs] no water spawn for mob "..mob_def.name.." found at "..minetest.pos_to_string(vector.round(pos))) + if mob_def and mob_def.name and minetest.registered_entities[mob_def.name] then + local spawn_in_group = minetest.registered_entities[mob_def.name].spawn_in_group or 4 + local spawn_in_group_min = minetest.registered_entities[mob_def.name].spawn_in_group_min or 1 + local mob_type = minetest.registered_entities[mob_def.name].type + if spawn_check(spawning_position,mob_def) then + if mob_def.type_of_spawning == "water" then + spawning_position = get_water_spawn(spawning_position) + if not spawning_position then + minetest.log("warning","[mcl_mobs] no water spawn for mob "..mob_def.name.." found at "..minetest.pos_to_string(vector.round(pos))) + return + end + end + if minetest.registered_entities[mob_def.name].can_spawn and not minetest.registered_entities[mob_def.name].can_spawn(spawning_position) then + minetest.log("warning","[mcl_mobs] mob "..mob_def.name.." refused to spawn at "..minetest.pos_to_string(vector.round(spawning_position))) return end - end - if minetest.registered_entities[mob_def.name].can_spawn and not minetest.registered_entities[mob_def.name].can_spawn(spawning_position) then - minetest.log("warning","[mcl_mobs] mob "..mob_def.name.." refused to spawn at "..minetest.pos_to_string(vector.round(spawning_position))) - return - end - --everything is correct, spawn mob - local object - if spawn_in_group and ( mob_type ~= "monster" or math.random(5) == 1 ) then - if logging then - minetest.log("action", "[mcl_mobs] A group of mob " .. mob_def.name .. " spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at " .. minetest.pos_to_string(spawning_position, 1)) - end - object = spawn_group(spawning_position,mob_def,{minetest.get_node(vector.offset(spawning_position,0,-1,0)).name},spawn_in_group,spawn_in_group_min) + --everything is correct, spawn mob + local object + if spawn_in_group and ( mob_type ~= "monster" or math.random(5) == 1 ) then + if logging then + minetest.log("action", "[mcl_mobs] A group of mob " .. mob_def.name .. " spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at " .. minetest.pos_to_string(spawning_position, 1)) + end + object = spawn_group(spawning_position,mob_def,{minetest.get_node(vector.offset(spawning_position,0,-1,0)).name},spawn_in_group,spawn_in_group_min) - else - if logging then - minetest.log("action", "[mcl_mobs] Mob " .. mob_def.name .. " spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at ".. minetest.pos_to_string(spawning_position, 1)) + else + if logging then + minetest.log("action", "[mcl_mobs] Mob " .. mob_def.name .. " spawns on " ..minetest.get_node(vector.offset(spawning_position,0,-1,0)).name .." at ".. minetest.pos_to_string(spawning_position, 1)) + end + object = mcl_mobs.spawn(spawning_position, mob_def.name) end - object = mcl_mobs.spawn(spawning_position, mob_def.name) end end current_summary_chance = current_summary_chance - mob_chance @@ -722,6 +722,30 @@ if mobs_spawn then end) end +function mob_class:check_despawn(pos) + -- Despawning: when lifetimer expires, remove mob + if remove_far + and self.can_despawn == true + and ((not self.nametag) or (self.nametag == "")) + and self.state ~= "attack" + and self.following == nil then + if self.despawn_immediately or self.lifetimer <= 0 then + if logging then + minetest.log("action", "[mcl_mobs] Mob "..self.name.." despawns at "..minetest.pos_to_string(pos, 1) .. " lifetimer ran out") + end + mcl_burning.extinguish(self.object) + self.object:remove() + return true + elseif self.lifetimer <= 10 then + if math.random(10) < 4 then + self.despawn_immediately = true + else + self.lifetimer = 20 + end + end + end +end + minetest.register_chatcommand("mobstats",{ privs = { debug = true }, func = function(n,param) diff --git a/mods/ENTITIES/mcl_paintings/locale/mcl_paintings.ja.tr b/mods/ENTITIES/mcl_paintings/locale/mcl_paintings.ja.tr new file mode 100644 index 0000000000..6b35b9edbe --- /dev/null +++ b/mods/ENTITIES/mcl_paintings/locale/mcl_paintings.ja.tr @@ -0,0 +1,2 @@ +# textdomain:mcl_paintings +Painting=絵画 diff --git a/mods/ENTITIES/mobs_mc/README.md b/mods/ENTITIES/mobs_mc/README.md index 4ee435d726..881f566194 100644 --- a/mods/ENTITIES/mobs_mc/README.md +++ b/mods/ENTITIES/mobs_mc/README.md @@ -58,6 +58,7 @@ This mod adds mobs which closely resemble the mobs from the game Minecraft, vers ### Peaceful mobs +* Axolotl * Chicken * Cow * Pig diff --git a/mods/ENTITIES/mobs_mc/axolotl.lua b/mods/ENTITIES/mobs_mc/axolotl.lua new file mode 100644 index 0000000000..124f6bd3a1 --- /dev/null +++ b/mods/ENTITIES/mobs_mc/axolotl.lua @@ -0,0 +1,181 @@ +local S = minetest.get_translator(minetest.get_current_modname()) + +local axolotl = { + type = "animal", + spawn_class = "water", + can_despawn = true, + passive = false, + hp_min = 14, + hp_max = 14, + xp_min = 1, + xp_max = 7, + + head_swivel = "head.control", + bone_eye_height = -1, + head_eye_height = -0.5, + horrizonatal_head_height = 0, + curiosity = 10, + head_yaw="z", + + armor = 100, + rotate = 180, + spawn_in_group_min = 1, + spawn_in_group = 4, + tilt_swim = true, + collisionbox = {-0.5, 0.0, -0.5, 0.5, 0.8, 0.5}, + visual = "mesh", + mesh = "mobs_mc_axolotl.b3d", + textures = { + {"mobs_mc_axolotl_brown.png"}, + {"mobs_mc_axolotl_yellow.png"}, + {"mobs_mc_axolotl_green.png"}, + {"mobs_mc_axolotl_pink.png"}, + {"mobs_mc_axolotl_black.png"}, + {"mobs_mc_axolotl_purple.png"}, + {"mobs_mc_axolotl_white.png"} + }, + sounds = { + random = "mobs_mc_axolotl", + damage = "mobs_mc_axolotl_hurt", + distance = 16, + }, + animation = {-- Stand: 1-20; Walk: 20-60; Swim: 61-81 + stand_start = 61, stand_end = 81, stand_speed = 15, + walk_start = 61, walk_end = 81, walk_speed = 15, + run_start = 61, run_end = 81, run_speed = 20, + }, + + follow = { + "mcl_fishing:clownfish_raw" + }, + + view_range = 16, + fear_height = 4, + + on_rightclick = function(self, clicker) + local bn = clicker:get_wielded_item():get_name() + if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then + if clicker:set_wielded_item("mcl_buckets:bucket_axolotl") then + local it = clicker:get_wielded_item() + local m = it:get_meta() + m:set_string("properties",minetest.serialize(self.object:get_properties())) + clicker:set_wielded_item(it) + self.object:remove() + end + awards.unlock(clicker:get_player_name(), "mcl:cutestPredator") + return + end + if self:feed_tame(clicker, 1, true, false) then return end + end, + makes_footstep_sound = false, + fly = true, + fly_in = { "mcl_core:water_source", "mclx_core:river_water_source" }, + breathes_in_water = true, + jump = true, + damage = 2, + reach = 2, + attack_type = "dogfight", + attack_animals = true, + specific_attack = { + "extra_mobs_cod", + "mobs_mc:sheep", + "extra_mobs_glow_squid", + "extra_mobs_salmon", + "extra_mobs_tropical_fish", + "mobs_mc_squid" + }, + runaway = true, +} + +mcl_mobs.register_mob("mobs_mc:axolotl", axolotl) + +local water = 0 + +mcl_mobs:spawn_specific( +"mobs_mc:axolotl", +"overworld", +"water", +{ +"Swampland", +"MushroomIsland", +"RoofedForest", +"FlowerForest_beach", +"Forest_beach", +"StoneBeach", +"Taiga_beach", +"Savanna_beach", +"Plains_beach", +"ExtremeHills_beach", +"Swampland_shore", +"MushroomIslandShore", +"JungleM_shore", +"Jungle_shore", +"RoofedForest_ocean", +"JungleEdgeM_ocean", +"BirchForestM_ocean", +"BirchForest_ocean", +"IcePlains_deep_ocean", +"Jungle_deep_ocean", +"Savanna_ocean", +"MesaPlateauF_ocean", +"SunflowerPlains_ocean", +"Swampland_ocean", +"ExtremeHillsM_ocean", +"Mesa_ocean", +"StoneBeach_ocean", +"Plains_ocean", +"MesaPlateauFM_ocean", +"MushroomIsland_ocean", +"MegaTaiga_ocean", +"StoneBeach_deep_ocean", +"SavannaM_ocean", +"ExtremeHills_ocean", +"Forest_ocean", +"JungleEdge_ocean", +"MesaBryce_ocean", +"MegaSpruceTaiga_ocean", +"ExtremeHills+_ocean", +"Jungle_ocean", +"FlowerForest_ocean", +"Desert_ocean", +"Taiga_ocean", +"JungleM_ocean", +"FlowerForest_underground", +"JungleEdge_underground", +"StoneBeach_underground", +"MesaBryce_underground", +"Mesa_underground", +"RoofedForest_underground", +"Jungle_underground", +"Swampland_underground", +"MushroomIsland_underground", +"BirchForest_underground", +"Plains_underground", +"MesaPlateauF_underground", +"ExtremeHills_underground", +"MegaSpruceTaiga_underground", +"BirchForestM_underground", +"SavannaM_underground", +"MesaPlateauFM_underground", +"Desert_underground", +"Savanna_underground", +"Forest_underground", +"SunflowerPlains_underground", +"MegaTaiga_underground", +"Taiga_underground", +"ExtremeHills+_underground", +"JungleM_underground", +"ExtremeHillsM_underground", +"JungleEdgeM_underground", +"LushCaves", +}, +0, +minetest.LIGHT_MAX+1, +30, +4000, +3, +water-16, +water+1) + +-- spawn eggs +mcl_mobs.register_egg("mobs_mc:axolotl", S("Axolotl"), "#e890bf", "#b83D7e", 0) diff --git a/mods/ENTITIES/mobs_mc/bat.lua b/mods/ENTITIES/mobs_mc/bat.lua index 924ebbf874..b5532e2eed 100644 --- a/mods/ENTITIES/mobs_mc/bat.lua +++ b/mods/ENTITIES/mobs_mc/bat.lua @@ -2,7 +2,7 @@ local S = minetest.get_translator("mobs_mc") -mcl_mobs:register_mob("mobs_mc:bat", { +mcl_mobs.register_mob("mobs_mc:bat", { description = S("Bat"), type = "animal", spawn_class = "ambient", @@ -144,4 +144,4 @@ mobs_mc.water_level-1) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:bat", S("Bat"), "#4c3e30", "#0f0f0f", 0) +mcl_mobs.register_egg("mobs_mc:bat", S("Bat"), "#4c3e30", "#0f0f0f", 0) diff --git a/mods/ENTITIES/mobs_mc/blaze.lua b/mods/ENTITIES/mobs_mc/blaze.lua index b94bc656e5..18b7ea676f 100644 --- a/mods/ENTITIES/mobs_mc/blaze.lua +++ b/mods/ENTITIES/mobs_mc/blaze.lua @@ -12,7 +12,7 @@ local mod_target = minetest.get_modpath("mcl_target") --################### -mcl_mobs:register_mob("mobs_mc:blaze", { +mcl_mobs.register_mob("mobs_mc:blaze", { description = S("Blaze"), type = "monster", spawn_class = "hostile", @@ -153,7 +153,7 @@ mcl_vars.mg_nether_min, mcl_vars.mg_nether_max) -- Blaze fireball -mcl_mobs:register_arrow("mobs_mc:blaze_fireball", { +mcl_mobs.register_arrow("mobs_mc:blaze_fireball", { visual = "sprite", visual_size = {x = 0.3, y = 0.3}, textures = {"mcl_fire_fire_charge.png"}, @@ -208,4 +208,4 @@ mcl_mobs:register_arrow("mobs_mc:blaze_fireball", { }) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:blaze", S("Blaze"), "#f6b201", "#fff87e", 0) +mcl_mobs.register_egg("mobs_mc:blaze", S("Blaze"), "#f6b201", "#fff87e", 0) diff --git a/mods/ENTITIES/mobs_mc/chicken.lua b/mods/ENTITIES/mobs_mc/chicken.lua index 034cb89db2..3992943904 100644 --- a/mods/ENTITIES/mobs_mc/chicken.lua +++ b/mods/ENTITIES/mobs_mc/chicken.lua @@ -8,7 +8,7 @@ local S = minetest.get_translator("mobs_mc") -mcl_mobs:register_mob("mobs_mc:chicken", { +mcl_mobs.register_mob("mobs_mc:chicken", { description = S("Chicken"), type = "animal", spawn_class = "passive", @@ -83,7 +83,7 @@ mcl_mobs:register_mob("mobs_mc:chicken", { fear_height = 4, on_rightclick = function(self, clicker) - if mcl_mobs:feed_tame(self, clicker, 1, true, false) then return end + if self:feed_tame(clicker, 1, true, false) then return end if mcl_mobs:protect(self, clicker) then return end if mcl_mobs:capture_mob(self, clicker, 0, 60, 5, false, nil) then return end end, @@ -163,4 +163,4 @@ mobs_mc.water_level, mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:chicken", S("Chicken"), "#a1a1a1", "#ff0000", 0) +mcl_mobs.register_egg("mobs_mc:chicken", S("Chicken"), "#a1a1a1", "#ff0000", 0) diff --git a/mods/ENTITIES/mobs_mc/cod.lua b/mods/ENTITIES/mobs_mc/cod.lua index d22334bf8f..bc65faebed 100644 --- a/mods/ENTITIES/mobs_mc/cod.lua +++ b/mods/ENTITIES/mobs_mc/cod.lua @@ -64,7 +64,7 @@ local cod = { chance = 1, min = 1, max = 1,}, - {name = "mcl_dye:white", + {name = "mcl_bone_meal:bone_meal", chance = 20, min = 1, max = 1,}, @@ -102,7 +102,8 @@ local cod = { end end, on_rightclick = function(self, clicker) - if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then + local bn = clicker:get_wielded_item():get_name() + if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then self.object:remove() clicker:set_wielded_item("mcl_buckets:bucket_cod") awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing") @@ -110,7 +111,7 @@ local cod = { end } -mcl_mobs:register_mob("mobs_mc:cod", cod) +mcl_mobs.register_mob("mobs_mc:cod", cod) --spawning TODO: in schools @@ -271,4 +272,4 @@ water-16, water+1) --spawn egg -mcl_mobs:register_egg("mobs_mc:cod", S("Cod"), "#c1a76a", "#e5c48b", 0) +mcl_mobs.register_egg("mobs_mc:cod", S("Cod"), "#c1a76a", "#e5c48b", 0) diff --git a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua index 4a91e91963..9de5d1ccef 100644 --- a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua +++ b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua @@ -12,7 +12,7 @@ local cow_def = { xp_min = 1, xp_max = 3, collisionbox = {-0.45, -0.01, -0.45, 0.45, 1.39, 0.45}, - spawn_in_group = 8, + spawn_in_group = 4, spawn_in_group_min = 3, visual = "mesh", mesh = "mobs_mc_cow.b3d", @@ -59,7 +59,7 @@ local cow_def = { run_start = 41, run_end = 81, run_speed = 60, }, on_rightclick = function(self, clicker) - if mcl_mobs:feed_tame(self, clicker, 1, true, false) then return end + if self:feed_tame(clicker, 1, true, false) then return end if mcl_mobs:protect(self, clicker) then return end if self.child then @@ -88,7 +88,7 @@ local cow_def = { fear_height = 4, } -mcl_mobs:register_mob("mobs_mc:cow", cow_def) +mcl_mobs.register_mob("mobs_mc:cow", cow_def) -- Mooshroom local mooshroom_def = table.copy(cow_def) @@ -97,7 +97,7 @@ mooshroom_def.spawn_in_group_min = 4 mooshroom_def.spawn_in_group = 8 mooshroom_def.textures = { {"mobs_mc_mooshroom.png", "mobs_mc_mushroom_red.png"}, {"mobs_mc_mooshroom_brown.png", "mobs_mc_mushroom_brown.png" } } mooshroom_def.on_rightclick = function(self, clicker) - if mcl_mobs:feed_tame(self, clicker, 1, true, false) then return end + if self:feed_tame(clicker, 1, true, false) then return end if mcl_mobs:protect(self, clicker) then return end if self.child then @@ -163,7 +163,7 @@ mooshroom_def.on_lightning_strike = function(self, pos, pos2, objects) self.object:set_properties({ textures = self.base_texture }) return true end -mcl_mobs:register_mob("mobs_mc:mooshroom", mooshroom_def) +mcl_mobs.register_mob("mobs_mc:mooshroom", mooshroom_def) -- Spawning @@ -231,5 +231,5 @@ mcl_vars.mg_overworld_min, mcl_vars.mg_overworld_max) -- spawn egg -mcl_mobs:register_egg("mobs_mc:cow", S("Cow"), "#443626", "#a1a1a1", 0) -mcl_mobs:register_egg("mobs_mc:mooshroom", S("Mooshroom"), "#a00f10", "#b7b7b7", 0) +mcl_mobs.register_egg("mobs_mc:cow", S("Cow"), "#443626", "#a1a1a1", 0) +mcl_mobs.register_egg("mobs_mc:mooshroom", S("Mooshroom"), "#a00f10", "#b7b7b7", 0) diff --git a/mods/ENTITIES/mobs_mc/creeper.lua b/mods/ENTITIES/mobs_mc/creeper.lua index f50eb5326b..6bbb37d5a5 100644 --- a/mods/ENTITIES/mobs_mc/creeper.lua +++ b/mods/ENTITIES/mobs_mc/creeper.lua @@ -9,7 +9,7 @@ local S = minetest.get_translator("mobs_mc") -mcl_mobs:register_mob("mobs_mc:creeper", { +mcl_mobs.register_mob("mobs_mc:creeper", { type = "monster", spawn_class = "hostile", spawn_in_group = 1, @@ -81,7 +81,7 @@ mcl_mobs:register_mob("mobs_mc:creeper", { if self._forced_explosion_countdown_timer ~= nil then self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime if self._forced_explosion_countdown_timer <= 0 then - mcl_mobs:boom(self, mcl_util.get_object_center(self.object), self.explosion_strength) + self:boom(mcl_util.get_object_center(self.object), self.explosion_strength) end end end, @@ -133,7 +133,7 @@ mcl_mobs:register_mob("mobs_mc:creeper", { view_range = 16, }) -mcl_mobs:register_mob("mobs_mc:creeper_charged", { +mcl_mobs.register_mob("mobs_mc:creeper_charged", { description = S("Creeper"), type = "monster", spawn_class = "hostile", @@ -203,7 +203,7 @@ mcl_mobs:register_mob("mobs_mc:creeper_charged", { if self._forced_explosion_countdown_timer ~= nil then self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime if self._forced_explosion_countdown_timer <= 0 then - mcl_mobs:boom(self, mcl_util.get_object_center(self.object), self.explosion_strength) + self:boom(mcl_util.get_object_center(self.object), self.explosion_strength) end end end, @@ -411,4 +411,4 @@ mcl_vars.mg_overworld_min, mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:creeper", S("Creeper"), "#0da70a", "#000000", 0) +mcl_mobs.register_egg("mobs_mc:creeper", S("Creeper"), "#0da70a", "#000000", 0) diff --git a/mods/ENTITIES/mobs_mc/dolphin.lua b/mods/ENTITIES/mobs_mc/dolphin.lua index 5e5910ca3c..0e5c8e7eea 100644 --- a/mods/ENTITIES/mobs_mc/dolphin.lua +++ b/mods/ENTITIES/mobs_mc/dolphin.lua @@ -92,7 +92,7 @@ local dolphin = { end, } -mcl_mobs:register_mob("mobs_mc:dolphin", dolphin) +mcl_mobs.register_mob("mobs_mc:dolphin", dolphin) --spawning TO DO: in schools @@ -250,4 +250,4 @@ water-16, water+1) --spawn egg -mcl_mobs:register_egg("mobs_mc:dolphin", S("Dolphin"), "#223b4d", "#f9f9f9", 0) +mcl_mobs.register_egg("mobs_mc:dolphin", S("Dolphin"), "#223b4d", "#f9f9f9", 0) diff --git a/mods/ENTITIES/mobs_mc/ender_dragon.lua b/mods/ENTITIES/mobs_mc/ender_dragon.lua index f781dd4777..ef4c8f8118 100644 --- a/mods/ENTITIES/mobs_mc/ender_dragon.lua +++ b/mods/ENTITIES/mobs_mc/ender_dragon.lua @@ -48,7 +48,7 @@ local function check_pos(self) end end -mcl_mobs:register_mob("mobs_mc:enderdragon", { +mcl_mobs.register_mob("mobs_mc:enderdragon", { description = S("Ender Dragon"), type = "monster", spawn_class = "hostile", @@ -142,7 +142,7 @@ mcl_mobs:register_mob("mobs_mc:enderdragon", { local mobs_griefing = minetest.settings:get_bool("mobs_griefing") ~= false -- dragon fireball (projectile) -mcl_mobs:register_arrow("mobs_mc:dragon_fireball", { +mcl_mobs.register_arrow("mobs_mc:dragon_fireball", { visual = "sprite", visual_size = {x = 1.25, y = 1.25}, textures = {"mobs_mc_dragon_fireball.png"}, @@ -166,11 +166,11 @@ mcl_mobs:register_arrow("mobs_mc:dragon_fireball", { -- node hit, explode hit_node = function(self, pos, node) - mcl_mobs:boom(self, pos, 2) + mcl_mobs.mob_class.boom(self,pos, 2) end }) -mcl_mobs:register_egg("mobs_mc:enderdragon", S("Ender Dragon"), "#252525", "#b313c9", 0, true) +mcl_mobs.register_egg("mobs_mc:enderdragon", S("Ender Dragon"), "#252525", "#b313c9", 0, true) mcl_wip.register_wip_item("mobs_mc:enderdragon") diff --git a/mods/ENTITIES/mobs_mc/enderman.lua b/mods/ENTITIES/mobs_mc/enderman.lua index 2849b62b66..2688977fe9 100644 --- a/mods/ENTITIES/mobs_mc/enderman.lua +++ b/mods/ENTITIES/mobs_mc/enderman.lua @@ -255,7 +255,7 @@ local psdefs = {{ texture = "mcl_portals_particle"..math.random(1, 5)..".png", }} -mcl_mobs:register_mob("mobs_mc:enderman", { +mcl_mobs.register_mob("mobs_mc:enderman", { description = S("Enderman"), type = "monster", spawn_class = "passive", @@ -497,7 +497,7 @@ mcl_mobs:register_mob("mobs_mc:enderman", { self.base_texture = create_enderman_textures(block_type, self._taken_node) self.object:set_properties({ textures = self.base_texture }) self.animation = select_enderman_animation("block") - mcl_mobs:set_animation(self, self.animation.current) + self:set_animation(self.animation.current) if def.sounds and def.sounds.dug then minetest.sound_play(def.sounds.dug, {pos = take_pos, max_hear_distance = 16}, true) end @@ -520,7 +520,7 @@ mcl_mobs:register_mob("mobs_mc:enderman", { local def = minetest.registered_nodes[self._taken_node] -- Update animation accordingly (removes visible block) self.animation = select_enderman_animation("normal") - mcl_mobs:set_animation(self, self.animation.current) + self:set_animation(self.animation.current) if def.sounds and def.sounds.place then minetest.sound_play(def.sounds.place, {pos = place_pos, max_hear_distance = 16}, true) end @@ -832,4 +832,4 @@ mcl_vars.mg_nether_min, mcl_vars.mg_nether_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:enderman", S("Enderman"), "#252525", "#151515", 0) +mcl_mobs.register_egg("mobs_mc:enderman", S("Enderman"), "#252525", "#151515", 0) diff --git a/mods/ENTITIES/mobs_mc/endermite.lua b/mods/ENTITIES/mobs_mc/endermite.lua index 035d57fd9b..612054be84 100644 --- a/mods/ENTITIES/mobs_mc/endermite.lua +++ b/mods/ENTITIES/mobs_mc/endermite.lua @@ -4,7 +4,7 @@ local S = minetest.get_translator("mobs_mc") -mcl_mobs:register_mob("mobs_mc:endermite", { +mcl_mobs.register_mob("mobs_mc:endermite", { description = S("Endermite"), type = "monster", spawn_class = "hostile", @@ -38,4 +38,4 @@ mcl_mobs:register_mob("mobs_mc:endermite", { reach = 1, }) -mcl_mobs:register_egg("mobs_mc:endermite", S("Endermite"), "#161616", "#6d6d6d", 0) +mcl_mobs.register_egg("mobs_mc:endermite", S("Endermite"), "#161616", "#6d6d6d", 0) diff --git a/mods/ENTITIES/mobs_mc/ghast.lua b/mods/ENTITIES/mobs_mc/ghast.lua index 6805bbad40..0f7e73344c 100644 --- a/mods/ENTITIES/mobs_mc/ghast.lua +++ b/mods/ENTITIES/mobs_mc/ghast.lua @@ -10,7 +10,7 @@ local S = minetest.get_translator("mobs_mc") --################### -mcl_mobs:register_mob("mobs_mc:ghast", { +mcl_mobs.register_mob("mobs_mc:ghast", { description = S("Ghast"), type = "monster", spawn_class = "hostile", @@ -103,7 +103,7 @@ mcl_vars.mg_nether_min, mcl_vars.mg_nether_max) -- fireball (projectile) -mcl_mobs:register_arrow("mobs_mc:fireball", { +mcl_mobs.register_arrow("mobs_mc:fireball", { visual = "sprite", visual_size = {x = 1, y = 1}, textures = {"mcl_fire_fire_charge.png"}, @@ -118,9 +118,9 @@ mcl_mobs:register_arrow("mobs_mc:fireball", { }, nil) local p = self.object:get_pos() if p then - mcl_mobs:boom(self, p, 1, true) + mcl_mobs.mob_class.boom(self,p, 1, true) else - mcl_mobs:boom(self, player:get_pos(), 1, true) + mcl_mobs.mob_class.boom(self,player:get_pos(), 1, true) end end, @@ -129,11 +129,11 @@ mcl_mobs:register_arrow("mobs_mc:fireball", { full_punch_interval = 1.0, damage_groups = {fleshy = 6}, }, nil) - mcl_mobs:boom(self, self.object:get_pos(), 1, true) + mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1, true) end, hit_node = function(self, pos, node) - mcl_mobs:boom(self, pos, 1, true) + mcl_mobs.mob_class.boom(self,pos, 1, true) end }) @@ -141,4 +141,4 @@ mcl_mobs:register_arrow("mobs_mc:fireball", { -- spawn eggs -mcl_mobs:register_egg("mobs_mc:ghast", S("Ghast"), "#f9f9f9", "#bcbcbc", 0) +mcl_mobs.register_egg("mobs_mc:ghast", S("Ghast"), "#f9f9f9", "#bcbcbc", 0) diff --git a/mods/ENTITIES/mobs_mc/glow_squid.lua b/mods/ENTITIES/mobs_mc/glow_squid.lua index 0922069985..9f3a45e342 100644 --- a/mods/ENTITIES/mobs_mc/glow_squid.lua +++ b/mods/ENTITIES/mobs_mc/glow_squid.lua @@ -29,7 +29,7 @@ for i=1,4 do table.insert(psdefs,p) end -mcl_mobs:register_mob("mobs_mc:glow_squid", { +mcl_mobs.register_mob("mobs_mc:glow_squid", { type = "animal", spawn_class = "water", can_despawn = true, @@ -243,4 +243,4 @@ mcl_mobs:spawn_specific( water) -- spawn egg -mcl_mobs:register_egg("mobs_mc:glow_squid", S("Glow Squid"), "#095757", "#87f6c0", 0) +mcl_mobs.register_egg("mobs_mc:glow_squid", S("Glow Squid"), "#095757", "#87f6c0", 0) diff --git a/mods/ENTITIES/mobs_mc/guardian.lua b/mods/ENTITIES/mobs_mc/guardian.lua index f0b13d7a4f..e9a15264be 100644 --- a/mods/ENTITIES/mobs_mc/guardian.lua +++ b/mods/ENTITIES/mobs_mc/guardian.lua @@ -4,7 +4,7 @@ local S = minetest.get_translator("mobs_mc") -mcl_mobs:register_mob("mobs_mc:guardian", { +mcl_mobs.register_mob("mobs_mc:guardian", { description = S("Guardian"), type = "monster", spawn_class = "hostile", @@ -104,4 +104,4 @@ mcl_mobs:register_mob("mobs_mc:guardian", { --mcl_mobs:spawn_specific("mobs_mc:guardian", { "mcl_core:water_source", "mclx_core:river_water_source" }, { "mcl_core:water_source", "mclx_core:river_water_source" }, 0, minetest.LIGHT_MAX+1, 30, 25000, 2, mcl_vars.mg_overworld_min, mobs_mc.water_level - 10) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:guardian", S("Guardian"), "#5a8272", "#f17d31", 0) +mcl_mobs.register_egg("mobs_mc:guardian", S("Guardian"), "#5a8272", "#f17d31", 0) diff --git a/mods/ENTITIES/mobs_mc/guardian_elder.lua b/mods/ENTITIES/mobs_mc/guardian_elder.lua index eb07157e11..d08cc1846d 100644 --- a/mods/ENTITIES/mobs_mc/guardian_elder.lua +++ b/mods/ENTITIES/mobs_mc/guardian_elder.lua @@ -6,7 +6,7 @@ local S = minetest.get_translator("mobs_mc") -mcl_mobs:register_mob("mobs_mc:guardian_elder", { +mcl_mobs.register_mob("mobs_mc:guardian_elder", { description = S("Elder Guardian"), type = "monster", spawn_class = "hostile", @@ -112,6 +112,6 @@ mcl_mobs:register_mob("mobs_mc:guardian_elder", { -- mcl_mobs:spawn_specific("mobs_mc:guardian_elder", { "mcl_core:water_source", "mclx_core:river_water_source" }, { "mcl_core:water_source", "mclx_core:river_water_source" }, 0, minetest.LIGHT_MAX+1, 30, 40000, 2, mcl_vars.mg_overworld_min, mobs_mc.water_level-18) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:guardian_elder", S("Elder Guardian"), "#ceccba", "#747693", 0) +mcl_mobs.register_egg("mobs_mc:guardian_elder", S("Elder Guardian"), "#ceccba", "#747693", 0) diff --git a/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua b/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua index f44ce1c089..e5cdcc8a85 100644 --- a/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua +++ b/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua @@ -84,7 +84,7 @@ local hoglin = { attack_animals = true, } -mcl_mobs:register_mob("mobs_mc:hoglin", hoglin) +mcl_mobs.register_mob("mobs_mc:hoglin", hoglin) local zoglin = table.copy(hoglin) zoglin.fire_resistant = 1 @@ -95,7 +95,7 @@ end zoglin.attacks_monsters = true zoglin.lava_damage = 0 zoglin.fire_damage = 0 -mcl_mobs:register_mob("mobs_mc:zoglin", zoglin) +mcl_mobs.register_mob("mobs_mc:zoglin", zoglin) -- Baby hoglin. @@ -112,7 +112,7 @@ baby_hoglin.walk_velocity = 1.2 baby_hoglin.run_velocity = 2.4 baby_hoglin.child = 1 -mcl_mobs:register_mob("mobs_mc:baby_hoglin", baby_hoglin) +mcl_mobs.register_mob("mobs_mc:baby_hoglin", baby_hoglin) -- Regular spawning in the Nether mcl_mobs:spawn_specific( @@ -132,4 +132,4 @@ mcl_vars.mg_nether_min, mcl_vars.mg_nether_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:hoglin", S("Hoglin"), "#85682e", "#2b2140", 0) +mcl_mobs.register_egg("mobs_mc:hoglin", S("Hoglin"), "#85682e", "#2b2140", 0) diff --git a/mods/ENTITIES/mobs_mc/horse.lua b/mods/ENTITIES/mobs_mc/horse.lua index d1c865968a..7f61627bc9 100644 --- a/mods/ENTITIES/mobs_mc/horse.lua +++ b/mods/ENTITIES/mobs_mc/horse.lua @@ -337,7 +337,7 @@ local horse = { elseif (iname == "mcl_farming:carrot_item_gold") then heal = 4 end - if heal > 0 and mcl_mobs:feed_tame(self, clicker, heal, true, false) then + if heal > 0 and self:feed_tame(clicker, heal, true, false) then return end end @@ -352,7 +352,7 @@ local horse = { elseif (iname == "mcl_farming:hay_block") then heal = 20 end - if heal > 0 and mcl_mobs:feed_tame(self, clicker, heal, false, false) then + if heal > 0 and self:feed_tame(clicker, heal, false, false) then return end @@ -441,7 +441,7 @@ local horse = { on_breed = function(parent1, parent2) local pos = parent1.object:get_pos() - local child = mcl_mobs:spawn_child(pos, parent1.name) + local child = mcl_mobs.spawn_child(pos, parent1.name) if child then local ent_c = child:get_luaentity() local p = math.random(1, 2) @@ -490,7 +490,7 @@ local horse = { end, } -mcl_mobs:register_mob("mobs_mc:horse", horse) +mcl_mobs.register_mob("mobs_mc:horse", horse) -- Skeleton horse local skeleton_horse = table.copy(horse) @@ -513,7 +513,7 @@ skeleton_horse.sounds = { distance = 16, } skeleton_horse.harmed_by_heal = true -mcl_mobs:register_mob("mobs_mc:skeleton_horse", skeleton_horse) +mcl_mobs.register_mob("mobs_mc:skeleton_horse", skeleton_horse) -- Zombie horse local zombie_horse = table.copy(horse) @@ -537,7 +537,7 @@ zombie_horse.sounds = { distance = 16, } zombie_horse.harmed_by_heal = true -mcl_mobs:register_mob("mobs_mc:zombie_horse", zombie_horse) +mcl_mobs.register_mob("mobs_mc:zombie_horse", zombie_horse) -- Donkey local d = 0.86 -- donkey scale @@ -571,7 +571,7 @@ donkey.jump = true donkey.jump_height = 3.75 -- can clear 1 block height -mcl_mobs:register_mob("mobs_mc:donkey", donkey) +mcl_mobs.register_mob("mobs_mc:donkey", donkey) mcl_entity_invs.register_inv("mobs_mc:donkey","Donkey",15,true) -- Mule local m = 0.94 @@ -589,7 +589,7 @@ mule.collisionbox = { horse.collisionbox[5] * m, horse.collisionbox[6] * m, } -mcl_mobs:register_mob("mobs_mc:mule", mule) +mcl_mobs.register_mob("mobs_mc:mule", mule) mcl_entity_invs.register_inv("mobs_mc:mule","Mule",15,true) --=========================== @@ -641,8 +641,8 @@ mobs_mc.water_level+3, mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:horse", S("Horse"), "#c09e7d", "#eee500", 0) -mcl_mobs:register_egg("mobs_mc:skeleton_horse", S("Skeleton Horse"), "#68684f", "#e5e5d8", 0) +mcl_mobs.register_egg("mobs_mc:horse", S("Horse"), "#c09e7d", "#eee500", 0) +mcl_mobs.register_egg("mobs_mc:skeleton_horse", S("Skeleton Horse"), "#68684f", "#e5e5d8", 0) --mobs:register_egg("mobs_mc:zombie_horse", S("Zombie Horse"), "#2a5a37", "#84d080", 0) -mcl_mobs:register_egg("mobs_mc:donkey", S("Donkey"), "#534539", "#867566", 0) -mcl_mobs:register_egg("mobs_mc:mule", S("Mule"), "#1b0200", "#51331d", 0) +mcl_mobs.register_egg("mobs_mc:donkey", S("Donkey"), "#534539", "#867566", 0) +mcl_mobs.register_egg("mobs_mc:mule", S("Mule"), "#1b0200", "#51331d", 0) diff --git a/mods/ENTITIES/mobs_mc/init.lua b/mods/ENTITIES/mobs_mc/init.lua index a84a8c3212..c2b3d8ed0a 100644 --- a/mods/ENTITIES/mobs_mc/init.lua +++ b/mods/ENTITIES/mobs_mc/init.lua @@ -96,6 +96,7 @@ mobs_mc.water_level = tonumber(minetest.settings:get("water_level")) or 0 -- Animals local path = minetest.get_modpath("mobs_mc") +dofile(path .. "/axolotl.lua") -- Mesh and animation by JoeEnderman, Textures by Nova Wustra, modified by JoeEnderman dofile(path .. "/bat.lua") -- Mesh and animation by toby109tt / https://github.com/22i dofile(path .. "/rabbit.lua") -- Mesh and animation byExeterDad dofile(path .. "/chicken.lua") -- Mesh and animation by Pavel_S diff --git a/mods/ENTITIES/mobs_mc/iron_golem.lua b/mods/ENTITIES/mobs_mc/iron_golem.lua index a55bba81df..7ca4dd88a0 100644 --- a/mods/ENTITIES/mobs_mc/iron_golem.lua +++ b/mods/ENTITIES/mobs_mc/iron_golem.lua @@ -11,7 +11,7 @@ local S = minetest.get_translator("mobs_mc") local etime = 0 -mcl_mobs:register_mob("mobs_mc:iron_golem", { +mcl_mobs.register_mob("mobs_mc:iron_golem", { description = S("Iron Golem"), type = "npc", spawn_class = "passive", @@ -89,7 +89,7 @@ mcl_mobs:register_mob("mobs_mc:iron_golem", { etime = etime + dtime if etime > 10 then if self._home and vector.distance(self._home,self.object:get_pos()) > 50 then - mcl_mobs:gopath(self,self._home) + self:gopath(self._home) end end end, @@ -97,7 +97,7 @@ mcl_mobs:register_mob("mobs_mc:iron_golem", { -- spawn eggs -mcl_mobs:register_egg("mobs_mc:iron_golem", S("Iron Golem"), "#3b3b3b", "#f57223", 0) +mcl_mobs.register_egg("mobs_mc:iron_golem", S("Iron Golem"), "#3b3b3b", "#f57223", 0) --[[ This is to be called when a pumpkin or jack'o lantern has been placed. Recommended: In the on_construct function of the node. This summons an iron golen if placing the pumpkin created an iron golem summon pattern: diff --git a/mods/ENTITIES/mobs_mc/llama.lua b/mods/ENTITIES/mobs_mc/llama.lua index dc3d4aca0f..503f4207ba 100644 --- a/mods/ENTITIES/mobs_mc/llama.lua +++ b/mods/ENTITIES/mobs_mc/llama.lua @@ -47,7 +47,7 @@ local function get_drops(self) end end -mcl_mobs:register_mob("mobs_mc:llama", { +mcl_mobs.register_mob("mobs_mc:llama", { description = S("Llama"), type = "animal", spawn_class = "passive", @@ -156,7 +156,7 @@ mcl_mobs:register_mob("mobs_mc:llama", { local item = clicker:get_wielded_item() if item:get_name() == "mcl_farming:hay_block" then -- Breed with hay bale - if mcl_mobs:feed_tame(self, clicker, 1, true, false) then return end + if self:feed_tame(clicker, 1, true, false) then return end elseif not self._has_chest and item:get_name() == "mcl_chests:chest" then item:take_item() clicker:set_wielded_item(item) @@ -173,7 +173,7 @@ mcl_mobs:register_mob("mobs_mc:llama", { return else -- Feed with anything else - if mcl_mobs:feed_tame(self, clicker, 1, false, true) then return end + if self:feed_tame(clicker, 1, false, true) then return end end if mcl_mobs:protect(self, clicker) then return end @@ -221,7 +221,7 @@ mcl_mobs:register_mob("mobs_mc:llama", { else parent = parent2 end - child = mcl_mobs:spawn_child(pos, parent.name) + child = mcl_mobs.spawn_child(pos, parent.name) if child then local ent_c = child:get_luaentity() ent_c.base_texture = table.copy(ent_c.base_texture) @@ -254,7 +254,7 @@ mcl_mobs:register_mob("mobs_mc:llama", { mcl_entity_invs.register_inv("mobs_mc:llama","Llama",nil,true) -- spit arrow (weapon) -mcl_mobs:register_arrow("mobs_mc:llamaspit", { +mcl_mobs.register_arrow("mobs_mc:llamaspit", { visual = "sprite", visual_size = {x = 0.10, y = 0.10}, textures = {"mobs_mc_llama_spit.png"}, @@ -297,4 +297,4 @@ mobs_mc.water_level+15, mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:llama", S("Llama"), "#c09e7d", "#995f40", 0) +mcl_mobs.register_egg("mobs_mc:llama", S("Llama"), "#c09e7d", "#995f40", 0) diff --git a/mods/ENTITIES/mobs_mc/locale/mobs_mc.ja.tr b/mods/ENTITIES/mobs_mc/locale/mobs_mc.ja.tr new file mode 100644 index 0000000000..ff6966131c --- /dev/null +++ b/mods/ENTITIES/mobs_mc/locale/mobs_mc.ja.tr @@ -0,0 +1,70 @@ +# textdomain: mobs_mc +Agent=エージェント +Axolotl=ウーパールーパー +Bat=コウモリ +Blaze=ブレイズ +Chicken=ニワトリ +Cow=ウシ +Mooshroom=ムーシュルーム +Creeper=クリーパー +Ender Dragon=エンダードラゴン +Enderman=エンダーマン +Endermite=エンダーマイト +Ghast=ガスト +Elder Guardian=エルダーガーディアン +Guardian=ガーディアン +Horse=ウマ +Skeleton Horse=スケルトンホース +Zombie Horse=ゾンビホース +Donkey=ロバ +Mule=ラバ +Iron Golem=アイアンゴーレム +Llama=ラマ +Ocelot=ヤマネコ +Parrot=オウム +Pig=ブタ +Polar Bear=シロクマ +Rabbit=ウサギ +Killer Bunny=殺人ウサギ +Sheep=ヒツジ +Shulker=シュルカー +Silverfish=シルバーフィッシュ +Skeleton=スケルトン +Stray=ストレイ +Wither Skeleton=ウィザースケルトン +Magma Cube=マグマキューブ +Slime=スライム +Snow Golem=スノーゴーレム +Spider=クモ +Cave Spider=洞窟グモ +Squid=イカ +Vex=ヴェックス +Evoker=エヴォーカー +Illusioner=イリュージョナー +Villager=村人 +Vindicator=ヴィンディケーター +Zombie Villager=村人ゾンビ +Witch=魔女 +Wither=ウィザー +Wolf=オオカミ +Husk=ハスク +Zombie=ゾンビ +Zombie Pigman=ゾンビピッグマン +Farmer=農民 +Fisherman=漁師 +Fletcher=矢師 +Shepherd=羊飼い +Librarian=司書 +Cartographer=製図家 +Armorer=防具鍛冶 +Leatherworker=革職人 +Butcher=肉屋 +Weapon Smith=武器鍛冶 +Tool Smith=道具鍛冶 +Cleric=聖職者 +Nitwit=求職者 +Cod=タラ +Salmon=サケ +Dolphin=イルカ +Pillager=ピリジャー +Tropical fish=クマノミ \ No newline at end of file diff --git a/mods/ENTITIES/mobs_mc/locale/template.txt b/mods/ENTITIES/mobs_mc/locale/template.txt index 493e2cb6ed..38c6111b55 100644 --- a/mods/ENTITIES/mobs_mc/locale/template.txt +++ b/mods/ENTITIES/mobs_mc/locale/template.txt @@ -1,5 +1,6 @@ # textdomain: mobs_mc Agent= +Axolotl= Bat= Blaze= Chicken= diff --git a/mods/ENTITIES/mobs_mc/mod.conf b/mods/ENTITIES/mobs_mc/mod.conf index 89964c8359..5b94879b27 100644 --- a/mods/ENTITIES/mobs_mc/mod.conf +++ b/mods/ENTITIES/mobs_mc/mod.conf @@ -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, mobs_mc_gameconfig, doc_items +optional_depends = default, mcl_tnt, mcl_bows, mcl_throwing, mcl_fishing, bones, mesecons_materials, doc_items diff --git a/mods/ENTITIES/mobs_mc/models/mobs_mc_axolotl.b3d b/mods/ENTITIES/mobs_mc/models/mobs_mc_axolotl.b3d new file mode 100644 index 0000000000..3e4c8119ef Binary files /dev/null and b/mods/ENTITIES/mobs_mc/models/mobs_mc_axolotl.b3d differ diff --git a/mods/ENTITIES/mobs_mc/ocelot.lua b/mods/ENTITIES/mobs_mc/ocelot.lua index c50067f5fa..8a7ea75453 100644 --- a/mods/ENTITIES/mobs_mc/ocelot.lua +++ b/mods/ENTITIES/mobs_mc/ocelot.lua @@ -107,7 +107,7 @@ local ocelot = { end, } -mcl_mobs:register_mob("mobs_mc:ocelot", ocelot) +mcl_mobs.register_mob("mobs_mc:ocelot", ocelot) -- Cat local cat = table.copy(ocelot) @@ -130,7 +130,7 @@ cat.sounds = { distance = 16, } cat.on_rightclick = function(self, clicker) - if mcl_mobs:feed_tame(self, clicker, 1, true, false) then return end + if self:feed_tame(clicker, 1, true, false) then return end if mcl_mobs:capture_mob(self, clicker, 0, 60, 5, false, nil) then return end if mcl_mobs:protect(self, clicker) then return end @@ -167,7 +167,7 @@ cat.on_spawn = function(self) self.object:set_properties({textures = {self._texture}}) end -mcl_mobs:register_mob("mobs_mc:cat", cat) +mcl_mobs.register_mob("mobs_mc:cat", cat) local base_spawn_chance = 5000 @@ -249,4 +249,4 @@ mobs:spawn({ ]]-- -- spawn eggs -mcl_mobs:register_egg("mobs_mc:ocelot", S("Ocelot"), "#efde7d", "#564434", 0) +mcl_mobs.register_egg("mobs_mc:ocelot", S("Ocelot"), "#efde7d", "#564434", 0) diff --git a/mods/ENTITIES/mobs_mc/parrot.lua b/mods/ENTITIES/mobs_mc/parrot.lua index 52bb77280d..ed2892aca5 100644 --- a/mods/ENTITIES/mobs_mc/parrot.lua +++ b/mods/ENTITIES/mobs_mc/parrot.lua @@ -87,7 +87,7 @@ local function perch(self,player) local shoulder = get_shoulder(player) if not shoulder then return true end self.object:set_attach(player,"",shoulder,vector.new(0,0,0),true) - mcl_mobs:set_animation(self, "stand") + self:set_animation("stand") end end @@ -125,7 +125,7 @@ local function check_perch(self,dtime) end end -mcl_mobs:register_mob("mobs_mc:parrot", { +mcl_mobs.register_mob("mobs_mc:parrot", { description = S("Parrot"), type = "animal", spawn_class = "passive", @@ -207,7 +207,7 @@ mcl_mobs:register_mob("mobs_mc:parrot", { return end -- Feed to tame, but not breed - if mcl_mobs:feed_tame(self, clicker, 1, false, true) then return end + if self:feed_tame(clicker, 1, false, true) then return end perch(self,clicker) end, do_custom = function(self,dtime) @@ -241,4 +241,4 @@ mobs_mc.water_level+7, mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:parrot", S("Parrot"), "#0da70a", "#ff0000", 0) +mcl_mobs.register_egg("mobs_mc:parrot", S("Parrot"), "#0da70a", "#ff0000", 0) diff --git a/mods/ENTITIES/mobs_mc/pig.lua b/mods/ENTITIES/mobs_mc/pig.lua index f8ce4afbea..99e05391fc 100644 --- a/mods/ENTITIES/mobs_mc/pig.lua +++ b/mods/ENTITIES/mobs_mc/pig.lua @@ -2,7 +2,7 @@ local S = minetest.get_translator("mobs_mc") -mcl_mobs:register_mob("mobs_mc:pig", { +mcl_mobs.register_mob("mobs_mc:pig", { description = S("Pig"), type = "animal", spawn_class = "passive", @@ -108,7 +108,7 @@ mcl_mobs:register_mob("mobs_mc:pig", { local wielditem = clicker:get_wielded_item() -- Feed pig if wielditem:get_name() ~= "mcl_mobitems:carrot_on_a_stick" then - if mcl_mobs:feed_tame(self, clicker, 1, true, false) then return end + if self:feed_tame(clicker, 1, true, false) then return end end if mcl_mobs:protect(self, clicker) then return end @@ -186,7 +186,7 @@ mcl_mobs:register_mob("mobs_mc:pig", { on_breed = function(parent1, parent2) local pos = parent1.object:get_pos() - local child = mcl_mobs:spawn_child(pos, parent1.name) + local child = mcl_mobs.spawn_child(pos, parent1.name) if child then local ent_c = child:get_luaentity() ent_c.tamed = true @@ -242,4 +242,4 @@ mcl_vars.mg_overworld_min, mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:pig", S("Pig"), "#f0a5a2", "#db635f", 0) +mcl_mobs.register_egg("mobs_mc:pig", S("Pig"), "#f0a5a2", "#db635f", 0) diff --git a/mods/ENTITIES/mobs_mc/piglin.lua b/mods/ENTITIES/mobs_mc/piglin.lua index aac97092bd..90e19ef023 100644 --- a/mods/ENTITIES/mobs_mc/piglin.lua +++ b/mods/ENTITIES/mobs_mc/piglin.lua @@ -174,7 +174,7 @@ local piglin = { specific_attack = { "player", "mobs_mc:hoglin" }, } -mcl_mobs:register_mob("mobs_mc:piglin", piglin) +mcl_mobs.register_mob("mobs_mc:piglin", piglin) local sword_piglin = table.copy(piglin) @@ -206,7 +206,7 @@ sword_piglin.animation = { punch_start = 189, punch_end = 198, } -mcl_mobs:register_mob("mobs_mc:sword_piglin", sword_piglin) +mcl_mobs.register_mob("mobs_mc:sword_piglin", sword_piglin) local zombified_piglin = table.copy(piglin) zombified_piglin.fire_resistant = 1 @@ -239,7 +239,7 @@ zombified_piglin.animation = { punch_start = 189, punch_end = 198, } -mcl_mobs:register_mob("mobs_mc:zombified_piglin", zombified_piglin) +mcl_mobs.register_mob("mobs_mc:zombified_piglin", zombified_piglin) local piglin_brute = table.copy(piglin) @@ -280,7 +280,7 @@ piglin_brute.animation = { } piglin_brute.can_despawn = false piglin_brute.group_attack = { "mobs_mc:piglin", "mobs_mc:piglin_brute" } -mcl_mobs:register_mob("mobs_mc:piglin_brute", piglin_brute) +mcl_mobs.register_mob("mobs_mc:piglin_brute", piglin_brute) -- Regular spawning in the Nether @@ -316,5 +316,5 @@ minetest.LIGHT_MAX+1, mcl_vars.mg_lava_nether_max, mcl_vars.mg_nether_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:piglin", S("Piglin"), "#7b4a17","#d5c381", 0) -mcl_mobs:register_egg("mobs_mc:piglin_brute", S("Piglin Brute"), "#562b0c","#ddc89d", 0) +mcl_mobs.register_egg("mobs_mc:piglin", S("Piglin"), "#7b4a17","#d5c381", 0) +mcl_mobs.register_egg("mobs_mc:piglin_brute", S("Piglin Brute"), "#562b0c","#ddc89d", 0) diff --git a/mods/ENTITIES/mobs_mc/pillager.lua b/mods/ENTITIES/mobs_mc/pillager.lua index 1321058b7a..0b6b036f77 100644 --- a/mods/ENTITIES/mobs_mc/pillager.lua +++ b/mods/ENTITIES/mobs_mc/pillager.lua @@ -12,7 +12,7 @@ end local function reset_animation(self, animation) if not self.object:get_pos() or self._current_animation ~= animation then return end self._current_animation = "stand_reload" -- Mobs Redo won't set the animation unless we do this - mcl_mobs:set_animation(self, animation) + self:set_animation(animation) end pillager = { @@ -96,29 +96,29 @@ pillager = { self.object:set_properties(props) local old_anim = self._current_animation if old_anim == "run" or old_anim == "walk" then - mcl_mobs:set_animation(self, "reload_run") + self:set_animation("reload_run") end if old_anim == "stand" then - mcl_mobs:set_animation(self, "reload_stand") + self:set_animation("reload_stand") end self._current_animation = old_anim -- Mobs Redo will imediately reset the animation otherwise minetest.after(1, reload, self) minetest.after(2, reset_animation, self, old_anim) - + -- 2-4 damage per arrow local dmg = math.max(4, math.random(2, 8)) mcl_bows_s.shoot_arrow_crossbow("mcl_bows:arrow", pos, dir, self.object:get_yaw(), self.object, nil, dmg) - + -- While we are at it, change the sounds since there is no way to do this in Mobs Redo if self.sounds and self.sounds.random then self.sounds = table.copy(self.sounds) self.sounds.random = "mobs_mc_pillager_grunt" .. math.random(2) end - + -- Randomize reload time self.shoot_interval = math.random(3, 4) end, } -mcl_mobs:register_mob("mobs_mc:pillager", pillager) -mcl_mobs:register_egg("mobs_mc:pillager", S("Pillager"), "#532f36", "#959b9b", 0) +mcl_mobs.register_mob("mobs_mc:pillager", pillager) +mcl_mobs.register_egg("mobs_mc:pillager", S("Pillager"), "#532f36", "#959b9b", 0) diff --git a/mods/ENTITIES/mobs_mc/polar_bear.lua b/mods/ENTITIES/mobs_mc/polar_bear.lua index c81525f09b..d6667a256c 100644 --- a/mods/ENTITIES/mobs_mc/polar_bear.lua +++ b/mods/ENTITIES/mobs_mc/polar_bear.lua @@ -7,7 +7,7 @@ local S = minetest.get_translator("mobs_mc") --################### -mcl_mobs:register_mob("mobs_mc:polar_bear", { +mcl_mobs.register_mob("mobs_mc:polar_bear", { description = S("Polar Bear"), type = "animal", spawn_class = "passive", @@ -92,4 +92,4 @@ mcl_vars.mg_overworld_min, mcl_vars.mg_overworld_max) -- spawn egg -mcl_mobs:register_egg("mobs_mc:polar_bear", S("Polar Bear"), "#f2f2f2", "#959590", 0) +mcl_mobs.register_egg("mobs_mc:polar_bear", S("Polar Bear"), "#f2f2f2", "#959590", 0) diff --git a/mods/ENTITIES/mobs_mc/rabbit.lua b/mods/ENTITIES/mobs_mc/rabbit.lua index a28b343599..6d13fbe22a 100644 --- a/mods/ENTITIES/mobs_mc/rabbit.lua +++ b/mods/ENTITIES/mobs_mc/rabbit.lua @@ -83,7 +83,7 @@ local rabbit = { }, on_rightclick = function(self, clicker) -- Feed, tame protect or capture - if mcl_mobs:feed_tame(self, clicker, 1, true, false) then return end + if self:feed_tame(clicker, 1, true, false) then return end if mcl_mobs:protect(self, clicker) then return end if mcl_mobs:capture_mob(self, clicker, 0, 50, 80, false, nil) then return end end, @@ -102,7 +102,7 @@ local rabbit = { end, } -mcl_mobs:register_mob("mobs_mc:rabbit", rabbit) +mcl_mobs.register_mob("mobs_mc:rabbit", rabbit) -- The killer bunny (Only with spawn egg) local killer_bunny = table.copy(rabbit) @@ -128,7 +128,7 @@ killer_bunny.do_custom = function(self) end end -mcl_mobs:register_mob("mobs_mc:killer_bunny", killer_bunny) +mcl_mobs.register_mob("mobs_mc:killer_bunny", killer_bunny) -- Mob spawning rules. -- Different skins depending on spawn location <- we'll get to this when the spawning algorithm is fleshed out @@ -213,7 +213,7 @@ mcl_mobs:spawn(spawn_grass) ]]-- -- Spawn egg -mcl_mobs:register_egg("mobs_mc:rabbit", S("Rabbit"), "#995f40", "#734831", 0) +mcl_mobs.register_egg("mobs_mc:rabbit", S("Rabbit"), "#995f40", "#734831", 0) -- Note: This spawn egg does not exist in Minecraft -mcl_mobs:register_egg("mobs_mc:killer_bunny", S("Killer Bunny"), "#f2f2f2", "#ff0000", 0) +mcl_mobs.register_egg("mobs_mc:killer_bunny", S("Killer Bunny"), "#f2f2f2", "#ff0000", 0) diff --git a/mods/ENTITIES/mobs_mc/salmon.lua b/mods/ENTITIES/mobs_mc/salmon.lua index 954d9d3906..873d4bb74f 100644 --- a/mods/ENTITIES/mobs_mc/salmon.lua +++ b/mods/ENTITIES/mobs_mc/salmon.lua @@ -42,7 +42,7 @@ local salmon = { chance = 1, min = 1, max = 1,}, - {name = "mcl_dye:white", + {name = "mcl_bone_meal:bone_meal", chance = 20, min = 1, max = 1,}, @@ -58,7 +58,8 @@ local salmon = { runaway = true, fear_height = 4, on_rightclick = function(self, clicker) - if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then + local bn = clicker:get_wielded_item():get_name() + if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then self.object:remove() clicker:set_wielded_item("mcl_buckets:bucket_salmon") awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing") @@ -66,7 +67,7 @@ local salmon = { end } -mcl_mobs:register_mob("mobs_mc:salmon", salmon) +mcl_mobs.register_mob("mobs_mc:salmon", salmon) --spawning TODO: in schools @@ -225,4 +226,4 @@ water-16, water+1) --spawn egg -mcl_mobs:register_egg("mobs_mc:salmon", S("Salmon"), "#a00f10", "#0e8474", 0) +mcl_mobs.register_egg("mobs_mc:salmon", S("Salmon"), "#a00f10", "#0e8474", 0) diff --git a/mods/ENTITIES/mobs_mc/sheep.lua b/mods/ENTITIES/mobs_mc/sheep.lua index b27ddfd345..caa22205b3 100644 --- a/mods/ENTITIES/mobs_mc/sheep.lua +++ b/mods/ENTITIES/mobs_mc/sheep.lua @@ -52,7 +52,7 @@ end local gotten_texture = { "blank.png", "mobs_mc_sheep.png" } --mcsheep -mcl_mobs:register_mob("mobs_mc:sheep", { +mcl_mobs.register_mob("mobs_mc:sheep", { description = S("Sheep"), type = "animal", spawn_class = "passive", @@ -205,7 +205,7 @@ mcl_mobs:register_mob("mobs_mc:sheep", { on_rightclick = function(self, clicker) local item = clicker:get_wielded_item() - if mcl_mobs:feed_tame(self, clicker, 1, true, false) then return end + if self:feed_tame(clicker, 1, true, false) then return end if mcl_mobs:protect(self, clicker) then return end if item:get_name() == "mcl_tools:shears" and not self.gotten and not self.child then @@ -267,7 +267,7 @@ mcl_mobs:register_mob("mobs_mc:sheep", { on_breed = function(parent1, parent2) -- Breed sheep and choose a fur color for the child. local pos = parent1.object:get_pos() - local child = mcl_mobs:spawn_child(pos, parent1.name) + local child = mcl_mobs.spawn_child(pos, parent1.name) if child then local ent_c = child:get_luaentity() local color1 = parent1.color @@ -365,4 +365,4 @@ mcl_vars.mg_overworld_min, mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:sheep", S("Sheep"), "#e7e7e7", "#ffb5b5", 0) +mcl_mobs.register_egg("mobs_mc:sheep", S("Sheep"), "#e7e7e7", "#ffb5b5", 0) diff --git a/mods/ENTITIES/mobs_mc/shulker.lua b/mods/ENTITIES/mobs_mc/shulker.lua index b197fb3ace..46737e90fd 100644 --- a/mods/ENTITIES/mobs_mc/shulker.lua +++ b/mods/ENTITIES/mobs_mc/shulker.lua @@ -30,7 +30,7 @@ local function check_spot(pos) end local pr = PseudoRandom(os.time()*(-334)) -- animation 45-80 is transition between passive and attack stance -mcl_mobs:register_mob("mobs_mc:shulker", { +mcl_mobs.register_mob("mobs_mc:shulker", { description = S("Shulker"), type = "monster", spawn_class = "hostile", @@ -83,10 +83,10 @@ mcl_mobs:register_mob("mobs_mc:shulker", { end if self.state == "walk" or self.state == "stand" then self.state = "stand" - mcl_mobs:set_animation(self, "stand") + self:set_animation("stand") end if self.state == "attack" then - mcl_mobs:set_animation(self, "punch") + self:set_animation("punch") end self.path.way = false self.look_at_players = false @@ -134,7 +134,7 @@ mcl_mobs:register_mob("mobs_mc:shulker", { for n=1, math.min(8, #nodes) do local r = pr:next(1, #nodes) local nodepos = nodes[r] - local tg = vector.offset(nodepos,0,1,0) + local tg = vector.offset(nodepos,0,0.5,0) if check_spot(tg) then self.object:set_pos(tg) node_ok = true @@ -152,7 +152,7 @@ mcl_mobs:register_mob("mobs_mc:shulker", { }) -- bullet arrow (weapon) -mcl_mobs:register_arrow("mobs_mc:shulkerbullet", { +mcl_mobs.register_arrow("mobs_mc:shulkerbullet", { visual = "sprite", visual_size = {x = 0.25, y = 0.25}, textures = {"mobs_mc_shulkerbullet.png"}, @@ -177,7 +177,7 @@ mcl_mobs:register_arrow("mobs_mc:shulkerbullet", { }) -mcl_mobs:register_egg("mobs_mc:shulker", S("Shulker"), "#946694", "#4d3852", 0) +mcl_mobs.register_egg("mobs_mc:shulker", S("Shulker"), "#946694", "#4d3852", 0) --[[ mcl_mobs:spawn_specific( diff --git a/mods/ENTITIES/mobs_mc/silverfish.lua b/mods/ENTITIES/mobs_mc/silverfish.lua index f524581bd8..e0bcc23aa7 100644 --- a/mods/ENTITIES/mobs_mc/silverfish.lua +++ b/mods/ENTITIES/mobs_mc/silverfish.lua @@ -4,7 +4,7 @@ local S = minetest.get_translator("mobs_mc") -mcl_mobs:register_mob("mobs_mc:silverfish", { +mcl_mobs.register_mob("mobs_mc:silverfish", { description = S("Silverfish"), type = "monster", spawn_class = "hostile", @@ -23,7 +23,7 @@ mcl_mobs:register_mob("mobs_mc:silverfish", { {"mobs_mc_silverfish.png"}, }, pathfinding = 1, - visual_size = {x=3, y=3}, + visual_size = {x = 3, y = 3}, sounds = { random = "mobs_mc_silverfish_idle", death = "mobs_mc_silverfish_death", @@ -45,96 +45,14 @@ mcl_mobs:register_mob("mobs_mc:silverfish", { }, replace_rate = 2, animation = { - speed_normal = 25, speed_run = 50, - stand_start = 0, stand_end = 20, - walk_start = 0, walk_end = 20, - run_start = 0, run_end = 20, + speed_normal = 25, speed_run = 50, + stand_start = 0, stand_end = 20, + walk_start = 0, walk_end = 20, + run_start = 0, run_end = 20, }, view_range = 16, attack_type = "dogfight", damage = 1, - reach = 1, }) -mcl_mobs:register_egg("mobs_mc:silverfish", S("Silverfish"), "#6d6d6d", "#313131", 0) - --- Monster egg blocks (Minetest Game) -if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then - local spawn_silverfish = function(pos, oldnode, oldmetadata, digger) - if not minetest.is_creative_enabled(digger:get_player_name()) then - minetest.add_entity(pos, "mobs_mc:silverfish") - end - end - minetest.register_node("mobs_mc:monster_egg_stone", { - description = "Stone Monster Egg", - tiles = {"default_stone.png"}, - groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, - drop = '', - is_ground_content = true, - sounds = default.node_sound_stone_defaults(), - after_dig_node = spawn_silverfish, - }) - - minetest.register_node("mobs_mc:monster_egg_cobble", { - description = "Cobblestone Monster Egg", - tiles = {"default_cobble.png"}, - is_ground_content = false, - groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, - drop = '', - sounds = default.node_sound_stone_defaults(), - after_dig_node = spawn_silverfish, - }) - - minetest.register_node("mobs_mc:monster_egg_mossycobble", { - description = "Mossy Cobblestone Monster Egg", - tiles = {"default_mossycobble.png"}, - is_ground_content = false, - groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, - drop = '', - sounds = default.node_sound_stone_defaults(), - after_dig_node = spawn_silverfish, - }) - - minetest.register_node("mobs_mc:monster_egg_stonebrick", { - description = "Stone Brick Monster Egg", - paramtype2 = "facedir", - place_param2 = 0, - tiles = {"default_stone_brick.png"}, - is_ground_content = false, - groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, - drop = '', - sounds = default.node_sound_stone_defaults(), - after_dig_node = spawn_silverfish, - }) - - minetest.register_node("mobs_mc:monster_egg_stone_block", { - description = "Stone Block Monster Egg", - tiles = {"default_stone_block.png"}, - is_ground_content = false, - groups = {oddly_breakable_by_hand = 2, spawns_silverfish = 1}, - drop = '', - sounds = default.node_sound_stone_defaults(), - after_dig_node = spawn_silverfish, - }) - - -- Randomly spawn stone monster eggs in the world - local mg_name = minetest.get_mapgen_setting("mg_name") - local scarcity - if mg_name == "v6" then - scarcity = 28 * 28 * 28 - else - scarcity = 22 * 22 * 22 - end - minetest.register_ore({ - ore_type = "scatter", - ore = "mobs_mc:monster_egg_stone", - wherein = "default:stone", - clust_scarcity = scarcity, - clust_num_ores = 3, - clust_size = 2, - y_min = -31000, - y_max = 31000, - biomes = { "grassland" }, - }) - -end +mcl_mobs.register_egg("mobs_mc:silverfish", S("Silverfish"), "#6d6d6d", "#313131", 0) diff --git a/mods/ENTITIES/mobs_mc/skeleton+stray.lua b/mods/ENTITIES/mobs_mc/skeleton+stray.lua index 18e1d99fe8..ca2fe25fa9 100644 --- a/mods/ENTITIES/mobs_mc/skeleton+stray.lua +++ b/mods/ENTITIES/mobs_mc/skeleton+stray.lua @@ -129,7 +129,7 @@ local skeleton = { harmed_by_heal = true, } -mcl_mobs:register_mob("mobs_mc:skeleton", skeleton) +mcl_mobs.register_mob("mobs_mc:skeleton", skeleton) --################### @@ -166,7 +166,7 @@ table.insert(stray.drops, { end, }) -mcl_mobs:register_mob("mobs_mc:stray", stray) +mcl_mobs.register_mob("mobs_mc:stray", stray) -- Overworld spawn mcl_mobs:spawn_specific( @@ -356,6 +356,6 @@ mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:skeleton", S("Skeleton"), "#c1c1c1", "#494949", 0) +mcl_mobs.register_egg("mobs_mc:skeleton", S("Skeleton"), "#c1c1c1", "#494949", 0) -mcl_mobs:register_egg("mobs_mc:stray", S("Stray"), "#5f7476", "#dae8e7", 0) +mcl_mobs.register_egg("mobs_mc:stray", S("Stray"), "#5f7476", "#dae8e7", 0) diff --git a/mods/ENTITIES/mobs_mc/skeleton_wither.lua b/mods/ENTITIES/mobs_mc/skeleton_wither.lua index f3fd3aab55..94fa78120b 100644 --- a/mods/ENTITIES/mobs_mc/skeleton_wither.lua +++ b/mods/ENTITIES/mobs_mc/skeleton_wither.lua @@ -9,7 +9,7 @@ local S = minetest.get_translator("mobs_mc") --################### WITHER SKELETON --################### -mcl_mobs:register_mob("mobs_mc:witherskeleton", { +mcl_mobs.register_mob("mobs_mc:witherskeleton", { description = S("Wither Skeleton"), type = "monster", spawn_class = "hostile", @@ -117,4 +117,4 @@ mcl_vars.mg_nether_min, mcl_vars.mg_nether_max) --]] -- spawn eggs -mcl_mobs:register_egg("mobs_mc:witherskeleton", S("Wither Skeleton"), "#141414", "#474d4d", 0) +mcl_mobs.register_egg("mobs_mc:witherskeleton", S("Wither Skeleton"), "#141414", "#474d4d", 0) diff --git a/mods/ENTITIES/mobs_mc/slime+magma_cube.lua b/mods/ENTITIES/mobs_mc/slime+magma_cube.lua index 58966e05e5..31ecad1879 100644 --- a/mods/ENTITIES/mobs_mc/slime+magma_cube.lua +++ b/mods/ENTITIES/mobs_mc/slime+magma_cube.lua @@ -1,5 +1,8 @@ --License for code WTFPL and otherwise stated in readmes +-- FIXME: Slimes should spawn only in "slime chunks" which make up only +-- 10% of the map. +-- local S = minetest.get_translator("mobs_mc") -- Returns a function that spawns children in a circle around pos. @@ -7,46 +10,47 @@ local S = minetest.get_translator("mobs_mc") -- self: mob reference -- pos: position of "mother" mob -- child_mod: Mob to spawn --- children_count: Number of children to spawn -- spawn_distance: Spawn distance from "mother" mob -- eject_speed: Initial speed of child mob away from "mother" mob -local spawn_children_on_die = function(child_mob, children_count, spawn_distance, eject_speed) +local spawn_children_on_die = function(child_mob, spawn_distance, eject_speed) return function(self, pos) - local angle, posadd, newpos, dir + local posadd, newpos, dir if not eject_speed then eject_speed = 1 end local mndef = minetest.registered_nodes[minetest.get_node(pos).name] local mother_stuck = mndef and mndef.walkable - angle = math.random(0, math.pi*2) + local angle = math.random(0, math.pi*2) local children = {} - for i=1,children_count do - dir = {x=math.cos(angle),y=0,z=math.sin(angle)} - posadd = vector.multiply(vector.normalize(dir), spawn_distance) - newpos = vector.add(pos, posadd) + local spawn_count = math.random(2, 4) + for i = 1, spawn_count do + dir = vector.new(math.cos(angle), 0, math.sin(angle)) + posadd = vector.normalize(dir) * spawn_distance + newpos = pos + posadd -- If child would end up in a wall, use position of the "mother", unless -- the "mother" was stuck as well - local speed_penalty = 1 - local cndef = minetest.registered_nodes[minetest.get_node(newpos).name] - if (not mother_stuck) and cndef and cndef.walkable then - newpos = pos - speed_penalty = 0.5 + if not mother_stuck then + local cndef = minetest.registered_nodes[minetest.get_node(newpos).name] + if cndef and cndef.walkable then + newpos = pos + eject_speed = eject_speed * 0.5 + end end local mob = minetest.add_entity(newpos, child_mob) - if (not mother_stuck) then - mob:set_velocity(vector.multiply(dir, eject_speed * speed_penalty)) + if not mother_stuck then + mob:set_velocity(dir * eject_speed) end mob:set_yaw(angle - math.pi/2) table.insert(children, mob) - angle = angle + (math.pi*2)/children_count + angle = angle + (math.pi*2) / spawn_count end -- If mother was murdered, children attack the killer after 1 second if self.state == "attack" then minetest.after(1.0, function(children, enemy) - for c=1, #children do - local child = children[c] - local le = child:get_luaentity() - if le ~= nil then + local le + for c = 1, #children do + le = children[c]:get_luaentity() + if le then le.state = "attack" le.attack = enemy end @@ -106,10 +110,10 @@ local slime_big = { jump_height = 5.2, fear_height = 0, spawn_small_alternative = "mobs_mc:slime_small", - on_die = spawn_children_on_die("mobs_mc:slime_small", 4, 1.0, 1.5), + on_die = spawn_children_on_die("mobs_mc:slime_small", 1.0, 1.5), use_texture_alpha = true, } -mcl_mobs:register_mob("mobs_mc:slime_big", slime_big) +mcl_mobs.register_mob("mobs_mc:slime_big", slime_big) local slime_small = table.copy(slime_big) slime_small.sounds.base_pitch = 1.15 @@ -125,8 +129,8 @@ slime_small.walk_velocity = 1.3 slime_small.run_velocity = 1.3 slime_small.jump_height = 4.3 slime_small.spawn_small_alternative = "mobs_mc:slime_tiny" -slime_small.on_die = spawn_children_on_die("mobs_mc:slime_tiny", 4, 0.6, 1.0) -mcl_mobs:register_mob("mobs_mc:slime_small", slime_small) +slime_small.on_die = spawn_children_on_die("mobs_mc:slime_tiny", 0.6, 1.0) +mcl_mobs.register_mob("mobs_mc:slime_small", slime_small) local slime_tiny = table.copy(slime_big) slime_tiny.sounds.base_pitch = 1.3 @@ -151,142 +155,129 @@ slime_tiny.jump_height = 3 slime_tiny.spawn_small_alternative = nil slime_tiny.on_die = nil -mcl_mobs:register_mob("mobs_mc:slime_tiny", slime_tiny) +mcl_mobs.register_mob("mobs_mc:slime_tiny", slime_tiny) -local smin = mcl_vars.mg_overworld_min -local smax = mobs_mc.water_level - 23 +local water_level = mobs_mc.water_level + +local cave_biomes = { + "FlowerForest_underground", + "JungleEdge_underground", + "StoneBeach_underground", + "MesaBryce_underground", + "Mesa_underground", + "RoofedForest_underground", + "Jungle_underground", + "Swampland_underground", + "MushroomIsland_underground", + "BirchForest_underground", + "Plains_underground", + "MesaPlateauF_underground", + "ExtremeHills_underground", + "MegaSpruceTaiga_underground", + "BirchForestM_underground", + "SavannaM_underground", + "MesaPlateauFM_underground", + "Desert_underground", + "Savanna_underground", + "Forest_underground", + "SunflowerPlains_underground", + "ColdTaiga_underground", + "IcePlains_underground", + "IcePlainsSpikes_underground", + "MegaTaiga_underground", + "Taiga_underground", + "ExtremeHills+_underground", + "JungleM_underground", + "ExtremeHillsM_underground", + "JungleEdgeM_underground", + "MangroveSwamp_underground" +} + +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 mcl_mobs:spawn_specific( "mobs_mc:slime_tiny", "overworld", "ground", -{ -"FlowerForest_underground", -"JungleEdge_underground", -"StoneBeach_underground", -"MesaBryce_underground", -"Mesa_underground", -"RoofedForest_underground", -"Jungle_underground", -"Swampland_underground", -"MushroomIsland_underground", -"BirchForest_underground", -"Plains_underground", -"MesaPlateauF_underground", -"ExtremeHills_underground", -"MegaSpruceTaiga_underground", -"BirchForestM_underground", -"SavannaM_underground", -"MesaPlateauFM_underground", -"Desert_underground", -"Savanna_underground", -"Forest_underground", -"SunflowerPlains_underground", -"ColdTaiga_underground", -"IcePlains_underground", -"IcePlainsSpikes_underground", -"MegaTaiga_underground", -"Taiga_underground", -"ExtremeHills+_underground", -"JungleM_underground", -"ExtremeHillsM_underground", -"JungleEdgeM_underground", -}, +cave_biomes, 0, minetest.LIGHT_MAX+1, 30, 12000, 4, -smin, -smax) +cave_min, +cave_max) + +mcl_mobs:spawn_specific( +"mobs_mc:slime_tiny", +"overworld", +"ground", +swampy_biomes, +0, +swamp_light_max, +30, +12000, +4, +swamp_min, +swamp_max) mcl_mobs:spawn_specific( "mobs_mc:slime_small", "overworld", "ground", -{ -"FlowerForest_underground", -"JungleEdge_underground", -"StoneBeach_underground", -"MesaBryce_underground", -"Mesa_underground", -"RoofedForest_underground", -"Jungle_underground", -"Swampland_underground", -"MushroomIsland_underground", -"BirchForest_underground", -"Plains_underground", -"MesaPlateauF_underground", -"ExtremeHills_underground", -"MegaSpruceTaiga_underground", -"BirchForestM_underground", -"SavannaM_underground", -"MesaPlateauFM_underground", -"Desert_underground", -"Savanna_underground", -"Forest_underground", -"SunflowerPlains_underground", -"ColdTaiga_underground", -"IcePlains_underground", -"IcePlainsSpikes_underground", -"MegaTaiga_underground", -"Taiga_underground", -"ExtremeHills+_underground", -"JungleM_underground", -"ExtremeHillsM_underground", -"JungleEdgeM_underground", -}, +cave_biomes, 0, minetest.LIGHT_MAX+1, 30, 8500, 4, -smin, -smax) +cave_min, +cave_max) + +mcl_mobs:spawn_specific( +"mobs_mc:slime_small", +"overworld", +"ground", +swampy_biomes, +0, +swamp_light_max, +30, +8500, +4, +swamp_min, +swamp_max) mcl_mobs:spawn_specific( "mobs_mc:slime_big", "overworld", "ground", -{ -"FlowerForest_underground", -"JungleEdge_underground", -"StoneBeach_underground", -"MesaBryce_underground", -"Mesa_underground", -"RoofedForest_underground", -"Jungle_underground", -"Swampland_underground", -"MushroomIsland_underground", -"BirchForest_underground", -"Plains_underground", -"MesaPlateauF_underground", -"ExtremeHills_underground", -"MegaSpruceTaiga_underground", -"BirchForestM_underground", -"SavannaM_underground", -"MesaPlateauFM_underground", -"Desert_underground", -"Savanna_underground", -"Forest_underground", -"SunflowerPlains_underground", -"ColdTaiga_underground", -"IcePlains_underground", -"IcePlainsSpikes_underground", -"MegaTaiga_underground", -"Taiga_underground", -"ExtremeHills+_underground", -"JungleM_underground", -"ExtremeHillsM_underground", -"JungleEdgeM_underground", -}, +cave_biomes, 0, minetest.LIGHT_MAX+1, 30, 10000, 4, -smin, -smax) +cave_min, +cave_max) + +mcl_mobs:spawn_specific( +"mobs_mc:slime_big", +"overworld", +"ground", +swampy_biomes, +0, +swamp_light_max, +30, +10000, +4, +swamp_min, +swamp_max) -- Magma cube local magma_cube_big = { @@ -345,10 +336,10 @@ local magma_cube_big = { walk_chance = 0, fear_height = 0, spawn_small_alternative = "mobs_mc:magma_cube_small", - on_die = spawn_children_on_die("mobs_mc:magma_cube_small", 3, 0.8, 1.5), + on_die = spawn_children_on_die("mobs_mc:magma_cube_small", 0.8, 1.5), fire_resistant = true, } -mcl_mobs:register_mob("mobs_mc:magma_cube_big", magma_cube_big) +mcl_mobs.register_mob("mobs_mc:magma_cube_big", magma_cube_big) local magma_cube_small = table.copy(magma_cube_big) magma_cube_small.sounds.jump = "mobs_mc_magma_cube_small" @@ -368,8 +359,8 @@ magma_cube_small.damage = 4 magma_cube_small.reach = 2.75 magma_cube_small.armor = 66 magma_cube_small.spawn_small_alternative = "mobs_mc:magma_cube_tiny" -magma_cube_small.on_die = spawn_children_on_die("mobs_mc:magma_cube_tiny", 4, 0.6, 1.0) -mcl_mobs:register_mob("mobs_mc:magma_cube_small", magma_cube_small) +magma_cube_small.on_die = spawn_children_on_die("mobs_mc:magma_cube_tiny", 0.6, 1.0) +mcl_mobs.register_mob("mobs_mc:magma_cube_small", magma_cube_small) local magma_cube_tiny = table.copy(magma_cube_big) magma_cube_tiny.sounds.jump = "mobs_mc_magma_cube_small" @@ -391,62 +382,55 @@ magma_cube_tiny.drops = {} magma_cube_tiny.spawn_small_alternative = nil magma_cube_tiny.on_die = nil -mcl_mobs:register_mob("mobs_mc:magma_cube_tiny", magma_cube_tiny) +mcl_mobs.register_mob("mobs_mc:magma_cube_tiny", magma_cube_tiny) -local mmin = mcl_vars.mg_nether_min -local mmax = mcl_vars.mg_nether_max +local magma_cube_biomes = {"Nether", "BasaltDelta"} +local nether_min = mcl_vars.mg_nether_min +local nether_max = mcl_vars.mg_nether_max mcl_mobs:spawn_specific( "mobs_mc:magma_cube_tiny", "nether", "ground", -{ -"Nether", -"BasaltDelta", -}, +magma_cube_biomes, 0, minetest.LIGHT_MAX+1, 30, 15000, 4, -mmin, -mmax) - +nether_min, +nether_max) mcl_mobs:spawn_specific( "mobs_mc:magma_cube_small", "nether", "ground", -{ -"Nether", -"BasaltDelta", -}, +magma_cube_biomes, 0, minetest.LIGHT_MAX+1, 30, 15500, 4, -mmin, -mmax) +nether_min, +nether_max) mcl_mobs:spawn_specific( "mobs_mc:magma_cube_big", "nether", "ground", -{ -"Nether", -"BasaltDelta", -}, +magma_cube_biomes, 0, minetest.LIGHT_MAX+1, 30, 16000, 4, -mmin, -mmax) +nether_min, +nether_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:magma_cube_big", S("Magma Cube"), "#350000", "#fcfc00") +mcl_mobs.register_egg("mobs_mc:magma_cube_big", S("Magma Cube"), "#350000", "#fcfc00") -mcl_mobs:register_egg("mobs_mc:slime_big", S("Slime"), "#52a03e", "#7ebf6d") +mcl_mobs.register_egg("mobs_mc:slime_big", S("Slime"), "#52a03e", "#7ebf6d") + +-- FIXME: add spawn eggs for small and tiny slimes and magma cubes diff --git a/mods/ENTITIES/mobs_mc/snowman.lua b/mods/ENTITIES/mobs_mc/snowman.lua index f282c45b84..f9f0043c2f 100644 --- a/mods/ENTITIES/mobs_mc/snowman.lua +++ b/mods/ENTITIES/mobs_mc/snowman.lua @@ -20,7 +20,7 @@ local gotten_texture = { "blank.png", } -mcl_mobs:register_mob("mobs_mc:snowman", { +mcl_mobs.register_mob("mobs_mc:snowman", { description = S("Snow Golem"), type = "npc", spawn_class = "passive", @@ -196,4 +196,4 @@ function mobs_mc.check_snow_golem_summon(pos) end -- Spawn egg -mcl_mobs:register_egg("mobs_mc:snowman", S("Snow Golem"), "#f2f2f2", "#fd8f47", 0) +mcl_mobs.register_egg("mobs_mc:snowman", S("Snow Golem"), "#f2f2f2", "#fd8f47", 0) diff --git a/mods/ENTITIES/mobs_mc/sounds/mobs_mc_axolotl1.ogg b/mods/ENTITIES/mobs_mc/sounds/mobs_mc_axolotl1.ogg new file mode 100644 index 0000000000..b3d9c59678 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/sounds/mobs_mc_axolotl1.ogg differ diff --git a/mods/ENTITIES/mobs_mc/sounds/mobs_mc_axolotl2.ogg b/mods/ENTITIES/mobs_mc/sounds/mobs_mc_axolotl2.ogg new file mode 100644 index 0000000000..11141f6ccd Binary files /dev/null and b/mods/ENTITIES/mobs_mc/sounds/mobs_mc_axolotl2.ogg differ diff --git a/mods/ENTITIES/mobs_mc/sounds/mobs_mc_axolotl_hurt.ogg b/mods/ENTITIES/mobs_mc/sounds/mobs_mc_axolotl_hurt.ogg new file mode 100644 index 0000000000..dddf298b6e Binary files /dev/null and b/mods/ENTITIES/mobs_mc/sounds/mobs_mc_axolotl_hurt.ogg differ diff --git a/mods/ENTITIES/mobs_mc/spider.lua b/mods/ENTITIES/mobs_mc/spider.lua index 1d68256b34..403edba6da 100644 --- a/mods/ENTITIES/mobs_mc/spider.lua +++ b/mods/ENTITIES/mobs_mc/spider.lua @@ -111,7 +111,7 @@ local spider = { run_end = 20, }, } -mcl_mobs:register_mob("mobs_mc:spider", spider) +mcl_mobs.register_mob("mobs_mc:spider", spider) -- Cave spider local cave_spider = table.copy(spider) @@ -141,7 +141,7 @@ 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 -mcl_mobs:register_mob("mobs_mc:cave_spider", cave_spider) +mcl_mobs.register_mob("mobs_mc:cave_spider", cave_spider) mcl_mobs:spawn_specific( @@ -293,5 +293,5 @@ mcl_vars.mg_overworld_min, mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:spider", S("Spider"), "#342d26", "#a80e0e", 0) -mcl_mobs:register_egg("mobs_mc:cave_spider", S("Cave Spider"), "#0c424e", "#a80e0e", 0) +mcl_mobs.register_egg("mobs_mc:spider", S("Spider"), "#342d26", "#a80e0e", 0) +mcl_mobs.register_egg("mobs_mc:cave_spider", S("Cave Spider"), "#0c424e", "#a80e0e", 0) diff --git a/mods/ENTITIES/mobs_mc/squid.lua b/mods/ENTITIES/mobs_mc/squid.lua index 678f3ad50f..a692fd8d47 100644 --- a/mods/ENTITIES/mobs_mc/squid.lua +++ b/mods/ENTITIES/mobs_mc/squid.lua @@ -6,7 +6,7 @@ local S = minetest.get_translator("mobs_mc") -mcl_mobs:register_mob("mobs_mc:squid", { +mcl_mobs.register_mob("mobs_mc:squid", { description = S("Squid"), type = "animal", spawn_class = "water", @@ -40,7 +40,7 @@ mcl_mobs:register_mob("mobs_mc:squid", { run_end = 60, }, drops = { - {name = "mcl_dye:black", + {name = "mcl_mobitems:ink_sac", chance = 1, min = 1, max = 3, @@ -217,4 +217,4 @@ water-16, water+1) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:squid", S("Squid"), "#223b4d", "#708999", 0) +mcl_mobs.register_egg("mobs_mc:squid", S("Squid"), "#223b4d", "#708999", 0) diff --git a/mods/ENTITIES/mobs_mc/strider.lua b/mods/ENTITIES/mobs_mc/strider.lua index 8344f48da7..a49845f7ee 100644 --- a/mods/ENTITIES/mobs_mc/strider.lua +++ b/mods/ENTITIES/mobs_mc/strider.lua @@ -123,7 +123,7 @@ local strider = { local wielditem = clicker:get_wielded_item() if wielditem:get_name() ~= "mcl_crimson:warped_fungus" then - if mcl_mobs:feed_tame(self, clicker, 1, true, true) then return end + if self:feed_tame(clicker, 1, true, true) then return end end if self.child then @@ -192,7 +192,7 @@ local strider = { end, } -mcl_mobs:register_mob("mobs_mc:strider", strider) +mcl_mobs.register_mob("mobs_mc:strider", strider) -- Baby strider. @@ -200,7 +200,6 @@ local baby_strider = table.copy(strider) baby_strider.collisionbox = {-.3, -0.01, -.3, .3, 0.94, .3} baby_strider.xp_min = 13 baby_strider.xp_max = 13 -baby_strider.visual_size = {x=strider.visual_size.x/2, y=strider.visual_size.y/2} textures = { { "extra_mobs_strider.png", "extra_mobs_trans.png", @@ -209,7 +208,7 @@ baby_strider.walk_velocity = 1.2 baby_strider.run_velocity = 2.4 baby_strider.child = 1 -mcl_mobs:register_mob("mobs_mc:baby_strider", baby_strider) +mcl_mobs.register_mob("mobs_mc:baby_strider", baby_strider) -- Regular spawning in the Nether @@ -246,4 +245,4 @@ mcl_mobs:spawn_setup({ }) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:strider", S("Strider"), "#000000", "#FF0000", 0) +mcl_mobs.register_egg("mobs_mc:strider", S("Strider"), "#000000", "#FF0000", 0) diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_black.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_black.png new file mode 100644 index 0000000000..8f13938f8a Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_black.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_brown.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_brown.png new file mode 100644 index 0000000000..b90ba3c88d Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_brown.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_green.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_green.png new file mode 100644 index 0000000000..4dca4fdf5b Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_green.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_pink.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_pink.png new file mode 100644 index 0000000000..193a8e0875 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_pink.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_purple.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_purple.png new file mode 100644 index 0000000000..bd7f67c6ff Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_purple.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_white.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_white.png new file mode 100644 index 0000000000..15b3ba43d8 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_white.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_yellow.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_yellow.png new file mode 100644 index 0000000000..6b3fd6157b Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_axolotl_yellow.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_enderman_block.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_enderman_block.png deleted file mode 100644 index 97d949d8a3..0000000000 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_enderman_block.png and /dev/null differ diff --git a/mods/ENTITIES/mobs_mc/tropical_fish.lua b/mods/ENTITIES/mobs_mc/tropical_fish.lua index 04ca5863b9..bb9b63f64d 100644 --- a/mods/ENTITIES/mobs_mc/tropical_fish.lua +++ b/mods/ENTITIES/mobs_mc/tropical_fish.lua @@ -87,7 +87,7 @@ local tropical_fish = { chance = 1, min = 1, max = 1,}, - {name = "mcl_dye:white", + {name = "mcl_bone_meal:bone_meal", chance = 20, min = 1, max = 1,}, @@ -103,16 +103,22 @@ local tropical_fish = { runaway = true, fear_height = 4, on_rightclick = function(self, clicker) - if clicker:get_wielded_item():get_name() == "mcl_buckets:bucket_water" then - self.object:remove() - clicker:set_wielded_item("mcl_buckets:bucket_tropical_fish") + local bn = clicker:get_wielded_item():get_name() + if bn == "mcl_buckets:bucket_water" or bn == "mcl_buckets:bucket_river_water" then + if clicker:set_wielded_item("mcl_buckets:bucket_tropical_fish") then + local it = clicker:get_wielded_item() + local m = it:get_meta() + m:set_string("properties",minetest.serialize(self.object:get_properties())) + clicker:set_wielded_item(it) + self.object:remove() + end awards.unlock(clicker:get_player_name(), "mcl:tacticalFishing") end end, on_spawn = set_textures, } -mcl_mobs:register_mob("mobs_mc:tropical_fish", tropical_fish) +mcl_mobs.register_mob("mobs_mc:tropical_fish", tropical_fish) local water = 0 mcl_mobs:spawn_specific( @@ -183,4 +189,4 @@ water-16, water+1) --spawn egg -mcl_mobs:register_egg("mobs_mc:tropical_fish", S("Tropical fish"), "#ef6915", "#fff9ef", 0) +mcl_mobs.register_egg("mobs_mc:tropical_fish", S("Tropical fish"), "#ef6915", "#fff9ef", 0) diff --git a/mods/ENTITIES/mobs_mc/vex.lua b/mods/ENTITIES/mobs_mc/vex.lua index 4cfa4ed480..f2cd6f14bc 100644 --- a/mods/ENTITIES/mobs_mc/vex.lua +++ b/mods/ENTITIES/mobs_mc/vex.lua @@ -9,7 +9,7 @@ local S = minetest.get_translator("mobs_mc") --################### VEX --################### -mcl_mobs:register_mob("mobs_mc:vex", { +mcl_mobs.register_mob("mobs_mc:vex", { description = S("Vex"), type = "monster", spawn_class = "hostile", @@ -94,4 +94,4 @@ mcl_mobs:register_mob("mobs_mc:vex", { -- spawn eggs -mcl_mobs:register_egg("mobs_mc:vex", S("Vex"), "#7a90a4", "#e8edf1", 0) +mcl_mobs.register_egg("mobs_mc:vex", S("Vex"), "#7a90a4", "#e8edf1", 0) diff --git a/mods/ENTITIES/mobs_mc/villager.lua b/mods/ENTITIES/mobs_mc/villager.lua index 7b7eafda57..9215416b8b 100644 --- a/mods/ENTITIES/mobs_mc/villager.lua +++ b/mods/ENTITIES/mobs_mc/villager.lua @@ -30,6 +30,8 @@ local DEFAULT_WALK_CHANCE = 33 -- chance to walk in percent, if no player nearby local PLAYER_SCAN_INTERVAL = 5 -- every X seconds, villager looks for players nearby local PLAYER_SCAN_RADIUS = 4 -- scan radius for looking for nearby players +local RESETTLE_DISTANCE = 100 -- If a mob is transported this far from home, it gives up bed and job and resettles + local PATHFINDING = "gowp" --[=======[ TRADING ]=======] @@ -477,7 +479,7 @@ local professions = { }, { { { "mcl_core:gold_ingot", 3, 3 }, E1 }, - { E1, { "mcl_dye:blue", 1, 1 } }, + { E1, { "mcl_core:lapis", 1, 1 } }, }, { { { "mcl_mobitems:rabbit_foot", 2, 2 }, E1 }, @@ -807,7 +809,7 @@ local function go_home(entity, sleep) return end - mcl_mobs:gopath(entity,b,function(entity,b) + entity:gopath(b,function(entity,b) local b = entity._bed if not b then @@ -843,7 +845,6 @@ local function take_bed (entity) mcl_log("Can we path to bed: "..minetest.pos_to_string(closest_block) ) local distance_to_block = vector.distance(p, closest_block) mcl_log("Distance: " .. distance_to_block) - if distance_to_block < 2 then local m = minetest.get_meta(closest_block) local owner = m:get_string("villager") @@ -864,7 +865,7 @@ local function take_bed (entity) mcl_log("Set as sleep already..." ) end else - local gp = mcl_mobs:gopath(entity, closest_block,function(self) end) + local gp = entity:gopath(closest_block,function(self) end) if gp then mcl_log("Nice bed. I'll defintely take it as I can path") else @@ -885,11 +886,18 @@ local function has_golem(pos) end end +local function monsters_near(self) + for _,o in pairs(minetest.get_objects_inside_radius(self.object:get_pos(),10)) do + local l = o:get_luaentity() + if l and l.type =="monster" then return true end + end +end + local function has_summon_participants(self) local r = 0 for _,o in pairs(minetest.get_objects_inside_radius(self.object:get_pos(),10)) do local l = o:get_luaentity() - --TODO check for panicking or gossiping + --TODO check for gossiping if l and l.name == "mobs_mc:villager" then r = r + 1 end end return r > 2 @@ -913,7 +921,8 @@ local function check_summon(self,dtime) if self._summon_timer and self._summon_timer > 30 then local pos = self.object:get_pos() self._summon_timer = 0 - if has_golem(pos) then return false end + if has_golem(pos) then return end + if not monsters_near(self) then return end if not has_summon_participants(self) then return end summon_golem(self) elseif self._summon_timer == nil then @@ -1025,7 +1034,7 @@ local function look_for_job(self, requested_jobsites) if closest_block then mcl_log("It's a free job for me (" .. minetest.pos_to_string(p) .. ")! I might be interested: ".. minetest.pos_to_string(closest_block) ) - local gp = mcl_mobs:gopath(self, closest_block,function(self) + local gp = self:gopath(closest_block,function(self) mcl_log("Arrived at block callback") if self and self.state == "stand" then self.order = WORK @@ -1089,25 +1098,38 @@ local function retrieve_my_jobsite (self) return end +local function remove_job (self) + self._jobsite = nil + if not has_traded(self) then + mcl_log("Cannot retrieve my jobsite. I am now unemployed.") + self._profession = "unemployed" + self._trades = nil + set_textures(self) + else + mcl_log("Cannot retrieve my jobsite but I've traded so only remove jobsite.") + end +end + local function validate_jobsite(self) if self._profession == "unemployed" then return false end - if not retrieve_my_jobsite (self) then - self._jobsite = nil + local job_block = retrieve_my_jobsite (self) + if not job_block then if self.order == WORK then self.order = nil end - if not has_traded(self) then - mcl_log("Cannot retrieve my jobsite. I am now unemployed.") - self._profession = "unemployed" - self._trades = nil - set_textures(self) - else - mcl_log("Cannot retrieve my jobsite but I've traded so only remove jobsite.") - end + remove_job (self) return false else + local resettle = vector.distance(self.object:get_pos(),self._jobsite) > RESETTLE_DISTANCE + mcl_log("Jobsite far, so resettle: " .. tostring(resettle)) + if resettle then + local m = minetest.get_meta(self._jobsite) + m:set_string("villager", nil) + remove_job (self) + return false + end return true end end @@ -1145,7 +1167,7 @@ local function do_work (self) self.order = nil return end - mcl_mobs:gopath(self, jobsite, function(self,jobsite) + self:gopath(jobsite, function(self,jobsite) if not self then --mcl_log("missing self. not good") return false @@ -1187,7 +1209,7 @@ local function go_to_town_bell(self) for _,n in pairs(nn) do mcl_log("Found bell") - local gp = mcl_mobs:gopath(self,n,function(self) + local gp = self:gopath(n,function(self) if self then self.order = GATHERING mcl_log("Callback has a self") @@ -1222,6 +1244,17 @@ local function validate_bed(self) local bed_valid = true local m = minetest.get_meta(self._bed) + + local resettle = vector.distance(self.object:get_pos(),self._bed) > RESETTLE_DISTANCE + mcl_log("Bed far, so resettle: " .. tostring(resettle)) + if resettle then + mcl_log("Resettled. Ditch bed.") + m:set_string("villager", nil) + self._bed = nil + bed_valid = false + return false + end + local owned_by_player = m:get_string("player") mcl_log("Player owner: " .. owned_by_player) if owned_by_player ~= "" then @@ -1229,7 +1262,7 @@ local function validate_bed(self) m:set_string("villager", nil) self._bed = nil bed_valid = false - return + return false end if m:get_string("villager") ~= self._id then @@ -1245,6 +1278,10 @@ end local function do_activity (self) -- Maybe just check we're pathfinding first? + if self.following then + mcl_log("Following, so do not do activity.") + return + end if not validate_bed(self) and self.state ~= PATHFINDING then if self.order == SLEEP then self.order = nil end @@ -1860,7 +1897,7 @@ end) local pick_up = { "mcl_farming:bread", "mcl_farming:carrot_item", "mcl_farming:beetroot_item" , "mcl_farming:potato_item" } -mcl_mobs:register_mob("mobs_mc:villager", { +mcl_mobs.register_mob("mobs_mc:villager", { description = S("Villager"), type = "npc", spawn_class = "passive", @@ -1925,7 +1962,7 @@ mcl_mobs:register_mob("mobs_mc:villager", { end end if clicker and not self.horny then - mcl_mobs:feed_tame(self, clicker, 1, true, false, true) + self:feed_tame(clicker, 1, true, false, true) it:take_item(1) end return it @@ -1948,7 +1985,7 @@ mcl_mobs:register_mob("mobs_mc:villager", { end -- Don't do at night. Go to bed? Maybe do_activity needs it's own method if validate_jobsite(self) and not self.order == WORK then - --mcl_mobs:gopath(self,self._jobsite,function() + --self:gopath(self._jobsite,function() -- minetest.log("sent to jobsite") --end) else @@ -2045,7 +2082,7 @@ mcl_mobs:register_mob("mobs_mc:villager", { self._id=minetest.sha1(minetest.get_gametime()..minetest.pos_to_string(self.object:get_pos())..tostring(math.random())) set_textures(self) end, - on_die = function(self, pos) + on_die = function(self, pos, cmi_cause) -- Close open trade formspecs and give input back to players local trading_players = self._trading_players if trading_players then @@ -2070,6 +2107,14 @@ mcl_mobs:register_mob("mobs_mc:villager", { jobsite_meta:set_string("villager", nil) mcl_log("Died, so bye bye jobsite") end + + if cmi_cause and cmi_cause.puncher then + local l = cmi_cause.puncher:get_luaentity() + if l and math.random(2) == 1 and( l.name == "mobs_mc:zombie" or l.name == "mobs_mc:baby_zombie" or l.name == "mobs_mc:villager_zombie" or l.name == "mobs_mc:husk") then + mcl_util.replace_mob(self.object,"mobs_mc:villager_zombie") + return true + end + end end, on_lightning_strike = function(self, pos, pos2, objects) mcl_util.replace_mob(self.object, "mobs_mc:witch") @@ -2111,4 +2156,4 @@ mobs_mc.water_level+1, mcl_vars.mg_overworld_max) --]] -- spawn eggs -mcl_mobs:register_egg("mobs_mc:villager", S("Villager"), "#563d33", "#bc8b72", 0) +mcl_mobs.register_egg("mobs_mc:villager", S("Villager"), "#563d33", "#bc8b72", 0) diff --git a/mods/ENTITIES/mobs_mc/villager_evoker.lua b/mods/ENTITIES/mobs_mc/villager_evoker.lua index b85001985a..4d46a72600 100644 --- a/mods/ENTITIES/mobs_mc/villager_evoker.lua +++ b/mods/ENTITIES/mobs_mc/villager_evoker.lua @@ -11,7 +11,9 @@ local S = minetest.get_translator("mobs_mc") local pr = PseudoRandom(os.time()*666) -mcl_mobs:register_mob("mobs_mc:evoker", { +local spawned_vexes = {} --this is stored locally so the mobs engine doesn't try to store it in staticdata + +mcl_mobs.register_mob("mobs_mc:evoker", { description = S("Evoker"), type = "monster", spawn_class = "hostile", @@ -42,16 +44,24 @@ mcl_mobs:register_mob("mobs_mc:evoker", { attack_type = "dogfight", -- Summon vexes custom_attack = function(self, to_attack) - local r = pr:next(2,4) + if not spawned_vexes[self] then spawned_vexes[self] = {} end + if #spawned_vexes[self] >= 7 then return end + for k,v in pairs(spawned_vexes[self]) do + if not v or v.health <= 0 then table.remove(spawned_vexes[self],k) end + end + local r = pr:next(1,4) local basepos = self.object:get_pos() basepos.y = basepos.y + 1 for i=1, r do local spawnpos = vector.add(basepos, minetest.yaw_to_dir(pr:next(0,360))) local vex = minetest.add_entity(spawnpos, "mobs_mc:vex") local ent = vex:get_luaentity() + -- Mark vexes as summoned and start their life clock (they take damage it reaches 0) ent._summoned = true ent._lifetimer = pr:next(33, 108) + + table.insert(spawned_vexes[self],ent) end end, shoot_interval = 15, @@ -79,4 +89,4 @@ mcl_mobs:register_mob("mobs_mc:evoker", { }) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:evoker", S("Evoker"), "#959b9b", "#1e1c1a", 0) +mcl_mobs.register_egg("mobs_mc:evoker", S("Evoker"), "#959b9b", "#1e1c1a", 0) diff --git a/mods/ENTITIES/mobs_mc/villager_illusioner.lua b/mods/ENTITIES/mobs_mc/villager_illusioner.lua index fd4a7e183f..f7c034eb0a 100644 --- a/mods/ENTITIES/mobs_mc/villager_illusioner.lua +++ b/mods/ENTITIES/mobs_mc/villager_illusioner.lua @@ -6,7 +6,7 @@ local S = minetest.get_translator("mobs_mc") local mod_bows = minetest.get_modpath("mcl_bows") ~= nil -mcl_mobs:register_mob("mobs_mc:illusioner", { +mcl_mobs.register_mob("mobs_mc:illusioner", { description = S("Illusioner"), type = "monster", spawn_class = "hostile", @@ -65,4 +65,4 @@ mcl_mobs:register_mob("mobs_mc:illusioner", { fear_height = 4, }) -mcl_mobs:register_egg("mobs_mc:illusioner", S("Illusioner"), "#3f5cbb", "#8a8686", 0) +mcl_mobs.register_egg("mobs_mc:illusioner", S("Illusioner"), "#3f5cbb", "#8a8686", 0) diff --git a/mods/ENTITIES/mobs_mc/villager_vindicator.lua b/mods/ENTITIES/mobs_mc/villager_vindicator.lua index 67db516801..b2dcb827a8 100644 --- a/mods/ENTITIES/mobs_mc/villager_vindicator.lua +++ b/mods/ENTITIES/mobs_mc/villager_vindicator.lua @@ -10,7 +10,7 @@ local S = minetest.get_translator("mobs_mc") --################### -mcl_mobs:register_mob("mobs_mc:vindicator", { +mcl_mobs.register_mob("mobs_mc:vindicator", { description = S("Vindicator"), type = "monster", spawn_class = "hostile", @@ -77,4 +77,4 @@ mcl_mobs:register_mob("mobs_mc:vindicator", { }) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:vindicator", S("Vindicator"), "#959b9b", "#275e61", 0) +mcl_mobs.register_egg("mobs_mc:vindicator", S("Vindicator"), "#959b9b", "#275e61", 0) diff --git a/mods/ENTITIES/mobs_mc/villager_zombie.lua b/mods/ENTITIES/mobs_mc/villager_zombie.lua index d0f4acd14d..9a1e30e703 100644 --- a/mods/ENTITIES/mobs_mc/villager_zombie.lua +++ b/mods/ENTITIES/mobs_mc/villager_zombie.lua @@ -25,7 +25,7 @@ local professions = { nitwit = "mobs_mc_villager.png", } -mcl_mobs:register_mob("mobs_mc:villager_zombie", { +mcl_mobs.register_mob("mobs_mc:villager_zombie", { description = S("Zombie Villager"), type = "monster", spawn_class = "hostile", @@ -231,4 +231,4 @@ mcl_vars.mg_overworld_max) --mcl_mobs:spawn_specific("mobs_mc:villager_zombie", "overworld", "ground", 0, 7, 30, 60000, 4, mcl_vars.mg_overworld_min, mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:villager_zombie", S("Zombie Villager"), "#563d33", "#799c66", 0) +mcl_mobs.register_egg("mobs_mc:villager_zombie", S("Zombie Villager"), "#563d33", "#799c66", 0) diff --git a/mods/ENTITIES/mobs_mc/witch.lua b/mods/ENTITIES/mobs_mc/witch.lua index 5d835eab52..266d5b0c35 100644 --- a/mods/ENTITIES/mobs_mc/witch.lua +++ b/mods/ENTITIES/mobs_mc/witch.lua @@ -12,7 +12,7 @@ local S = minetest.get_translator("mobs_mc") -mcl_mobs:register_mob("mobs_mc:witch", { +mcl_mobs.register_mob("mobs_mc:witch", { description = S("Witch"), type = "monster", spawn_class = "hostile", @@ -73,7 +73,7 @@ mcl_mobs:register_mob("mobs_mc:witch", { }) -- potion projectile (EXPERIMENTAL) -mcl_mobs:register_arrow("mobs_mc:potion_arrow", { +mcl_mobs.register_arrow("mobs_mc:potion_arrow", { visual = "sprite", visual_size = {x = 0.5, y = 0.5}, --textures = {"vessels_glass_bottle.png"}, --TODO fix to else if default @@ -105,6 +105,6 @@ mcl_mobs:register_arrow("mobs_mc:potion_arrow", { --mcl_mobs:spawn_specific("mobs_mc:witch", { "mcl_core:jungletree", "mcl_core:jungleleaves", "mcl_flowers:fern", "mcl_core:vine" }, {"air"}, 0, minetest.LIGHT_MAX-6, 12, 20000, 2, mobs_mc.water_level-6, mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:witch", S("Witch"), "#340000", "#51a03e", 0, true) +mcl_mobs.register_egg("mobs_mc:witch", S("Witch"), "#340000", "#51a03e", 0, true) mcl_wip.register_wip_item("mobs_mc:witch") diff --git a/mods/ENTITIES/mobs_mc/wither.lua b/mods/ENTITIES/mobs_mc/wither.lua index 26f90be5a0..dda2beafa5 100644 --- a/mods/ENTITIES/mobs_mc/wither.lua +++ b/mods/ENTITIES/mobs_mc/wither.lua @@ -9,7 +9,7 @@ local S = minetest.get_translator("mobs_mc") --################### WITHER --################### -mcl_mobs:register_mob("mobs_mc:wither", { +mcl_mobs.register_mob("mobs_mc:wither", { description = S("Wither"), type = "monster", spawn_class = "hostile", @@ -85,7 +85,7 @@ mcl_mobs:register_mob("mobs_mc:wither", { 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" } -mcl_mobs:register_arrow("mobs_mc:wither_skull", { +mcl_mobs.register_arrow("mobs_mc:wither_skull", { visual = "sprite", visual_size = {x = 0.75, y = 0.75}, -- TODO: 3D projectile, replace tetxture @@ -98,7 +98,7 @@ mcl_mobs:register_arrow("mobs_mc:wither_skull", { full_punch_interval = 0.5, damage_groups = {fleshy = 8}, }, nil) - mcl_mobs:boom(self, self.object:get_pos(), 1) + mcl_mobs.mob_class.boom(self,self.object:get_pos(), 1) end, hit_mob = function(self, mob) @@ -106,7 +106,7 @@ mcl_mobs:register_arrow("mobs_mc:wither_skull", { full_punch_interval = 0.5, damage_groups = {fleshy = 8}, }, nil) - mcl_mobs:boom(self, self.object:get_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 n = minetest.find_node_near(mob:get_pos(),2,wither_rose_soil) @@ -123,12 +123,12 @@ mcl_mobs:register_arrow("mobs_mc:wither_skull", { -- node hit, explode hit_node = function(self, pos, node) - mcl_mobs:boom(self, pos, 1) + mcl_mobs.mob_class.boom(self,pos, 1) end }) -- TODO: Add blue wither skull --Spawn egg -mcl_mobs:register_egg("mobs_mc:wither", S("Wither"), "#4f4f4f", "#4f4f4f", 0, true) +mcl_mobs.register_egg("mobs_mc:wither", S("Wither"), "#4f4f4f", "#4f4f4f", 0, true) mcl_wip.register_wip_item("mobs_mc:wither") diff --git a/mods/ENTITIES/mobs_mc/wolf.lua b/mods/ENTITIES/mobs_mc/wolf.lua index 711a467991..9220695084 100644 --- a/mods/ENTITIES/mobs_mc/wolf.lua +++ b/mods/ENTITIES/mobs_mc/wolf.lua @@ -71,7 +71,7 @@ local wolf = { ent = dog:get_luaentity() ent.owner = clicker:get_player_name() ent.tamed = true - mcl_mobs:set_animation(ent, "sit") + ent:set_animation("sit") ent.walk_chance = 0 ent.jump = false ent.health = self.health @@ -100,7 +100,7 @@ local wolf = { specific_attack = { "player", "mobs_mc:sheep" }, } -mcl_mobs:register_mob("mobs_mc:wolf", wolf) +mcl_mobs.register_mob("mobs_mc:wolf", wolf) -- Tamed wolf @@ -167,7 +167,7 @@ end dog.on_rightclick = function(self, clicker) local item = clicker:get_wielded_item() - if mcl_mobs:feed_tame(self, clicker, 1, true, false) then + if self:feed_tame(clicker, 1, true, false) then return elseif mcl_mobs:protect(self, clicker) then return @@ -194,45 +194,17 @@ dog.on_rightclick = function(self, clicker) end end else - -- Toggle sitting order - if not self.owner or self.owner == "" then - -- Huh? This wolf has no owner? Let's fix this! This should never happen. + -- Huh? This dog has no owner? Let's fix this! This should never happen. self.owner = clicker:get_player_name() end - - local pos = self.object:get_pos() - local particle - if not self.order or self.order == "" or self.order == "sit" then - particle = "mobs_mc_wolf_icon_roam.png" - self.order = "roam" - self.state = "stand" - self.walk_chance = default_walk_chance - self.jump = true - mcl_mobs:set_animation(self, "stand") - -- TODO: Add sitting model - else - particle = "mobs_mc_wolf_icon_sit.png" - self.order = "sit" - self.state = "stand" - self.walk_chance = 0 - self.jump = false - mcl_mobs:set_animation(self, "sit") + if not minetest.settings:get_bool("mcl_extended_pet_control",true) then + self:toggle_sit(clicker,-0.4) end - -- Display icon to show current order (sit or roam) - minetest.add_particle({ - pos = vector.add(pos, {x=0,y=1,z=0}), - velocity = {x=0,y=0.2,z=0}, - expirationtime = 1, - size = 4, - texture = particle, - playername = self.owner, - glow = minetest.LIGHT_MAX, - }) end end -mcl_mobs:register_mob("mobs_mc:dog", dog) +mcl_mobs.register_mob("mobs_mc:dog", dog) -- Spawn mcl_mobs:spawn_specific( "mobs_mc:wolf", @@ -258,4 +230,4 @@ minetest.LIGHT_MAX+1, mobs_mc.water_level+3, mcl_vars.mg_overworld_max) -mcl_mobs:register_egg("mobs_mc:wolf", S("Wolf"), "#d7d3d3", "#ceaf96", 0) +mcl_mobs.register_egg("mobs_mc:wolf", S("Wolf"), "#d7d3d3", "#ceaf96", 0) diff --git a/mods/ENTITIES/mobs_mc/zombie.lua b/mods/ENTITIES/mobs_mc/zombie.lua index eaba127a8e..358579dbd6 100644 --- a/mods/ENTITIES/mobs_mc/zombie.lua +++ b/mods/ENTITIES/mobs_mc/zombie.lua @@ -102,7 +102,7 @@ local zombie = { attack_npcs = true, } -mcl_mobs:register_mob("mobs_mc:zombie", zombie) +mcl_mobs.register_mob("mobs_mc:zombie", zombie) -- Baby zombie. -- A smaller and more dangerous variant of the zombie @@ -123,7 +123,7 @@ baby_zombie.animation = { punch_start = 109, punch_end = 119 } -mcl_mobs:register_mob("mobs_mc:baby_zombie", baby_zombie) +mcl_mobs.register_mob("mobs_mc:baby_zombie", baby_zombie) -- Husk. -- Desert variant of the zombie @@ -140,7 +140,7 @@ husk.sunlight_damage = 0 husk.drops = drops_common -- TODO: Husks avoid water -mcl_mobs:register_mob("mobs_mc:husk", husk) +mcl_mobs.register_mob("mobs_mc:husk", husk) -- Baby husk. -- A smaller and more dangerous variant of the husk @@ -154,7 +154,7 @@ baby_husk.ignited_by_sunlight = false baby_husk.sunlight_damage = 0 baby_husk.drops = drops_common -mcl_mobs:register_mob("mobs_mc:baby_husk", baby_husk) +mcl_mobs.register_mob("mobs_mc:baby_husk", baby_husk) -- Spawning @@ -368,5 +368,5 @@ mcl_vars.mg_overworld_min, mcl_vars.mg_overworld_max) -- Spawn eggs -mcl_mobs:register_egg("mobs_mc:husk", S("Husk"), "#777361", "#ded88f", 0) -mcl_mobs:register_egg("mobs_mc:zombie", S("Zombie"), "#00afaf", "#799c66", 0) +mcl_mobs.register_egg("mobs_mc:husk", S("Husk"), "#777361", "#ded88f", 0) +mcl_mobs.register_egg("mobs_mc:zombie", S("Zombie"), "#00afaf", "#799c66", 0) diff --git a/mods/ENTITIES/mobs_mc/zombiepig.lua b/mods/ENTITIES/mobs_mc/zombiepig.lua index 9545e40223..4e89db4f67 100644 --- a/mods/ENTITIES/mobs_mc/zombiepig.lua +++ b/mods/ENTITIES/mobs_mc/zombiepig.lua @@ -93,7 +93,7 @@ local pigman = { fire_damage_resistant = true, } -mcl_mobs:register_mob("mobs_mc:pigman", pigman) +mcl_mobs.register_mob("mobs_mc:pigman", pigman) -- Baby pigman. -- A smaller and more dangerous variant of the pigman @@ -113,7 +113,7 @@ baby_pigman.run_velocity = 2.4 baby_pigman.light_damage = 0 baby_pigman.child = 1 -mcl_mobs:register_mob("mobs_mc:baby_pigman", baby_pigman) +mcl_mobs.register_mob("mobs_mc:baby_pigman", baby_pigman) -- Regular spawning in the Nether mcl_mobs:spawn_specific( @@ -152,4 +152,4 @@ mcl_vars.mg_nether_max) --mobs:spawn_specific("mobs_mc:pigman", {"mcl_portals:portal"}, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 500, 4, mcl_vars.mg_overworld_min, mcl_vars.mg_overworld_max) -- spawn eggs -mcl_mobs:register_egg("mobs_mc:pigman", S("Zombie Pigman"), "#ea9393", "#4c7129", 0) +mcl_mobs.register_egg("mobs_mc:pigman", S("Zombie Pigman"), "#ea9393", "#4c7129", 0) diff --git a/mods/ENVIRONMENT/lightning/locale/lightning.ja.tr b/mods/ENVIRONMENT/lightning/locale/lightning.ja.tr new file mode 100644 index 0000000000..b84b27af0d --- /dev/null +++ b/mods/ENVIRONMENT/lightning/locale/lightning.ja.tr @@ -0,0 +1,3 @@ +# textdomain: lightning +Let lightning strike at the specified position or player. No parameter will strike yourself.=指定された位置またはプレイヤーに落雷させます。 どのパラメータも自身を攻撃しません。 +No position specified and unknown player=位置指定なし、プレイヤー不明 diff --git a/mods/ENVIRONMENT/mcl_raids/init.lua b/mods/ENVIRONMENT/mcl_raids/init.lua new file mode 100644 index 0000000000..8c996f0ce7 --- /dev/null +++ b/mods/ENVIRONMENT/mcl_raids/init.lua @@ -0,0 +1,396 @@ +-- mcl_raids +mcl_raids = {} +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Define the amount of illagers to spawn each wave. +local waves = { + { + ["mobs_mc:pillager"] = 5, + ["mobs_mc:vindicator"] = 1, + }, + { + ["mobs_mc:pillager"] = 4, + ["mobs_mc:vindicator"] = 3, + }, + { + ["mobs_mc:pillager"] = 4, + ["mobs_mc:vindicator"] = 1, + ["mobs_mc:witch"] = 1, + --["mobs_mc:ravager"] = 1, + }, + { + ["mobs_mc:pillager"] = 5, + ["mobs_mc:vindicator"] = 2, + ["mobs_mc:witch"] = 3, + }, + { + ["mobs_mc:pillager"] = 5, + ["mobs_mc:vindicator"] = 5, + ["mobs_mc:witch"] = 1, + ["mobs_mc:evoker"] = 1, + }, +} + +local extra_wave = { + ["mobs_mc:pillager"] = 5, + ["mobs_mc:vindicator"] = 5, + ["mobs_mc:witch"] = 1, + ["mobs_mc:evoker"] = 1, + --["mobs_mc:ravager"] = 2, +} + +local oban_layers = { + { + pattern = "rhombus", + color = "unicolor_cyan" + }, + { + color = "unicolor_grey", + pattern = "stripe_bottom" + }, + { + pattern = "stripe_center", + color = "unicolor_darkgrey" + }, + { + color = "unicolor_black", + pattern = "stripe_middle" + }, + { + pattern = "half_horizontal", + color = "unicolor_grey" + }, + { + color = "unicolor_grey", + pattern = "circle" + }, + { + pattern = "border", + color = "unicolor_black" + } +} + + +local oban_def = table.copy(minetest.registered_entities["mcl_banners:standing_banner"]) +oban_def.visual_size = { x=1, y=1 } +local old_step = oban_def.on_step +oban_def.on_step = function(self,dtime) + if not self.object:get_attach() then return self.object:remove() end + if old_step then return old_step(self.dtime) end +end + +minetest.register_entity(":mcl_raids:ominous_banner",oban_def) + +function mcl_raids.drop_obanner(pos) + local it = ItemStack("mcl_banners:banner_item_white") + it:get_meta():set_string("layers",minetest.serialize(oban_layers)) + it:get_meta():set_string("name",S("Ominous Banner")) + minetest.add_item(pos,it) +end + +function mcl_raids.promote_to_raidcaptain(c) -- object + if not c or not c:get_pos() then return end + local pos = c:get_pos() + local l = c:get_luaentity() + l._banner = minetest.add_entity(pos,"mcl_raids:ominous_banner") + l._banner:set_properties({textures = {mcl_banners.make_banner_texture("unicolor_white", oban_layers)}}) + l._banner:set_attach(c,"",vector.new(-1,5.5,0),vector.new(0,0,0),true) + l._raidcaptain = true + local old_ondie = l.on_die + l.on_die = function(self, pos, cmi_cause) + if l._banner then + l._banner:remove() + l._banner = nil + mcl_raids.drop_obanner(pos) + if cmi_cause and cmi_cause.type == "punch" and cmi_cause.puncher:is_player() then + awards.unlock(cmi_cause.puncher:get_player_name(), "mcl:voluntary_exile") + local lv = mcl_potions.player_get_effect(cmi_cause.puncher, "bad_omen") + if not lv then lv = 0 + else lv = lv.factor end + lv = math.max(5,lv + 1) + mcl_potions.bad_omen_func(cmi_cause.puncher,lv,6000) + end + end + if old_ondie then return old_ondie(self,pos,cmi_cause) end + end +end + +function mcl_raids.is_raidcaptain_near(pos) + for k,v in pairs(minetest.get_objects_inside_radius(pos,32)) do + local l = v:get_luaentity() + if l and l._raidcaptain then return true end + end +end + +function mcl_raids.register_possible_raidcaptain(mob) + local old_on_spawn = minetest.registered_entities[mob].on_spawn + local old_on_pick_up = minetest.registered_entities[mob].on_pick_up + if not minetest.registered_entities[mob].pick_up then minetest.registered_entities[mob].pick_up = {} end + table.insert(minetest.registered_entities[mob].pick_up,"mcl_banners:banner_item_white") + minetest.registered_entities[mob].on_pick_up = function(self,e) + local stack = ItemStack(e.itemstring) + if not self._raidcaptain and stack:get_meta():get_string("name"):find("Ominous Banner") then + stack:take_item(1) + mcl_raids.promote_to_raidcaptain(self.object) + return stack + end + if old_on_pick_up then return old_on_pick_up(self,e) end + end + minetest.registered_entities[mob].on_spawn = function(self) + if not mcl_raids.is_raidcaptain_near(self.object:get_pos()) then + mcl_raids.promote_to_raidcaptain(self.object) + end + if old_on_spawn then return old_on_spawn(self) end + end +end + +mcl_raids.register_possible_raidcaptain("mobs_mc:pillager") +mcl_raids.register_possible_raidcaptain("mobs_mc:vindicator") +mcl_raids.register_possible_raidcaptain("mobs_mc:evoker") + +function mcl_raids.spawn_raid(event) + local pos = event.pos + local wave = event.stage + local illager_count = 0 + local spawnable = false + local r = 32 + local n = 12 + local i = math.random(1, n) + local raid_pos = vector.offset(pos,r * math.cos(((i-1)/n) * (2*math.pi)),0, r * math.sin(((i-1)/n) * (2*math.pi))) + local sn = minetest.find_nodes_in_area_under_air(vector.offset(raid_pos,-5,-50,-5), vector.offset(raid_pos,5,50,5), {"group:grass_block", "group:grass_block_snow", "group:snow_cover", "group:sand", "mcl_core:ice"}) + mcl_bells.ring_once(pos) + if sn and #sn > 0 then + local spawn_pos = sn[math.random(#sn)] + if spawn_pos then + minetest.log("action", "[mcl_raids] Raid Spawn Position chosen at " .. minetest.pos_to_string(spawn_pos) .. ".") + event.health_max = 0 + local w + if event.stage <= #waves then + w= waves[event.stage] + else + w = extra_wave + end + for m,c in pairs(w) do + for i=1,c do + local p = vector.offset(spawn_pos,0,1,0) + local mob = mcl_mobs.spawn(p,m) + local l = mob:get_luaentity() + if l then + l.raidmob = true + event.health_max = event.health_max + l.health + table.insert(event.mobs,mob) + --minetest.log("action", "[mcl_raids] Here we go. Raid time") + l:gopath(pos) + end + end + end + if event.stage == 1 then + table.shuffle(event.mobs) + mcl_raids.promote_to_raidcaptain(event.mobs[1]) + end + minetest.log("action", "[mcl_raids] Raid Spawned. Illager Count: " .. #event.mobs .. ".") + return #event.mobs == 0 + else + minetest.log("action", "[mcl_raids] Raid Spawn Postion not chosen.") + end + elseif not sn then + minetest.log("action", "[mcl_raids] Raid Spawn Position error, no appropriate site found.") + end + return true +end + +function mcl_raids.find_villager(pos) + local obj = minetest.get_objects_inside_radius(pos, 8) + for _, objects in ipairs(obj) do + local object = objects:get_luaentity() + if object then + if object.name ~= "mobs_mc:villager" then + return + elseif object.name == "mobs_mc:villager" then + --minetest.log("action", "[mcl_raids] Villager Found.") + return true + else + --minetest.log("action", "[mcl_raids] No Villager Found.") + return false + end + end + end +end + +function mcl_raids.find_bed(pos) + return minetest.find_node_near(pos,32,{"mcl_beds:bed_red_bottom"}) +end + +function mcl_raids.find_village(pos) + local bed = mcl_raids.find_bed(pos) + if bed and mcl_raids.find_villager(bed) then + return bed + end +end + +local function get_point_on_circle(pos,r,n) + local rt = {} + for i=1, n do + table.insert(rt,vector.offset(pos,r * math.cos(((i-1)/n) * (2*math.pi)),0, r* math.sin(((i-1)/n) * (2*math.pi)) )) + end + table.shuffle(rt) + return rt[1] +end + +local function start_firework_rocket(pos) + local p = get_point_on_circle(pos,math.random(32,64),32) + local n = minetest.get_node(p) + local l = minetest.get_natural_light(pos,0.5) + if n.name ~= "air" or l <= minetest.LIGHT_MAX then return end + local o = minetest.add_entity(p,"mcl_bows:rocket_entity") + o:get_luaentity()._harmless = true + o:set_acceleration(vector.new(math.random(0,2),math.random(30,50),math.random(0,2))) +end + +local function make_firework(pos,stime) + if os.time() - stime > 60 then return end + for i=1,math.random(25) do + minetest.after(math.random(i),start_firework_rocket,pos) + end + minetest.after(10,make_firework,pos,stime) +end + +local function is_player_near(self) + for _,pl in pairs(minetest.get_connected_players()) do + if self.pos and vector.distance(pl:get_pos(),self.pos) < 64 then return true end + end +end + +local function check_mobs(self) + local m = {} + local h = 0 + for k,o in pairs(self.mobs) do + if o and o:get_pos() then + local l = o:get_luaentity() + h = h + l.health + table.insert(m,o) + end + end + if #m == 0 then --if no valid mobs in table search if there are any (reloaded ones) in the area + for k,o in pairs(minetest.get_objects_inside_radius(self.pos,64)) do + local l = o:get_luaentity() + if l and l.raidmob then + local l = o:get_luaentity() + h = h + l.health + table.insert(m,o) + end + end + end + self.mobs = m + return h +end + +mcl_events.register_event("raid",{ + readable_name = "Raid", + max_stage = 5, + health = 1, + health_max = 1, + exclusive_to_area = 128, + enable_bossbar = true, + cond_start = function(self) + --minetest.log("Cond start raid") + local r = {} + for _,p in pairs(minetest.get_connected_players()) do + if mcl_potions.player_has_effect(p,"bad_omen") then + local raid_pos = mcl_raids.find_village(p:get_pos()) + if raid_pos then + --minetest.log("We have a raid position. Start raid") + table.insert(r,{ player = p:get_player_name(), pos = raid_pos }) + end + end + end + if #r > 0 then return r end + end, + on_start = function(self) + self.mobs = {} + self.health_max = 1 + self.health = 0 + local lv = mcl_potions.player_get_effect(minetest.get_player_by_name(self.player), "bad_omen") + if lv and lv.factor and lv.factor > 1 then self.max_stage = 6 end + end, + cond_progress = function(self) + if not is_player_near(self) then return false end + self.health = check_mobs(self) + self.percent = math.max(0,(self.health / self.health_max ) * 100) + if #self.mobs < 1 then + return true end + end, + on_stage_begin = mcl_raids.spawn_raid, + cond_complete = function(self) + if not is_player_near(self) then return false end + --let the event api handle cancel the event when no players are near + --without this check it would sort out the unloaded mob entities and + --think the raid is defeated. + check_mobs(self) + return self.stage >= self.max_stage and #self.mobs < 1 + end, + on_complete = function(self) + awards.unlock(self.player,"mcl:hero_of_the_village") + mcl_potions.player_clear_effect(minetest.get_player_by_name(self.player),"bad_omen") + make_firework(self.pos,os.time()) + end, +}) + +minetest.register_chatcommand("raidcap",{ + privs = {debug = true}, + func = function(pname,param) + local c = minetest.add_entity(minetest.get_player_by_name(pname):get_pos(),"mobs_mc:pillager") + mcl_raids.promote_to_raidcaptain(c) + end, +}) + +minetest.register_chatcommand("dump_banner_layers",{ + privs = {debug = true}, + func = function(pname,param) + local p = minetest.get_player_by_name(pname) + mcl_raids.drop_obanner(vector.offset(p:get_pos(),1,1,1)) + for k,v in pairs(minetest.get_objects_inside_radius(p:get_pos(),5)) do + local l = v:get_luaentity() + if l and l.name == "mcl_banners:standing_banner" then + minetest.log(dump(l._base_color)) + minetest.log(dump(l._layers)) + end + end + end +}) + +local function is_new_years() + local d = os.date("*t") + return d.month == 1 and d.day == 1 and d.hour < 1 +end + +mcl_events.register_event("new_years",{ + stage = 0, + max_stage = 1, + readable_name = "New Years", + pos = vector.new(0,0,0), + exclusive_to_area = 256, + cond_start = function(event) + if not is_new_years() then return false end + local r = {} + for _,p in pairs(minetest.get_connected_players()) do + table.insert(r,{ player = p:get_player_name(), pos = p:get_pos()}) + end + return r + end, + on_start = function(self) + minetest.chat_send_player(self.player," Happy new year <3") + end, + on_step = function(self,dtime) + if not self.timer or self.timer < 0 then + self.timer = math.random(1,5) + for i=1,math.random(8) do + minetest.after(math.random(i),start_firework_rocket,minetest.get_player_by_name(self.player):get_pos()) + end + end + self.timer = self.timer - dtime + end, + cond_complete = function(event) + return not is_new_years() + end, --return success +}) diff --git a/mods/ENVIRONMENT/mcl_raids/mod.conf b/mods/ENVIRONMENT/mcl_raids/mod.conf new file mode 100644 index 0000000000..b4616e56b7 --- /dev/null +++ b/mods/ENVIRONMENT/mcl_raids/mod.conf @@ -0,0 +1,3 @@ +name = mcl_raids +author = PrairieWind +depends = mcl_events, mobs_mc, mcl_potions, mcl_bells, mcl_achievements diff --git a/mods/ENVIRONMENT/mcl_raids/textures/mcl_raids_hero_of_the_village_icon.png b/mods/ENVIRONMENT/mcl_raids/textures/mcl_raids_hero_of_the_village_icon.png new file mode 100644 index 0000000000..0db5d96134 Binary files /dev/null and b/mods/ENVIRONMENT/mcl_raids/textures/mcl_raids_hero_of_the_village_icon.png differ diff --git a/mods/ENVIRONMENT/mcl_void_damage/locale/mcl_void_damage.ja.tr b/mods/ENVIRONMENT/mcl_void_damage/locale/mcl_void_damage.ja.tr new file mode 100644 index 0000000000..f29ff36de5 --- /dev/null +++ b/mods/ENVIRONMENT/mcl_void_damage/locale/mcl_void_damage.ja.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_void_damage +The void is off-limits to you!=奈落は立ち入り禁止! +@1 fell into the endless void.=@1は奈落の底に落ちていった。 diff --git a/mods/ENVIRONMENT/mcl_weather/locale/mcl_weather.ja.tr b/mods/ENVIRONMENT/mcl_weather/locale/mcl_weather.ja.tr new file mode 100644 index 0000000000..c4d666aa5f --- /dev/null +++ b/mods/ENVIRONMENT/mcl_weather/locale/mcl_weather.ja.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_weather +Gives ability to control weather=天候操作能力を付与 +Changes the weather to the specified parameter.=指定されたパラメータの天気を変更します。 +Error: No weather specified.=エラー:天候が指定されていません。 +Error: Invalid parameters.=エラー:パラメータが無効です。 +Error: Duration can't be less than 1 second.=エラー:持続時間は1秒以下にはできません。 +Error: Invalid weather specified. Use “clear”, “rain”, “snow” or “thunder”.=エラー:指定した天候が無効です。「晴天」、「降雨」、「降雪」、「雷雨」のいずれかを使用してください。 +Toggles between clear weather and weather with downfall (randomly rain, thunderstorm or snow)=晴天と荒天(ランダムに降雨・雷雨・降雪)を切替 diff --git a/mods/ENVIRONMENT/mcl_weather/skycolor.lua b/mods/ENVIRONMENT/mcl_weather/skycolor.lua index a4108598fd..d8e89baf11 100644 --- a/mods/ENVIRONMENT/mcl_weather/skycolor.lua +++ b/mods/ENVIRONMENT/mcl_weather/skycolor.lua @@ -1,21 +1,44 @@ local mods_loaded = false local NIGHT_VISION_RATIO = 0.45 -function mcl_weather.set_sky_box_clear(player) - player:set_sky({ - type = "regular", - sky_color = { - day_sky = "#92B9FF", - day_horizon = "#B4D0FF", +local water_color = "#0b4880" + +local mg_name = minetest.get_mapgen_setting("mg_name") + +function mcl_weather.set_sky_box_clear(player, sky, fog) + local pos = player:get_pos() + if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then return end + local sc = { + day_sky = "#7BA4FF", + day_horizon = "#C0D8FF", dawn_sky = "#B4BAFA", dawn_horizon = "#BAC1F0", - night_sky = "#006AFF", - night_horizon = "#4090FF", - }, + night_sky = "#000000", + night_horizon = "#4A6790", + } + if sky then + sc.day_sky = sky + end + if fog then + sc.day_horizon = fog + end + player:set_sky({ + type = "regular", + sky_color = sc, clouds = true, }) end +function mcl_weather.set_sky_color(player, def) + local pos = player:get_pos() + if minetest.get_item_group(minetest.get_node(vector.offset(pos, 0, 1.5, 0)).name, "water") ~= 0 then return end + player:set_sky({ + type = def.type, + sky_color = def.sky_color, + clouds = def.clouds, + }) +end + mcl_weather.skycolor = { -- Should be activated before do any effect. active = true, @@ -96,10 +119,30 @@ mcl_weather.skycolor = { local pos = player:get_pos() local dim = mcl_worlds.pos_to_dimension(pos) local has_weather = (mcl_worlds.has_weather(pos) and (mcl_weather.state == "snow" or mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_snow(pos)) or ((mcl_weather.state =="rain" or mcl_weather.state == "thunder") and mcl_weather.has_rain(pos)) + if minetest.get_item_group(minetest.get_node(vector.new(pos.x,pos.y+1.5,pos.z)).name, "water") ~= 0 then + player:set_sky({ type = "regular", + sky_color = { + day_sky = water_color, + day_horizon = water_color, + dawn_sky = water_color, + dawn_horizon = water_color, + night_sky = water_color, + night_horizon = water_color, + }, + clouds = true, + }) + end if dim == "overworld" then + local biomesky + local biomefog + if mg_name ~= "v6" and mg_name ~= "singlenode" then + local biome = minetest.get_biome_name(minetest.get_biome_data(player:get_pos()).biome) + biomesky = minetest.registered_biomes[biome]._mcl_skycolor + biomefog = minetest.registered_biomes[biome]._mcl_fogcolor + end if (mcl_weather.state == "none") then -- Clear weather - mcl_weather.set_sky_box_clear(player) + mcl_weather.set_sky_box_clear(player,biomesky,biomefog) player:set_sun({visible = true, sunrise_visible = true}) player:set_moon({visible = true}) player:set_stars({visible = true}) @@ -108,7 +151,8 @@ mcl_weather.skycolor = { local day_color = mcl_weather.skycolor.get_sky_layer_color(0.15) local dawn_color = mcl_weather.skycolor.get_sky_layer_color(0.27) local night_color = mcl_weather.skycolor.get_sky_layer_color(0.1) - player:set_sky({ type = "regular", + mcl_weather.set_sky_color(player, { + type = "regular", sky_color = { day_sky = day_color, day_horizon = day_color, @@ -127,7 +171,8 @@ mcl_weather.skycolor = { local day_color = mcl_weather.skycolor.get_sky_layer_color(0.5) local dawn_color = mcl_weather.skycolor.get_sky_layer_color(0.75) local night_color = mcl_weather.skycolor.get_sky_layer_color(0) - player:set_sky({ type = "regular", + mcl_weather.set_sky_color(player, { + type = "regular", sky_color = { day_sky = day_color, day_horizon = day_color, @@ -178,7 +223,7 @@ mcl_weather.skycolor = { } local biometint = nether_sky[minetest.get_biome_name(minetest.get_biome_data(player:get_pos()).biome)] - player:set_sky({ + mcl_weather.set_sky_color(player, { type = "regular", sky_color = { day_sky = "#300808", diff --git a/mods/ENVIRONMENT/mcl_zombie_sieges/init.lua b/mods/ENVIRONMENT/mcl_zombie_sieges/init.lua new file mode 100644 index 0000000000..21c644cda6 --- /dev/null +++ b/mods/ENVIRONMENT/mcl_zombie_sieges/init.lua @@ -0,0 +1,90 @@ + +local function check_spawn_pos(pos) + return minetest.get_natural_light(pos) < 7 +end + +local function spawn_zombies(self) + local nn = minetest.find_nodes_in_area_under_air(vector.offset(self.pos,-16,-16,-16),vector.offset(self.pos,16,16,16),{"group:solid"}) + table.shuffle(nn) + for i=1,20 do + local p = vector.offset(nn[i%#nn],0,1,0) + if check_spawn_pos(p) then + local m = mcl_mobs.spawn(p,"mobs_mc:zombie") + if m then + local l = m:get_luaentity() + l:gopath(self.pos) + table.insert(self.mobs, m) + self.health_max = self.health_max + l.health + else + --minetest.log("Failed to spawn zombie at location: " .. minetest.pos_to_string(p)) + end + end + end +end + +mcl_events.register_event("zombie_siege",{ + readable_name = "Zombie Siege", + max_stage = 1, + health = 1, + health_max = 1, + exclusive_to_area = 128, + enable_bossbar = false, + cond_start = function(self) + --minetest.log("Cond start zs") + local r = {} + + local t = minetest.get_timeofday() + local pr = PseudoRandom(minetest.get_day_count()) + local rnd = pr:next(1,10) + + if t < 0.04 and rnd == 1 then + --minetest.log("Well, it's siege time") + for _,p in pairs(minetest.get_connected_players()) do + local village = mcl_raids.find_village(p:get_pos()) + if village then + --minetest.log("Found village") + table.insert(r,{ player = p:get_player_name(), pos = village}) + end + end + else + --minetest.log("Not night for a siege, or not success") + end + if #r > 0 then return r end + end, + on_start = function(self) + self.mobs = {} + self.health_max = 1 + self.health = 0 + end, + cond_progress = function(self) + local m = {} + local h = 0 + for k,o in pairs(self.mobs) do + if o and o:get_pos() then + local l = o:get_luaentity() + h = h + l.health + table.insert(m,o) + end + end + self.mobs = m + self.health = h + self.percent = math.max(0,(self.health / self.health_max ) * 100) + if #m < 1 then + return true end + end, + on_stage_begin = spawn_zombies, + cond_complete = function(self) + local m = {} + for k,o in pairs(self.mobs) do + if o and o:get_pos() then + local l = o:get_luaentity() + table.insert(m,o) + end + end + return self.stage >= self.max_stage and #m < 1 + end, + on_complete = function(self) + --minetest.log("SIEGE complete") + --awards.unlock(self.player,"mcl:hero_of_the_village") + end, +}) diff --git a/mods/ENVIRONMENT/mcl_zombie_sieges/mod.conf b/mods/ENVIRONMENT/mcl_zombie_sieges/mod.conf new file mode 100644 index 0000000000..0263d367ac --- /dev/null +++ b/mods/ENVIRONMENT/mcl_zombie_sieges/mod.conf @@ -0,0 +1,3 @@ +name = mcl_zombie_sieges +author = cora +depends = mcl_events, mcl_raids diff --git a/mods/HELP/doc/doc/locale/doc.ja.tr b/mods/HELP/doc/doc/locale/doc.ja.tr new file mode 100644 index 0000000000..68cc90232d --- /dev/null +++ b/mods/HELP/doc/doc/locale/doc.ja.tr @@ -0,0 +1,51 @@ +# textdomain:doc +<=< +>=> +Access to the requested entry has been denied; this entry is secret. You may unlock access by progressing in the game. Figure out on your own how to unlock this entry.=リクエストされたエントリーへのアクセスは拒否されました:このエントリーはシークレット要素です。ゲームを進行することでアクセスのロックを解除できるでしょう。このエントリーをアンロックする方法は、ご自身で見当をつけてみてください。 +All entries read.=すべてのエントリーを読みます。 +All help entries revealed!=ヘルプの全エントリーを公開! +All help entries are already revealed.=ヘルプのエントリーはすべて公開済みです。 +Allows you to reveal all hidden help entries with /help_reveal=/help_reveal で隠れているヘルプエントリーをすべて表示できるようにする +Category list=カテゴリーリスト +Currently all entries in this category are hidden from you.=現在、このカテゴリのエントリーはすべて非表示になっています。 +Unlock new entries by progressing in the game.=ゲームを進めることで、新たな項目をアンロックできます。 +Help=ヘルプ +Entry=エントリー +Entry list=エントリーリスト +Error: Access denied.=エラー:アクセスが拒否されました。 +Error: No help available.=エラー:利用可能なヘルプはありません。 +Go to category list=カテゴリーリストへ +Go to entry list=エントリーリストへ +Help > @1=ヘルプ > @1 +Help > @1 > @2=ヘルプ > @1 > @2 +Help > @1 > (No Entry)=ヘルプ > @1 > (エントリーなし) +Help > (No Category)=ヘルプ > (カテゴリーなし) +Hidden entries: @1=隠れているエントリー:@1 +Nameless entry (@1)=名無しのエントリー (@1) +New entries: @1=新しいエントリー:@1 +New help entry unlocked: @1 > @2=新しいヘルプエントリーがアンロックされた:@1 > @2 +No categories have been registered, but they are required to provide help.=カテゴリーは登録されてませんが、ヘルプを提供することが求められています。 +The Documentation System [doc] does not come with help contents on its own, it needs additional mods to add help content. Please make sure such mods are enabled on for this world, and try again.=ドキュメンテーションシステム[doc]は、それ自体ではヘルプコンテンツを備えておらず、ヘルプコンテンツを追加するための追加MODが必要です。そのようなMODがこのワールドで有効になっていることを確認し、もう一度試してみてください。 +Number of entries: @1=エントリー数:@1 +OK=OK +Open a window providing help entries about Minetest and more=Minetestに関するヘルプなどを表示するウィンドウを開く +Please select a category you wish to learn more about:=詳細を知りたいカテゴリーを選択してください: +Recommended mods: doc_basics, doc_items, doc_identifier, doc_encyclopedia.=推奨MOD:doc_basics、doc_items、doc_identifier、doc_encyclopedia +Reveal all hidden help entries to you=隠れているヘルプをすべて表示する +Show entry=エントリーを表示 +Show category=カテゴリーを表示 +Show next entry=次のエントリーを表示 +Show previous entry=前のエントリーを表示 +This category does not have any entries.=このカテゴリにはエントリーがありません。 +This category has the following entries:=このカテゴリには以下のエントリーがあります: +This category is empty.=このカテゴリは空っぽです。 +This is the help.=これはヘルプです。 +You haven't chosen a category yet. Please choose one in the category list first.=まだカテゴリーが選択されていません。まずはカテゴリーリストからひとつ選択してください。 +You haven't chosen an entry yet. Please choose one in the entry list first.=まだエントリーが選択されていません。まずはエントリーリストからひとつ選択してください。 +Collection of help texts=ヘルプテキスト集 +Notify me when new help is available=新しいヘルプが利用可能になったら通知する +Play notification sound when new help is available=新しいヘルプが利用可能になったときに通知音を再生する +Show previous image=前の画像を表示 +Show previous gallery page=前のギャラリーページを表示 +Show next image=次の画像を表示 +Show next gallery page=次のギャラリーページを表示 diff --git a/mods/HELP/doc/doc_identifier/locale/doc_identifier.ja.tr b/mods/HELP/doc/doc_identifier/locale/doc_identifier.ja.tr new file mode 100644 index 0000000000..2a545f7423 --- /dev/null +++ b/mods/HELP/doc/doc_identifier/locale/doc_identifier.ja.tr @@ -0,0 +1,18 @@ +# textdomain:doc_identifier +Error: This node, item or object is undefined. This is always an error.=エラー:このノード、アイテム、またはオブジェクトは未定義です。これは常にエラーになります。 +This can happen for the following reasons:=これは、次のような理由で起こり得ます: +• The mod which is required for it is not enabled=・そのために必要なMODが有効になっていない +• The author of the game or a mod has made a mistake=・ゲームの作者やMODがミスをした場合 +It appears to originate from the mod “@1”, which is enabled.=有効になっているMOD“@1”から発生しているようです。 +It appears to originate from the mod “@1”, which is not enabled!=有効化されていないMOD“@1”から発生しているようです! +Its identifier is “@1”.=その識別子は“@1”です。. +Lookup Tool=検索ツール +No help entry for this block could be found.=このブロックのヘルプエントリーは見つかりませんでした。 +No help entry for this item could be found.=このアイテムのヘルプエントリーは見つかりませんでした。 +No help entry for this object could be found.=このオブジェクトのヘルプエントリーは見つかりませんでした。 +OK=OK +Punch any block, item or other thing about you wish to learn more about. This will open up the appropriate help entry. The tool comes in two modes which are changed by using. In liquid mode, this tool points to liquids as well while in solid mode this is not the case.=ブロックやアイテムなど、詳しく知りたいものをパンチしてください。すると適切なヘルプエントリーが表示されます。この道具には2つのモードがあり、使用することで変更されます。液体モードでは、この道具は液体もポイントしますが、固体モードではそのようなことはありません。 +This block cannot be identified because the world has not materialized at this point yet. Try again in a few seconds.= +This is a player.=このブロックは、この時点ではまだ世界が具現化されていないため、識別できません。数秒後に再試行してください。 +This useful little helper can be used to quickly learn more about about one's closer environment. It identifies and analyzes blocks, items and other things and it shows extensive information about the thing on which it is used.=この便利な小さいヘルプ機能は、自分の身近な環境について手っ取り早く知るために使えます。ブロックやアイテムなどを識別して分析し、使用されているものに関する幅広い情報を表示します。 +Show help for pointed thing=ポイントしたものをヘルプで表示する diff --git a/mods/HELP/doc/doc_items/locale/doc_items.ja.tr b/mods/HELP/doc/doc_items/locale/doc_items.ja.tr new file mode 100644 index 0000000000..a2e1107dec --- /dev/null +++ b/mods/HELP/doc/doc_items/locale/doc_items.ja.tr @@ -0,0 +1,143 @@ +# textdomain:doc_items +Using it as fuel turns it into: @1.=燃料として使うと次のように変化します:@1. +@1 seconds=@1秒 +# Item count times item name +@1×@2=@1×@2 +# Itemname (25%) +@1 (@2%)=@1 (@2%) +# Itemname (<0.5%) +@1 (<0.5%)=@1 (<0.5%) +# Itemname (ca. 25%) +@1 (ca. @2%)=@1 (ca. @2%) +# List separator (e.g. “one, two, three”) +, =、 +# Final list separator (e.g. “One, two and three”) + and =& +1 second=1秒 +A transparent block, basically empty space. It is usually left behind after digging something.=透明なブロックで、基本的には何もない空間です。たいていは何かを掘った後に残ります。 +Air=空気 +Blocks=ブロック +Building another block at this block will place it inside and replace it.=このブロックのところに別のブロックを構築すると、中に入って置き換わります。 +Building this block is completely silent.=このブロックの構築は、完全に無音です。 +Collidable: @1=衝突性:@1 +Description: @1=概要:@1 +Falling blocks can go through this block; they destroy it when doing so.=落下したブロックは、このブロックをスルーできますが、その際にブロックを破壊してしまいます。 +Full punch interval: @1 s=全力攻撃の間隔:@1秒 +Hand=手 +Hold it in your hand, then leftclick to eat it.=手に持って、左クリックで食べます。 +Hold it in your hand, then leftclick to eat it. But why would you want to do this?=手に持って、左クリックで食べます。しかし、なぜこんなことをしたいのでしょうか? +Item reference of all wieldable tools and weapons=すべての携行可能な道具と武器の、アイテム参照 +Item reference of blocks and other things which are capable of occupying space=空間の占有が可能なブロックその他の、アイテム参照 +Item reference of items which are neither blocks, tools or weapons (esp. crafting items)=ブロックでも道具でも武器でもないアイテム(特にクラフトアイテム)の、アイテム参照 +Liquids can flow into this block and destroy it.=このブロックに液体が流れ込み、破壊されることがあります。 +Maximum stack size: @1=最大スタックサイズ:@1 +Mining level: @1=採掘レベル:@1 +Mining ratings:=採掘レート: +• @1, rating @2: @3 s - @4 s=・ @1, レート @2:@3秒 - @4秒 +• @1, rating @2: @3 s=・ @1, レート @2:@3秒 +Mining times:=採掘時間: +Mining this block is completely silent.=このブロックの採掘は、完全に無音です。 +Miscellaneous items=その他の雑多なアイテム +No=いいえ +Pointable: No=ポイント可能:いいえ +Pointable: Only by special items=ポイント可能:特殊なアイテムのみ +Pointable: Yes=ポイント可能:はい +Punches with this block don't work as usual; melee combat and mining are either not possible or work differently.=このブロックでのパンチは、普段通りには機能しません:近接戦闘と採掘は不可能か、動作が異なります。 +Punches with this item don't work as usual; melee combat and mining are either not possible or work differently.=このアイテムでのパンチは、普段通りには機能しません:近接戦闘と採掘は不可能か、動作が異なります。 +Punches with this tool don't work as usual; melee combat and mining are either not possible or work differently.=この道具でのパンチは、普段通りには機能しません:近接戦闘と採掘は不可能か、動作が異なります。 +Range: @1=範囲:@1 +# Range: () +Range: @1 (@2)=範囲:@1 (@2) +Range: 4=範囲:4 +# Rating used for digging times +Rating @1=レート@1 +# @1 is minimal rating, @2 is maximum rating +Rating @1-@2=レート@1-@2 +The fall damage on this block is increased by @1%.=このブロックでの落下ダメージが@1%増加する。 +The fall damage on this block is reduced by @1%.=このブロックでの落下ダメージが@1%軽減する。 +This block allows light to propagate with a small loss of brightness, and sunlight can even go through losslessly.=このブロックは、明るさのロスが少ない光の伝搬を可能にし、太陽光であればロスなしで通過することさえできます。 +This block allows light to propagate with a small loss of brightness.=このブロックは、明るさのロスが少ない光の伝搬を可能にします。 +This block allows sunlight to propagate without loss in brightness.=このブロックは、太陽光を明るさのロスなしで伝搬させることができます。 +This block belongs to the @1 group.=このブロックは、@1グループに属しています。 +This block belongs to these groups: @1.=このブロックは、次のグループに属しています:@1 +This block can be climbed.=このブロックはよじ登ることができます。 +This block can be destroyed by any mining tool immediately.=このブロックは、どの採掘道具でも即座に壊せます。 +This block can be destroyed by any mining tool in half a second.=このブロックは、どの採掘道具でもコンマ5秒で壊せます。 +This block can be mined by any mining tool immediately.=このブロックは、どの採掘道具でも即座に掘れます。 +This block can be mined by any mining tool in half a second.=このブロックは、どの採掘道具でもコンマ5秒で掘れます。 +This block can be mined by mining tools which match any of the following mining ratings and its toughness level.=このブロックは、以下の採掘レートとタフネスレベルのいずれかに合致する採掘道具で掘れます。 +This block can not be destroyed by ordinary mining tools.=このブロックは、通常の採掘道具では壊せません。 +This block can not be mined by ordinary mining tools.=このブロックは、通常の採掘道具では掘れません。 +This block can serve as a smelting fuel with a burning time of @1.=このブロックは、燃焼時間@1の製錬燃料として使用できます。 +This block causes a damage of @1 hit point per second.=このブロックは、毎秒@1HPのダメージを生じます。 +This block causes a damage of @1 hit points per second.=このブロックは、毎秒@1HPのダメージを生じます。 +This block connects to blocks of the @1 group.=このブロックは、@1グループのブロックに接続します。 +This block connects to blocks of the following groups: @1.=このブロックは、次のグループのブロックに接続します:@1 +This block connects to these blocks: @1.=このブロックは、次のブロックに接続します:@1 +This block connects to this block: @1.=このブロックは、このブロックに接続します:@1 +This block decreases your breath and causes a drowning damage of @1 hit point every 2 seconds.=このブロックは呼吸を減少させ, 2秒毎に@1HPの窒息ダメージを与えます. +This block decreases your breath and causes a drowning damage of @1 hit points every 2 seconds.=このブロックは呼吸を減少させ, 2秒毎に@1HPの窒息ダメージを与えます. +This block is a light source with a light level of @1.=このブロックは、明るさ@1の光源です。 +This block glows faintly with a light level of @1.=このブロックは、明るさ@1でぼんやりと光ります。 +This block is a building block for creating various buildings.=このブロックは、さまざまな建物を作るための建築ブロックです。 +This block is a liquid with these properties:=このブロックは、こうした性質を持つ液体です: +This block is affected by gravity and can fall.=このブロックは重力の影響を受け、落下することがあります。 +This block is completely silent when mined or built.=このブロックを採掘や建設する時は、完全に無音です。 +This block is completely silent when walked on, mined or built.=このブロックを採掘・建設・歩行する時は、完全に無音です。 +This block is destroyed when a falling block ends up inside it.=このブロックは、落下してきたブロックがその中に入ってしまうと破壊されます。 +This block negates all fall damage.=このブロックは、すべての落下ダメージを無効化します。 +This block points to liquids.=このブロックは液体を指します。 +This block will drop as an item when a falling block ends up inside it.=このブロックは、落下してきたブロックがその中に入ってしまうと、アイテムとしてドロップされます。 +This block will drop as an item when it is not attached to a surrounding block.=このブロックは、周囲のブロックとくっついていないときに、アイテムとしてドロップされます。 +This block will drop as an item when no collidable block is below it.=このブロックは、その下に衝突可能なブロックがない場合、アイテムとしてドロップされます。 +This block will drop the following items when mined: @1.=このブロックを掘ると、次のアイテムをドロップします:@1 +This block will drop the following when mined: @1×@2.=このブロックを掘ると、次のものをドロップします:@1×@2 +This block will drop the following when mined: @1.=このブロックを掘ると、次のものをドロップします:@1 +This block will drop the following when mined: @1.=このブロックを掘ると、次のものをドロップします:@1 +This block will make you bounce off with an elasticity of @1%.=このブロックは、@1%の弾力性で跳ね返します。 +This block will randomly drop one of the following when mined: @1.=このブロックを掘ると、次のいずれかがランダムにドロップされます:@1 +This block will randomly drop up to @1 drops of the following possible drops when mined: @2.=このブロックを掘ると、次の可能なドロップのうち、最大@1個をランダムにドロップします:@2 +This block won't drop anything when mined.=このブロックは、掘っても何もドロップしません。 +This is a decorational block.=これは装飾用のブロックです。 +This is a melee weapon which deals damage by punching.=これは殴りつけることでダメージを与える近接武器です。 +Maximum damage per hit:=一発あたりの最大ダメージ: +This item belongs to the @1 group.=このアイテムは、@1グループに属しています。 +This item belongs to these groups: @1.=このアイテムは、次のグループに属しています:@1 +This item can serve as a smelting fuel with a burning time of @1.=このアイテムは、燃焼時間@1の製錬燃料として使用できます。 +This item is primarily used for crafting other items.=このアイテムは主に、他のアイテムのクラフトに使われます。 +This item points to liquids.=このアイテムは液体を指します。 +This tool belongs to the @1 group.=この道具は、@1グループに属しています。 +This tool belongs to these groups: @1.=この道具は、次のグループに属しています:@1 +This tool can serve as a smelting fuel with a burning time of @1.=この道具は、燃焼時間@1の製錬燃料として使用できます。 +This tool is capable of mining.=この道具は採掘が可能です。 +Maximum toughness levels:=最大タフネスレベル: +This tool points to liquids.=この道具は液体を指します。 +Tools and weapons=道具と武器 +Unknown Node=不明なノード +Usage help: @1=使用方法のヘルプ:@1 +Walking on this block is completely silent.=このブロックを歩くと、完全に無音です。 +Whenever you are not wielding any item, you use the hand which acts as a tool with its own capabilities. When you are wielding an item which is not a mining tool or a weapon it will behave as if it would be the hand.=アイテムを手に持っていない時は、なんどきでも素手を道具として使えます。採掘道具でも武器でもないアイテムを手に持っている時は、あたかも素手であるかのように振る舞います。 +Yes=はい +You can not jump while standing on this block.=このブロックの上に立っている間は、ジャンプできません。 +any level=任意のレベル +level 0=レベル 0 +level 0-@1=レベル 0-@1 +unknown=不明 +Unknown item (@1)=不明なアイテム (@1) +• @1: @2=・@1:@2 +• @1: @2 HP=・@1:@2 HP +• @1: @2, @3=・@1:@2, @3 +• Flowing range: @1=・流動範囲:@1 +• No flowing=・流れない +• Not renewable=・再生不能 +• Renewable=・再生可能 +• Viscosity: @1=・粘度:@1 +Itemstring: "@1"=アイテム文字列:"@1" +Durability: @1 uses=耐久度:@1回 使用 +Durability: @1=耐久度:@1 +Mining durability:=採掘耐久度: +• @1, level @2: @3 uses=・@1, レベル @2:@3回 使用 +• @1, level @2: Unlimited=・@1, レベル @2:無限 +This block's rotation is affected by the way you place it: Place it on the floor or ceiling for a vertical orientation; place it at the side for a horizontal orientation. Sneaking while placing it leads to a perpendicular orientation instead.=このブロックの回転は、置き方に影響されます:床や天井に置くと垂直方向、横に置くと水平方向になります。スニークしながら置くと、代わって直角の方向に向きます。 +Toughness level: @1=タフネスレベル:@1 +This block is slippery.=このブロックは滑りやすいです。 diff --git a/mods/HELP/mcl_craftguide/locale/mcl_craftguide.ja.tr b/mods/HELP/mcl_craftguide/locale/mcl_craftguide.ja.tr new file mode 100644 index 0000000000..213a68f617 --- /dev/null +++ b/mods/HELP/mcl_craftguide/locale/mcl_craftguide.ja.tr @@ -0,0 +1,37 @@ +# textdomain: craftguide +Any shulker box=シュルカーボックス +Any wool=羊毛 +Any wood planks=板材 +Any wood=木 +Any sand=砂 +Any normal sandstone=普通の砂岩 +Any red sandstone=赤い砂岩 +Any carpet=カーペット +Any dye=染料 +Any water bucket=水入りバケツ +Any flower=花 +Any mushroom=キノコ +Any wooden slab=木製のスラブ +Any wooden stairs=木製の階段 +Any coal=石炭 +Any kind of quartz block=クォーツブロック +Any kind of purpur block=プルプァブロック +Any stone bricks=石レンガ +Any stick=棒 +Any item belonging to the @1 group=@1 グループに属する任意のアイテム +Any item belonging to the groups: @1=次のグループに属する任意のアイテム:@1 +Search=検索 +Reset=リセット +Previous page=前ページ +Next page=次ページ +Usage @1 of @2=使用方法 @1/@2 +Recipe @1 of @2=レシピ @1/@2 +Burning time: @1=燃焼時間:@1 +Cooking time: @1=調理時間:@1 +Recipe is too big to be displayed (@1×@2)=レシピを表示するには大きすぎる (@1×@2) +Shapeless=不定形 +Cooking=調理 +Increase window size=ウィンドウサイズ拡大 +Decrease window size=ウィンドウサイズ縮小 +No item to show=表示するアイテムなし +Collect items to reveal more recipes=アイテムを集めて、より多くのレシピを明かす diff --git a/mods/HELP/mcl_doc/locale/mcl_doc.ja.tr b/mods/HELP/mcl_doc/locale/mcl_doc.ja.tr new file mode 100644 index 0000000000..0cef853c8e --- /dev/null +++ b/mods/HELP/mcl_doc/locale/mcl_doc.ja.tr @@ -0,0 +1,79 @@ +# textdomain: mcl_doc +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 acts as a soil for all saplings.=このブロックは、あらゆる苗木の土壌として作用します。 +This block acts as a soil for some saplings.=このブロックは、いくつかの苗木の土壌として作用します。 +Sugar canes will grow on this block.=このブロックには、サトウキビが生育します。 +Nether wart will grow on this block.=このブロックには、ネザーウォートが生育します。 +This block quickly decays when there is no wood block of any species within a distance of @1. When decaying, it disappears and may drop one of its regular drops. The block does not decay when the block has been placed by a player.=このブロックは、@1の距離内にどの種の木材ブロックもないとき、たちまち腐敗します。 腐敗すると消滅し、通常のドロップを1つ落とすことがあります。ブロックがプレイヤーによって置かれているときは、朽ちることはありません。 +This block quickly decays and disappears when there is no wood block of any species within a distance of @1. The block does not decay when the block has been placed by a player.=このブロックは、@1の距離内にどの種の木材ブロックもないとき、すぐさま腐敗して消滅します。 +This plant can only grow on grass blocks and dirt. To survive, it needs to have an unobstructed view to the sky above or be exposed to a light level of 8 or higher.=この植物は、草原や土の上にしか生育できません。生え抜くためには、上空に遮るものがないか、明るさ8以上で照らされる環境が必要です。 +This plant can grow on grass blocks, podzol, dirt and coarse dirt. To survive, it needs to have an unobstructed view to the sky above or be exposed to a light level of 8 or higher.=この植物は、草原、ポドゾル、土、粗い土の上に生育できます。生え抜くためには、上空に遮るものがないか、明るさ8以上で照らされる環境が必要です。 +This block is flammable.=このブロックは可燃性です。 +This block destroys any item it touches.=このブロックは、それに触れたどんなアイテムも壊します。 +To eat it, wield it, then rightclick.=食べるには、手に持ってから右クリックします。 +You can eat this even when your hunger bar is full.=満腹ゲージが満タンでも、これは食べられます。 +You cannot eat this when your hunger bar is full.=満腹ゲージが満タンなら、これは食べられません。 +To drink it, wield it, then rightclick.=飲むには、手に持ってから右クリックします。 +You cannot drink this when your hunger bar is full.=満腹ゲージが満タンなら、これは飲めません。 +To consume it, wield it, then rightclick.=消費するには、手に持ってから右クリックします。 +You cannot consume this when your hunger bar is full.=満腹ゲージが満タンなら、これは消費できません。 +You have to wait for about 2 seconds before you can eat or drink again.=また飲み食いできるようになるまで、2秒くらい待たねばなりません。 +Hunger points restored: @1=満腹度回復:@1 +Saturation points restored: @1%.1f=隠し満腹度回復:@1.1f +This item can be repaired at an anvil with: @1.=このアイテムは、金床と次のもので修理できます:@1 +This item can be repaired at an anvil with any wooden planks.=このアイテムは、金床と板材で修理できます。 +This item can be repaired at an anvil with any item in the “@1” group.=このアイテムは、金床と"@1"グループのアイテムで修理できます。 +This item cannot be renamed at an anvil.=このアイテムは、金床で名前を変更できません。 +This block crushes any block it falls into.=このブロックが落ちると、どんなブロックでも潰します。 +When this block falls deeper than 1 block, it causes damage to any player it hits. The damage dealt is B×2−2 hit points with B @= number of blocks fallen. The damage can never be more than 40 HP.=このブロックが1ブロックより深く落ちたとき、当たったプレイヤーにダメージを与えます。受けるダメージは B×2 -2HP と B @=落ちたブロック数。ダメージは40HP以上になることはありません。 +Diamond Pickaxe=ダイヤモンドのツルハシ +Iron Pickaxe=鉄のツルハシ +Stone Pickaxe=石のツルハシ +Golden Pickaxe=金のツルハシ +Wooden Pickaxe=木製のツルハシ +Diamond Axe=ダイヤモンドの斧 +Iron Axe=鉄の斧 +Stone Axe=石の斧 +Golden Axe=金の斧 +Wooden Axe=木製の斧 +Diamond Shovel=ダイヤモンドのシャベル +Iron Shovel=鉄のシャベル +Stone Shovel=石のシャベル +Golden Shovel=金のシャベル +Wooden Shovel=木製のシャベル +This block can be mined by any tool instantly.=このブロックは、どんな道具を使ってもすぐに掘れます。 +This block can be mined by:=このブロックは次のもので掘れます: +Hardness: ∞=硬さ:∞ +Hardness: @1=硬さ:@1 +This block will not be destroyed by TNT explosions.=このブロックは、TNTの爆発では壊れません。 +This block drops itself when mined by shears.=このブロックはハサミで掘ると、それ自体をドロップします。 +@1×@2=@1×@2 +This blocks drops the following when mined by shears: @1=このブロックはハサミで掘ると、次のものをドロップします:@1 +, =, +• Shears=・ハサミ +• Sword=・剣 +• Hand=・手 +This is a melee weapon which deals damage by punching.=これは殴りつけることでダメージを与える近接武器です。 +Maximum damage: @1 HP=最大ダメージ:@1 HP +Full punch interval: @1 s=全力攻撃の間隔:@1秒 +This tool is capable of mining.=この道具は採掘が可能です。 +Mining speed: @1=採掘速度:@1 +Painfully slow=苦痛レベルで遅い +Very slow=とても遅い +Slow=遅い +Fast=速い +Very fast=とても速い +Extremely fast=とてつもなく速い +Instantaneous=瞬間的 +@1 uses=@1 使用 +Unlimited uses=無限に使用可能 +Block breaking strength: @1=ブロック破壊力:@1 +Mining durability: @1=採掘耐久度:@1 +Armor points: @1=防具値:@1 +Armor durability: @1=防具耐久度:@1 +It can be worn on the head.=頭に装着することもできます。 +It can be worn on the torso.=胴体に装着することもできます。 +It can be worn on the legs.=脚部に装着することもできます。 +It can be worn on the feet.=足に装着することもできます。 diff --git a/mods/HELP/mcl_doc_basics/locale/mcl_doc_basics.ja.tr b/mods/HELP/mcl_doc_basics/locale/mcl_doc_basics.ja.tr new file mode 100644 index 0000000000..bde6e21526 --- /dev/null +++ b/mods/HELP/mcl_doc_basics/locale/mcl_doc_basics.ja.tr @@ -0,0 +1,511 @@ +# textdomain: mcl_doc_basics +Basics=基礎編 +Everything you need to know to get started with playing=プレイを始めるために必要なすべてのこと +Advanced usage=高度な使用方法 +Advanced information which may be nice to know, but is not crucial to gameplay=知っておくと便利だが、ゲームプレイには重要でない高度な情報 +Quick start=クイックスタート +This is a very brief introduction to the basic gameplay:=基本的なゲームプレイの簡素な紹介: +Basic controls:=基本操作: +• Move mouse to look=・マウスを動かして見る +• [W], [A], [S] and [D] to move=・[W]、[A]、[S]、[D]で移動 +• [E] to sprint=・[E]で走る +• [Space] to jump or move upwards=・[Space]でジャンプ / 上昇 +• [Shift] to sneak or move downwards=・[Shift]でスニーク / 下降 +• Mouse wheel or [1]-[9] to select item=・マウスホイールか[1]-[9]でアイテム選択 +• Left-click to mine blocks or attack=・左クリックでブロックを掘る / 攻撃 +• Recover from swings to deal full damage=・最大ダメージを与えるには攻撃間隔にインターバルが必要 +• Right-click to build blocks and use things=・右クリックでブロックを積む / モノを使う +• [I] for the inventory=・[I]でインベントリ画面 +• First items in inventory appear in hotbar below=・インベントリの最初のアイテムが、下のホットバーに表示される +• Lowest row in inventory appears in hotbar below=・インベントリ最後尾のアイテムが、下のホットバーに表示される +• [Esc] to close this window=・[Esc]でこのウィンドウを閉じる +How to play:=プレイ方法 +• 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=・インベントリメニューの2×2グリッド(クラフト用グリッド)に木を置き、板材を4枚クラフト +• Place them in a 2×2 shape in the crafting grid to craft a crafting table=・それらをクラフトグリッドに2×2の形で配置し、作業台をクラフト +• Place the crafting table on the ground=・作業台を地面に置く +• Rightclick it for a 3×3 crafting grid=・それを右クリックで、3×3のクラフトグリッドが表示される +• Use the crafting guide (book icon) to learn all the possible crafting recipes=・クラフトガイド(本のアイコン)を使い、可能な限りのクラフトレシピを学ぶ +• Craft a wooden pickaxe so you can dig stone=・石を掘れるようになるために、木製のツルハシをクラフト +• Different tools break different kinds of blocks. Try them out!=・道具によって壊せるブロックの種類が異なる。試してみよう! +• Read entries in this help to learn the rest=・続きを学ぶには、このヘルプのエントリーを読む +• Continue playing as you wish. There's no goal. Have fun!=・思いのままにプレイを続けよう。ゴールはありません。楽しんで! +Minetest=Minetest(マインテスト) +Minetest is a free software game engine for games based on voxel gameplay, inspired by InfiniMiner, Minecraft, and the like. Minetest was originally created by Perttu Ahola (alias “celeron55”).=Minetestは、InfiniMinerやMinecraftなどに影響を受けた、ボクセルゲームプレイに基づいたゲームのためのフリーソフトウェア・ゲームエンジンです。Minetestのオリジナルは、Perttu Ahola (別名"celeron55") によって作成されました。 +The player is thrown into a huge world made out of cubes or blocks. These cubes usually make the landscape they blocks can be removed and placed almost entirely freely. Using the collected items, new tools and other items can be crafted. Games in Minetest can, however, be much more complex than this.=プレイヤーは、立方体やブロックでできた巨大な世界に放り込まれます。これらのキューブは大抵、ほぼ自由にブロックを削除・配置でき、景観を作りあげます。収集したアイテムを使って、新しい道具や他のアイテムを作れます。Minetestのゲームは、しかし、これよりもはるかに複雑にできます。 +A core feature of Minetest is the built-in modding capability. Mods modify existing gameplay. They can be as simple as adding a few decorational blocks or be very complex by e.g. introducing completely new gameplay concepts, generating a completely different kind of world, and many other things.=Minetestの中核を成すのは、組み込みのMOD(モディファイ)機能です。MODとは、既存のゲームプレイを改造するものです。装飾ブロックを追加するだけの簡単なものから、全く新しいゲームプレイコンセプトを導入したり、全く異なる種類の世界を生成したりする非常に複雑なものまで、多岐にわたります。 +Minetest can be played alone or online together with multiple players. Online play will work out of the box with any mods, with no need for additional software as they are entirely provided by the server.=Minetestは、一人でプレイすることも、複数のプレイヤーと一緒にオンラインでプレイすることも可能です。サーバーが全てを提供するため、どんなMODでもオンラインプレイはそのまま動作し、追加のソフトウェアも要りません。 +Minetest is usually bundled with a simple default game, named “Minetest Game” (shown in images 1 and 2). You probably already have it. Other games for Minetest can be downloaded from the official Minetest forums .=Minetestには通常、「Minetest Game」という名前のシンプルな基本のゲームが同梱されています(画像1、2のとおり)。おそらく、すでにお持ちでしょう。Minetest用の他のゲームは、Minetestの公式フォーラム からダウンロードできます。 +Minetest as well as Minetest Game are both unfinished at the moment, so please forgive us when not everything works out perfectly.=MinetestもMinetest Gameも現在未完成なので、すべてが完璧とは言えませんが、ご容赦を。 +Sneaking=スニーキング +Sneaking makes you walk slower and prevents you from falling off the edge of a block.=スニークすると遅く歩くようになり、またブロックの端から落下するのを防ぐ効果もあります。 +To sneak, hold down the sneak key (default: [Shift]). When you release it, you stop sneaking. Careful: When you release the sneak key at a ledge, you might fall!=スニークするには、スニークキー(デフォルト:[Shift])を押してください。離すとスニーキングをやめます。注:崖っぷちでスニークキーを離すと、落ちるかもしれません! +• Sneak: [Shift]=・スニーク:[Shift] +Sneaking only works when you stand on solid ground, are not in a liquid and don't climb.=スニーキングは、固い地面の上に立ち、液体の中におらず、よじ登ったりしていない場合にのみ有効です。 +If you jump while holding the sneak key, you also jump slightly higher than usual.=スニークキーを押しながらジャンプすると、通常より少し高くジャンプするようにもなっています。 +Sneaking might be disabled by mods. In this case, you still walk slower by sneaking, but you will no longer be stopped at ledges.=スニーキングはMODによって無効化される場合があります。この場合、歩行の鈍化は残りますが、崖っぷちに留まる機能は無くなっています。 +Controls=操作 +These are the default controls:=デフォルトの操作: +Basic movement:=基本的な移動: +• Moving the mouse around: Look around=・マウスの移動:周りを見る +• W: Move forwards=・W:前方移動 +• A: Move to the left=・A:左移動 +• D: Move to the right=・D:右移動 +• S: Move backwards=・S:後方移動 +• E: Sprint=・E:走る +While standing on solid ground:=固い地面に立ちながら: +• Space: Jump=・Space:ジャンプ +• Shift: Sneak=・Shift:スニーク +While on a ladder, swimming in a liquid or fly mode is active=ハシゴに登上・液中で遊泳・飛行モードが有効などの間: +• Space: Move up=・Space:上昇 +• Shift: Move down=・Shift:下降 +Extended movement (requires privileges):=拡張移動(要権限): +• J: Toggle fast mode, makes you run or fly fast (requires “fast” privilege)=・J:高速モードに切替えで、走行・飛行が速くなる(要 "fast" 権限) +• K: Toggle fly mode, makes you move freely in all directions (requires “fly” privilege)=・K:飛行モードに切替えで、全方向に自由移動が可能(要 "fly" 権限) +• H: Toggle noclip mode, makes you go through walls in fly mode (requires “noclip” privilege)=・H:壁抜けモードに切替えで、飛行モード中に壁抜けが可能(要 "noclip" 権限) +• E: Move even faster when in fast mode=・E:高速モードではさらに速く移動 +• E: Walk fast in fast mode=・E:高速モードで早歩き +World interaction:=ワールドでの作用: +• Left mouse button: Punch / mine blocks / take items=・左クリック:叩く / ブロック採掘 / アイテム取得 +• Left mouse button: Punch / mine blocks=・左クリック:叩く / ブロック採掘 +• Right mouse button: Build or use pointed block=・右クリック:指定したブロックを設置または使用 +• Shift+Right mouse button: Build=・Shift + 右クリック:設置 +• Roll mouse wheel: Select next/previous item in hotbar=・マウスホイール回転:ホットバーのアイテム選択 次/前 +• Roll mouse wheel / B / N: Select next/previous item in hotbar=・マウスホイール回転 / B / N:ホットバーのアイテム選択 次/前 +• 1-9: Select item in hotbar directly=・1-9:ホットバーのアイテムを直で選択 +• Q: Drop item stack=・Q:アイテムをスタック一括でドロップ +• Shift+Q: Drop 1 item=・Shift + Q:アイテムを一個単位でドロップ +• I: Show/hide inventory menu=・I:インベントリメニューの表示/非表示 +Inventory interaction:=インベントリでの作用: +See the entry “Basics > Inventory”.=エントリー“Basics > Inventory”を参照の事。 +Camera:=カメラ: +• Z: Zoom=・Z:ズーム +• F7: Toggle camera mode=・F7:カメラモード切替 +• F8: Toggle cinematic mode=・F8:シネマティックモード切替 +Interface:=インターフェイス: +• Esc: Open menu window (pauses in single-player mode) or close window=・Esc: +• F1: Show/hide HUD=・F1:HUDの表示/非表示 +• F2: Show/hide chat=・F2:チャットの表示/非表示 +• F9: Toggle minimap=・F9:ミニマップ切替 +• Shift+F9: Toggle minimap rotation mode=・Shift + F9:ミニマップの回転モード切替 +• F10: Open/close console/chat log=・F10:コンソール/チャットログの開/閉 +• F12: Take a screenshot=・F12:スクリーンショットを撮る +Server interaction:=サーバーでの作用: +• T: Open chat window (chat requires the “shout” privilege)=・T:チャットウィンドウを開く(チャットには "shout" 権限が必要) +• /: Start issuing a server command=・/:サーバーコマンドの発行開始 +Technical:=技術的なやつ: +• R: Toggle far view (disables all fog and allows viewing far away, can make game very slow)=・R:遠景の切替え(すべてのフォグを無効にして遠景を望めるが、ゲームを非常に遅くする場合あり) +• +: Increase minimal viewing distance=・+:最短視野距離の拡大 +• -: Decrease minimal viewing distance=・-:最短視野距離の縮小 +• F3: Enable/disable fog=・F3:フォグの有効/無効 +• F5: Enable/disable debug screen which also shows your coordinates=・F5:座標表示付デバッグ画面の有効/無効 +• F6: Only useful for developers. Enables/disables profiler=・F6:開発者のみに有用。プロファイラの有効化/無効化 +• P: Only useful for developers. Writes current stack traces=・P:開発者のみに有用。現在のスタックトレースを書き込む +Players=プレイヤー +Players (actually: “player characters”) are the characters which users control.=プレイヤー(正しくは「プレイヤーキャラクター」)とは、ユーザーが操作するキャラクターを指します。 +Players are living beings. They start with a number of health points (HP) and a number of breath points (BP).=プレイヤーは生きている存在です。多数のHP(ヘルスポイント)とBP(ブレスポイント)でスタートします。 +Players are capable of walking, sneaking, jumping, climbing, swimming, diving, mining, building, fighting and using tools and blocks.=プレイヤーは、歩く、忍び寄る、ジャンプする、よじ登る、泳ぐ、潜る、採掘する、建てる、戦う、そして道具やブロックを使うことができます。 +Players can take damage for a variety of reasons, here are some:=プレイヤーはさまざまな理由でダメージを受けますが、いくつか紹介します: +• Taking fall damage=・落下ダメージを受ける +• Touching a block which causes direct damage=・直接ダメージを与えるブロックに触れる +• Drowning=・溺れる +• Being attacked by another player=・他のプレイヤーから攻撃される +• Being attacked by a computer enemy=・コンピュータの敵から攻撃される +At a health of 0, the player dies. The player can just respawn in the world.=体力が0になると、プレイヤーは死亡します。プレイヤーはワールドにただリスポーンします。 +Other consequences of death depend on the game. The player could lose all items, or lose the round in a competitive game.=その他、死亡した場合の結果はゲームによって異なります。プレイヤーはすべてのアイテムを失ったり、対戦ゲームでは失点する可能性があります。 +Some blocks reduce breath. While being with the head in a block which causes drowning, the breath points are reduced by 1 for every 2 seconds. When all breath is gone, the player starts to suffer drowning damage. Breath is quickly restored in any other block.=いくつかの溺れる効果のあるブロックに頭を入れている間は、2秒ごとにBP(ブレスポイント)が1ずつ減少します。息がなくなると、溺水ダメージを受けるようになります。そのほかのブロックではすぐに呼吸が回復します。 +Damage can be disabled on any world. Without damage, players are immortal and health and breath are unimportant.=ダメージはどのワールドでも無効にできます。 ダメージがなければプレイヤーは不死であり、ヘルスやブレスは重要ではありません。 +In multi-player mode, the name of other players is written above their head.=マルチプレイモードでは、他のプレイヤーの頭上に名前が表示されます。 +Items=アイテム +Items are things you can carry along and store in inventories. They can be used for crafting, smelting, building, mining, and more. Types of items include blocks, tools, weapons and items only used for crafting.=アイテムは、携行したりインベントリに格納したりできるものです。クラフト、製錬、建築、採掘などに使えます。アイテムの分類としては、ブロック、ツール、武器、そしてクラフト専用アイテム等があります。 +An item stack is a collection of items of the same type which fits into a single item slot. Item stacks can be dropped on the ground. Items which drop into the same coordinates will form an item stack.=アイテムスタックとは、1つのアイテムスロットに入る、同一種アイテムのまとまりです。アイテムスタックは地面に落とせます。同じ座標にドロップしたアイテムは、アイテムスタックを形成します。 +Dropped item stacks will be collected automatically when you stand close to them.=ドロップしたアイテムスタックは、近くに立つと自動的に回収されます。 +Items have several properties, including the following:=アイテムには、次のようないくつかのプロパティが含まれます: +• Maximum stack size: Number of items which fit on 1 item stack=・最大スタックサイズ:1アイテムスタックに収まるアイテム数 +• Pointing range: How close things must be to be pointed while wielding this item=・ポイント範囲:このアイテムを手に持っている時、モノがどのくらい近くにあればポイントできるか +• Group memberships: See “Basics > Groups”=・グループのメンバーシップ:“Basics > Groups”参照 +• May be used for crafting or cooking=・クラフトや調理に使えるかも +Tools=道具 +Some items may serve as a tool when wielded. Any item which has some special use which can be directly used by its wielder is considered a tool.=アイテムによっては、手に持つことで道具として役目を果たすことがあります。使い手が直接使用できる何らかの特有な用途を持つアイテムは、道具とみなされます。 +A common subset of tools is mining tools. These are important to break all kinds of blocks. Weapons are a kind of tool. There are of course many other possible tools. Special actions of tools are usually done by left-click or right-click.=道具の中の分類で一般的なのは、採掘道具です。これらは、あらゆるブロックを壊すために重要です。武器も道具の一種です。もちろん、他にも多くの道具があります。道具の特殊な操作は、通常、左クリックか右クリックで行います。 +When nothing is wielded, players use their hand which may act as tool and weapon.=何も手に持っていないとき、プレイヤーは、道具や武器としても振る舞う自分の手を使います。 +Mining tools are important to break all kinds of blocks. Weapons are another kind of tool. There are some other more specialized tools. Special actions of tools are usually done by right-click.=採掘道具は、あらゆるブロックを壊すために重要な道具です。武器も道具の一種です。その他にも、より専門的な道具があります。道具の特殊な動作は、たいてい右クリックで行います。 +When nothing is wielded, players use their hand which may act as tool and weapon. The hand is capable of punching and deals minimum damage.=何も手に持っていないとき、プレイヤーは、道具や武器としても機能する自分の手を使います。手は、最小限のダメージを与える攻撃ができます。 +Many tools will wear off when using them and may eventually get destroyed. The damage is displayed in a damage bar below the tool icon. If no damage bar is shown, the tool is in mint condition. Tools may be repairable by crafting, see “Basics > Crafting”.=多くの道具は使っていると消耗していき、ついには壊れてしまうこともあります。ダメージは、道具のアイコンの下にあるダメージバーで表示されます。ダメージバーが表示されていない場合、その道具は新品同様です。道具はクラフトで修理できる場合があります。“Basics > Crafting”を参照してください。 +Weapons=武器 +Some items are usable as a melee weapon when wielded. Weapons share most of the properties of tools.=一部のアイテムは、手に持つと近接武器として使えます。武器は、道具のプロパティのほとんどを共有しています。 +Melee weapons deal damage by punching players and other animate objects. There are two ways to attack:=近接武器は、プレイヤーや他のMOBを叩くことでダメージを与えることができます。攻撃方法は次の2つ: +• Single punch: Left-click once to deal a single punch=・単発攻撃:左クリック1回で、単一の攻撃 +• Quick punching: Hold down the left mouse button to deal quick repeated punches=・連続攻撃:マウスの左ボタンを押したままで、攻撃を素早く繰り返す +There are two core attributes of melee weapons:=近接武器の核となる性質は次の2つ: +• Maximum damage: Damage which is dealt after a hit when the weapon was fully recovered=・最大ダメージ:武器の力が完全に復帰している場合の、ヒット後の与ダメージ +• Full punch interval: Time it takes for fully recovering from a punch=・全力攻撃間隔:攻撃後、力が完全に復帰するまでの時間 +A weapon only deals full damage when it has fully recovered from a previous punch. Otherwise, the weapon will deal only reduced damage. This means, quick punching is very fast, but also deals rather low damage. Note the full punch interval does not limit how fast you can attack.=武器は、前の攻撃から完全に復帰したときのみ、全力でダメージを与えます。そうでない場合、武器が与えられるダメージは減少します。つまり、連続攻撃は非常に速いですが、与えるダメージはむしろ低くなります。なお、全力攻撃の間隔は、攻撃できる速さを制限するものではありません。 +There is a rule which sometimes makes attacks impossible: Players, animate objects and weapons belong to damage groups. A weapon only deals damage to those who share at least one damage group with it. So if you're using the wrong weapon, you might not deal any damage at all.=時々、攻撃が不可能になるルール:プレイヤー、MOB、武器はダメージグループに属します。武器は、少なくとも1つのダメージグループを共有している相手にしか、ダメージを与えません。なので使う武器が悪いと、なんのダメージも与えられないことがあります。 +Pointing=ポイントする +“Pointing” means looking at something in range with the crosshair. Pointing is needed for interaction, like mining, punching, using, etc. Pointable things include blocks, players, computer enemies and objects.=「ポイントする」とは、 十字線で範囲内の何かを指すことです。採掘、攻撃、使う、等といった相互作用に必要です。ポイント可能なものには、ブロック、プレイヤー、コンピュータの敵やオブジェクトがあります。 +To point something, it must be in the pointing range (also just called “range”) of your wielded item. There's a default range when you are not wielding anything. A pointed thing will be outlined or highlighted (depending on your settings). Pointing is not possible with the 3rd person front camera.=何かをポイントするためには、その何かが、手に持っているアイテムのポイント範囲(単に「範囲」とも呼ばれます)内にある必要があります。何も手に持っていない時のデフォルトの範囲もあります。ポイントされたものは、輪郭が強調されるか、またはハイライトされます(設定による)。3人称視点のフロントカメラでは、ポイントする事はできません。 +A few things can not be pointed. Most blocks are pointable. A few blocks, like air, can never be pointed. Other blocks, like liquids can only be pointed by special items.=いくつかのものはポイントできません。ほとんどのブロックはポイント可能です。空気のようないくつかのブロックは、決して指すことができません。液体のような他のブロックは、特別なアイテムによってのみ指さすことができます。 +Camera=カメラ +There are 3 different views which determine the way you see the world. The modes are:=ワールドの見方を決める3つの視点があります。モードは次のとおり: +• 1: First-person view (default)=・1:一人称視点(デフォルト) +• 2: Third-person view from behind=・:背後からの三人称視点 +• 3: Third-person view from the front=・:前面からの三人称視点 +You can change the camera mode by pressing [F7].=[F7]を押すと、カメラモードを変更できます。 +You might be able to zoom with [Z] to zoom the view at the crosshair. This allows you to look further.=[Z]を押すと十字線に沿った視界をズームできる、かもしれません。これによって、より遠くを望めます。 +Zooming is a gameplay feature that might be enabled or disabled by the game. By default, zooming is enabled when in Creative Mode but disabled otherwise.=ズーム操作は、ゲームによって有効または無効になる可能性のあるゲームプレイ機能です。デフォルトでは、ズームが有効なのはクリエイティブモードのみで、それ以外なら無効化されています。 +There is also Cinematic Mode which can be toggled with [F8]. With Cinematic Mode enabled, the camera movements become more smooth. Some players don't like it, it is a matter of taste.=また、[F8]で切替え可能なシネマティックモードもあります。シネマティックモードを有効にすると、カメラの動きがより滑らかになります。好みによりますが、苦手なプレイヤーもいるようです。 +By holding down [Z], you can zoom the view at your crosshair. You need the “zoom” privilege to do this.=[Z]を押していると、 十字線に沿った視界をズームできます。このためには“zoom”権限が必要です。 +• Switch camera mode: [F7]=・カメラモードの切替:[F7] +• Toggle Cinematic Mode: [F8]=・シネマティックモードの切替:[F8] +• Zoom: [Z]=・ズーム:[Z] +Blocks=ブロック +The world of MineClone 2 is made entirely out of blocks (voxels, to be precise). Blocks can be added or removed with the correct tools.=MineClone 2のワールドは、すべてがブロック(正確にはボクセル)で構成されています。ブロックは、適切なツールで追加や削除ができます。 +The world is made entirely out of blocks (voxels, to be precise). Blocks can be added or removed with the correct tools.=ワールドは、すべてがブロック(正確にはボクセル)で構成されています。ブロックは、適切なツールで追加や削除ができます。 +Blocks can have a wide range of different properties which determine mining times, behavior, looks, shape, and much more. Their properties include:=ブロックは幅広く多様なプロパティを持つことができ、採掘時間、動作、外観、形状などが定まります。プロパティは次のとおり: +• Collidable: Collidable blocks can not be passed through; players can walk on them. Non-collidable blocks can be passed through freely=・衝突性:衝突性ブロックは通過できず、プレイヤーはその上を歩ける。非衝突性ブロックは、自由に通り抜けられる +• Pointable: Pointable blocks show a wireframe or a halo box when pointed. But you will just point through non-pointable blocks. Liquids are usually non-pointable but they can be pointed at by some special tools=・ポイント可能なブロックは、ポイントするとワイヤーフレームまたはハイライトボックスが表示される。しかしポイント不可能なブロックでは、判定がただ通り抜ける。液体はたいていポイント不可能だが、いくつかの特殊な道具ならポイントできる +• Mining properties: By which tools it can be mined, how fast and how much it wears off tools=・採掘のプロパティ:どのような道具で採掘できるか、道具の消耗はどの程度か、など +• Climbable: While you are at a climbable block, you won't fall and you can move up and down with the jump and sneak keys=・よじ登り可能:よじ登り可能なブロックにいる間は落下せず、ジャンプキーとスニークキーで上下に移動できる +• Drowning damage: See the entry “Basics > Player”=・溺水ダメージ:エントリー“Basics > Player”参照 +• Liquids: See the entry “Basics > Liquids”=・液体:エントリー“Basics > Liquids”参照 +• Group memberships: Group memberships are used to determine mining properties, crafting, interactions between blocks and more=・グループの帰属関係:グループの帰属関係は、採掘のプロパティ、クラフト、ブロック間の相互作用などを定めるために用いられる +Mining=採掘 +Mining (or digging) is the process of breaking blocks to remove them. To mine a block, point it and hold down the left mouse button until it breaks.=採掘(または掘削)とは、ブロックを掘り壊して取り除く工程のことです。ブロックを掘るには、ブロックをポイントし、それが壊れるまでマウスの左ボタンを押し続けます。 +Blocks require a mining tool to be mined. Different blocks are mined by different mining tools, and some blocks can not be mined by any tool. Blocks vary in hardness and tools vary in strength. Mining tools will wear off over time. The mining time and the tool wear depend on the block and the mining tool. The fastest way to find out how efficient your mining tools are is by just trying them out on various blocks. Any items you gather by mining will drop on the ground, ready to be collected.=ブロックを掘るには、採掘道具を要します。採掘道具によって掘れるブロックが異なり、どんな道具でも掘れないブロックもあります。ブロックの硬さはさまざまで、道具の強さもさまざまです。採掘道具は使用時間に応じて消耗します。採掘時間と道具の消耗は、ブロックと採掘道具によって異なります。採掘道具の効率を知るには、様々なブロックで試してみるのが一番早いでしょう。アイテムは採掘によって地面に落ちるので、すぐに収集できます。 +After mining, a block may leave a “drop” behind. This is a number of items you get after mining. Most commonly, you will get the block itself. There are other possibilities for a drop which depends on the block type. The following drops are possible:=採掘後、ブロックが「ドロップ」を残すことがあります。これは、採掘後に得られるアイテムの数々です。最も一般的なのは、そのブロックそのものを入手することです。その他にも、ブロックの種類によってドロップの可能性があります。考えられるドロップは次の通り: +• Always drops itself (the usual case)=・常にそれ自身をドロップ(大抵の場合) +• Always drops the same items=・常に同じアイテムをドロップ +• Drops items based on probability=・確率でアイテムをドロップ +• Drops nothing=・ドロップなし +Building=構築 +Almost all blocks can be built (or placed). Building is very simple and has no delay.=ほぼすべてのブロックが構築(配置)可能です。構築はとてもシンプルで、遅延もありません。 +To build your wielded block, point at a block in the world and right-click. If this is not possible because the pointed block has a special right-click action, hold down the sneak key before right-clicking.=手に持ったブロックを構築するには、ワールド内のブロックをポイントして右クリックします。これができない場合は、ポイントしたブロックが特殊な右クリックアクションを持っているせいである為、スニークキーを押しながら右クリックしてください。 +Blocks can almost always be built at pointable blocks. One exception are blocks attached to the floor; these can only be built on the floor.=ブロックは、ほとんどの場合、ポイント可能なブロックに構築できます。例外として、床に付属するブロックは、床の上にしか構築できません。 +Normally, blocks are built in front of the pointed side of the pointed block. A few blocks are different: When you try to build at them, they are replaced.=通常、ブロックはポイントした側を前にして構築されます。一部の違うブロック:そのブロックに向かって構築しようとすると、置き換えられます。 +Liquids=液体 +Liquids are special dynamic blocks. Liquids like to spread and flow to their surrounding blocks. Players can swim and drown in them.=液体は特殊な動的ブロックです。液体は周囲のブロックに広がり、流れていく習性があります。プレイヤーはその中で泳いだり、溺れたりできます。 +Liquids usually come in two forms: In source form (S) and in flowing form (F).=液体が通常取りうる2つの形態:源泉型(S)と流動型(F)である。 +Liquid sources have the shape of a full cube. A liquid source will generate flowing liquids around it from time to time, and, if the liquid is renewable, it also generates liquid sources. A liquid source can sustain itself. As long it is left alone, a liquid source will normally keep its place and does not drain out.=液体源は完全な立方体の形を持っています。液体源は時々その周りに流動液体を発生させ、もし液体が再生可能であれば、液体源も発生させます。液体源は自身を維持できます。放っておく限り、液体源は通常その場所を保ち、流出しません。 +Flowing liquids take a sloped form. Flowing liquids spread around the world until they drain. A flowing liquid can not sustain itself and always comes from a liquid source, either directly or indirectly. Without a liquid source, a flowing liquid will eventually drain out and disappear.=流動液体は、傾斜した形状をとります。それらは枯渇するまでワールド中に広がります。流動液体は自身を維持できず、常に直接的または間接的に液体源から生じます。液体源がなければ、流動液体はやがて流出しきって消えます。 +All liquids share the following properties:=すべての液体に共通するプロパティは次のとおり: +• All properties of blocks (including drowning damage)=・ブロックのプロパティ全般(溺水ダメージ含む) +• Renewability: Renewable liquids can create new sources=・再生可能性:再生可能な液体は、新たな源泉を生み出せる +• Flowing range: How many flowing liquids are created at maximum per liquid source, it determines how far the liquid will spread. Possible are ranges from 0 to 8. At 0, no flowing liquids will be created. Image 5 shows a liquid of flowing range 2=・流動範囲:液体源1つにつき、最大でどれだけの流動液体を生むか、液体がどこまで広がるかの設定。可能な範囲は0から8まで。0の場合、流動液体は発生しない。画像5は、流動範囲2の液体 +• Viscosity: How slow players move through it and how slow the liquid spreads=・粘性:プレイヤーがその中を移動する際の遅さ、液体が広がる際の遅さ +Renewable liquids create new liquid sources at open spaces (image 2). A new liquid source is created when:=再生可能な液体は、空きスペースに新たな液体源を生み出します(画像2)。新しい液体源ができる時は次のとおり: +• Two renewable liquid blocks of the same type touch each other diagonally=・同じ種類の再生可能な液体ブロック2個が、斜めに接する +• These blocks are also on the same height=・これらのブロックも同じ高さにある +• One of the two “corners” is open space which allows liquids to flow in=・2つの「かど」のうち1つは、液体が流れ込む空きスペース +When those criteria are met, the open space is filled with a new liquid source of the same type (image 3).=それらの条件を満たすと、空きスペースに同じ種類の新しい液体源が充填されます(画像3)。 +Swimming in a liquid is fairly straightforward: The usual direction keys for basic movement, the jump key for rising and the sneak key for sinking.=液体の中を泳ぐのはとても直感的:基本的な動きは通常の方向キー、浮上はジャンプキー、潜水はスニークキーで行います。 +The physics for swimming and diving in a liquid are:=液体の中を泳いだり潜ったりするときの物理は: +• The higher the viscosity, the slower you move=・粘度が高いほど、動きが遅くなる +• If you rest, you'll slowly sink=・休んでいると、じわじわと沈む +• There is no fall damage for falling into a liquid as such=・このように、液体に落下しても落下ダメージはない +• If you fall into a liquid, you will be slowed down on impact (but don't stop instantly). Your impact depth is determined by your speed and the liquid viscosity. For a safe high drop into a liquid, make sure there is enough liquid above the ground, otherwise you might hit the ground and take fall damage=液中に落ちると衝撃で速度が落ちる(但し瞬時には止まらない)。衝撃の深さは、速度と液体の粘性によって決まる。液体へ安全に高飛び込みするには、地面より上に十分な液体があることを確認する。そうでなければ、地面に衝突して落下ダメージを受ける可能性がある +Liquids are often not pointable. But some special items are able to point all liquids.=液体は往々にしてポイント不可能です。しかし一部の特殊なアイテムは、すべての液体をポイントすることができます。 +Crafting=クラフト +Crafting is the task of combining several items to form a new item.=クラフトとは、複数のアイテムを組み合わせて新しいアイテムを作りだす作業です。 +To craft something, you need one or more items, a crafting grid (C) and a crafting recipe. A crafting grid is like a normal inventory which can also be used for crafting. Items need to be put in a certain pattern into the crafting grid. Next to the crafting grid is an output slot (O). Here the result will appear when you placed items correctly. This is just a preview, not the actual item. Crafting grids can come in different sizes which limits the possible recipes you can craft.=何かをクラフトするには、1つ以上のアイテム、クラフトグリッド(C)、クラフトレシピが必要です。クラフトグリッドは通常のインベントリのようなもので、クラフトにも使えます。アイテムは、クラフトグリッドに一定のパターンで配置する必要があります。クラフトグリッドの隣には、アウトプットスロット(O)があります。ここにアイテムを正しく配置すると、結果が表示されます。これはあくまでプレビューであり、実際のアイテムではありません。クラフトグリッドの大きさはまちまちなため、クラフトできるレシピが制限されたりもします。 +To complete the craft, take the result item from the output slot, which will consume items from the crafting grid and creates a new item. It is not possible to place items into the output slot.=クラフトを完成させるには、出力スロットから結果のアイテムを取ります。このとき、クラフトグリッドからアイテムが消費され、新しいアイテムが作成されます。出力スロットにはアイテムを配置できません。 +A description on how to craft an item is called a “crafting recipe”. You need this knowledge to craft. There are multiple ways to learn crafting recipes. One way is by using a crafting guide, which contains a list of available crafting recipes. Some games provide crafting guides. There are also some mods which you can download online for installing a crafting guide. Another way is by reading the online manual of the game (if one is available).=アイテムのクラフト方法を記したものを「クラフトレシピ」と呼びます。この知識は、クラフトをするのに必要です。クラフトレシピを覚えるには、複数の方法があります。1つは、クラフトレシピの使用可能なリストを含むクラフトガイドを使用する方法です。いくつかのゲームではクラフトガイドを提供しています。また、クラフトガイドをインストールするために、オンラインでダウンロードできるMODがいくつかあります。もう1つの方法は、ゲームのオンラインマニュアルを読むことです(利用可能な場合)。 +Crafting recipes consist of at least one input item and exactly one stack of output items. When performing a single craft, it will consume exactly one item from each stack of the crafting grid, unless the crafting recipe defines replacements.=クラフトレシピは、少なくとも1つの入力アイテムと、ちょうど1つの出力アイテムのスタックから成ります。1つのクラフトを実行するとき、クラフトレシピが置換を定義していない限り、クラフトグリッドの各スタックから正確に1つのアイテムを消費します。 +There are multiple types of crafting recipes:=クラフトレシピは次のような複数の種類がある: +• Shaped (image 2): Items need to be placed in a particular shape=・整形(画像2):アイテムは特定の形に配置する必要がある +• Shapeless (images 3 and 4): Items need to be placed somewhere in input (both images show the same recipe)=形なし(画像3、4):アイテムは入力のどこかしらに置く必要がある(両画像とも同じレシピを表示) +• Cooking: Explained in “Basics > Cooking”=・調理:“Basics > Cooking”に解説あり +• Repairing (image 5): Place two damaged tools into the crafting grid anywhere to get a tool which is repaired by 5%=修復(画像5):損傷した道具を2つ、任意のクラフトグリッドに置くと、5%修復された道具が手に入る +In some crafting recipes, some input items do not need to be a concrete item, instead they need to be a member of a group (see “Basics > Groups”). These recipes offer a bit more freedom in the input items. Images 6-8 show the same group-based recipe. Here, 8 items of the “stone” group are required, which is true for all of the shown items.=・クラフトレシピの中には、入力アイテムが具体的でなくてもよいものがあり、その代わりグループに属している必要があります(“Basics > Groups”参照)。これらのレシピでは、入力アイテムにいくらか自由度があります。画像6-8は、同じグループ基準のレシピを示したものです。ここでは"stone "グループのアイテムが8つ必要であり、これは表示されているすべてのアイテムに当てはまります。 +Rarely, crafting recipes have replacements. This means, whenever you perform a craft, some items in the crafting grid will not be consumed, but instead will be replaced by another item.=まれに、クラフトレシピには置換があります。これは、クラフトを実行するたびに、クラフトグリッド内の一部のアイテムが消費されず、代わりに別のアイテムに置き換わることを意味します。 +Cooking=調理 +Cooking (or smelting) is a form of crafting which does not involve a crafting grid. Cooking is done with a special block (like a furnace), an cookable item, a fuel item and time in order to yield a new item.=調理(または製錬)は、クラフトグリッドを使用しないクラフトの一形態です。調理は、新しいアイテムを作るために、特別なブロック(かまどみたいな)、調理可能なアイテム、燃料アイテム、時間を使って行われます。 +Each fuel item has a burning time. This is the time a single item of the fuel keeps a furnace burning.=各燃料には燃焼時間があります。これは、1つの燃料がかまどの燃焼を維持する時間です。 +Each cookable item requires time to be cooked. This time is specific to the item type and the item must be “on fire” for the whole cooking time to actually yield the result.=調理可能な各アイテムは、調理するために時間を要します。この時間はアイテムの種類によって異なり、実際に結果を得るためには、調理時間全体にわたってアイテムに「火が通って」いなければいけません。 +Hotbar=ホットバー +At the bottom of the screen you see some squares. This is called the “hotbar”. The hotbar allows you to quickly access the first items from your player inventory.=画面の下に、いくつか四角いものが見えます。これは「ホットバー」と呼ばれるものです。ホットバーを使うと、インベントリの初段のアイテムに素早くアクセスできます。 +You can change the selected item with the mouse wheel or the keyboard.=選択した項目は、マウスホイールやキーボードで変更できます。 +• Select previous item in hotbar: [Mouse wheel up] or [B]=・ホットバーの選択項目を前へ:[マウスホイール上] or [B] +• Select next item in hotbar: [Mouse wheel down] or [N]=・ホットバーの選択項目を次へ:[マウスホイール下] or [N] +• Select item in hotbar directly: [1]-[9]=ホットバーの項目を直接選択:[1]-[9] +The selected item is also your wielded item.=選択したアイテムは、手に持ったアイテムでもあります。 +Minimap=ミニマップ +If you have a map item in any of your hotbar slots, you can use the minimap.=ホットバーのいずれかのスロットにマップアイテムがある場合、ミニマップが使えます。 +Press [F9] to make a minimap appear on the top right. The minimap helps you to find your way around the world. Press it again to select different minimap modes and zoom levels. The minimap also shows the positions of other players.=[F9]を押すと、右上にミニマップが表示されます。ミニマップは世界各地での道しるべになります。もう一度押すと、ミニマップモードやズームレベルが切替わります。ミニマップには、他のプレイヤーの位置も表示されます。 +There are 2 minimap modes and 3 zoom levels.=2つのミニマップモードと、3つのズームレベルがあります。 +Surface mode (image 1) is a top-down view of the world, roughly resembling the colors of the blocks this world is made of. It only shows the topmost blocks, everything below is hidden, like a satellite photo. Surface mode is useful if you got lost.=表層モード(画像1)はワールドを見下ろした光景で、このワールドを形作っているブロックの色に似通っています。一番上のブロックだけが表示され、その下は衛星写真のように隠れています。表層モードは、迷子になったときに便利です。 +Radar mode (image 2) is more complicated. It displays the “denseness” of the area around you and changes with your height. Roughly, the more green an area is, the less “dense” it is. Black areas have many blocks. Use the radar to find caverns, hidden areas, walls and more. The rectangular shapes in image 2 clearly expose the position of a dungeon.=レーダーモード(画像2)はもっと複雑です。これはあなたの周りのエリアの「密集度」を表示し、あなたの高度に応じて変化します。大雑把に言うと、緑色の部分が多いほど「密集」していない事になります。黒いエリアはブロックがたくさんあります。レーダーを使って、洞窟や隠し場所、壁などを発見してみましょう。画像2の四角い形は、ダンジョンの位置を明確に表しています。 +There are also two different rotation modes. In “square mode”, the rotation of the minimap is fixed. If you press [Shift]+[F9] to switch to “circle mode”, the minimap will instead rotate with your looking direction, so “up” is always your looking direction.=また、2種類の回転モードがあります。「正方形モード」では、ミニマップの回転は固定されています。[Shift] + [F9]を押して「円形モード」に切り替えると、ミニマップはあなたの視線方向に合わせて回転し、常に「上」があなたの視線方向となります。 +In some games, the minimap may be disabled.=ゲームによっては、ミニマップが無効になっている場合があります。 +• Toggle minimap mode: [F9]=・ミニマップのモードを切替:[F9] +• Toggle minimap rotation mode: [Shift]+[F9]=・ミニマップの回転モードを切替:[Shift] + [F9] +Inventory=インベントリ +Inventories are used to store item stacks. There are other uses, such as crafting. An inventory consists of a rectangular grid of item slots. Each item slot can either be empty or hold one item stack. Item stacks can be moved freely between most slots.=インベントリは、アイテムスタックを収納するために使います。他にもクラフトなどの用途があります。インベントリは、アイテムスロットの四角いグリッドで構成されています。各アイテムスロットは、空の状態か、1つのアイテムスタックを保持できます。アイテムのスタックは、ほとんどのスロット間で自由に移動できます。 +You have your own inventory which is called your “player inventory”, you can open it with the inventory key (default: [I]). The first inventory slots are also used as slots in your hotbar.=「プレイヤーインベントリ」と呼ばれる自分専用のインベントリがあり、インベントリキー(デフォルト:[I])で開けます。インベントリの初段スロットは、ホットバーのスロットとしても機能します。 +Blocks can also have their own inventory, e.g. chests and furnaces.=ブロックは、独自のインベントリを持つこともできます。例えばチェストやかまどです。 +Inventory controls:=インベントリの操作: +Taking: You can take items from an occupied slot if the cursor holds nothing.=取る:カーソルが何も保持していない場合、占有されているスロットからアイテムを取れます。 +• Left click: take entire item stack=・左クリック:アイテムをスタック丸ごと取る +• Right click: take half from the item stack (rounded up)=・右クリック:アイテムをスタックから半分取る(切り上げ) +• Middle click: take 10 items from the item stack=・中クリック:アイテムをスタックから10個取る +• Mouse wheel down: take 1 item from the item stack=・マウスホイール下:アイテムをスタックから1個取る +Putting: You can put items onto a slot if the cursor holds 1 or more items and the slot is either empty or contains an item stack of the same item type.=置く:カーソルに1つ以上のアイテムを保持し、目的のスロットが空か、同種のアイテムがスタックされている場合、そのアイテムを置けます。 +• Left click: put entire item stack=・左クリック:アイテムをスタック丸ごと置く +• Right click: put 1 item of the item stack=・右クリック:アイテムをスタックから1個置く +• Right click or mouse wheel up: put 1 item of the item stack=・右クリック または マウスホイール上:アイテムをスタックから1個置く +• Middle click: put 10 items of the item stack=・中クリック:アイテムをスタックから10個置く +Exchanging: You can exchange items if the cursor holds 1 or more items and the destination slot is occupied by a different item type.=交換する:カーソルに1つ以上のアイテムを保持し、目的のスロットが別種のアイテムで占有されている場合、アイテムを交換できます。 +• Click: exchange item stacks=・クリック:アイテムスタックを交換 +Throwing away: If you hold an item stack and click with it somewhere outside the menu, the item stack gets thrown away into the environment.=捨てる:アイテムスタックを保持し、メニュー外のどこかをクリックすると、アイテムスタックがその辺に投げ捨てられます。 +Quick transfer: You can quickly transfer an item stack to/from the player inventory to/from another item's inventory slot like a furnace, chest, or any other item with an inventory slot when that item's inventory is accessed. The target inventory is generally the most relevant inventory in this context.=直送する:炉やチェストなどのインベントリスロットに対しては、プレイヤーインベントリからアイテムスタックを直送できます。この場合対象となるのは、一般的に最も関連性の高いインベントリスロットです。 +• Sneak+Left click: Automatically transfer item stack=・スニークキー + 左クリック:アイテムスタックの自動転送 +Online help=オンラインヘルプ +You may want to check out these online resources related to MineClone 2.=MineClone 2 に関連するオンライン資料もチェックしてみてください。 +MineClone 2 download and forum discussion: =MineClone 2 のダウンロードと掲示板での意見交換: +Here you find the most recent version of MineClone 2 and can discuss it.=ここでは MineClone 2 の最新バージョンを確認し、意見を交換できます。 +Bug tracker: =バグ追跡: +Report bugs here.=バグの報告はこちら。 +Minetest links:=Minetest リンク: +You may want to check out these online resources related to Minetest:=Minetest に関連するオンライン資料もチェックしてみてください: +Official homepage of Minetest: =Minetest の公式ホームページ: +The main place to find the most recent version of Minetest, the engine used by MineClone 2.=MineClone 2 で使用されているエンジン、Minetest の最新版を入手できるメインサイトです。 +The main place to find the most recent version of Minetest.=Minetest の最新版を入手できるメインサイトです。 +Community wiki: =コミュニティ wiki: +A community-based documentation website for Minetest. Anyone with an account can edit it! It also features a documentation of Minetest Game.=Minetest のための、コミュニティベースの文書サイトです。アカウントがあれば誰でも編集可能です! また、Minetest Game の資料も掲載されています。 +Minetest forums: =Minetest の掲示板: +A web-based discussion platform where you can discuss everything related to Minetest. This is also a place where player-made mods and games are published and discussed. The discussions are mainly in English, but there is also space for discussion in other languages.=Minetest に関連するあらゆることを話し合える、Webベースの議論場です。また、プレイヤーが作成したMODやゲームを公開し、議論する場でもあります。議論は主に英語で行われますが、他言語で議論するスペースもあります。 +Chat: =チャット: +A generic Internet Relay Chat channel for everything related to Minetest where people can meet to discuss in real-time. If you do not understand IRC, see the Community Wiki for help.=Minetest に関連するあらゆることをリアルタイムで議論するために人々が集う、IRC(インターネット・リレー・チャット)の汎用チャンネルです。IRCが分からない場合は、コミュニティWikiを参照してください。 +Groups=グループ +Items, players and objects (animate and inanimate) can be members of any number of groups. Groups serve multiple purposes:=アイテム、プレイヤー、オブジェクト(生物と無生物)は、任意の数のグループに属することができます。グループには、次のようなさまざまな役割があります: +• Crafting recipes: Slots in a crafting recipe may not require a specific item, but instead an item which is a member of a particular group, or multiple groups=・クラフトレシピ:クラフトレシピのスロットには、特定のアイテムである必要がない代わりに、特定のグループまたは複数のグループに属しているアイテムを要する場合がある +• Digging times: Diggable blocks belong to groups which are used to determine digging times. Mining tools are capable of digging blocks belonging to certain groups=・掘削時間:掘削可能なブロックが属するグループで、掘削時間の設定に使われる。採掘道具は、所定のグループに属するブロックが掘れる。 +• Block behavior: Blocks may show a special behaviour and interact with other blocks when they belong to a particular group=・ブロックの挙動:ブロックは特定のグループに属している場合、特別な挙動を示し、他のブロックと相互作用することがある +• Damage and armor: Objects and players have armor groups, weapons have damage groups. These groups determine damage. See also: “Basics > Weapons”=ダメージと防具:オブジェクトとプレイヤーは防具グループ、武器はダメージグループを持つ。これらのグループによってダメージが定まる。次も参考に:“Basics > Weapons” +• Other uses=・その他の用途 +In the item help, many important groups are usually mentioned and explained.=アイテムヘルプでは、通常、多くの重要なグループに言及し、説明されています。 +Glossary=用語集 +This is a list of commonly used terms:=よく使われる用語の一覧: +Controls:=コントロール +• Wielding: Holding an item in hand=・手に持つ:アイテムを手に持っている状態。ホットバーで選択した状態と同義 +• Pointing: Looking with the crosshair at something in range=・ポイントする:十字線で範囲内のものを指すこと +• Dropping: Throwing an item or item stack to the ground=・捨てる:アイテムを一つずつ又はスタックごと放り投げ落とすこと +• Punching: Attacking with left-click, is also used on blocks=・パンチ:左クリックで攻撃や何かを作動させたりすること。ブロックを持っていても使える場合あり +• Sneaking: Walking slowly while (usually) avoiding to fall over edges=・スニーク:(通常は)縁から落ちるのを避けながら、ゆっくりと歩くこと +• Climbing: Moving up or down a climbable block=・よじ登る:よじ登り可能なブロックを上下に移動すること +Blocks:=ブロック: +• Block: Cubes that the worlds are made of=・ブロック:ワールドを構成する立方体(※立方体以外もブロックと呼んでいる場合あり) +• Mining/digging: Using a mining tool to break a block=・採掘/掘削:採掘道具を使ってブロックを壊すこと +• Building/placing: Putting a block somewhere=・構築/配置:ブロックをどこかに置くこと +• Drop: Items you get after mining a block=・ドロップ:ブロックを採掘した際に得られるアイテム +• Using a block: Right-clicking a block to access its special function=・ブロックを使う:右クリックで、そのブロック特有の作用を起こす +Items:=アイテム: +• Item: A single thing that players can possess=・アイテム:プレイヤーが所持できる単一のモノ +• Item stack: A collection of items of the same kind=・アイテムスタック:同種のアイテムの集まり +• Maximum stack size: Maximum amount of items in an item stack=・最大スタックサイズ:アイテムスタックに格納できるアイテムの最大量 +• Slot / inventory slot: Can hold one item stack=・スロット/インベントリースロット:アイテムスタック一つ分を収納可能な枠 +• Inventory: Provides several inventory slots for storage=・インベントリ:保管用に複数のスロットを提供するもの +• Player inventory: The main inventory of a player=・プレイヤーインベントリ:メインとなるプレイヤー用インベントリ +• Tool: An item which you can use to do special things with when wielding=・道具:手に持って使うと、特有なことができるアイテム +• Range: How far away things can be to be pointed by an item=・範囲:アイテムでポイントできる距離 +• Mining tool: A tool which allows to break blocks=・採掘道具:ブロックを壊すことができる道具 +• Craftitem: An item which is (primarily or only) used for crafting=・クラフトアイテム:クラフトに(主に、または唯一)使用されるアイテム +Gameplay:=ゲームプレイ: +• “heart”: A single health symbol, indicates 2 HP=・「ハート」:ヘルス。マーク1つ分で 2 HP を示す +• “bubble”: A single breath symbol, indicates 1 BP=・「泡」:呼吸。マーク1つ分で 1 BP を示す +• HP: Hit point (equals half 1 “heart”)=・HP:ヘルスポイント。「ハート」マーク半分で 1 HP を示す +• BP: Breath point, indicates breath when diving=・BP:ブレスポイント。潜水時の息(酸素量)を示す +• Mob: Computer-controlled enemy=・MOB:コンピュータが操作する敵 +• Crafting: Combining multiple items to create new ones=・クラフト:複数のアイテムを組み合わせて、新しいアイテムを作ること +• Crafting guide: A helper which shows available crafting recipes=・クラフトガイド:利用可能なクラフトのレシピを表示するヘルプ機能 +• Spawning: Appearing in the world=・スポーン:ワールドに出現すること +• Respawning: Appearing again in the world after death=・リスポーン:死後、再びワールドに現れること +• Group: Puts similar things together, often affects gameplay=・グループ:似たようなものを、同類として扱う。しばしばゲームプレイに影響を与える +• noclip: Allows to fly through walls=・壁抜け:壁を通過し飛行を可能にする +Interface=インターフェイス +• Hotbar: Inventory slots at the bottom=・ホットバー:画面底部に配置されたインベントリースロットのこと +• Statbar: Indicator made out of half-symbols, used for health and breath=・ステータスゲージ:分割するマークで作られたメーターのこと。ヘルスや呼吸の表示に使われる +• Minimap: The map or radar at the top right=・ミニマップ:右上に表示させるマップ、またはレーダーのこと +• Crosshair: Seen in the middle, used to point at things=・十字線:画面中央に見える、物をポイントするのに使われる照準。クロスヘアとも言う +Online multiplayer:=オンライン マルチプレイヤー +• PvP: Player vs Player. If active, players can deal damage to each other=・PvP:プレイヤー・バーサス・プレイヤー。有効な場合、プレイヤーはお互いにダメージを与えることができる +• Griefing: Destroying the buildings of other players against their will=・グリーフィング:他のプレイヤーの意思に反して建物を破壊すること(要するに嫌がらせ) +• Protection: Mechanism to own areas of the world, which only allows the owners to modify blocks inside=・保護:ワールドの各エリアを所有する仕組み。エリア内部のブロックは、所有者のみが変更可能となる +Technical terms:=技術的な用語: +• Minetest: This game engine=・Minetest:マインテスト。本ゲームエンジン +• MineClone 2: What you play right now=・MineClone 2:マインクローン2。今、プレイしているもの +• Minetest Game: A game for Minetest by the Minetest developers=・Minetest Game:Minetest 開発者による、Minetest のためのゲーム +• Game: A complete playing experience to be used in Minetest; such as a game or sandbox or similar=・Game:ゲームやサンドボックスなど、Minetest で使用される完全なプレイ体験 +• Mod: A single subsystem which adds or modifies functionality; is the basic building block of games and can be used to further enhance or modify them=・Mod:モッド。機能を追加または変更する1つのサブシステム。ゲームの基本的な構成要素であり、ゲームをさらに強化または変更するために使用できる +• Privilege: Allows a player to do something=・権限:プレイヤーにかかる何らかの制限を解除するための許可 +• Node: Other word for “block”=・ノード:「ブロック」を表す他の語句 +Settings=設定 +There is a large variety of settings to configure Minetest. Pretty much every aspect can be changed that way.=Minetest を構成するために、多種多様な設定があります。ほとんどの局面をその方法で変更できます。 +These are a few of the most important gameplay settings:=これらは、最も重要なゲームプレイの設定の一部です: +• Damage enabled (enable_damage): Enables the health and breath attributes for all players. If disabled, players are immortal=・ダメージを有効化(enable_damage):全プレイヤーのヘルスと呼吸の設定を有効にする。無効の場合、プレイヤーは不死身になる +• Creative Mode (creative_mode): Enables sandbox-style gameplay focusing on creativity rather than a challenging gameplay. The meaning depends on the game; usual changes are: Reduced dig times, easy access to almost all items, tools never wear off, etc.=・クリエイティブモード(creative_mode):挑戦的なゲームプレイではなく、創造性に焦点を当てたサンドボックススタイルのゲームプレイを可能にする。意味はゲームによるが、通常の変更は次の通り:掘る時間が短くなる、ほぼ全てのアイテムが入手しやすくなる、道具が消耗しなくなる、など +• PvP (enable_pvp): Short for “Player vs Player”. If enabled, players can deal damage to each other=・PvP(enable_pvp):“Player vs Player”の略。有効にすると、プレイヤー同士がダメージを与え合うことが可能になる +For a full list of all available settings, use the “All Settings” dialog in the main menu.=利用可能なすべての設定の一覧は、メインメニューの「すべての設定」ダイアログを使用してください。 +Movement modes=移動モード +You can enable some special movement modes that change how you move.=移動方法を変更する、いくつかの特殊な移動モードを有効化できます。 +Pitch movement mode:=ピッチ移動モード: +• Description: If this mode is activated, the movement keys will move you relative to your current view pitch (vertical look angle) when you're in a liquid or in fly mode.=・説明:このモードが有効になっている場合、液中や飛行モードの時に移動キーを使うと、現在のビューピッチ(垂直方向の視線角)に対して相対的に移動します。 +• Default key: [L]=・デフォルトキー:[L] +• No privilege required=・権限は不要 +Fast mode:=高速モード: +• Description: Allows you to move much faster. Hold down the the “Use” key [E] to move faster. In the client configuration, you can further customize fast mode.=・説明:より高速な移動が可能になります。「使う」キー[E]を押しながら移動すると、より速く動けます。クライアント設定にて、高速モードをさらにカスタマイズできます。 +• Default key: [J]=・デフォルトキー:[J] +• Required privilege: fast=・必要な権限:fast +Fly mode:=飛行モード: +• Description: Gravity doesn't affect you and you can move freely in all directions. Use the jump key to rise and the sneak key to sink.=・説明:重力に影響されず、全方向へ自由に動けます。ジャンプキーで上昇し、スニークキーで下降します。 +• Default key: [K]=・デフォルトキー:[K] +• Required privilege: fly=・必要な権限:fly +Noclip mode:=壁抜けモード: +• Description: Allows you to move through walls. Only works when fly mode is enabled, too.=・説明:壁を通過して移動できるようになります。飛行モードも有効な場合のみ機能します。 +• Default key: [H]=・デフォルトキー:[H] +• Required privilege: noclip=・必要な権限:noclip +Console=コンソール +With [F10] you can open and close the console. The main use of the console is to show the chat log and enter chat messages or server commands.=[F10]でコンソールを開いたり閉じたりできます。コンソールの主な用途は、チャットログの表示や、チャットメッセージ及びサーバーコマンドの入力です。 +Using the chat or server command key also opens the console, but it is smaller and will be closed after you sent a message.=チャットやサーバーのコマンドキーを使ってもコンソールを開けますが、サイズが小さく、メッセージ送信後に閉じられることになります。 +Use the chat to communicate with other players. This requires you to have the “shout” privilege.=他のプレイヤーとの連絡には、チャットを利用します。これには、“shout”権限が必要です。 +Just type in the message and hit [Enter]. Public chat messages can not begin with “/”.=メッセージを入力し、[Enter]キーを押すだけです。公開チャットのメッセージは、先頭に“/”をつけることはできません。 +You can send private messages: Say “/msg ” in chat to send “” which can only be seen by .=個人的なメッセージを送信できます:チャットで“/msg ”と言うと、だけが見ることができる“”を送れます。 +There are some special controls for the console:=これらは、コンソール専用の操作方法です: +• [F10] Open/close console=・[F10]:コンソールの開/閉 +• [Enter]: Send message or command=・[Enter]:メッセージ送信 または コマンド +• [Tab]: Try to auto-complete a partially-entered player name=・[Tab]:部分的に入力されたプレイヤー名を、オートコンプリート(自動入力補完)しよう試みる +• [Ctrl]+[Left]: Move cursor to the beginning of the previous word=・[Ctrl]+[Left]:カーソルを、前の単語の先頭に移動する +• [Ctrl]+[Right]: Move cursor to the beginning of the next word=・[Ctrl]+[Right]:カーソルを、次の単語の先頭に移動する +• [Ctrl]+[Backspace]: Delete previous word=・[Ctrl]+[Backspace]:前の単語を削除 +• [Ctrl]+[Delete]: Delete next word=・[Ctrl]+[Delete]:次の単語を削除 +• [Ctrl]+[U]: Delete all text before the cursor=・[Ctrl]+[U]:カーソルより前のテキストをすべて削除 +• [Ctrl]+[K]: Delete all text after the cursor=・[Ctrl]+[K]:カーソルより後のテキストをすべて削除 +• [Page up]: Scroll up=・[Page up]:上にスクロール +• [Page down]: Scroll down=・[Page down]:下にスクロール +There is also an input history. Minetest saves your previous console inputs which you can quickly access later:=また、入力履歴もあります。Minetest は以前のコンソール入力を保存し、後ですぐにアクセスできるようにしています: +• [Up]: Go to previous entry in history=・[Up]:履歴の、前のエントリに移動 +• [Down]: Go to next entry in history=・[Down]:履歴の、次のエントリに移動 +Server commands=サーバーコマンド +Server commands (also called “chat commands”) are little helpers for advanced users. You don't need to use these commands when playing. But they might come in handy to perform some more technical tasks. Server commands work both in multi-player and single-player mode.=サーバーコマンド(「チャットコマンド」とも呼ばれます)は、上級者向けのちょっとした ヘルプ要素です。プレイ中にこれらのコマンドを使う必要はありません。しかし、より技術的なタスクを実行するのに便利かもしれません。サーバーコマンドは、マルチプレイヤーでもシングルプレイヤーでも使えます。 +Server commands can be entered by players using the chat to perform a special server action. There are a few commands which can be issued by everyone, but some commands only work if you have certain privileges granted on the server. There is a small set of basic commands which are always available, other commands can be added by mods.=サーバーコマンドは、プレイヤーがチャットを使って入力することで、特別なサーバーアクションを実行できます。いくつかのコマンドは誰でも出すことができますが、中にはサーバーに与えられた特定の権限を持っている場合にのみ動作するコマンドもあります。基本的なコマンドは常に利用可能で、その他のコマンドはMODによって追加できます。 +To issue a command, simply type it like a chat message or press Minetest's command key (default: [/]). All commands have to begin with “/”, for example “/mods”. The Minetest command key does the same as the chat key, except that the slash is already entered.=コマンドを出すには、単純にチャットメッセージのように入力するか、Minetest のコマンドキー(デフォルト:[/])を押してください。すべてのコマンドは、“/mods”のように“/”で始まる必要があります。Minetest のコマンドキーは、スラッシュがすでに入力されていることを除いて、チャットキーと同じように動作します。 +Commands may or may not give a response in the chat log, but errors will generally be shown in the chat. Try it for yourselves: Close this window and type in the “/mods” command. This will give you the list of available mods on this server.=コマンドは、チャットログで応答したりしなかったりますが、エラーは基本的にチャットで表示されます。自分自身で試してみてください:このウィンドウを閉じて、“/mods”コマンドを入力してください。このサーバーで利用可能なMODのリストが表示されます。 +“/help all” is a very important command: You get a list of all available commands on the server, a short explanation and the allowed parameters. This command is also important because the available commands often differ per server.=“/help all”は非常に重要なコマンドです。サーバ上で利用可能なすべてのコマンドのリスト、簡単な説明、そして許可されたパラメータを得ることができます。利用可能なコマンドはサーバーごとに異なることが多いので、このコマンドも重要です。 +Commands are followed by zero or more parameters.=コマンドの後には、いくつかのパラメータが続くことがあります。 +In the command reference, you see some placeholders which you need to replace with an actual value. Here's an explanation:=コマンドリファレンスには、実際の値に置き換える必要があるプレースホルダーがいくつか表示されています。次に説明します: +• Text in greater-than and lower-than signs (e.g. “”): Placeholder for a parameter=・大なりと小なり記号で挟まれたテキスト(例:“”):パラメータのプレースホルダー +• Anything in square brackets (e.g. “[text]”) is optional and can be omitted=・角括弧内のもの(例:“[text]”):任意であり、省略が可能 +• Pipe or slash (e.g. “text1 | text2 | text3”): Alternation. One of multiple texts must be used (e.g. “text2”)=・パイプまたはスラッシュ(例:“text1|text2|text3”):択一。 区切られたテキストのうちの1つを使用する必要あり(例:"text2") +• Parenthesis: (e.g. “(word1 word2) | word3”): Groups multiple words together, used for alternations=・半角の括弧(例:“(word1 word2) | word3”):複数の単語をグループ化し、交互に使う +• Everything else is to be read as literal text=・それ以外はすべて、文字通りのテキストとして読める +Here are some examples to illustrate the command syntax:=次は、コマンドの構文を説明するための例です: +• /mods: No parameters. Just enter “/mods”=・/mods: パラメータなし。単に“/mods”とだけ入力する +• /me : 1 parameter. You have to enter “/me ” followed by any text, e.g. “/me orders pizza”=・/me :1つのパラメータ。“/me ”の後に、任意のテキストを入力する。例:“/me orders pizza” +• /give : Two parameters. Example: “/give Player default:apple”=・/give :2つのパラメータ。例“/give Player default:apple” +• /help [all|privs|]: Valid inputs are “/help”, “/help all”, “/help privs”, or “/help ” followed by a command name, like “/help time”=・/help [all|privs|]:有効な入力は“/help”,“/help all”,“/help privs”, または“/help time”のように、“/help ”の後にコマンド名を続けたもの +• /spawnentity [,,]: Valid inputs include “/spawnentity boats:boat” and “/spawnentity boats:boat 0,0,0”=・/spawnentity [,,]:有効な入力は“/spawnentity boats:boat”および“/spawnentity boats:boat 0,0,0” +Some final remarks:=最後に一言: +• For /give and /giveme, you need an itemstring. This is an internally used unique item identifier which you may find in the item help if you have the “give” or “debug” privilege=・give と /giveme では、itemstring が必要です。これは内部で使われる固有のアイテム識別子で、“give”または“debug”権限を持っていれば、アイテムのヘルプに記載されているはずです +• For /spawnentity you need an entity name, which is another identifier=・/spawnentity にはエンティティ名が必要で、これは別の識別子です +Privileges=権限 +Each player has a set of privileges, which differs from server to server. Your privileges determine what you can and can't do. Privileges can be granted and revoked from other players by any player who has the privilege called “privs”.=各プレイヤーは、サーバーによって異なる一連の権限を持ちます。権限は、あなたができること、できないことを規定します。“privs”という権限を持っているプレイヤーであれば、権限を他のプレイヤーに付与したり、取り消したりできます。 +On a multiplayer server with the default configuration, new players start with the privileges called “interact” and “shout”. The “interact” privilege is required for the most basic gameplay actions such as building, mining, using, etc. The “shout” privilege allows to chat.=デフォルト設定のマルチプレイヤーサーバーでは、新規プレイヤーは“interact”と“shout”と呼ばれる権限でスタートします。“interact”権限は、建築、採掘、使用など、最も基本的なゲームプレイに必要なものです。“shout”権限は、チャットを行うためのものです。 +There is a small set of core privileges which you'll find on every server, other privileges might be added by mods.=すべてのサーバーで見られる主要な権限の小セットがあり、その他の権限はModによって追加される場合があります。 +To view your own privileges, issue the server command “/privs”.=自分の権限を表示するには、サーバーコマンド“/privs”を実行します。 +Here are a few basic privilege-related commands:=基本的な権限関連のコマンドをいくつか紹介します: +• /privs: Lists your privileges=・/privs:あなたの権限の一覧 +• /privs : Lists the privileges of =・/privs の権限の一覧 +• /help privs: Shows a list and description about all privileges=・/help privs:全権限の一覧と説明を表示 +Players with the “privs” privilege can modify privileges at will:=“privs”権限を持つプレイヤーは、自由に権限を変更可能: +• /grant : Grant to =・/grant を付与 +• /revoke : Revoke from =・/revoke から を取り消す +In single-player mode, you can use “/grantme all” to unlock all abilities.=シングルプレイでは、“/grantme all”ですべての能力が解放されます。 +Light=光 +As the world is entirely block-based, so is the light in the world. Each block has its own brightness. The brightness of a block is expressed in a “light level” which ranges from 0 (total darkness) to 15 (as bright as the sun).=世界がすべてブロックベースである以上、世界の光もまた然りです。各ブロックはそれぞれの明るさを持ちます。ブロックの明るさは“light level”(=明るさ)で表され、0(真っ暗)から15(太陽と同じ明るさ)までの範囲で設定できます。 +There are two types of light: Sunlight and artificial light.=光には2つの種類があります:太陽光と人工光です。 +Artificial light is emitted by luminous blocks. Artificial light has a light level from 1-14.=人工光は発光ブロックから放射されます。人工光は1~14の明るさを持ちます。 +Sunlight is the brightest light and always goes perfectly straight down from the sky at each time of the day. At night, the sunlight will become moonlight instead, which still provides a small amount of light. The light level of sunlight is 15.=太陽光は最も明るい光であり、日中のどの時間帯でも、常に空から完全にまっすぐ降り注いでいます。夜になると、太陽光は代わりに月明かりになりますが、これはまだわずかな光量しか提供しません。太陽光の明るさは15です。 +Blocks have 3 levels of transparency:=ブロックは3段階の透明度を持ちます: +• Transparent: Sunlight goes through limitless, artificial light goes through with losses=・透明:太陽光は無限に通過し、人工光は損失を伴って通過する +• Semi-transparent: Sunlight and artificial light go through with losses=・半透明:太陽光と人工光は損失を伴って通過する +• Opaque: No light passes through=・不透明:光を通さない +Artificial light will lose one level of brightness for each transparent or semi-transparent block it passes through, until only darkness remains (image 1).=人工光は、透明または半透明のブロックを通過するたびに明るさが1段階下がり、やがて暗闇だけが残ります(画像1)。 +Sunlight will preserve its brightness as long it only passes fully transparent blocks. When it passes through a semi-transparent block, it turns to artificial light. Image 2 shows the difference.=太陽光は、完全に透明なブロックだけを通過する限り、その明るさを保てます。半透明のブロックを通過すると、人工光に変化します。画像2 はその違いを示しています。 +Note that “transparency” here only means that the block is able to carry brightness from its neighboring blocks. It is possible for a block to be transparent to light but you can't see trough the other side.=なお、ここでいう「透明度」とは、隣接するブロックの明るさを伝達できるという意味でしかありません。ブロックが光に対して透明でも、あなたは向こう側が見通せないということはあり得ます。 +Coordinates=座標 +The world is a large cube. And because of this, a position in the world can be easily expressed with Cartesian coordinates. That is, for each position in the world, there are 3 values X, Y and Z.=世界は大きな立方体です。そのため、世界における位置は直交座標で簡単に表せます。つまり、世界の各位置には、X、Y、Zの3つの値が存在します。 +Like this: (5, 45, -12)=こんな感じで:(5, 45, -12) +This refers to the position where X@=5, Y@=45 and Z@=-12. The 3 letters are called “axes”: Y is for the height. X and Z are for the horizontal position.=これは、X@=5、Y@=45、Z@=12 の位置を指します。この3文字を“軸”と呼びます:Yは高さ、XとZは水平方向の位置を表します。 +The values for X, Y and Z work like this:=X、Y、Zの値は次のように動きます: +• If you go up, Y increases=・上昇すると、Yが増加 +• If you go down, Y decreases=・下降すると、Yが減少 +• If you follow the sun, X increases=・太陽の進行方向にならうと、Xが増加 +• If you go to the reverse direction, X decreases=・逆方向へ行くと、Xは減少 +• Follow the sun, then go right: Z increases=・太陽に向かって、右に進む:Zが増加 +• Follow the sun, then go left: Z decreases=・太陽に向かって、左に進む:Zが減少 +• The side length of a full cube is 1=・完全な立方体の辺の長さは、1 +You can view your current position in the debug screen (open with [F5]).=デバッグ画面([F5]で開く)にて現在位置を確認できます。 + +# MCL2 extensions +Creative Mode=クリエイティブモード +Enabling Creative Mode in MineClone 2 applies the following changes:=MineClone 2 で Creative Mode を有効にすると、以下の変更が適用されます: +• You keep the things you've placed=・あなたが置いたものを保つ +• Creative inventory is available to obtain most items easily=・ほとんどのアイテムを簡単に入手できるクリエイティブインベントリが利用可能 +• Hand breaks all default blocks instantly=・すべてのデフォルトブロックを手で即座に壊せる +• Greatly increased hand pointing range=・手のポイント範囲の大幅な拡大 +• Mined blocks don't drop items=・採掘されたブロックがアイテムをドロップしない +• Items don't get used up=・アイテムを使い切ることがない +• Tools don't wear off=・道具が消耗しない +• You can eat food whenever you want=・食べたい時にいつでも食べられる +• You can always use the minimap (including radar mode)=・常にミニマップが使える(レーダーモード含む) +Damage is not affected by Creative Mode, it needs to be disabled separately.=ダメージはクリエイティブモードの影響を受けないので、別途無効化する必要があります。 +Mobs=MOB +Mobs are the living beings in the world. This includes animals and monsters.=MOBとは、世界に存在する生き物のことです。動物やモンスターも含まれます。 +Mobs appear randomly throughout the world. This is called “spawning”. Each mob kind appears on particular block types at a given light level. The height also plays a role. Peaceful mobs tend to spawn at daylight while hostile ones prefer darkness. Most mobs can spawn on any solid block but some mobs only spawn on particular blocks (like grass blocks).=MOBは世界各地にランダムに出現します。これを「スポーンする」と言います。各MOBは特定のブロックに、特定の明るさにおいて出現します。また、高さも重要な要素です。平和的なMOBは昼間に出現し、敵対的なMOBは暗闇を好む傾向があります。ほとんどのMOBはどの固体ブロックにもスポーンできますが、特定のブロック(草原のような)にしかスポーンしないMOBもいます。 +Like players, mobs have hit points and sometimes armor points, too (which means you need better weapons to deal any damage at all). Also like players, hostile mobs can attack directly or at a distance. Mobs may drop random items after they die.=プレイヤーと同様に、MOBにもヒットポイントがあり、時にはアーマーポイントもあります(ということは、ダメージを与えるにはより良い武器が必要です)。また、プレイヤーと同様に、敵対するMOBは直接攻撃することも距離を取って攻撃することもできます。MOBは死んだ後、ランダムなアイテムをドロップすることがあります。 +Most animals roam the world aimlessly while most hostile mobs hunt players. Animals can be fed, tamed and bred.=ほとんどの動物があてもなく世界をさまよい、ほとんどの敵対的なMOBがプレイヤーを狩ります。動物には餌を与え、飼いならし、繁殖させることができます。 +Animals=動物 +Animals are peaceful beings which roam the world aimlessly. You can feed, tame and breed them.=動物たちは、世界をあてもなく歩き回る平和な存在です。餌をあげたり、飼いならしたり、繁殖させたりすることができます。 +Feeding:=餌やり: +Each animal has its own taste for food and doesn't just accept any food. To feed, hold an item in your hand and rightclick the animal.=動物にはそれぞれ食べ物の好みがあり、どんな食べ物でもいいというわけではありません。餌を与えるには、アイテムを手に持ち、動物を右クリックします。 +Animals are attraced to the food they like and follow you as long you hold the food item in hand.=動物は好きな食べ物に惹かれ、餌を手にしている間はついてきます。 +Feeding an animal has three uses: Taming, healing and breeding.=動物の給餌には3つの用途があります:飼いならす、癒す、繁殖させる +Feeding heals animals instantly, depending on the quality of the food item.=餌を与えると、餌の質にもよりますが、動物がすぐに回復します。 +Taming:=手懐ける: +A few animals can be tamed. You can generally do more things with tamed animals and use other items on them. For example, tame horses can be saddled and tame wolves fight on your side.=いくつかの動物は手懐けることができます。一般的に、手懐けた動物にはより多くのことができ、他のアイテムも使用できます。例えば、飼いならされた馬には鞍を付けることができ、飼いならされた狼は側で戦ってくれます。 +Breeding:=繁殖 +When you have fed an animal up to its maximum health, then feed it again, you will activate “Love Mode” and many hearts appear around the animal.=動物の体力を最大まで回復させてから、再びエサを与えると「ラブモード」が発動し、動物のまわりにたくさんのハートが現れます。 +Two animals of the same species will start to breed if they are in Love Mode and close to each other. Soon a baby animal will pop up.=同じ種の2匹の動物は、ラブモード状態で近くにいると交配を始めます。すぐに動物の赤ちゃんが飛び出します。 +Baby animals:=動物の仔 +Baby animals are just like their adult couterparts, but they can't be tamed or bred and don't drop anything when they die. They grow to adults after a short time. When fed, they grow to adults faster.=動物の仔は成体と同じですが、飼いならしたり繁殖させたりすることはできず、死んでも何もドロップしません。短期間で成体になります。餌を与えると、より早く成体になります。 +Hunger=満腹度 +Hunger affects your health and your ability to sprint. Hunger is not in effect when damage is disabled.=満腹度はヘルスと走る能力に影響します。ダメージ無効モードでは、満腹度は効果を及ぼしません。 +Core hunger rules:=満腹度の基礎: +• You start with 20/20 hunger points (more points @= less hungry)=・20/20 の満腹度でスタート(ポイントが多い @= 空腹に長く耐えられる) +• Actions like combat, jumping, sprinting, etc. decrease hunger points=・戦闘、ジャンプ、走るなどのアクションは、満腹度が減少 +• Food restores hunger points=・食べ物で満腹度が回復 +• If your hunger bar decreases, you're hungry=・満腹ゲージが減ってきたら、それは既に「空腹」の状態 +• At 18-20 hunger points, you regenerate 1 HP every 4 seconds=・満腹度が18~20のとき、4秒ごとにHPが1回復. +• At 6 hunger points or less, you can't sprint=・満腹度が6以下になると、走ることができなくなる +• At 0 hunger points, you lose 1 HP every 4 seconds (down to 1 HP)=・満腹度が0になると、4秒ごとにHPが1減少(HP1まで) +• Poisonous food decreases your health=・毒のある食べ物は、ヘルスが減少 +Details:=詳細: +You have 0-20 hunger points, indicated by 20 drumstick half-icons above the hotbar. You also have an invisible attribute: Saturation.=あなたは 0〜20 の満腹度を持っており、ホットバーの上にある20個分の骨付き肉(アイコン半分で1個分)がそれを示しています。また、見えない属性も持っています:隠し満腹度 +Hunger points reflect how full you are while saturation points reflect how long it takes until you're hungry again.=満腹度は「空腹に耐えられる時間」と「腹持ちの許容量」を反映し、隠し満腹度は、再び空腹になるまでの「腹持ちする時間」が反映(見えませんが)されています。 +Each food item increases both your hunger level as well your saturation.=食べ物は、満腹度と隠し満腹度の両方を増加させます。 +Food with a high saturation boost has the advantage that it will take longer until you get hungry again.=隠し満腹度増加の高い食品は、再び空腹になるまでの時間が長くなるという利点があります。 +A few food items might induce food poisoning by chance. When you're poisoned, the health and hunger symbols turn sickly green. Food poisoning drains your health by 1 HP per second, down to 1 HP. Food poisoning also drains your saturation. Food poisoning goes away after a while or when you drink milk.=いくつかの食べ物で、偶然にも食中毒を誘発することがあります。食中毒にかかると、ヘルスと満腹ゲージが病的な緑色になります。食中毒になると毎秒1HPずつ消耗しますが、減るのは1HPまでで0にはなりません。また、食中毒は隠し満腹度も消耗します。食中毒はミルクを飲むか、しばらく経つと治ります。 +You start with 5 saturation points. The maximum saturation is equal to your current hunger level. So with 20 hunger points your maximum saturation is 20. What this means is that food items which restore many saturation points are more effective the more hunger points you have. This is because at low hunger levels, a lot of the saturation boost will be lost due to the low saturation cap.=隠し満腹度は5からスタートします。隠し満腹度の最大値は現在の満腹度と同じです。つまり、満腹度が20ある時は、最大隠し満腹度も20となります。このことは、隠し満腹度を多く回復させる食べ物は、満腹度が高い時ほど効果的であることを意味します。例えば、満腹度が低い場合は隠し満腹度の上限も低いため、それを超える量の隠し満腹度回復は損をしていることになります。 +If your saturation reaches 0, you're hungry and start to lose hunger points. Whenever you see the hunger bar decrease, it is a good time to eat.=隠し満腹度が0になると、「空腹」状態となり満腹度が減少しはじめます。満腹ゲージの減少を確認したらいつでも、食事する良いタイミングです。 +Saturation decreases by doing things which exhaust you (highest exhaustion first):=消耗する行動によって、隠し満腹度が低下(一番目が最も消耗する): +• Regenerating 1 HP=・HPが回復する +• Suffering food poisoning=・食中毒を起こす +• Sprint-jumping=・走りながらジャンプする +• Sprinting=・走る +• Attacking=・攻撃する +• Taking damage=・ダメージを受ける +• Swimming=・泳ぐ +• Jumping=・ジャンプする +• Mining a block=・ブロックを採掘する +Other actions, like walking, do not exaust you.=歩くなどの他の行動では、消耗しません。 +If you have a map item in any of your hotbar slots, you can use the minimap.=いずれかのホットバースロットにマップアイテムがあれば、ミニマップが使えます。 diff --git a/mods/HELP/mcl_tt/locale/mcl_tt.ja.tr b/mods/HELP/mcl_tt/locale/mcl_tt.ja.tr new file mode 100644 index 0000000000..5e5cd5e7af --- /dev/null +++ b/mods/HELP/mcl_tt/locale/mcl_tt.ja.tr @@ -0,0 +1,48 @@ +# textdomain: mcl_tt +Head armor=頭具 +Torso armor=胴衣 +Legs armor=脚具 +Feet armor=足具 +Armor points: @1=防具値:@1 +Armor durability: @1=防具耐久度:@1 +Protection: @1%=外傷防護:@1% +Hunger points: +@1=満腹度:+@1 +Saturation points: +@1=隠し満腹度:+@1 +Deals damage when falling=落下時にダメージ発生 +Grows on grass blocks or dirt=草原や土の上に生育 +Grows on grass blocks, podzol, dirt or coarse dirt=草原、ポドゾル、土、粗い土の上に生育 +Flammable=可燃性 +Zombie view range: -50%=ゾンビに見つかる距離:-50% +Skeleton view range: -50%=スケルトンに見つかる距離:-50% +Creeper view range: -50%=クリーパーに見つかる距離:-50% +Damage: @1=ダメージ:@1 +Damage (@1): @2=ダメージ (@1):@2 +Healing: @1=回復:@1 +Healing (@1): @2=回復 (@1):@2 +Full punch interval: @1s=全力攻撃の間隔:@1秒 +Contact damage: @1 per second=接触ダメージ:@1/秒 +Contact healing: @1 per second=接触回復:@1/秒 +Drowning damage: @1=窒息ダメージ:@1 +Bouncy (@1%)=弾力性 (@1%) +Luminance: @1=発光:@1 +Slippery=滑りやすい +Climbable=よじ登れる +Climbable (only downwards)=よじ登れる(下方のみ) +No jumping=ジャンプ不可 +No swimming upwards=上方への水泳不可 +No rising=上昇不可 +Fall damage: @1%=落下ダメージ:@1% +Fall damage: +@1%=落下ダメージ:+@1% +No fall damage=落下ダメージなし +Mining speed: @1=採掘速度:@1 +Very fast=とても速い +Extremely fast=とてつもなく速い +Fast=速い +Slow=遅い +Very slow=とても遅い +Painfully slow=苦痛レベルで遅い +Mining durability: @1=採掘耐久度:@1 +Block breaking strength: @1=ブロック破壊力:@1 +@1 uses=@1 使用 +Unlimited uses=無限に使用可能 +Durability: @1=耐久度:@1 diff --git a/mods/HUD/awards/locale/awards.ja.tr b/mods/HUD/awards/locale/awards.ja.tr new file mode 100644 index 0000000000..5a3b731746 --- /dev/null +++ b/mods/HUD/awards/locale/awards.ja.tr @@ -0,0 +1,70 @@ +# textdomain:awards +@1/@2 chat messages=@1/@2 チャットメッセージ +@1/@2 crafted=@1/@2 クラフトした +@1/@2 deaths=@1/@2 死亡した +@1/@2 dug=@1/@2 掘った +@1/@2 game joins=@1/@2 ゲームに参加した +@1/@2 placed=@1/@2 置いた +@1 (got)=@1(入手した) +@1: @2=@1: @2 +@1’s awards:=@1 のアワード +(Secret Award)=(シークレットアワード) +=<実績 ID> +=<名前> +Advancement Made!=進捗 更新! +Advancement Made:=進捗 更新: +Advancement: @1=進捗:@1 +Achievement not found.=実績 未検出 +All your awards and statistics have been cleared. You can now start again.=すべてのアワードと統計がクリアされました。これで再スタートが可能です。 +Awards=アワード +Craft: @1×@2=クラフト: @1×@2 +Craft: @1=クラフト: @1 +Die @1 times.=@1回死にました。 +Die.=死にました。 +Get the achievements statistics for the given player or yourself=所定のプレーヤーまたはあなた自身の実績統計を取得します。 +Join the game @1 times.=ゲームに@1回参加しています。 +Join the game.=ゲームに参加しています。 +List awards in chat (deprecated)=チャットにアワードを一覧表示(非推奨) +Place a block: @1=ブロックを配置:@1 +Place blocks: @1×@2=配置ブロック:@1×@2 +Secret Advancement Made!=隠し進捗 更新! +Secret Advancement Made:=隠し進捗 更新: +Secret Advancement Made: @1=隠し進捗:@1 +Show details of an achievement=実績の詳細を表示 +Show, clear, disable or enable your advancements.=進捗の表示、消去、無効化、有効化等。 +Make this advancement to find out what it is.=この進捗を遂げて、それが何であるかを発見してください。 +Write @1 chat messages.=@1チャットメッセージを書いてください。 +Write something in chat.=チャットに何か書いてください。 +You have disabled your advancements.=進捗を無効にしました。 +You have enabled your advancements.=進捗を有効にしました。 +You have not gotten any awards.=アワードの受賞歴はありません。 +You've disabled awards. Type /awards enable to reenable.=アワードが無効になっています。再度有効にするには、 /awards enable と入力してください。 +[c|clear|disable|enable]=[c|クリア|無効化|有効化] +OK=OK +Error: No awards available.=エラー:アワードに該当するものはありません。 +Eat: @1×@2=食す:@1×@2 +Eat: @1=食す:@1×@2 +@1/@2 eaten=@1/@2 食した +Place @1 block(s).=ブロックを@1個 配置します。 +Dig @1 block(s).=ブロックを@1個 掘ります。 +Eat @1 item(s).=アイテムを@1個 食べます。 +Craft @1 item(s).=アイテムを@1個 クラフトします。 +Can give advancements to any player=任意のプレイヤーに進捗を供与可能 +(grant ( | all)) | list=(供与 <プレイヤー> (<進捗> | 全て)) | リスト +Give advancement to player or list all advancements=プレイヤーに進捗を与えるか、すべての進捗をリストアップ +@1 (@2)=@1 (@2) +Invalid syntax.=無効な構文です。 +Invalid action.=無効な動作です。 +Player is not online.=プレーヤーがオンラインになってません。 +Done.=完了です。 +Advancement “@1” does not exist.=進捗“@1”は存在しません。 +@1 has made the advancement @2=@1は進捗@2を更新 +Mine a block: @1=ブロックを採掘:@1 +Mine blocks: @1×@2=採掘ブロック:@1×@2 +Awards are disabled, enable them first by using /awards enable!=アワードは無効になってます、まず /awards enable を使用して有効にしてください! +Goal Completed:=目標達成: +Goal Completed!=目標達成! +Goal Completed: @1=目標達成:@1 +Challenge Completed:=チャレンジ達成: +Challenge Completed!=チャレンジ達成! +Challenge Completed: @1=チャレンジ達成:@1 diff --git a/mods/HUD/hudbars/locale/hudbars.ja.tr b/mods/HUD/hudbars/locale/hudbars.ja.tr new file mode 100644 index 0000000000..712c915cbb --- /dev/null +++ b/mods/HUD/hudbars/locale/hudbars.ja.tr @@ -0,0 +1,6 @@ +# textdomain: hudbars +Health=ヘルス +Breath=呼吸 + +# Default format string for progress bar-style HUD bars, e.g. “Health 5/20” +@1: @2/@3=@1:@2/@3 diff --git a/mods/HUD/mcl_achievements/init.lua b/mods/HUD/mcl_achievements/init.lua index f76662fce3..ced7589482 100644 --- a/mods/HUD/mcl_achievements/init.lua +++ b/mods/HUD/mcl_achievements/init.lua @@ -302,6 +302,14 @@ awards.register_achievement("mcl:tacticalFishing", { group = "Husbandry", }) +awards.register_achievement("mcl:cutestPredator", { + title = S("The Cutest Predator"), + description = S("Catch an Axolotl with a bucket!"), + icon = "axolotl_bucket.png", + type = "Advancement", + group = "Husbandry", +}) + awards.register_achievement("mcl:witheringHeights", { title = S("Withering Heights"), description = S("Summon the wither from the dead."), @@ -389,6 +397,40 @@ awards.register_achievement("mcl:theEndAgain", { group = "End", }) +-- Triggered in mcl_beehives +awards.register_achievement("mcl:bee_our_guest", { + title = S("Bee Our Guest"), + description = S("Use a campfire to collect a bottle of honey from a beehive without aggrivating the bees inside."), + icon = "mcl_honey_honey_bottle.png", + type = "Advancement", + group = "Husbandry", +}) + +awards.register_achievement("mcl:total_beelocation", { + title = S("Total Beelocation"), + description = S("Move a bee nest, with 3 bees inside, using a silk touch enchanted tool."), + icon = "mcl_beehives_bee_nest_front_honey.png", + type = "Advancement", + group = "Husbandry", +}) + +-- Triggered in mcl_copper +awards.register_achievement("mcl:wax_on", { + title = S("Wax On"), + description = S("Apply honeycomb to a copper block to protect it from the elements."), + icon = "mcl_honey_honeycomb.png", + type = "Advancement", + group = "Husbandry", +}) + +awards.register_achievement("mcl:wax_off", { + title = S("Wax Off"), + description = S("Scrape wax off of a copper block."), + icon = "default_tool_stoneaxe.png", + type = "Advancement", + group = "Husbandry", +}) + -- NON-PC ACHIEVEMENTS (XBox, Pocket Edition, etc.) if non_pc_achievements then @@ -487,3 +529,21 @@ awards.register_achievement("mcl:obsidian", { type = "Advancement", group = "Overworld", }) + +awards.register_achievement("mcl:hero_of_the_village", { + title = S("Hero of the Village"), + description = S("Successfully defend a village from a raid"), + icon = "mcl_raids_hero_of_the_village_icon.png", + type = "Advancement", + group = "Adventure", + secret = true, +}) + +awards.register_achievement("mcl:voluntary_exile", { + title = S("Voluntary Exile"), + description = S("Kill a raid captain. Maybe consider staying away from the local villages for the time being..."), + icon = "mcl_potions_effect_bad_omen.png", + type = "Advancement", + group = "Adventure", + secret = true, +}) diff --git a/mods/HUD/mcl_achievements/locale/mcl_achievements.ja.tr b/mods/HUD/mcl_achievements/locale/mcl_achievements.ja.tr new file mode 100644 index 0000000000..592833cee7 --- /dev/null +++ b/mods/HUD/mcl_achievements/locale/mcl_achievements.ja.tr @@ -0,0 +1,99 @@ +# textdomain:mcl_achievements +Aquire Hardware=金属を入手 +Bake Bread=パンを焼く +Benchmarking=土台作り +Cow Tipper=牛転がし +Craft a bookshelf.=本棚を作ろう。 +Craft a cake using wheat, sugar, milk and an egg.=ケーキを焼こう。 材料:小麦、砂糖、ミルク、タマゴ +Craft a crafting table from 4 wooden planks.=作業台を作ろう。 材料:木材4つ +Craft a stone pickaxe using sticks and cobblestone.=石のツルハシを作ろう。 材料:木の棒、丸石 +Craft a wooden sword using wooden planks and sticks on a crafting table.=作業台で木製の剣を作ろう。 材料:木の棒、木材 +DIAMONDS!=ダイヤモンド! +Delicious Fish=美味しい魚 +Dispense With This=これを省く +Eat a cooked porkchop.=豚肉を焼いて食べよう。 +Eat a cooked rabbit.=ウサギを焼いて食べよう。 +Get really desperate and eat rotten flesh.=やけになって腐肉を喰らおう。 +Getting Wood=木を取得 +Getting an Upgrade=アップグレードを取得 +Hit a skeleton, wither skeleton or stray by bow and arrow from a distance of at least 20 meters.=20m以上の距離から弓矢を当てよう。 対象:スケルトン、ウィザースケルトン、ストレイ等 +Hot Topic=ホット・トピック +Into Fire=炎の中へ +We Need to Go Deeper=より深く潜る必要がある +Iron Belly=鉄の胃袋 +Librarian=司書 +Mine emerald ore.=エメラルド鉱石を発掘しよう。 +On A Rail=レールの上で +Pick up a blaze rod from the floor.=床からブレイズロッドを拾おう。 +Pick up a diamond from the floor.=床からダイヤモンドを拾おう。 +Pick up a wood item from the ground.@nHint: Punch a tree trunk until it pops out as an item.=地面から木のアイテムを拾おう。@nヒント:アイテムとして飛び出すまで木の幹をパンチします。 +Pick up leather from the floor.@nHint: Cows and some other animals have a chance to drop leather, when killed.=床から革を拾おう。@nヒント:牛や一部の動物は、仕留めると革を落とすことがあります。 +Place a dispenser.=ディスペンサーを置こう。 +Place a flower pot.=植木鉢を置こう。 +Pork Chop=ポークチョップ +Pot Planter=鉢植え家 +Rabbit Season=ウサギの季節 +Sniper Duel=スナイパー対決 +Take a cooked fish from a furnace.@nHint: Use a fishing rod to catch a fish and cook it in a furnace.=かまどから焼き魚を取り出そう。@nヒント:釣り竿を使って魚を獲り、かまどに入れて調理します。 +Take an iron ingot from a furnace's output slot.@nHint: To smelt an iron ingot, put a fuel (like coal) and iron ore into a furnace.=かまどの出力スロットから鉄インゴットを取り出そう。@nヒント:鉄インゴットを製錬するには、かまどに(石炭などの)燃料と鉄の原石を入れます。 +The Haggler=商売人 +The Lie=絵に描いた○○○ +Time to Farm!=いざ農業! +Time to Mine!=いざ採掘! +Time to Strike!=いざ突撃! +Travel by minecart for at least 1000 meters from your starting point in a single ride.=一回のトロッコ乗車で、1000m以上を走り抜けよう。 +Use 8 cobblestones to craft a furnace.=8個の丸石を使って、かまどを作ろう。 +Use a crafting table to craft a wooden hoe from wooden planks and sticks.=作業台を使って、木製のクワを作ろう。 材料:木の棒、木材 +Use a crafting table to craft a wooden pickaxe from wooden planks and sticks.=作業台を使って、木製の斧を作ろう。 材料:木の棒、木材 +Use obsidian and a fire starter to construct a Nether portal.=黒曜石と火打ち石を使って、ネザーポータルを構築しよう。 +Use wheat to craft a bread.=小麦を使ってパンを作ろう。 +Who is Cutting Onions?=タマネギ切ってるの誰? +Pick up a crying obsidian from the floor.=床から泣く黒曜石を拾おう。 +Hidden in the Depths=未知なる深海 +Pick up an Ancient Debris from the floor.=床から古代の残骸を拾おう。 +The Nether=ネザー +Bring summer clothes.@nHint: Enter the Nether.=夏服を持っていこう。@nヒント:ネザーにのりこみます。 +Isn't It Iron Pick=鉄のツルハシで決まり +Craft a iron pickaxe using sticks and iron.=鉄のツルハシを作ろう。 材料:木の棒、丸石 +Postmortal=死後 +Use a Totem of Undying to cheat death.=不死のトーテムを使って、死を免れよう。 +Sweet Dreams=よい夢を +Sleep in a bed to change your respawn point.=ベッドで寝て、リスポーン地点を変えよう。 +Not Quite "Nine" Lives=九生とまではいかない +Charge a Respawn Anchor to the maximum.=リスポーンアンカーを最大までチャージしよう。 +What A Deal!=なんて良い取引だ! +Successfully trade with a Villager.=村人との交易を成功させよう。 +Withering Heights=ウィザーリング・ハイツ +Summon the wither from the dead.=死者からウィザーを召喚しよう。 +The Cutest Predator=いちばんカワイイ捕食者 +Catch an Axolotl with a bucket!=バケツでウーパールーパーを捕まえよう! +Fishy Business=フィッシー・ビジネス +Catch a fish.@nHint: Catch a fish, salmon, clownfish, or pufferfish.=魚を獲ろう。@nヒント:タラ、サケ、クマノミ、フグ等を釣ります。 +Country Lode,@nTake Me Home=この道ずっとゆけば@n鉱脈につづいてる +Use a compass on a Lodestone.=ロードストーンにコンパスを使おう。 +Serious Dedication=真摯な取り組み +Use a Netherite Ingot to upgrade a hoe, and then completely reevaluate your life choices.=ネザライトインゴットでクワをアップグレードしたら、人生設計の完全な見直しを図ろう。 +Local Brewery=地酒処 +Brew a Potion.@nHint: Take a potion or glass bottle out of the brewing stand.=ポーションを醸造しよう。@nヒント:醸造台からポーションかガラス瓶を取り出します。 +Enchanter=エンチャンター +Enchant an item using an Enchantment Table.=エンチャントテーブルを使って、アイテムを一つエンチャントしよう。 +Bring Home the Beacon=ブリング・ホーム・ザ・ビーコン +Use a beacon.=ビーコンを使おう。 +Beaconator=ビーコネーター +Use a fully powered beacon.=フルパワーのビーコンを作ろう。 +The Next Generation=ザ・ネクスト・ジェネレーション +Hold the Dragon Egg.@nHint: Pick up the egg from the ground and have it in your inventory.=ドラゴンの卵を所持しよう。@nヒント:地面から卵を拾って、インベントリにしまいます。 +The End... Again...=おしまい…再び… +Respawn the Ender Dragon.=エンダードラゴンを復活させよう。 +Sky's The Limit=空の境界 +Find the elytra and prepare to fly above and beyond!=エリトラを見つけ、空の彼方へ飛び立つ準備をしよう! +Free the End=エンドの解放 +Kill the ender dragon. Good Luck!=エンダードラゴンを討伐しよう。幸運を祈る! +Bee Our Guest=秘蜜の晩餐会 +Use a campfire to collect a bottle of honey from a beehive without aggrivating the bees inside.=焚き火を使って、ハチの巣の中のハチを怒らせることなく、瓶にハチミツを採ろう。 +Total Beelocation=綿蜜に引越し +Move a bee nest, with 3 bees inside, using a silk touch enchanted tool.=シルクタッチをエンチャントした道具を使って、中に3匹のハチがいるハチの巣を移動させよう。 +Wax On=錆止め +Apply honeycomb to a copper block to protect it from the elements.=銅ブロックにハニカムを塗り、風雨から保護しよう。 +Wax Off=錆止め落とし +Scrape wax off of a copper block.=銅ブロックから錆止めを削り落とそう。 diff --git a/mods/HUD/mcl_achievements/locale/template.txt b/mods/HUD/mcl_achievements/locale/template.txt index cd3726b05d..f229b21526 100644 --- a/mods/HUD/mcl_achievements/locale/template.txt +++ b/mods/HUD/mcl_achievements/locale/template.txt @@ -65,6 +65,8 @@ What A Deal!= Successfully trade with a Villager.= Withering Heights= Summon the wither from the dead.= +The Cutest Predator= +Catch an Axolotl with a bucket! Fishy Business= Catch a fish.@nHint: Catch a fish, salmon, clownfish, or pufferfish.= Country Lode,@nTake Me Home= @@ -87,3 +89,11 @@ Sky's The Limit= Find the elytra and prepare to fly above and beyond!= Free the End= Kill the ender dragon. Good Luck!= +Bee Our Guest= +Use a campfire to collect a bottle of honey from a beehive without aggrivating the bees inside.= +Total Beelocation= +Move a bee nest, with 3 bees inside, using a silk touch enchanted tool.= +Wax On= +Apply honeycomb to a copper block to protect it from the elements.= +Wax Off= +Scrape wax off of a copper block.= diff --git a/mods/HUD/mcl_credits/locale/mcl_credits.ja.tr b/mods/HUD/mcl_credits/locale/mcl_credits.ja.tr new file mode 100644 index 0000000000..e7bbbbfc27 --- /dev/null +++ b/mods/HUD/mcl_credits/locale/mcl_credits.ja.tr @@ -0,0 +1,14 @@ +# textdomain: mcl_credits +3D Models=3Dモデル +A faithful Open Source clone of Minecraft=オープンソースによるマインクラフトの忠実なクローン +Contributors=投稿者 +Creator of MineClone=MineClone の創始者 +Creator of MineClone2=MineClone2 の創始者 +Developers=開発者 +Jump to speed up (additionally sprint)=ジャンプでスピードアップ(追加で疾走) +Maintainers=メンテナンス +MineClone5=MineClone5 +Original Mod Authors=オリジナルMODの作者 +Sneak to skip=スニークでスキップ +Textures=テクスチャ +Translations=翻訳 diff --git a/mods/HUD/mcl_credits/people.lua b/mods/HUD/mcl_credits/people.lua index 5b814d941f..9c4208ece5 100644 --- a/mods/HUD/mcl_credits/people.lua +++ b/mods/HUD/mcl_credits/people.lua @@ -9,12 +9,13 @@ return { "Wuzzy", }}, {S("Maintainers"), 0xFF51D5, { + "AncientMariner", "Nicu", - "cora", }}, {S("Previous Maintainers"), 0xFFFFFF, { "Fleckenstein", "jordan4ibanez", + "cora", }}, {S("Developers"), 0xF84355, { "bzoss", @@ -35,6 +36,7 @@ return { "SumianVoice", "MrRar", "talamh", + "Faerraven", }}, {S("Contributors"), 0x52FF00, { "Laurent Rocher", @@ -90,6 +92,10 @@ return { "FossFanatic", "Herbert West", "GuyLiner", + "3raven", + "anarquimico", + "TheOnlyJoeEnderman", + "Ranko Saotome", }}, {S("MineClone5"), 0xA60014, { "kay27", @@ -159,6 +165,7 @@ return { "MysticTempest", "RandomLegoBrick", "cora", + "Faerraven / Michieal", }}, {S("Translations"), 0x00FF60, { "Wuzzy", diff --git a/mods/HUD/mcl_death_messages/locale/mcl_death_messages.ja.tr b/mods/HUD/mcl_death_messages/locale/mcl_death_messages.ja.tr new file mode 100644 index 0000000000..a725b261f2 --- /dev/null +++ b/mods/HUD/mcl_death_messages/locale/mcl_death_messages.ja.tr @@ -0,0 +1,55 @@ +# textdomain: mcl_death_messages +@1 went up in flames=@1は炎上した +@1 walked into fire whilst fighting @2=@1は@2と戦いながら火中へ踏み入った +@1 was struck by lightning=@1は雷に打たれた +@1 was struck by lightning whilst fighting @2=@1は@2と戦いながら雷に打たれた +@1 burned to death=@1は焼死した +@1 was burnt to a crisp whilst fighting @2=@1は@2と戦いながらカリッと焼けた +@1 tried to swim in lava=@1は溶岩遊泳を試みた +@1 tried to swim in lava to escape @2=@1は@2から逃げるために溶岩遊泳を試みた +@1 discovered the floor was lava=@1は床が溶岩だったと気付いた +@1 walked into danger zone due to @2=@1は@2のせいで危険地帯に踏み入った +@1 suffocated in a wall=@1は壁の中で窒息死した +@1 suffocated in a wall whilst fighting @2=@1は@2と戦いながら壁の中で窒息死した +@1 drowned=@1は溺死した +@1 drowned whilst trying to escape @2=@1は@2から逃れようとして溺死した +@1 starved to death=@1は餓死した +@1 starved to death whilst fighting @2=@1は@2と戦いながら餓死した +@1 was pricked to death=@1は刺されて死んだ +@1 walked into a cactus whilst trying to escape @2=@1は@2から逃れようとしてサボテンに突っ込んだ +@1 hit the ground too hard=@1は地面に激突しすぎた +@1 hit the ground too hard whilst trying to escape @2=@1は@2から逃れようとして地面に激突しすぎた +@1 experienced kinetic energy=@1は運動エネルギーを体験した +@1 experienced kinetic energy whilst trying to escape @2=@1は@2から逃れようとして運動エネルギーを体験した +@1 fell out of the world=@1は奈落の底へ落ちた +@1 didn't want to live in the same world as @2=@1は@2と同じ世界に住みたくなかった +@1 died=@1は死んだ +@1 died because of @2=@1は@2のせいで死んだ +@1 was killed by magic=@1は魔法で殺された +@1 was killed by magic whilst trying to escape @2=@1は@2から逃れようとして魔法で殺された +@1 was killed by @2 using magic=@1は@2の使った魔法で殺された +@1 was killed by @2 using @3=@1は@2の使った@3で殺された +@1 was roasted in dragon breath=@1はドラゴンブレスで炙り焼きにされた +@1 was roasted in dragon breath by @2=@1は@2によりドラゴンブレスで炙り焼きにされた +@1 withered away=@1は干からびた +@1 withered away whilst fighting @2=@1は@2と戦いながら干からびた +@1 was shot by a skull from @2=@1は@2からの頭蓋骨に撃たれた +@1 was squashed by a falling anvil=@1は落下する金床でぺしゃんこにされた +@1 was squashed by a falling anvil whilst fighting @2=@1は@2と戦いながら落下する金床でぺしゃんこにされた +@1 was squashed by a falling block=@1は落下するブロックでぺしゃんこにされた +@1 was squashed by a falling block whilst fighting @2=@1は@2と戦いながら落下するブロックでぺしゃんこにされた +@1 was slain by @2=@1は@2に殺害された +@1 was slain by @2 using @3=@1は@2の使った@3で殺害された +@1 was shot by @2=@1は@2に撃たれた +@1 was shot by @2 using @3=@1は@2の使った@3で撃たれた +@1 was fireballed by @2=@1は@2によって火だるまにされた +@1 was fireballed by @2 using @3=@1は@2の使った@3によって火だるまにされた +@1 was killed trying to hurt @2=@1は@2を傷めつけようとして殺された +@1 was killed by @3 trying to hurt @2=@1は@2を傷めつけようとした@3に殺された +@1 blew up=@1は消し飛んだ +@1 was blown up by @2=@1は@2によって爆破された +@1 was blown up by @2 using @3=@1は@2の使った@3によって爆破された +@1 was squished too much=@1はペラッペラになった +@1 was squashed by @2=@1は@2に潰された +@1 went off with a bang=@1は爆散した +@1 went off with a bang due to a firework fired from @3 by @2=@1は@2が@3から発射した花火により爆散した diff --git a/mods/HUD/mcl_experience/locale/mcl_experience.ja.tr b/mods/HUD/mcl_experience/locale/mcl_experience.ja.tr new file mode 100644 index 0000000000..07e4234d1c --- /dev/null +++ b/mods/HUD/mcl_experience/locale/mcl_experience.ja.tr @@ -0,0 +1,7 @@ +# textdomain: mcl_experience +[[] ]=[[<プレイヤー>] ] +Gives a player some XP=プレイヤーにXPを付与 +Error: Too many parameters!=エラー:パラメータ過多! +Error: Incorrect value of XP=エラー:XPの値が不適切 +Error: Player not found=エラー:プレイヤー未検出 +Added @1 XP to @2, total: @3, experience level: @4=@2に @1 XPを追加、合計:@3、 XPレベル:@4 diff --git a/mods/HUD/mcl_hbarmor/locale/hbarmor.ja.tr b/mods/HUD/mcl_hbarmor/locale/hbarmor.ja.tr new file mode 100644 index 0000000000..2d32381aee --- /dev/null +++ b/mods/HUD/mcl_hbarmor/locale/hbarmor.ja.tr @@ -0,0 +1,2 @@ +# textdomain:hbarmor +Armor=防具 diff --git a/mods/HUD/mcl_info/init.lua b/mods/HUD/mcl_info/init.lua index 71f8d8ad09..b6f69255c7 100644 --- a/mods/HUD/mcl_info/init.lua +++ b/mods/HUD/mcl_info/init.lua @@ -1,22 +1,15 @@ mcl_info = {} -local refresh_interval = .63 -local huds = {} -local default_debug = 0 -local after = minetest.after -local get_connected_players = minetest.get_connected_players -local get_biome_name = minetest.get_biome_name -local get_biome_data = minetest.get_biome_data -local format = string.format - -local min1, min2, min3 = mcl_vars.mg_overworld_min, mcl_vars.mg_end_min, mcl_vars.mg_nether_min -local max1, max2, max3 = mcl_vars.mg_overworld_max, mcl_vars.mg_end_max, mcl_vars.mg_nether_max + 128 +local format, pairs,ipairs,table,vector,minetest,mcl_info,tonumber,tostring = string.format,pairs,ipairs,table,vector,minetest,mcl_info,tonumber,tostring local modname = minetest.get_current_modname() -local modpath = minetest.get_modpath(modname) local S = minetest.get_translator(modname) local storage = minetest.get_mod_storage() local player_dbg = {} +local refresh_interval = .63 +local huds = {} +local default_debug = 0 + local function check_setting(s) return s end @@ -58,21 +51,24 @@ end local function get_text(player, bits) local pos = vector.offset(player:get_pos(),0,0.5,0) local bits = bits - if bits == 0 then return "" end + if bits == -1 then return "" end local r = "" for _,key in ipairs(fields_keyset) do local def = mcl_info.registered_debug_fields[key] - if def.level == nil or def.level <= bits then - r = r ..key..": "..tostring(def.func(player,pos)).."\n" + if def then + if def.level == nil or def.level <= bits then + r = r ..key..": "..tostring(def.func(player,pos)).."\n" + end + else + r = r ..key..": \n" end end - return r end local function info() - for _, player in pairs(get_connected_players()) do + for _, player in pairs(minetest.get_connected_players()) do local name = player:get_player_name() local s = player_setting(player) local pos = player:get_pos() @@ -104,7 +100,7 @@ local function info() player:hud_change(huds[name][2], "text", text) end end - after(refresh_interval, info) + minetest.after(refresh_interval, info) end minetest.after(0,info) @@ -115,21 +111,40 @@ minetest.register_on_leaveplayer(function(p) end) minetest.register_chatcommand("debug",{ - description = S("Set debug bit mask: 0 = disable, 1 = biome name, 2 = coordinates, 3 = all"), + description = S("Set debug bit mask: 0 = disable, 1 = player coords, 2 = coordinates, 3 = biome name, 4 = all"), params = S(""), privs = { debug = true }, func = function(name, params) local player = minetest.get_player_by_name(name) if params == "" then return true, "Debug bitmask is "..player_setting(player) end local dbg = math.floor(tonumber(params) or default_debug) - if dbg < 0 or dbg > 4 then - minetest.chat_send_player(name, S("Error! Possible values are integer numbers from @1 to @2", 0, 4)) + if dbg < -1 or dbg > 4 then + minetest.chat_send_player(name, S("Error! Possible values are integer numbers from @1 to @2", -1, 4)) return false,"Current bitmask: "..player_setting(player) end return true, "Debug bit mask set to "..player_setting(player,dbg) end }) +-- register normal user access to debug levels 1 and 0. +minetest.register_chatcommand("whereami", { + description = S("Set location bit mask: 0 = disable, 1 = coordinates"), + params = S(""), + -- privs = { }, + func = function(name, params) + local player = minetest.get_player_by_name(name) + if params == "" then + return true, "Location bitmask is " .. player_setting(player) + end + local loc_lev = math.floor(tonumber(params) or default_debug) + if loc_lev < 0 or loc_lev > 4 then + minetest.chat_send_player(name, S("Error! Possible values are integer numbers from @1 to @2", 0, 1)) + return false, "Current bitmask: " .. player_setting(player) + end + return true, "Location bit mask set to " .. player_setting(player, loc_lev) + end +}) + mcl_info.register_debug_field("Node feet",{ level = 4, func = function(pl,pos) @@ -145,17 +160,45 @@ mcl_info.register_debug_field("Node below",{ mcl_info.register_debug_field("Biome",{ level = 3, func = function(pl,pos) - local biome_data = get_biome_data(pos) - local biome = biome_data and get_biome_name(biome_data.biome) or "No biome" + local biome_data = minetest.get_biome_data(pos) + local biome = biome_data and minetest.get_biome_name(biome_data.biome) or "No biome" if biome_data then return format("%s (%s), Humidity: %.1f, Temperature: %.1f",biome, biome_data.biome, biome_data.humidity, biome_data.heat) end return "No biome" end }) -mcl_info.register_debug_field("Coords",{ + +mcl_info.register_debug_field("Coords", { level = 2, - func = function(pl,pos) + func = function(pl, pos) return format("x:%.1f y:%.1f z:%.1f", pos.x, pos.y, pos.z) end }) + +mcl_info.register_debug_field("Location", { + level = 1, + func = function(pl, pos) + local report_y = 0 + -- overworld + if (pos.y >= mcl_vars.mg_overworld_min) and (pos.y <= mcl_vars.mg_overworld_max) then + return format("Overworld: x:%.1f y:%.1f z:%.1f", pos.x, pos.y, pos.z) + end + + -- nether + if (pos.y >= mcl_vars.mg_nether_min) and (pos.y <= mcl_vars.mg_nether_max) then + report_y = pos.y - mcl_vars.mg_nether_min + return format("Nether: x:%.1f y:%.1f z:%.1f", pos.x, report_y, pos.z) + end + + -- end + if (pos.y >= mcl_vars.mg_end_min) and (pos.y <= mcl_vars.mg_end_max) then + report_y = pos.y - mcl_vars.mg_end_min + return format("End: x:%.1f y:%.1f z:%.1f", pos.x, report_y, pos.z) + end + + -- outside of scoped bounds. + return format("Void: x:%.1f y:%.1f z:%.1f", pos.x, pos.y, pos.z) + + end +}) diff --git a/mods/HUD/mcl_info/locale/mcl_info.ja.tr b/mods/HUD/mcl_info/locale/mcl_info.ja.tr new file mode 100644 index 0000000000..3b2f3966b1 --- /dev/null +++ b/mods/HUD/mcl_info/locale/mcl_info.ja.tr @@ -0,0 +1,4 @@ +# textdomain: mcl_info +Set debug bit mask: 0 @= disable, 1 @= biome name, 2 @= coordinates, 3 @= all=デバッグビットマスク設定:0 @= 無効, 1 @= バイオーム名, 2 @= 座標, 3 @= 全て +Error! Possible values are integer numbers from @1 to @2=エラー! 指定できる値は@1〜@2の整数値です。 +Debug bit mask set to @1=デバッグビットマスクを@1に設定 diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index 704641d89f..a9a1d6dd9d 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -117,7 +117,7 @@ local function filter_item(name, description, lang, filter) else desc = string.lower(minetest.get_translated_string(lang, description)) end - return string.find(name, filter) or string.find(desc, filter) + return string.find(name, filter, nil, true) or string.find(desc, filter, nil, true) end local function set_inv_search(filter, player) @@ -699,6 +699,7 @@ minetest.register_on_joinplayer(function(player) players[name].start_i = 0 end init(player) + -- Setup initial creative inventory to the "nix" page. mcl_inventory.set_creative_formspec(player, 0, 1, nil, false, "nix", "") end) diff --git a/mods/HUD/mcl_inventory/init.lua b/mods/HUD/mcl_inventory/init.lua index 4f50a3ef5a..9f54511a03 100644 --- a/mods/HUD/mcl_inventory/init.lua +++ b/mods/HUD/mcl_inventory/init.lua @@ -169,12 +169,6 @@ minetest.register_on_joinplayer(function(player) player:hud_set_hotbar_image("mcl_inventory_hotbar.png") player:hud_set_hotbar_selected_image("mcl_inventory_hotbar_selected.png") - local old_update_player = mcl_armor.update_player - function mcl_armor.update_player(player, info) - old_update_player(player, info) - set_inventory(player, true) - end - -- In Creative Mode, the initial inventory setup is handled in creative.lua if not minetest.is_creative_enabled(player:get_player_name()) then set_inventory(player) diff --git a/mods/HUD/mcl_inventory/locale/mcl_inventory.ja.tr b/mods/HUD/mcl_inventory/locale/mcl_inventory.ja.tr new file mode 100644 index 0000000000..77c8fe6865 --- /dev/null +++ b/mods/HUD/mcl_inventory/locale/mcl_inventory.ja.tr @@ -0,0 +1,21 @@ +# textdomain: mcl_inventory +Recipe book=レシピ本 +Help=ヘルプ +Select player skin=プレイヤースキン選択 +Advancements=進捗 +Building Blocks=建築ブロック +Decoration Blocks=装飾ブロック +Redstone=レッドストーン +Transportation=運送 +Brewing=醸造 +Miscellaneous=その他 +Search Items=アイテム検索 +Foodstuffs=食物 +Tools=道具 +Combat=戦闘 +Mobs=Mob +Materials=素材 +Survival Inventory=サバイバル インベントリ +Crafting=クラフト +Inventory=インベントリ +@1/@2=@1/@2 diff --git a/mods/HUD/mcl_ver_info/init.lua b/mods/HUD/mcl_ver_info/init.lua new file mode 100644 index 0000000000..632847275e --- /dev/null +++ b/mods/HUD/mcl_ver_info/init.lua @@ -0,0 +1,65 @@ +--- +--- Generated by EmmyLua +--- Created by Michieal. +--- DateTime: 11/28/22 4:38 PM +--- +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) + +local function xpcall_ver (error) + minetest.log("info", "mcl_ver_info:: Gamepath not supported in this version of Minetest.") +end + +local function get_game_info () + local game_info + + if xpcall(minetest.get_game_info, xpcall_ver) then + game_info = minetest.get_game_info() + else + minetest.log( S("Sorry, but your version of Minetest doesn't support the latest API. Please upgrade your minetest.")) + return false + end + + return game_info +end + +-- register normal user access to debug levels 1 and 0. +minetest.register_chatcommand("ver", { + description = S("Display Mineclone 2 game version."), + func = function(name, params) + --[[ get_game_info's table data: + { + id = string, + title = string, + author = string, + -- The root directory of the game + path = string, + } + --]] + local game_info = get_game_info () + + if game_info == false then + return true + end + + local conf = Settings(game_info.path .. "/game.conf") + local version = conf:get("version") + + if game_info.title == nil or game_info.title == "" then + game_info.title = "Mineclone 2" + end + -- Notes: "game.conf doesn't support id currently, this is planned in the future" - rubenwardy from the github issue. + -- TODO: Remove workaround after minetest.get_game_info().id is implemented. + if version == nil or version == "" then -- workaround for id = not being implemented yet. + if game_info.id == nil or game_info.id == "" then + game_info.id = " Please upgrade your version to the newest version for the /ver command to work." + end + else + game_info.id = version + end + + minetest.chat_send_player(name, string.format("Version: %s - %s", game_info.title, game_info.id)) + return true + end +}) + diff --git a/mods/HUD/mcl_ver_info/locale/mcl_ver_info.ja.tr b/mods/HUD/mcl_ver_info/locale/mcl_ver_info.ja.tr new file mode 100644 index 0000000000..e306d93730 --- /dev/null +++ b/mods/HUD/mcl_ver_info/locale/mcl_ver_info.ja.tr @@ -0,0 +1,2 @@ +# textdomain: mcl_ver_info +Sorry, but your version of Minetest doesn't support the latest API. Please upgrade your minetest.=すみませんが、お使いの Minetest のバージョンは、最新のAPIをサポートしていません。minetest を更新してみて下さい。 \ No newline at end of file diff --git a/mods/HUD/mcl_ver_info/locale/template.txt b/mods/HUD/mcl_ver_info/locale/template.txt new file mode 100644 index 0000000000..75febe8155 --- /dev/null +++ b/mods/HUD/mcl_ver_info/locale/template.txt @@ -0,0 +1,2 @@ +# textdomain: mcl_ver_info +Sorry, but your version of Minetest doesn't support the latest API. Please upgrade your minetest.= \ No newline at end of file diff --git a/mods/HUD/mcl_ver_info/mod.conf b/mods/HUD/mcl_ver_info/mod.conf new file mode 100644 index 0000000000..b6f6dca985 --- /dev/null +++ b/mods/HUD/mcl_ver_info/mod.conf @@ -0,0 +1,4 @@ +name = mcl_ver_info +description = Prints game version information; /ver command. +depends = mcl_init +author = Michieal diff --git a/mods/ITEMS/REDSTONE/mcl_comparators/locale/mcl_comparators.ja.tr b/mods/ITEMS/REDSTONE/mcl_comparators/locale/mcl_comparators.ja.tr new file mode 100644 index 0000000000..f836d8239e --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_comparators/locale/mcl_comparators.ja.tr @@ -0,0 +1,12 @@ +# textdomain: mcl_comparators +Redstone comparators are multi-purpose redstone components.=レッドストーンコンパレータは、多目的なレッドストーン部品です。 +They can transmit a redstone signal, detect whether a block contains any items and compare multiple signals.=レッドストーン信号の送信、ブロックにアイテムが含まれているかどうかの検出、複数の信号の比較などが可能です。 +A redstone comparator has 1 main input, 2 side inputs and 1 output. The output is in arrow direction, the main input is in the opposite direction. The other 2 sides are the side inputs.=レッドストーンコンパレータは、1つのメイン入力、2つのサイド入力、1つの出力を持ちます。出力は矢印方向で、メイン入力はその反対方向です。残りの2辺はサイド入力です。 +The main input can powered in 2 ways: First, it can be powered directly by redstone power like any other component. Second, it is powered if, and only if a container (like a chest) is placed in front of it and the container contains at least one item.=メイン入力には、2つの方法で動力を供給できます。1つ目は、他の機器と同様にレッドストーン動力によって直接動力を得られます。2つ目は、コンテナ(チェストのようなもの)が前に置かれ、そのコンテナに少なくとも1つのアイテムが入っている場合にのみ、動力が得られます。 +The side inputs are only powered by normal redstone power. The redstone comparator can operate in two modes: Transmission mode and subtraction mode. It starts in transmission mode and the mode can be changed by using the block.=サイド入力には、通常のレッドストーン動力のみが供給されます。レッドストーンコンパレータは、2つのモードで動作できます。送信モードと減算モードです。送信モードで起動し、ブロックによりモードを変更できます。 +Transmission mode:@nThe front torch is unlit and lowered. The output is powered if, and only if the main input is powered. The two side inputs are ignored.=送信モード:@n前面のトーチは非点灯で降りています。出力が動力を供給するのは、メイン入力に動力が来ている場合のみです。2つのサイド入力は無視されます。 +Subtraction mode:@nThe front torch is lit. The output is powered if, and only if the main input is powered and none of the side inputs is powered.=減算モード:@n前面のトーチは点灯しています。出力が動力を供給するのは、メイン入力に動力が来ており、且つサイド入力のいずれにも動力が来ていない場合のみです。 +Redstone Comparator=レッドストーンコンパレータ +Redstone Comparator (Subtract)=レッドストーンコンパレータ(減算) +Redstone Comparator (Powered)=レッドストーンコンパレータ(稼動) +Redstone Comparator (Subtract, Powered)=レッドストーンコンパレータ(減算・稼動) diff --git a/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.ja.tr b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.ja.tr new file mode 100644 index 0000000000..33d1caddf9 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_dispensers/locale/mcl_dispensers.ja.tr @@ -0,0 +1,25 @@ +# textdomain: mcl_dispensers +Dispenser=ディスペンサー +A dispenser is a block which acts as a redstone component which, when powered with redstone power, dispenses an item. It has a container with 9 inventory slots.=ディスペンサーはレッドストーン部品として機能するブロックで、レッドストーン動力によってアイテムを放出します。9つのインベントリスロットを備えたコンテナを有しています。 +Place the dispenser in one of 6 possible directions. The “hole” is where items will fly out of the dispenser. Use the dispenser to access its inventory. Insert the items you wish to dispense. Supply the dispenser with redstone energy once to dispense a random item.=ディスペンサーを、限りある6方向のいずれかに設置します。「穴」は、アイテムがディスペンサーから飛び出す場所です。ディスペンサーを使用して、インベントリにアクセスします。放出したいアイテムを入れてください。レッドストーンエネルギーを供給すると、ランダムなアイテムが放出されます。 +The dispenser will do different things, depending on the dispensed item:=ディスペンサーは、放出されるアイテムによって振る舞いが異なる: +• Arrows: Are launched=矢:発射 +• Eggs and snowballs: Are thrown=卵、雪玉:投擲 +• Fire charges: Are fired in a straight line=発火弾:一直線に射撃 +• Armor: Will be equipped to players and armor stands=鎧:プレイヤーや防具立てに装備予定 +• Boats: Are placed on water or are dropped=ボート:水上に浮かべるか、ドロップ +• Minecart: Are placed on rails or are dropped=トロッコ:レールに乗せるか、ドロップ +• Bone meal: Is applied on the block it is facing=骨粉:向き合っているブロックに適用 +• Empty buckets: Are used to collect a liquid source=空のバケツ:液体の源泉を回収するために使用 +• Filled buckets: Are used to place a liquid source=充填済みのバケツ:液体の源泉を配置するために使用 +• Heads, pumpkins: Equipped to players and armor stands, or placed as a block=頭、カボチャ:プレイヤーや防具立てに装備、またはブロックとして配置 +• Shulker boxes: Are placed as a block=シュルカーボックス:ブロックとして配置 +• TNT: Is placed and ignited=TNT:着火したTNTを設置 +• Flint and steel: Is used to ignite a fire in air and to ignite TNT=火打ち石と打ち金:空気とTNTに着火するために使用 +• Spawn eggs: Will summon the mob they contain=スポーンエッグ:各種mobを召喚 +• Other items: Are simply dropped=その他のアイテム:単純にドロップ +Downwards-Facing Dispenser=下向きディスペンサー +Upwards-Facing Dispenser=上向きディスペンサー +Inventory=インベントリ +9 inventory slots=9つのインベントリスロット +Launches item when powered by redstone power=レッドストーン動力が来ているとアイテムを発射 diff --git a/mods/ITEMS/REDSTONE/mcl_droppers/locale/mcl_droppers.ja.tr b/mods/ITEMS/REDSTONE/mcl_droppers/locale/mcl_droppers.ja.tr new file mode 100644 index 0000000000..53f800ba4a --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_droppers/locale/mcl_droppers.ja.tr @@ -0,0 +1,9 @@ +# textdomain: mcl_droppers +Dropper=ドロッパー +A dropper is a redstone component and a container with 9 inventory slots which, when supplied with redstone power, drops an item or puts it into a container in front of it.=ドロッパーは、9つのインベントリスロットを持つコンテナのレッドストーン部品で、レッドストーン動力を供給されると、アイテムをドロップしたり手前のコンテナに入れたりします。 +Droppers can be placed in 6 possible directions, items will be dropped out of the hole. Use the dropper to access its inventory. Supply it with redstone energy once to make the dropper drop or transfer a random item.=ドロッパーは任意の6方向に設置することができ、穴からアイテムをドロップしようとします。ドロッパーを使用し、そのインベントリにアクセスします。ドロッパーにレッドストーンエネルギーを供給すると、ランダムなアイテムがドロップまたは転送されます。 +Downwards-Facing Dropper=下向きドロッパー +Upwards-Facing Dropper=上向きドロッパー +Inventory=インベントリ +9 inventory slots=9つのインベントリスロット +Drops item when powered by redstone power=レッドストーン動力が来るとアイテムをドロップ diff --git a/mods/ITEMS/REDSTONE/mcl_observers/locale/mcl_observers.ja.tr b/mods/ITEMS/REDSTONE/mcl_observers/locale/mcl_observers.ja.tr new file mode 100644 index 0000000000..b8acdf1e67 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_observers/locale/mcl_observers.ja.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_observers +Observer=オブザーバー +An observer is a redstone component which observes the block in front of it and sends a very short redstone pulse whenever this block changes.=オブザーバーはレッドストーン部品で、目前のブロックを観察し、このブロックが変更されるたびに非常に短いレッドストーンパルスを送信します。 +Place the observer directly in front of the block you want to observe with the “face” looking at the block. The arrow points to the side of the output, which is at the opposite side of the “face”. You can place your redstone dust or any other component here.=観察したいブロックの真正面に、オブザーバーの「顔」がブロックを見るように置いてください。矢印は出力側を指しており、「顔」の反対側にあたります。ここにはレッドストーンダスト等の部品が置けます。 +Emits redstone pulse when block in front changes=前方のブロックが変更されると、レッドストーンパルスを送信 diff --git a/mods/ITEMS/REDSTONE/mcl_target/locale/mcl_target.ja.tr b/mods/ITEMS/REDSTONE/mcl_target/locale/mcl_target.ja.tr new file mode 100644 index 0000000000..53109f6759 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mcl_target/locale/mcl_target.ja.tr @@ -0,0 +1,4 @@ +# textdomain: mcl_target +Target=的 +A target is a block that provides a temporary redstone charge when hit by a projectile.=的は、飛び道具が当たると一時的にレッドストーンチャージを提供するブロックです。 +Throw a projectile on the target to activate it.=的に投射物を投げ当て、それを作動させます。 \ No newline at end of file diff --git a/mods/ITEMS/REDSTONE/mesecons_button/init.lua b/mods/ITEMS/REDSTONE/mesecons_button/init.lua index 2812b27582..fd765eded7 100644 --- a/mods/ITEMS/REDSTONE/mesecons_button/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_button/init.lua @@ -112,7 +112,7 @@ function mesecon.register_button(basename, description, texture, recipeitem, sou if push_by_arrow then tt = tt .. "\n" .. S("Pushable by arrow") end - minetest.register_node("mesecons_button:button_"..basename.."_off", { + minetest.register_node(":mesecons_button:button_"..basename.."_off", { drawtype = "nodebox", tiles = {texture}, wield_image = "mesecons_button_wield_mask.png^"..texture.."^mesecons_button_wield_mask.png^[makealpha:255,126,126", @@ -147,7 +147,7 @@ function mesecon.register_button(basename, description, texture, recipeitem, sou _mcl_hardness = 0.5, }) - minetest.register_node("mesecons_button:button_"..basename.."_on", { + minetest.register_node(":mesecons_button:button_"..basename.."_on", { drawtype = "nodebox", tiles = {texture}, wield_image = "mesecons_button_wield_mask.png^"..texture.."^mesecons_button_wield_mask.png^[makealpha:255,126,126", @@ -223,6 +223,10 @@ local woods = { { "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", S("Dark Oak Button") }, { "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", S("Spruce Button") }, { "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Button") }, + + { "mangrove_wood", "mcl_mangrove:mangrove_wood", "mcl_mangrove_planks.png", S("Mangrove Button") }, + { "crimson_hyphae_wood", "mcl_crimson:crimson_hyphae_wood", "crimson_hyphae_wood.png", S("Crimson Button") }, + { "warped_hyphae_wood", "mcl_crimson:warped_hyphae_wood", "warped_hyphae_wood.png", S("Warped Button") }, } for w=1, #woods do diff --git a/mods/ITEMS/REDSTONE/mesecons_button/locale/mesecons_button.ja.tr b/mods/ITEMS/REDSTONE/mesecons_button/locale/mesecons_button.ja.tr new file mode 100644 index 0000000000..036568fad8 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_button/locale/mesecons_button.ja.tr @@ -0,0 +1,14 @@ +# textdomain: mesecons_button +Use the button to push it.=ボタンを押して使用します。 +Stone Button=石のボタン +A stone button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.=石のボタンは石でできたレッドストーン部品で、押すことでレッドストーン動力を提供できます。押すと、隣接するレッドストーン部品を 1秒間 動作させます。 +Oak Button=オークのボタン +Acacia Button=アカシアのボタン +Birch Button=シラカバのボタン +Dark Oak Button=ダークオークのボタン +Spruce Button=トウヒのボタン +Jungle Button=ジャングルのボタン +A wooden button is a redstone component made out of wood which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1.5 seconds. Wooden buttons may also be pushed by arrows.=木製のボタンは木でできたレッドストーン部品で、押すことでレッドストーン動力を提供できます。押すと、隣接するレッドストーン部品を 1.5秒間 動作させます。木製のボタンは、矢でも押せます。 +Provides redstone power when pushed=押すとレッドストーン動力を提供 +Push duration: @1s=押下持続時間: @1秒 +Pushable by arrow=矢で押下可能 diff --git a/mods/ITEMS/REDSTONE/mesecons_commandblock/locale/mesecons_commandblock.ja.tr b/mods/ITEMS/REDSTONE/mesecons_commandblock/locale/mesecons_commandblock.ja.tr new file mode 100644 index 0000000000..1b46a6c7a8 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_commandblock/locale/mesecons_commandblock.ja.tr @@ -0,0 +1,30 @@ +# textdomain: mesecons_commandblock +Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands.=エラー:コマンド「@1」は存在しません:コマンドブロックは変更されていません。使用可能なコマンドのリストについては、チャットコマンドの "help" を使用してください。 +Error: The command “@1” does not exist; your command block has not been changed. Use the “help” chat command for a list of available commands. Hint: Try to remove the leading slash.=エラー:コマンド「@1」は存在しません:コマンドブロックは変更されていません。使用可能なコマンドのリストについては、チャットコマンドの "help" を使用してください。 ヒント:先頭のスラッシュを削除してみてください。 +Error: You have insufficient privileges to use the command “@1” (missing privilege: @2)! The command block has not been changed.=エラー:コマンド "@1" を使用するには権限不足です!(足りない権限: @2) コマンドブロックは変更されていません。 +Error: No commander! Block must be replaced.=エラー:コマンダーがいません! ブロックは交換しなければなりません。 +Commander: @1=コマンダー: @1 +Submit=提出 +No commands.=コマンドはありません。 +Commands:=コマンド: +Help=ヘルプ +Placement denied. You need the “maphack” privilege to place command blocks.=配置が拒否されました。コマンドブロックを配置するには "maphack" 権限が必要です。 +Command Block=コマンドブロック +Command blocks are mighty redstone components which are able to alter reality itself. In other words, they cause the server to execute server commands when they are supplied with redstone power.=コマンドブロックは、現実そのものを変換できる、強大なレッドストーン部品です。言い換えると、レッドストーン動力が供給されたときに、サーバーにサーバーコマンドを実行させるもの、です。 +Everyone can activate a command block and look at its commands, but not everyone can edit and place them.=コマンドブロックは誰でも起動でき、そのコマンドを見れますが、編集や配置は誰にでも出来るわけではありません。 +To view the commands in a command block, use it. To activate the command block, just supply it with redstone power. This will execute the commands once. To execute the commands again, turn the redstone power off and on again.=コマンドブロックのコマンドを表示するには、コマンドブロックを使用します。コマンドブロックを起動するには、レッドストーン動力を供給するだけです。これにより、コマンドが一回実行されます。コマンドを再度実行するには、レッドストーン動力を一旦オフにし、再度オンにしてください。 +To be able to place a command block and change the commands, you need to be in Creative Mode and must have the “maphack” privilege. A new command block does not have any commands and does nothing. Use the command block (in Creative Mode!) to edit its commands. Read the help entry “Advanced usage > Server Commands” to understand how commands work. Each line contains a single command. You enter them like you would in the console, but without the leading slash. The commands will be executed from top to bottom.=コマンドブロックを配置してコマンドを変更するには、クリエイティブモード且つ「maphack」権限が必要です。新しいコマンドブロックはコマンドを持たず、何もしません。コマンドブロックを使って(クリエイティブモードで!)そのコマンドを編集してください。コマンドの動作について知るには、ヘルプの "Advanced usage > Server Commands" をお読みください。各行は単一のコマンドを含んでいます。コンソールと同じように入力しますが、先頭のスラッシュを除きます。コマンドは上から順に実行されます。 +All commands will be executed on behalf of the player who placed the command block, as if the player typed in the commands. This player is said to be the “commander” of the block.=すべてのコマンドは、コマンドブロックを配置したプレイヤーに代わって、あたかもそのプレイヤーがコマンドを入力したかのように実行されます。このプレイヤーを、そのブロックの「コマンダー」と呼びます。 +Command blocks support placeholders, insert one of these placeholders and they will be replaced by some other text:=コマンドブロックはプレースホルダーをサポートしており、いずれかのプレースホルダーを挿入すると、他のテキストに置き換わります: +• “@@c”: commander of this command block=• "@@c":このコマンドブロックのコマンダー +• “@@n” or “@@p”: nearest player from the command block=• "@@n" か "@@p":コマンドブロックから最も近いプレイヤー +• “@@f” farthest player from the command block=• "@@f":ブロックから最も遠いプレイヤー +• “@@r”: random player currently in the world=• "@@r":いまワールドにいるランダムプレイヤー +• “@@@@”: literal “@@” sign=• "@@@@":文字通りの「@@」記号 +Example 1:@n time 12000@nSets the game clock to 12:00=例1:@n time 12000@nゲームクロックを12:00に設定 +Example 2:@n give @@n mcl_core:apple 5@nGives the nearest player 5 apples=例2:@n give @@n mcl_core:apple 5@n最も近いプレイヤーにリンゴを5個与える +Access denied. You need the “maphack” privilege to edit command blocks.=アクセスが拒否されました。コマンドブロックの編集には "maphack" 権限が必要です。 +Editing the command block has failed! You can only change the command block in Creative Mode!=コマンドブロックの編集に失敗しました! コマンドブロックの変更ができるのは、クリエイティブモードでのみ!です。 +Editing the command block has failed! The command block is gone.=コマンドブロックの編集に失敗しました! コマンドブロックがどこかいきました。 +Executes server commands when powered by redstone power=レッドストーン動力が来るとサーバーコマンドを実行 +Command blocks are not enabled on this server=このサーバーではコマンドブロックが有効になっていない diff --git a/mods/ITEMS/REDSTONE/mesecons_delayer/locale/mesecons_delayer.ja.tr b/mods/ITEMS/REDSTONE/mesecons_delayer/locale/mesecons_delayer.ja.tr new file mode 100644 index 0000000000..74e8d644df --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_delayer/locale/mesecons_delayer.ja.tr @@ -0,0 +1,13 @@ +# textdomain: mesecons_delayer +Redstone repeaters are versatile redstone components with multiple purposes: 1. They only allow signals to travel in one direction. 2. They delay the signal. 3. Optionally, they can lock their output in one state.=レッドストーンリピーターは多目的に使えるレッドストーン部品:1、信号は一方通行のみ。 2、信号が遅延する。 3、任意で,出力を1つの状態にロック可能。 +To power a redstone repeater, send a signal in “arrow” direction (the input). The signal goes out on the opposite side (the output) with a delay. To change the delay, use the redstone repeater. The delay is between 0.1 and 0.4 seconds long and can be changed in steps of 0.1 seconds. It is indicated by the position of the moving redstone torch.=レッドストーンリピーターを動かすには、「矢印」方向に信号を送ります(入力)。信号は遅延を伴って反対側(出力)に出ていきます。遅延時間を変更するには、レッドストーンリピーターを使用します。遅延は0.1~0.4秒の間で、0.1秒刻みで変更できます。それを示すのは、移動するレッドストーントーチの位置です。 +To lock a repeater, send a signal from an adjacent repeater into one of its sides. While locked, the moving redstone torch disappears, the output doesn't change and the input signal is ignored.=リピーターをロックするには、その側面にリピーターを隣接し信号を送ります。ロック中は、移動するレッドストーントーチが消え、出力は変化せず、入力信号も無視されます。 +Redstone Repeater=レッドストーンリピーター +Redstone Repeater (Powered)=レッドストーンリピーター(稼動) +Redstone Repeater (Locked)=レッドストーンリピーター(ロック済) +Redstone Repeater (Locked, Powered)=レッドストーンリピーター(ロック済・稼動) +Redstone Repeater (Delay @1)=レッドストーンリピーター(遅延 @1) +Redstone Repeater (Delay @1, Powered)=レッドストーンリピーター(遅延 @1・稼動) +Transmits redstone power only in one direction=レッドストーン動力の送信は一方向に限定 +Delays signal=信号の遅延 +Output locks when getting active redstone repeater signal from the side=側面からアクティブなレッドストーンリピーターの信号を受けると、出力をロック diff --git a/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.ja.tr b/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.ja.tr new file mode 100644 index 0000000000..d3224f5810 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_lightstone/locale/mesecons_lightstone.ja.tr @@ -0,0 +1,4 @@ +# textdomain: mesecons_lightstone +Redstone Lamp=レッドストーンランプ +Redstone lamps are simple redstone components which glow brightly (light level @1) when they receive redstone power.=レッドストーンランプは、レッドストーン動力によって明るく灯る(明るさ @1)シンプルなレッドストーン部品です。 +Glows when powered by redstone power=レッドストーン動力が来ると点灯 diff --git a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua index a27904e483..b2ff0916ed 100644 --- a/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_mvps/init.lua @@ -364,7 +364,7 @@ function mesecon.mvps_move_objects(pos, dir, nodestack) for _, r in ipairs(mesecon.rules.alldirs) do local adjpos = vector.add(np, r) local adjnode = minetest.get_node(adjpos) - if minetest.registered_nodes[adjnode.name] and minetest.registered_nodes[adjnode.name].mvps_sticky then + if minetest.registered_nodes[adjnode.name] and minetest.registered_nodes[adjnode.name].mvps_sticky and adjnode.name == "mcl_core:slimeblock" then local np = vector.add(obj:get_pos(), dir) -- Reset acceleration of all objects before launching. diff --git a/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/mesecons_noteblock.ja.tr b/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/mesecons_noteblock.ja.tr new file mode 100644 index 0000000000..0591b6b923 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_noteblock/locale/mesecons_noteblock.ja.tr @@ -0,0 +1,22 @@ +# textdomain: mesecons_noteblock +Note Block=音符ブロック +A note block is a musical block which plays one of many musical notes and different intruments when it is punched or supplied with redstone power.=音符ブロックは、パンチしたりレッドストーン動力を供給することで、多くの音符やさまざまな楽器のうちの1つを演奏する音楽ブロックです。 +Use the note block to choose the next musical note (there are 25 semitones, or 2 octaves). The intrument played depends on the material of the block below the note block:=音符ブロックを使って、次の音符を選択(25半音、つまり2オクターブ分あり)。演奏される楽器は、音符ブロックの下にあるブロックの素材に依存: +• Glass: Sticks=ガラス:スティック +• Wood: Bass guitar=木:ベースギター +• Stone: Bass drum=石:バスドラム +• Sand or gravel: Snare drum=砂・砂利:スネアドラム +• Anything else: Piano=その他:ピアノ +• Block of Gold: Bell=金ブロック:ベル +• Clay: Flute=粘土:フルート +• Packed Ice: Chime=氷塊:チャイム +• Wool: Guitar=羊毛:ギター +• Bone Block: Xylophne=骨ブロック:木琴 +• Block of Iron: Iron xylophne=鉄ブロック:鉄琴 +• Soul Sand: Cow bell=ソウルサンド:カウベル +• Pumpkin: Didgeridoo=カボチャ:ディジュリドゥ +• Block of Emerald: Square wave=エメラルドブロック:矩形波 +• Hay Bale: Banjo=干し草の俵:バンジョー +• Glowstone: Electric piano=グローストーン:電子ピアノ +The note block will only play a note when it is below air, otherwise, it stays silent.=音符ブロックは、空気の下でのみ音を鳴らし、それ以外では無音のままです。 +Plays a musical note when powered by redstone power=レッドストーン動力が来ると音符を演奏 diff --git a/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.ja.tr b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.ja.tr new file mode 100644 index 0000000000..949de6805b --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_pistons/locale/mesecons_pistons.ja.tr @@ -0,0 +1,8 @@ +# textdomain: mesecons_pistons +This block can have one of 6 possible orientations.=このブロックは6つの可能な方向からひとつ選べます。 +Piston=ピストン +A piston is a redstone component with a pusher which pushes the block or blocks in front of it when it is supplied with redstone power. Not all blocks can be pushed, however.=ピストンとは、押出機を備えたレッドストーン部品のことで、レッドストーン動力が供給されると、その前方の1つないしは複数のブロックを押します。ただし、すべてのブロックが押せるわけではありません。 +Sticky Piston=粘着ピストン +A sticky piston is a redstone component with a sticky pusher which can be extended and retracted. It extends when it is supplied with redstone power. When the pusher extends, it pushes the block or blocks in front of it. When it retracts, it pulls back the single block in front of it. Note that not all blocks can be pushed or pulled.=粘着ピストンは、粘着付押出機が伸縮できるレッドストーン部品です。レッドストーン動力が供給されると伸びます。押出機が伸びると、その前方の1つないしは複数のブロックを押します。押出機が縮むと、手前にある1つのブロックを引き戻します。なお、すべてのブロックが伸縮できるわけではありません。 +Pushes block when powered by redstone power=レッドストーン動力が来るとブロックを押す +Pushes or pulls block when powered by redstone power=レッドストーン動力が来るとブロックを押すか引く diff --git a/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua b/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua index 495fbd0484..9248e693e6 100644 --- a/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua +++ b/mods/ITEMS/REDSTONE/mesecons_pressureplates/init.lua @@ -12,6 +12,16 @@ local pp_box_on = { fixed = { -7/16, -8/16, -7/16, 7/16, -7.5/16, 7/16 }, } +local function pp_on_rightclick(pos, node) + local basename = minetest.registered_nodes[node.name].pressureplate_basename + if node.name == basename .. "_off" then + minetest.set_node(pos, { name = basename .. "_on" }) + mesecon.receptor_on(pos, mesecon.rules.pplate) + else + minetest.get_meta(pos):set_string("deact_time", "") + end +end + local function pp_on_timer(pos, elapsed) local node = minetest.get_node(pos) local basename = minetest.registered_nodes[node.name].pressureplate_basename @@ -37,34 +47,80 @@ local function pp_on_timer(pos, elapsed) end end - local objs = minetest.get_objects_inside_radius(pos, 1) + local function obj_touching_plate_pos(obj_ref, plate_pos) + local obj_pos = obj_ref:get_pos() + local props = obj_ref:get_properties() + local parent = obj_ref:get_attach() + if props and obj_pos and not parent then + local collisionbox = props.collisionbox + local physical = props.physical + local is_player = obj_ref:is_player() + local luaentity = obj_ref:get_luaentity() + local is_item = luaentity and luaentity.name == "__builtin:item" + if collisionbox and physical or is_player or is_item then + local plate_x_min = plate_pos.x - 7 / 16 + local plate_x_max = plate_pos.x + 7 / 16 + local plate_z_min = plate_pos.z - 7 / 16 + local plate_z_max = plate_pos.z + 7 / 16 + local plate_y_max = plate_pos.y - 7 / 16 - if node.name == basename .. "_on" then - local disable - if #objs == 0 then - disable = true - elseif not activated_by.any then - disable = true - for k, obj in pairs(objs) do - if obj_does_activate(obj, activated_by) then - disable = false - break + local obj_x_min = obj_pos.x + collisionbox[1] + local obj_x_max = obj_pos.x + collisionbox[4] + local obj_z_min = obj_pos.z + collisionbox[3] + local obj_z_max = obj_pos.z + collisionbox[6] + local obj_y_min = obj_pos.y + collisionbox[2] + + if + obj_y_min <= plate_y_max and + not (obj_x_min >= plate_x_max) and + not (obj_x_max <= plate_x_min) and + not (obj_z_min >= plate_z_max) and + not (obj_z_max <= plate_z_min) + then + return true end end end + return false + end + + local objs = minetest.get_objects_inside_radius(pos, 1) + + if node.name == basename .. "_on" then + local disable = true + for k, obj in pairs(objs) do + if + obj_does_activate(obj, activated_by) and + obj_touching_plate_pos(obj, pos) + then + disable = false + minetest.get_meta(pos):set_string("deact_time", "") + break + end + end if disable then - minetest.set_node(pos, {name = basename .. "_off"}) - mesecon.receptor_off(pos, mesecon.rules.pplate) + local meta = minetest.get_meta(pos) + local deact_time = meta:get_float("deact_time") + local current_time = minetest.get_us_time() + if deact_time == 0 then + deact_time = current_time + 1 * 1000 * 1000 + meta:set_float("deact_time", deact_time) + end + if deact_time <= current_time then + minetest.set_node(pos, { name = basename .. "_off" }) + mesecon.receptor_off(pos, mesecon.rules.pplate) + meta:set_string("deact_time", "") + end end elseif node.name == basename .. "_off" then for k, obj in pairs(objs) do - local objpos = obj:get_pos() - if obj_does_activate(obj, activated_by) then - if objpos.y > pos.y-1 and objpos.y < pos.y then - minetest.set_node(pos, {name = basename .. "_on"}) - mesecon.receptor_on(pos, mesecon.rules.pplate) - break - end + if + obj_does_activate(obj, activated_by) and + obj_touching_plate_pos(obj, pos) + then + minetest.set_node(pos, { name = basename .. "_on" }) + mesecon.receptor_on(pos, mesecon.rules.pplate) + break end end end @@ -118,6 +174,7 @@ function mesecon.register_pressure_plate(basename, description, textures_off, te walkable = false, description = description, on_timer = pp_on_timer, + on_rightclick = pp_on_rightclick, on_construct = function(pos) minetest.get_node_timer(pos):start(PRESSURE_PLATE_INTERVAL) end, @@ -164,6 +221,10 @@ local woods = { { "darkwood", "mcl_core:darkwood", "mcl_core_planks_big_oak.png", S("Dark Oak Pressure Plate" )}, { "sprucewood", "mcl_core:sprucewood", "mcl_core_planks_spruce.png", S("Spruce Pressure Plate") }, { "junglewood", "mcl_core:junglewood", "default_junglewood.png", S("Jungle Pressure Plate") }, + + { "mangrove_wood", "mcl_mangrove:mangrove_wood", "mcl_mangrove_planks.png", S("Mangrove Pressure Plate") }, + { "crimson_hyphae_wood", "mcl_crimson:crimson_hyphae_wood", "crimson_hyphae_wood.png", S("Crimson Pressure Plate") }, + { "warped_hyphae_wood", "mcl_crimson:warped_hyphae_wood", "warped_hyphae_wood.png", S("Warped Pressure Plate") }, } for w=1, #woods do diff --git a/mods/ITEMS/REDSTONE/mesecons_pressureplates/locale/mesecons_pressureplates.ja.tr b/mods/ITEMS/REDSTONE/mesecons_pressureplates/locale/mesecons_pressureplates.ja.tr new file mode 100644 index 0000000000..f1e926e31e --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_pressureplates/locale/mesecons_pressureplates.ja.tr @@ -0,0 +1,16 @@ +# textdomain: mesecons_pressureplates +A pressure plate is a redstone component which supplies its surrounding blocks with redstone power while someone or something rests on top of it.=感圧板はレッドストーン部品で、誰かや何かがその上に乗っている間、周囲のブロックにレッドストーン動力を供給します。 +Oak Pressure Plate=オークの感圧板 +Acacia Pressure Plate=アカシアの感圧板 +Birch Pressure Plate=シラカバの感圧板 +Dark Oak Pressure Plate=ダークオークの感圧板 +Spruce Pressure Plate=トウヒの感圧板 +Jungle Pressure Plate=ジャングルの感圧板 +A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.=木製の感圧板はレッドストーン部品で、ドロップアイテムやプレイヤー、モブを含む移動可能なオブジェクトがその上に乗っている間、周囲のブロックにレッドストーン動力を供給します。 +Stone Pressure Plate=石の感圧板 +A stone pressure plate is a redstone component which supplies its surrounding blocks with redstone power while a player or mob stands on top of it. It is not triggered by anything else.=石の感圧板はレッドストーン部品で、プレイヤーやモブがその上に立っている間、周囲のブロックにレッドストーン動力を供給します。他の何かがトリガーになることはありません。 +Provides redstone power when pushed=押すとレッドストーン動力を供給 +Pushable by players, mobs and objects=押せるのはプレイヤー、モブ、オブジェクト +Pushable by players and mobs=押せるのはプレイヤーかモブ +Pushable by players=押せるのはプレイヤー +Pushable by mobs=押せるのはモブ diff --git a/mods/ITEMS/REDSTONE/mesecons_solarpanel/locale/mesecons_solarpanel.ja.tr b/mods/ITEMS/REDSTONE/mesecons_solarpanel/locale/mesecons_solarpanel.ja.tr new file mode 100644 index 0000000000..5ba7a13ecb --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_solarpanel/locale/mesecons_solarpanel.ja.tr @@ -0,0 +1,8 @@ +# textdomain: mesecons_solarpanel +Daylight Sensor=日照センサー +Daylight sensors are redstone components which provide redstone power when they are in sunlight and no power otherwise. They can also be inverted.=日照センサーはレッドストーン機器で、日光の下にいるときにレッドストーン動力を供給し、それ以外のときは出力しません。また、反転させることもできます。 +Use the daylight sensor to toggle its state.=日照センサーを使用して、その状態を切り替えます。 +Inverted Daylight Sensor=反転した日照センサー +In inverted state, they provide redstone power when they are not in sunlight and no power otherwise.=反転状態では、日光が当たっていないときにレッドストーン動力を供給し、それ以外のときは出力しません。 +Provides redstone power when in sunlight=日光の下でレッドストーン動力を供給 +Can be inverted=反転可能 diff --git a/mods/ITEMS/REDSTONE/mesecons_torch/locale/mesecons_torch.ja.tr b/mods/ITEMS/REDSTONE/mesecons_torch/locale/mesecons_torch.ja.tr new file mode 100644 index 0000000000..05bfa2574f --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_torch/locale/mesecons_torch.ja.tr @@ -0,0 +1,10 @@ +# textdomain: mesecons_torch +Redstone Torch=レッドストーントーチ +Redstone Torch (off)=レッドストーントーチ(オフ) +Redstone Torch (overheated)=レッドストーントーチ(熱過多状態) +A redstone torch is a redstone component which can be used to invert a redstone signal. It supplies its surrounding blocks with redstone power, except for the block it is attached to. A redstone torch is normally lit, but it can also be turned off by powering the block it is attached to. While unlit, a redstone torch does not power anything.=レッドストーントーチはレッドストーン部品で、レッドストーン信号を反転させるのに使えます。それは、それが取り付けられているブロックを除いて、その周囲のブロックにレッドストーン動力を供給します。レッドストーントーチは通常点灯していますが、接続されているブロックに動力を供給することで消灯も可能です。消灯中のレッドストーントーチは、何の動力源にもなりません。 +Redstone torches can be placed at the side and on the top of full solid opaque blocks.=レッドストーントーチは、全固体の不透明ブロックの側面と上部に配置できます。 +Block of Redstone= +A block of redstone permanently supplies redstone power to its surrounding blocks.=レッドストーンブロックは、その周囲のブロックに、レッドストーン動力を永続的に供給します。 +Provides redstone power when it's not powered itself=自身が動力を得ていない時にレッドストーン動力を提供 +Provides redstone power=レッドストーン動力を提供 diff --git a/mods/ITEMS/REDSTONE/mesecons_walllever/locale/mesecons_walllever.ja.tr b/mods/ITEMS/REDSTONE/mesecons_walllever/locale/mesecons_walllever.ja.tr new file mode 100644 index 0000000000..d751d9d154 --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_walllever/locale/mesecons_walllever.ja.tr @@ -0,0 +1,5 @@ +# textdomain: mesecons_walllever +Lever=レバー +A lever is a redstone component which can be flipped on and off. It supplies redstone power to adjacent blocks while it is in the “on” state.=レバーは、オンとオフを切り替えられるレッドストーン部品です。「オン」の状態の間は、隣接するブロックにレッドストーン動力を供給します。 +Use the lever to flip it on or off.=レバーでON/OFFを切り替えます。 +Provides redstone power while it's turned on=電源オン時にレッドストーン動力を提供 diff --git a/mods/ITEMS/REDSTONE/mesecons_wires/locale/mesecons_wires.ja.tr b/mods/ITEMS/REDSTONE/mesecons_wires/locale/mesecons_wires.ja.tr new file mode 100644 index 0000000000..33da44f9ca --- /dev/null +++ b/mods/ITEMS/REDSTONE/mesecons_wires/locale/mesecons_wires.ja.tr @@ -0,0 +1,11 @@ +# textdomain: mesecons_wires +Redstone is a versatile conductive mineral which transmits redstone power. It can be placed on the ground as a trail.=レッドストーンは、レッドストーン動力を伝達する多用途の導電性鉱物です。地面に導線を敷設できます。 +A redstone trail can be in two states: Powered or not powered. A powered redstone trail will power (and thus activate) adjacent redstone components.=レッドストーン導線は、稼動と非稼動の2つの状態がとれます。稼動中のレッドストーン導線は、隣接するレッドストーン部品に動力を与えます(つまり作動します)。 +Redstone power can be received from various redstone components, such as a block of redstone or a button. Redstone power is used to activate numerous mechanisms, such as redstone lamps or pistons.=レッドストーン動力は、レッドストーンのブロックやボタンなど、さまざまなレッドストーン部品から受け取れます。レッドストーン動力は、レッドストーンランプやピストンなど、数々なメカニズムを作動させるために使われます。 +Place redstone on the ground to build a redstone trail. The trails will connect to each other automatically and it can also go over hills. An easy way to power a redstone trail is by placing a redstone torch.=レッドストーンを地面に置くと、レッドストーン導線ができます。導線は自動的に相互接続され、丘を越えることもできます。レッドストーン導線に動力を伝える簡単な方法は、レッドストーントーチを置くことです。 +Read the help entries on the other redstone components to learn how redstone components interact.=レッドストーン部品がどのように相互作用するかについては、他のレッドストーン部品のヘルプエントリーをお読みください。 +Redstone=レッドストーン +Powered Redstone Spot (@1)=稼動中のレッドストーンスポット (@1) +Redstone Trail (@1)=レッドストーン導線 (@1) +Powered Redstone Trail (@1)=稼動中のレッドストーン導線 (@1) +Transmits redstone power, powers mechanisms=レッドストーン動力の伝達、メカニズム類の起動 diff --git a/mods/ITEMS/mcl_amethyst/locale/mcl_amethyst.ja.tr b/mods/ITEMS/mcl_amethyst/locale/mcl_amethyst.ja.tr new file mode 100644 index 0000000000..4535580e90 --- /dev/null +++ b/mods/ITEMS/mcl_amethyst/locale/mcl_amethyst.ja.tr @@ -0,0 +1,19 @@ +# textdomain: mcl_amethyst +Amethyst Cluster=アメジストの集塊 +Amethyst Cluster is the final growth of amethyst bud.=アメジストの集塊は、アメジストの芽の成長最終段階です。 +Amethyst Shard=アメジストの欠片 +An amethyst shard is a crystalline mineral.=アメジストの欠片は、結晶性の鉱物です。 +Block of Amethyst=アメジストブロック +Budding Amethyst=芽生えたアメジスト +Calcite=方解石 +Calcite can be found as part of amethyst geodes.=方解石は、アメジストジオードの一部として見つけることができます。 +Large Amethyst Bud=大きなアメジストの芽 +Large Amethyst Bud is the third growth of amethyst bud.=大きなアメジストの芽は、アメジストの芽の成長三段階目です。 +Medium Amethyst Bud=中くらいのアメジストの芽 +Medium Amethyst Bud is the second growth of amethyst bud.=中くらいのアメジストの芽は、アメジストの芽の成長二段階目です。 +Small Amethyst Bud=小さなアメジストの芽 +Small Amethyst Bud is the first growth of amethyst bud.=小さなアメジストの芽は、アメジストの芽の成長一段階目です。 +The Block of Amethyst is a decoration block crafted from amethyst shards.=アメジストブロックは、アメジストの欠片を加工した装飾ブロックです。 +The Budding Amethyst can grow amethyst=芽生えたアメジストは、アメジストを育成可能 +Tinted Glass=遮光ガラス +Tinted Glass is a type of glass which blocks lights while it is visually transparent.=遮光ガラスは、視覚的には透明でありながら光を遮断するタイプのガラスです。 diff --git a/mods/ITEMS/mcl_anvils/locale/mcl_anvils.ja.tr b/mods/ITEMS/mcl_anvils/locale/mcl_anvils.ja.tr new file mode 100644 index 0000000000..881ea5460b --- /dev/null +++ b/mods/ITEMS/mcl_anvils/locale/mcl_anvils.ja.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_anvils +Set Name=名称を設定 +Repair and Name=修理・銘 +Inventory=インベントリ +Anvil=金床 +The anvil allows you to repair tools and armor, and to give names to items. It has a limited durability, however. Don't let it fall on your head, it could be quite painful!=金床は、道具や防具を修理したり、アイテムに名前を付けたりできます。ただし耐久性には限度があります。頭に落ちると痛すぎるので注意しましょう! +To use an anvil, rightclick it. An anvil has 2 input slots (on the left) and one output slot.=金床を使用するには、右クリックです。金床には、2つの入力スロット(左側)と1つの出力スロットがあります。 +To rename items, put an item stack in one of the item slots while keeping the other input slot empty. Type in a name, hit enter or “Set Name”, then take the renamed item from the output slot.=アイテムを改名するには、入力スロットの片方にアイテムを入れ、もう一方は空のままにしておきます。名前を入力し、エンターキーか「名称を設定」を押したら、出力スロットから改名したアイテムを取り出します。 +There are two possibilities to repair tools (and armor):=道具(と防具)の修理方法には、可能性が次の2通りある: +• Tool + Tool: Place two tools of the same type in the input slots. The “health” of the repaired tool is the sum of the “health” of both input tools, plus a 12% bonus.=・ 道具 + 道具:同種の道具を2つ、入力スロットに置きます。修理された道具の「耐久度」は、入力した両方の道具の「耐久度」合計に、ボーナスで12%を加算させたものになります。 +• Tool + Material: Some tools can also be repaired by combining them with an item that it's made of. For example, iron pickaxes can be repaired with iron ingots. This repairs the tool by 25%.=・ 道具 + 素材:道具の中には、その素材となっているアイテムと組み合わせることで修理できるものもあります。例えば、鉄のツルハシは鉄インゴットで修理可能です。この場合、道具は25%修復されます。 +Armor counts as a tool. It is possible to repair and rename a tool in a single step.=防具は、道具としてカウントされます。道具の修理と改名を一括して行えます。 +The anvil has limited durability and 3 damage levels: undamaged, slightly damaged and very damaged. Each time you repair or rename something, there is a 12% chance the anvil gets damaged. Anvils also have a chance of being damaged when they fall by more than 1 block. If a very damaged anvil is damaged again, it is destroyed.=金床は耐久性に限度があります(3段階の損傷レベル:無傷、やや損傷、かなり損傷)。何かを修理したり改名するたび、確率12%で金床が傷みます。また、金床は1ブロック以上落下した時にも傷む可能性があります。かなり損傷した金床に更なる傷が入った場合、壊れます。 +Slightly Damaged Anvil=やや損傷した金床 +Very Damaged Anvil=かなり損傷した金床 +Repair and rename items=アイテムの修理と改名 diff --git a/mods/ITEMS/mcl_armor/locale/mcl_armor.ja.tr b/mods/ITEMS/mcl_armor/locale/mcl_armor.ja.tr new file mode 100644 index 0000000000..fc1f0f02b2 --- /dev/null +++ b/mods/ITEMS/mcl_armor/locale/mcl_armor.ja.tr @@ -0,0 +1,48 @@ +# textdomain: mcl_armor +This is a piece of equippable armor which reduces the amount of damage you receive.=被ダメージを軽減する、装備可能な防具です。 +To equip it, put it on the corresponding armor slot in your inventory menu.=装備するには、インベントリメニュー中の対応する防具スロットに置いてください。 +Leather Cap=革のキャップ +Iron Helmet=鉄のヘルメット +Golden Helmet=金のヘルメット +Diamond Helmet=ダイヤモンドのヘルメット +Chain Helmet=鎖のヘルメット +Netherite Helmet=ネザライトのヘルメット +Leather Tunic=革のチュニック +Iron Chestplate=鉄のチェストプレート +Golden Chestplate=金のチェストプレート +Diamond Chestplate=ダイヤモンドのチェストプレート +Chain Chestplate=鎖のチェストプレート +Netherite Chestplate=ネザライトのチェストプレート +Leather Pants=革のズボン +Iron Leggings=鉄のレギンス +Golden Leggings=金のレギンス +Diamond Leggings=ダイヤモンドのレギンス +Chain Leggings=鎖のレギンス +Netherite Leggings=ネザライトのレギンス +Leather Boots=革のブーツ +Iron Boots=鉄のブーツ +Golden Boots=金のブーツ +Diamond Boots=ダイヤモンドのブーツ +Chain Boots=鎖のブーツ +Netherite Boots=ネザライトのブーツ +Elytra=エリトラ + +#Translations of enchantements +Increases underwater mining speed.=水中でも採掘速度が低下しません。 +Blast Protection=爆風耐性 +Reduces explosion damage and knockback.=爆発ダメージとノックバックを軽減します。 +Curse of Binding=束縛の呪い +Item cannot be removed from armor slots except due to death, breaking or in Creative Mode.=次の場合を除き、防具スロットからアイテムを外せません;アイテムが破損/自身が死亡/クリエイティブモード中 +Feather Falling=落下耐性 +Reduces fall damage.=落下ダメージを軽減します。 +Fire Protection=炎上耐性 +Reduces fire damage.=火炎ダメージを軽減します(溶岩は対象外)。 +Shooting consumes no regular arrows.=普通の矢なら放っても消費しません。 +Shoot 3 arrows at the cost of one.=1本分のコストで3本の矢を放ちます。 +Projectile Protection=飛来物耐性 +Reduces projectile damage.=飛来物ダメージを軽減します。 +Protection=外傷耐性 +Reduces most types of damage by 4% for each level.=体の外からのダメージ全般を軽減します(レベル毎に+4%)。 +Thorns=イバラ +Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=受けたダメージの一部を与え返せますが、その代わり耐久度が余計に削られます。 +Aqua Affinity=水中採掘 \ No newline at end of file diff --git a/mods/ITEMS/mcl_armor_stand/locale/mcl_armor_stand.ja.tr b/mods/ITEMS/mcl_armor_stand/locale/mcl_armor_stand.ja.tr new file mode 100644 index 0000000000..4f2892d2ce --- /dev/null +++ b/mods/ITEMS/mcl_armor_stand/locale/mcl_armor_stand.ja.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_armor_stand +Armor Stand=アーマースタンド +An armor stand is a decorative object which can display different pieces of armor. Anything which players can wear as armor can also be put on an armor stand.=アーマースタンドは、様々な防具類を展示できる装飾品です。プレイヤーが防具として身につけられるものであれば、何でも置けます。 +Just place an armor item on the armor stand. To take the top piece of armor from the armor stand, select your hand and use the place key on the armor stand.=アーマースタンドに防具アイテムを置くだけです。アーマースタンドから一番上の防具を取るには、素手になって配置キーです。 +Displays pieces of armor=防具を個々に展示 diff --git a/mods/ITEMS/mcl_bamboo/README.md b/mods/ITEMS/mcl_bamboo/README.md new file mode 100644 index 0000000000..e330cf2029 --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/README.md @@ -0,0 +1,19 @@ +mcl_bamboo +========= + +This mod adds simple bamboo nodes to your Mineclone 2 world. + +Code redo for Mineclone 2: Michieal. Original bamboo code by: Krock. + +License for code: GPL3; images / textures: CC-BY-SA. +Images Created by Michieal, except for: +Inventory / wield image: created by RandomLegoBrick#8692 and is CC0. + +Dependencies: mcl_core, mcl_sounds, mcl_tools + +Optional Dependencies = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button + +Special thanks to Nicu for help with the nodebox stalk design. + +Original code's forum topic: +Forum topic: https://forum.minetest.net/viewtopic.php?id=8289 \ No newline at end of file diff --git a/mods/ITEMS/mcl_bamboo/init.lua b/mods/ITEMS/mcl_bamboo/init.lua new file mode 100644 index 0000000000..3c7cb58a73 --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/init.lua @@ -0,0 +1,841 @@ +-- [bamboo] mod by Krock, modified by SmallJoker, Made for MineClone 2 by Michieal (as mcl_bamboo). +-- Parts of mcl_scaffolding were used. Mcl_scaffolding originally created by Cora; modified for mcl_bamboo by Michieal. +-- Creation date: 12-01-2022 (Dec 1st, 2022) +-- License for everything: GPL3 +-- Bamboo max height: 12-16 + +-- LOCALS +local modname = minetest.get_current_modname() +local S = minetest.get_translator(modname) +local bamboo = "mcl_bamboo:bamboo" +local adj_nodes = { + vector.new(0, 0, 1), + vector.new(0, 0, -1), + vector.new(1, 0, 0), + vector.new(-1, 0, 0), +} +local node_sound = mcl_sounds.node_sound_wood_defaults() + +-- CONSTS +local SIDE_SCAFFOLDING = false +local MAKE_STAIRS = true +local DEBUG = false +local USE_END_CAPS = false + +-- Due to door fix #2736, doors are displayed backwards. When this is fixed, set this variable to false. +local BROKEN_DOORS = true + +-- LOCAL FUNCTIONS + +-- Add Groups function, courtesy of Warr1024. +function addgroups(name, ...) + local def = minetest.registered_items[name] or error(name .. " not found") + local groups = {} + for k, v in pairs(def.groups) do + groups[k] = v + end + local function addall(x, ...) + if not x then + return + end + groups[x] = 1 + return addall(...) + end + addall(...) + return minetest.override_item(name, {groups = groups}) +end + +local function create_nodes() + + local bamboo_def = { + description = "Bamboo", + tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo.png"}, + drawtype = "nodebox", + paramtype = "light", + groups = {handy = 1, axey = 1, choppy = 1, flammable = 3}, + sounds = node_sound, + drops = "mcl_bamboo:bamboo", + inventory_image = "mcl_bamboo_bamboo_shoot.png", + wield_image = "mcl_bamboo_bamboo_shoot.png", + _mcl_blast_resistance = 1, + _mcl_hardness = 2, + node_box = { + type = "fixed", + fixed = { + -- {0.1875, -0.5, -0.125, 0.4125, 0.5, 0.0625}, + -- {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, + -- {-0.25, -0.5, -0.3125, 0, 0.5, -0.125}, + {-0.175, -0.5, -0.195, 0.05, 0.5, 0.030}, + } + }, + + --[[ + Node Box definitions for alternative styles. + {-0.05, -0.5, 0.285, -0.275, 0.5, 0.06}, + {0.25, -0.5, 0.325, 0.025, 0.5, 0.100}, + {-0.125, -0.5, 0.125, -0.3125, 0.5, 0.3125}, + --]] + + on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + local node = minetest.get_node(pointed_thing.under) + local pos = pointed_thing.under + if DEBUG then + minetest.log("mcl_bamboo::Node placement data:") + minetest.log(dump(pointed_thing)) + minetest.log(dump(node)) + end + + if DEBUG then + minetest.log("mcl_bamboo::Checking for protected placement of bamboo.") + end + local pname = placer:get_player_name() + if minetest.is_protected(pos, pname) then + minetest.record_protection_violation(pos, pname) + return + end + if DEBUG then + minetest.log("mcl_bamboo::placement of bamboo is not protected.") + end + + -- Use pointed node's on_rightclick function first, if present + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then + if DEBUG then + minetest.log("mcl_bamboo::attempting placement of bamboo via targeted node's on_rightclick.") + end + return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack + end + end + + if node.name ~= "mcl_bamboo:bamboo" then + if node.name ~= "mcl_flowerpots:flower_pot" then + if minetest.get_item_group(node.name, "dirt") == 0 then + return itemstack + end + end + end + + if DEBUG then + minetest.log("mcl_bamboo::placing bamboo directly.") + end + return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + + end, + + on_destruct = function(pos) + -- Node destructor; called before removing node. + local new_pos = vector.offset(pos, 0, 1, 0) + local node_above = minetest.get_node(new_pos) + if node_above and node_above.name == "mcl_bamboo:bamboo" then + local sound_params = { + pos = new_pos, + gain = 1.0, -- default + max_hear_distance = 10, -- default, uses a Euclidean metric + } + + minetest.remove_node(new_pos) + minetest.sound_play(node_sound.dug, sound_params, true) + local istack = ItemStack("mcl_bamboo:bamboo") + minetest.add_item(new_pos, istack) + end + end, + } + minetest.register_node("mcl_bamboo:bamboo", bamboo_def) + local bamboo_top = table.copy(bamboo_def) + bamboo_top.groups = {not_in_creative_inventory = 1, handy = 1, axey = 1, choppy = 1, flammable = 3} + + bamboo_top.on_place = function(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + local node = minetest.get_node(pointed_thing.under) + local pos = pointed_thing.under + if DEBUG then + minetest.log("mcl_bamboo::Node placement data:") + minetest.log(dump(pointed_thing)) + minetest.log(dump(node)) + end + + if DEBUG then + minetest.log("mcl_bamboo::Checking for protected placement of bamboo.") + end + local pname = placer:get_player_name() + if pname then + if minetest.is_protected(pos, pname) then + minetest.record_protection_violation(pos, pname) + return + end + --not for player use. + if minetest.is_creative_enabled(pname) == false then + itemstack:set_count(0) + return itemstack + end + end + if DEBUG then + minetest.log("mcl_bamboo::placement of bamboo is not protected.") + end + + if node.name ~= "mcl_bamboo:bamboo" then + return itemstack + end + + if DEBUG then + minetest.log("mcl_bamboo::placing bamboo directly.") + end + return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + end, + + minetest.register_node("mcl_bamboo:bamboo_top", bamboo_top) + + local bamboo_block_def = { + description = "Bamboo Block", + tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_block.png"}, + groups = {handy = 1, building_block = 1, axey = 1, flammable = 2, material_wood = 1, bamboo_block = 1, fire_encouragement = 5, fire_flammability = 5}, + sounds = node_sound, + paramtype2 = "facedir", + drops = "mcl_bamboo:bamboo_block", + _mcl_blast_resistance = 3, + _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) + + local pos = pointed_thing.under + + local pname = placer:get_player_name() + if minetest.is_protected(pos, pname) then + minetest.record_protection_violation(pos, pname) + return + end + + -- Use pointed node's on_rightclick function first, if present + local node = minetest.get_node(pointed_thing.under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then + return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack + end + end + + return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under))) + end, + + } + + -- basic bamboo nodes. + minetest.register_node("mcl_bamboo:bamboo_block", bamboo_block_def) + local bamboo_stripped_block = table.copy(bamboo_block_def) + bamboo_stripped_block.on_rightclick = nil + bamboo_stripped_block.description = S("Stripped Bamboo Block") + bamboo_stripped_block.tiles = {"mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_bottom.png", "mcl_bamboo_bamboo_block_stripped.png"} + minetest.register_node("mcl_bamboo:bamboo_block_stripped", bamboo_stripped_block) + minetest.register_node("mcl_bamboo:bamboo_plank", { + description = S("Bamboo Plank"), + _doc_items_longdesc = S("Bamboo Plank"), + _doc_items_hidden = false, + tiles = {"mcl_bamboo_bamboo_plank.png"}, + stack_max = 64, + is_ground_content = false, + groups = {handy = 1, axey = 1, flammable = 3, wood = 1, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20}, + sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 3, + _mcl_hardness = 2, + }) + + -- specific bamboo nodes... + if minetest.get_modpath("mcl_flowerpots") then + if DEBUG then + minetest.log("mcl_bamboo::FlowerPot Section Entrance. Modpath exists.") + end + if mcl_flowerpots ~= nil then + -- Flower-potted Bamboo... + local flwr_name = "mcl_bamboo:bamboo" + local flwr_def = {name = "bamboo_plant", + desc = S("Bamboo"), + image = "mcl_bamboo_bamboo_fpm.png", -- use with "register_potted_cube" + -- "mcl_bamboo_flower_pot.png", -- use with "register_potted_flower" + } + + mcl_flowerpots.register_potted_cube(flwr_name, flwr_def) + -- mcl_flowerpots.register_potted_flower(flwr_name, flwr_def) + minetest.register_alias("bamboo_flower_pot", "mcl_flowerpots:flower_pot_bamboo_plant") + end + end + + if minetest.get_modpath("mcl_doors") then + if mcl_doors then + local top_door_tiles = {} + local bot_door_tiles = {} + + if BROKEN_DOORS then + top_door_tiles = {"mcl_bamboo_door_top_alt.png", "mcl_bamboo_door_top.png"} + bot_door_tiles = {"mcl_bamboo_door_bottom_alt.png", "mcl_bamboo_door_bottom.png"} + else + top_door_tiles = {"mcl_bamboo_door_top.png", "mcl_bamboo_door_top.png"} + bot_door_tiles = {"mcl_bamboo_door_bottom.png", "mcl_bamboo_door_bottom.png"} + end + + local name = "mcl_bamboo:bamboo_door" + local def = { + description = S("Bamboo Door."), + inventory_image = "mcl_bamboo_door_wield.png", + wield_image = "mcl_bamboo_door_wield.png", + groups = {handy = 1, axey = 1, material_wood = 1, flammable = -1}, + _mcl_hardness = 3, + _mcl_blast_resistance = 3, + tiles_bottom = bot_door_tiles, + tiles_top = top_door_tiles, + sounds = mcl_sounds.node_sound_wood_defaults(), + } + + --[[ Registers a door + -- name: The name of the door + -- def: a table with the folowing fields: + -- description + -- inventory_image + -- groups + -- tiles_bottom: the tiles of the bottom part of the door {front, side} + -- tiles_top: the tiles of the bottom part of the door {front, side} + -- If the following fields are not defined the default values are used + -- node_box_bottom + -- node_box_top + -- selection_box_bottom + -- selection_box_top + -- only_placer_can_open: if true only the player who placed the door can + -- open it + -- only_redstone_can_open: if true, the door can only be opened by redstone, + -- not by rightclicking it + --]] + + mcl_doors:register_door(name, def) + + name = "mcl_bamboo:bamboo_trapdoor" + local trap_def = { + description = S("Bamboo Trapdoor."), + inventory_image = "mcl_bamboo_door_complete.png", + groups = {}, + tile_front = "mcl_bamboo_trapdoor_top.png", + tile_side = "mcl_bamboo_trapdoor_side.png", + _doc_items_longdesc = S("Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. 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."), + _doc_items_usagehelp = S("To open or close the trapdoor, rightclick it or send a redstone signal to it."), + wield_image = "mcl_bamboo_trapdoor_wield.png", + inventory_image = "mcl_bamboo_trapdoor_wield.png", + groups = {handy = 1, axey = 1, mesecon_effector_on = 1, material_wood = 1, flammable = -1}, + _mcl_hardness = 3, + _mcl_blast_resistance = 3, + sounds = mcl_sounds.node_sound_wood_defaults(), + } + + mcl_doors:register_trapdoor(name, trap_def) + + minetest.register_alias("bamboo_door", "mcl_bamboo:bamboo_door") + minetest.register_alias("bamboo_trapdoor", "mcl_bamboo:bamboo_trapdoor") + end + end + + if MAKE_STAIRS then + if minetest.get_modpath("mcl_stairs") then + if mcl_stairs ~= nil then + mcl_stairs.register_stair_and_slab_simple( + "bamboo_block", + "mcl_bamboo:bamboo_block", + S("Bamboo Stair"), + S("Bamboo Slab"), + S("Double Bamboo Slab") + ) + mcl_stairs.register_stair_and_slab_simple( + "bamboo_stripped", + "mcl_bamboo:bamboo_block_stripped", + S("Stripped Bamboo Stair"), + S("Stripped Bamboo Slab"), + S("Double Stripped Bamboo Slab") + ) + mcl_stairs.register_stair_and_slab_simple( + "bamboo_plank", + "mcl_bamboo:bamboo_plank", + S("Bamboo Plank Stair"), + S("Bamboo Plank Slab"), + S("Double Bamboo Plank Slab") + ) + + -- let's add plank slabs to the wood_slab group. + local bamboo_plank_slab = "mcl_stairs:slab_bamboo_plank" + local node_groups = { + wood_slab = 1, + building_block = 1, + slab = 1, + axey = 1, + handy = 1, + stair = 1, + flammable = 1, + fire_encouragement = 5, + fire_flammability = 20 + } + + minetest.override_item(bamboo_plank_slab, {groups = node_groups}) + end + end + end + + if minetest.get_modpath("mesecons_pressureplates") then + + if mesecon ~= nil and mesecon.register_pressure_plate ~= nil then + -- make sure that pressure plates are installed. + + -- Bamboo Pressure Plate... + + -- Register a Pressure Plate (api command doc.) + -- basename: base name of the pressure plate + -- description: description displayed in the player's inventory + -- textures_off:textures of the pressure plate when inactive + -- textures_on: textures of the pressure plate when active + -- image_w: wield image of the pressure plate + -- image_i: inventory image of the pressure plate + -- recipe: crafting recipe of the pressure plate + -- sounds: sound table (like in minetest.register_node) + -- plusgroups: group memberships (attached_node=1 and not_in_creative_inventory=1 are already used) + -- activated_by: optimal table with elements denoting by which entities this pressure plate is triggered + -- Possible table fields: + -- * player=true: Player + -- * mob=true: Mob + -- By default, is triggered by all entities + -- longdesc: Customized long description for the in-game help (if omitted, a dummy text is used) + + mesecon.register_pressure_plate( + "mcl_bamboo:pressure_plate_bamboo_wood", + S("Bamboo Pressure Plate"), + {"mcl_bamboo_bamboo_plank.png"}, + {"mcl_bamboo_bamboo_plank.png"}, + "mcl_bamboo_bamboo_plank.png", + nil, + {{"mcl_bamboo:bamboo_plank", "mcl_bamboo:bamboo_plank"}}, + mcl_sounds.node_sound_wood_defaults(), + {axey = 1, material_wood = 1}, + nil, + S("A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.")) + + minetest.register_craft({ + type = "fuel", + recipe = "mcl_bamboo:pressure_plate_bamboo_wood_off", + burntime = 15 + }) + minetest.register_alias("bamboo_pressure_plate", "mcl_bamboo:pressure_plate_bamboo_wood") + + end + end + + if minetest.get_modpath("mcl_signs") then + if DEBUG then + minetest.log("mcl_bamboo::Signs Section Entrance. Modpath exists.") + end + if mcl_signs ~= nil then + -- Bamboo Signs... + mcl_signs.register_sign_custom("mcl_bamboo", "_bamboo", "mcl_signs_sign_greyscale.png", + "#f6dc91", "default_sign_greyscale.png", "default_sign_greyscale.png", + "Bamboo Sign") + mcl_signs.register_sign_craft("mcl_bamboo", "mcl_bamboo:bamboo_plank", "_bamboo") + minetest.register_alias("bamboo_sign", "mcl_signs:wall_sign_bamboo") + end + end + + if minetest.get_modpath("mcl_fences") then + if DEBUG then + minetest.log("mcl_bamboo::Fences Section Entrance. Modpath exists.") + end + local id = "bamboo_fence" + local id_gate = "bamboo_fence_gate" + 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, + 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. + + if DEBUG then + minetest.log(dump(fence_id)) + minetest.log(dump(gate_id)) + end + + local craft_wood = "mcl_bamboo:bamboo_plank" + minetest.register_craft({ + output = "mcl_bamboo:" .. id .. " 3", + recipe = { + {craft_wood, "mcl_core:stick", craft_wood}, + {craft_wood, "mcl_core:stick", craft_wood}, + } + }) + minetest.register_craft({ + output = "mcl_bamboo:" .. id_gate, + recipe = { + {"mcl_core:stick", craft_wood, "mcl_core:stick"}, + {"mcl_core:stick", craft_wood, "mcl_core:stick"}, + } + }) + -- 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_alias("bamboo_fence", "mcl_fences:" .. id) + minetest.register_alias("bamboo_fence_gate", "mcl_fences:" .. id_gate) + end + + if minetest.get_modpath("mesecons_button") then + if mesecon ~= nil then + mesecon.register_button( + "bamboo", + S("Bamboo Button"), + "mcl_bamboo_bamboo_plank.png", + "mcl_bamboo:bamboo_plank", + node_sound, + {material_wood = 1, handy = 1, pickaxey = 1, flammable = 3, fire_flammability = 20, fire_encouragement = 5, }, + 1, + false, + S("A bamboo button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second."), + "mesecons_button_push") + end + end + + minetest.register_node("mcl_bamboo:scaffolding", { + description = S("Scaffolding"), + doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), + doc_items_hidden = false, + tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, + drawtype = "nodebox", + paramtype = "light", + use_texture_alpha = "clip", + node_box = { + type = "fixed", + fixed = { + {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, + {0.375, -0.5, -0.5, 0.5, 0.5, -0.375}, + {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, + {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + }, + buildable_to = false, + is_ground_content = false, + walkable = false, + climbable = true, + physical = true, + node_placement_prediction = "", + groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, falling_node = 1, stack_falling = 1}, + sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 0, + _mcl_hardness = 0, + on_place = function(itemstack, placer, ptd) + if SIDE_SCAFFOLDING then + -- count param2 up when placing to the sides. Fall when > 6 + local ctrl = placer:get_player_control() + if ctrl and ctrl.sneak then + local pp2 = minetest.get_node(ptd.under).param2 + local np2 = pp2 + 1 + if minetest.get_node(vector.offset(ptd.above, 0, -1, 0)).name == "air" then + minetest.set_node(ptd.above, {name = "mcl_bamboo:scaffolding_horizontal", param2 = np2}) + itemstack:take_item(1) + end + if np2 > 6 then + minetest.check_single_for_falling(ptd.above) + end + return itemstack + end + end + + --place on solid nodes + local node = minetest.get_node(ptd.under) + if itemstack:get_name() ~= node.name then + minetest.set_node(ptd.above, {name = "mcl_bamboo:scaffolding", param2 = 0}) + itemstack:take_item(1) + return itemstack + end + + --build up when placing on existing scaffold + local h = 0 + local pos = ptd.under + repeat + pos.y = pos.y + 1 + h = h + 1 + local cn = minetest.get_node(pos) + if cn.name == "air" then + minetest.set_node(pos, node) + itemstack:take_item(1) + placer:set_wielded_item(itemstack) + return itemstack + end + until cn.name ~= node.name or h >= 32 + end, + on_destruct = function(pos) + -- Node destructor; called before removing node. + local new_pos = vector.offset(pos, 0, 1, 0) + local node_above = minetest.get_node(new_pos) + if node_above and node_above.name == "mcl_bamboo:scaffolding" then + local sound_params = { + pos = new_pos, + gain = 1.0, -- default + max_hear_distance = 10, -- default, uses a Euclidean metric + } + + minetest.remove_node(new_pos) + minetest.sound_play(node_sound.dug, sound_params, true) + local istack = ItemStack("mcl_bamboo:scaffolding") + minetest.add_item(new_pos, istack) + end + end, + + }) + + if SIDE_SCAFFOLDING then + --currently, disabled. + minetest.register_node("mcl_bamboo:scaffolding_horizontal", { + description = S("Scaffolding (horizontal)"), + doc_items_longdesc = S("Scaffolding block used to climb up or out across areas."), + doc_items_hidden = false, + tiles = {"mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_top.png", "mcl_bamboo_scaffolding_bottom.png"}, + drawtype = "nodebox", + paramtype = "light", + use_texture_alpha = "clip", + node_box = { + type = "fixed", + fixed = { + {-0.5, 0.375, -0.5, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.5, -0.375, 0.5, -0.375}, + {0.375, -0.5, -0.5, 0.5, 0.5, -0.375}, + {0.375, -0.5, 0.375, 0.5, 0.5, 0.5}, + {-0.5, -0.5, 0.375, -0.375, 0.5, 0.5}, + {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + }, + }, + groups = {handy = 1, axey = 1, flammable = 3, building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20, not_in_creative_inventory = 1, falling_node = 1}, + _mcl_after_falling = function(pos) + if minetest.get_node(pos).name == "mcl_bamboo:scaffolding_horizontal" then + if minetest.get_node(vector.offset(pos, 0, 0, 0)).name ~= "mcl_bamboo:scaffolding" then + minetest.remove_node(pos) + minetest.add_item(pos, "mcl_bamboo:scaffolding") + else + minetest.set_node(vector.offset(pos, 0, 1, 0), {name = "mcl_bamboo:scaffolding"}) + end + end + end + }) + end +end + +local function register_craftings() + -- Craftings + + minetest.register_craft({ + output = bamboo .. "_block", + recipe = { + {bamboo, bamboo, bamboo}, + {bamboo, bamboo, bamboo}, + {bamboo, bamboo, bamboo}, + } + }) + + minetest.register_craft({ + output = bamboo .. "_plank 2", + recipe = { + {bamboo .. "_block"}, + } + }) + + minetest.register_craft({ + output = bamboo .. "_plank 2", + recipe = { + {bamboo .. "_block_stripped"}, + } + }) + + minetest.register_craft({ + output = "mcl_core:stick", + recipe = { + {bamboo}, + {bamboo}, + } + }) + + minetest.register_craft({ + output = "mcl_bamboo:scaffolding 6", + recipe = {{bamboo, "mcl_mobitems:string", bamboo}, + {bamboo, "", bamboo}, + {bamboo, "", bamboo}} + }) + + minetest.register_craft({ + output = "mcl_bamboo:bamboo_door 3", + recipe = { + {bamboo .. "_plank", bamboo .. "_plank"}, + {bamboo .. "_plank", bamboo .. "_plank"}, + {bamboo .. "_plank", bamboo .. "_plank"} + } + }) + + minetest.register_craft({ + output = "mcl_bamboo:bamboo_trapdoor 2", + recipe = { + {bamboo .. "_plank", bamboo .. "_plank", bamboo .. "_plank"}, + {bamboo .. "_plank", bamboo .. "_plank", bamboo .. "_plank"}, + } + }) + + -- Fuels + minetest.register_craft({ + type = "fuel", + recipe = "mcl_bamboo:bamboo_door", + burntime = 10, + }) + + minetest.register_craft({ + type = "fuel", + recipe = "mcl_bamboo:bamboo_trapdoor", + burntime = 15, + }) + + minetest.register_craft({ + type = "fuel", + recipe = bamboo, + burntime = 2.5, -- supposed to be 1/2 that of a stick, per minecraft wiki as of JE 1.19.3 + }) + + minetest.register_craft({ + type = "fuel", + recipe = bamboo .. "_block", + burntime = 15, + }) + + minetest.register_craft({ + type = "fuel", + recipe = bamboo .. "_block_stripped", + burntime = 15, + }) + + minetest.register_craft({ + type = "fuel", + recipe = bamboo .. "_plank", + burntime = 7.5, + }) + + minetest.register_craft({ + type = "fuel", + recipe = "mcl_bamboo:scaffolding", + burntime = 20 + }) + + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_plank", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_block", + burntime = 7.5, + }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_stairs:slab_bamboo_stripped", + burntime = 7.5, + }) + + minetest.register_craft({ + type = "fuel", + recipe = "mesecons_button:button_bamboo_off", + burntime = 5, + }) + +end + +create_nodes() +register_craftings() + +-- MAPGEN +dofile(minetest.get_modpath(modname) .. "/mapgen.lua") + +local BAMBOO_MAX_HEIGHT_CHECK = -16 + +--ABMs +minetest.register_abm({ + nodenames = {"mcl_bamboo:bamboo"}, + interval = 40, + chance = 40, + action = function(pos, node) + local soil_pos = nil + if minetest.get_node_light(pos) < 8 then + return + end + local found_soil = false + for py = -1, BAMBOO_MAX_HEIGHT_CHECK, -1 do + local chk_pos = vector.offset(pos, 0, py, 0) + local name = minetest.get_node(chk_pos).name + if minetest.get_item_group(name, "soil") ~= 0 then + found_soil = true + soil_pos = chk_pos + break + elseif name ~= "mcl_bamboo:bamboo" then + break + end + end + if not found_soil then + return + end + for py = 1, 14 do + local npos = vector.offset(pos, 0, py, 0) + local name = minetest.get_node(npos).name + if vector.distance(soil_pos, npos) >= 15 then + -- stop growing check. + if USE_END_CAPS then + if name == "air" then + minetest.set_node(npos, {name = "mcl_bamboo:bamboo_top"}) + end + end + break + end + if name == "air" then + minetest.set_node(npos, {name = "mcl_bamboo:bamboo"}) + break + elseif name ~= "mcl_bamboo:bamboo" then + break + end + end + end, +}) + +-- Base Aliases. +minetest.register_alias("bamboo_block", "mcl_bamboo:bamboo_block") +minetest.register_alias("bamboo_strippedblock", "mcl_bamboo:bamboo_block_stripped") +minetest.register_alias("bamboo", "mcl_bamboo:bamboo") +minetest.register_alias("bamboo_plank", "mcl_bamboo:bamboo_plank") + +minetest.register_alias("mcl_stairs:stair_bamboo", "mcl_stairs:stair_bamboo_block") +minetest.register_alias("bamboo:bamboo", "mcl_bamboo:bamboo") + +--[[ +todo -- make scaffolds do side scaffold blocks, so that they jut out. +todo -- Also, make those blocks collapse (break) when a nearby connected scaffold breaks. +todo -- add in alternative bamboo styles to simulate random placement. (see commented out nde box definitions. +todo -- make endcap node for bamboo, so that they can be 12-16 nodes high and stop growing. +todo -- mash all of that together so that it drops as one item, and chooses what version to be, in on_place. +todo -- Raft +todo -- Raft with Chest. +todo -- Add in Extras. +todo: Added a new "Mosaic" plank variant that is unique to Bamboo called Bamboo Mosaic + It can be crafted with 1x2 Bamboo Slabs in a vertical strip + You can craft Stair and Slab variants of Bamboo Mosaic + Bamboo Mosaic blocks cannot be used as a crafting ingredient where other wooden blocks are used, but they can be + used as fuel. + +todo -- add in fuel recipes for: + [-] bamboo slab + stripped bamboo slab + [-] bamboo stair + stripped bamboo stair + bamboo plank stair +--]] diff --git a/mods/ITEMS/mcl_bamboo/locale/template.txt b/mods/ITEMS/mcl_bamboo/locale/template.txt new file mode 100644 index 0000000000..1701a4a055 --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/locale/template.txt @@ -0,0 +1,36 @@ +# textdomain: mcl_bamboo + + +### init.lua ### + +A bamboo button is a redstone component made out of stone which can be pushed to provide redstone power. When pushed, it powers adjacent redstone components for 1 second.= + +A wooden pressure plate is a redstone component which supplies its surrounding blocks with redstone power while any movable object (including dropped items, players and mobs) rests on top of it.= + +Bamboo= +Bamboo Button= +Bamboo Door.= +Bamboo Fence= +Bamboo Fence Gate= +Bamboo Plank= +Bamboo Plank Slab= +Bamboo Plank Stair= +Bamboo Pressure Plate= +Bamboo Sign= +Bamboo Slab= +Bamboo Stair= +Bamboo Trapdoor.= +Double Bamboo Plank Slab= +Double Bamboo Slab= +Double Stripped Bamboo Slab= +Nether Brick Fence= +Scaffolding= +Scaffolding (horizontal)= +Scaffolding block used to climb up or out across areas.= +Stripped Bamboo Slab= +Stripped Bamboo Stair= + +To open or close the trapdoor, rightclick it or send a redstone signal to it.= + +Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. 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.= + diff --git a/mods/ITEMS/mcl_bamboo/mapgen.lua b/mods/ITEMS/mcl_bamboo/mapgen.lua new file mode 100644 index 0000000000..8fa61ca54e --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/mapgen.lua @@ -0,0 +1,60 @@ +local item_water, item_dirt, item_grass + +item_water = "mcl_core:water_source" +item_dirt = "mcl_core:dirt" +item_grass = "mcl_core:dirt_with_grass" +local function make_bamboo(pos, size) + for y = 0, size - 1 do + local p = {x = pos.x, y = pos.y + y, z = pos.z} + if minetest.get_node(p).name ~= "air" then + return + end + minetest.set_node(p, {name = "mcl_bamboo:bamboo"}) + end +end + +minetest.register_on_generated(function(minp, maxp, seed) + if maxp.y < 2 and minp.y > 0 then + return + end + + local c_grass = minetest.get_content_id(item_grass) + local n_bamboo = minetest.get_perlin(8234, 3, 0.6, 100) + + local vm = minetest.get_voxel_manip() + local emin, emax = vm:read_from_map(minp, maxp) + local area = VoxelArea:new {MinEdge = emin, MaxEdge = emax} + local data = vm:get_data() + + local rand = PseudoRandom(seed % 8000) + for z = minp.z + 2, maxp.z - 2, 4 do + for x = minp.x + 2, maxp.x - 2, 4 do + local bamboo_amount = math.floor(n_bamboo:get_2d({x = x, y = z}) * 7 - 3) + for i = 1, bamboo_amount do + local p_pos = { + x = rand:next(x - 2, x + 2), + y = 0, + z = rand:next(z - 2, z + 2) + } + + local found = false + local node = -1 + for y = 4, 0, -1 do + p_pos.y = y + node = data[area:index(p_pos.x, p_pos.y, p_pos.z)] + if node == c_grass then + found = true + break + end + end + + if found and + minetest.find_node_near(p_pos, 5, {"group:water", item_water}) then + p_pos.y = p_pos.y + 1 + make_bamboo(p_pos, rand:next(4, 12)) + end + end + end + end +end +) diff --git a/mods/ITEMS/mcl_bamboo/mod.conf b/mods/ITEMS/mcl_bamboo/mod.conf new file mode 100644 index 0000000000..d4b93a7d93 --- /dev/null +++ b/mods/ITEMS/mcl_bamboo/mod.conf @@ -0,0 +1,4 @@ +name = mcl_bamboo +depends = mcl_core, mcl_sounds, mcl_tools +optional_depends = mcl_flowerpots, mclx_stairs, mcl_doors, mcl_signs, mesecons_pressureplates, mcl_fences, mesecons_button +author = Michieal \ No newline at end of file diff --git a/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_bottom.png b/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_bottom.png new file mode 100644 index 0000000000..286cdd381a Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_bottom.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_top.png b/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_top.png new file mode 100644 index 0000000000..8aba3c825e Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_top.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_wield.png b/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_wield.png new file mode 100644 index 0000000000..4c666cc6a2 Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/backup/mcl_bamboo_door_wield.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo.png new file mode 100644 index 0000000000..8fd0a8131f Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_block.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_block.png new file mode 100644 index 0000000000..0bbbd9041e Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_block.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_block_stripped.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_block_stripped.png new file mode 100644 index 0000000000..b9418a27b1 Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_block_stripped.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_bottom.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_bottom.png new file mode 100644 index 0000000000..96f7c79745 Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_bottom.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_fpm.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_fpm.png new file mode 100644 index 0000000000..7c3f2b40df Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_fpm.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png new file mode 100644 index 0000000000..cd19288f9a Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_plank.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_shoot.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_shoot.png new file mode 100644 index 0000000000..0d1226cb32 Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_bamboo_shoot.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_bottom.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_bottom.png new file mode 100644 index 0000000000..286cdd381a Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_bottom.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_bottom_alt.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_bottom_alt.png new file mode 100644 index 0000000000..00bd07b0bf Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_bottom_alt.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top.png new file mode 100644 index 0000000000..8aba3c825e Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top_alt.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top_alt.png new file mode 100644 index 0000000000..6aa951c261 Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_top_alt.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_wield.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_wield.png new file mode 100644 index 0000000000..6d61e8fcfa Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_door_wield.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_bamboo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_bamboo.png new file mode 100644 index 0000000000..1193b6b2f7 Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_bamboo.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png new file mode 100644 index 0000000000..bd51d0683b Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_fence_gate_bamboo.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_flower_pot.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_flower_pot.png new file mode 100644 index 0000000000..599c170373 Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_flower_pot.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_bottom.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_bottom.png new file mode 100644 index 0000000000..46cddd712f Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_bottom.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_top.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_top.png new file mode 100644 index 0000000000..4fb912a4af Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_scaffolding_top.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_side.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_side.png new file mode 100644 index 0000000000..444c54bdd0 Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_side.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_top.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_top.png new file mode 100644 index 0000000000..4ea65d4656 Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_top.png differ diff --git a/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_wield.png b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_wield.png new file mode 100644 index 0000000000..1b30fc4c5f Binary files /dev/null and b/mods/ITEMS/mcl_bamboo/textures/mcl_bamboo_trapdoor_wield.png differ diff --git a/mods/ITEMS/mcl_banners/locale/mcl_banners.ja.tr b/mods/ITEMS/mcl_banners/locale/mcl_banners.ja.tr new file mode 100644 index 0000000000..7d2fd5b9e4 --- /dev/null +++ b/mods/ITEMS/mcl_banners/locale/mcl_banners.ja.tr @@ -0,0 +1,77 @@ +# textdomain: mcl_banners +White Banner=白色の旗 +White=白色 +Grey Banner=灰色の旗 +Grey=灰色 +Light Grey Banner=薄灰色の旗 +Light Grey=薄灰色 +Black Banner=黒色の旗 +Black=黒色 +Red Banner=赤色の旗 +Red=赤色 +Yellow Banner=黄色の旗 +Yellow=黄色 +Green Banner=緑色の旗 +Green=緑色 +Cyan Banner=青緑色の旗 +Cyan=青緑色 +Blue Banner=青色の旗 +Blue=青色 +Magenta Banner=赤紫色の旗 +Magenta=赤紫色 +Orange Banner=橙色の旗 +Orange=橙色 +Purple Banner=紫色の旗 +Violet=紫色 +Brown Banner=茶色の旗 +Brown=茶色 +Pink Banner=桃色の旗 +Pink=桃色 +Lime Banner=黄緑色の旗 +Lime=黄緑色 +Light Blue Banner=空色の旗 +Light Blue=空色 +Banners are tall colorful decorative blocks. They can be placed on the floor and at walls. Banners can be emblazoned with a variety of patterns using a lot of dye in crafting.=旗は、背の高いカラフルな装飾ブロックです。床や壁に配置できます。クラフトで染料を多用すると、さまざまな模様のエンブレムが作れます。 +Use crafting to draw a pattern on top of the banner. Emblazoned banners can be emblazoned again to combine various patterns. You can draw up to 12 layers on a banner that way. If the banner includes a gradient, only 3 layers are possible.=クラフトによって、旗の面に模様を描きます。エンブレム入りの旗を再度エンブレム化することで、様々なパターンを組み合わせられます。この方法では、旗に最大12枚のレイヤー(重ねられる層)が描けます。グラデーションを含む場合は、3レイヤーまでとなります。 +You can copy the pattern of a banner by placing two banners of the same color in the crafting grid—one needs to be emblazoned, the other one must be clean. Finally, you can use a banner on a cauldron with water to wash off its top-most layer.=同じ色の旗を2枚並べて、旗の模様を写せます。1枚はエンブレム入りで、もう1枚はまっさらな状態であることが必要です。最後に、旗を大釜の上に置いて使うことで、その一番上のレイヤーを水で洗い流す事もできます。 +@1 Bordure=@1 縁取り +@1 Bricks=@1 レンガ模様 +@1 Roundel=@1 円形 +@1 Creeper Charge=@1 クリーパー模様 +@1 Saltire=@1 ✕字 +@1 Bordure Indented=@1 波形の縁取り +@1 Per Bend Inverted=@1 \分割 左下塗り +@1 Per Bend Sinister Inverted=@1 /分割 右下塗り +@1 Per Bend=@1 \分割 右上塗り +@1 Per Bend Sinister=@1 /分割 左上塗り +@1 Flower Charge=@1 花模様 +@1 Gradient=@1 グラデーション 上から塗り +@1 Base Gradient=@1 グラデーション 下から塗り +@1 Per Fess Inverted=@1 上下分割 下塗り +@1 Per Fess=@1 上下分割 上塗り +@1 Per Pale=@1 左右分割 左塗り +@1 Per Pale Inverted=@1 左右分割 右塗り +@1 Thing Charge=@1 何かの模様 +@1 Lozenge=@1 菱形 +@1 Skull Charge=@1 骸骨模様 +@1 Paly=@1 縦縞 +@1 Base Dexter Canton=@1 矩形 左下塗り +@1 Base Sinister Canton=@1 矩形 右下塗り +@1 Chief Dexter Canton=@1 矩形 左上塗り +@1 Chief Sinister Canton=@1 矩形 右上塗り +@1 Cross=@1 十字 +@1 Base=@1 横帯 下端塗り +@1 Pale=@1 縦帯 中央塗り +@1 Bend Sinister=@1 /帯 +@1 Bend=@1 \帯 +@1 Pale Dexter=@1 縦帯 左端塗り +@1 Fess=@1 横帯 中央塗り +@1 Pale Sinister=@1 縦帯 右端塗り +@1 Chief=@1 横帯 上端塗り +@1 Chevron=@1 下に三角形 +@1 Chevron Inverted=@1 上に逆三角形 +@1 Base Indented=@1 下に波形 +@1 Chief Indented=@1 上に波形 +And one additional layer=さらにレイヤーを1枚追加 +And @1 additional layers=さらにレイヤーを@1枚追加 +Paintable decoration=塗装可能な装飾 diff --git a/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ja.tr b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ja.tr new file mode 100644 index 0000000000..3715310c09 --- /dev/null +++ b/mods/ITEMS/mcl_barrels/locale/mcl_barrels.ja.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_barrels +Barrel=樽 +Barrels are containers which provide 27 inventory slots.=樽は、27個のインベントリースロットを持つ容器です。 +To access its inventory, rightclick it. When broken, the items will drop out.=インベントリにアクセスするには、右クリックします。壊れると、アイテムがドロップアウトします。 +27 inventory slots=27個のインベントリースロット \ No newline at end of file diff --git a/mods/ITEMS/mcl_beacons/locale/mcl_beacons.ja.tr b/mods/ITEMS/mcl_beacons/locale/mcl_beacons.ja.tr new file mode 100644 index 0000000000..ad2e795118 --- /dev/null +++ b/mods/ITEMS/mcl_beacons/locale/mcl_beacons.ja.tr @@ -0,0 +1,6 @@ +# textdomain: mcl_beacons +Beacon=ビーコン +Beacon:=ビーコン: +Primary Power:=プライマリーパワー: +Inventory:=インベントリ: + diff --git a/mods/ITEMS/mcl_beds/api.lua b/mods/ITEMS/mcl_beds/api.lua index 36c4a907a3..05a95f79d5 100644 --- a/mods/ITEMS/mcl_beds/api.lua +++ b/mods/ITEMS/mcl_beds/api.lua @@ -124,7 +124,7 @@ end local default_sounds if minetest.get_modpath("mcl_sounds") then default_sounds = mcl_sounds.node_sound_wood_defaults({ - footstep = { gain = 0.5, name = "mcl_sounds_cloth" }, + footstep = mcl_sounds.node_sound_wool_defaults().footstep, }) end diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index 056da71dcb..7199c7b7ea 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -311,9 +311,9 @@ function mcl_beds.get_bed_top (pos) local bed_top = minetest.get_node(bed_top_pos) if bed_top then - mcl_log("Has a bed top") + --mcl_log("Has a bed top") else - mcl_log("No bed top") + --mcl_log("No bed top") end return bed_top_pos end diff --git a/mods/ITEMS/mcl_beds/locale/mcl_beds.ja.tr b/mods/ITEMS/mcl_beds/locale/mcl_beds.ja.tr new file mode 100644 index 0000000000..51162b762d --- /dev/null +++ b/mods/ITEMS/mcl_beds/locale/mcl_beds.ja.tr @@ -0,0 +1,43 @@ +# textdomain: mcl_beds +Beds allow you to sleep at night and make the time pass faster.=ベッドがあると夜もぐっすり眠れますし、その時間もスキップできます。 +To use a bed, stand close to it and right-click the bed to sleep in it. Sleeping only works when the sun sets, at night or during a thunderstorm. The bed must also be clear of any danger.=ベッドで寝るには、その近くに立って右クリックします。寝られるのは、日没後の夜間、あるいは雷雨の間のみです。また、その周辺に危険がないことも条件です。 +You have heard of other worlds in which a bed would set the start point for your next life. But this world is not one of them.=ベッドが、来世のスタート地点になるような異世界の話を聞いたことがあると思います。しかしここは、そういった世界ではありません。 +By using a bed, you set the starting point for your next life. If you die, you will start your next life at this bed, unless it is obstructed or destroyed.=ベッドを使うことで、来世のスタート地点が設定されます。もし死んだら、このベッドで次の人生を始めることになるでしょう。ベッドが何かに妨げられていたり、壊されていたりしてない限りは。 +In this world, going to bed won't skip the night, but it will skip thunderstorms.=この世界では、ベッドに入っても夜時間をスキップできませんが、雷雨であればスキップできます。 +Sleeping allows you to skip the night. The night is skipped when all players in this world went to sleep. The night is skipped after sleeping for a few seconds. Thunderstorms can be skipped in the same manner.=寝ることで夜をスキップできます。スキップされるのは、このワールドのすべてのプレイヤーが寝たときです。数秒間眠ったのち、夜がスキップされます。雷雨も同様にスキップできます。 +Bed=ベッド +Red Bed=赤色のベッド +Blue Bed=青色のベッド +Cyan Bed=青緑色のベッド +Grey Bed=灰色のベッド +Light Grey Bed=薄灰色のベッド +Black Bed=黒色のベッド +Yellow Bed=黄色のベッド +Green Bed=緑色のベッド +Magenta Bed=赤紫色のベッド +Orange Bed=橙色のベッド +Purple Bed=紫色のベッド +Brown Bed=茶色のベッド +Pink Bed=桃色のベッド +Lime Bed=黄緑色のベッド +Light Blue Bed=空色のベッド +White Bed=白色のベッド +You can't sleep, the bed's too far away!=ベッドが遠くて、寝られません! +This bed is already occupied!=このベッドは、すでに占有されてます! +You have to stop moving before going to bed!=寝るなら、まず動くのを止めてからです! +You can't sleep now, monsters are nearby!=今は眠れません…モンスターが近くにいます! +You can't sleep, the bed is obstructed!=ベッドが妨げられていて、寝られません! +It's too dangerous to sleep here!=ここで寝るのは危険すぎます! +New respawn position set! But you can only sleep at night or during a thunderstorm.=新たなリスポーン地点を設定しました!ただし、眠れるのは夜間か雷雨のときだけです。 +You can only sleep at night or during a thunderstorm.=眠れるのは夜間か雷雨のときだけです。 +New respawn position set!=新たなリスポーン地点を設定しました! +Leave Bed=ベッドから起きる +Abort sleep=睡眠を中断する +Players in bed: @1/@2=就寝中のプレイヤー:@1/@2 +Note: Night skip is disabled.=注:夜間スキップは無効です。 +You're sleeping.=睡眠中… +You will fall asleep when all players are in bed.=プレイヤー全員がベッドに入ると、眠りにつきます。 +You will fall asleep when @1% of all players are in bed.=全プレイヤー(@1%)がベッドに入ると、眠りにつきます。 +You're in bed.=ベッドにいます。 +Allows you to sleep=睡眠を許可する +Respawn Anchor=リスポーンアンカー diff --git a/mods/ITEMS/mcl_beds/respawn_anchor.lua b/mods/ITEMS/mcl_beds/respawn_anchor.lua index bb36fe9d07..f167599c70 100644 --- a/mods/ITEMS/mcl_beds/respawn_anchor.lua +++ b/mods/ITEMS/mcl_beds/respawn_anchor.lua @@ -6,27 +6,6 @@ local S = minetest.get_translator(minetest.get_current_modname()) --local mod_doc = minetest.get_modpath("doc") -> maybe add documentation ? for i=0,4 do - local nodebox_uncharged = { --Reused the composter nodebox, since it is basicly the same - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall - { 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall - {-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall - {-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall - {-0.5, -0.5, -0.5, 0.5, -0.47, 0.5}, -- Bottom level, -0.47 because -0.5 is so low that you can see the texture of the block below through - } - } - - local nodebox_charged = { --Reused the composter nodebox, since it is basicly the same - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, -0.375, 0.5, 0.5}, -- Left wall - { 0.375, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Right wall - {-0.375, -0.5, 0.375, 0.375, 0.5, 0.5}, -- Back wall - {-0.375, -0.5, -0.5, 0.375, 0.5, -0.375}, -- Front wall - {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, -- Bottom level - } - } local function rightclick(pos, node, player, itemstack) if itemstack.get_name(itemstack) == "mcl_nether:glowstone" and i ~= 4 then @@ -54,8 +33,6 @@ for i=0,4 do "respawn_anchor_bottom.png", "respawn_anchor_side0.png" }, - drawtype = "nodebox", - node_box = nodebox_uncharged, on_rightclick = rightclick, groups = {pickaxey=1, material_stone=1}, _mcl_hardness = 22.5, @@ -67,12 +44,13 @@ for i=0,4 do minetest.register_node("mcl_beds:respawn_anchor_charged_"..i,{ description=S("Respawn Anchor"), tiles = { - "portal.png", + { + image="respawn_anchor_top_on.png^[noalpha", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0} + }, "respawn_anchor_bottom.png", "respawn_anchor_side"..i ..".png" }, - drawtype = "nodebox", - node_box = nodebox_charged, on_rightclick = rightclick, groups = {pickaxey=1, material_stone=1, not_in_creative_inventory=1}, _mcl_hardness = 22.5, diff --git a/mods/ITEMS/mcl_beds/textures/portal.png b/mods/ITEMS/mcl_beds/textures/portal.png deleted file mode 100644 index 160ad95f38..0000000000 Binary files a/mods/ITEMS/mcl_beds/textures/portal.png and /dev/null differ diff --git a/mods/ITEMS/mcl_beds/textures/respawn_anchor_top_on.png b/mods/ITEMS/mcl_beds/textures/respawn_anchor_top_on.png new file mode 100644 index 0000000000..ce84dedf27 Binary files /dev/null and b/mods/ITEMS/mcl_beds/textures/respawn_anchor_top_on.png differ diff --git a/mods/ITEMS/mcl_beehives/init.lua b/mods/ITEMS/mcl_beehives/init.lua new file mode 100644 index 0000000000..1002770782 --- /dev/null +++ b/mods/ITEMS/mcl_beehives/init.lua @@ -0,0 +1,236 @@ +------------------ +---- Beehives ---- +------------------ + +-- Variables +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Function to allow harvesting honey and honeycomb from the beehive and bee nest. +local honey_harvest = function(pos, node, player, itemstack, pointed_thing) + local inv = player:get_inventory() + local shears = player:get_wielded_item():get_name() == "mcl_tools:shears" + local bottle = player:get_wielded_item():get_name() == "mcl_potions:glass_bottle" + local beehive = "mcl_beehives:beehive" + local is_creative = minetest.is_creative_enabled(player:get_player_name()) + + if node.name == "mcl_beehives:beehive_5" then + beehive = "mcl_beehives:beehive" + elseif node.name == "mcl_beehives:bee_nest_5" then + beehive = "mcl_beehives:bee_nest" + end + + local campfire_area = vector.offset(pos, 0, -5, 0) + local campfire = minetest.find_nodes_in_area(pos, campfire_area, "group:lit_campfire") + + if bottle then + local honey = "mcl_honey:honey_bottle" + if inv:room_for_item("main", honey) then + node.name = beehive + minetest.set_node(pos, node) + inv:add_item("main", "mcl_honey:honey_bottle") + if not is_creative then + itemstack:take_item() + end + if not campfire[1] then mcl_util.deal_damage(player, 10) else awards.unlock(player:get_player_name(), "mcl:bee_our_guest") end + end + elseif shears then + minetest.add_item(pos, "mcl_honey:honeycomb 3") + node.name = beehive + minetest.set_node(pos, node) + if not campfire[1] then mcl_util.deal_damage(player, 10) end + end +end + +-- Dig Function for Beehives +local dig_hive = function(pos, node, oldmetadata, digger) + local wield_item = digger:get_wielded_item() + local beehive = string.find(node.name, "mcl_beehives:beehive") + local beenest = string.find(node.name, "mcl_beehives:bee_nest") + local silk_touch = mcl_enchanting.has_enchantment(wield_item, "silk_touch") + local is_creative = minetest.is_creative_enabled(digger:get_player_name()) + + if beehive then + minetest.add_item(pos, "mcl_beehives:beehive") + if not silk_touch and not is_creative then mcl_util.deal_damage(digger, 10) end + elseif beenest then + if silk_touch or is_creative then + minetest.add_item(pos, "mcl_beehives:bee_nest") + awards.unlock(digger:get_player_name(), "mcl:total_beelocation") + else + mcl_util.deal_damage(digger, 10) + end + end +end + +-- Beehive +minetest.register_node("mcl_beehives:beehive", { + description = S("Beehive"), + _doc_items_longdesc = S("Artificial bee nest."), + tiles = { + "mcl_beehives_beehive_end.png", "mcl_beehives_beehive_end.png", + "mcl_beehives_beehive_side.png", "mcl_beehives_beehive_side.png", + "mcl_beehives_beehive_side.png", "mcl_beehives_beehive_front.png", + }, + paramtype2 = "facedir", + groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 5, material_wood = 1, beehive = 1 }, + sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 0.6, + _mcl_hardness = 0.6, + drop = "", + after_dig_node = dig_hive, +}) + +for l = 1, 4 do + minetest.register_node("mcl_beehives:beehive_" .. l, { + description = S("Beehive"), + _doc_items_longdesc = S("Artificial bee nest."), + tiles = { + "mcl_beehives_beehive_end.png", "mcl_beehives_beehive_end.png", + "mcl_beehives_beehive_side.png", "mcl_beehives_beehive_side.png", + "mcl_beehives_beehive_side.png", "mcl_beehives_beehive_front.png", + }, + paramtype2 = "facedir", + groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 5, material_wood = 1, not_in_creative_inventory = 1, beehive = 1 }, + sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 0.6, + _mcl_hardness = 0.6, + drop = "", + after_dig_node = dig_hive, + }) +end + +minetest.register_node("mcl_beehives:beehive_5", { + description = S("Beehive"), + _doc_items_longdesc = S("Artificial bee nest."), + tiles = { + "mcl_beehives_beehive_end.png", "mcl_beehives_beehive_end.png", + "mcl_beehives_beehive_side.png", "mcl_beehives_beehive_side.png", + "mcl_beehives_beehive_side.png", "mcl_beehives_beehive_front_honey.png", + }, + paramtype2 = "facedir", + groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 5, material_wood = 1, not_in_creative_inventory = 1, beehive = 1 }, + sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 0.6, + _mcl_hardness = 0.6, + on_rightclick = honey_harvest, + drop = "", + after_dig_node = dig_hive, +}) + +-- Bee Nest +minetest.register_node("mcl_beehives:bee_nest", { + description = S("Bee Nest"), + _doc_items_longdesc = S("A naturally generating block that houses bees and a tasty treat...if you can get it."), + tiles = { + "mcl_beehives_bee_nest_top.png", "mcl_beehives_bee_nest_bottom.png", + "mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_side.png", + "mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_front.png", + }, + paramtype2 = "facedir", + groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 30, bee_nest = 1 }, + sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 0.3, + _mcl_hardness = 0.3, + drop = "", + after_dig_node = dig_hive, +}) + +for i = 1, 4 do + minetest.register_node("mcl_beehives:bee_nest_"..i, { + description = S("Bee Nest"), + _doc_items_longdesc = S("A naturally generating block that houses bees and a tasty treat...if you can get it."), + tiles = { + "mcl_beehives_bee_nest_top.png", "mcl_beehives_bee_nest_bottom.png", + "mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_side.png", + "mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_front.png", + }, + paramtype2 = "facedir", + groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 30, not_in_creative_inventory = 1, bee_nest = 1 }, + sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 0.3, + _mcl_hardness = 0.3, + drop = "", + after_dig_node = dig_hive, + }) +end + +minetest.register_node("mcl_beehives:bee_nest_5", { + description = S("Bee Nest"), + _doc_items_longdesc = S("A naturally generating block that houses bees and a tasty treat...if you can get it."), + tiles = { + "mcl_beehives_bee_nest_top.png", "mcl_beehives_bee_nest_bottom.png", + "mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_side.png", + "mcl_beehives_bee_nest_side.png", "mcl_beehives_bee_nest_front_honey.png", + }, + paramtype2 = "facedir", + groups = { axey = 1, deco_block = 1, flammable = 0, fire_flammability = 30, not_in_creative_inventory = 1, bee_nest = 1 }, + sounds = mcl_sounds.node_sound_wood_defaults(), + _mcl_blast_resistance = 0.3, + _mcl_hardness = 0.3, + on_rightclick = honey_harvest, + drop = "", + after_dig_node = dig_hive, +}) + +-- Crafting +minetest.register_craft({ + output = "mcl_beehives:beehive", + recipe = { + { "group:wood", "group:wood", "group:wood" }, + { "mcl_honey:honeycomb", "mcl_honey:honeycomb", "mcl_honey:honeycomb" }, + { "group:wood", "group:wood", "group:wood" }, + }, +}) + +-- Temporary ABM to update honey levels +minetest.register_abm({ + label = "Update Beehive Honey Levels", + nodenames = "group:beehive", + interval = 500, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local beehive = "mcl_beehives:beehive" + if node.name == beehive then + node.name = beehive.."_1" + minetest.set_node(pos, node) + elseif node.name == beehive.."_1" then + node.name = beehive.."_2" + minetest.set_node(pos, node) + elseif node.name == beehive.."_2" then + node.name = beehive.."_3" + minetest.set_node(pos, node) + elseif node.name == beehive.."_3" then + node.name = beehive.."_4" + minetest.set_node(pos, node) + elseif node.name == beehive.."_4" then + node.name = beehive.."_5" + minetest.set_node(pos, node) + end + end, +}) + +minetest.register_abm({ + label = "Update Bee Nest Honey Levels", + nodenames = "group:bee_nest", + interval = 500, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local beehive = "mcl_beehives:bee_nest" + if node.name == beehive then + node.name = beehive.."_1" + minetest.set_node(pos, node) + elseif node.name == beehive.."_1" then + node.name = beehive.."_2" + minetest.set_node(pos, node) + elseif node.name == beehive.."_2" then + node.name = beehive.."_3" + minetest.set_node(pos, node) + elseif node.name == beehive.."_3" then + node.name = beehive.."_4" + minetest.set_node(pos, node) + elseif node.name == beehive.."_4" then + node.name = beehive.."_5" + minetest.set_node(pos, node) + end + end, +}) diff --git a/mods/ITEMS/mcl_beehives/locale/mcl_beehives.ja.tr b/mods/ITEMS/mcl_beehives/locale/mcl_beehives.ja.tr new file mode 100644 index 0000000000..a07e443769 --- /dev/null +++ b/mods/ITEMS/mcl_beehives/locale/mcl_beehives.ja.tr @@ -0,0 +1,4 @@ +Beehive=養蜂箱 +Artificial bee nest.=人工的なハチの巣です。 +Bee Nest=ハチの巣 +A naturally generating block that houses bees and a tasty treat...if you can get it.=ミツバチの住処となっている自然生成ブロックで、美味しいおやつが収まっています…手に入れられれば。 \ No newline at end of file diff --git a/mods/ITEMS/mcl_beehives/locale/template.txt b/mods/ITEMS/mcl_beehives/locale/template.txt new file mode 100644 index 0000000000..135786c7cf --- /dev/null +++ b/mods/ITEMS/mcl_beehives/locale/template.txt @@ -0,0 +1,4 @@ +Beehive= +Artificial bee nest.= +Bee Nest= +A naturally generating block that houses bees and a tasty treat...if you can get it.= \ No newline at end of file diff --git a/mods/ITEMS/mcl_beehives/mod.conf b/mods/ITEMS/mcl_beehives/mod.conf new file mode 100644 index 0000000000..0a7855bec1 --- /dev/null +++ b/mods/ITEMS/mcl_beehives/mod.conf @@ -0,0 +1,4 @@ +name = mcl_beehives +author = PrairieWind +description = Adds beehives and bee nests to MineClone 2. +depends = mcl_util, mcl_enchanting diff --git a/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_bottom.png b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_bottom.png new file mode 100644 index 0000000000..f3ad4a418e Binary files /dev/null and b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_bottom.png differ diff --git a/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_front.png b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_front.png new file mode 100644 index 0000000000..023e79d923 Binary files /dev/null and b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_front.png differ diff --git a/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_front_honey.png b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_front_honey.png new file mode 100644 index 0000000000..d88dd65550 Binary files /dev/null and b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_front_honey.png differ diff --git a/mods/ITEMS/mcl_amethyst/textures/mcl_amethyst_amethyst_cluster_block.png b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_side.png similarity index 51% rename from mods/ITEMS/mcl_amethyst/textures/mcl_amethyst_amethyst_cluster_block.png rename to mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_side.png index 7ea932bf86..9c0de93d7f 100644 Binary files a/mods/ITEMS/mcl_amethyst/textures/mcl_amethyst_amethyst_cluster_block.png and b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_side.png differ diff --git a/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_top.png b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_top.png new file mode 100644 index 0000000000..5f80eb98e4 Binary files /dev/null and b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_bee_nest_top.png differ diff --git a/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_end.png b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_end.png new file mode 100644 index 0000000000..3ee339135a Binary files /dev/null and b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_end.png differ diff --git a/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_front.png b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_front.png new file mode 100644 index 0000000000..94e14d9f9d Binary files /dev/null and b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_front.png differ diff --git a/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_front_honey.png b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_front_honey.png new file mode 100644 index 0000000000..e47a7c776e Binary files /dev/null and b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_front_honey.png differ diff --git a/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_side.png b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_side.png new file mode 100644 index 0000000000..820acb4916 Binary files /dev/null and b/mods/ITEMS/mcl_beehives/textures/mcl_beehives_beehive_side.png differ diff --git a/mods/ITEMS/mcl_bells/init.lua b/mods/ITEMS/mcl_bells/init.lua index f1fce85e95..32bdfe3d7c 100644 --- a/mods/ITEMS/mcl_bells/init.lua +++ b/mods/ITEMS/mcl_bells/init.lua @@ -9,7 +9,7 @@ function mcl_bells.ring_once(pos) local vv=minetest.get_objects_inside_radius(pos,150) for _,o in pairs(vv) do if o.type == "npc" then - mcl_mobs:gopath(o:get_luaentity(),pos,function() end) + o:get_luaentity():gopath(pos,function() end) end end end diff --git a/mods/ITEMS/mcl_bells/locale/mcl_bells.ja.tr b/mods/ITEMS/mcl_bells/locale/mcl_bells.ja.tr new file mode 100644 index 0000000000..2a8ee56ea2 --- /dev/null +++ b/mods/ITEMS/mcl_bells/locale/mcl_bells.ja.tr @@ -0,0 +1,2 @@ +# textdomain: mcl_bells +Bell=鐘 diff --git a/mods/ITEMS/mcl_blackstone/init.lua b/mods/ITEMS/mcl_blackstone/init.lua index 00b9819f8f..cb6ef5493a 100644 --- a/mods/ITEMS/mcl_blackstone/init.lua +++ b/mods/ITEMS/mcl_blackstone/init.lua @@ -9,7 +9,7 @@ end --Blocks minetest.register_node("mcl_blackstone:blackstone", { description = S("Blackstone"), - tiles = {"mcl_blackstone.png"}, + tiles = {"mcl_blackstone_top.png", "mcl_blackstone_top.png", "mcl_blackstone_side.png"}, sounds = mcl_sounds.node_sound_stone_defaults(), is_ground_content = false, groups = {cracky = 3, pickaxey=2, material_stone=1, cobble=1}, @@ -18,7 +18,7 @@ minetest.register_node("mcl_blackstone:blackstone", { }) minetest.register_node("mcl_blackstone:blackstone_gilded", { description = S("Gilded Blackstone"), - tiles = {"mcl_blackstone.png^mcl_blackstone_gilded_side.png"}, + tiles = {"mcl_blackstone_gilded.png"}, sounds = mcl_sounds.node_sound_stone_defaults(), is_ground_content = false, groups = {cracky = 3, pickaxey=2, material_stone=1, xp=1}, @@ -40,7 +40,7 @@ minetest.register_node("mcl_blackstone:blackstone_gilded", { }) minetest.register_node("mcl_blackstone:nether_gold", { description = S("Nether Gold Ore"), - tiles = {"mcl_nether_netherrack.png^mcl_blackstone_gilded_side.png"}, + tiles = {"mcl_nether_gold_ore.png"}, sounds = mcl_sounds.node_sound_stone_defaults(), is_ground_content = false, groups = {cracky = 3, pickaxey=2, material_stone=1, xp=1}, diff --git a/mods/ITEMS/mcl_blackstone/locale/mcl_blackstone.ja.tr b/mods/ITEMS/mcl_blackstone/locale/mcl_blackstone.ja.tr new file mode 100644 index 0000000000..b85a4a9d62 --- /dev/null +++ b/mods/ITEMS/mcl_blackstone/locale/mcl_blackstone.ja.tr @@ -0,0 +1,28 @@ +# textdomain: mcl_blackstone +Blackstone=ブラックストーン +Polished Blackstone=磨かれたブラックストーン +Chiseled Polished Blackstone=模様入りの磨かれたブラックストーン +Polished Blackstone Bricks=磨かれたブラックストーンレンガ +Basalt=玄武岩 +Polished Basalt=磨かれた玄武岩 +Blackstone Slab=ブラックストーンのスラブ +Polished Blackstone Slab=磨かれたブラックストーンのスラブ +Chiseled Polished Blackstone Slab=模様入りの磨かれたブラックストーンのスラブ +Polished Blackstone Brick Slab=磨かれたブラックストーンレンガのスラブ +Blackstone Stair=ブラックストーンの階段 +Polished Blackstone Stair=磨かれたブラックストーンの階段 +Chiseled Polished Blackstone Stair=模様入りの磨かれたブラックストーンの階段 +Polished Blackstone Brick Stair=磨かれたブラックストーンレンガの階段 +Quartz Bricks=クォーツレンガ +Soul Torch=ソウルトーチ +Soul Lantern=ソウルランタン +Soul Soil=ソウルソイル +Eternal Soul Fire=永続的な魂の炎 +Gilded Blackstone=金色のブラックストーン +Nether Gold Ore=ネザー金鉱石 +Smooth Basalt=滑らかな玄武岩 +Blackstone Wall=ブラックストーンの塀 +Double Blackstone Slab=ブラックストーンの2重スラブ +Polished Double Blackstone Slab=磨かれたブラックストーンの2重スラブ +Double Chiseled Polished Blackstone Slab=模様入りの磨かれたブラックストーンの2重スラブ +Double Polished Blackstone Brick Slab=磨かれたブラックストーンレンガの2重スラブ \ No newline at end of file diff --git a/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_gilded.png b/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_gilded.png new file mode 100644 index 0000000000..82423ca185 Binary files /dev/null and b/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_gilded.png differ diff --git a/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_gilded_side.png b/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_gilded_side.png deleted file mode 100644 index 1b8b5dee02..0000000000 Binary files a/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_gilded_side.png and /dev/null differ diff --git a/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone.png b/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_side.png similarity index 100% rename from mods/ITEMS/mcl_blackstone/textures/mcl_blackstone.png rename to mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_side.png diff --git a/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_top.png b/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_top.png new file mode 100644 index 0000000000..a811c69404 Binary files /dev/null and b/mods/ITEMS/mcl_blackstone/textures/mcl_blackstone_top.png differ diff --git a/mods/ITEMS/mcl_blast_furnace/locale/mcl_blast_furnace.ja.tr b/mods/ITEMS/mcl_blast_furnace/locale/mcl_blast_furnace.ja.tr new file mode 100644 index 0000000000..2ac902b2df --- /dev/null +++ b/mods/ITEMS/mcl_blast_furnace/locale/mcl_blast_furnace.ja.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_blast_furnace +Inventory=インベントリ +Blast Furnace=溶鉱炉 +Smelts ores faster than furnace=かまどより早く製錬 +Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn.=レシピ本で、何を製錬するか、何を燃料にするか、どのくらい燃えるかを確認します。 +Use the furnace to open the furnace menu.\nPlace a furnace fuel in the lower slot and the source material in the upper slot.\nThe furnace will slowly use its fuel to smelt the item.\nThe result will be placed into the output slot at the right side.=炉を使用して溶鉱炉メニューを開きます。\n下側のスロットに炉の燃料を、上側のスロットに原料をセットします。\n炉はゆっくりと燃料を使い、アイテムを製錬します。\n右側の出力スロットに製錬結果が置かれます。 +Blast Furnaces smelt several items, mainly ores and armor, using a furnace fuel, into something else.=溶鉱炉は燃料を使用して、いくつかのアイテム(主に鉱石や防具など)を製錬し、別のものに変えます。 +Active Blast Furnace=溶鉱炉 稼動中 \ No newline at end of file diff --git a/mods/ITEMS/mcl_books/locale/mcl_books.ja.tr b/mods/ITEMS/mcl_books/locale/mcl_books.ja.tr new file mode 100644 index 0000000000..8f3755c426 --- /dev/null +++ b/mods/ITEMS/mcl_books/locale/mcl_books.ja.tr @@ -0,0 +1,28 @@ +# textdomain: mcl_books +Book=本 +Books are used to make bookshelves and book and quills.=本は、本棚や本と羽根ペンの材料として使われています。 +“@1”=“@1” +Copy of “@1”=“@1”のコピー +Copy of Copy of “@1”=“@1”のコピーのコピー +Tattered Book=ボロボロの本 +by @1=@1 著 +# as in “to sign a book” +Sign=署名 +Done=完了 +This item can be used to write down some notes.=このアイテムは、ちょっとしたメモを書き留めるために使えます。 +Hold it in the hand, then rightclick to read the current notes and edit then. You can edit the text as often as you like. You can also sign the book which turns it into a written book which you can stack, but it can't be edited anymore.=手に持って右クリックすると、現在のメモを読み込んでから編集できます。編集は何度でも可能です。また、署名をすることで記入済みの本となり、スタックが可能になりますが、編集はできなくなります。 +A book can hold up to 4500 characters. The title length is limited to 64 characters.=1冊に4500文字まで収録可能です。タイトルの長さは64文字までです。 +Enter book title:=本の題名を入力: +by @1=@1 著 +Note: The book will no longer be editable after signing=注:署名後の本は編集不能 +Sign and Close=署名して閉じる +Cancel=キャンセル +Nameless Book=名もなき本 +Written Book=記入済みの本 +Written books contain some text written by someone. They can be read and copied, but not edited.=記入済みの本には、誰かが書いたテキストが含まれています。読んだりコピーしたりはできますが、編集は不能です。 +Hold it in your hand, then rightclick to read the book.=手に持ち、右クリックすると本が読めます。 +To copy the text of the written book, place it into the crafting grid together with a book and quill (or multiple of those) and craft. The written book will not be consumed. Copies of copies can not be copied.=記入済みの本のテキストをコピーするには、本と羽根ペン(またはそれらの複数)と一緒にクラフトグリッドに置き、クラフトします。記入済みの本は消費されません。「コピーのコピー」をコピーすることはできません。 +Bookshelf=本棚 +Bookshelves are used for decoration.=本棚は飾りとして使用します。 +Book and Quill=本と羽根ペン +Write down some notes=メモを書く diff --git a/mods/ITEMS/mcl_bows/locale/mcl_bows.ja.tr b/mods/ITEMS/mcl_bows/locale/mcl_bows.ja.tr new file mode 100644 index 0000000000..517622b473 --- /dev/null +++ b/mods/ITEMS/mcl_bows/locale/mcl_bows.ja.tr @@ -0,0 +1,18 @@ +# textdomain: mcl_bows +Arrow=矢 +Arrows are ammunition for bows and dispensers.=矢は、弓やディスペンサーの弾です。 +An arrow fired from a bow has a regular damage of 1-9. At full charge, there's a 20% chance of a critical hit dealing 10 damage instead. An arrow fired from a dispenser always deals 3 damage.=弓から放たれる矢は通常1~9のダメージです。最大タメで20%の確率でクリティカルヒットが発生し、代わりに10ダメージを与えます。ディスペンサーから発射された矢は、常に3ダメージを与えます。 +Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons.=矢は、固体のブロックに刺さる可能性があり、その場合は回収できます。また、木製のボタンも押せます。 +To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it.=矢を弓の弾として使うには、インベントリのどこかに入れるだけでよく、使い切るまで自動的に装填されます。矢をディスペンサーの弾薬として使用するには、ディスペンサーのインベントリに入れます。ブロックに刺さった矢を回収するには、ブロックの近くまで歩くだけです。 +Bow=弓 +Bows are ranged weapons to shoot arrows at your foes.=弓は、敵に矢を射るための遠距離武器です。 +The speed and damage of the arrow increases the longer you charge. The regular damage of the arrow is between 1 and 9. At full charge, there's also a 20% of a critical hit, dealing 10 damage instead.=矢の速度とダメージは、タメ時間が長いほど増加します。通常の矢のダメージは1~9です。最大タメ時には20%の確率でクリティカルヒットすることがあり、その場合は代わりに10ダメージを与えます。 +To use the bow, 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.=弓を使用するには、まずインベントリのどこかに少なくとも1本の矢が入っている必要があります(クリエイティブモードを除く)。マウスの右ボタンを押したままでタメ、離すと射ます。 +Bow=弓 +Ammunition=弾 +Damage from bow: 1-10=弓によるダメージ:1-10 +Damage from dispenser: 3=ディスペンサーによるダメージ:3 +Launches arrows=矢を発射 +Crossbow=クロスボウ +Crossbows are ranged weapons to shoot arrows at your foes.=クロスボウは、敵に矢を射るための遠距離武器です。 +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.=クロスボウを使用するには、まずインベントリのどこかに少なくとも1本の矢が入っている必要があります(クリエイティブモードを除く)。マウスの右ボタンを押したままでタメ、離すと射ます。 \ No newline at end of file diff --git a/mods/ITEMS/mcl_bows/rocket.lua b/mods/ITEMS/mcl_bows/rocket.lua index 6180472c17..e71c0c1220 100644 --- a/mods/ITEMS/mcl_bows/rocket.lua +++ b/mods/ITEMS/mcl_bows/rocket.lua @@ -19,6 +19,7 @@ local function dir_to_pitch(dir) end local function damage_explosion(self, damagemulitplier) + if self._harmless then return end local p = self.object:get_pos() if not p then return end mcl_explosions.explode(p, 3, {}) diff --git a/mods/ITEMS/mcl_brewing/locale/mcl_brewing.ja.tr b/mods/ITEMS/mcl_brewing/locale/mcl_brewing.ja.tr new file mode 100644 index 0000000000..684a99b8f7 --- /dev/null +++ b/mods/ITEMS/mcl_brewing/locale/mcl_brewing.ja.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_brewing +Brewing Stand=醸造台 +Inventory=インベントリ +To use a brewing stand, rightclick it.=醸造台を使うには、右クリックします。 +To brew, you need blaze powder as fuel, a brewing material and at least 1 glass bottle filled with a liquid.=醸造するには、燃料となるブレイズパウダー、醸造材料、および液体の入ったガラス瓶が最低1本必要です。 +Place the blaze powder in the left slot, the brewing material in the middle slot and 1-3 bottles in the remaining slots.=左スロットにブレイズパウダー、中央スロットに醸造材料、残りのスロットに1~3本の瓶を配置します。 +When you have found a good combination, the brewing will commence automatically and steam starts to appear, using up the fuel and brewing material. The potions will soon be ready.=良い組み合わせであれば、自動的に醸造が開始され蒸気が発生し、燃料と醸造材料を消費していきます。やがてポーションが完成するでしょう。 +Different combinations of brewing materials and liquids will give different results. Try to experiment!=醸造材料と液体の組み合わせが異なれば、得られる結果も異なります。ぜひ試してみてください! +The stand allows you to brew potions!=このスタンドは、あなたのポーション醸造を許す! +Brew Potions=ポーションの醸造 diff --git a/mods/ITEMS/mcl_buckets/fishbuckets.lua b/mods/ITEMS/mcl_buckets/fishbuckets.lua new file mode 100644 index 0000000000..9eb966084e --- /dev/null +++ b/mods/ITEMS/mcl_buckets/fishbuckets.lua @@ -0,0 +1,71 @@ +local S = minetest.get_translator(minetest.get_current_modname()) + +-- Fish Buckets +local fish_names = { + ["cod"] = "Cod", + ["salmon"] = "Salmon", + ["tropical_fish"] = "Tropical Fish", + ["axolotl"] = "Axolotl", + --["pufferfish"] = "Pufferfish", --FIXME add pufferfish +} + +local fishbucket_prefix = "mcl_buckets:bucket_" + +local function on_place_fish(itemstack, placer, pointed_thing) + + local new_stack = mcl_util.call_on_rightclick(itemstack, placer, pointed_thing) + if new_stack then + return new_stack + end + + 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)) + end + local water = "mcl_core:water_source" + if n.name == "mclx_core:river_water_source" then + water = n.name + elseif n.name == "mclx_core:river_water_flowing" then + water = nil + end + if mcl_worlds.pos_to_dimension(pos) == "nether" then + water = nil + minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true) + end + if water then + minetest.set_node(pos,{name = water}) + end + if not placer or not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack = ItemStack("mcl_buckets:bucket_empty") + end + end + end + return itemstack +end + +for techname, fishname in pairs(fish_names) do + minetest.register_craftitem(fishbucket_prefix .. techname, { + description = S("Bucket of @1", S(fishname)), + _doc_items_longdesc = S("This bucket is filled with water and @1.", S(fishname)), + _doc_items_usagehelp = S("Place it to empty the bucket and place a @1. Obtain by right clicking on a @2 with a bucket of water.", S(fishname), S(fishname)), + _tt_help = S("Places a water source and a @1.", S(fishname)), + inventory_image = techname .. "_bucket.png", + stack_max = 1, + groups = {bucket = 1, fish_bucket = 1}, + liquids_pointable = false, + on_place = on_place_fish, + on_secondary_use = on_place_fish, + _on_dispense = function(stack, pos, droppos, dropnode, dropdir) + return on_place_fish(stack, nil, {above=droppos}) + end, + }) + + minetest.register_alias("mcl_fishing:bucket_" .. techname, "mcl_buckets:bucket_" .. techname) +end diff --git a/mods/ITEMS/mcl_buckets/init.lua b/mods/ITEMS/mcl_buckets/init.lua index 7e47e7e073..0851c37571 100644 --- a/mods/ITEMS/mcl_buckets/init.lua +++ b/mods/ITEMS/mcl_buckets/init.lua @@ -160,7 +160,7 @@ local function on_place_bucket(itemstack, user, pointed_thing) if not pointed_thing or pointed_thing.type ~= "node" then return end - + -- Call on_rightclick if the pointed node defines it local new_stack = mcl_util.call_on_rightclick(itemstack, user, pointed_thing) if new_stack then @@ -202,7 +202,7 @@ local function on_place_bucket_empty(itemstack, user, pointed_thing) if not use_select_box then pointed_thing = bucket_get_pointed_thing(user) end - + -- Must be pointing to node if not pointed_thing or pointed_thing.type ~= "node" then return itemstack @@ -358,3 +358,4 @@ minetest.register_craftitem("mcl_buckets:bucket_empty", { }) dofile(modpath.."/register.lua") +dofile(modpath.."/fishbuckets.lua") diff --git a/mods/ITEMS/mcl_buckets/locale/mcl_buckets.ja.tr b/mods/ITEMS/mcl_buckets/locale/mcl_buckets.ja.tr new file mode 100644 index 0000000000..9da7d4dfb9 --- /dev/null +++ b/mods/ITEMS/mcl_buckets/locale/mcl_buckets.ja.tr @@ -0,0 +1,25 @@ +# textdomain: mcl_buckets +Empty Bucket=空のバケツ +A bucket can be used to collect and release liquids.=バケツは、液体の回収と放出に使えます。 +Punch a liquid source to collect it. You can then use the filled bucket to place the liquid somewhere else.=液体の源に使うと、それを回収します。何処かに満ちたバケツを使うと、液体を配置できます。 +Lava Bucket=溶岩入りバケツ +A bucket can be used to collect and release liquids. This one is filled with hot lava, safely contained inside. Use with caution.=バケツは、液体を集めたり出したりするのに使えます。この満たされた高温の溶岩は、安全に収容されています。使用の際はご注意ください。 +Get in a safe distance and place the bucket to empty it and create a lava source at this spot. Don't burn yourself!=安全な距離を取り、バケツを置いて空にし、この場所に溶岩源を作ります。ヤケドしないように! +Water Bucket=水入りバケツ +A bucket can be used to collect and release liquids. This one is filled with water.=バケツは、液体を集めたり出したりするのに使えます。これは水で満たされています。 +Place it to empty the bucket and create a water source.=これを置いてバケツを空にし、水源を作ります。 +River Water Bucket=河川水入りバケツ +A bucket can be used to collect and release liquids. This one is filled with river water.=バケツは、液体を集めたり出したりするのに使えます。これは河川水で満たされています。 +Place it to empty the bucket and create a river water source.=これを置いてバケツを空にし、河川水源を作ります。 +Collects liquids=液体を回収 +Places a lava source=溶岩源を配置 +Places a water source=水源を配置 +Places a river water source=河川水源を配置 +Axolotl=ウーパールーパー +Cod=タラ +Salmon=サケ +Tropical Fish=クマノミ +Bucket of @1=@1入りバケツ +This bucket is filled with water and @1.=このバケツには、水と@1が入っています。 +Place it to empty the bucket and place a @1. Obtain by right clicking on a @2 fish with a bucket of water.=バケツを空にするために@1を置きます。@2入りバケツを右クリックすると魚を入手します。 +Places a water source and a @1 fish.=水源と、@1の魚を配置 diff --git a/mods/ITEMS/mcl_buckets/locale/template.txt b/mods/ITEMS/mcl_buckets/locale/template.txt index 86b7b10b5b..29aaeace9a 100644 --- a/mods/ITEMS/mcl_buckets/locale/template.txt +++ b/mods/ITEMS/mcl_buckets/locale/template.txt @@ -15,10 +15,11 @@ Collects liquids= Places a lava source= Places a water source= Places a river water source= +Axolotl= Cod= Salmon= Tropical Fish= Bucket of @1= This bucket is filled with water and @1.= -Place it to empty the bucket and place a @1. Obtain by right clicking on a @2 fish with a bucket of water.= -Places a water source and a @1 fish.= +Place it to empty the bucket and place a @1. Obtain by right clicking on a @2 with a bucket of water.= +Places a water source and a @1.= diff --git a/mods/ITEMS/mcl_buckets/register.lua b/mods/ITEMS/mcl_buckets/register.lua index b54d0d2bfa..365966724a 100644 --- a/mods/ITEMS/mcl_buckets/register.lua +++ b/mods/ITEMS/mcl_buckets/register.lua @@ -118,38 +118,3 @@ minetest.register_craft({ burntime = 1000, replacements = {{"mcl_buckets:bucket_lava", "mcl_buckets:bucket_empty"}}, }) - --- Fish Buckets -fish_names = { - { techname = "cod", name = "Cod" }, - { techname = "salmon", name = "Salmon" }, - --{ techname = "pufferfish", name = "Pufferfish" } FIXME: Uncomment when pufferfish mobs are added. - { techname = "tropical_fish", name = "Tropical Fish" } -} - -for _, fish in pairs(fish_names) do - mcl_buckets.register_liquid({ - bucketname = "mcl_buckets:bucket_" .. fish.techname, - source_place = function(pos) - minetest.add_entity(pos, "mobs_mc:" .. fish.techname) - return "mcl_core:water_source" - end, - source_take = {"mobs_mc:" .. fish.techname}, - inventory_image = fish.techname .. "_bucket.png", - name = S("Bucket of @1", S(fish.name)), - longdesc = S("This bucket is filled with water and @1.", S(fish.name)), - usagehelp = S("Place it to empty the bucket and place a @1. Obtain by right clicking on a @2 fish with a bucket of water.", S(fish.name), S(fish.name)), - tt_help = S("Places a water source and a @1 fish.", S(fish.name)), - extra_check = function(pos, placer) - local dim = mcl_worlds.pos_to_dimension(pos) - if dim == "nether" then - minetest.sound_play("fire_extinguish_flame", {pos = pos, gain = 0.25, max_hear_distance = 16}, true) - return false, true - else - return true, true - end - end, - }) - minetest.register_alias("mcl_fishing:bucket_" .. fish.techname, "mcl_buckets:bucket_" .. fish.techname) -end - diff --git a/mods/ITEMS/mcl_buckets/textures/axolotl_bucket.png b/mods/ITEMS/mcl_buckets/textures/axolotl_bucket.png new file mode 100644 index 0000000000..1923991c12 Binary files /dev/null and b/mods/ITEMS/mcl_buckets/textures/axolotl_bucket.png differ diff --git a/mods/ITEMS/mcl_cake/locale/mcl_cake.ja.tr b/mods/ITEMS/mcl_cake/locale/mcl_cake.ja.tr new file mode 100644 index 0000000000..69b0dd78f2 --- /dev/null +++ b/mods/ITEMS/mcl_cake/locale/mcl_cake.ja.tr @@ -0,0 +1,12 @@ +# textdomain: mcl_cake +Cake=ケーキ +Cakes can be placed and eaten to restore hunger points. A cake has 7 slices. Each slice restores 2 hunger points and 0.4 saturation points. Cakes will be destroyed when dug or when the block below them is broken.=ケーキは置くと食べる事ができ、満腹度が回復します。一つのケーキは7口分に切ってあります。1口につき満腹度が2、隠し満腹度が0.4回復します。ケーキは、それを掘ったり、その下のブロックを壊したりすると消滅します。 +Place the cake anywhere, then rightclick it to eat a single slice. You can't eat from the cake when your hunger bar is full.=ケーキを任意の場所に置き、右クリックで一切れ食べます。満腹ゲージが満タンの状態では、食べられません。 +Cake (6 Slices Left)=ケーキ(残り6切れ) +Cake (5 Slices Left)=ケーキ(残り5切れ) +Cake (4 Slices Left)=ケーキ(残り4切れ) +Cake (3 Slices Left)=ケーキ(残り3切れ) +Cake (2 Slices Left)=ケーキ(残り2切れ) +Cake (1 Slice Left)=ケーキ(残り1切れ) +With 7 tasty slices!=7枚切りのおいしいスイーツ! +Hunger points: +@1 per slice=満腹度:+@1/1切れ diff --git a/mods/ITEMS/mcl_campfires/locale/mcl_campfires.ja.tr b/mods/ITEMS/mcl_campfires/locale/mcl_campfires.ja.tr new file mode 100644 index 0000000000..cf311ebd22 --- /dev/null +++ b/mods/ITEMS/mcl_campfires/locale/mcl_campfires.ja.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_campfires +Campfire=焚き火 +Soul Campfire=魂の焚き火 +Cooks food and keeps bees happy.=食料を調理したり、ミツバチ達を温和にしたりします。 +Campfires have multiple uses, including keeping bees happy, cooking raw meat and fish, and as a trap.=焚き火には色々な用途があります:ミツバチを温和にする、生の肉や魚を調理する、罠として使う \ No newline at end of file diff --git a/mods/ITEMS/mcl_cartography_table/locale/mcl_cartography_table.ja.tr b/mods/ITEMS/mcl_cartography_table/locale/mcl_cartography_table.ja.tr new file mode 100644 index 0000000000..91c01c2d00 --- /dev/null +++ b/mods/ITEMS/mcl_cartography_table/locale/mcl_cartography_table.ja.tr @@ -0,0 +1,4 @@ +# textdomain: mcl_cartography_table +Cartography Table=製図台 +Used to create or copy maps=地図の作成やコピーに使用 +Is used to create or copy maps for use..=地図の作成やコピーに使用します。 diff --git a/mods/ITEMS/mcl_cauldrons/locale/mcl_cauldrons.ja.tr b/mods/ITEMS/mcl_cauldrons/locale/mcl_cauldrons.ja.tr new file mode 100644 index 0000000000..da0a3495a2 --- /dev/null +++ b/mods/ITEMS/mcl_cauldrons/locale/mcl_cauldrons.ja.tr @@ -0,0 +1,11 @@ +# textdomain: mcl_cauldrons +Cauldron=大釜 +Cauldrons are used to store water and slowly fill up under rain. They can also be used to wash off banners.=大釜は水を溜めるためのもので、雨が降るとゆっくりと水が溜まっていきます。また、旗を洗い流すのにも使えます。 +Place a water bucket into the cauldron to fill it with water. Place an empty bucket on a full cauldron to retrieve the water. Place a water bottle into the cauldron to fill the cauldron to one third with water. Place a glass bottle in a cauldron with water to retrieve one third of the water. Use an emblazoned banner on a cauldron with water to wash off its top layer.=大釜に水入りバケツを置くと、水で満たします。満杯の大釜に空のバケツを置くと、水を回収します。大釜に水入り瓶を置くと、大釜に1段階分(容積の1/3)の水を注ぎます。水入りの大釜にガラス瓶を置くと、大釜から1段階分の水を回収します。水入りの大釜にエンブレム入りの旗を使うと、その一番上にあるレイヤーを洗い落とします。 +Cauldron (1/3 Water)=大釜(水 1/3) +Cauldron (2/3 Water)=大釜(水 2/3) +Cauldron (3/3 Water)=大釜(水 3/3) +Cauldron (1/3 River Water)=大釜(河川水 1/3) +Cauldron (2/3 River Water)=大釜(河川水 2/3) +Cauldron (3/3 River Water)=大釜(河川水 3/3) +Stores water=水を溜めておく diff --git a/mods/ITEMS/mcl_chests/init.lua b/mods/ITEMS/mcl_chests/init.lua index 9926906e20..6d46103a32 100644 --- a/mods/ITEMS/mcl_chests/init.lua +++ b/mods/ITEMS/mcl_chests/init.lua @@ -32,8 +32,10 @@ end local tiles_chest_ender_small = {"mcl_chests_ender.png"} +local ender_chest_texture = {"mcl_chests_ender.png"} if it_is_christmas then tiles_chest_ender_small = {"mcl_chests_ender_present.png^mcl_chests_noise.png"} + ender_chest_texture = {"mcl_chests_ender_present.png"} end -- Chest Entity @@ -1008,9 +1010,9 @@ minetest.register_node("mcl_chests:ender_chest_small", { drawtype = "nodebox", node_box = { type = "fixed", - fixed = {-0.4375, -0.5, -0.4375, 0.5, 0.375, 0.4375}, + fixed = {-0.4375, -0.5, -0.4375, 0.4375, 0.375, 0.4375}, }, - _chest_entity_textures = {"mcl_chests_ender.png"}, + _chest_entity_textures = ender_chest_texture, _chest_entity_sound = "mcl_chests_enderchest", _chest_entity_mesh = "mcl_chests_chest", _chest_entity_animation_type = "chest", @@ -1026,7 +1028,7 @@ minetest.register_node("mcl_chests:ender_chest_small", { sounds = mcl_sounds.node_sound_stone_defaults(), drop = "mcl_core:obsidian 8", on_construct = function(pos) - create_entity(pos, "mcl_chests:ender_chest_small", {"mcl_chests_ender.png"}, minetest.get_node(pos).param2, false, "mcl_chests_enderchest", "mcl_chests_chest", "chest") + create_entity(pos, "mcl_chests:ender_chest_small", ender_chest_texture, minetest.get_node(pos).param2, false, "mcl_chests_enderchest", "mcl_chests_chest", "chest") end, on_rightclick = function(pos, node, clicker) if minetest.registered_nodes[minetest.get_node({x = pos.x, y = pos.y + 1, z = pos.z}).name].groups.opaque == 1 then @@ -1034,7 +1036,7 @@ minetest.register_node("mcl_chests:ender_chest_small", { return false end minetest.show_formspec(clicker:get_player_name(), "mcl_chests:ender_chest_"..clicker:get_player_name(), formspec_ender_chest) - player_chest_open(clicker, pos, "mcl_chests:ender_chest_small", {"mcl_chests_ender.png"}, node.param2, false, "mcl_chests_enderchest", "mcl_chests_chest") + player_chest_open(clicker, pos, "mcl_chests:ender_chest_small", ender_chest_texture, node.param2, false, "mcl_chests_enderchest", "mcl_chests_chest") end, on_receive_fields = function(pos, formname, fields, sender) if fields.quit then @@ -1221,6 +1223,10 @@ for color, desc in pairs(boxtypes) do _doc_items_longdesc = longdesc, _doc_items_usagehelp = usagehelp, drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = {-0.48, -0.5, -0.48, 0.48, 0.489, 0.48}, + }, tiles = {"blank.png^[resize:16x16"}, use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true, _chest_entity_textures = {mob_texture}, diff --git a/mods/ITEMS/mcl_chests/locale/mcl_chests.ja.tr b/mods/ITEMS/mcl_chests/locale/mcl_chests.ja.tr new file mode 100644 index 0000000000..8f65254114 --- /dev/null +++ b/mods/ITEMS/mcl_chests/locale/mcl_chests.ja.tr @@ -0,0 +1,36 @@ +# textdomain: mcl_chests +Chest=チェスト +Chests are containers which provide 27 inventory slots. Chests can be turned into large chests with double the capacity by placing two chests next to each other.=チェストは、27個のインベントリースロットを備える収納箱です。チェストを2つ並べると、2倍の容量を備えるラージチェストになります。 +To access its inventory, rightclick it. When broken, the items will drop out.=インベントリにアクセスするには、右クリックします。壊れると、アイテムがドロップアウトします。 +Trapped Chest=トラップチェスト +A trapped chest is a container which provides 27 inventory slots. When it is opened, it sends a redstone signal to its adjacent blocks as long it stays open. Trapped chests can be turned into large trapped chests with double the capacity by placing two trapped chests next to each other.=トラップチェストは、27個のインベントリースロットを備える収納箱です。それを開いている間は、隣接するブロックにレッドストーン信号を送ります。トラップチェストを2つ並べると、2倍の容量を備えるラージトラップチェストになります。 +Ender Chest=エンダーチェスト +Ender chests grant you access to a single personal interdimensional inventory with 27 slots. This inventory is the same no matter from which ender chest you access it from. If you put one item into one ender chest, you will find it in all other ender chests. Each player will only see their own items, but not the items of other players.=エンダーチェストからは、「ただ1つの、個人専用の次元間インベントリ」にアクセスできます。そのインベントリには27個のスロットが備わっています。どのエンダーチェストを開けても、そのただ1つのインベントリにアクセスする仕組みになっています。例えば、あるエンダーチェストにアイテムを入れておくと、他にあるどのエンダーチェストからでもそのアイテムが見え、取り出せます。このインベントリは各プレイヤー専用であるため、他のプレイヤーが開けた時は、そのプレイヤーには当人専用のインベントリが見えています。つまり他人のインベントリにはアクセスできません。 +Rightclick the ender chest to access your personal interdimensional inventory.=エンダーチェストを右クリックすると、個人専用の次元間インベントリにアクセスします。 +White Shulker Box=白色のシュルカーボックス +Light Grey Shulker Box=薄灰色のシュルカーボックス +Orange Shulker Box=橙色のシュルカーボックス +Cyan Shulker Box=青緑色のシュルカーボックス +Magenta Shulker Box=赤紫色のシュルカーボックス +Purple Shulker Box=紫色のシュルカーボックス +Light Blue Shulker Box=空色のシュルカーボックス +Blue Shulker Box=青色のシュルカーボックス +Yellow Shulker Box=黄色のシュルカーボックス +Brown Shulker Box=茶色のシュルカーボックス +Lime Shulker Box=黄緑色のシュルカーボックス +Green Shulker Box=緑色のシュルカーボックス +Pink Shulker Box=桃色のシュルカーボックス +Red Shulker Box=赤色のシュルカーボックス +Grey Shulker Box=灰色のシュルカーボックス +Black Shulker Box=黒色のシュルカーボックス +A shulker box is a portable container which provides 27 inventory slots for any item except shulker boxes. Shulker boxes keep their inventory when broken, so shulker boxes as well as their contents can be taken as a single item. Shulker boxes come in many different colors.=シュルカーボックスは、27個のインベントリスロットを備える「持ち運び可能な収納箱」で、シュルカーボックス以外のアイテムを保管できます。シュルカーボックスは壊れても、中身をドロップアウトせず保持したそのままで、1つのアイテムとしてドロップされます。それを回収し再設置できます。シュルカーボックスにはさまざまな色があります。 +To access the inventory of a shulker box, place and right-click it. To take a shulker box and its contents with you, just break and collect it, the items will not fall out. Place the shulker box again to be able to retrieve its contents.=シュルカーボックスのインベントリにアクセスするには、設置して右クリックします。シュルカーボックスとその中身を持ち運ぶには、壊して回収するだけです。中身はこぼれ落ちません。再びシュルカーボックスを置くと、中身を取り出せます。 +Shulker Box=シュルカーボックス +Large Chest=ラージチェスト +Inventory=インベントリ +27 inventory slots=27個のインベントリスロット +Can be carried around with its contents=中身を入れたまま持ち運び可能 +Can be combined to a large chest=ラージチェストに連結可能 +27 interdimensional inventory slots=27個の次元間インベントリスロット +Put items inside, retrieve them from any ender chest=中にアイテムを入れ、任意のエンダーチェストから取り出し可能 +Emits a redstone signal when opened=開くとレッドストーン信号を発する diff --git a/mods/ITEMS/mcl_chests/models/mcl_chests_chest.b3d b/mods/ITEMS/mcl_chests/models/mcl_chests_chest.b3d index 435761069f..5cc1b8edce 100644 Binary files a/mods/ITEMS/mcl_chests/models/mcl_chests_chest.b3d and b/mods/ITEMS/mcl_chests/models/mcl_chests_chest.b3d differ diff --git a/mods/ITEMS/mcl_chests/models/mcl_chests_chest_double.b3d b/mods/ITEMS/mcl_chests/models/mcl_chests_chest_double.b3d index 87c69b4a7b..578b3cb724 100644 Binary files a/mods/ITEMS/mcl_chests/models/mcl_chests_chest_double.b3d and b/mods/ITEMS/mcl_chests/models/mcl_chests_chest_double.b3d differ diff --git a/mods/ITEMS/mcl_clock/locale/mcl_clock.ja.tr b/mods/ITEMS/mcl_clock/locale/mcl_clock.ja.tr new file mode 100644 index 0000000000..454788a297 --- /dev/null +++ b/mods/ITEMS/mcl_clock/locale/mcl_clock.ja.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_clock +Clocks are tools which shows the current time of day in the Overworld.=時計は、オーバーワールドの現在時刻を表示する道具です。 +The clock contains a rotating disc with a sun symbol (yellow disc) and moon symbol and a little “pointer” which shows the current time of day by estimating the real position of the sun and the moon in the sky. Noon is represented by the sun symbol and midnight is represented by the moon symbol.=この時計は、太陽マーク(黄色い円)と月マークが描かれた回転ディスクと、小さな「ポインター」で構成されています。太陽と月の位置から現在時刻を推定しましょう。ポインターにちょうど太陽マークがきた時が正午、月マークなら零時です。 +Clock=時計 +Displays the time of day in the Overworld=オーバーワールドの現在時刻を表示 diff --git a/mods/ITEMS/mcl_cocoas/init.lua b/mods/ITEMS/mcl_cocoas/init.lua index 60ea9e5737..7c22927f84 100644 --- a/mods/ITEMS/mcl_cocoas/init.lua +++ b/mods/ITEMS/mcl_cocoas/init.lua @@ -62,36 +62,21 @@ function mcl_cocoas.grow(pos) return false end --- Note: cocoa beans are implemented as mcl_dye:brown - -- Cocoa definition -- 1st stage - ---[[ TODO: Use a mesh for cocoas for perfect texture compability. ]] local crop_def = { description = S("Premature Cocoa Pod"), _doc_items_create_entry = true, _doc_items_longdesc = S("Cocoa pods grow on the side of jungle trees in 3 stages."), - drawtype = "nodebox", - tiles = { - "[combine:16x16:6,1=mcl_cocoas_cocoa_stage_0.png", "[combine:16x16:6,11=mcl_cocoas_cocoa_stage_0.png", - "mcl_cocoas_cocoa_stage_0.png", "mcl_cocoas_cocoa_stage_0.png^[transformFX", - "[combine:16x16:-5,0=mcl_cocoas_cocoa_stage_0.png", "[combine:16x16:-5,0=mcl_cocoas_cocoa_stage_0.png", - }, + drawtype = "mesh", + mesh = "mcl_cocoas_cocoa_stage_0.obj", + tiles = {"mcl_cocoas_cocoa_stage_0.png"}, use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true, paramtype = "light", sunlight_propagates = true, paramtype2 = "facedir", walkable = true, - drop = "mcl_dye:brown", - node_box = { - type = "fixed", - fixed = { - {-0.125, -0.0625, 0.1875, 0.125, 0.25, 0.4375}, -- Pod - -- FIXME: This has a thickness of 0. Is this OK in Minetest? - {0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem - }, - }, + drop = "mcl_cocoas:cocoa_beans", collision_box = { type = "fixed", fixed = { @@ -119,18 +104,8 @@ minetest.register_node("mcl_cocoas:cocoa_1", table.copy(crop_def)) crop_def.description = S("Medium Cocoa Pod") crop_def._doc_items_create_entry = false crop_def.groups.cocoa = 2 -crop_def.tiles = { - "[combine:16x16:5,1=mcl_cocoas_cocoa_stage_1.png", "[combine:16x16:5,9=mcl_cocoas_cocoa_stage_1.png", - "mcl_cocoas_cocoa_stage_1.png", "mcl_cocoas_cocoa_stage_1.png^[transformFX", - "[combine:16x16:-4,0=mcl_cocoas_cocoa_stage_1.png", "[combine:16x16:-4,0=mcl_cocoas_cocoa_stage_1.png", -} -crop_def.node_box = { - type = "fixed", - fixed = { - {-0.1875, -0.1875, 0.0625, 0.1875, 0.25, 0.4375}, -- Pod - {0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem - }, -} +crop_def.mesh = "mcl_cocoas_cocoa_stage_1.obj" +crop_def.tiles = {"mcl_cocoas_cocoa_stage_1.png"} crop_def.collision_box = { type = "fixed", fixed = { @@ -151,20 +126,8 @@ crop_def.description = S("Mature Cocoa Pod") crop_def._doc_items_longdesc = S("A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further.") crop_def._doc_items_create_entry = true crop_def.groups.cocoa = 3 -crop_def.tiles = { - -- The following 2 textures were derived from the original because the size of the top/bottom is slightly different :-( - -- TODO: Find a way to *only* use the base texture - "mcl_cocoas_cocoa_top_stage_2.png", "mcl_cocoas_cocoa_top_stage_2.png^[transformFY", - "mcl_cocoas_cocoa_stage_2.png", "mcl_cocoas_cocoa_stage_2.png^[transformFX", - "[combine:16x16:-3,0=mcl_cocoas_cocoa_stage_2.png", "[combine:16x16:-3,0=mcl_cocoas_cocoa_stage_2.png", -} -crop_def.node_box = { - type = "fixed", - fixed = { - {-0.25, -0.3125, -0.0625, 0.25, 0.25, 0.4375}, -- Pod - {0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem - }, -} +crop_def.mesh = "mcl_cocoas_cocoa_stage_2.obj" +crop_def.tiles = {"mcl_cocoas_cocoa_stage_2.png"} crop_def.collision_box = { type = "fixed", fixed = { @@ -177,9 +140,20 @@ crop_def.selection_box = { {-0.25, -0.3125, -0.0625, 0.25, 0.5, 0.5}, }, } -crop_def.drop = "mcl_dye:brown 3" +crop_def.drop = "mcl_cocoas:cocoa_beans 3" minetest.register_node("mcl_cocoas:cocoa_3", table.copy(crop_def)) +minetest.register_craftitem("mcl_cocoas:cocoa_beans", { + description = S("Cocoa Beans"), + _tt_help = S("Grows at the side of jungle trees"), + _doc_items_longdesc = S("Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye."), + _doc_items_usagehelp = S("Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa."), + inventory_image = "mcl_cocoas_cocoa_beans.png", + groups = {craftitem = 1, compostability = 65}, + on_place = function(itemstack, placer, pointed_thing) + return cocoa_place(itemstack, placer, pointed_thing, "mcl_cocoas:cocoa_1") + end, +}) minetest.register_abm({ label = "Cocoa pod growth", @@ -197,4 +171,3 @@ minetest.register_abm({ if minetest.get_modpath("doc") then doc.add_entry_alias("nodes", "mcl_cocoas:cocoa_1", "nodes", "mcl_cocoas:cocoa_2") end - diff --git a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.de.tr b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.de.tr index 479e3845e4..3740c41cfa 100644 --- a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.de.tr +++ b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.de.tr @@ -1,4 +1,8 @@ # textdomain: mcl_cocoas +Cocoa Beans=Kakaobohnen +Grows at the side of jungle trees=Wächst an der Seite von Dschungelbäumen +Cocoa beans can be used to plant cocoa pods, bake chocolate cookies or craft brown dye.=Kakaobohnen können benutzt werden, um Kakao anzupflanzen, Kekse zu backen oder braune Farbstoffe herzustellen. +Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Rechtsklicken Sie an die Seite eines Dschungelbaumstamms (Dschungelholz), um eine junge Kakaoschote zu pflanzen. Premature Cocoa Pod=Junge Kakaoschote Cocoa pods grow on the side of jungle trees in 3 stages.=Kakaoschoten wachsen an der Seite von Dschungelbäumen in 3 Stufen. Medium Cocoa Pod=Mittelgroße Kakaoschote diff --git a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.es.tr b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.es.tr index e1477c79cb..c76fc512f1 100644 --- a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.es.tr +++ b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.es.tr @@ -1,4 +1,8 @@ # textdomain: mcl_cocoas +Cocoa Beans=Granos de cacao +Grows at the side of jungle trees=Crece al lado de los árboles de la jungla +Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.=Los granos de cacao se pueden usar para plantar cacao, hornear galletas o hacer tintes marrones. +Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Haga clic derecho en el costado del tronco de un árbol de la jungla para plantar un cacao joven. Premature Cocoa Pod=Vaina de cacao prematura Cocoa pods grow on the side of jungle trees in 3 stages.=Las vainas de cacao crecen al lado de los árboles de jungla en 3 etapas. Medium Cocoa Pod=Vaina de cacao mediana diff --git a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.fr.tr b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.fr.tr index bf54689534..5d64eb5be7 100644 --- a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.fr.tr +++ b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.fr.tr @@ -1,4 +1,8 @@ # textdomain: mcl_cocoas +Cocoa Beans=Fèves de Cacao +Grows at the side of jungle trees=Pousse à côté des arbres de la jungle +Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.=Les fèves de cacao peuvent être utilisées pour planter du cacao, faire des biscuits ou fabriquer de la teinture brune. +Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Clic droit sur le côté d'un tronc d'arbre de la jungle (Bois Acajou) pour planter un jeune cacaoyer. Premature Cocoa Pod=Gousse de cacao prématurée Cocoa pods grow on the side of jungle trees in 3 stages.=Les cabosses de cacao poussent sur le côté des arbres d'Acajou en 3 étapes. Medium Cocoa Pod=Gousse de cacao moyenne diff --git a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.ja.tr b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.ja.tr new file mode 100644 index 0000000000..56117c8112 --- /dev/null +++ b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.ja.tr @@ -0,0 +1,6 @@ +# textdomain: mcl_cocoas +Premature Cocoa Pod=未成熟なカカオの実 +Cocoa pods grow on the side of jungle trees in 3 stages.=カカオの実は、ジャングルの木の側面に3段階で成長します。 +Medium Cocoa Pod=成熟しつつあるカカオの実 +Mature Cocoa Pod=成熟したカカオの実 +A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further.=成熟したカカオの実は、ジャングルの木で最大まで成長し、カカオ豆を収穫できるようになった状態です。これ以上は成長しません。 diff --git a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.pl.tr b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.pl.tr index bfd0d707ed..83df9be7a0 100644 --- a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.pl.tr +++ b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.pl.tr @@ -1,4 +1,8 @@ # textdomain: mcl_cocoas +Cocoa Beans=Ziarna kakaowe +Grows at the side of jungle trees=Rośnie na boku tropikalnych drzew +Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.=Ziarna kakaowe mogą być używane do sadzenia kakao, pieczenia ciasteczek lub robienia brązowego barwnika. +Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Naciśnij prawym na boku tropikalnego pnia (Tropikalne drewno) aby zasadzić młode kakao. Premature Cocoa Pod=Niedojrzała roślina kakao Cocoa pods grow on the side of jungle trees in 3 stages.=Roślina kakao rośnie na bokach tropikalnych drzew w 3 etapach Medium Cocoa Pod=Średnio-dojrzała roślina kakao diff --git a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.ru.tr b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.ru.tr index 524c28bcc4..064c01fd38 100644 --- a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.ru.tr +++ b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.ru.tr @@ -1,4 +1,8 @@ # textdomain: mcl_cocoas +Cocoa Beans=Какао-бобы +Grows at the side of jungle trees=Растут на стволах деревьев джунглей +Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.=Какао-бобы можно использовать для посадки какао, выпечки печенья или изготовления коричневого красителя. +Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=Кликните правой по боковой части ствола дерева джунглей, чтобы посадить молодое какао. Premature Cocoa Pod=Молодой стручок какао Cocoa pods grow on the side of jungle trees in 3 stages.=Стручки какао растут на деревьях джунглей в 3 этапа. Medium Cocoa Pod=Средний стручок какао diff --git a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.zh_TW.tr b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.zh_TW.tr index d71e2b11b1..0387461554 100644 --- a/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.zh_TW.tr +++ b/mods/ITEMS/mcl_cocoas/locale/mcl_cocoas.zh_TW.tr @@ -1,4 +1,8 @@ # textdomain: mcl_cocoas +Cocoa Beans=可可豆 +Grows at the side of jungle trees=在叢林木側生長 +Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.=可可豆可用於種植可可、烘烤餅乾或製作棕色染料。 +Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=右鍵點擊叢林木的一側,可以種植一個可可。 Premature Cocoa Pod=成長中的可可豆莢(第1階段) Cocoa pods grow on the side of jungle trees in 3 stages.=可可莢果分3個階段生長在叢林樹的側面。 Medium Cocoa Pod=成長中的可可豆莢(第2階段) diff --git a/mods/ITEMS/mcl_cocoas/locale/template.txt b/mods/ITEMS/mcl_cocoas/locale/template.txt index f68318cae8..cb8c5bbfdb 100644 --- a/mods/ITEMS/mcl_cocoas/locale/template.txt +++ b/mods/ITEMS/mcl_cocoas/locale/template.txt @@ -1,4 +1,8 @@ # textdomain: mcl_cocoas +Cocoa Beans= +Grows at the side of jungle trees= +Cocoa beans can be used to plant cocoa, bake cookies or craft brown dye.= +Right click on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.= Premature Cocoa Pod= Cocoa pods grow on the side of jungle trees in 3 stages.= Medium Cocoa Pod= diff --git a/mods/ITEMS/mcl_cocoas/models/mcl_cocoas_cocoa_stage_0.obj b/mods/ITEMS/mcl_cocoas/models/mcl_cocoas_cocoa_stage_0.obj new file mode 100644 index 0000000000..35dbb2d006 --- /dev/null +++ b/mods/ITEMS/mcl_cocoas/models/mcl_cocoas_cocoa_stage_0.obj @@ -0,0 +1,95 @@ +# Made in Blockbench 4.5.1 +mtllib Cocoa Pod 0.mtl + +o cube +v 0.125 0.25 0.4375 +v 0.125 0.25 0.1875 +v 0.125 -0.0625 0.4375 +v 0.125 -0.0625 0.1875 +v -0.125 0.25 0.1875 +v -0.125 0.25 0.4375 +v -0.125 -0.0625 0.1875 +v -0.125 -0.0625 0.4375 +vt 0.6875 0.75 +vt 0.9375 0.75 +vt 0.9375 0.4375 +vt 0.6875 0.4375 +vt 0.6875 0.75 +vt 0.9375 0.75 +vt 0.9375 0.4375 +vt 0.6875 0.4375 +vt 0.6875 0.75 +vt 0.9375 0.75 +vt 0.9375 0.4375 +vt 0.6875 0.4375 +vt 0.6875 0.75 +vt 0.9375 0.75 +vt 0.9375 0.4375 +vt 0.6875 0.4375 +vt 0 1 +vt 0.25 1 +vt 0.25 0.75 +vt 0 0.75 +vt 0 1 +vt 0.25 1 +vt 0.25 0.75 +vt 0 0.75 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl m_a7cd0525-4079-c203-6c53-7d43da5fa1e5 +f 4/4/1 7/3/1 5/2/1 2/1/1 +f 3/8/2 4/7/2 2/6/2 1/5/2 +f 8/12/3 3/11/3 1/10/3 6/9/3 +f 7/16/4 8/15/4 6/14/4 5/13/4 +f 6/20/5 1/19/5 2/18/5 5/17/5 +f 7/24/6 4/23/6 3/22/6 8/21/6 +o cube +v 0 0.5 0.5 +v 0 0.5 0.25 +v 0 0.25 0.5 +v 0 0.25 0.25 +v 0 0.5 0.25 +v 0 0.5 0.5 +v 0 0.25 0.25 +v 0 0.25 0.5 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0 0.25 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0.75 1 +vt 1 1 +vt 1 0.75 +vt 0.75 0.75 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl m_a7cd0525-4079-c203-6c53-7d43da5fa1e5 +f 12/28/7 15/27/7 13/26/7 10/25/7 +f 11/32/8 12/31/8 10/30/8 9/29/8 +f 16/36/9 11/35/9 9/34/9 14/33/9 +f 15/40/10 16/39/10 14/38/10 13/37/10 +f 14/44/11 9/43/11 10/42/11 13/41/11 +f 15/48/12 12/47/12 11/46/12 16/45/12 \ No newline at end of file diff --git a/mods/ITEMS/mcl_cocoas/models/mcl_cocoas_cocoa_stage_1.obj b/mods/ITEMS/mcl_cocoas/models/mcl_cocoas_cocoa_stage_1.obj new file mode 100644 index 0000000000..2a5277856f --- /dev/null +++ b/mods/ITEMS/mcl_cocoas/models/mcl_cocoas_cocoa_stage_1.obj @@ -0,0 +1,95 @@ +# Made in Blockbench 4.5.1 +mtllib Cocoa Pod 1.mtl + +o cube +v 0.1875 0.25 0.4375 +v 0.1875 0.25 0.0625 +v 0.1875 -0.1875 0.4375 +v 0.1875 -0.1875 0.0625 +v -0.1875 0.25 0.0625 +v -0.1875 0.25 0.4375 +v -0.1875 -0.1875 0.0625 +v -0.1875 -0.1875 0.4375 +vt 0.5625 0.75 +vt 0.9375 0.75 +vt 0.9375 0.3125 +vt 0.5625 0.3125 +vt 0.5625 0.75 +vt 0.9375 0.75 +vt 0.9375 0.3125 +vt 0.5625 0.3125 +vt 0.5625 0.75 +vt 0.9375 0.75 +vt 0.9375 0.3125 +vt 0.5625 0.3125 +vt 0.5625 0.75 +vt 0.9375 0.75 +vt 0.9375 0.3125 +vt 0.5625 0.3125 +vt 0 1 +vt 0.375 1 +vt 0.375 0.625 +vt 0 0.625 +vt 0 1 +vt 0.375 1 +vt 0.375 0.625 +vt 0 0.625 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl m_3316e529-b95a-149b-2db3-3eee58b06c25 +f 4/4/1 7/3/1 5/2/1 2/1/1 +f 3/8/2 4/7/2 2/6/2 1/5/2 +f 8/12/3 3/11/3 1/10/3 6/9/3 +f 7/16/4 8/15/4 6/14/4 5/13/4 +f 6/20/5 1/19/5 2/18/5 5/17/5 +f 7/24/6 4/23/6 3/22/6 8/21/6 +o cube +v 0 0.5 0.5 +v 0 0.5 0.25 +v 0 0.25 0.5 +v 0 0.25 0.25 +v 0 0.5 0.25 +v 0 0.5 0.5 +v 0 0.25 0.25 +v 0 0.25 0.5 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0.75 1 +vt 1 1 +vt 1 0.75 +vt 0.75 0.75 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl m_3316e529-b95a-149b-2db3-3eee58b06c25 +f 12/28/7 15/27/7 13/26/7 10/25/7 +f 11/32/8 12/31/8 10/30/8 9/29/8 +f 16/36/9 11/35/9 9/34/9 14/33/9 +f 15/40/10 16/39/10 14/38/10 13/37/10 +f 14/44/11 9/43/11 10/42/11 13/41/11 +f 15/48/12 12/47/12 11/46/12 16/45/12 \ No newline at end of file diff --git a/mods/ITEMS/mcl_cocoas/models/mcl_cocoas_cocoa_stage_2.obj b/mods/ITEMS/mcl_cocoas/models/mcl_cocoas_cocoa_stage_2.obj new file mode 100644 index 0000000000..8dfd20af1b --- /dev/null +++ b/mods/ITEMS/mcl_cocoas/models/mcl_cocoas_cocoa_stage_2.obj @@ -0,0 +1,95 @@ +# Made in Blockbench 4.5.1 +mtllib Cocoa Pod 2 Fixed.mtl + +o cube +v 0.25 0.25 0.4375 +v 0.25 0.25 -0.0625 +v 0.25 -0.3125 0.4375 +v 0.25 -0.3125 -0.0625 +v -0.25 0.25 -0.0625 +v -0.25 0.25 0.4375 +v -0.25 -0.3125 -0.0625 +v -0.25 -0.3125 0.4375 +vt 0.5 0.75 +vt 1 0.75 +vt 1 0.1875 +vt 0.5 0.1875 +vt 0.5 0.75 +vt 1 0.75 +vt 1 0.1875 +vt 0.5 0.1875 +vt 0.5 0.75 +vt 1 0.75 +vt 1 0.1875 +vt 0.5 0.1875 +vt 0.5 0.75 +vt 1 0.75 +vt 1 0.1875 +vt 0.5 0.1875 +vt 0 1 +vt 0.5 1 +vt 0.5 0.5 +vt 0 0.5 +vt 0 1 +vt 0.5 1 +vt 0.5 0.5 +vt 0 0.5 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl m_9809ffe0-030e-1955-c510-8df6b242b4e2 +f 4/4/1 7/3/1 5/2/1 2/1/1 +f 3/8/2 4/7/2 2/6/2 1/5/2 +f 8/12/3 3/11/3 1/10/3 6/9/3 +f 7/16/4 8/15/4 6/14/4 5/13/4 +f 6/20/5 1/19/5 2/18/5 5/17/5 +f 7/24/6 4/23/6 3/22/6 8/21/6 +o cube +v 0 0.5 0.5 +v 0 0.5 0.25 +v 0 0.25 0.5 +v 0 0.25 0.25 +v 0 0.5 0.25 +v 0 0.5 0.5 +v 0 0.25 0.25 +v 0 0.25 0.5 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0.75 1 +vt 1 1 +vt 1 0.75 +vt 0.75 0.75 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vt 0 0.25 +vt 0 0.25 +vt 0 0 +vt 0 0 +vn 0 0 -1 +vn 1 0 0 +vn 0 0 1 +vn -1 0 0 +vn 0 1 0 +vn 0 -1 0 +usemtl m_9809ffe0-030e-1955-c510-8df6b242b4e2 +f 12/28/7 15/27/7 13/26/7 10/25/7 +f 11/32/8 12/31/8 10/30/8 9/29/8 +f 16/36/9 11/35/9 9/34/9 14/33/9 +f 15/40/10 16/39/10 14/38/10 13/37/10 +f 14/44/11 9/43/11 10/42/11 13/41/11 +f 15/48/12 12/47/12 11/46/12 16/45/12 \ No newline at end of file diff --git a/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_beans.png b/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_beans.png new file mode 100644 index 0000000000..877ee69dc2 Binary files /dev/null and b/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_beans.png differ diff --git a/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_stage_0.png b/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_stage_0.png index de58245f4b..37510cb526 100644 Binary files a/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_stage_0.png and b/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_stage_0.png differ diff --git a/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_stage_2.png b/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_stage_2.png index 47bc159b7c..c5f2c17fc9 100644 Binary files a/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_stage_2.png and b/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_stage_2.png differ diff --git a/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_top_stage_2.png b/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_top_stage_2.png deleted file mode 100644 index 4e12f623b2..0000000000 Binary files a/mods/ITEMS/mcl_cocoas/textures/mcl_cocoas_cocoa_top_stage_2.png and /dev/null differ diff --git a/mods/ITEMS/mcl_colorblocks/locale/mcl_colorblocks.ja.tr b/mods/ITEMS/mcl_colorblocks/locale/mcl_colorblocks.ja.tr new file mode 100644 index 0000000000..153b1a55a3 --- /dev/null +++ b/mods/ITEMS/mcl_colorblocks/locale/mcl_colorblocks.ja.tr @@ -0,0 +1,76 @@ +# textdomain: mcl_colorblocks +White Terracotta=白色のテラコッタ +White Glazed Terracotta=白色の彩釉テラコッタ +White Concrete Powder=白色のコンクリートパウダー +White Concrete=白色のコンクリート +Grey Terracotta=灰色のテラコッタ +Grey Glazed Terracotta=灰色の彩釉テラコッタ +Grey Concrete Powder=灰色のコンクリートパウダー +Grey Concrete=灰色のコンクリート +Light Grey Terracotta=薄灰色のテラコッタ +Light Grey Glazed Terracotta=薄灰色の彩釉テラコッタ +Light Grey Concrete Powder=薄灰色のコンクリートパウダー +Light Grey Concrete=薄灰色のコンクリート +Black Terracotta=黒色のテラコッタ +Black Glazed Terracotta=黒色の彩釉テラコッタ +Black Concrete Powder=黒色のコンクリートパウダー +Black Concrete=黒色のコンクリート +Red Terracotta=赤色のテラコッタ +Red Glazed Terracotta=赤色の彩釉テラコッタ +Red Concrete Powder=赤色のコンクリートパウダー +Red Concrete=赤色のコンクリート +Yellow Terracotta=黄色のテラコッタ +Yellow Glazed Terracotta=黄色の彩釉テラコッタ +Yellow Concrete Powder=黄色のコンクリートパウダー +Yellow Concrete=黄色のコンクリート +Green Terracotta=緑色のテラコッタ +Green Glazed Terracotta=緑色の彩釉テラコッタ +Green Concrete Powder=緑色のコンクリートパウダー +Green Concrete=緑色のコンクリート +Cyan Terracotta=青緑色のテラコッタ +Cyan Glazed Terracotta=青緑色の彩釉テラコッタ +Cyan Concrete Powder=青緑色のコンクリートパウダー +Cyan Concrete=青緑色のコンクリート +Blue Terracotta=青色のテラコッタ +Blue Glazed Terracotta=青色の彩釉テラコッタ +Blue Concrete Powder=青色のコンクリートパウダー +Blue Concrete=青色のコンクリート +Magenta Terracotta=赤紫色のテラコッタ +Magenta Glazed Terracotta=赤紫色の彩釉テラコッタ +Magenta Concrete Powder=赤紫色のコンクリートパウダー +Magenta Concrete=赤紫色のコンクリート +Orange Terracotta=橙色のテラコッタ +Orange Glazed Terracotta=橙色の彩釉テラコッタ +Orange Concrete Powder=橙色のコンクリートパウダー +Orange Concrete=橙色のコンクリート +Purple Terracotta=紫色のテラコッタ +Purple Glazed Terracotta=紫色の彩釉テラコッタ +Purple Concrete Powder=紫色のコンクリートパウダー +Purple Concrete=紫色のコンクリート +Brown Terracotta=茶色のテラコッタ +Brown Glazed Terracotta=茶色の彩釉テラコッタ +Brown Concrete Powder=茶色のコンクリートパウダー +Brown Concrete=茶色のコンクリート +Pink Terracotta=桃色のテラコッタ +Pink Glazed Terracotta=桃色の彩釉テラコッタ +Pink Concrete Powder=桃色のコンクリートパウダー +Pink Concrete=桃色のコンクリート +Lime Terracotta=黄緑色のテラコッタ +Lime Glazed Terracotta=黄緑色の彩釉テラコッタ +Lime Concrete Powder=黄緑色のコンクリートパウダー +Lime Concrete=黄緑色のコンクリート +Light Blue Terracotta=空色のテラコッタ +Light Blue Glazed Terracotta=空色の彩釉テラコッタ +Light Blue Concrete Powder=空色のコンクリートパウダー +Light Blue Concrete=空色のコンクリート +Terracotta is a basic building material. It comes in many different colors.=テラコッタは基本的な建築材料です。さまざまな色があります。 +Glazed terracotta is a decorative block with a complex pattern. It can be rotated by placing it in different directions.=彩釉テラコッタは、複雑な模様の装飾ブロックです。 配置するときの向きによって回転が可能です。 +Concrete powder is used for creating concrete, but it can also be used as decoration itself. It comes in different colors. Concrete powder turns into concrete of the same color when it comes in contact with water.=コンクリートパウダーはコンクリートを作るために使われますが、それ自体も色とりどりの装飾として使えます。コンクリートパウダーは、水に触れると同じ色のコンクリートに変化します。 +Concrete is a decorative block which comes in many different colors. It is notable for having a very strong and clean color.=コンクリートは、さまざまな色がある装飾ブロックです。非常に強く、すっきりとした色合いで知られます。 +Terracotta=テラコッタ +Terracotta is a basic building material which comes in many different colors. This particular block is uncolored.=テラコッタは基本的な建築材料で、さまざまな色があります。このブロックは無着色です。 +Colored Terracotta=色付きテラコッタ +Glazed Terracotta=彩釉テラコッタ +Concrete Powder=コンクリートパウダー +Concrete=コンクリート +Turns into concrete on water contact=水との接触でコンクリートに変化 diff --git a/mods/ITEMS/mcl_compass/init.lua b/mods/ITEMS/mcl_compass/init.lua index 9ec1ba074b..2905c0b3b5 100644 --- a/mods/ITEMS/mcl_compass/init.lua +++ b/mods/ITEMS/mcl_compass/init.lua @@ -16,6 +16,13 @@ local compass_types = { tt = S("Points to a lodestone"), longdesc = S("Lodestone compasses resemble regular compasses, but they point to a specific lodestone."), usagehelp = S("A Lodestone compass can be made from an ordinary compass by using it on a lodestone. After becoming a lodestone compass, it always points to its linked lodestone, provided that they are in the same dimension. If not in the same dimension, the lodestone compass spins randomly, similarly to a regular compass when outside the overworld. A lodestone compass can be relinked with another lodestone."), + }, + { + name = "compass_recovery", + desc = S("Recovery Compass"), + tt = S("Points to your last death location"), + longdesc = S("Recovery Compasses are compasses that point to your last death location"), + usagehelp = S("Recovery Compasses always point to the location of your last death, in case you haven't died yet, it will just randomly spin around"), } } @@ -182,7 +189,7 @@ minetest.register_globalstep(function(dtime) inv = player:get_inventory() for j, stack in pairs(inv:get_list("main")) do compass_nr = get_item_group(stack:get_name(), "compass") - if compass_nr ~= 0 then + if compass_nr ~= 0 and not string_find(stack:get_name(), "_recovery") then -- check if current compass image still matches true orientation compass_frame = get_compass_frame(pos, dir, stack) if compass_nr - 1 ~= compass_frame then @@ -195,6 +202,22 @@ minetest.register_globalstep(function(dtime) end inv:set_stack("main", j, stack) end + elseif compass_nr ~= 0 then + local meta = player:get_meta() + local posstring = meta:get_string("mcl_compass:recovery_pos") + if not posstring or posstring == "" then + stack:set_name("mcl_compass:"..random_frame .. "_recovery") + else + local targetpos = minetest.string_to_pos(posstring) + local _, target_dim = y_to_layer(targetpos.y) + local _, p_dim = y_to_layer(pos.y) + if p_dim ~= target_dim then + stack:set_name("mcl_compass:"..random_frame.."_recovery") + else + stack:set_name("mcl_compass:"..get_compass_angle(pos,targetpos,dir).."_recovery") + end + end + inv:set_stack("main",j,stack) end end end @@ -213,6 +236,9 @@ for _, item in pairs(compass_types) do elseif item.name == "compass_lodestone" then name_fmt = "mcl_compass:%d_lodestone" img_fmt = "mcl_compass_compass_%02d.png^[colorize:purple:50" + elseif item.name == "compass_recovery" then + name_fmt = "mcl_compass:%d_recovery" + img_fmt = "mcl_compass_recovery_compass_%02d.png" end for i = 0, compass_frames - 1 do local itemstring = string.format(name_fmt, i) @@ -251,6 +277,16 @@ minetest.register_craft({ } }) +minetest.register_craft({ --TODO: update once echo shards are a thing + output = "mcl_compass:" .. random_frame .. "_recovery", + recipe = { + {"","mcl_nether:netherite_ingot",""}, + {"mcl_core:diamondblock","mcl_compass:" .. stereotype_frame ,"mcl_core:diamondblock"}, + {"mcl_core:diamondblock","mcl_core:diamondblock","mcl_core:diamondblock"} + + } +}) + minetest.register_alias("mcl_compass:compass", "mcl_compass:" .. stereotype_frame) @@ -289,3 +325,9 @@ minetest.register_craft({ {"mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved", "mcl_core:stonebrickcarved"} } }) + +--set recovery meta +minetest.register_on_dieplayer(function(player) + local meta = player:get_meta(); + meta:set_string("mcl_compass:recovery_pos",minetest.pos_to_string(player:get_pos())) +end) \ No newline at end of file diff --git a/mods/ITEMS/mcl_compass/locale/mcl_compass.de.tr b/mods/ITEMS/mcl_compass/locale/mcl_compass.de.tr index 9e03665087..9ae821e2be 100644 --- a/mods/ITEMS/mcl_compass/locale/mcl_compass.de.tr +++ b/mods/ITEMS/mcl_compass/locale/mcl_compass.de.tr @@ -7,3 +7,7 @@ Lodestone Compass=Leitstein Kompass Points to a lodestone=Zeigt zu einem Leitstein Lodestone compasses resemble regular compasses, but they point to a specific lodestone.=Leitstein Kompasse ähneln normalen Kompassen, aber sie zeigen zu einen spezifischen Leitstein. A Lodestone compass can be made from an ordinary compass by using it on a lodestone. After becoming a lodestone compass, it always points to its linked lodestone, provided that they are in the same dimension. If not in the same dimension, the lodestone compass spins randomly, similarly to a regular compass when outside the overworld. A lodestone compass can be relinked with another lodestone.=Ein Leitstein Kompass kann mit einem normalen Kompass erstellt werden indem man ihn auf einem Leitstein benutzt. Nachdem er ein Leitstein Kompass geworden ist, wird er immer zu seinem Leitstein zeigen, sofern sie in der selben Dimension sind. Wenn sie nicht in der selben Dimension sind, dreht sich der Leitstein Kompass zufällig, wie ein normaler Kompass außerhalb der Oberwelt. Ein Leitstein Kompass kann mit einem anderem Leitstein verknüpft werden. +Recovery Compass=Wiederherstellungskompass +Points to your last death location=Zeigt zu dem Ort, an dem Sie zuletzt verendet sind +Recovery Compasses are compasses that point to your last death location=Wiederhelstellungskompasse sind Kompasse, die zu dem Ort zeigen, an dem Sie zuletzt gestorben sind +Recovery Compasses always point to the location of your last death, in case you haven't died yet, it will just randomly spin around=Wiederherstellungskompasse zeigen immer zu dem Ort Ihres letzten Todes, falls Sie noch nicht gestorben sind drehen sie sich zufällig diff --git a/mods/ITEMS/mcl_compass/locale/mcl_compass.ja.tr b/mods/ITEMS/mcl_compass/locale/mcl_compass.ja.tr new file mode 100644 index 0000000000..00783e840c --- /dev/null +++ b/mods/ITEMS/mcl_compass/locale/mcl_compass.ja.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_compass +Compass=コンパス +Points to the world origin=ワールドの原点を指す +Compasses are tools which point to the world origin (X@=0, Z@=0) or the spawn point in the Overworld.=コンパスは、ワールドの原点(X@=0, Z@=0)、またはオーバーワールドのスポーン地点を示す道具です。 +A Compass always points to the world spawn point when the player is in the overworld. In other dimensions, it spins randomly.=コンパスはプレイヤーがオーバーワールドにいるとき、常にワールドのスポーン地点を指します。 他の次元では、ランダムに回転します。 +Lodestone Compass=ロードストーンコンパス +Points to a lodestone=ロードストーンを指す +Lodestone compasses resemble regular compasses, but they point to a specific lodestone.=ロードストーンコンパスは通常のコンパスに似ていますが、それが示すのは特定のロードストーンです。 +A Lodestone compass can be made from an ordinary compass by using it on a lodestone. After becoming a lodestone compass, it always points to its linked lodestone, provided that they are in the same dimension. If not in the same dimension, the lodestone compass spins randomly, similarly to a regular compass when outside the overworld. A lodestone compass can be relinked with another lodestone.=ロードストーンコンパスは、ロードストーンの上で通常のコンパスを使用することにより作成できます。 ロードストーンコンパスとなった後は、同じ次元にあるならば、常にリンクしたロードストーンを指すようになります。同じ次元にない場合、オーバーワールド外の通常コンパスと同様、ランダムに回転します。 ロードストーンコンパスは他のロードストーンとの再リンクが可能です。 +Lodestone=ロードストーン diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_00.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_00.png new file mode 100644 index 0000000000..c728101802 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_00.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_01.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_01.png new file mode 100644 index 0000000000..e5a5d82b79 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_01.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_02.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_02.png new file mode 100644 index 0000000000..6488b7e3a7 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_02.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_03.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_03.png new file mode 100644 index 0000000000..4696c87150 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_03.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_04.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_04.png new file mode 100644 index 0000000000..594092651b Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_04.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_05.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_05.png new file mode 100644 index 0000000000..9d0963cfba Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_05.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_06.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_06.png new file mode 100644 index 0000000000..a2f675fac9 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_06.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_07.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_07.png new file mode 100644 index 0000000000..1356e696aa Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_07.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_08.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_08.png new file mode 100644 index 0000000000..8690c1b155 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_08.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_09.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_09.png new file mode 100644 index 0000000000..d13c518e76 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_09.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_10.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_10.png new file mode 100644 index 0000000000..48ed5bcaaf Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_10.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_11.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_11.png new file mode 100644 index 0000000000..edbcfdb87c Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_11.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_12.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_12.png new file mode 100644 index 0000000000..7d24d84f36 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_12.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_13.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_13.png new file mode 100644 index 0000000000..eee649a78c Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_13.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_14.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_14.png new file mode 100644 index 0000000000..f584f347d3 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_14.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_15.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_15.png new file mode 100644 index 0000000000..ab5c6ad8c5 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_15.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_16.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_16.png new file mode 100644 index 0000000000..bb2cf0049e Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_16.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_17.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_17.png new file mode 100644 index 0000000000..a06e85185f Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_17.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_18.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_18.png new file mode 100644 index 0000000000..441d58488f Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_18.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_19.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_19.png new file mode 100644 index 0000000000..98f88ed018 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_19.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_20.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_20.png new file mode 100644 index 0000000000..d46801d27f Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_20.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_21.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_21.png new file mode 100644 index 0000000000..cea8ade478 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_21.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_22.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_22.png new file mode 100644 index 0000000000..b6e55140c9 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_22.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_23.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_23.png new file mode 100644 index 0000000000..0463fc7045 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_23.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_24.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_24.png new file mode 100644 index 0000000000..210858af12 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_24.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_25.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_25.png new file mode 100644 index 0000000000..6db230bb0b Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_25.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_26.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_26.png new file mode 100644 index 0000000000..6d86189a74 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_26.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_27.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_27.png new file mode 100644 index 0000000000..90cceda726 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_27.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_28.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_28.png new file mode 100644 index 0000000000..c325929cf4 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_28.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_29.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_29.png new file mode 100644 index 0000000000..86bec378a1 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_29.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_30.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_30.png new file mode 100644 index 0000000000..5e59db8732 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_30.png differ diff --git a/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_31.png b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_31.png new file mode 100644 index 0000000000..ec95a2bdb1 Binary files /dev/null and b/mods/ITEMS/mcl_compass/textures/mcl_compass_recovery_compass_31.png differ diff --git a/mods/ITEMS/mcl_composters/init.lua b/mods/ITEMS/mcl_composters/init.lua index 56422d8b5e..e1e39aefc1 100644 --- a/mods/ITEMS/mcl_composters/init.lua +++ b/mods/ITEMS/mcl_composters/init.lua @@ -138,8 +138,8 @@ local function composter_harvest(pos, node, player, itemstack, pointed_thing) end -- reset ready type composter to empty type swap_node(pos, {name="mcl_composters:composter"}) - -- spawn bone meal item (wtf dye?! is this how they make white cocoa) - add_item(pos, "mcl_dye:white") + -- spawn bone meal item + add_item(pos, "mcl_bone_meal:bone_meal") -- TODO play some sounds return itemstack end diff --git a/mods/ITEMS/mcl_composters/locale/mcl_composters.ja.tr b/mods/ITEMS/mcl_composters/locale/mcl_composters.ja.tr new file mode 100644 index 0000000000..6d89084863 --- /dev/null +++ b/mods/ITEMS/mcl_composters/locale/mcl_composters.ja.tr @@ -0,0 +1,7 @@ +# textdomain: mcl_composters +Composter=コンポスター +Composters can convert various organic items into bonemeal.=コンポスターは、様々な有機物を骨粉に変えられます。 +Use organic items on the composter to fill it with layers of compost. Every time an item is put in the composter, there is a chance that the composter adds another layer of compost. Some items have a bigger chance of adding an extra layer than other items. After filling up with 7 layers of compost, the composter is full. After a delay of approximately one second the composter becomes ready and bone meal can be retrieved from it. Right-clicking the composter takes out the bone meal empties the composter."=コンポスターに有機物を入れて、堆肥の層を作りましょう。コンポスターに有機物を入れるたびに、次の堆肥の層が追加されるチャンスが起きます。 追加される確率がより高くなっているアイテムもいくつかあります。 7層分の堆肥が充填されると、コンポスターは満杯となります。その約1秒後に、骨粉を取り出せる準備が完了します。右クリックして骨粉を取り出すと、コンポスターは空になります。 +filled=充足 +ready for harvest=収穫可能 +Converts organic items into bonemeal=有機物を骨粉に変える diff --git a/mods/ITEMS/mcl_copper/crafting.lua b/mods/ITEMS/mcl_copper/crafting.lua index 7b1e183c79..ce280fcdf8 100644 --- a/mods/ITEMS/mcl_copper/crafting.lua +++ b/mods/ITEMS/mcl_copper/crafting.lua @@ -47,6 +47,17 @@ minetest.register_craft({ }, }) +local waxable_blocks = { "block", "block_cut", "block_exposed", "block_exposed_cut", "block_weathered", "block_weathered_cut", "block_oxidized", "block_oxidized_cut" } + +for _, w in ipairs(waxable_blocks) do + minetest.register_craft({ + output = "mcl_copper:waxed_"..w, + recipe = { + { "mcl_copper:"..w, "mcl_honey:honeycomb" }, + }, + }) +end + minetest.register_craft({ output = "mcl_copper:copper_ingot 4", recipe = { @@ -73,4 +84,11 @@ minetest.register_craft({ output = "mcl_copper:copper_ingot", recipe = "mcl_copper:stone_with_copper", cooktime = 10, -}) \ No newline at end of file +}) + +minetest.register_craft({ + type = "cooking", + output = "mcl_copper:block", + recipe = "mcl_copper:block_raw", + cooktime = 90, +}) diff --git a/mods/ITEMS/mcl_copper/functions.lua b/mods/ITEMS/mcl_copper/functions.lua index b6e0cb7e26..81dfdb69d8 100644 --- a/mods/ITEMS/mcl_copper/functions.lua +++ b/mods/ITEMS/mcl_copper/functions.lua @@ -12,6 +12,34 @@ local function register_oxidation_abm(abm_name, node_name, oxidized_variant) }) end +function waxing_copper_block(pos, node, player, itemstack, convert_to) + if itemstack:get_name() == "mcl_honey:honeycomb" then + node.name = convert_to + minetest.set_node(pos, node) + awards.unlock(player:get_player_name(), "mcl:wax_on") + if not minetest.is_creative_enabled(player:get_player_name()) then + itemstack:take_item() + end + else + return true + end +end + +function scraping_copper_block(pos, node, player, itemstack, convert_to) + if itemstack:get_name():find("axe") then + node.name = convert_to + minetest.set_node(pos, node) + awards.unlock(player:get_player_name(), "mcl:wax_off") + if not minetest.is_creative_enabled(player:get_player_name()) then + local tool = itemstack:get_name() + local wear = mcl_autogroup.get_wear(tool, "axey") + itemstack:add_wear(wear) + end + else + return true + end +end + --[[ local stairs = { {"stair", "exposed", "_inner", "cut_inner"}, diff --git a/mods/ITEMS/mcl_copper/init.lua b/mods/ITEMS/mcl_copper/init.lua index ea15e58274..a99d03f2cc 100644 --- a/mods/ITEMS/mcl_copper/init.lua +++ b/mods/ITEMS/mcl_copper/init.lua @@ -1,6 +1,6 @@ local path = minetest.get_modpath("mcl_copper") +dofile(path .. "/functions.lua") dofile(path .. "/nodes.lua") dofile(path .. "/items.lua") dofile(path .. "/crafting.lua") -dofile(path .. "/functions.lua") \ No newline at end of file diff --git a/mods/ITEMS/mcl_copper/items.lua b/mods/ITEMS/mcl_copper/items.lua index 450ec8cb38..694e693dc4 100644 --- a/mods/ITEMS/mcl_copper/items.lua +++ b/mods/ITEMS/mcl_copper/items.lua @@ -11,5 +11,5 @@ minetest.register_craftitem("mcl_copper:raw_copper", { description = S("Raw Copper"), _doc_items_longdesc = S("Raw Copper. Mine a Copper Ore to get it."), inventory_image = "mcl_copper_raw.png", - groups = { craftitem = 1 }, + groups = { craftitem = 1, blast_furnace_smeltable = 1 }, }) \ No newline at end of file diff --git a/mods/ITEMS/mcl_copper/locale/mcl_copper.ja.tr b/mods/ITEMS/mcl_copper/locale/mcl_copper.ja.tr new file mode 100644 index 0000000000..f6f204e78c --- /dev/null +++ b/mods/ITEMS/mcl_copper/locale/mcl_copper.ja.tr @@ -0,0 +1,57 @@ +# textdomain: mcl_copper +A block of copper is mostly a decorative block.=銅ブロックは、そのほとんどが装飾ブロックです。 +A block used for compact raw copper storage.=銅の粗鉱をコンパクトに保管するのに使えるブロックです。 +Block of Copper=銅ブロック +Waxed Block of Copper=錆止め済み銅ブロック +Block of Raw Copper=銅の粗鉱ブロック +Copper Ingot=銅インゴット +Copper Ore=銅鉱石 +Cut copper is a decorative block.=溝入り銅は、装飾ブロックです。 +Cut Copper=溝入り銅 +Waxed Cut Copper=錆止め済み溝入り銅 +Double Slab of Cut Copper=溝入り銅の2重スラブ +Double Slab of Exposed Cut Copper=少し酸化した溝入り銅の2重スラブ +Double Slab of Oxidized Cut Copper=殆ど酸化した溝入り銅の2重スラブ +Double Slab of Weathered Cut Copper=半ば酸化した溝入り銅の2重スラブ +Waxed Double Slab of Cut Copper=錆止め済み溝入り銅の2重スラブ +Waxed Double Slab of Exposed Cut Copper=少し酸化した錆止め済み溝入り銅の2重スラブ +Waxed Double Slab of Oxidized Cut Copper=殆ど酸化した錆止め済み溝入り銅の2重スラブ +Waxed Double Slab of Weathered Cut Copper=半ば酸化した錆止め済み溝入り銅の2重スラブ +Exposed copper is a decorative block.=少し酸化した銅は、装飾ブロックです。 +Exposed Copper=少し酸化した銅 +Waxed Exposed Copper=少し酸化した錆止め済み銅 +Exposed cut copper is a decorative block.=少し酸化した溝入り銅は、装飾ブロックです。 +Exposed Cut Copper=少し酸化した溝入り銅 +Waxed Exposed Cut Copper=少し酸化した錆止め済み溝入り銅 +Molten Raw Copper. It is used to craft blocks.=溶けた未処理の銅。ブロックのクラフトに使われます。 +Oxidized copper is a decorative block.=殆ど酸化した銅は、装飾ブロックです。 +Oxidized Copper=殆ど酸化した銅 +Waxed Oxidized Copper=殆ど酸化した錆止め済み銅 +Oxidized cut copper is a decorative block.=殆ど酸化した溝入り銅は、装飾ブロックです。 +Oxidized Cut Copper=殆ど酸化した溝入り銅 +Waxed Oxidized Cut Copper=殆ど酸化した錆止め済み溝入り銅 +Raw Copper. Mine a Copper Ore to get it.=未処理の銅。銅鉱石を採掘すると手に入ります。 +Raw Copper=銅の粗鉱 +Slab of Cut Copper=溝入り銅のスラブ +Slab of Exposed Cut Copper=少し酸化した溝入り銅のスラブ +Slab of Oxidized Cut Copper=殆ど酸化した溝入り銅のスラブ +Slab of Weathered Cut Copper=半ば酸化した溝入り銅のスラブ +Waxed Slab of Cut Copper=錆止め済み溝入り銅のスラブ +Waxed Slab of Exposed Cut Copper=少し酸化した錆止め済み溝入り銅のスラブ +Waxed Slab of Oxidized Cut Copper=殆ど酸化した錆止め済み溝入り銅のスラブ +Waxed Slab of Weathered Cut Copper=半ば酸化した錆止め済み溝入り銅のスラブ +Some copper contained in stone, it is pretty common and can be found below sea level.=石に含まれる銅は ごく一般的で、海面下の高さで見られます。 +Stairs of Cut Copper=溝入り銅の階段 +Stairs of Exposed Cut Copper=少し酸化した溝入り銅の階段 +Stairs of Oxidized Cut Copper=殆ど酸化した溝入り銅の階段 +Stairs of Weathered Cut Copper=半ば酸化した溝入り銅の階段 +Waxed Stairs of Cut Copper=錆止め済み溝入り銅の階段 +Waxed Stairs of Exposed Cut Copper=少し酸化した錆止め済み溝入り銅の階段 +Waxed Stairs of Oxidized Cut Copper=殆ど酸化した錆止め済み溝入り銅の階段 +Waxed Stairs of Weathered Cut Copper=半ば酸化した錆止め済み溝入り銅の階段 +Weathered copper is a decorative block.=半ば酸化した銅は、装飾ブロックです。 +Weathered Copper=半ば酸化した銅 +Waxed Weathered Copper=半ば酸化した錆止め済み銅 +Weathered cut copper is a decorative block.=半ば酸化した溝入り銅は、装飾ブロックです。 +Weathered Cut Copper=半ば酸化した溝入り銅 +Waxed Weathered Cut Copper=半ば酸化した錆止め済み溝入り銅 diff --git a/mods/ITEMS/mcl_copper/locale/template.txt b/mods/ITEMS/mcl_copper/locale/template.txt index 050c099ee2..7022780ff0 100644 --- a/mods/ITEMS/mcl_copper/locale/template.txt +++ b/mods/ITEMS/mcl_copper/locale/template.txt @@ -2,36 +2,56 @@ A block of copper is mostly a decorative block.= A block used for compact raw copper storage.= Block of Copper= +Waxed Block of Copper= Block of Raw Copper= Copper Ingot= Copper Ore= Cut copper is a decorative block.= Cut Copper= +Waxed Cut Copper= Double Slab of Cut Copper= Double Slab of Exposed Cut Copper= Double Slab of Oxidized Cut Copper= Double Slab of Weathered Cut Copper= +Waxed Double Slab of Cut Copper= +Waxed Double Slab of Exposed Cut Copper= +Waxed Double Slab of Oxidized Cut Copper= +Waxed Double Slab of Weathered Cut Copper= Exposed copper is a decorative block.= Exposed Copper= +Waxed Exposed Copper= Exposed cut copper is a decorative block.= Exposed Cut Copper= +Waxed Exposed Cut Copper= Molten Raw Copper. It is used to craft blocks.= Oxidized copper is a decorative block.= Oxidized Copper= +Waxed Oxidized Copper= Oxidized cut copper is a decorative block.= Oxidized Cut Copper= +Waxed Oxidized Cut Copper= Raw Copper. Mine a Copper Ore to get it.= Raw Copper= Slab of Cut Copper= Slab of Exposed Cut Copper= Slab of Oxidized Cut Copper= Slab of Weathered Cut Copper= +Waxed Slab of Cut Copper= +Waxed Slab of Exposed Cut Copper= +Waxed Slab of Oxidized Cut Copper= +Waxed Slab of Weathered Cut Copper= Some copper contained in stone, it is pretty common and can be found below sea level.= Stairs of Cut Copper= Stairs of Exposed Cut Copper= Stairs of Oxidized Cut Copper= Stairs of Weathered Cut Copper= +Waxed Stairs of Cut Copper= +Waxed Stairs of Exposed Cut Copper= +Waxed Stairs of Oxidized Cut Copper= +Waxed Stairs of Weathered Cut Copper= Weathered copper is a decorative block.= Weathered Copper= +Waxed Weathered Copper= Weathered cut copper is a decorative block.= Weathered Cut Copper= +Waxed Weathered Cut Copper= diff --git a/mods/ITEMS/mcl_copper/nodes.lua b/mods/ITEMS/mcl_copper/nodes.lua index 22c1bf807b..6c498f9f68 100644 --- a/mods/ITEMS/mcl_copper/nodes.lua +++ b/mods/ITEMS/mcl_copper/nodes.lua @@ -20,7 +20,7 @@ minetest.register_node("mcl_copper:block_raw", { _doc_items_longdesc = S("A block used for compact raw copper storage."), tiles = {"mcl_copper_block_raw.png"}, is_ground_content = false, - groups = {pickaxey = 2, building_block = 1}, + groups = {pickaxey = 2, building_block = 1, blast_furnace_smeltable = 1 }, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, _mcl_hardness = 5, @@ -35,6 +35,19 @@ minetest.register_node("mcl_copper:block", { sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, _mcl_hardness = 3, + on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block") end, +}) + +minetest.register_node("mcl_copper:waxed_block", { + description = S("Waxed Block of Copper"), + _doc_items_longdesc = S("A block of copper is mostly a decorative block."), + tiles = {"mcl_copper_block.png"}, + is_ground_content = false, + groups = {pickaxey = 2, building_block = 1}, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 6, + _mcl_hardness = 3, + on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block") end, }) minetest.register_node("mcl_copper:block_exposed", { @@ -47,18 +60,19 @@ minetest.register_node("mcl_copper:block_exposed", { _mcl_blast_resistance = 6, _mcl_hardness = 5, _mcl_anti_oxidation_varient = "mcl_copper:block", + on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_exposed") end, }) -minetest.register_node("mcl_copper:block_oxidized", { - description = S("Oxidized Copper"), - _doc_items_longdesc = S("Oxidized copper is a decorative block."), - tiles = {"mcl_copper_oxidized.png"}, +minetest.register_node("mcl_copper:waxed_block_exposed", { + description = S("Waxed Exposed Copper"), + _doc_items_longdesc = S("Exposed copper is a decorative block."), + tiles = {"mcl_copper_exposed.png"}, is_ground_content = false, groups = {pickaxey = 2, building_block = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, _mcl_hardness = 5, - _mcl_anti_oxidation_varient = "mcl_copper:block_weathered", + on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block") end, }) minetest.register_node("mcl_copper:block_weathered", { @@ -71,6 +85,44 @@ minetest.register_node("mcl_copper:block_weathered", { _mcl_blast_resistance = 6, _mcl_hardness = 5, _mcl_anti_oxidation_varient = "mcl_copper:block_exposed", + on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_weathered") end, +}) + +minetest.register_node("mcl_copper:waxed_block_weathered", { + description = S("Waxed Weathered Copper"), + _doc_items_longdesc = S("Weathered copper is a decorative block."), + tiles = {"mcl_copper_weathered.png"}, + is_ground_content = false, + groups = {pickaxey = 2, building_block = 1}, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 6, + _mcl_hardness = 5, + on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_exposed") end, +}) + +minetest.register_node("mcl_copper:block_oxidized", { + description = S("Oxidized Copper"), + _doc_items_longdesc = S("Oxidized copper is a decorative block."), + tiles = {"mcl_copper_oxidized.png"}, + is_ground_content = false, + groups = {pickaxey = 2, building_block = 1}, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 6, + _mcl_hardness = 5, + _mcl_anti_oxidation_varient = "mcl_copper:block_weathered", + on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_oxidized") end, +}) + +minetest.register_node("mcl_copper:waxed_block_oxidized", { + description = S("Waxed Oxidized Copper"), + _doc_items_longdesc = S("Oxidized copper is a decorative block."), + tiles = {"mcl_copper_oxidized.png"}, + is_ground_content = false, + groups = {pickaxey = 2, building_block = 1}, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 6, + _mcl_hardness = 5, + on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_weathered") end, }) minetest.register_node("mcl_copper:block_cut", { @@ -82,6 +134,19 @@ minetest.register_node("mcl_copper:block_cut", { sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, _mcl_hardness = 5, + on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_cut") end, +}) + +minetest.register_node("mcl_copper:waxed_block_cut", { + description = S("Waxed Cut Copper"), + _doc_items_longdesc = S("Cut copper is a decorative block."), + tiles = {"mcl_copper_block_cut.png"}, + is_ground_content = false, + groups = {pickaxey = 2, building_block = 1}, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 6, + _mcl_hardness = 5, + on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_cut") end, }) minetest.register_node("mcl_copper:block_exposed_cut", { @@ -94,18 +159,19 @@ minetest.register_node("mcl_copper:block_exposed_cut", { _mcl_blast_resistance = 6, _mcl_hardness = 5, _mcl_anti_oxidation_varient = "mcl_copper:block_cut", + on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_exposed_cut") end, }) -minetest.register_node("mcl_copper:block_oxidized_cut", { - description = S("Oxidized Cut Copper"), - _doc_items_longdesc = S("Oxidized cut copper is a decorative block."), - tiles = {"mcl_copper_oxidized_cut.png"}, +minetest.register_node("mcl_copper:waxed_block_exposed_cut", { + description = S("Waxed Exposed Cut Copper"), + _doc_items_longdesc = S("Exposed cut copper is a decorative block."), + tiles = {"mcl_copper_exposed_cut.png"}, is_ground_content = false, groups = {pickaxey = 2, building_block = 1}, sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6, _mcl_hardness = 5, - _mcl_anti_oxidation_varient = "mcl_copper:block_weathered_cut", + on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_cut") end, }) minetest.register_node("mcl_copper:block_weathered_cut", { @@ -118,6 +184,44 @@ minetest.register_node("mcl_copper:block_weathered_cut", { _mcl_blast_resistance = 6, _mcl_hardness = 5, _mcl_anti_oxidation_varient = "mcl_copper:block_exposed_cut", + on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_weathered_cut") end, +}) + +minetest.register_node("mcl_copper:waxed_block_weathered_cut", { + description = S("Waxed Weathered Cut Copper"), + _doc_items_longdesc = S("Weathered cut copper is a decorative block."), + tiles = {"mcl_copper_weathered_cut.png"}, + is_ground_content = false, + groups = {pickaxey = 2, building_block = 1}, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 6, + _mcl_hardness = 5, + on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_exposed_cut") end, +}) + +minetest.register_node("mcl_copper:block_oxidized_cut", { + description = S("Oxidized Cut Copper"), + _doc_items_longdesc = S("Oxidized cut copper is a decorative block."), + tiles = {"mcl_copper_oxidized_cut.png"}, + is_ground_content = false, + groups = {pickaxey = 2, building_block = 1}, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 6, + _mcl_hardness = 5, + _mcl_anti_oxidation_varient = "mcl_copper:block_weathered_cut", + on_rightclick = function(pos, node, player, itemstack) waxing_copper_block(pos, node, player, itemstack, "mcl_copper:waxed_block_oxidized_cut") end, +}) + +minetest.register_node("mcl_copper:waxed_block_oxidized_cut", { + description = S("Waxed Oxidized Cut Copper"), + _doc_items_longdesc = S("Oxidized cut copper is a decorative block."), + tiles = {"mcl_copper_oxidized_cut.png"}, + is_ground_content = false, + groups = {pickaxey = 2, building_block = 1}, + sounds = mcl_sounds.node_sound_metal_defaults(), + _mcl_blast_resistance = 6, + _mcl_hardness = 5, + on_rightclick = function(pos, node, player, itemstack) scraping_copper_block(pos, node, player, itemstack, "mcl_copper:block_weathered_cut") end, }) mcl_stairs.register_slab("copper_cut", "mcl_copper:block_cut", @@ -127,6 +231,13 @@ mcl_stairs.register_slab("copper_cut", "mcl_copper:block_cut", nil, nil, nil, S("Double Slab of Cut Copper")) +mcl_stairs.register_slab("waxed_copper_cut", "mcl_copper:waxed_block_cut", + {pickaxey = 2}, + {"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"}, + S("Waxed Slab of Cut Copper"), + nil, nil, nil, + S("Waxed Double Slab of Cut Copper")) + mcl_stairs.register_slab("copper_exposed_cut", "mcl_copper:block_exposed_cut", {pickaxey = 2}, {"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"}, @@ -134,12 +245,12 @@ mcl_stairs.register_slab("copper_exposed_cut", "mcl_copper:block_exposed_cut", nil, nil, nil, S("Double Slab of Exposed Cut Copper")) -mcl_stairs.register_slab("copper_oxidized_cut", "mcl_copper:block_oxidized_cut", +mcl_stairs.register_slab("waxed_copper_exposed_cut", "mcl_copper:waxed_block_exposed_cut", {pickaxey = 2}, - {"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"}, - S("Slab of Oxidized Cut Copper"), + {"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"}, + S("Waxed Slab of Exposed Cut Copper"), nil, nil, nil, - S("Double Slab of Oxidized Cut Copper")) + S("Waxed Double Slab of Exposed Cut Copper")) mcl_stairs.register_slab("copper_weathered_cut", "mcl_copper:block_weathered_cut", {pickaxey = 2}, @@ -148,6 +259,27 @@ mcl_stairs.register_slab("copper_weathered_cut", "mcl_copper:block_weathered_cut nil, nil, nil, S("Double Slab of Weathered Cut Copper")) +mcl_stairs.register_slab("waxed_copper_weathered_cut", "mcl_copper:waxed_block_weathered_cut", + {pickaxey = 2}, + {"mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png"}, + S("Waxed Slab of Weathered Cut Copper"), + nil, nil, nil, + S("Waxed Double Slab of Weathered Cut Copper")) + +mcl_stairs.register_slab("copper_oxidized_cut", "mcl_copper:block_oxidized_cut", + {pickaxey = 2}, + {"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"}, + S("Slab of Oxidized Cut Copper"), + nil, nil, nil, + S("Double Slab of Oxidized Cut Copper")) + +mcl_stairs.register_slab("waxed_copper_oxidized_cut", "mcl_copper:waxed_block_oxidized_cut", + {pickaxey = 2}, + {"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"}, + S("Waxed Slab of Oxidized Cut Copper"), + nil, nil, nil, + S("Waxed Double Slab of Oxidized Cut Copper")) + mcl_stairs.register_stair("copper_cut", "mcl_copper:block_cut", {pickaxey = 2}, {"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"}, @@ -155,6 +287,13 @@ mcl_stairs.register_stair("copper_cut", "mcl_copper:block_cut", nil, 6, nil, "woodlike") +mcl_stairs.register_stair("waxed_copper_cut", "mcl_copper:waxed_block_cut", + {pickaxey = 2}, + {"mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png", "mcl_copper_block_cut.png"}, + S("Waxed Stairs of Cut Copper"), + nil, 6, nil, + "woodlike") + mcl_stairs.register_stair("copper_exposed_cut", "mcl_copper:block_exposed_cut", {pickaxey = 2}, {"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"}, @@ -162,10 +301,10 @@ mcl_stairs.register_stair("copper_exposed_cut", "mcl_copper:block_exposed_cut", nil, 6, nil, "woodlike") -mcl_stairs.register_stair("copper_oxidized_cut", "mcl_copper:block_oxidized_cut", +mcl_stairs.register_stair("waxed_copper_exposed_cut", "mcl_copper:waxed_block_exposed_cut", {pickaxey = 2}, - {"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"}, - S("Stairs of Oxidized Cut Copper"), + {"mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png", "mcl_copper_exposed_cut.png"}, + S("Waxed Stairs of Exposed Cut Copper"), nil, 6, nil, "woodlike") @@ -174,4 +313,25 @@ mcl_stairs.register_stair("copper_weathered_cut", "mcl_copper:block_weathered_cu {"mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png"}, S("Stairs of Weathered Cut Copper"), nil, 6, nil, - "woodlike") \ No newline at end of file + "woodlike") + +mcl_stairs.register_stair("waxed_copper_weathered_cut", "mcl_copper:waxed_block_weathered_cut", + {pickaxey = 2}, + {"mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png", "mcl_copper_weathered_cut.png"}, + S("Waxed Stairs of Weathered Cut Copper"), + nil, 6, nil, + "woodlike") + +mcl_stairs.register_stair("copper_oxidized_cut", "mcl_copper:block_oxidized_cut", + {pickaxey = 2}, + {"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"}, + S("Stairs of Oxidized Cut Copper"), + nil, 6, nil, + "woodlike") + +mcl_stairs.register_stair("waxed_copper_oxidized_cut", "mcl_copper:waxed_block_oxidized_cut", + {pickaxey = 2}, + {"mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png", "mcl_copper_oxidized_cut.png"}, + S("Waxed Stairs of Oxidized Cut Copper"), + nil, 6, nil, + "woodlike") diff --git a/mods/ITEMS/mcl_copper/screenshot.png b/mods/ITEMS/mcl_copper/screenshot.png deleted file mode 100644 index 032d45fb17..0000000000 Binary files a/mods/ITEMS/mcl_copper/screenshot.png and /dev/null differ diff --git a/mods/ITEMS/mcl_core/crafting.lua b/mods/ITEMS/mcl_core/crafting.lua index df456cbdcc..ffba04a7ba 100644 --- a/mods/ITEMS/mcl_core/crafting.lua +++ b/mods/ITEMS/mcl_core/crafting.lua @@ -126,14 +126,14 @@ minetest.register_craft({ minetest.register_craft({ output = "mcl_core:bone_block", recipe = { - { "mcl_dye:white", "mcl_dye:white", "mcl_dye:white" }, - { "mcl_dye:white", "mcl_dye:white", "mcl_dye:white" }, - { "mcl_dye:white", "mcl_dye:white", "mcl_dye:white" }, + { "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal" }, + { "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal" }, + { "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal", "mcl_bone_meal:bone_meal" }, }, }) minetest.register_craft({ - output = "mcl_dye:white 9", + output = "mcl_bone_meal:bone_meal 9", recipe = { { "mcl_core:bone_block" }, }, @@ -298,14 +298,14 @@ minetest.register_craft({ minetest.register_craft({ output = "mcl_core:lapisblock", recipe = { - {"mcl_dye:blue", "mcl_dye:blue", "mcl_dye:blue"}, - {"mcl_dye:blue", "mcl_dye:blue", "mcl_dye:blue"}, - {"mcl_dye:blue", "mcl_dye:blue", "mcl_dye:blue"}, + {"mcl_core:lapis", "mcl_core:lapis", "mcl_core:lapis"}, + {"mcl_core:lapis", "mcl_core:lapis", "mcl_core:lapis"}, + {"mcl_core:lapis", "mcl_core:lapis", "mcl_core:lapis"}, } }) minetest.register_craft({ - output = "mcl_dye:blue 9", + output = "mcl_core:lapis 9", recipe = { {"mcl_core:lapisblock"}, } @@ -482,7 +482,7 @@ minetest.register_craft({ minetest.register_craft({ type = "cooking", - output = "mcl_dye:blue", + output = "mcl_core:lapis", recipe = "mcl_core:stone_with_lapis", cooktime = 10, }) diff --git a/mods/ITEMS/mcl_core/craftitems.lua b/mods/ITEMS/mcl_core/craftitems.lua index 94575baca5..32a5f7cbc8 100644 --- a/mods/ITEMS/mcl_core/craftitems.lua +++ b/mods/ITEMS/mcl_core/craftitems.lua @@ -101,6 +101,14 @@ minetest.register_craftitem("mcl_core:emerald", { groups = { craftitem=1 }, }) +minetest.register_craftitem("mcl_core:lapis", { + description = S("Lapis Lazuli"), + _doc_items_longdesc = S("Lapis Lazuli are required for enchanting items on an enchanting table."), + inventory_image = "mcl_core_lapis.png", + stack_max = 64, + groups = { craftitem=1 }, +}) + minetest.register_craftitem("mcl_core:brick", { description = S("Brick"), _doc_items_longdesc = S("Bricks are used to craft brick blocks."), diff --git a/mods/ITEMS/mcl_core/functions.lua b/mods/ITEMS/mcl_core/functions.lua index 5a01cd8c11..6ef9a86f9c 100644 --- a/mods/ITEMS/mcl_core/functions.lua +++ b/mods/ITEMS/mcl_core/functions.lua @@ -1367,108 +1367,46 @@ function mcl_core.supports_vines(nodename) end -- Leaf Decay - --- To enable leaf decay for a node, add it to the "leafdecay" group. -- --- The rating of the group determines how far from a node in the group "tree" --- the node can be without decaying. +-- Whenever a tree trunk node is removed, all `group:leaves` nodes in a radius +-- of 6 blocks are checked from the trunk node's `after_destruct` handler. +-- Any such nodes within that radius that has no trunk node present within a +-- distance of 6 blocks is replaced with a `group:orphan_leaves` node. -- --- If param2 of the node is ~= 0, the node will always be preserved. Thus, if --- the player places a node of that kind, you will want to set param2=1 or so. --- - -mcl_core.leafdecay_trunk_cache = {} -mcl_core.leafdecay_enable_cache = true --- Spread the load of finding trunks -mcl_core.leafdecay_trunk_find_allow_accumulator = 0 - -minetest.register_globalstep(function(dtime) - --local finds_per_second = 5000 - mcl_core.leafdecay_trunk_find_allow_accumulator = math.floor(dtime * 5000) -end) - +-- The `group:orphan_leaves` nodes are gradually decayed in this ABM. minetest.register_abm({ label = "Leaf decay", - nodenames = {"group:leafdecay"}, - neighbors = {"air", "group:liquid"}, - -- A low interval and a high inverse chance spreads the load - interval = 2, - chance = 5, + nodenames = {"group:orphan_leaves"}, + interval = 5, + chance = 10, + action = function(pos, node) + -- Spawn item entities for any of the leaf's drops + local itemstacks = minetest.get_node_drops(node.name) + for _, itemname in pairs(itemstacks) do + local p_drop = vector.offset(pos, math.random() - 0.5, math.random() - 0.5, math.random() - 0.5) + minetest.add_item(p_drop, itemname) + end + -- Remove the decayed node + minetest.remove_node(pos) + leafdecay_particles(pos, node) + minetest.check_for_falling(pos) - action = function(p0, node, _, _) - local do_preserve = false - local d = minetest.registered_nodes[node.name].groups.leafdecay - if not d or d == 0 then - return - end - local n0 = minetest.get_node(p0) - if n0.param2 ~= 0 then - -- Prevent leafdecay for player-placed leaves. - -- param2 is set to 1 after it was placed by the player - return - end - local p0_hash = nil - if mcl_core.leafdecay_enable_cache then - p0_hash = minetest.hash_node_position(p0) - local trunkp = mcl_core.leafdecay_trunk_cache[p0_hash] - if trunkp then - local n = minetest.get_node(trunkp) - local reg = minetest.registered_nodes[n.name] - -- Assume ignore is a trunk, to make the thing work at the border of the active area - if n.name == "ignore" or (reg and reg.groups.tree and reg.groups.tree ~= 0) then - return - end - -- Cache is invalid - table.remove(mcl_core.leafdecay_trunk_cache, p0_hash) - end - end - if mcl_core.leafdecay_trunk_find_allow_accumulator <= 0 then - return - end - mcl_core.leafdecay_trunk_find_allow_accumulator = - mcl_core.leafdecay_trunk_find_allow_accumulator - 1 - -- Assume ignore is a trunk, to make the thing work at the border of the active area - local p1 = minetest.find_node_near(p0, d, {"ignore", "group:tree"}) - if p1 then - do_preserve = true - if mcl_core.leafdecay_enable_cache then - -- Cache the trunk - mcl_core.leafdecay_trunk_cache[p0_hash] = p1 - end - end - if not do_preserve then - -- Drop stuff other than the node itself - local itemstacks = minetest.get_node_drops(n0.name) - for _, itemname in pairs(itemstacks) do - local p_drop = { - x = p0.x - 0.5 + math.random(), - y = p0.y - 0.5 + math.random(), - z = p0.z - 0.5 + math.random(), - } - minetest.add_item(p_drop, itemname) - end - -- Remove node - minetest.remove_node(p0) - leafdecay_particles(p0, n0) - minetest.check_for_falling(p0) - - -- Kill depending vines immediately to skip the vines decay delay - local surround = { - { x = 0, y = 0, z = -1 }, - { x = 0, y = 0, z = 1 }, - { x = -1, y = 0, z = 0 }, - { x = 1, y = 0, z = 0 }, - { x = 0, y = -1, z = -1 }, - } - for s=1, #surround do - local spos = vector.add(p0, surround[s]) - local maybe_vine = minetest.get_node(spos) - --local surround_inverse = vector.multiply(surround[s], -1) - if maybe_vine.name == "mcl_core:vine" and (not mcl_core.check_vines_supported(spos, maybe_vine)) then - minetest.remove_node(spos) - vinedecay_particles(spos, maybe_vine) - minetest.check_for_falling(spos) - end + -- Kill depending vines immediately to skip the vines decay delay + local surround = { + { x = 0, y = 0, z = -1 }, + { x = 0, y = 0, z = 1 }, + { x = -1, y = 0, z = 0 }, + { x = 1, y = 0, z = 0 }, + { x = 0, y = -1, z = -1 }, + } + for s=1, #surround do + local spos = vector.add(pos, surround[s]) + local maybe_vine = minetest.get_node(spos) + --local surround_inverse = vector.multiply(surround[s], -1) + if maybe_vine.name == "mcl_core:vine" and (not mcl_core.check_vines_supported(spos, maybe_vine)) then + minetest.remove_node(spos) + vinedecay_particles(spos, maybe_vine) + minetest.check_for_falling(spos) end end end @@ -1621,7 +1559,7 @@ function mcl_core.register_snowed_node(itemstring_snowed, itemstring_clear, tile end if not sounds then def.sounds = mcl_sounds.node_sound_dirt_defaults({ - footstep = { name = "pedology_snow_soft_footstep", gain = 0.5 } + footstep = mcl_sounds.node_sound_snow_defaults().footstep, }) else def.sounds = sounds diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.de.tr b/mods/ITEMS/mcl_core/locale/mcl_core.de.tr index b064cebbef..f8a441fdc5 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.de.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.de.tr @@ -130,6 +130,8 @@ Jungle Wood=Dschungelholz Jungle Wood Planks=Dschungelholzplanken Jungle leaves are grown from jungle trees.=Dschungelblätter wachsen an Dschungelbäumen. Ladder=Leiter +Lapis Lazuli=Lapislazuli +Lapis Lazuli are required for enchanting items on an enchanting table.=Lapislazuli werden zum Verzaubern von Gegenständen auf einem Zaubertisch benötigt. Lapis Lazuli Block=Lapislazuliblock Lapis Lazuli Ore=Lapislazulierz Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=Lapislazulierz ist das Erz von Lapislazuli. Es kann relativ selten in Ansammlungen in der Nähe des Weltbodens gefunden werden. diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.es.tr b/mods/ITEMS/mcl_core/locale/mcl_core.es.tr index 1937babd3f..0f86565207 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.es.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.es.tr @@ -130,6 +130,8 @@ Jungle Wood=Tronco de jungla Jungle Wood Planks=Madera de jungla Jungle leaves are grown from jungle trees.=Las hojas de jungla se cultivan de los árboles de jungla. Ladder=Escalera +Lapis Lazuli=Lapislázuli +Lapis Lazuli are required for enchanting items on an enchanting table.=Los lapislázuli son necesarios para encantar objetos en una mesa de encantamiento. Lapis Lazuli Block=Bloque de lapislázuli Lapis Lazuli Ore=Mena de lapislázuli Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=El mineral de lapislázuli es el mineral de lapislázuli. Rara vez se puede encontrar en grupos, se encuentra cerca del fondo del mundo. diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr b/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr index b48f9310fe..ad6c09b08c 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.fr.tr @@ -130,6 +130,8 @@ Jungle Wood=Bûche d'Acajou Jungle Wood Planks=Planches d'Acajou Jungle leaves are grown from jungle trees.=Les feuilles d'Acajou sont cultivées à partir d'arbres d'Acajou. Ladder=Échelle +Lapis Lazuli=Lapis Lazuli +Lapis Lazuli are required for enchanting items on an enchanting table.=Les lapis-lazuli sont nécessaires pour enchanter des objets sur une table d'enchantement. Lapis Lazuli Block=Bloc de Lapis-Lazuli Lapis Lazuli Ore=Minerai de Lapis-Lazuli Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=Le minerai de lapis-lazuli produit du lapis-lazuli. Il peut être rarement trouvé dans des filons près du fond du monde. @@ -283,4 +285,4 @@ Grows on sand or dirt next to water=Pousse sur le sable ou la terre près de l'e Stackable=Empilable Crying Obsidian=Obsidienne pleureuse Crying obsidian is a luminous obsidian that can generate as part of ruined portals.=L'obsidienne pleureuse est une obsidienne luminause qui peut être générée dans les portails en ruine. -Enchanted Golden Apple=Pomme dorée enchantée \ No newline at end of file +Enchanted Golden Apple=Pomme dorée enchantée diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.ja.tr b/mods/ITEMS/mcl_core/locale/mcl_core.ja.tr new file mode 100644 index 0000000000..401b027007 --- /dev/null +++ b/mods/ITEMS/mcl_core/locale/mcl_core.ja.tr @@ -0,0 +1,286 @@ +# textdomain: mcl_core +@1 could not survive in lava.=@1は溶岩の中で生き残ることができなかった。 +@1 died in lava.=@1は溶岩の中で息絶えた。 +@1 melted in lava.=@1は溶岩の中で溶解した。 +@1 took a bath in a hot lava tub.=@1は溶岩の浴槽に入浴した。 +A block of diamond is mostly a shiny decorative block but also useful as a compact storage of diamonds.=ダイヤモンドブロックは、主に装飾用の輝くブロックですが、ダイヤモンドをコンパクトに保管するのにも便利です。 +A block of emerald is mostly a shiny decorative block but also useful as a compact storage of emeralds.=エメラルドブロックは、主に装飾用の輝くブロックですが、エメラルドをコンパクトに保管するのにも便利です。 +A block of gold is mostly a shiny decorative block but also useful as a compact storage of gold ingots.=金ブロックは、主に装飾用の輝くブロックですが、金インゴットをコンパクトに保管するのにも便利です。 +A block of iron is mostly a decorative block but also useful as a compact storage of iron ingots.=鉄ブロックは、主に装飾用のブロックですが、鉄インゴットをコンパクトに保管するのにも便利です。 +A cactus can only be placed on top of another cactus or any sand.=サボテンは、他のサボテンや砂の上にしか置けません。 +A decorative and mostly transparent block.=装飾用の、ほとんどが透明なブロックです。 +A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt.=草原とは、土に草を被せたものです。草原は、さまざまな植物を育てることができる、資源的なブロックです。クワで農地にしたり、シャベルでオフロードにしたりできます。光に当たると、近くの土の上に草がゆっくりと広がっていきます。不透明なブロックや液体の下では、草原は土に戻ることがあります。 +A lapis lazuli block is mostly a decorative block but also useful as a compact storage of lapis lazuli.=ラピスラズリブロックは、主に装飾用のブロックですが、ラピスラズリをコンパクトに保管するのにも便利です。 +A lava source sets fire to a couple of air blocks above when they're next to a flammable block.=溶岩源は、可燃性ブロックの隣にあると、その上の空気ブロック数個に火をつけます。 +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.=垂直によじ登ることができるハシゴの一部です。ハシゴは固いブロックの側面にのみ設置でき、ガラス、葉、氷、スラブ、グローストーン、シーランタンの上には設置できません。 +Acacia Bark=アカシアの樹皮 +Acacia Leaves=アカシアの葉 +Acacia Sapling=アカシアの苗木 +Acacia Wood=アカシアの木 +Acacia Wood Planks=アカシアの板材 +Acacia leaves are grown from acacia trees.=アカシアの葉は、アカシアの木から育ちます。 +Andesite=安山岩 +Andesite is an igneous rock.=安山岩とは、火成岩の一種です。 +Apple=リンゴ +Apples are food items which can be eaten.=リンゴは食べられるアイテムです。 +Barrier=バリア +Barriers are invisble walkable blocks. They are used to create boundaries of adventure maps and the like. Monsters and animals won't appear on barriers, and fences do not connect to barriers. Other blocks can be built on barriers like on any other block.=バリアとは、不可視の歩行可能なブロックのことです。アドベンチャーマップの境界線などに使われます。モンスターや動物はバリアの上には現れませんし、フェンスもバリアには接続されません。バリアには、これまでのブロックと同様、他のブロックを建てられます。 +Bedrock=岩盤 +Bedrock is a very hard type of rock. It can not be broken, destroyed, collected or moved by normal means, unless in Creative Mode.=岩盤は非常に硬い岩石の一種です。(クリエイティブモードでない限り)通常の手段では壊したり、破壊したり、集めたり、移動させることはできません。 +Birch Bark=シラカバの樹皮 +Birch Leaves=シラカバの葉 +Birch Sapling=シラカバの苗木 +Birch Wood=シラカバの木 +Birch Wood Planks=シラカバの板材 +Birch leaves are grown from birch trees.=シラカバの葉は、シラカバの木から育ちます。 +Black Stained Glass=黒色ガラス +Block of Coal=石炭ブロック +Block of Diamond=ダイヤモンドブロック +Block of Emerald=エメラルドブロック +Block of Gold=金ブロック +Block of Iron=鉄ブロック +Blocks of coal are useful as a compact storage of coal and very useful as a furnace fuel. A block of coal is as efficient as 10 coal.=石炭ブロックは、石炭をコンパクトに保管でき、炉の燃料として非常に便利です。1個の石炭ブロックは、10個の石炭と同じ効率です。 +Blue Stained Glass=青色ガラス +Bone Block=骨ブロック +Bone blocks are decorative blocks and a compact storage of bone meal.=骨ブロックは装飾用ブロックで、骨粉をコンパクトに保管できます。 +Bowl=ボウル +Bowls are mainly used to hold tasty soups.=ボウルは、主に美味しいスープを入れるために使われます。 +Brick=レンガ +Brick Block=レンガブロック +Brick blocks are a good building material for building solid houses and can take quite a punch.=レンガブロックは、頑丈な家を建てるのに適した建材で、かなりの衝撃にも耐えられます。 +Bricks are used to craft brick blocks.=レンガは、レンガブロックのクラフトに使います。 +Brown Stained Glass=茶色ガラス +Cactus=サボテン +Charcoal=木炭 +Charcoal is an alternative furnace fuel created by cooking wood in a furnace. It has the same burning time as coal and also shares many of its crafting recipes, but it can not be used to create coal blocks.=木炭はかまど用の代替燃料で、木をかまどで燃やすと作れます。石炭と同じ燃焼時間を持ち、クラフトのレシピも共通ですが、石炭ブロックの作成には使えません。 +Chiseled Stone Bricks=模様入り石レンガ +Chiseled Red Sandstone=模様入り赤い砂岩 +Chiseled Sandstone=模様入り砂岩 +Chiseled red sandstone is a decorative building block.=模様入り赤い砂岩は、装飾用ブロックです。 +Chiseled sandstone is a decorative building block.=模様入り砂岩は、装飾用ブロックです。 +Clay=粘土 +Clay Ball=粘土玉 +Clay balls are a raw material, mainly used to create bricks in the furnace.=粘土玉は原料で、主にかまどに入れてレンガを作るのに使われます。 +Clay is a versatile kind of earth commonly found at beaches underwater.=粘土は海水浴中によく見つかる、汎用性の高い土の一種です。 +Coal=石炭 +Coal Ore=石炭鉱石 +Coarse Dirt=粗い土 +Coarse dirt acts as a soil for some plants and is similar to dirt, but it will never grow a cover.=粗い土は、一部の植物の土として機能し、土と類似してはいますが、表層を何かが覆うことがありません。 +Cobblestone=丸石 +Cobweb=クモの巣 +Cobwebs can be walked through, but significantly slow you down.=クモの巣は歩いて通過できますが、大幅にノロくなります。 +Cracked Stone Bricks=ひび割れた石レンガ +Cut Red Sandstone=溝入り赤い砂岩 +Cut Sandstone=溝入り砂岩 +Cut red sandstone is a decorative building block.=溝入り赤い砂岩は、装飾用ブロックです。 +Cut sandstone is a decorative building block.=溝入り砂岩は、装飾用ブロックです。 +Cyan Stained Glass=青緑色ガラス +Dark Oak Bark=ダークオークの樹皮 +Dark Oak Leaves=ダークオークの葉 +Dark Oak Sapling=ダークオークの苗木 +Dark Oak Wood=ダークオークの木 +Dark Oak Wood Planks=ダークオークの板材 +Dark oak leaves are grown from dark oak trees.=ダークオークの葉は、ダークオークの木から育ちます。 +Dark oak saplings can grow into dark oaks, but only in groups. A lonely dark oak sapling won't grow. A group of four dark oak saplings grows into a dark oak after some time when they are placed on soil (such as dirt) in a 2×2 square and exposed to light.=ダークオークの苗木はダークオークに成長できますが、複数植えなければなりません。孤立したダークオークの苗木は成長しないのです。ダークオークの苗木を4本、正方形(2×2)の土壌(土など)の上に置き、光の下に晒しておくと、しばらくしたのちにダークオークへ成長します。 +Dead Bush=枯れ木 +Dead bushes are unremarkable plants often found in dry areas. They can be harvested for sticks.=枯れ木は、乾燥した場所によく見られる、路傍の植物です。棒として採取できます。 +Diamond=ダイヤモンド +Diamond Ore=ダイヤモンド鉱石 +Diamond ore is rare and can be found in clusters near the bottom of the world.=ダイヤモンド鉱石は希少で、ワールドの深層近くでまとまって見つかります。 +Diamonds are precious minerals and useful to create the highest tier of armor and tools.=ダイヤモンドは貴重な鉱物で、最上位の防具や道具のクラフトに役立ちます。 +Diorite=閃緑岩 +Diorite is an igneous rock.=閃緑岩とは、火成岩の一種です。 +Dirt=土 +Dirt acts as a soil for a few plants. When in light, this block may grow a grass or mycelium cover if such blocks are nearby.=土はいくつかの植物のための土壌として機能します。明るいところで近くに草や菌糸で覆われたブロックがあれば、このブロックの表層にもそれら成長させることがあります。 +Emerald=エメラルド +Emerald Ore=エメラルド鉱石 +Emerald ore is the ore of emeralds. It is very rare and can be found alone, not in clusters.=エメラルド鉱石は非常に希少で、群生しておらず、単独で見つけられます。 +Emeralds are used in villager trades as currency.=エメラルドは、村人との取引で通貨として使われます。 +Flint=火打石 +Flint is a raw material.=火打石は原料です。 +Flowing Lava=流れる溶岩 +Flowing Water=流れる水 +Frosted Ice=薄氷 +Frosted ice is a short-lived solid block. It melts into a water source within a few seconds.=薄氷は短命の固形ブロックです。水源の中では数秒で融けてしまいます。 +Glass=ガラス +Gold Ingot=金インゴット +Gold Nugget=金の小塊 +Gold Ore=金鉱石 +Gold nuggets are very small pieces of molten gold; the main purpose is to create gold ingots.=金の小塊は、溶けた金のごく小さな断片で、主に金インゴットを作るために使われます。 +Golden Apple=金のリンゴ +Golden apples are precious food items which can be eaten.=金のリンゴは貴重な食材で、食べられます。 +Granite=花崗岩 +Grass Block=草原 +Grass Path=オフロード +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.=オフロードは、草原の装飾的なバリエーションです。上部の色が異なり、草原より少し低いので、道にうってつけです。シャベルで作れます。オフロードは、固いブロックの下にあると土になります。 +Gravel=砂利 +Green Stained Glass=緑色ガラス +Grey Stained Glass=灰色ガラス +Ice=氷 +Ice is a solid block usually found in cold areas. It melts near block light sources at a light level of 12 or higher. When it melts or is broken while resting on top of another block, it will turn into a water source.=氷は、通常寒い地域にある固体ブロックです。明るさ12以上の光源ブロック付近では溶けます。他のブロックの上に乗っているときに溶けたり割れたりすると、水源に変わります。 +In the End dimension, starting a fire on this block will create an eternal fire.=エンドの次元では、このブロック上で火を起こすと、永続的な炎が生まれます。 +Iron Ingot=鉄インゴット +Iron Nugget=鉄の小塊 +Iron Ore=鉄鉱石 +Iron nuggets are very small pieces of molten iron; the main purpose is to create iron ingots.=鉄の小塊は、溶けた鉄のごく小さな断片で、主に鉄インゴットを作るために使われます。 +Jungle Bark=ジャングルの樹皮 +Jungle Leaves=ジャングルの葉 +Jungle Sapling=ジャングルの苗木 +Jungle Wood=ジャングルの木 +Jungle Wood Planks=ジャングルの板材 +Jungle leaves are grown from jungle trees.=ジャングルの葉は、ジャングルの木から育ちます。 +Ladder=ハシゴ +Lapis Lazuli Block=ラピスラズリブロック +Lapis Lazuli Ore=ラピスラズリ鉱石 +Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=ラピスラズリ鉱石は、ワールドの深層あたりで群生しているのが稀に見つかります。 +Lava Source=溶岩源 +Lava is hot and rather dangerous. Don't touch it, it will hurt you a lot and it is hard to get out.=溶岩は熱くてだいぶ危険です。触れてはいけません、とても痛いし、出るのも大変です。 +Light Blue Stained Glass=空色ガラス +Light Grey Stained Glass=薄灰色ガラス +Lime Stained Glass=黄緑色ガラス +Lit Redstone Ore=発光したレッドストーン鉱石 +Magenta Stained Glass=赤紫色ガラス +Molten gold. It is used to craft armor, tools, and whatnot.=溶かした金。防具や道具、その他のクラフトに使われます。 +Molten iron. It is used to craft armor, tools, and whatnot.=溶かした鉄。防具や道具、その他のクラフトに使われます。 +Mossy Cobblestone=苔むした丸石 +Mossy Stone Bricks=苔むした石レンガ +Mycelium=菌糸 +Mycelium is a type of dirt and the ideal soil for mushrooms. Unlike other dirt-type blocks, it can not be turned into farmland with a hoe. In light, mycelium slowly spreads over nearby dirt. Under an opaque block or a liquid, it eventually turns back into dirt.=菌糸は土の一種であり、キノコに最適な土壌です。他の土系ブロックと違い、クワで農地に変えられません。光に当たると、菌糸は近くの土の上にゆっくりと広がっていきます。不透明なブロックや液体の下では、それはやがて土に戻ります。 +Oak Bark=オークの樹皮 +Oak Leaves=オークの葉 +Oak Sapling=オークの苗木 +Oak Wood=オークの木 +Oak Wood Planks=オークの板材 +Oak leaves are grown from oak trees.=オークの葉は、オークの木から育ちます。 +Obsidian=黒曜石 +Obsidian is an extremely hard mineral with an enourmous blast-resistance. Obsidian is formed when water meets lava.=黒曜石は、とてつもなく硬い鉱物で耐爆性が抜群です。黒曜石は、水と溶岩が出会って形成されたものです。 +One of the most common blocks in the world, almost the entire underground consists of stone. It sometimes contains ores. Stone may be created when water meets lava.=世界で最も一般的なブロックの一つで、地下のほぼ全体が石で構成されています。時には鉱石を含むこともあります。水と溶岩が出会って石ができる場合もあります。 +Orange Stained Glass=橙色ガラス +Packed Ice=氷塊 +Packed ice is a compressed form of ice. It is opaque and solid.=氷塊は、氷が圧縮した形態です。不透明で固形です。 +Paper=紙 +Paper is used to craft books and maps.=紙は、本や地図などのクラフトに使われます。 +Pink Stained Glass=桃色ガラス +Podzol=ポドゾル +Podzol is a type of dirt found in taiga forests. Only a few plants are able to survive on it.=ポドゾルとは、タイガの森で見つかる土の一種です。その上で生きられる植物はごくわずかです。 +Polished Andesite=磨かれた安山岩 +Polished Diorite=磨かれた閃緑岩 +Polished Granite=磨かれた花崗岩 +Polished Stone=磨かれた石 +Polished andesite is a decorative building block made from andesite.=磨かれた安山岩は装飾的な建築用ブロックで、安山岩から作られます。 +Polished diorite is a decorative building block made from diorite.=磨かれた閃緑岩は装飾的な建築用ブロックで、閃緑岩から作られます。 +Polished granite is a decorative building block made from granite.=磨かれた花崗岩は装飾的な建築用ブロックで、花崗岩から作られます。 +Purple Stained Glass=紫色ガラス +Realm Barrier=領域障壁 +Red Sand=赤い砂 +Red Sandstone=赤い砂岩 +Red Stained Glass=赤色ガラス +Red sand is found in large quantities in mesa biomes.=赤い砂は、メサバイオームで大量に見つかります。 +Red sandstone is compressed red sand and is a rather soft kind of stone.=赤い砂岩は赤い砂を圧縮したもので、やや軟らかい種類の石です。 +Redstone Ore=レッドストーン鉱石 +Redstone ore is commonly found near the bottom of the world. It glows when it is punched or walked upon.=レッドストーン鉱石は、ワールドの低層に多く見られます。それをパンチしたり、踏んだりすると光ります。 +Sand=砂 +Sand is found in large quantities at beaches and deserts.=砂は、海岸や砂漠で大量に見つかります。 +Sandstone=砂岩 +Sandstone is compressed sand and is a rather soft kind of stone.=砂岩は砂を圧縮したもので、やや軟らかい種類の石です。 +Slime Block=スライムブロック +Slime blocks are very bouncy and prevent fall damage.=スライムブロックは非常に弾力性があり、落下ダメージを防ぐことができます。 +Smooth Red Sandstone=滑らかな赤い砂岩 +Smooth Sandstone=滑らかな砂岩 +Smooth red sandstone is a decorative building block.=滑らかな赤い砂岩は、装飾的な建築ブロックです。 +Smooth sandstone is compressed sand and is a rather soft kind of stone.=滑らかな砂岩は、装飾的な建築ブロックです。 +Snow=雪 +Some coal contained in stone, it is very common and can be found inside stone in medium to large clusters at nearly every height.=石に含まれる石炭はとても一般的で、ほぼすべての高さにおいて、中~大規模なまとまりで見つけることができます。 +Some iron contained in stone, it is prety common and can be found below sea level.=石に含まれる鉄はかなり一般的で、海面下の高さで見つけられます。 +Spruce Bark=トウヒの樹皮 +Spruce Leaves=トウヒの葉 +Spruce Sapling=トウヒの苗木 +Spruce Wood=トウヒの木 +Spruce Wood Planks=トウヒの板材 +Spruce leaves are grown from spruce trees.=トウヒの葉は、トウヒの木から育ちます。 +Stained glass is a decorative and mostly transparent block which comes in various different colors.=色ガラスは、そのほとんどが透明な装飾ブロックで、さまざまなカラーバリエーションがあります。 +Stick=棒 +Sticks are a very versatile crafting material; used in countless crafting recipes.=棒は、数え切れないほどのクラフトレシピに使用されている、非常に汎用性の高いクラフト素材です。 +Stone=石 +Stripped Acacia Log=樹皮を剥いだアカシアの原木 +Stripped Acacia Wood=樹皮を剥いだアカシアの木 +Stripped Birch Log=樹皮を剥いだシラカバの原木 +Stripped Birch Wood=樹皮を剥いだシラカバの木 +Stripped Dark Oak Log=樹皮を剥いだダークオークの原木 +Stripped Dark Oak Wood=樹皮を剥いだダークオークの木 +Stripped Jungle Log=樹皮を剥いだジャングルの原木 +Stripped Jungle Wood=樹皮を剥いだジャングルの木 +Stripped Oak Log=樹皮を剥いだオークの原木 +Stripped Oak Wood=樹皮を剥いだオークの木 +Stripped Spruce Log=樹皮を剥いだトウヒの原木 +Stripped Spruce Wood=樹皮を剥いだトウヒの木 +Stone Bricks=石レンガ +Sugar=砂糖 +Sugar Canes=サトウキビ +Sugar canes are a plant which has some uses in crafting. Sugar canes will slowly grow up to 3 blocks when they are next to water and are placed on a grass block, dirt, sand, red sand, podzol or coarse dirt. When a sugar cane is broken, all sugar canes connected above will break as well.=サトウキビはクラフトに使える植物です。水のある場所で、草原、土、砂、赤い砂、ポドゾル、粗い土の上にサトウキビを置くと、ゆっくりと3ブロックまで成長します。サトウキビが折れるときは、上につながっているすべてのサトウキビも折れます。 +Sugar canes can only be placed top of other sugar canes and on top of blocks on which they would grow.=サトウキビは、他のサトウキビの上や、サトウキビが成長するブロックの上にしか置けません。 +Sugar comes from sugar canes and is used to make sweet foods.=砂糖はサトウキビから採れ、甘いものを作るのに使われます。 +The stripped trunk of an acacia tree.=樹皮が剥がれたアカシアの樹幹です。 +The stripped trunk of a birch tree.=樹皮が剥がれたシラカバの樹幹です。 +The stripped trunk of a dark oak tree.=樹皮が剥がれたダークオークの樹幹です。 +The stripped trunk of a jungle tree.=樹皮が剥がれたジャングルの樹幹です。 +The stripped trunk of an oak tree.=樹皮が剥がれたオークの樹幹です。 +The stripped trunk of a spruce tree.=樹皮が剥がれたトウヒの樹幹です。 +The trunk of a birch tree.=シラカバの樹幹です。 +The trunk of a dark oak tree.=ダークオークの樹幹です。 +The trunk of a jungle tree.=ジャングルの樹幹です。 +The trunk of a spruce tree.=トウヒの樹幹です。 +The trunk of an acacia.=アカシアの樹幹です。 +The trunk of an oak tree.=オークの樹幹です。 +The stripped wood of an acacia tree.=樹皮が剥がれたアカシアの木です。 +The stripped wood of a birch tree.=樹皮が剥がれたシラカバの木です。 +The stripped wood of a dark oak tree.=樹皮が剥がれたダークオークの木です。 +The stripped wood of a jungle tree.=樹皮が剥がれたジャングルの木です。 +The stripped wood of an oak tree.=樹皮が剥がれたオークの木です。 +The stripped wood of a spruce tree.=樹皮が剥がれたトウヒの木です。 +This block consists of a couple of loose stones and can't support itself.=このブロックは緩い石の組み合わせで構成されており、自身を支えられません。 +This is a decorative block surrounded by the bark of a tree trunk.=これは、木の幹の皮に覆われた装飾ブロックです。 +This is a decorative block.=これは装飾ブロックです。 +This is a full block of snow. Snow of this thickness is usually found in areas of extreme cold.=これは1ブロックサイズの雪です。この厚さの雪は、おおむね極寒の地で見られます。 +This is a piece of cactus commonly found in dry areas, especially deserts. Over time, cacti will grow up to 3 blocks high on sand or red sand. A cactus hurts living beings touching it with a damage of 1 HP every half second. When a cactus block is broken, all cactus blocks connected above it will break as well.=これは乾燥した地域、特に砂漠によく見られるサボテンの一種です。サボテンは砂や赤い砂の上で時間が経つと、3ブロックの高さまで成長します。サボテンはそれに触れた生物を傷つけます(1HP/0.5秒のダメージ)。サボテンのブロックが壊れると、その上につながっているすべてのサボテンのブロックも壊れます。 +This stone contains pure gold, a rare metal.=この石には、希少金属である純金が含まれています。 +Top Snow=積雪 +Top snow is a layer of snow. It melts near light sources other than the sun with a light level of 12 or higher.=積雪とは、雪の層です。太陽を除く明るさ12以上の光源付近で融けます。 +Vines=ツタ +Vines are climbable blocks which can be placed on the sides of solid full-cube blocks. Vines slowly grow and spread.=ツタは、フルサイズのブロックの側面に配置できる、よじ登り可能なブロックです。ツタはゆっくりと成長し、広がっていきます。 +Void=奈落 +Water=水 +Water Source=水源 +Water is abundant in oceans and also appears in a few springs in the ground. You can swim easily in water, but you need to catch your breath from time to time.=水は海に豊富にあり、また地中のわずかな湧水にも現れます。水中では簡単に泳ぐことができますが、時々息を整える必要があります。 +When placed on soil (such as dirt) and exposed to light, a birch sapling will grow into a birch after some time.=シラカバの苗木は、土壌(土など)の上に置いて光を当てると、しばらくしたのちシラカバの木に成長します。 +When placed on soil (such as dirt) and exposed to light, a jungle sapling will grow into a jungle tree after some time. When there are 4 jungle saplings in a 2×2 square, they will grow to a huge jungle tree.=ジャングルの苗木は、土壌(土など)の上に置いて光を当てると、しばらくしたのちジャングルの木に成長します。正方形(2×2)に4本の苗木があると、巨大なジャングルの木に成長します。 +When placed on soil (such as dirt) and exposed to light, a spruce sapling will grow into a spruce after some time. When there are 4 spruce saplings in a 2×2 square, they will grow to a huge spruce.=トウヒの苗木は、土壌(土など)の上に置いて光を当てると、しばらくしたのちトウヒの木に成長します。正方形(2×2)に4本の苗木があると、巨大なトウヒの木に成長します。 +When placed on soil (such as dirt) and exposed to light, an acacia sapling will grow into an acacia after some time.=アカシアの苗木は、土壌(土など)の上に置いて光を当てると、しばらくしたのちアカシアの木に成長します。 +When placed on soil (such as dirt) and exposed to light, an oak sapling will grow into an oak after some time.=オークの苗木は、土壌(土など)の上に置いて光を当てると、しばらくしたのちオークの木に成長します。 +When you hold a barrier in hand, you reveal all placed barriers in a short distance around you.=バリアを手にすると、周囲の近距離に配置されたバリアがすべて表示されます。 +White Stained Glass=白色ガラス +Yellow Stained Glass=黄色ガラス +“Coal” refers to coal lumps obtained by digging coal ore which can be found underground. Coal is your standard furnace fuel, but it can also be used to make torches, coal blocks and a few other things.=「石炭」とは、地中の石炭鉱石を掘って得られる石炭の塊のことを指します。石炭はかまどの燃料として一般的ですが、松明や石炭ブロックなどにも利用されます。 +Water interacts with lava in various ways:=水は溶岩とさまざまな形で相互作用します: +• When water is directly above or horizontally next to a lava source, the lava turns into obsidian.=・溶岩源の上や横に水が隣接すると、溶岩源は黒曜石に変化します。 +• When flowing water touches flowing lava either from above or horizontally, the lava turns into cobblestone.=・流れる溶岩の上や横に流れる水が触れると、溶岩は丸石に変化します。 +• When water is directly below lava, the water turns into stone.=・水が溶岩の真下にあると、水は石に変化します。 +Lava interacts with water various ways:=溶岩は水とさまざまな相互作用をします: +• When a lava source is directly below or horizontally next to water, the lava turns into obsidian.=・溶岩源が水の下や横に隣接している場合、溶岩源は黒曜石に変化します。 +• When lava is directly above water, the water turns into stone.=・溶岩が水の真上にあると、水は石に変化します。 +Stained Glass=色ガラス +Granite is an igneous rock.=花崗岩とは、火成岩の一種です。 +Top snow can be stacked and has one of 8 different height levels. At levels 2-8, top snow is collidable. Top snow drops 2-9 snowballs, depending on its height.=積雪は積み重ねることができ、8段階の高さが選べます。2~8段では、積雪に衝突性があります。積雪は高さに応じて2~9個の雪玉を落とします。 +This block can only be placed on full solid blocks and on another top snow (which increases its height).=このブロックは、完全な固体ブロックの上と、別の積雪の上にしか置けません(高さが増えます)。 +Needs soil and water to grow=生育に必要なのは、土壌と水 +Needs soil and light to grow=生育に必要なのは、土壌と光 +Grows on sand=砂の上に生育 +Contact damage: @1 per half second=接触ダメージ:@1/0.5秒 +Slows down movement=動きが遅くなる +2×2 saplings required=2×2本の苗木が必要 +2×2 saplings @= large tree=2×2本の苗木で @=は大木となる +Grows on sand or dirt next to water=水辺の砂や土の上に生育 +Stackable=スタック可能 +Crying Obsidian=泣く黒曜石 +Crying obsidian is a luminous obsidian that can generate as part of ruined portals.=泣く黒曜石は、廃墟のポータルの一部として生成可能な、発光する黒曜石です。 +Enchanted Golden Apple=エンチャントされた金のリンゴ \ No newline at end of file diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.pl.tr b/mods/ITEMS/mcl_core/locale/mcl_core.pl.tr index 68dfbd3d0f..8e9d7cf8f0 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.pl.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.pl.tr @@ -130,6 +130,8 @@ Jungle Wood=Tropikalne drewno Jungle Wood Planks=Tropikalne deski Jungle leaves are grown from jungle trees.=Tropikalne liście rosną na tropikalnych drzewach. Ladder=Drabina +Lapis Lazuli=Lazuryt +Lapis Lazuli are required for enchanting items on an enchanting table.=Lapis Lazuli są wymagane do zaklinania przedmiotów na zaklinającym stole. Lapis Lazuli Block=Blok lazurytu Lapis Lazuli Ore=Ruda lazurytu Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=Ruda lazurytu jest rzadko występującym blokiem, który można znaleźć w grupach przy dnie świata. diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.ru.tr b/mods/ITEMS/mcl_core/locale/mcl_core.ru.tr index 2d5b5462c3..831795792c 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.ru.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.ru.tr @@ -130,6 +130,8 @@ Jungle Wood=Дерево джунглей Jungle Wood Planks=Доски из дерева джунглей Jungle leaves are grown from jungle trees.=Листва дерева джунглей произрастает на деревьях джунглей. Ladder=Лестница +Lapis Lazuli=Ляпис-лазурь +Lapis Lazuli are required for enchanting items on an enchanting table.=Лазурит требуется для зачарования предметов на столе зачаровывания. Lapis Lazuli Block=Ляпис-лазурный блок Lapis Lazuli Ore=Ляпис-лазурная руда Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=Ляпис-лазурная руда это руда ляпис-лазури. Она изредка встречается в виде скоплений вблизи дна мира. diff --git a/mods/ITEMS/mcl_core/locale/mcl_core.zh_TW.tr b/mods/ITEMS/mcl_core/locale/mcl_core.zh_TW.tr index 1773418462..0e8280c6e4 100644 --- a/mods/ITEMS/mcl_core/locale/mcl_core.zh_TW.tr +++ b/mods/ITEMS/mcl_core/locale/mcl_core.zh_TW.tr @@ -129,6 +129,8 @@ Jungle Wood=叢林原木 Jungle Wood Planks=叢林木材 Jungle leaves are grown from jungle trees.=叢林樹葉是由叢林樹生長出來的。 Ladder=梯子 +Lapis Lazuli=青金石 +Lapis Lazuli are required for enchanting items on an enchanting table.=为附魔台上的物品附魔需要青金石。 Lapis Lazuli Block=青金石磚 Lapis Lazuli Ore=青金石礦 Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.=青金石礦是青金石的礦石。在世界底部附近能發現成群的和稀有的青金石礦。 diff --git a/mods/ITEMS/mcl_core/locale/template.txt b/mods/ITEMS/mcl_core/locale/template.txt index cd4b9b463c..a7798b9cdd 100644 --- a/mods/ITEMS/mcl_core/locale/template.txt +++ b/mods/ITEMS/mcl_core/locale/template.txt @@ -130,6 +130,8 @@ Jungle Wood= Jungle Wood Planks= Jungle leaves are grown from jungle trees.= Ladder= +Lapis Lazuli= +Lapis Lazuli are required for enchanting items on an enchanting table.= Lapis Lazuli Block= Lapis Lazuli Ore= Lapis lazuli ore is the ore of lapis lazuli. It can be rarely found in clusters near the bottom of the world.= @@ -283,4 +285,4 @@ Grows on sand or dirt next to water= Stackable= Crying Obsidian= Crying obsidian is a luminous obsidian that can generate as part of ruined portals.= -Enchanted Golden Apple= \ No newline at end of file +Enchanted Golden Apple= diff --git a/mods/ITEMS/mcl_core/nodes_base.lua b/mods/ITEMS/mcl_core/nodes_base.lua index c99e306ad1..476bdf9ce4 100644 --- a/mods/ITEMS/mcl_core/nodes_base.lua +++ b/mods/ITEMS/mcl_core/nodes_base.lua @@ -187,11 +187,11 @@ minetest.register_node("mcl_core:stone_with_lapis", { drop = { max_items = 1, items = { - {items = {"mcl_dye:blue 8"},rarity = 5}, - {items = {"mcl_dye:blue 7"},rarity = 5}, - {items = {"mcl_dye:blue 6"},rarity = 5}, - {items = {"mcl_dye:blue 5"},rarity = 5}, - {items = {"mcl_dye:blue 4"}}, + {items = {"mcl_core:lapis 8"},rarity = 5}, + {items = {"mcl_core:lapis 7"},rarity = 5}, + {items = {"mcl_core:lapis 6"},rarity = 5}, + {items = {"mcl_core:lapis 5"},rarity = 5}, + {items = {"mcl_core:lapis 4"}}, } }, sounds = mcl_sounds.node_sound_stone_defaults(), @@ -369,7 +369,7 @@ minetest.register_node("mcl_core:dirt_with_grass", { _doc_items_longdesc = S("A grass block is dirt with a grass cover. Grass blocks are resourceful blocks which allow the growth of all sorts of plants. They can be turned into farmland with a hoe and turned into grass paths with a shovel. In light, the grass slowly spreads onto dirt nearby. Under an opaque block or a liquid, a grass block may turn back to dirt."), _doc_items_hidden = false, paramtype2 = "color", - tiles = {"mcl_core_grass_block_top.png", { name="default_dirt.png^mcl_dirt_grass_shadow.png", color="white" }}, + tiles = {"mcl_core_grass_block_top.png", { name="default_dirt.png", color="white" }, { name="default_dirt.png^mcl_dirt_grass_shadow.png", color="white" }}, overlay_tiles = {"mcl_core_grass_block_top.png", "", {name="mcl_core_grass_block_side_overlay.png", tileable_vertical=false}}, palette = "mcl_core_palette_grass.png", palette_index = 0, @@ -434,7 +434,7 @@ minetest.register_node("mcl_core:mycelium", { tiles = {"mcl_core_mycelium_top.png", "default_dirt.png", {name="mcl_core_mycelium_side.png", tileable_vertical=false}}, is_ground_content = true, stack_max = 64, - groups = { handy = 1, shovely = 1, dirt = 2, spreading_dirt_type = 1, enderman_takable = 1, building_block = 1, soil_sapling = 2, path_creation_possible=1}, + groups = { handy = 1, shovely = 1, dirt = 2, spreading_dirt_type = 1, enderman_takable = 1, building_block = 1, soil_sapling = 2, path_creation_possible=1, mycelium=1}, drop = "mcl_core:dirt", sounds = mcl_sounds.node_sound_dirt_defaults({ footstep = {name="default_grass_footstep", gain=0.1}, @@ -448,6 +448,44 @@ minetest.register_node("mcl_core:mycelium", { }) mcl_core.register_snowed_node("mcl_core:mycelium_snow", "mcl_core:mycelium", nil, nil, false, S("Mycelium with Snow")) +local PARTICLE_ABM_DISTANCE = 16 + +--if minetest.settings:get("mcl_node_particles") == "full" then +minetest.register_abm({ + label = "Townaura particles", + nodenames = {"group:mycelium"}, + interval = 2, + chance = 30, + action = function(pos, node) + local player_near = false + for _,player in pairs(minetest.get_connected_players()) do + if vector.distance(player:get_pos(), pos) < PARTICLE_ABM_DISTANCE then + player_near = true + end + end + if player_near then + local apos = {x=pos.x-2, y=pos.y+0.51, z=pos.z-2} + local apos2 = {x=pos.x+2, y=pos.y+0.51, z=pos.z+2} + local acc = { x = 0, y = 0, z = 0 } + minetest.add_particlespawner({ + time = 2, + amount = 5, + minpos = apos, + maxpos = apos2, + minvel = vector.new(-3/10, 0, -3/10), + maxvel = vector.new(3/10, 10/60, 3/10), + minacc = acc, + expirationtime = 4, + collisiondetection = true, + collision_removal = true, + size = 1, + texture = "mcl_core_mycelium_particle.png", + }) + end + end, +}) +--end + minetest.register_node("mcl_core:podzol", { description = S("Podzol"), _doc_items_longdesc = S("Podzol is a type of dirt found in taiga forests. Only a few plants are able to survive on it."), @@ -504,9 +542,7 @@ minetest.register_node("mcl_core:gravel", { {items = {"mcl_core:gravel"}} } }, - sounds = mcl_sounds.node_sound_dirt_defaults({ - footstep = {name="default_gravel_footstep", gain=0.45}, - }), + sounds = mcl_sounds.node_sound_gravel_defaults(), _mcl_blast_resistance = 0.6, _mcl_hardness = 0.6, _mcl_silk_touch_drop = true, @@ -863,7 +899,7 @@ minetest.register_node("mcl_core:ice", { stack_max = 64, groups = {handy=1,pickaxey=1, slippery=3, building_block=1, ice=1}, drop = "", - sounds = mcl_sounds.node_sound_glass_defaults(), + sounds = mcl_sounds.node_sound_ice_defaults(), node_dig_prediction = "mcl_core:water_source", after_dig_node = function(pos, oldnode) mcl_core.melt_ice(pos) @@ -881,7 +917,7 @@ minetest.register_node("mcl_core:packed_ice", { stack_max = 64, groups = {handy=1,pickaxey=1, slippery=3, building_block=1, ice=1}, drop = "", - sounds = mcl_sounds.node_sound_glass_defaults(), + sounds = mcl_sounds.node_sound_ice_defaults(), _mcl_blast_resistance = 0.5, _mcl_hardness = 0.5, _mcl_silk_touch_drop = true, @@ -929,7 +965,7 @@ for i=0,3 do stack_max = 64, groups = {handy=1, frosted_ice=1, slippery=3, not_in_creative_inventory=1, ice=1}, drop = "", - sounds = mcl_sounds.node_sound_glass_defaults(), + sounds = mcl_sounds.node_sound_ice_defaults(), on_construct = function(pos) local timer = minetest.get_node_timer(pos) timer:start(1.5) diff --git a/mods/ITEMS/mcl_core/nodes_liquid.lua b/mods/ITEMS/mcl_core/nodes_liquid.lua index 68ae4a8299..081f1978a5 100644 --- a/mods/ITEMS/mcl_core/nodes_liquid.lua +++ b/mods/ITEMS/mcl_core/nodes_liquid.lua @@ -50,7 +50,7 @@ minetest.register_node("mcl_core:water_flowing", { liquid_viscosity = WATER_VISC, liquid_range = 7, waving = 3, - post_effect_color = {a=209, r=0x03, g=0x3C, b=0x5C}, + post_effect_color = {a=20, r=0x03, g=0x3C, b=0x5C}, groups = { water=3, liquid=3, puts_out_fire=1, not_in_creative_inventory=1, freezes=1, melt_around=1, dig_by_piston=1}, _mcl_blast_resistance = 100, -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode @@ -95,7 +95,7 @@ S("• When water is directly below lava, the water turns into stone."), liquid_alternative_source = "mcl_core:water_source", liquid_viscosity = WATER_VISC, liquid_range = 7, - post_effect_color = {a=209, r=0x03, g=0x3C, b=0x5C}, + post_effect_color = {a=60, r=0x03, g=0x3C, b=0x5C}, stack_max = 64, groups = { water=3, liquid=3, puts_out_fire=1, freezes=1, not_in_creative_inventory=1, dig_by_piston=1}, _mcl_blast_resistance = 100, diff --git a/mods/ITEMS/mcl_core/nodes_trees.lua b/mods/ITEMS/mcl_core/nodes_trees.lua index 54a43d6bfe..787faa6d75 100644 --- a/mods/ITEMS/mcl_core/nodes_trees.lua +++ b/mods/ITEMS/mcl_core/nodes_trees.lua @@ -8,6 +8,40 @@ if mod_screwdriver then on_rotate = screwdriver.rotate_3way end +-- Check dug/destroyed tree trunks for orphaned leaves. +-- +-- This function is meant to be called by the `after_destruct` handler of +-- treetrunk nodes. +-- +-- Whenever a trunk node is removed, all `group:leaves` nodes in a sphere +-- with radius 6 are checked. Every such node that does not have a trunk +-- node within a distance of 6 blocks is converted into a orphan leaf node. +-- An ABM will gradually decay these nodes. +-- +-- If param2 of the node is set to a nonzero value, the node will always +-- be preserved. This is set automatically when leaves are placed manually. +-- +-- @param pos the position of the removed trunk node. +-- @param oldnode the node table of the removed trunk node. +function mcl_core.update_leaves(pos, oldnode) + local pos1, pos2 = vector.offset(pos, -6, -6, -6), vector.offset(pos, 6, 6, 6) + local lnode + local leaves = minetest.find_nodes_in_area(pos1, pos2, "group:leaves") + for _, lpos in pairs(leaves) do + lnode = minetest.get_node(lpos) + -- skip already decaying leaf nodes + if minetest.get_item_group(lnode.name, "orphan_leaves") ~= 1 then + if not minetest.find_node_near(lpos, 6, "group:tree") then + -- manually placed leaf nodes have param2 + -- set and will never decay automatically + if lnode.param2 == 0 then + minetest.swap_node(lpos, {name = lnode.name .. "_orphan"}) + end + end + end + end +end + -- Register tree trunk (wood) and bark local function register_tree_trunk(subname, description_trunk, description_bark, longdesc, tile_inner, tile_bark, stripped_variant) minetest.register_node("mcl_core:"..subname, { @@ -17,6 +51,7 @@ local function register_tree_trunk(subname, description_trunk, description_bark, tiles = {tile_inner, tile_inner, tile_bark}, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, + after_destruct = mcl_core.update_leaves, stack_max = 64, groups = {handy=1,axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5}, sounds = mcl_sounds.node_sound_wood_defaults(), @@ -107,10 +142,7 @@ local function register_wooden_planks(subname, description, tiles) }) end -local function register_leaves(subname, description, longdesc, tiles, sapling, drop_apples, sapling_chances, leafdecay_distance) - if leafdecay_distance == nil then - leafdecay_distance = 4 - end +local function register_leaves(subname, description, longdesc, tiles, sapling, drop_apples, sapling_chances) local apple_chances = {200, 180, 160, 120, 40} local stick_chances = {50, 45, 30, 35, 10} @@ -141,7 +173,7 @@ local function register_leaves(subname, description, longdesc, tiles, sapling, d return drop end - minetest.register_node("mcl_core:"..subname, { + local l_def = { description = description, _doc_items_longdesc = longdesc, _doc_items_hidden = false, @@ -153,9 +185,8 @@ local function register_leaves(subname, description, longdesc, tiles, sapling, d stack_max = 64, groups = { handy = 1, hoey = 1, shearsy = 1, swordy = 1, dig_by_piston = 1, - leaves = 1, leafdecay = leafdecay_distance, deco_block = 1, flammable = 2, fire_encouragement = 30, fire_flammability = 60, - compostability = 30 + leaves = 1, deco_block = 1, compostability = 30 }, drop = get_drops(0), _mcl_shears_drop = true, @@ -164,7 +195,19 @@ local function register_leaves(subname, description, longdesc, tiles, sapling, d _mcl_hardness = 0.2, _mcl_silk_touch_drop = true, _mcl_fortune_drop = { get_drops(1), get_drops(2), get_drops(3), get_drops(4) }, - }) + } + + minetest.register_node("mcl_core:" .. subname, l_def) + + local o_def = table.copy(l_def) + o_def._doc_items_create_entry = false + o_def.place_param2 = nil + o_def.groups.not_in_creative_inventory = 1 + o_def.groups.orphan_leaves = 1 + o_def._mcl_shears_drop = {"mcl_core:" .. subname} + o_def._mcl_silk_touch_drop = {"mcl_core:" .. subname} + + minetest.register_node("mcl_core:" .. subname .. "_orphan", o_def) end local function register_sapling(subname, description, longdesc, tt_help, texture, selbox) diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_birch_bee_nest.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_birch_bee_nest.mts new file mode 100644 index 0000000000..fff8fddc4a Binary files /dev/null and b/mods/ITEMS/mcl_core/schematics/mcl_core_birch_bee_nest.mts differ diff --git a/mods/ITEMS/mcl_core/schematics/mcl_core_oak_classic_bee_nest.mts b/mods/ITEMS/mcl_core/schematics/mcl_core_oak_classic_bee_nest.mts new file mode 100644 index 0000000000..1f793f47c8 Binary files /dev/null and b/mods/ITEMS/mcl_core/schematics/mcl_core_oak_classic_bee_nest.mts differ diff --git a/mods/ITEMS/mcl_core/textures/default_dry_grass.png b/mods/ITEMS/mcl_core/textures/default_dry_grass.png deleted file mode 100644 index e610678a62..0000000000 Binary files a/mods/ITEMS/mcl_core/textures/default_dry_grass.png and /dev/null differ diff --git a/mods/ITEMS/mcl_core/textures/default_dry_grass_side.png b/mods/ITEMS/mcl_core/textures/default_dry_grass_side.png deleted file mode 100644 index b12d06e7b7..0000000000 Binary files a/mods/ITEMS/mcl_core/textures/default_dry_grass_side.png and /dev/null differ diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_lapis.png b/mods/ITEMS/mcl_core/textures/mcl_core_lapis.png new file mode 100644 index 0000000000..e0e3023075 Binary files /dev/null and b/mods/ITEMS/mcl_core/textures/mcl_core_lapis.png differ diff --git a/mods/ITEMS/mcl_core/textures/mcl_core_mycelium_particle.png b/mods/ITEMS/mcl_core/textures/mcl_core_mycelium_particle.png new file mode 100644 index 0000000000..abf43e33a6 Binary files /dev/null and b/mods/ITEMS/mcl_core/textures/mcl_core_mycelium_particle.png differ diff --git a/mods/ITEMS/mcl_crafting_table/locale/mcl_crafting_table.ja.tr b/mods/ITEMS/mcl_crafting_table/locale/mcl_crafting_table.ja.tr new file mode 100644 index 0000000000..03bd702b14 --- /dev/null +++ b/mods/ITEMS/mcl_crafting_table/locale/mcl_crafting_table.ja.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_crafting_table +Crafting Table=作業台 +A crafting table is a block which grants you access to a 3×3 crafting grid which allows you to perform advanced crafts.=作業台とは、3×3のクラフトグリッドを提供し、高度なクラフトが行えるようになるブロックです。 +Rightclick the crafting table to access the 3×3 crafting grid.=作業台を右クリックすると、3×3のクラフトグリッドが表示されます。 +Recipe book=レシピ本 +Crafting=クラフト +Inventory=インベントリ +3×3 crafting grid=3×3のクラフトグリッド diff --git a/mods/ITEMS/mcl_crimson/init.lua b/mods/ITEMS/mcl_crimson/init.lua index 3de3b42434..ba680cff56 100644 --- a/mods/ITEMS/mcl_crimson/init.lua +++ b/mods/ITEMS/mcl_crimson/init.lua @@ -21,7 +21,9 @@ function grow_vines(pos, moreontop ,vine, dir) n = minetest.get_node(pos) if n.name == "air" then for i=0,math.max(moreontop,1) do - minetest.set_node(vector.offset(pos,0,i*dir,0),{name=vine}) + if minetest.get_node(pos).name == "air" then + minetest.set_node(vector.offset(pos,0,i*dir,0),{name=vine}) + end end break end @@ -80,7 +82,7 @@ minetest.register_node("mcl_crimson:warped_fungus", { }, node_placement_prediction = "", on_rightclick = function(pos, node, pointed_thing, player, itemstack) - if pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then + if pointed_thing:get_wielded_item():get_name() == "mcl_bone_meal:bone_meal" then local nodepos = minetest.get_node({x = pos.x, y = pos.y - 1, z = pos.z}) if nodepos.name == "mcl_crimson:warped_nylium" or nodepos.name == "mcl_nether:netherrack" then local random = math.random(1, 5) @@ -94,6 +96,12 @@ minetest.register_node("mcl_crimson:warped_fungus", { _mcl_blast_resistance = 0, }) +mcl_flowerpots.register_potted_flower("mcl_crimson:warped_fungus", { + name = "warped fungus", + desc = S("Warped Fungus Mushroom"), + image = "farming_warped_fungus.png", +}) + minetest.register_node("mcl_crimson:twisting_vines", { description = S("Twisting Vines"), drawtype = "plantlike", @@ -110,14 +118,24 @@ minetest.register_node("mcl_crimson:twisting_vines", { fixed = { -3/16, -0.5, -3/16, 3/16, 0.5, 3/16 }, }, node_placement_prediction = "", - on_rightclick = function(pos, node, pointed_thing, itemstack) - if pointed_thing:get_wielded_item():get_name() == "mcl_crimson:twisting_vines" then - itemstack:take_item() + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + local pn = clicker:get_player_name() + if clicker:is_player() and minetest.is_protected(vector.offset(pos,0,1,0), pn or "") then + minetest.record_protection_violation(vector.offset(pos,0,1,0), pn) + return itemstack + end + if clicker:get_wielded_item():get_name() == "mcl_crimson:twisting_vines" then + if not minetest.is_creative_enabled(clicker:get_player_name()) then + itemstack:take_item() + end grow_vines(pos, 1, "mcl_crimson:twisting_vines") - elseif pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then - itemstack:take_item() + elseif clicker:get_wielded_item():get_name() == "mcl_bone_meal:bone_meal" then + if not minetest.is_creative_enabled(clicker:get_player_name()) then + itemstack:take_item() + end grow_vines(pos, math.random(1, 3),"mcl_crimson:twisting_vines") end + return itemstack end, drop = { max_items = 1, @@ -156,14 +174,24 @@ minetest.register_node("mcl_crimson:weeping_vines", { fixed = { -3/16, -0.5, -3/16, 3/16, 0.5, 3/16 }, }, node_placement_prediction = "", - on_rightclick = function(pos, node, pointed_thing, itemstack) - if pointed_thing:get_wielded_item():get_name() == "mcl_crimson:weeping_vines" then - itemstack:take_item() + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + local pn = clicker:get_player_name() + if clicker:is_player() and minetest.is_protected(vector.offset(pos,0,1,0), pn or "") then + minetest.record_protection_violation(vector.offset(pos,0,1,0), pn) + return itemstack + end + if clicker:get_wielded_item():get_name() == "mcl_crimson:weeping_vines" then + if not minetest.is_creative_enabled(clicker:get_player_name()) then + itemstack:take_item() + end grow_vines(pos, 1, "mcl_crimson:weeping_vines", -1) - elseif pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then - itemstack:take_item() + elseif clicker:get_wielded_item():get_name() == "mcl_bone_meal:bone_meal" then + if not minetest.is_creative_enabled(clicker:get_player_name()) then + itemstack:take_item() + end grow_vines(pos, math.random(1, 3),"mcl_crimson:weeping_vines", -1) end + return itemstack end, drop = { max_items = 1, @@ -226,6 +254,13 @@ minetest.register_node("mcl_crimson:warped_roots", { _mcl_blast_resistance = 0, }) +mcl_flowerpots.register_potted_flower("mcl_crimson:warped_roots", { + name = "warped roots", + desc = S("Warped Roots"), + image = "warped_roots.png", +}) + + minetest.register_node("mcl_crimson:warped_wart_block", { description = S("Warped Wart Block"), tiles = {"warped_wart_block.png"}, @@ -248,10 +283,10 @@ minetest.register_node("mcl_crimson:warped_hyphae", { tiles = { "warped_hyphae.png", "warped_hyphae.png", - "warped_hyphae_side.png", - "warped_hyphae_side.png", - "warped_hyphae_side.png", - "warped_hyphae_side.png", + { + image="warped_hyphae_side.png", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0} + }, }, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, @@ -272,10 +307,10 @@ minetest.register_node("mcl_crimson:warped_nylium", { "mcl_nether_netherrack.png^warped_nylium_side.png", "mcl_nether_netherrack.png^warped_nylium_side.png", }, - paramtype2 = "facedir", is_ground_content = true, drop = "mcl_nether:netherrack", groups = {pickaxey=1, building_block=1, material_stone=1}, + sounds = mcl_sounds.node_sound_stone_defaults(), _mcl_hardness = 0.4, _mcl_blast_resistance = 0.4, _mcl_silk_touch_drop = true, @@ -286,7 +321,12 @@ minetest.register_node("mcl_crimson:warped_nylium", { minetest.register_node("mcl_crimson:warped_hyphae_bark", { description = S("Warped Hyphae Bark"), _doc_items_longdesc = S("This is a decorative block surrounded by the bark of an hyphae."), - tiles = {"warped_hyphae_side.png"}, + tiles = { + { + image="warped_hyphae_side.png", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0} + }, + }, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1}, @@ -343,7 +383,7 @@ minetest.register_node("mcl_crimson:warped_hyphae_wood", { description = S("Warped Hyphae Wood"), tiles = {"warped_hyphae_wood.png"}, groups = {handy = 5,axey = 1, flammable = 3, wood=1,building_block = 1, material_wood = 1, fire_encouragement = 5, fire_flammability = 20}, - paramtype2 = "facedir", + sounds = mcl_sounds.node_sound_wood_defaults(), _mcl_hardness = 2, }) @@ -381,7 +421,7 @@ minetest.register_node("mcl_crimson:crimson_fungus", { }, node_placement_prediction = "", on_rightclick = function(pos, node, pointed_thing, player) - if pointed_thing:get_wielded_item():get_name() == "mcl_dye:white" then + if pointed_thing:get_wielded_item():get_name() == "mcl_bone_meal:bone_meal" then local nodepos = minetest.get_node(vector.offset(pos, 0, -1, 0)) if nodepos.name == "mcl_crimson:crimson_nylium" or nodepos.name == "mcl_nether:netherrack" then local random = math.random(1, 5) @@ -395,6 +435,12 @@ minetest.register_node("mcl_crimson:crimson_fungus", { _mcl_blast_resistance = 0, }) +mcl_flowerpots.register_potted_flower("mcl_crimson:crimson_fungus", { + name = "crimson fungus", + desc = S("Crimson Fungus Mushroom"), + image = "farming_crimson_fungus.png", +}) + minetest.register_node("mcl_crimson:crimson_roots", { description = S("Crimson Roots"), drawtype = "plantlike", @@ -414,6 +460,12 @@ minetest.register_node("mcl_crimson:crimson_roots", { _mcl_blast_resistance = 0, }) +mcl_flowerpots.register_potted_flower("mcl_crimson:crimson_roots", { + name = "crimson roots", + desc = S("Crimson Roots"), + image = "crimson_roots.png", +}) + minetest.register_node("mcl_crimson:crimson_hyphae", { description = S("Crimson Hyphae"), _doc_items_longdesc = S("The stem of a crimson hyphae"), @@ -421,10 +473,10 @@ minetest.register_node("mcl_crimson:crimson_hyphae", { tiles = { "crimson_hyphae.png", "crimson_hyphae.png", - "crimson_hyphae_side.png", - "crimson_hyphae_side.png", - "crimson_hyphae_side.png", - "crimson_hyphae_side.png", + { + image="crimson_hyphae_side.png", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0} + }, }, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, @@ -440,7 +492,12 @@ minetest.register_node("mcl_crimson:crimson_hyphae", { minetest.register_node("mcl_crimson:crimson_hyphae_bark", { description = S("Crimson Hyphae Bark"), _doc_items_longdesc = S("This is a decorative block surrounded by the bark of an hyphae."), - tiles = {"crimson_hyphae_side.png"}, + tiles = { + { + image="crimson_hyphae_side.png", + animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=2.0} + }, + }, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, groups = {handy = 1, axey = 1, bark = 1, building_block = 1, material_wood = 1}, @@ -497,7 +554,7 @@ minetest.register_node("mcl_crimson:crimson_hyphae_wood", { description = S("Crimson Hyphae Wood"), tiles = {"crimson_hyphae_wood.png"}, groups = {handy = 5, axey = 1, wood = 1, building_block = 1, material_wood = 1}, - paramtype2 = "facedir", + sounds = mcl_sounds.node_sound_wood_defaults(), _mcl_hardness = 2, }) @@ -512,7 +569,7 @@ minetest.register_node("mcl_crimson:crimson_nylium", { "mcl_nether_netherrack.png^crimson_nylium_side.png", }, groups = {pickaxey = 1, building_block = 1, material_stone = 1}, - paramtype2 = "facedir", + sounds = mcl_sounds.node_sound_stone_defaults(), is_ground_content = true, drop = "mcl_nether:netherrack", _mcl_hardness = 0.4, @@ -558,8 +615,8 @@ mcl_doors:register_door("mcl_crimson:crimson_door", { groups = {handy=1,axey=1, material_wood=1, flammable=-1}, _mcl_hardness = 3, _mcl_blast_resistance = 3, - tiles_bottom = {"mcl_crimson_crimson_door_bottom.png", "crimson_hyphae_wood.png"}, - tiles_top = {"mcl_crimson_crimson_door_top.png", "crimson_hyphae_wood.png"}, + tiles_bottom = {"mcl_crimson_crimson_door_bottom.png", "mcl_doors_door_crimson_side_lower.png"}, + tiles_top = {"mcl_crimson_crimson_door_top.png", "mcl_doors_door_crimson_side_upper.png"}, sounds = mcl_sounds.node_sound_wood_defaults(), }) @@ -596,8 +653,8 @@ mcl_doors:register_door("mcl_crimson:warped_door", { groups = {handy=1,axey=1, material_wood=1, flammable=-1}, _mcl_hardness = 3, _mcl_blast_resistance = 3, - tiles_bottom = {"mcl_crimson_warped_door_bottom.png", "warped_hyphae_wood.png"}, - tiles_top = {"mcl_crimson_warped_door_top.png", "warped_hyphae_wood.png"}, + tiles_bottom = {"mcl_crimson_warped_door_bottom.png", "mcl_doors_door_warped_side_lower.png"}, + tiles_top = {"mcl_crimson_warped_door_top.png", "mcl_doors_door_warped_side_upper.png"}, sounds = mcl_sounds.node_sound_wood_defaults(), }) diff --git a/mods/ITEMS/mcl_crimson/locale/mcl_crimson.ja.tr b/mods/ITEMS/mcl_crimson/locale/mcl_crimson.ja.tr new file mode 100644 index 0000000000..47251fd275 --- /dev/null +++ b/mods/ITEMS/mcl_crimson/locale/mcl_crimson.ja.tr @@ -0,0 +1,29 @@ +# textdomain: mcl_crimson + +Warped Fungus Mushroom=歪なキノコ +Twisting Vines=ねじれツタ +Nether Sprouts=ネザースプラウト +Warped Roots=歪な根 +Warped Wart Block=歪なウォートブロック +Shroomlight=シュルームライト +Warped Hyphae=歪な菌糸 +Warped Hyphae Bark=歪な菌糸の表皮 +Stripped warped hyphae=表皮を剥いだ歪な菌糸 +Stripped warped hyphae bark=剥がされた歪な菌糸の表皮 +Warped Nylium=歪なナイリウム +Warped Checknode - only to check!=歪なチェックノード - チェックのみ! +Warped Hyphae Wood=歪な菌糸の樹 +Warped Stair=歪な階段 +Warped Slab=歪なスラブ +Crimson Fungus Mushroom=真紅のキノコ +Crimson Roots=真紅の根 +Crimson Hyphae=真紅の菌糸 +Crimson Hyphae Bark=真紅の菌糸の表皮 +Stripped Crimson Hyphae=表皮を剥いだ真紅の菌糸 +Stripped Crimson Hyphae Bark=剥がされた真紅の菌糸の表皮 +Crimson Hyphae Wood=真紅の菌糸の樹 +Crimson Stair=真紅の階段 +Crimson Slab=真紅のスラブ +Double Crimson Slab=真紅の2重スラブ +Crimson Nylium=真紅のナイリウム +Crimson Checknode - only to check!=真紅のチェックノード - チェックのみ! diff --git a/mods/ITEMS/mcl_crimson/mod.conf b/mods/ITEMS/mcl_crimson/mod.conf index 84dc7d8f6d..89c60cd1ee 100644 --- a/mods/ITEMS/mcl_crimson/mod.conf +++ b/mods/ITEMS/mcl_crimson/mod.conf @@ -1,3 +1,3 @@ name = mcl_crimson author = debiankaios -depends = mcl_core, mcl_stairs, mobs_mc, mcl_util, mcl_dye +depends = mcl_core, mcl_stairs, mobs_mc, mcl_util, mcl_dye, mcl_flowerpots diff --git a/mods/ITEMS/mcl_crimson/textures/crimson_hyphae.png b/mods/ITEMS/mcl_crimson/textures/crimson_hyphae.png index 6b0d97669e..5df05e3aee 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/crimson_hyphae.png and b/mods/ITEMS/mcl_crimson/textures/crimson_hyphae.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/crimson_hyphae_side.png b/mods/ITEMS/mcl_crimson/textures/crimson_hyphae_side.png index 6920c9e0de..a1d5302c72 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/crimson_hyphae_side.png and b/mods/ITEMS/mcl_crimson/textures/crimson_hyphae_side.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/crimson_hyphae_wood.png b/mods/ITEMS/mcl_crimson/textures/crimson_hyphae_wood.png index e1f9e70a9b..0f91c96813 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/crimson_hyphae_wood.png and b/mods/ITEMS/mcl_crimson/textures/crimson_hyphae_wood.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/crimson_nylium.png b/mods/ITEMS/mcl_crimson/textures/crimson_nylium.png index de67faf94b..faa3ba9735 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/crimson_nylium.png and b/mods/ITEMS/mcl_crimson/textures/crimson_nylium.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/crimson_nylium_side.png b/mods/ITEMS/mcl_crimson/textures/crimson_nylium_side.png index 22d6f872f7..def8c73d4b 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/crimson_nylium_side.png and b/mods/ITEMS/mcl_crimson/textures/crimson_nylium_side.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/crimson_roots.png b/mods/ITEMS/mcl_crimson/textures/crimson_roots.png index 3d19cca407..19d648058d 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/crimson_roots.png and b/mods/ITEMS/mcl_crimson/textures/crimson_roots.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/crimson_stem_stripped_side.png b/mods/ITEMS/mcl_crimson/textures/crimson_stem_stripped_side.png index ad6a41a2ed..1f9ca2dda9 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/crimson_stem_stripped_side.png and b/mods/ITEMS/mcl_crimson/textures/crimson_stem_stripped_side.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/crimson_stem_stripped_top.png b/mods/ITEMS/mcl_crimson/textures/crimson_stem_stripped_top.png index f54c851bf3..03d9c17b9b 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/crimson_stem_stripped_top.png and b/mods/ITEMS/mcl_crimson/textures/crimson_stem_stripped_top.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/farming_crimson_fungus.png b/mods/ITEMS/mcl_crimson/textures/farming_crimson_fungus.png index ab1771b953..7a547ca79b 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/farming_crimson_fungus.png and b/mods/ITEMS/mcl_crimson/textures/farming_crimson_fungus.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/farming_warped_fungus.png b/mods/ITEMS/mcl_crimson/textures/farming_warped_fungus.png index 4fda7c4cb8..4ac08fad69 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/farming_warped_fungus.png and b/mods/ITEMS/mcl_crimson/textures/farming_warped_fungus.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door.png index fd804c7a2d..dc325a00fe 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door_bottom.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door_bottom.png index 288ce940b6..8da6915f2e 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door_bottom.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door_bottom.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door_top.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door_top.png index ed9ad1ef61..c55f28ec70 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door_top.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_door_top.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence.png index 0f5c9a0564..df71d56a94 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence_side.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence_side.png index c54dbe2032..4941ce6d4b 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence_side.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence_side.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence_top.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence_top.png index 555cdbcf82..485633b750 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence_top.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_fence_top.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_trapdoor.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_trapdoor.png index f727586cef..615b6b4b66 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_trapdoor.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_crimson_trapdoor.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door.png index 8137cbe62a..66639b4c2f 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_alt.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_alt.png new file mode 100644 index 0000000000..f946e6f941 Binary files /dev/null and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_alt.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_bottom.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_bottom.png index e1b532d628..942eff9286 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_bottom.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_bottom.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_bottom_alt.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_bottom_alt.png new file mode 100644 index 0000000000..2da69c716a Binary files /dev/null and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_bottom_alt.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_top.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_top.png index 8b2903788e..9ad9e2c603 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_top.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_top.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_top_alt.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_top_alt.png new file mode 100644 index 0000000000..9f922ee4e6 Binary files /dev/null and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_door_top_alt.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence.png index 2b87421dba..7e25c14c02 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence_side.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence_side.png index b3705f447f..61eda6d7c0 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence_side.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence_side.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence_top.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence_top.png index 08eea724cf..d5ce4b2b32 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence_top.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_fence_top.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_trapdoor.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_trapdoor.png index 8fc7a120e2..efbae07114 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_trapdoor.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_trapdoor.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_trapdoor_alt.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_trapdoor_alt.png new file mode 100644 index 0000000000..12d9729713 Binary files /dev/null and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_warped_trapdoor_alt.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_weeping_vines.png b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_weeping_vines.png index 10dcf6ccdb..701688073c 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/mcl_crimson_weeping_vines.png and b/mods/ITEMS/mcl_crimson/textures/mcl_crimson_weeping_vines.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_crimson_side_lower.png b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_crimson_side_lower.png new file mode 100644 index 0000000000..b7a6a87771 Binary files /dev/null and b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_crimson_side_lower.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_crimson_side_upper.png b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_crimson_side_upper.png new file mode 100644 index 0000000000..bb042109b6 Binary files /dev/null and b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_crimson_side_upper.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_lower.png b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_lower.png new file mode 100644 index 0000000000..b93dc629e0 Binary files /dev/null and b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_lower.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_lower_alt.png b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_lower_alt.png new file mode 100644 index 0000000000..7ba0bcff64 Binary files /dev/null and b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_lower_alt.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_upper.png b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_upper.png new file mode 100644 index 0000000000..e0bfa85818 Binary files /dev/null and b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_upper.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_upper_alt.png b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_upper_alt.png new file mode 100644 index 0000000000..e70bfb0552 Binary files /dev/null and b/mods/ITEMS/mcl_crimson/textures/mcl_doors_door_warped_side_upper_alt.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/nether_sprouts.png b/mods/ITEMS/mcl_crimson/textures/nether_sprouts.png index 27f686d57a..469c9db69a 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/nether_sprouts.png and b/mods/ITEMS/mcl_crimson/textures/nether_sprouts.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/nether_wart_block.png b/mods/ITEMS/mcl_crimson/textures/nether_wart_block.png index b2d20b8d9d..b9c4e447e1 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/nether_wart_block.png and b/mods/ITEMS/mcl_crimson/textures/nether_wart_block.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/shroomlight.png b/mods/ITEMS/mcl_crimson/textures/shroomlight.png index 8961a5a056..a7ce84e488 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/shroomlight.png and b/mods/ITEMS/mcl_crimson/textures/shroomlight.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem.png b/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem.png index 58114233d2..1f9ca2dda9 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem.png and b/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem_side.png b/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem_side.png index ad6a41a2ed..1f9ca2dda9 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem_side.png and b/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem_side.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem_top.png b/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem_top.png index 21696b098b..71c6f501d2 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem_top.png and b/mods/ITEMS/mcl_crimson/textures/stripped_crimson_stem_top.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem.png b/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem.png index c0241f7740..c5cd37b46b 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem.png and b/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem_side.png b/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem_side.png index db93c05cb4..17e98fa6cc 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem_side.png and b/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem_side.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem_top.png b/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem_top.png index 4a8f14800e..868b0d8a8c 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem_top.png and b/mods/ITEMS/mcl_crimson/textures/stripped_warped_stem_top.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/twisting_vines.png b/mods/ITEMS/mcl_crimson/textures/twisting_vines.png index 985d735bce..2837496db4 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/twisting_vines.png and b/mods/ITEMS/mcl_crimson/textures/twisting_vines.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/twisting_vines_plant.png b/mods/ITEMS/mcl_crimson/textures/twisting_vines_plant.png index 3fd68c0cd1..690098adf5 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/twisting_vines_plant.png and b/mods/ITEMS/mcl_crimson/textures/twisting_vines_plant.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/warped_hyphae.png b/mods/ITEMS/mcl_crimson/textures/warped_hyphae.png index 46775336f8..163d7dcf0e 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/warped_hyphae.png and b/mods/ITEMS/mcl_crimson/textures/warped_hyphae.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/warped_hyphae_side.png b/mods/ITEMS/mcl_crimson/textures/warped_hyphae_side.png index 178504e31b..225198756e 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/warped_hyphae_side.png and b/mods/ITEMS/mcl_crimson/textures/warped_hyphae_side.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/warped_hyphae_wood.png b/mods/ITEMS/mcl_crimson/textures/warped_hyphae_wood.png index 319ce93f29..f25d2ad984 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/warped_hyphae_wood.png and b/mods/ITEMS/mcl_crimson/textures/warped_hyphae_wood.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/warped_hyphae_wood_2nd.png b/mods/ITEMS/mcl_crimson/textures/warped_hyphae_wood_2nd.png index e579559c15..9adca3dd01 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/warped_hyphae_wood_2nd.png and b/mods/ITEMS/mcl_crimson/textures/warped_hyphae_wood_2nd.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/warped_nylium.png b/mods/ITEMS/mcl_crimson/textures/warped_nylium.png index c3aedfa29c..a9b65768f5 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/warped_nylium.png and b/mods/ITEMS/mcl_crimson/textures/warped_nylium.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/warped_nylium_side.png b/mods/ITEMS/mcl_crimson/textures/warped_nylium_side.png index 70354cca04..26b10cf0f7 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/warped_nylium_side.png and b/mods/ITEMS/mcl_crimson/textures/warped_nylium_side.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/warped_roots.png b/mods/ITEMS/mcl_crimson/textures/warped_roots.png index fb21ab2905..97f1e1ec59 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/warped_roots.png and b/mods/ITEMS/mcl_crimson/textures/warped_roots.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/warped_stem_stripped_side.png b/mods/ITEMS/mcl_crimson/textures/warped_stem_stripped_side.png index db93c05cb4..17e98fa6cc 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/warped_stem_stripped_side.png and b/mods/ITEMS/mcl_crimson/textures/warped_stem_stripped_side.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/warped_stem_stripped_top.png b/mods/ITEMS/mcl_crimson/textures/warped_stem_stripped_top.png index 1c534b7d1e..fc722556bd 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/warped_stem_stripped_top.png and b/mods/ITEMS/mcl_crimson/textures/warped_stem_stripped_top.png differ diff --git a/mods/ITEMS/mcl_crimson/textures/warped_wart_block.png b/mods/ITEMS/mcl_crimson/textures/warped_wart_block.png index 412a904926..236f26ea6b 100644 Binary files a/mods/ITEMS/mcl_crimson/textures/warped_wart_block.png and b/mods/ITEMS/mcl_crimson/textures/warped_wart_block.png differ diff --git a/mods/ITEMS/mcl_deepslate/init.lua b/mods/ITEMS/mcl_deepslate/init.lua index 17beb6b522..a1182246ac 100644 --- a/mods/ITEMS/mcl_deepslate/init.lua +++ b/mods/ITEMS/mcl_deepslate/init.lua @@ -89,11 +89,11 @@ end local lapis_drops = { max_items = 1, items = { - { items = { "mcl_dye:blue 8" }, rarity = 5 }, - { items = { "mcl_dye:blue 7" }, rarity = 5 }, - { items = { "mcl_dye:blue 6" }, rarity = 5 }, - { items = { "mcl_dye:blue 5" }, rarity = 5 }, - { items = { "mcl_dye:blue 4" } } + { items = { "mcl_core:lapis 8" }, rarity = 5 }, + { items = { "mcl_core:lapis 7" }, rarity = 5 }, + { items = { "mcl_core:lapis 6" }, rarity = 5 }, + { items = { "mcl_core:lapis 5" }, rarity = 5 }, + { items = { "mcl_core:lapis 4" } } } } @@ -103,7 +103,7 @@ local deepslate_ores = { { "Gold", "mcl_raw_ores:raw_gold", "mcl_core:gold_ingot", 4, 0 }, { "Emerald", "mcl_core:emerald", "mcl_core:emerald", 4, 6 }, { "Diamond", "mcl_core:diamond", "mcl_core:diamond", 4, 4 }, - { "Lapis Lazuli", lapis_drops, "mcl_dye:blue", 3, 6 }, + { "Lapis Lazuli", lapis_drops, "mcl_core:lapis", 3, 6 }, } for _, p in pairs(deepslate_ores) do diff --git a/mods/ITEMS/mcl_deepslate/locale/mcl_deepslate.ja.tr b/mods/ITEMS/mcl_deepslate/locale/mcl_deepslate.ja.tr new file mode 100644 index 0000000000..bbd25ee5c2 --- /dev/null +++ b/mods/ITEMS/mcl_deepslate/locale/mcl_deepslate.ja.tr @@ -0,0 +1,53 @@ +# textdomain: mcl_deepslate +An infested block is a block from which a silverfish will pop out when it is broken. It looks identical to its normal counterpart.=虫喰いブロックは、壊すとシルバーフィッシュが飛び出してくるブロックです。見た目は通常のブロックと同じです。 +Chiseled deepslate is the chiseled version of deepslate.=模様入り深層岩は、深層岩の模様入りバージョンです。 +Chiseled Deepslate=模様入り深層岩 +Cobbled deepslate is a stone variant that functions similar to cobblestone or blackstone.=深層岩の丸石は、丸石やブラックストーンと同様の機能を持つ石の変種です。 +Cobbled Deepslate Slab=深層岩の丸石のスラブ +Cobbled Deepslate Stairs=深層岩の丸石の階段 +Cobbled Deepslate Wall=深層岩の丸石の塀 +Cobbled Deepslate=深層岩の丸石 +Cracked Deepslate Bricks=ひび割れた深層岩レンガ +Cracked Deepslate Tiles=ひび割れた深層岩タイル +Deepslate bricks are the brick version of deepslate.=深層岩レンガは、深層岩のレンガバージョンです。 +Deepslate Bricks Slab=深層岩レンガのスラブ +Deepslate Bricks Stairs=深層岩レンガの階段 +Deepslate Bricks Wall=深層岩レンガの塀 +Deepslate Bricks=深層岩レンガ +Deepslate coal ore is a variant of coal ore that can generate in deepslate and tuff blobs.=深層石炭鉱石は、深層岩や凝灰岩にひとかたまりで生成される、石炭鉱石の変種です。 +Deepslate Coal Ore=深層石炭鉱石 +Deepslate copper ore is a variant of copper ore that can generate in deepslate and tuff blobs.=深層石炭鉱石は、深層岩や凝灰岩にひとかたまりで生成される、石炭鉱石の変種です。 +Deepslate Copper Ore=深層銅鉱石 +Deepslate diamond ore is a variant of diamond ore that can generate in deepslate and tuff blobs.=深層銅鉱石は、深層岩や凝灰岩にひとかたまりで生成される、銅鉱石の変種です。 +Deepslate Diamond Ore=深層ダイヤモンド鉱石 +Deepslate emerald ore is a variant of emerald ore that can generate in deepslate and tuff blobs.=深層ダイヤモンド鉱石は、深層岩や凝灰岩にひとかたまりで生成される、ダイヤモンド鉱石の変種です。 +Deepslate Emerald Ore=深層エメラルド鉱石 +Deepslate gold ore is a variant of gold ore that can generate in deepslate and tuff blobs.=深層エメラルド鉱石は、深層岩や凝灰岩にひとかたまりで生成される、エメラルド鉱石の変種です。 +Deepslate Gold Ore=深層金鉱石 +Deepslate iron ore is a variant of iron ore that can generate in deepslate and tuff blobs.=深層金鉱石は、深層岩や凝灰岩にひとかたまりで生成される、金鉱石の変種です。 +Deepslate Iron Ore=深層鉄鉱石 +Deepslate is a stone type found deep underground in the Overworld that functions similar to regular stone but is harder than the stone.=深層岩は、オーバーワールドの地中深くで見られる石種で、機能的には通常の石と同様ながら、石よりも硬いのが特徴です。 +Deepslate Lapis Lazuli Ore=深層ラピスラズリ鉱石 +Deepslate lapis ore is a variant of lapis ore that can generate in deepslate and tuff blobs.=深層ラピスラズリ鉱石は、深層岩や凝灰岩にひとかたまりで生成される、ラピスラズリ鉱石の変種です。 +Deepslate redstone ore is a variant of redstone ore that can generate in deepslate and tuff blobs.=深層レッドストーン鉱石は、深層岩や凝灰岩にひとかたまりで生成される、レッドストーン鉱石の変種です。 +Deepslate Redstone Ore=深層レッドストーン鉱石 +Deepslate tiles are a decorative variant of deepslate.=深層岩タイルは、深層岩の装飾バージョンです。 +Deepslate Tiles Slab=深層岩タイルのスラブ +Deepslate Tiles Stairs=深層岩タイルの階段 +Deepslate Tiles Wall=深層岩タイルの塀 +Deepslate Tiles=深層岩タイル +Deepslate=深層岩 +Double Cobbled Deepslate Slab=深層岩の丸石の2重スラブ +Double Deepslate Bricks Slab=深層岩レンガの2重スラブ +Double Deepslate Tiles Slab=深層岩タイルの2重スラブ +Double Polished Deepslate Slab=磨かれた深層岩の2重スラブ +Hides a silverfish=シルバーフィッシュが潜む +Infested Deepslate=虫喰い深層岩 +Lit Deepslate Redstone Ore=発光した深層レッドストーン鉱石 +Polished deepslate is the stone-like polished version of deepslate.=磨かれた深層岩は、深層岩を石のように磨いたバージョンです。 +Polished Deepslate Slab=磨かれた深層岩のスラブ +Polished Deepslate Stairs=磨かれた深層岩の階段 +Polished Deepslate Wall=磨かれた深層岩の塀 +Polished Deepslate=磨かれた深層岩 +Tuff=凝灰岩 +Tuff is an ornamental rock formed from volcanic ash, occurring in underground blobs below Y=16.=凝灰岩とは、火山灰から形成される装飾用の岩石で、Y=16以下の深部にかたまって分布しています。 diff --git a/mods/ITEMS/mcl_doors/locale/mcl_doors.ja.tr b/mods/ITEMS/mcl_doors/locale/mcl_doors.ja.tr new file mode 100644 index 0000000000..3dbdb7e5df --- /dev/null +++ b/mods/ITEMS/mcl_doors/locale/mcl_doors.ja.tr @@ -0,0 +1,24 @@ +# textdomain: mcl_doors +Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal.=木製のドアは高さ2ブロックの遮蔽物で、手とレッドストーン信号で開閉できます。 +To open or close a wooden door, rightclick it or supply its lower half with a redstone signal.=木製のドアを開閉するには右クリックするか、下半分にレッドストーン信号を供給してください。 +Oak Door=オークのドア +Acacia Door=アカシアのドア +Birch Door=シラカバのドア +Dark Oak Door=ダークオークのドア +Jungle Door=ジャングルのドア +Spruce Door=トウヒのドア +Iron Door=鉄のドア +Iron doors are 2-block high barriers which can only be opened or closed by a redstone signal, but not by hand.=鉄のドアは高さ2ブロックの遮蔽物で、レッドストーン信号によってのみ開閉でき、手では開けられません。 +To open or close an iron door, supply its lower half with a redstone signal.=鉄のドアを開閉するには、その下半分にレッドストーン信号を供給します。 +Oak Trapdoor=オークのトラップドア +Acacia Trapdoor=アカシアのトラップドア +Birch Trapdoor=シラカバのトラップドア +Spruce Trapdoor=トウヒのトラップドア +Dark Oak Trapdoor=ダークオークのトラップドア +Jungle Trapdoor=ジャングルのトラップドア +Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. 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.=木製のトラップドアは、手やレッドストーン信号で開閉できる水平の遮蔽物です。配置の仕方によって、ブロックの上部または下部を占めます。開いているときは、ハシゴのように登れます。 +To open or close the trapdoor, rightclick it or send a redstone signal to it.=トラップドアを開閉するには、それを右クリックするか、それにレッドストーン信号を送信してください。 +Iron Trapdoor=鉄のトラップドア +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.=鉄のトラップドアは、レッドストーン信号によってのみ開閉でき、手では開けられません。配置の仕方によって、ブロックの上部または下部を占めます。開いているときは、ハシゴのようによじ登れます。 +Openable by players and redstone power=プレイヤーとレッドストーン動力によって開閉可能 +Openable by redstone power=レッドストーン動力によって開閉可能 diff --git a/mods/ITEMS/mcl_dye/init.lua b/mods/ITEMS/mcl_dye/init.lua index 73884856ae..80219d298e 100644 --- a/mods/ITEMS/mcl_dye/init.lua +++ b/mods/ITEMS/mcl_dye/init.lua @@ -18,10 +18,6 @@ local S = minetest.get_translator(minetest.get_current_modname()) local math = math local string = string --- Other mods can use these for looping through available colors -mcl_dye.basecolors = {"white", "grey", "black", "red", "yellow", "green", "cyan", "blue", "magenta"} -mcl_dye.excolors = {"white", "lightgrey", "grey", "darkgrey", "black", "red", "orange", "yellow", "lime", "green", "aqua", "cyan", "sky_blue", "blue", "violet", "magenta", "red_violet"} - -- Base color groups: -- - basecolor_white -- - basecolor_grey @@ -62,43 +58,43 @@ mcl_dye.excolors = {"white", "lightgrey", "grey", "darkgrey", "black", "red", "o -- - unicolor_medium__s50 -- - unicolor_dark__s50 --- Local stuff -local dyelocal = {} - -- This collection of colors is partly a historic thing, partly something else. -dyelocal.dyes = { - {"white", "mcl_dye_white", S("Bone Meal"), {dye=1, craftitem=1, basecolor_white=1, excolor_white=1, unicolor_white=1}}, - {"grey", "dye_grey", S("Light Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_grey=1, unicolor_grey=1}}, - {"dark_grey", "dye_dark_grey", S("Grey Dye"), {dye=1, craftitem=1, basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}}, - {"black", "mcl_dye_black", S("Ink Sac"), {dye=1, craftitem=1, basecolor_black=1, excolor_black=1, unicolor_black=1}}, - {"violet", "dye_violet", S("Purple Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}}, - {"blue", "mcl_dye_blue", S("Lapis Lazuli"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_blue=1}}, - {"lightblue", "mcl_dye_light_blue", S("Light Blue Dye"), {dye=1, craftitem=1, basecolor_blue=1, excolor_blue=1, unicolor_light_blue=1}}, - {"cyan", "dye_cyan", S("Cyan Dye"), {dye=1, craftitem=1, basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}}, - {"dark_green", "dye_dark_green", S("Cactus Green"),{dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_dark_green=1}}, - {"green", "mcl_dye_lime", S("Lime Dye"), {dye=1, craftitem=1, basecolor_green=1, excolor_green=1, unicolor_green=1}}, - {"yellow", "dye_yellow", S("Dandelion Yellow"), {dye=1, craftitem=1, basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}}, - {"brown", "mcl_dye_brown", S("Cocoa Beans"), {dye=1, craftitem=1, basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1, compostability = 65}}, - {"orange", "dye_orange", S("Orange Dye"), {dye=1, craftitem=1, basecolor_orange=1, excolor_orange=1, unicolor_orange=1}}, - {"red", "dye_red", S("Rose Red"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_red=1}}, - {"magenta", "dye_magenta", S("Magenta Dye"), {dye=1, craftitem=1, basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}}, - {"pink", "dye_pink", S("Pink Dye"), {dye=1, craftitem=1, basecolor_red=1, excolor_red=1, unicolor_light_red=1}}, +local dyes = { + {"white", S("White Dye"), {basecolor_white=1, excolor_white=1, unicolor_white=1}}, + {"grey", S("Light Grey Dye"), {basecolor_grey=1, excolor_grey=1, unicolor_grey=1}}, + {"dark_grey", S("Grey Dye"), {basecolor_grey=1, excolor_darkgrey=1, unicolor_darkgrey=1}}, + {"black", S("Black Dye"), {basecolor_black=1, excolor_black=1, unicolor_black=1}}, + {"violet", S("Purple Dye"), {basecolor_magenta=1, excolor_violet=1, unicolor_violet=1}}, + {"blue", S("Blue Dye"), {basecolor_blue=1, excolor_blue=1, unicolor_blue=1}}, + {"lightblue", S("Light Blue Dye"), {basecolor_blue=1, excolor_blue=1, unicolor_light_blue=1}}, + {"cyan", S("Cyan Dye"), {basecolor_cyan=1, excolor_cyan=1, unicolor_cyan=1}}, + {"dark_green", S("Cactus Green"), {basecolor_green=1, excolor_green=1, unicolor_dark_green=1}}, + {"green", S("Lime Dye"), {basecolor_green=1, excolor_green=1, unicolor_green=1}}, + {"yellow", S("Dandelion Yellow"), {basecolor_yellow=1, excolor_yellow=1, unicolor_yellow=1}}, + {"brown", S("Brown Dye"), {basecolor_brown=1, excolor_orange=1, unicolor_dark_orange=1}}, + {"orange", S("Orange Dye"), {basecolor_orange=1, excolor_orange=1, unicolor_orange=1}}, + {"red", S("Rose Red"), {basecolor_red=1, excolor_red=1, unicolor_red=1}}, + {"magenta", S("Magenta Dye"), {basecolor_magenta=1, excolor_red_violet=1,unicolor_red_violet=1}}, + {"pink", S("Pink Dye"), {basecolor_red=1, excolor_red=1, unicolor_light_red=1}}, } -local mg_name = minetest.get_mapgen_setting("mg_name") +-- Other mods can use these for looping through available colors +mcl_dye.basecolors = {"white", "grey", "black", "magenta", "blue", "cyan", "green", "yellow", "orange", "red", "brown"} +mcl_dye.excolors = {"white", "grey", "darkgrey", "black", "violet", "blue", "cyan", "green", "yellow", "orange", "red", "red_violet"} -dyelocal.unicolor_to_dye_id = {} -for d=1, #dyelocal.dyes do - for k, _ in pairs(dyelocal.dyes[d][4]) do +local unicolor_to_dye_id = {} +for d = 1, #dyes do + for k, _ in pairs(dyes[d][3]) do if string.sub(k, 1, 9) == "unicolor_" then - dyelocal.unicolor_to_dye_id[k] = dyelocal.dyes[d][1] + unicolor_to_dye_id[k] = dyes[d][1] end end end --- Takes an unicolor group name (e.g. “unicolor_white”) and returns a corresponding dye name (if it exists), nil otherwise. +-- Takes an unicolor group name (e.g. “unicolor_white”) and returns a +-- corresponding dye name (if it exists), nil otherwise. function mcl_dye.unicolor_to_dye(unicolor_group) - local color = dyelocal.unicolor_to_dye_id[unicolor_group] + local color = unicolor_to_dye_id[unicolor_group] if color then return "mcl_dye:" .. color else @@ -106,28 +102,21 @@ function mcl_dye.unicolor_to_dye(unicolor_group) end end --- Define items -for _, row in ipairs(dyelocal.dyes) do - local name = row[1] - -- White and brown dyes are defined explicitly below - if name ~= "white" and name ~= "brown" then - local img = row[2] - local description = row[3] - local groups = row[4] - local item_name = "mcl_dye:"..name - local item_image = img..".png" - minetest.register_craftitem(item_name, { - inventory_image = item_image, - description = description, - _doc_items_longdesc = S("This item is a dye which is used for dyeing and crafting."), - _doc_items_usagehelp = S("Rightclick on a sheep to dye its wool. Other things are dyed by crafting."), - groups = groups, - stack_max = 64, - }) - end +-- Define dye items. +-- +for _, row in pairs(dyes) do + local name, desc, grps = unpack(row) + minetest.register_craftitem("mcl_dye:" .. name, { + inventory_image = "mcl_dye_" .. name .. ".png", + description = desc, + _doc_items_longdesc = S("This item is a dye which is used for dyeing and crafting."), + _doc_items_usagehelp = S("Rightclick on a sheep to dye its wool. Other things are dyed by crafting."), + groups = table.update({craftitem = 1, dye = 1}, grps) + }) end --- Bone Meal +-- Bone meal code to be moved into its own mod. +-- function mcl_dye.add_bone_meal_particle(pos, def) if not def then def = {} @@ -379,14 +368,19 @@ local function apply_bone_meal(pointed_thing,user) return false end -minetest.register_craftitem("mcl_dye:white", { - inventory_image = "mcl_dye_white.png", +mcl_dye.apply_bone_meal = apply_bone_meal + +-- Bone meal item registration. +-- +-- To be moved into its own mod. +-- +minetest.register_craftitem(":mcl_bone_meal:bone_meal", { + inventory_image = "mcl_bone_meal_bone_meal.png", description = S("Bone Meal"), _tt_help = S("Speeds up plant growth"), _doc_items_longdesc = S("Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants."), _doc_items_usagehelp = S("Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place."), stack_max = 64, - groups = dyelocal.dyes[1][4], on_place = function(itemstack, user, pointed_thing) -- Use pointed node's on_rightclick function first, if present local node = minetest.get_node(pointed_thing.under) @@ -419,55 +413,160 @@ minetest.register_craftitem("mcl_dye:white", { _dispense_into_walkable = true }) -minetest.register_craftitem("mcl_dye:brown", { - inventory_image = "mcl_dye_brown.png", - _tt_help = S("Grows at the side of jungle trees"), - _doc_items_longdesc = S("Cocoa beans are a brown dye and can be used to plant cocoas."), - _doc_items_usagehelp = S("Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa."), - description = S("Cocoa Beans"), - stack_max = 64, - groups = dyelocal.dyes[12][4], - on_place = function(itemstack, placer, pointed_thing) - return mcl_cocoas.place(itemstack, placer, pointed_thing, "mcl_cocoas:cocoa_1") - end, +minetest.register_craft({ + output = "mcl_bone_meal:bone_meal 3", + recipe = {{"mcl_mobitems:bone"}}, }) --- Dye mixing + +-- Dye creation recipes. +-- +minetest.register_craft({ + output = "mcl_dye:white", + recipe = {{"mcl_bone_meal:bone_meal"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:black", + recipe = {{"mcl_mobitems:ink_sac"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:yellow", + recipe = {{"mcl_flowers:dandelion"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:yellow 2", + recipe = {{"mcl_flowers:sunflower"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:blue", + recipe = {{"mcl_core:lapis"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:lightblue", + recipe = {{"mcl_flowers:blue_orchid"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:grey", + recipe = {{"mcl_flowers:azure_bluet"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:grey", + recipe = {{"mcl_flowers:oxeye_daisy"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:grey", + recipe = {{"mcl_flowers:tulip_white"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:magenta", + recipe = {{"mcl_flowers:allium"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:magenta 2", + recipe = {{"mcl_flowers:lilac"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:orange", + recipe = {{"mcl_flowers:tulip_orange"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:brown", + recipe = {{"mcl_cocoas:cocoa_beans"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:pink", + recipe = {{"mcl_flowers:tulip_pink"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:pink 2", + recipe = {{"mcl_flowers:peony"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:red", + recipe = {{"mcl_farming:beetroot_item"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:red", + recipe = {{"mcl_flowers:poppy"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:red", + recipe = {{"mcl_flowers:tulip_red"}}, +}) + +minetest.register_craft({ + output = "mcl_dye:red 2", + recipe = {{"mcl_flowers:rose_bush"}}, +}) + +minetest.register_craft({ + type = "cooking", + output = "mcl_dye:dark_green", + recipe = "mcl_core:cactus", + cooktime = 10, +}) + +-- Dye mixing recipes. +-- minetest.register_craft({ type = "shapeless", output = "mcl_dye:dark_grey 2", recipe = {"mcl_dye:black", "mcl_dye:white"}, }) + minetest.register_craft({ type = "shapeless", output = "mcl_dye:lightblue 2", recipe = {"mcl_dye:blue", "mcl_dye:white"}, }) + minetest.register_craft({ type = "shapeless", output = "mcl_dye:grey 3", recipe = {"mcl_dye:black", "mcl_dye:white", "mcl_dye:white"}, }) + minetest.register_craft({ type = "shapeless", output = "mcl_dye:grey 2", recipe = {"mcl_dye:dark_grey", "mcl_dye:white"}, }) + minetest.register_craft({ type = "shapeless", output = "mcl_dye:green 2", recipe = {"mcl_dye:dark_green", "mcl_dye:white"}, }) + minetest.register_craft({ type = "shapeless", output = "mcl_dye:magenta 4", recipe = {"mcl_dye:blue", "mcl_dye:white", "mcl_dye:red", "mcl_dye:red"}, }) + minetest.register_craft({ type = "shapeless", output = "mcl_dye:magenta 3", recipe = {"mcl_dye:pink", "mcl_dye:red", "mcl_dye:blue"}, }) + minetest.register_craft({ type = "shapeless", output = "mcl_dye:magenta 2", @@ -491,80 +590,34 @@ minetest.register_craft({ output = "mcl_dye:violet 2", recipe = {"mcl_dye:blue", "mcl_dye:red"}, }) + minetest.register_craft({ type = "shapeless", output = "mcl_dye:orange 2", recipe = {"mcl_dye:yellow", "mcl_dye:red"}, }) --- Dye creation +-- Legacy items grace conversion recipes. +-- +-- These allow for retrieval of precious items that were converted into +-- dye items after refactoring of the dyes. Should be removed again in +-- the near future. minetest.register_craft({ - output = "mcl_dye:yellow", - recipe = {{"mcl_flowers:dandelion"}}, + output = "mcl_bone_meal:bone_meal", + recipe = {{"mcl_dye:white"}}, }) + minetest.register_craft({ - output = "mcl_dye:yellow 2", - recipe = {{"mcl_flowers:sunflower"}}, + output = "mcl_mobitems:ink_sac", + recipe = {{"mcl_dye:black"}}, }) + minetest.register_craft({ - output = "mcl_dye:lightblue", - recipe = {{"mcl_flowers:blue_orchid"}}, + output = "mcl_core:lapis", + recipe = {{"mcl_dye:blue"}}, }) + minetest.register_craft({ - output = "mcl_dye:grey", - recipe = {{"mcl_flowers:azure_bluet"}}, -}) -minetest.register_craft({ - output = "mcl_dye:grey", - recipe = {{"mcl_flowers:oxeye_daisy"}}, -}) -minetest.register_craft({ - output = "mcl_dye:grey", - recipe = {{"mcl_flowers:tulip_white"}}, -}) -minetest.register_craft({ - output = "mcl_dye:magenta", - recipe = {{"mcl_flowers:allium"}}, -}) -minetest.register_craft({ - output = "mcl_dye:magenta 2", - recipe = {{"mcl_flowers:lilac"}}, -}) -minetest.register_craft({ - output = "mcl_dye:orange", - recipe = {{"mcl_flowers:tulip_orange"}}, -}) -minetest.register_craft({ - output = "mcl_dye:pink", - recipe = {{"mcl_flowers:tulip_pink"}}, -}) -minetest.register_craft({ - output = "mcl_dye:pink 2", - recipe = {{"mcl_flowers:peony"}}, -}) -minetest.register_craft({ - output = "mcl_dye:red", - recipe = {{"mcl_farming:beetroot_item"}}, -}) -minetest.register_craft({ - output = "mcl_dye:red", - recipe = {{"mcl_flowers:poppy"}}, -}) -minetest.register_craft({ - output = "mcl_dye:red", - recipe = {{"mcl_flowers:tulip_red"}}, -}) -minetest.register_craft({ - output = "mcl_dye:red 2", - recipe = {{"mcl_flowers:rose_bush"}}, -}) -minetest.register_craft({ - type = "cooking", - output = "mcl_dye:dark_green", - recipe = "mcl_core:cactus", - cooktime = 10, -}) -minetest.register_craft({ - output = "mcl_dye:white 3", - recipe = {{"mcl_mobitems:bone"}}, + output = "mcl_cocoas:cocoa_beans", + recipe = {{"mcl_dye:brown"}}, }) diff --git a/mods/ITEMS/mcl_dye/locale/mcl_dye.de.tr b/mods/ITEMS/mcl_dye/locale/mcl_dye.de.tr index 29cd4d20d0..ca56dff225 100644 --- a/mods/ITEMS/mcl_dye/locale/mcl_dye.de.tr +++ b/mods/ITEMS/mcl_dye/locale/mcl_dye.de.tr @@ -1,16 +1,16 @@ # textdomain: mcl_dye -Bone Meal=Knochenmehl +White Dye=Weißer Farbstoff Light Grey Dye=Hellgrauer Farbstoff Grey Dye=Grauer Farbstoff -Ink Sac=Tintenbeutel +Black Dye=Schwarzer Farbstoff Purple Dye=Violetter Farbstoff -Lapis Lazuli=Lapislazuli +Blue Dye=Blaue Farbstoff Light Blue Dye=Hellblauer Farbstoff Cyan Dye=Türkiser Farbstoff Cactus Green=Kaktusgrün Lime Dye=Lindgrüner Farbstoff Dandelion Yellow=Löwenzahngelb -Cocoa Beans=Kakaobohnen +Brown Dye=Brauner Farbstoff Orange Dye=Orange Farbstoff Rose Red=Rosenrot Magenta Dye=Magenta Farbstoff diff --git a/mods/ITEMS/mcl_dye/locale/mcl_dye.es.tr b/mods/ITEMS/mcl_dye/locale/mcl_dye.es.tr index d20e8c96ac..14c2c12d1d 100644 --- a/mods/ITEMS/mcl_dye/locale/mcl_dye.es.tr +++ b/mods/ITEMS/mcl_dye/locale/mcl_dye.es.tr @@ -1,16 +1,16 @@ # textdomain: mcl_dye -Bone Meal=Harina de hueso +White Dye=Tinte blanca Light Grey Dye=Tinte gris claro Grey Dye=Tinte gris -Ink Sac=Saco de tinta +Black Dye=Tinte negro Purple Dye=Tinte púrpura -Lapis Lazuli=Lapislázuli +Blue Dye=Tinte azul Light Blue Dye=Tinte azul claro Cyan Dye=Tinte cian Cactus Green=Tinte verde Lime Dye=Tinte amarillo verdoso Dandelion Yellow=Tinte amarillo -Cocoa Beans=Granos de cacao +Brown Dye=Tinte marrón Orange Dye=Tinte naranja Rose Red=Tinte rojo Magenta Dye=Tinte magenta diff --git a/mods/ITEMS/mcl_dye/locale/mcl_dye.fr.tr b/mods/ITEMS/mcl_dye/locale/mcl_dye.fr.tr index 1c2651a94e..9418225d69 100644 --- a/mods/ITEMS/mcl_dye/locale/mcl_dye.fr.tr +++ b/mods/ITEMS/mcl_dye/locale/mcl_dye.fr.tr @@ -1,16 +1,16 @@ # textdomain: mcl_dye -Bone Meal=Poudre d'Os +White Dye=Teinture Blanche Light Grey Dye=Teinture Gris Clair Grey Dye=Teinture Gris -Ink Sac=Poche d'Encre +Black Dye=Teinture Noire Purple Dye=Teinture Violette -Lapis Lazuli=Lapis Lazuli +Blue Dye=Teinture Bleu Light Blue Dye=Teinture Bleu Clair Cyan Dye=Teinture Cyan Cactus Green=Cactus Vert Lime Dye=Teinture Vert Clair Dandelion Yellow=Teinture Jaune -Cocoa Beans=Fèves de Cacao +Brown Dye=Teinture Marron Orange Dye=Teinture Orange Rose Red=Teinture Rouge Magenta Dye=Teinture Magenta diff --git a/mods/ITEMS/mcl_dye/locale/mcl_dye.ja.tr b/mods/ITEMS/mcl_dye/locale/mcl_dye.ja.tr new file mode 100644 index 0000000000..1dcd820dbd --- /dev/null +++ b/mods/ITEMS/mcl_dye/locale/mcl_dye.ja.tr @@ -0,0 +1,27 @@ +# textdomain: mcl_dye +Bone Meal=骨粉 +Light Grey Dye=薄灰色の染料 +Grey Dye=灰色の染料 +Ink Sac=イカスミ +Purple Dye=紫色の染料 +Lapis Lazuli=ラピスラズリ +Light Blue Dye=空色の染料 +Cyan Dye=青緑色の染料 +Cactus Green=緑色の染料 +Lime Dye=黄緑色の染料 +Dandelion Yellow=黄色の染料 +Cocoa Beans=カカオ豆 +Orange Dye=橙色の染料 +Rose Red=赤色の染料 +Magenta Dye=赤紫色の染料 +Pink Dye=桃色の染料 +This item is a dye which is used for dyeing and crafting.=このアイテムは、染色や クラフトに使用される染料です。 +Rightclick on a sheep to dye its wool. Other things are dyed by crafting.=ヒツジを右クリックすると毛を染められます。それ以外のものはクラフトによって染めます。 +Bone Meal=骨粉 +Bone meal is a white dye and also useful as a fertilizer to speed up the growth of many plants.=骨粉は白色の染料であり、また多くの植物の成長を早める肥料としても有用です。 +Rightclick a sheep to turn its wool white. Rightclick a plant to speed up its growth. Note that not all plants can be fertilized like this. When you rightclick a grass block, tall grass and flowers will grow all over the place.=ヒツジを右クリックすると、羊毛が白くなります。植物を右クリックすると、成長が早くなります。ただし、すべての植物の肥やしになるわけではありません。草原を右クリックすると、背の高い草や花が一面に生えてきます。 +Cocoa beans are a brown dye and can be used to plant cocoas.=カカオ豆は茶色の染料で、カカオを栽培できます。 +Rightclick a sheep to turn its wool brown. Rightclick on the side of a jungle tree trunk (Jungle Wood) to plant a young cocoa.=ヒツジを右クリックすると毛が茶色に変わります。ジャングルの木の、幹の側面を右クリックすると、カカオの苗を植えることができます。 +Cocoa Beans=カカオ豆 +Grows at the side of jungle trees=ジャングルの木の側面に生育 +Speeds up plant growth=植物の生育を促進 diff --git a/mods/ITEMS/mcl_dye/locale/mcl_dye.pl.tr b/mods/ITEMS/mcl_dye/locale/mcl_dye.pl.tr index d16edb5b0f..e9d8e41731 100644 --- a/mods/ITEMS/mcl_dye/locale/mcl_dye.pl.tr +++ b/mods/ITEMS/mcl_dye/locale/mcl_dye.pl.tr @@ -1,16 +1,16 @@ # textdomain: mcl_dye -Bone Meal=Mączka kostna +White Dye=Biały farba Light Grey Dye=Jasnoszara farba Grey Dye=Szara farba -Ink Sac=Torbiel z atramentem +Black Dye=Czarny farba Purple Dye=Fioletowa farba -Lapis Lazuli=Lazuryt +Blue Dye=Niebieska farba Light Blue Dye=Jasnoniebieska farba Cyan Dye=Błękitna farba Cactus Green=Kaktusowa zieleń Lime Dye=Jasnozielona farba Dandelion Yellow=Mleczowy żółty -Cocoa Beans=Ziarna kakaowe +Brown Dye=Brązowy farba Orange Dye=Pomarańczowa farba Rose Red=Różany czerwony Magenta Dye=Karmazynowa farba diff --git a/mods/ITEMS/mcl_dye/locale/mcl_dye.ru.tr b/mods/ITEMS/mcl_dye/locale/mcl_dye.ru.tr index e70388115b..4e79031329 100644 --- a/mods/ITEMS/mcl_dye/locale/mcl_dye.ru.tr +++ b/mods/ITEMS/mcl_dye/locale/mcl_dye.ru.tr @@ -1,16 +1,16 @@ # textdomain: mcl_dye -Bone Meal=Костная мука +White Dye=Белый краситель Light Grey Dye=Светло-серый краситель Grey Dye=Серый краситель -Ink Sac=Чернильный мешок +Black Dye=Чёрный краситель Purple Dye=Пурпурный краситель -Lapis Lazuli=Ляпис-лазурь +Blue Dye=голубой краситель Light Blue Dye=Светло-голубой краситель Cyan Dye=Голубой краситель Cactus Green=Зелень кактуса Lime Dye=Зелёный лаймовый краситель Dandelion Yellow=Одуванчиковый жёлтый краситель -Cocoa Beans=Какао-бобы +Brown Dye=Коричневый краситель Orange Dye=Оранжевый краситель Rose Red=Экстракт красной розы Magenta Dye=Фиолетовый краситель diff --git a/mods/ITEMS/mcl_dye/locale/mcl_dye.zh_TW.tr b/mods/ITEMS/mcl_dye/locale/mcl_dye.zh_TW.tr index 23d2face21..5e236e9dd9 100644 --- a/mods/ITEMS/mcl_dye/locale/mcl_dye.zh_TW.tr +++ b/mods/ITEMS/mcl_dye/locale/mcl_dye.zh_TW.tr @@ -1,16 +1,16 @@ # textdomain: mcl_dye -Bone Meal=骨粉 +White Dye=白色染料 Light Grey Dye=淺灰色染料 Grey Dye=灰色染料 -Ink Sac=墨囊 +Black Dye=黑色染料 Purple Dye=紫色染料 -Lapis Lazuli=青金石 +Blue Dye=藍色染料 Light Blue Dye=淺藍色染料 Cyan Dye=青色染料 Cactus Green=仙人掌綠 Lime Dye=淺綠色染料 Dandelion Yellow=蒲公英黃 -Cocoa Beans=可可豆 +Brown Dye=棕色染料 Orange Dye=橙色染料 Rose Red=玫瑰紅 Magenta Dye=洋紅色染料 diff --git a/mods/ITEMS/mcl_dye/locale/template.txt b/mods/ITEMS/mcl_dye/locale/template.txt index 94e250f064..a40b0859ad 100644 --- a/mods/ITEMS/mcl_dye/locale/template.txt +++ b/mods/ITEMS/mcl_dye/locale/template.txt @@ -1,16 +1,16 @@ # textdomain: mcl_dye -Bone Meal= +White Dye= Light Grey Dye= Grey Dye= -Ink Sac= +Black Dye= Purple Dye= -Lapis Lazuli= +Blue Dye= Light Blue Dye= Cyan Dye= Cactus Green= Lime Dye= Dandelion Yellow= -Cocoa Beans= +Brown Dye= Orange Dye= Rose Red= Magenta Dye= diff --git a/mods/ITEMS/mcl_dye/textures/mcl_bone_meal_bone_meal.png b/mods/ITEMS/mcl_dye/textures/mcl_bone_meal_bone_meal.png new file mode 100644 index 0000000000..bc06c2865e Binary files /dev/null and b/mods/ITEMS/mcl_dye/textures/mcl_bone_meal_bone_meal.png differ diff --git a/mods/ITEMS/mcl_dye/textures/mcl_dye_black.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_black.png index 95a8df4ad1..79670d4e21 100644 Binary files a/mods/ITEMS/mcl_dye/textures/mcl_dye_black.png and b/mods/ITEMS/mcl_dye/textures/mcl_dye_black.png differ diff --git a/mods/ITEMS/mcl_dye/textures/mcl_dye_blue.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_blue.png index e0e3023075..25eaacb4f8 100644 Binary files a/mods/ITEMS/mcl_dye/textures/mcl_dye_blue.png and b/mods/ITEMS/mcl_dye/textures/mcl_dye_blue.png differ diff --git a/mods/ITEMS/mcl_dye/textures/mcl_dye_brown.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_brown.png index 877ee69dc2..b24c84b1fb 100644 Binary files a/mods/ITEMS/mcl_dye/textures/mcl_dye_brown.png and b/mods/ITEMS/mcl_dye/textures/mcl_dye_brown.png differ diff --git a/mods/ITEMS/mcl_dye/textures/dye_cyan.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_cyan.png similarity index 100% rename from mods/ITEMS/mcl_dye/textures/dye_cyan.png rename to mods/ITEMS/mcl_dye/textures/mcl_dye_cyan.png diff --git a/mods/ITEMS/mcl_dye/textures/dye_dark_green.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_dark_green.png similarity index 100% rename from mods/ITEMS/mcl_dye/textures/dye_dark_green.png rename to mods/ITEMS/mcl_dye/textures/mcl_dye_dark_green.png diff --git a/mods/ITEMS/mcl_dye/textures/dye_dark_grey.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_dark_grey.png similarity index 100% rename from mods/ITEMS/mcl_dye/textures/dye_dark_grey.png rename to mods/ITEMS/mcl_dye/textures/mcl_dye_dark_grey.png diff --git a/mods/ITEMS/mcl_dye/textures/mcl_dye_green.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_green.png new file mode 100644 index 0000000000..7b4d08b34e Binary files /dev/null and b/mods/ITEMS/mcl_dye/textures/mcl_dye_green.png differ diff --git a/mods/ITEMS/mcl_dye/textures/dye_grey.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_grey.png similarity index 100% rename from mods/ITEMS/mcl_dye/textures/dye_grey.png rename to mods/ITEMS/mcl_dye/textures/mcl_dye_grey.png diff --git a/mods/ITEMS/mcl_dye/textures/mcl_dye_light_blue.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_lightblue.png similarity index 100% rename from mods/ITEMS/mcl_dye/textures/mcl_dye_light_blue.png rename to mods/ITEMS/mcl_dye/textures/mcl_dye_lightblue.png diff --git a/mods/ITEMS/mcl_dye/textures/dye_magenta.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_magenta.png similarity index 100% rename from mods/ITEMS/mcl_dye/textures/dye_magenta.png rename to mods/ITEMS/mcl_dye/textures/mcl_dye_magenta.png diff --git a/mods/ITEMS/mcl_dye/textures/dye_orange.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_orange.png similarity index 100% rename from mods/ITEMS/mcl_dye/textures/dye_orange.png rename to mods/ITEMS/mcl_dye/textures/mcl_dye_orange.png diff --git a/mods/ITEMS/mcl_dye/textures/dye_pink.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_pink.png similarity index 100% rename from mods/ITEMS/mcl_dye/textures/dye_pink.png rename to mods/ITEMS/mcl_dye/textures/mcl_dye_pink.png diff --git a/mods/ITEMS/mcl_dye/textures/dye_red.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_red.png similarity index 100% rename from mods/ITEMS/mcl_dye/textures/dye_red.png rename to mods/ITEMS/mcl_dye/textures/mcl_dye_red.png diff --git a/mods/ITEMS/mcl_dye/textures/dye_violet.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_violet.png similarity index 100% rename from mods/ITEMS/mcl_dye/textures/dye_violet.png rename to mods/ITEMS/mcl_dye/textures/mcl_dye_violet.png diff --git a/mods/ITEMS/mcl_dye/textures/mcl_dye_white.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_white.png index bc06c2865e..4ceeed439c 100644 Binary files a/mods/ITEMS/mcl_dye/textures/mcl_dye_white.png and b/mods/ITEMS/mcl_dye/textures/mcl_dye_white.png differ diff --git a/mods/ITEMS/mcl_dye/textures/dye_yellow.png b/mods/ITEMS/mcl_dye/textures/mcl_dye_yellow.png similarity index 100% rename from mods/ITEMS/mcl_dye/textures/dye_yellow.png rename to mods/ITEMS/mcl_dye/textures/mcl_dye_yellow.png diff --git a/mods/ITEMS/mcl_enchanting/engine.lua b/mods/ITEMS/mcl_enchanting/engine.lua index 46a05abf9e..fa6dea3538 100644 --- a/mods/ITEMS/mcl_enchanting/engine.lua +++ b/mods/ITEMS/mcl_enchanting/engine.lua @@ -520,7 +520,7 @@ function mcl_enchanting.show_enchanting_formspec(player) local table_slots = mcl_enchanting.get_table_slots(player, itemstack, num_bookshelves) for i, slot in ipairs(table_slots) do any_enchantment = any_enchantment or slot - local enough_lapis = inv:contains_item("enchanting_lapis", ItemStack({name = "mcl_dye:blue", count = i})) + local enough_lapis = inv:contains_item("enchanting_lapis", ItemStack({name = "mcl_core:lapis", count = i})) local enough_levels = slot and slot.level_requirement <= player_levels local can_enchant = (slot and enough_lapis and enough_levels) local ending = (can_enchant and "" or "_off") @@ -555,7 +555,7 @@ function mcl_enchanting.handle_formspec_fields(player, formname, fields) local meta = player:get_meta() local num_bookshelfes = meta:get_int("mcl_enchanting:num_bookshelves") local itemstack = inv:get_stack("enchanting_item", 1) - local cost = ItemStack({name = "mcl_dye:blue", count = button_pressed}) + local cost = ItemStack({name = "mcl_core:lapis", count = button_pressed}) if not inv:contains_item("enchanting_lapis", cost) then return end @@ -608,7 +608,7 @@ function mcl_enchanting.allow_inventory_action(player, action, inventory, invent if action == "move" then local listname = inventory_info.to_list local stack = inventory:get_stack(inventory_info.from_list, inventory_info.from_index) - if stack:get_name() == "mcl_dye:blue" and listname ~= "enchanting_item" then + if stack:get_name() == "mcl_core:lapis" and listname ~= "enchanting_item" then local count = stack:get_count() local old_stack = inventory:get_stack("enchanting_lapis", 1) if old_stack:get_name() ~= "" then @@ -631,7 +631,7 @@ function mcl_enchanting.on_inventory_action(player, action, inventory, inventory if action == "move" and inventory_info.to_list == "enchanting" then local stack = inventory:get_stack("enchanting", 1) local result_list - if stack:get_name() == "mcl_dye:blue" then + if stack:get_name() == "mcl_core:lapis" then result_list = "enchanting_lapis" stack:add_item(inventory:get_stack("enchanting_lapis", 1)) else diff --git a/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.ja.tr b/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.ja.tr new file mode 100644 index 0000000000..1983ec4d43 --- /dev/null +++ b/mods/ITEMS/mcl_enchanting/locale/mcl_enchanting.ja.tr @@ -0,0 +1,144 @@ +# textdomain: mcl_enchanting + + +### enchantments.lua ### + +Arrows passes through multiple objects.=矢が複数のオブジェクトを貫通します。 +Arrows set target on fire.=矢がターゲットを燃やします。 +Bane of Arthropods=殺虫力 +Channeling=召雷 + +Channels a bolt of lightning toward a target. Works only during thunderstorms and if target is unobstructed with opaque blocks.=ターゲットに向けて稲妻を落とします。雷雨の時、且つターゲットが不透明なブロックで遮られていない場合のみ有効です。 + +Curse of Vanishing=消滅の呪い +Decreases crossbow charging time.=クロスボウの装填時間が短くなります。 +Decreases time until rod catches something.=釣りで獲物のかかる間隔が短くなります。 +Depth Strider=水中移動 +Efficiency=効率化 +Extends underwater breathing time.=水中での呼吸時間を延長します。 +Fire Aspect=火属性 +Flame=フレイム +Fortune=幸運 +Frost Walker=氷結歩行 +Impaling=串刺し +Increases arrow damage.=矢のダメージが増加します。 +Increases arrow knockback.=矢のノックバックを強化します。 +Increases certain block drops.=特定のブロックのドロップが増加します。 + +Increases damage and applies Slowness IV to arthropod mobs (spiders, cave spiders, silverfish and endermites).=虫系のMOB(クモ、洞窟グモ、シルバーフィッシュ、エンダーマイト)に対してダメージが増加し、鈍化IVを適用します。 + +Increases damage to undead mobs.=アンデッド系のMOBへのダメージが増加します。 +Increases damage.=ダメージが増加します。 +Increases item durability.=アイテムの耐久度が向上します。 +Increases knockback.=ノックバックを強化します。 +Increases mining speed.=採掘速度が増加します。 +Increases mob loot.=MOBの戦利品が増加します。 +Increases rate of good loot (enchanting books, etc.)=釣果の質が良くなります(エンチャントの本など)。 +Increases sweeping attack damage.=なぎ払い攻撃のダメージが増加します。 +Increases underwater movement speed.=水中での横移動速度が増加します。 +Increases walking speed on soul sand.=ソウルサンドとソウルソイルの上を歩く速度が増加します。 +Infinity=無限 +Item destroyed on death.=死亡時にアイテムが消滅します。 +Knockback=ノックバック +Looting=奪取 +Loyalty=忠誠 +Luck of the Sea=宝釣り +Lure=入れ食い +Mending=自己修復 +Mined blocks drop themselves.=採掘したブロックそのものをドロップするようになります。 +Multishot=拡散弾 +Piercing=貫通 +Power=パワー +Punch=衝撃 +Quick Charge=高速装填 +Repair the item while gaining XP orbs.=アイテムが経験値を得て自己を修復します。 +Respiration=水中呼吸 +Riptide=激流 +Sets target on fire.=ターゲットに火をつけます。 +Sharpness=鋭利 +Shoot 3 arrows at the cost of one.=1本分のコストで、3本の矢を同時に拡散発射します。 +Shooting consumes no regular arrows.=普通の矢は射ても消費しなくなります。 +Silk Touch=シルクタッチ +Smite=破邪 +Soul Speed=ソウルスピード +Sweeping Edge=スイープエッジ +Trident deals additional damage to ocean mobs.=トライデントは水生系のMOBに追加ダメージを与えます。 + +Trident launches player with itself when thrown. Works only in water or rain.=投擲したトライデントと共に、プレイヤーを突進させます。水中か雨天でのみ機能します。 + +Trident returns after being thrown. Higher levels reduce return time.=投擲したトライデントが手に戻ってきます。レベルが高いほど戻る時間が短縮されます。 + +Turns water beneath the player into frosted ice and prevents the damage from magma blocks.=プレイヤーの下の水を薄氷に変え、また、マグマブロックからのダメージを防ぎます。 + +Unbreaking=耐久力 + +### engine.lua ### + +@1 Enchantment Levels=@1 エンチャントレベル +@1 Lapis Lazuli=@1 ラピスラズリ +Inventory=インベントリ +Level requirement: @1=必要レベル:@1 + +### init.lua ### + +'@1' is not a valid number='@1'は有効ではない数字 +'@1' is not a valid number.='@1'は有効な数字ではありません。 + []=<プレイヤー> <エンチャント> [<レベル>] +@1 can't be combined with @2.=@1は@2と組み合わせられません。 + +After finally selecting your enchantment; left-click on the selection, and you will see both the lapis lazuli and your experience levels consumed. And, an enchanted item left in its place.=最終的にエンチャントを決めたら;選ぶ箇所を左クリックすると、ラピスラズリと経験値の両方が消費されているのがわかります。そしてエンチャントしたアイテムがその場に残されます。 + +After placing your items in the slots, the enchanting options will be shown. Hover over the options to read what is available to you.=アイテムをスロットに配置すると、エンチャント オプションが表示されます。オプションにカーソルを合わせると、利用可能なオプションが表示されます。 + +Enchant=エンチャント +Enchant an item=アイテムにエンチャントする +Enchanted Book=エンチャント本 +Enchanting Table=エンチャントテーブル + +Enchanting Tables will let you enchant armors, tools, weapons, and books with various abilities. But, at the cost of some experience, and lapis lazuli.=エンチャントテーブルでは、防具や道具、武器、本などに様々な能力をエンチャントできます。ただし多少の経験値や、ラピスラズリを費やすことになります。 + +Enchanting succeded.=エンチャントが成功しました。 +Forcefully enchant an item=アイテムに強制的にエンチャント + +Place a tool, armor, weapon or book into the top left slot, and then place 1-3 Lapis Lazuli in the slot to the right.=左上のスロットに道具、防具、武器、本を入れ、その右のスロットにラピスラズリ1~3個を入れます。 + +Player '@1' cannot be found.=プレイヤー'@1'が見つかりません。 +Rightclick the Enchanting Table to open the enchanting menu.=エンチャントテーブルを右クリックすると、エンチャント メニューが表示されます。 +Spend experience, and lapis to enchant various items.=経験値とラピスを消費して、様々なアイテムにエンチャントできます。 + +The number you have entered (@1) is too big, it must be at most @2.=入力した数値(@1)は大きすぎます、@2以下である必要があります。 + +The number you have entered (@1) is too small, it must be at least @2.=入力した数値(@1)は小さすぎます、@2以上である必要があります。 + +The selected enchantment can't be added to the target item.=選択したエンチャントは、対象アイテムに付加できません。 +The target doesn't hold an item.=対象がアイテムを保持していません。 +The target item is not enchantable.=対象アイテムは、エンチャント不可です。 +There is no such enchantment '@1'.='@1'というエンチャントはありません。 + +These options are randomized, and dependent on experience level; but the enchantment strength can be increased.=これらのオプションはランダム且つ経験値に依存します;しかし、エンチャントを強化できます。 + +To increase the enchantment strength, place bookshelves around the enchanting table. However, you will need to keep 1 air node between the table, & the bookshelves to empower the enchanting table.=エンチャントテーブルの周囲に本棚を置くと、エンチャントを強化できます。ただし、テーブルと本棚の間に空気ノードを1つ入れないと、エンチャントテーブルに力を与えられません。 + +Usage: /enchant []=使用方法:/enchant <プレイヤー> <エンチャント> [<レベル>] +Usage: /forceenchant []=使用方法:/forceenchant <プレイヤー> <エンチャント> [<レベル>] + + +##### not used anymore ##### + +# textdomain: mcl_enchanting +Aqua Affinity=水中採掘 +Increases underwater mining speed.=水中での採掘速度が向上します。 +Blast Protection=爆風耐性 +Reduces explosion damage and knockback.=爆発ダメージとノックバックを軽減します。 +Curse of Binding=束縛の呪い +Item cannot be removed from armor slots except due to death, breaking or in Creative Mode.=次の場合を除き、防具スロットからアイテムを外せません;アイテムが破損/自身が死亡/クリエイティブモード中 +Feather Falling=落下耐性 +Reduces fall damage.=落下ダメージを軽減します。 +Fire Protection=炎上耐性 +Reduces fire damage.=火炎ダメージを軽減します(溶岩は対象外)。 +Projectile Protection=飛来物耐性 +Reduces projectile damage.=飛来物ダメージを軽減します。 +Protection=外傷耐性 +Reduces most types of damage by 4% for each level.=体の外からのダメージ全般を軽減します(レベル毎に+4%)。 +Thorns=イバラ +Reflects some of the damage taken when hit, at the cost of reducing durability with each proc.=受けたダメージの一部を与え返せますが、その代わり耐久度が余計に削られます。 diff --git a/mods/ITEMS/mcl_enchanting/mod.conf b/mods/ITEMS/mcl_enchanting/mod.conf index 4d4741fb83..6104928576 100644 --- a/mods/ITEMS/mcl_enchanting/mod.conf +++ b/mods/ITEMS/mcl_enchanting/mod.conf @@ -1,5 +1,5 @@ name = mcl_enchanting description = Enchanting for MineClone2 -depends = tt, walkover, mcl_sounds, mcl_colors +depends = tt, walkover, mcl_sounds, mcl_colors, mcl_experience optional_depends = screwdriver author = Fleckenstein diff --git a/mods/ITEMS/mcl_end/locale/mcl_end.ja.tr b/mods/ITEMS/mcl_end/locale/mcl_end.ja.tr new file mode 100644 index 0000000000..647d3aea34 --- /dev/null +++ b/mods/ITEMS/mcl_end/locale/mcl_end.ja.tr @@ -0,0 +1,33 @@ +# textdomain: mcl_end +End Stone=エンドストーン +End Stone Bricks=エンドストーンレンガ +Purpur Block=プルプァブロック +Purpur Pillar=プルプァの柱 +End Rod=エンドロッド +End rods are decorative light sources.=エンドロッドは装飾用の光源です。 +Dragon Egg=ドラゴンの卵 +A dragon egg is a decorative item which can be placed.=ドラゴンの卵は、置いておくだけの装飾用アイテムです。 +Chorus Flower=コーラスフラワー +A chorus flower is the living part of a chorus plant. It can grow into a tall chorus plant, step by step. When it grows, it may die on old age eventually. It also dies when it is unable to grow.=コーラスフラワーは、コーラスプラントの生きた部分です。徐々に成長し、背の高いコーラスプラントになれます。やがて老衰が訪れ、成長した時に枯れることもあります。また、成長できなくなった時にも枯れてしまいます。 +Place it and wait for it to grow. It can only be placed on top of end stone, on top of a chorus plant stem, or at the side of exactly one chorus plant stem.=それを置き、成長を待ちます。置ける所は、エンドストーンかコーラスプラントの茎の上、または きっちり1本分あるコーラスプラントの茎の側面に限られます。 +Dead Chorus Flower=枯れたコーラスフラワー +This is a part of a chorus plant. It doesn't grow. Chorus flowers die of old age or when they are unable to grow. A dead chorus flower can be harvested to obtain a fresh chorus flower which is able to grow again.=これはコーラスプラントの一部です。成長はしません。コーラスフラワーは、老衰や成長できなくなった場合に枯れてしまうのです。枯れたコーラスフラワーを収穫することで、再び成長できる新鮮なコーラスフラワーが得られます。 +Chorus Plant Stem=コーラスプラントの茎 +A chorus plant stem is the part of a chorus plant which holds the whole plant together. It needs end stone as its soil. Stems are grown from chorus flowers.=コーラスプラントの茎は、コーラスプラント全体を支えている部分です。その土壌としてエンドストーンを要します。コーラスフラワーから茎が育ちます。 +Chorus Fruit=コーラスフルーツ +A chorus fruit is an edible fruit from the chorus plant which is home to the End. Eating it teleports you to the top of a random solid block nearby, provided you won't end up inside a liquid, solid or harmful blocks. Teleportation might fail if there are very few or no places to teleport to.=コーラスフルーツはエンドを原産地とする食用の果実で、コーラスプラントから取れます。食べると、近くのランダムな固体のブロックの上にテレポートします。ただし、液体、固体、有害なブロックの中に入ってしまわない場合のみです。テレポート先が殆ど又は全くない場合、テレポートに失敗することがあります。 +Popped Chorus Fruit=爆ぜたコーラスフルーツ +Eye of Ender=エンダーアイ +This item is used to locate End portal shrines in the Overworld and to activate End portals.=これはオーバーワールドにあるエンドポータルの場所を探すのに使い、また、ポータルを起動する場合にも使うアイテムです。 +Use the attack key to release the eye of ender. It will rise and fly in the horizontal direction of the closest end portal shrine. If you're very close, the eye of ender will take the direct path to the End portal shrine instead. After a few seconds, it stops. It may drop as an item, but there's a 20% chance it shatters.=攻撃キーでエンダーアイを放ちます。それは上昇した後、最も近いエンドポータルに向かって水平に飛んでいきます。非常に近くにいる場合はその代わりに、エンドポータルへの直進経路をとるようになり、エンダーアイは数秒後に停止します。使用後はアイテムとしてドロップしますが、それは粉々になる確率20%を通過できた場合です。 +To activate an End portal, eyes of ender need to be placed into each block of an intact End portal frame.=エンドポータルを起動するには、手付かずのエンドポータルフレームの各ブロックに、エンダーアイを配置する必要があります。 +NOTE: The End dimension is currently incomplete and might change in future versions.=注:エンド次元は現在未完成であり、将来のバージョンで変更される可能性があります。 +The stem attaches itself to end stone and other chorus blocks.=茎は、エンドストーンや他のコーラスブロックに取り付けられます。 +Grows on end stone=エンドストーンに生育 +Randomly teleports you when eaten=食べるとランダムにテレポート +Guides the way to the mysterious End dimension=神秘的なエンド次元への道案内 +End Crystal=エンドクリスタル +End Crystals are explosive devices. They can be placed on Obsidian or Bedrock. Ignite them by a punch or a hit with an arrow. End Crystals can also be used the spawn the Ender Dragon by placing one at each side of the End Exit Portal.=エンドクリスタルは爆発装置です。黒曜石や 岩盤の上に置けます。パンチか矢を当てると着火されます。エンドクリスタルは、エンドの出口ポータルの左右に1つずつ配置することで、エンダードラゴンを出現させることもできます。 +Explosion radius: @1=爆発範囲:@1 +Ignited by a punch or a hit with an arrow=パンチか矢を当てると着火 +Place the End Crystal on Obsidian or Bedrock, then punch it or hit it with an arrow to cause an huge and probably deadly explosion. To Spawn the Ender Dragon, place one at each side of the End Exit Portal.=エンドクリスタルを黒曜石や岩盤の上に置き、パンチか矢を当てると、おそらく致命的であろう大爆発を起こします。エンダードラゴンを出現させるには、エンドの出口ポータルの左右に1つずつ配置します。 diff --git a/mods/ITEMS/mcl_farming/README.txt b/mods/ITEMS/mcl_farming/README.txt index 5779d70356..02cdaf93a6 100644 --- a/mods/ITEMS/mcl_farming/README.txt +++ b/mods/ITEMS/mcl_farming/README.txt @@ -1,16 +1,12 @@ ===FARMING MOD for MINETEST-C55=== by PilzAdam +Modified heavily by MineClone 2 Dev Team. + Introduction: This mod adds farming to Minetest. -How to install: -Unzip the archive an place it in minetest-base-directory/mods/minetest/ -if you have a windows client or a linux run-in-place client. If you have -a linux system-wide instalation place it in ~/.minetest/mods/minetest/. -If you want to install this mod only in one world create the folder -worldmods/ in your worlddirectory. -For further information or help see: +How to install see: http://wiki.minetest.com/wiki/Installing_Mods How to use the mod: @@ -25,22 +21,8 @@ For further information or help see: http://minetest.net/forum/viewtopic.php?id=2787 License: -Sourcecode: WTFPL (see below) -Graphics: WTFPL (see below) +Sourcecode: CC-BY-SA 4 (see below) +Graphics: CC-BY-SA 4 (see below) See also: http://minetest.net/ - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 - - Copyright (C) 2004 Sam Hocevar - - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. - - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/mods/ITEMS/mcl_farming/locale/mcl_farming.ja.tr b/mods/ITEMS/mcl_farming/locale/mcl_farming.ja.tr new file mode 100644 index 0000000000..d50c499114 --- /dev/null +++ b/mods/ITEMS/mcl_farming/locale/mcl_farming.ja.tr @@ -0,0 +1,99 @@ +# textdomain: mcl_farming +Beetroot Seeds=ビートルートの種 +Grows into a beetroot plant. Chickens like beetroot seeds.=ビートルートの作物に成長します。ニワトリはビートルートの種を好みます。 +Place the beetroot seeds on farmland (which can be created with a hoe) to plant a beetroot plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it beetroot seeds.=ビートルートの種を耕地(クワで作れる)に置いて植え、ビートルートの苗にします。日光に当たると成長し、湿った耕地ではより早く成長します。動物を右クリックすると、ビートルートの種を食べさせることができます。 +Premature Beetroot Plant (Stage 1)=未成熟なビートルートの苗(1段階目) +Beetroot plants are plants which grow on farmland under sunlight in 4 stages. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.=ビートルートの苗は、耕地で日光を浴びて育つ植物で、成長が4段階あります。湿った耕地では、やや早く成長します。収穫はいつでも可能なものの、益があるのは成熟してからです。 +Premature Beetroot Plant=未成熟なビートルートの苗 +Premature Beetroot Plant (Stage 2)=未成熟なビートルートの苗(2段階目) +Premature Beetroot Plant (Stage 3)=未成熟なビートルートの苗(3段階目) +Mature Beetroot Plant=成熟したビートルートの苗 +A mature beetroot plant is a farming plant which is ready to be harvested for a beetroot and some beetroot seeds. It won't grow any further.=成熟したビートルートの苗は、ビートルートとその種をいくつか収穫できる農作物です。これ以上は成長しません。 +Beetroot=ビートルート +Beetroots are both used as food item and a dye ingredient. Pigs like beetroots, too.=ビートルートは、食材としても染料としても使われます。ブタの好物でもあります。 +Hold it in your hand and right-click to eat it. Rightclick an animal to feed it.=手に持って右クリックすると食べられます。動物を右クリックすると、餌を与えることができます。 +Beetroot Soup=ビートルートスープ +Beetroot soup is a food item.=ビートルートスープは食料アイテムです。 +Premature Carrot Plant=未成熟なニンジンの苗 +Carrot plants are plants which grow on farmland under sunlight in 8 stages, but only 4 stages can be visually told apart. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.=ニンジンは、耕地で日光を浴びて育つ植物で、成長が8段階あります。ただし目視で見分けられるのは4段階だけです。湿った耕地では、やや早く成長します。収穫はいつでも可能なものの、益があるのは成熟してからです。 +Premature Carrot Plant (Stage @1)=未成熟なニンジンの苗(@1段階目) +Mature Carrot Plant=成熟したニンジンの苗 +Mature carrot plants are ready to be harvested for carrots. They won't grow any further.=成熟したニンジンの苗からは、ニンジンをいくつか収穫できます。これ以上は成長しません。 +Carrot=ニンジン +Carrots can be eaten and planted. Pigs and rabbits like carrots.=ニンジンは食べてもいいし、植えてもいいでしょう。ブタやウサギはニンジンが好きです。 +Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant the carrot. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it.=手に持って右クリックすると食べます。耕地に置くとニンジンを植えます。日光で育ち、湿った耕地では早く育ちます。動物を右クリックすると餌付けできます。 +Golden Carrot=金のニンジン +A golden carrot is a precious food item which can be eaten. It is really, really filling!=金のニンジンは貴重な食料アイテムです。これは本当に、マジで食べ応えがあります! +Hoes are essential tools for growing crops. They are used to create farmland in order to plant seeds on it. Hoes can also be used as very weak weapons in a pinch.=クワは農作物を育てるのに欠かせない道具です。種を植えるための耕地を作るのに使います。また、いざというときには、非常に弱い武器としても使えます。 +Use the hoe on a cultivatable block (by rightclicking it) to turn it into farmland. Dirt, grass blocks and grass paths are cultivatable blocks. Using a hoe on coarse dirt turns it into dirt.=耕せるブロックに(右クリックで)クワを使うと耕地になります。土、草原、オフロードは耕せるブロックです。粗い土にクワを使うと、土になります。 +Wood Hoe=木製のクワ +Stone Hoe=石のクワ +Iron Hoe=鉄のクワ +Golden Hoe=金のクワ +Diamond Hoe=ダイヤモンドのクワ +Melon Seeds=スイカの種 +Grows into a melon stem which in turn grows melons. Chickens like melon seeds.=成長するとスイカの茎になり、そこからスイカがなります。ニワトリはこの種が好きです。 +Place the melon seeds on farmland (which can be created with a hoe) to plant a melon stem. Melon stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem will attempt to grow a melon at the side. Rightclick an animal to feed it melon seeds.=スイカの種を耕地(クワで作れる)に置いて植え、スイカの茎にします。茎は日光で育ち、湿った耕地では早く育ちます。成熟すると、茎の隣にスイカを実らせようとします。動物を右クリックすると、スイカの種を食べさせることができます。 +Melon=スイカ +A melon is a block which can be grown from melon stems, which in turn are grown from melon seeds. It can be harvested for melon slices.=スイカは、スイカの種から育つ茎を経て実るブロックです。収穫してスイカの薄切りにできます。 +Premature Melon Stem=未成熟なスイカの茎 +Melon stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature melon stems are able to grow melons.=スイカの茎は耕地で育つ植物で、成長が8段階あります。湿った耕地では、やや早く成長します。成熟したスイカの茎は、スイカを実らせることができます。 +Premature Melon Stem (Stage @1)=未成熟なスイカの茎(@1段階目) +Mature Melon Stem=成熟したスイカの茎 +A mature melon stem attempts to grow a melon at one of its four adjacent blocks. A melon can only grow on top of farmland, dirt, or a grass block. When a melon is next to a melon stem, the melon stem immediately bends and connects to the melon. While connected, a melon stem can't grow another melon. As soon all melons around the stem have been removed, it loses the connection and is ready to grow another melon.=成熟したスイカの茎は、隣接する4つのブロックのいずれかでスイカを実らせようとします。実るのは、耕地、土、草原の上だけです。スイカの茎の隣にスイカがあると、茎はすぐに曲がってスイカにつながります。つながっている間は、他のスイカを実らせられません。茎の周りのスイカをすべて取り除くと、接続が切れて次のスイカが実るようになります。 +Melon Slice=スイカの薄切り +This is a food item which can be eaten.=これは食用アイテムです。 +Premature Potato Plant=未成熟なジャガイモの苗 +Potato plants are plants which grow on farmland under sunlight in 8 stages, but only 4 stages can be visually told apart. On hydrated farmland, they grow a bit faster. They can be harvested at any time but will only yield a profit when mature.=ジャガイモは、耕地で日光を浴びて育つ植物で、成長が8段階あります。ただし目視で見分けられるのは4段階だけです。湿った耕地では、やや早く成長します。収穫はいつでも可能なものの、益があるのは成熟してからです。 +Premature Potato Plant (Stage @1)=未成熟なジャガイモの苗(@1段階目) +Mature Potato Plant=成熟したジャガイモの苗 +Mature potato plants are ready to be harvested for potatoes. They won't grow any further.=成熟したジャガイモの苗からは、ジャガイモをいくつか収穫できます。これ以上は成長しません。 +Potato=ジャガイモ +Potatoes are food items which can be eaten, cooked in the furnace and planted. Pigs like potatoes.=ジャガイモはそのまま食べるも良し、かまどで焼くも良し。植えるのもいいでしょう。ブタはジャガイモが好きです。 +Hold it in your hand and rightclick to eat it. Place it on top of farmland to plant it. It grows in sunlight and grows faster on hydrated farmland. Rightclick an animal to feed it.=手に持って右クリックすると食べます。耕地に置くとジャガイモを植えます。日光で育ち、湿った耕地では早く育ちます。動物を右クリックすると餌付けできます。 +Baked Potato=ベイクドポテト +Baked potatoes are food items which are more filling than the unbaked ones.=ベイクドポテトは、焼いていないものよりも食べ応えがある食料アイテムです。 +Poisonous Potato=芽吹いたジャガイモ +This potato doesn't look too healthy. You can eat it to restore hunger points, but there's a 60% chance it will poison you briefly.=このジャガイモは、あまり体によくなさそうです。食べると満腹度が多めに回復するものの、短時間の食中毒を引き起こす確率が60%あります。 +Pumpkin Seeds=カボチャの種 +Grows into a pumpkin stem which in turn grows pumpkins. Chickens like pumpkin seeds.=成長するとカボチャの茎になり、そこからカボチャがなります。ニワトリはこの種が好きです。 +Place the pumpkin seeds on farmland (which can be created with a hoe) to plant a pumpkin stem. Pumpkin stems grow in sunlight and grow faster on hydrated farmland. When mature, the stem attempts to grow a pumpkin next to it. Rightclick an animal to feed it pumpkin seeds.=カボチャの種を耕地(クワで作れる)に置いて植え、カボチャの茎にします。茎は日光で育ち、湿った耕地では早く育ちます。成熟すると、茎の隣にカボチャを実らせようとします。動物を右クリックすると、カボチャの種を食べさせることができます。 +Premature Pumpkin Stem=未成熟なカボチャの茎 +Pumpkin stems grow on farmland in 8 stages. On hydrated farmland, the growth is a bit quicker. Mature pumpkin stems are able to grow pumpkins.=カボチャの茎は耕地で育つ植物で、成長が8段階あります。湿った耕地では、やや早く成長します。成熟したカボチャの茎は、カボチャを実らせることができます。 +Premature Pumpkin Stem (Stage @1)=未成熟なカボチャの茎(@1段階目) +Mature Pumpkin Stem=成熟したカボチャの茎 +A mature pumpkin stem attempts to grow a pumpkin at one of its four adjacent blocks. A pumpkin can only grow on top of farmland, dirt or a grass block. When a pumpkin is next to a pumpkin stem, the pumpkin stem immediately bends and connects to the pumpkin. A connected pumpkin stem can't grow another pumpkin. As soon all pumpkins around the stem have been removed, it loses the connection and is ready to grow another pumpkin.=成熟したカボチャの茎は、隣接する4つのブロックのいずれかでカボチャを実らせようとします。実るのは、耕地、土、草原の上だけです。カボチャの茎の隣にカボチャがあると、茎はすぐに曲がってカボチャにつながります。つながっている間は、他のカボチャを実らせられません。茎の周りのカボチャをすべて取り除くと、接続が切れて次のカボチャが実るようになります。 +Faceless Pumpkin=顔のないカボチャ +A faceless pumpkin is a decorative block. It can be carved with shears to obtain pumpkin seeds.=顔のないカボチャは装飾ブロックです。これをハサミで彫ると、カボチャの種が得られます。 +Pumpkin=カボチャ +A pumpkin can be worn as a helmet. Pumpkins grow from pumpkin stems, which in turn grow from pumpkin seeds.=カボチャは、カボチャの種から育つ茎を経て実ります。ハサミで彫るとヘルメットとして被る事もできます。 +Jack o'Lantern=ジャック・オー・ランタン +A jack o'lantern is a traditional Halloween decoration made from a pumpkin. It glows brightly.=ジャック・オー・ランタンとは、カボチャから作られるハロウィンの伝統的な飾りです。明るく光ります。 +Pumpkin Pie=パンプキンパイ +A pumpkin pie is a tasty food item which can be eaten.=パンプキンパイは、美味しくいただける食料アイテムです。 +Farmland=耕地 +Farmland is used for farming, a necessary surface to plant crops. It is created when a hoe is used on dirt or a similar block. Plants are able to grow on farmland, but slowly. Farmland will become hydrated farmland (on which plants grow faster) when it rains or a water source is nearby. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it.=耕地とは農業に使うもので、作物の栽培に必要な地面のことです。土やそれに近いブロックの上でクワを使うとできます。たんなる耕地の上でも植物は育ちますが、そのスピードはゆるやかです。雨が降ったり、水源が近くにあったりすると、耕地は「湿った耕地」となります(植物の成長が早くなります)。上に固体ブロックが現れたり、上にピストンアームが伸びたりすると、このブロックは土に戻ります。 +Hydrated Farmland=湿った耕地 +Hydrated farmland is used in farming, this is where you can plant and grow some plants. It is created when farmland is under rain or near water. Without water, this block will dry out eventually. This block will turn back to dirt when a solid block appears above it or a piston arm extends above it.=湿った耕地は農業に使われるもので、ここに何らかの作物を植えて育てられます。耕地が雨に降られたり水辺にある場合、これが出来上がります。水がなければ、やがて乾いてしまいます。上に固体ブロックが現れたり、上にピストンアームが伸びたりすると、このブロックは土に戻ります。 +Wheat Seeds=小麦の種 +Grows into a wheat plant. Chickens like wheat seeds.=小麦の苗に成長します。ニワトリは小麦の種を好みます。 +Place the wheat seeds on farmland (which can be created with a hoe) to plant a wheat plant. They grow in sunlight and grow faster on hydrated farmland. Rightclick an animal to feed it wheat seeds.=小麦の種を耕地(クワで作れる)に置いて植え、小麦の苗にします。日光に当たると成長し、湿った耕地ではより早く成長します。動物を右クリックすると、小麦の種を食べさせることができます。 +Premature Wheat Plant=未成熟な小麦の苗 +Premature wheat plants grow on farmland under sunlight in 8 stages. On hydrated farmland, they grow faster. They can be harvested at any time but will only yield a profit when mature.=小麦は、耕地で日光を浴びて育つ植物で、成長が8段階あります。湿った耕地では、やや早く成長します。収穫はいつでも可能なものの、益があるのは成熟してからです。 +Premature Wheat Plant (Stage @1)=未成熟な小麦の苗(@1段階目) +Mature Wheat Plant=成熟した小麦の苗 +Mature wheat plants are ready to be harvested for wheat and wheat seeds. They won't grow any further.=成熟した小麦の苗からは、小麦をいくつか収穫できます。これ以上は成長しません。 +Wheat=小麦 +Wheat is used in crafting. Some animals like wheat.=小麦はクラフトに使われます。小麦が好きな動物もいます。 +Cookie=クッキー +Bread=パン +Hay Bale=干草の俵 +Hay bales are decorative blocks made from wheat.=干草の俵とは、小麦から作られた装飾ブロックのことです。 +To carve a face into the pumpkin, use the shears on the side you want to carve.=カボチャに顔を彫るには、彫りたい方の面にハサミを使います。 +Use the “Place” key on an animal to try to feed it wheat.=動物に「配置」キーを使って、小麦を与えてみましょう。 +Grows on farmland=耕地に生育 +Turns block into farmland=ブロックを耕地にする +60% chance of poisoning=60%の確率で食あたり +Surface for crops=農作物用地面 +Can become wet=潤いが得られる +Uses: @1=使用:@1 diff --git a/mods/ITEMS/mcl_farming/shared_functions.lua b/mods/ITEMS/mcl_farming/shared_functions.lua index 7b9784503a..e2e42dd259 100644 --- a/mods/ITEMS/mcl_farming/shared_functions.lua +++ b/mods/ITEMS/mcl_farming/shared_functions.lua @@ -69,7 +69,7 @@ function mcl_farming:add_plant(identifier, full_grown, names, interval, chance) interval = interval, chance = chance, action = function(pos, node) - local low_speed = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name ~= "mcl_farming:soil_wet" + local low_speed = minetest.get_node({ x = pos.x, y = pos.y - 1, z = pos.z }).name ~= "mcl_farming:soil_wet" mcl_farming:grow_plant(identifier, pos, node, false, false, low_speed) end, }) @@ -130,7 +130,7 @@ function mcl_farming:grow_plant(identifier, pos, node, stages, ignore_light, low stages = 1 end stages = stages + math.ceil(intervals_counter) - local new_node = {name = plant_info.names[step+stages]} + local new_node = { name = plant_info.names[step + stages] } if new_node.name == nil then new_node.name = plant_info.full_grown end @@ -157,14 +157,14 @@ function mcl_farming:place_seed(itemstack, placer, pointed_thing, plantname) end end - local pos = {x=pt.above.x, y=pt.above.y-1, z=pt.above.z} + local pos = { x = pt.above.x, y = pt.above.y - 1, z = pt.above.z } local farmland = minetest.get_node(pos) - pos= {x=pt.above.x, y=pt.above.y, z=pt.above.z} + pos = { x = pt.above.x, y = pt.above.y, z = pt.above.z } local place_s = minetest.get_node(pos) - if string.find(farmland.name, "mcl_farming:soil") and string.find(place_s.name, "air") then - minetest.sound_play(minetest.registered_nodes[plantname].sounds.place, {pos = pos}, true) - minetest.add_node(pos, {name=plantname, param2 = minetest.registered_nodes[plantname].place_param2}) + if string.find(farmland.name, "mcl_farming:soil") and string.find(place_s.name, "air") then + minetest.sound_play(minetest.registered_nodes[plantname].sounds.place, { pos = pos }, true) + minetest.add_node(pos, { name = plantname, param2 = minetest.registered_nodes[plantname].place_param2 }) --local intervals_counter = get_intervals_counter(pos, 1, 1) else return @@ -179,7 +179,7 @@ end --[[ Helper function to create a gourd (e.g. melon, pumpkin), the connected stem nodes as -- full_unconnected_stem: itemstring of the full-grown but unconnceted stem node. This node must already be done +- full_unconnected_stem: itemstring of the full-grown but unconnected stem node. This node must already be done - connected_stem_basename: prefix of the itemstrings used for the 4 connected stem nodes to create - stem_itemstring: Desired itemstring of the fully-grown unconnected stem node - stem_def: Partial node definition of the fully-grown unconnected stem node. Many fields are already defined. You need to add `tiles` and `description` at minimum. Don't define on_construct without good reason @@ -202,10 +202,10 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s } local neighbors = { - { x=-1, y=0, z=0 }, - { x=1, y=0, z=0 }, - { x=0, y=0, z=-1 }, - { x=0, y=0, z=1 }, + { x = -1, y = 0, z = 0 }, + { x = 1, y = 0, z = 0 }, + { x = 0, y = 0, z = -1 }, + { x = 0, y = 0, z = 1 }, } -- Connect the stem at stempos to the first neighboring gourd block. @@ -215,19 +215,19 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s if stem.name ~= full_unconnected_stem then return false end - for n=1, #neighbors do + for n = 1, #neighbors do local offset = neighbors[n] local blockpos = vector.add(stempos, offset) local block = minetest.get_node(blockpos) if block.name == gourd_itemstring then if offset.x == 1 then - minetest.set_node(stempos, {name=connected_stem_names[1]}) + minetest.set_node(stempos, { name = connected_stem_names[1] }) elseif offset.x == -1 then - minetest.set_node(stempos, {name=connected_stem_names[2]}) + minetest.set_node(stempos, { name = connected_stem_names[2] }) elseif offset.z == 1 then - minetest.set_node(stempos, {name=connected_stem_names[3]}) + minetest.set_node(stempos, { name = connected_stem_names[3] }) elseif offset.z == -1 then - minetest.set_node(stempos, {name=connected_stem_names[4]}) + minetest.set_node(stempos, { name = connected_stem_names[4] }) end return true end @@ -238,13 +238,13 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s if not gourd_def.after_destruct then gourd_def.after_destruct = function(blockpos, oldnode) -- Disconnect any connected stems, turning them back to normal stems - for n=1, #neighbors do + for n = 1, #neighbors do local offset = neighbors[n] local expected_stem = connected_stem_names[n] local stempos = vector.add(blockpos, offset) local stem = minetest.get_node(stempos) if stem.name == expected_stem then - minetest.add_node(stempos, {name=full_unconnected_stem}) + minetest.add_node(stempos, { name = full_unconnected_stem }) try_connect_stem(stempos) end end @@ -253,7 +253,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s if not gourd_def.on_construct then function gourd_def.on_construct(blockpos) -- Connect all unconnected stems at full size - for n=1, #neighbors do + for n = 1, #neighbors do local stempos = vector.add(blockpos, neighbors[n]) try_connect_stem(stempos) end @@ -272,7 +272,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s stem_def.selection_box = { type = "fixed", fixed = { - {-0.15, -0.5, -0.15, 0.15, 0.5, 0.15} + { -0.15, -0.5, -0.15, 0.15, 0.5, 0.15 } }, } end @@ -292,7 +292,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s stem_def.drop = stem_drop end if stem_def.groups == nil then - stem_def.groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,} + stem_def.groups = { dig_immediate = 3, not_in_creative_inventory = 1, plant = 1, attached_node = 1, dig_by_water = 1, destroy_by_lava_flow = 1, } end if stem_def.sounds == nil then stem_def.sounds = mcl_sounds.node_sound_leaves_defaults() @@ -310,48 +310,48 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s local connected_stem_tiles = { { "blank.png", --top - "blank.png", -- bottom - "blank.png", -- right - "blank.png", -- left - connected_stem_texture, -- back - connected_stem_texture.."^[transformFX90" --front + "blank.png", -- bottom + "blank.png", -- right + "blank.png", -- left + connected_stem_texture, -- back + connected_stem_texture .. "^[transformFX90" --front }, { "blank.png", --top - "blank.png", -- bottom - "blank.png", -- right - "blank.png", -- left - connected_stem_texture.."^[transformFX90", --back - connected_stem_texture, -- front + "blank.png", -- bottom + "blank.png", -- right + "blank.png", -- left + connected_stem_texture .. "^[transformFX90", --back + connected_stem_texture, -- front }, { "blank.png", --top - "blank.png", -- bottom - connected_stem_texture.."^[transformFX90", -- right - connected_stem_texture, -- left - "blank.png", --back - "blank.png", -- front + "blank.png", -- bottom + connected_stem_texture .. "^[transformFX90", -- right + connected_stem_texture, -- left + "blank.png", --back + "blank.png", -- front }, { "blank.png", --top - "blank.png", -- bottom - connected_stem_texture, -- right - connected_stem_texture.."^[transformFX90", -- left - "blank.png", --back - "blank.png", -- front + "blank.png", -- bottom + connected_stem_texture, -- right + connected_stem_texture .. "^[transformFX90", -- left + "blank.png", --back + "blank.png", -- front } } local connected_stem_nodebox = { - {-0.5, -0.5, 0, 0.5, 0.5, 0}, - {-0.5, -0.5, 0, 0.5, 0.5, 0}, - {0, -0.5, -0.5, 0, 0.5, 0.5}, - {0, -0.5, -0.5, 0, 0.5, 0.5}, + { -0.5, -0.5, 0, 0.5, 0.5, 0 }, + { -0.5, -0.5, 0, 0.5, 0.5, 0 }, + { 0, -0.5, -0.5, 0, 0.5, 0.5 }, + { 0, -0.5, -0.5, 0, 0.5, 0.5 }, } local connected_stem_selectionbox = { - {-0.1, -0.5, -0.1, 0.5, 0.2, 0.1}, - {-0.5, -0.5, -0.1, 0.1, 0.2, 0.1}, - {-0.1, -0.5, -0.1, 0.1, 0.2, 0.5}, - {-0.1, -0.5, -0.5, 0.1, 0.2, 0.1}, + { -0.1, -0.5, -0.1, 0.5, 0.2, 0.1 }, + { -0.5, -0.5, -0.1, 0.1, 0.2, 0.1 }, + { -0.1, -0.5, -0.1, 0.1, 0.2, 0.5 }, + { -0.1, -0.5, -0.5, 0.1, 0.2, 0.1 }, } - for i=1, 4 do + for i = 1, 4 do minetest.register_node(connected_stem_names[i], { _doc_items_create_entry = false, paramtype = "light", @@ -369,7 +369,7 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s }, tiles = connected_stem_tiles[i], use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true, - groups = {dig_immediate=3, not_in_creative_inventory=1, plant=1,attached_node=1, dig_by_water=1,destroy_by_lava_flow=1,}, + groups = { dig_immediate = 3, not_in_creative_inventory = 1, plant = 1, attached_node = 1, dig_by_water = 1, destroy_by_lava_flow = 1, }, sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, }) @@ -380,9 +380,9 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s end minetest.register_abm({ - label = "Grow gourd stem to gourd ("..full_unconnected_stem.." → "..gourd_itemstring..")", - nodenames = {full_unconnected_stem}, - neighbors = {"air"}, + label = "Grow gourd stem to gourd (" .. full_unconnected_stem .. " → " .. gourd_itemstring .. ")", + nodenames = { full_unconnected_stem }, + neighbors = { "air" }, interval = grow_interval, chance = grow_chance, action = function(stempos) @@ -390,20 +390,20 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s if light and light > 10 then -- Check the four neighbors and filter out neighbors where gourds can't grow local neighbors = { - { x=-1, y=0, z=0 }, - { x=1, y=0, z=0 }, - { x=0, y=0, z=-1 }, - { x=0, y=0, z=1 }, + { x = -1, y = 0, z = 0 }, + { x = 1, y = 0, z = 0 }, + { x = 0, y = 0, z = -1 }, + { x = 0, y = 0, z = 1 }, } local floorpos, floor - for n=#neighbors, 1, -1 do + for n = #neighbors, 1, -1 do local offset = neighbors[n] local blockpos = vector.add(stempos, offset) - floorpos = { x=blockpos.x, y=blockpos.y-1, z=blockpos.z } + floorpos = vector.offset (blockpos, 0, -1,0) -- replaces { x = blockpos.x, y = blockpos.y - 1, z = blockpos.z } floor = minetest.get_node(floorpos) local block = minetest.get_node(blockpos) local soilgroup = minetest.get_item_group(floor.name, "soil") - if not ((minetest.get_item_group(floor.name, "grass_block") == 1 or floor.name=="mcl_core:dirt" or soilgroup == 2 or soilgroup == 3) and block.name == "air") then + if not ((minetest.get_item_group(floor.name, "grass_block") == 1 or floor.name == "mcl_core:dirt" or soilgroup == 2 or soilgroup == 3) and block.name == "air") then table.remove(neighbors, n) end end @@ -416,27 +416,35 @@ function mcl_farming:add_gourd(full_unconnected_stem, connected_stem_basename, s local blockpos = vector.add(stempos, offset) local p2 if offset.x == 1 then - minetest.set_node(stempos, {name=connected_stem_names[1]}) + minetest.set_node(stempos, { name = connected_stem_names[1] }) p2 = 3 elseif offset.x == -1 then - minetest.set_node(stempos, {name=connected_stem_names[2]}) + minetest.set_node(stempos, { name = connected_stem_names[2] }) p2 = 1 elseif offset.z == 1 then - minetest.set_node(stempos, {name=connected_stem_names[3]}) + minetest.set_node(stempos, { name = connected_stem_names[3] }) p2 = 2 elseif offset.z == -1 then - minetest.set_node(stempos, {name=connected_stem_names[4]}) + minetest.set_node(stempos, { name = connected_stem_names[4] }) p2 = 0 end -- Place the gourd if gourd_def.paramtype2 == "facedir" then - minetest.add_node(blockpos, {name=gourd_itemstring, param2=p2}) + minetest.add_node(blockpos, { name = gourd_itemstring, param2 = p2 }) else - minetest.add_node(blockpos, {name=gourd_itemstring}) + minetest.add_node(blockpos, { name = gourd_itemstring }) end + -- Reset farmland, etc. to dirt when the gourd grows on top + + -- FIXED: The following 2 lines were missing, and wasn't being set (outside of the above loop that + -- finds the neighbors.) + -- FYI - don't factor this out thinking that the loop above is setting the positions correctly. + floorpos = vector.offset (blockpos, 0, -1,0) -- replaces { x = blockpos.x, y = blockpos.y - 1, z = blockpos.z } + floor = minetest.get_node(floorpos) + -- END OF FIX ------------------------------------- if minetest.get_item_group(floor.name, "dirtifies_below_solid") == 1 then - minetest.set_node(floorpos, {name = "mcl_core:dirt"}) + minetest.set_node(floorpos, { name = "mcl_core:dirt" }) end end end @@ -452,7 +460,7 @@ end function mcl_farming:stem_color(startcolor, endcolor, step, step_count) local color = {} local function get_component(startt, endd, step, step_count) - return math.floor(math.max(0, math.min(255, (startt + (((step-1)/step_count) * endd))))) + return math.floor(math.max(0, math.min(255, (startt + (((step - 1) / step_count) * endd))))) end color.r = get_component(startcolor.r, endcolor.r, step, step_count) color.g = get_component(startcolor.g, endcolor.g, step, step_count) @@ -464,14 +472,14 @@ end minetest.register_lbm({ label = "Add growth for unloaded farming plants", name = "mcl_farming:growth", - nodenames = {"group:plant"}, + nodenames = { "group:plant" }, run_at_every_load = true, action = function(pos, node) local identifier = plant_nodename_to_id_list[node.name] if not identifier then return end - local low_speed = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name ~= "mcl_farming:soil_wet" + local low_speed = minetest.get_node({ x = pos.x, y = pos.y - 1, z = pos.z }).name ~= "mcl_farming:soil_wet" mcl_farming:grow_plant(identifier, pos, node, false, false, low_speed) end, }) diff --git a/mods/ITEMS/mcl_farming/sweet_berry.lua b/mods/ITEMS/mcl_farming/sweet_berry.lua index f87220d90c..aca5fadc20 100644 --- a/mods/ITEMS/mcl_farming/sweet_berry.lua +++ b/mods/ITEMS/mcl_farming/sweet_berry.lua @@ -35,6 +35,31 @@ for i=0, 3 do sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0, _mcl_hardness = 0, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + local pn = clicker:get_player_name() + if clicker:is_player() and minetest.is_protected(pos, pn) then + minetest.record_protection_violation(pos, pn) + return itemstack + end + if mcl_dye and clicker:get_wielded_item():get_name() == "mcl_bone_meal:bone_meal" then + mcl_dye.apply_bone_meal({under=pos},clicker) + itemstack:take_item() + return + end + local stage + if node.name:find("_2") then + stage = 2 + elseif node.name:find("_3") then + stage = 3 + end + if stage then + for i=1,math.random(stage) do + minetest.add_item(pos,"mcl_farming:sweet_berry") + end + minetest.swap_node(pos,{name = "mcl_farming:sweet_berry_bush_" .. stage - 1 }) + end + return itemstack + end, }) minetest.register_alias("mcl_sweet_berry:sweet_berry_bush_" .. i, node_name) end @@ -46,6 +71,11 @@ minetest.register_craftitem("mcl_farming:sweet_berry", { groups = { food = 2, eatable = 1, compostability=30 }, on_secondary_use = minetest.item_eat(1), on_place = function(itemstack, placer, pointed_thing) + local pn = placer:get_player_name() + if placer:is_player() and minetest.is_protected(pointed_thing.above, pn or "") then + minetest.record_protection_violation(pointed_thing.above, pn) + return itemstack + end if pointed_thing.type == "node" and table.indexof(planton,minetest.get_node(pointed_thing.under).name) ~= -1 and minetest.get_node(pointed_thing.above).name == "air" then minetest.set_node(pointed_thing.above,{name="mcl_farming:sweet_berry_bush_0"}) if not minetest.is_creative_enabled(placer:get_player_name()) then diff --git a/mods/ITEMS/mcl_farming/wheat.lua b/mods/ITEMS/mcl_farming/wheat.lua index a254ed36c6..44d82b5667 100644 --- a/mods/ITEMS/mcl_farming/wheat.lua +++ b/mods/ITEMS/mcl_farming/wheat.lua @@ -117,7 +117,7 @@ minetest.register_craft({ minetest.register_craft({ output = "mcl_farming:cookie 8", recipe = { - {"mcl_farming:wheat_item", "mcl_dye:brown", "mcl_farming:wheat_item"}, + {"mcl_farming:wheat_item", "mcl_cocoas:cocoa_beans", "mcl_farming:wheat_item"}, } }) diff --git a/mods/ITEMS/mcl_fences/locale/mcl_fences.ja.tr b/mods/ITEMS/mcl_fences/locale/mcl_fences.ja.tr new file mode 100644 index 0000000000..80eaadaa5f --- /dev/null +++ b/mods/ITEMS/mcl_fences/locale/mcl_fences.ja.tr @@ -0,0 +1,18 @@ +# textdomain: mcl_fences +Fences are structures which block the way. Fences will connect to each other and solid blocks. They cannot be jumped over with a simple jump.=フェンスは道を塞ぐ構造物です。他のフェンスや固体ブロックに隣接すると繋がります。単なるジャンプでは飛び越えられません。 +Fence gates can be opened or closed and can't be jumped over. Fences will connect nicely to fence gates.=フェンスゲートは開閉ができ、飛び越えることはできません。フェンスとフェンスゲートはキレイに繋がります。 +Right-click the fence gate to open or close it.=右クリックで、フェンスゲートを開閉できます。 +Oak Fence=オークのフェンス +Oak Fence Gate=オークのフェンスゲート +Spruce Fence=トウヒのフェンス +Spruce Fence Gate=トウヒのフェンスゲート +Birch Fence=シラカバのフェンス +Birch Fence Gate=シラカバのフェンスゲート +Jungle Fence=ジャングルのフェンス +Jungle Fence Gate=ジャングルのフェンスゲート +Dark Oak Fence=ダークオークのフェンス +Dark Oak Fence Gate=ダークオークのフェンスゲート +Acacia Fence=アカシアのフェンス +Acacia Fence Gate=アカシアのフェンスゲート +Nether Brick Fence=ネザーレンガのフェンス +Openable by players and redstone power=プレイヤーとレッドストーン動力によって開放可能 diff --git a/mods/ITEMS/mcl_fire/locale/mcl_fire.ja.tr b/mods/ITEMS/mcl_fire/locale/mcl_fire.ja.tr new file mode 100644 index 0000000000..5f8964b1b8 --- /dev/null +++ b/mods/ITEMS/mcl_fire/locale/mcl_fire.ja.tr @@ -0,0 +1,19 @@ +# textdomain: mcl_fire +Fire Charge=発火弾 +Fire charges are primarily projectiles which can be launched from dispensers, they will fly in a straight line and burst into a fire on impact. Alternatively, they can be used to ignite fires directly.=発火弾は、主に発射体としてディスペンサーから射出するもので、一直線に飛んでいき着弾した場所に火を着けます。あるいは、直接火を着けるのに使うこともできます。 +Put the fire charge into a dispenser and supply it with redstone power to launch it. To ignite a fire directly, simply place the fire charge on the ground, which uses it up.=発火弾をディスペンサーに入れ、レッドストーン動力を供給すると発射されます。直接火を着けるには、シンプルに発火弾を地面に置くだけです。なお、使い切りです。 +Flint and Steel=火打石と打ち金 +Flint and steel is a tool to start fires and ignite blocks.=火打石と打ち金は、火をおこしたり、ブロックに着火するための道具です。 +Rightclick the surface of a block to attempt to light a fire in front of it or ignite the block. A few blocks have an unique reaction when ignited.=ブロックの表面で右クリックすると、ブロックの前で火をつけたり、ブロックへの着火を試みます。いくつかのブロックは、着火すると独特の反応をします。 +Fire is a damaging and destructive but short-lived kind of block. It will destroy and spread towards near flammable blocks, but fire will disappear when there is nothing to burn left. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.=炎はダメージが大きく破壊力がありますが、寿命の短いブロックの一種です。近くの燃えやすいブロックを破壊しながら広がりますが、燃えるものがなくなると消えます。近くの水や雨でも消えます。炎はパンチで安全に破壊できますが、直接その中に立つと酷い目にあいます。ネザーラックやマグマブロックの上で火を起こすと、すぐに永続的な炎になります。 +Fire is a damaging but non-destructive short-lived kind of block. It will disappear when there is no flammable block around. Fire does not destroy blocks, at least not in this world. It will be extinguished by nearby water and rain. Fire can be destroyed safely by punching it, but it is hurtful if you stand directly in it. If a fire is started above netherrack or a magma block, it will immediately turn into an eternal fire.=炎は、ダメージを与えるが破壊されない短命のブロックの一種です。周りに可燃性ブロックがないと消えてしまいます。少なくともこの世界では、炎はブロックを破壊しません。近くの水や雨で消えます。炎はパンチで安全に破壊できますが、直接その中に立つと酷い目にあいます。ネザーラックやマグマブロックの上で火を起こすと、すぐに永続的な炎になります。 +Eternal fire is a damaging block that might create more fire. It will create fire around it when flammable blocks are nearby. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.=永続的な炎は、より多くの炎を生み出す可能性のあるダメージブロックです。可燃性ブロックが近くにあると、その周囲に炎が発生します。永続的な炎は、パンチや近くの水ブロックによって消せます。(通常の)炎以外の永続的な炎は、それ自体では消えず、雨の下でも燃え続けます。永続的な炎をパンチするのは安全ですが、中に立つと痛いです。 +Eternal fire is a damaging block. Eternal fire can be extinguished by punches and nearby water blocks. Other than (normal) fire, eternal fire does not get extinguished on its own and also continues to burn under rain. Punching eternal fire is safe, but it hurts if you stand inside.=永続的な炎はダメージを与えるブロックです。パンチや近くの水ブロックによって消せます。(通常の)炎以外の永続的な炎は、それ自体では消えず、雨の下でも燃え続けます。永続的な炎をパンチするのは安全ですが、中に立つと痛いです。 +@1 has been cooked crisp.=@1はカリッと焼けた。 +@1 felt the burn.=@1は火傷を感じた。 +@1 died in the flames.=@1は炎の中で死亡した。 +@1 died in a fire.=@1は火災で死亡した。 +Fire=炎 +Eternal Fire=永続的な炎 +Dispenser projectile=ディスペンサーの発射体 +Starts fires and ignites blocks=火起こしやブロックへの着火 diff --git a/mods/ITEMS/mcl_fireworks/locale/mcl_fireworks.ja.tr b/mods/ITEMS/mcl_fireworks/locale/mcl_fireworks.ja.tr new file mode 100644 index 0000000000..cd6da01c4c --- /dev/null +++ b/mods/ITEMS/mcl_fireworks/locale/mcl_fireworks.ja.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_fireworks +Firework Rocket=ロケット花火 +Flight Duration:=飛行時間: \ No newline at end of file diff --git a/mods/ITEMS/mcl_fishing/init.lua b/mods/ITEMS/mcl_fishing/init.lua index 546ad7eea6..b543b8d99d 100644 --- a/mods/ITEMS/mcl_fishing/init.lua +++ b/mods/ITEMS/mcl_fishing/init.lua @@ -89,7 +89,7 @@ local fish = function(itemstack, player, pointed_thing) { itemstring = "mcl_mobitems:string", weight = 5 }, { itemstring = "mcl_potions:water", weight = 10 }, { itemstring = "mcl_mobitems:bone", weight = 10 }, - { itemstring = "mcl_dye:black", weight = 1, amount_min = 10, amount_max = 10 }, + { itemstring = "mcl_mobitems:ink_sac", weight = 1, amount_min = 10, amount_max = 10 }, { itemstring = "mcl_mobitems:string", weight = 10 }, -- TODO: Tripwire Hook }, stacks_min = 1, diff --git a/mods/ITEMS/mcl_fishing/locale/mcl_fishing.ja.tr b/mods/ITEMS/mcl_fishing/locale/mcl_fishing.ja.tr new file mode 100644 index 0000000000..d68a8ab965 --- /dev/null +++ b/mods/ITEMS/mcl_fishing/locale/mcl_fishing.ja.tr @@ -0,0 +1,18 @@ +# textdomain: mcl_fishing +Fishing Rod=釣竿 +Fishing rods can be used to catch fish.=釣竿で魚が釣れます。 +Rightclick to launch the bobber. When it sinks right-click again to reel in an item. Who knows what you're going to catch?=右クリックで釣り糸を飛ばします。沈んだらまた右クリックで巻き上げ。何が釣れるかはお楽しみ。 +Raw Fish=生鱈 +Raw fish is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=生のタラは釣りで得られ、安全に食べられる食材です。調理することで栄養価がアップします。 +Cooked Fish=焼き鱈 +Mmh, fish! This is a healthy food item.=ん~、サカナ! これはヘルシーな食材ですね。 +Raw Salmon=生鮭 +Raw salmon is obtained by fishing and is a food item which can be eaten safely. Cooking it improves its nutritional value.=生のサケは釣りで得られ、安全に食べられる食材です。調理することで栄養価がアップします。 +Cooked Salmon=焼き鮭 +This is a healthy food item which can be eaten.=これは食べられるヘルシーな食材です。 +Clownfish=クマノミ +Clownfish may be obtained by fishing (and luck) and is a food item which can be eaten safely.=クマノミは釣り(と運)で手に入れることができ、安全に食べられる食材です。 +Pufferfish=フグ +Pufferfish are a common species of fish and can be obtained by fishing. They can technically be eaten, but they are very bad for humans. Eating a pufferfish only restores 1 hunger point and will poison you very badly (which drains your health non-fatally) and causes serious food poisoning (which increases your hunger).=フグは一般的な魚の一種で、釣りでゲットできます。技術的には食べることができますが、人間にとっては最悪のものです。フグを食べると空腹感が1ポイントしか回復せず、過酷な毒(死なない程度にヘルスを消耗)と、深刻な食中毒(空腹感の増加)を引き起こすことになります。 +Catches fish in water=水中の魚を捕獲 +Very poisonous=猛毒 diff --git a/mods/ITEMS/mcl_fletching_table/locale/mcl_fletching_table.ja.tr b/mods/ITEMS/mcl_fletching_table/locale/mcl_fletching_table.ja.tr new file mode 100644 index 0000000000..ecf8dd8d48 --- /dev/null +++ b/mods/ITEMS/mcl_fletching_table/locale/mcl_fletching_table.ja.tr @@ -0,0 +1,4 @@ +# textdomain: mcl_fletching_table +Fletching Table=矢細工台 +A fletching table=矢細工台 +This is the fletcher villager's work station. It currently has no use beyond decoration.=これは矢師の村人たちの職場です。現在、装飾以上の用途はありません。 \ No newline at end of file diff --git a/mods/ITEMS/mcl_flowerpots/locale/mcl_flowerpots.ja.tr b/mods/ITEMS/mcl_flowerpots/locale/mcl_flowerpots.ja.tr new file mode 100644 index 0000000000..8e8a71b027 --- /dev/null +++ b/mods/ITEMS/mcl_flowerpots/locale/mcl_flowerpots.ja.tr @@ -0,0 +1,26 @@ +# textdomain: mcl_flowerpots +Dandelion Flower Pot=鉢に植えたタンポポ +Poppy Flower Pot=鉢に植えたポピー +Blue Orchid Flower Pot=鉢に植えたヒスイラン +Allium Flower Pot=鉢に植えたアリウム +Azure Bluet Flower Pot=鉢に植えたヒナソウ +Red Tulip Flower Pot=鉢に植えた赤色のチューリップ +Pink Tulip Flower Pot=鉢に植えた桃色のチューリップ +White Tulip Flower Pot=鉢に植えた白色のチューリップ +Orange Tulip Flower Pot=鉢に植えた橙色のチューリップ +Oxeye Daisy Flower Pot=鉢に植えたフランスギク +Brown Mushroom Flower Pot=鉢に植えた茶色キノコ +Red Mushroom Flower Pot=鉢に植えた赤色キノコ +Oak Sapling Flower Pot=鉢に植えたオークの苗木 +Acacia Sapling Flower Pot=鉢に植えたアカシアの苗木 +Jungle Sapling Flower Pot=鉢に植えたジャングルの苗木 +Dark Oak Sapling Flower Pot=鉢に植えたダークオークの苗木 +Spruce Sapling Flower Pot=鉢に植えたマツの苗木 +Birch Sapling Flower Pot=鉢に植えたシラカバの苗木 +Dead Bush Flower Pot=鉢に植えた枯れ木 +Fern Flower Pot=鉢に植えたシダ +Cactus Flower Pot=鉢に植えたサボテン +Flower Pot=植木鉢 +Flower pots are decorative blocks in which flowers and other small plants can be placed.=植木鉢は、花や小さな植物を植えることができる装飾ブロックです。 +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.=植木鉢の上に植物を置くだけ。 植木鉢に置けるのは、小さな花(1ブロックより高くないもの)、苗木、シダ、枯れ木、キノコ、サボテンです。植木鉢を右クリックすると、その植物を取り出せます。 +Can hold a small flower or plant=小さな花や植物を保持可能 diff --git a/mods/ITEMS/mcl_flowers/locale/mcl_flowers.ja.tr b/mods/ITEMS/mcl_flowers/locale/mcl_flowers.ja.tr new file mode 100644 index 0000000000..60daf85b00 --- /dev/null +++ b/mods/ITEMS/mcl_flowers/locale/mcl_flowers.ja.tr @@ -0,0 +1,32 @@ +# textdomain: mcl_flowers +This is a small flower. Small flowers are mainly used for dye production and can also be potted.=これは小さな花です。小さな花は主に染料作りに使われ、鉢植えも可能です。 +It can only be placed on a block on which it would also survive.=生き残るブロックにのみ配置できます。 +Poppy=ポピー +Dandelion=タンポポ +Oxeye Daisy=フランスギク +Orange Tulip=橙色のチューリップ +Pink Tulip=桃色のチューリップ +Red Tulip=赤色のチューリップ +White Tulip=白色のチューリップ +Allium=アリウム +Azure Bluet=ヒナソウ +Blue Orchid=ヒスイラン +Tall Grass=丈が高い草 +Tall grass is a small plant which often occurs on the surface of grasslands. It can be harvested for wheat seeds. By using bone meal, tall grass can be turned into double tallgrass which is two blocks high.=丈が高い草は、草原の表面によく見られる小さな植物です。そこから小麦の種を収穫できることがあります。骨粉を使うことで、高さ2ブロックの、丈が倍高い草に変えられます。 +Fern=シダ +Ferns are small plants which occur naturally in jungles and taigas. They can be harvested for wheat seeds. By using bone meal, a fern can be turned into a large fern which is two blocks high.=シダは、ジャングルやタイガに自生する小さな植物です。そこから小麦の種を収穫できることがあります。骨粉を使うことで、高さ2ブロックの、大きなシダに変えられます。 +(Top Part)=(上部) +Peony=ボタン +A peony is a large plant which occupies two blocks. It is mainly used in dye production.=ボタンは、2つのブロックを占める大きな植物です。主に染料に使われます。 +Rose Bush=バラの低木 +A rose bush is a large plant which occupies two blocks. It is safe to touch it. Rose bushes are mainly used in dye production.=バラの低木は、2ブロック分を占める大きな植物です。触っても大丈夫です。バラの低木は主に染料に使われます。 +Lilac=ライラック +A lilac is a large plant which occupies two blocks. It is mainly used in dye production.=ライラックは、2つのブロックを占める大きな植物です。主に染料に使われます。 +Sunflower=ヒマワリ +A sunflower is a large plant which occupies two blocks. It is mainly used in dye production.=ヒマワリは、2つのブロックを占める大きな植物です。主に染料に使われます。 +Double tallgrass a variant of tall grass and occupies two blocks. It can be harvested for wheat seeds.=丈が倍高い草は、丈が高い草の変種であり、2ブロックを占有します。そこから小麦の種を収穫できることがあります。 +Large fern is a variant of fern and occupies two blocks. It can be harvested for wheat seeds.=大きなシダは、シダの変種であり、2ブロックを占有します。そこから小麦の種を収穫できることがあります。 +Double Tallgrass=丈が倍高い草 +Large Fern=大きなシダ +Lily Pad=スイレンの葉 +A lily pad is a flat plant block which can be walked on. They can be placed on water sources, ice and frosted ice.=スイレンの葉は、歩くことができるペラい植物ブロックです。水源や氷、フロストアイスの上に置けます。 diff --git a/mods/ITEMS/mcl_furnaces/locale/mcl_furnaces.ja.tr b/mods/ITEMS/mcl_furnaces/locale/mcl_furnaces.ja.tr new file mode 100644 index 0000000000..950419915c --- /dev/null +++ b/mods/ITEMS/mcl_furnaces/locale/mcl_furnaces.ja.tr @@ -0,0 +1,9 @@ +# textdomain: mcl_furnaces +Furnace=かまど +Furnaces cook or smelt several items, using a furnace fuel, into something else.=かまどは、燃料を使っていくつかのアイテムを調理または精錬し、別のものに作り変えます。 +Use the furnace to open the furnace menu. Place a furnace fuel in the lower slot and the source material in the upper slot. The furnace will slowly use its fuel to smelt the item. The result will be placed into the output slot at the right side.=かまどを使用して、かまどのメニューを開きます。下スロットに燃料を、上スロットに素材を入れます。かまどはゆっくりと燃料を使い、アイテムを精錬します。精錬の結果は右側の出力スロットに置かれます。 +Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn.=レシピ本を使って、何を製錬できるか、何を燃料にできるか、どれくらい燃えるかを確認しましょう。 +Burning Furnace=燻製器 燃焼中 +Recipe book=レシピ本 +Inventory=インベントリ +Uses fuel to smelt or cook items=燃料を使ってアイテムを精錬・調理 diff --git a/mods/ITEMS/mcl_grindstone/locale/mcl_grindstone.ja.tr b/mods/ITEMS/mcl_grindstone/locale/mcl_grindstone.ja.tr new file mode 100644 index 0000000000..c0bd0a4d43 --- /dev/null +++ b/mods/ITEMS/mcl_grindstone/locale/mcl_grindstone.ja.tr @@ -0,0 +1,11 @@ +# textdomain: mcl_grindstone +Inventory=インベントリ +Repair & Disenchant=修理とエンチャント解除 +Grindstone=砥石 +Used to disenchant/fix tools=道具のエンチャント解除/修復に使用 +Grindstone disenchants tools and armour except for curses, and repairs two items of the same type it is also the weapon smith's work station.=砥石は、ツールやアーマーからエンチャントを解除(呪い以外)したり、同種の2つのアイテムで修理したりできます。これは、武器鍛冶の職場でもあります。 +To use the grindstone, rightclick it, Two input slots (on the left) and a single output slot.=砥石を使うには、右クリックします。 入力スロットが2つ(左側)、出力スロットが1つです。 +To disenchant an item place enchanted item in one of the input slots and take the disenchanted item from the output.=エンチャントを解除するには、エンチャントされたアイテムを入力スロットの1つに置き、出力から解除されたアイテムを取り出します。 +To repair a tool you need a tool of the same type and material, put both items in the input slot and the output slot will combine two items durabilities with 5% bonus.=道具を修理するには、同種・同素材の道具が必要です。両方のアイテムを入力スロットに入れると、出力スロットは2つのアイテムの耐久値に5%のボーナスを加えて結合します。 +If both items have enchantments the player will get xp from both items from the disenchant.=両方のアイテムにエンチャントがかかっている場合、プレイヤーは両方からエンチャント解除による経験値を得られます。 +Curses cannot be removed and will be transfered to the new repaired item, if both items have a different curse the curses will be combined.=呪いは取り除くことができず、新しい修理品に引き継がれます。両方の修理品に異なる呪いがある場合、呪いは統合されます。 \ No newline at end of file diff --git a/mods/ITEMS/mcl_hamburger/init.lua b/mods/ITEMS/mcl_hamburger/init.lua new file mode 100644 index 0000000000..7d4707bdda --- /dev/null +++ b/mods/ITEMS/mcl_hamburger/init.lua @@ -0,0 +1,120 @@ +--- +--- Generated by EmmyLua(https://github.com/EmmyLua) +--- Created by michieal. +--- DateTime: 11/19/22 7:13 AM +--- + +--- +--- Generated by EmmyLua(https://github.com/EmmyLua) +--- Created by michieal. +--- DateTime: 10/23/22 4:50 AM +--- +-- LOCALIZATION + +local S = minetest.get_translator("mcl_hamburger") + +local modname = minetest.get_current_modname() +local modpath = minetest.get_modpath(modname) + +local table = table +local DEBUG = false + +local enable_burger = minetest.settings:get_bool("mcl_enable_hamburger",true) +local use_alt = minetest.settings:get_bool("mcl_hamburger_alt_texture",false) + +mcl_hamburger = {} + +if DEBUG then + minetest.log("MCL_Hamburger::START.") +end + +-- call to register your hamburger. +function mcl_hamburger.register_burger_craft(cooked_meat) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_hamburger:hamburger", + burntime = 2, + }) + + minetest.register_craft({ + output = "mcl_hamburger:hamburger", + recipe = { + { "mcl_farming:bread"}, + { cooked_meat }, -- "mcl_mobitems:cooked_beef" for a reg hamburger. Grind up clowns for a Big Mac. + { "mcl_farming:bread" }, + }, + }) + minetest.register_craft({ + output = "mcl_hamburger:hamburger", + recipe = { + -- "mcl_mobitems:cooked_beef" for a reg hamburger. Grind up clowns for a Big Mac. + { "mcl_farming:bread", cooked_meat, "mcl_farming:bread"}, + }, + }) + +end + +local hamburger_def = { + description = S("A Hamburger"), + _doc_items_longdesc = S("A tasty hamburger that is sure to lure villagers around like a lead. Can be eaten."), + _doc_items_usagehelp = S("Wield this item to pull villagers to you."), + _tt_help = S("A tasty hamburger that is sure to lure villagers. 'I'll gladly pay you Tuesday, for a hamburger today.' - Wimpy."), + inventory_image = "mcl_hamburger.png", + wield_image = "mcl_hamburger.png", + on_place = minetest.item_eat(8), + on_secondary_use = minetest.item_eat(8), + groups = { food = 2, eatable = 8 }, + _mcl_saturation = 13.8, +} + +if not enable_burger then + hamburger_def.groups.not_in_creative_inventory = 1 +end + +if use_alt == false then + minetest.register_craftitem("mcl_hamburger:hamburger", hamburger_def) +else + local hamburger_alt = table.copy(hamburger_def) + hamburger_alt.inventory_image = "mcl_hamburger_alt.png" + hamburger_alt.wield_image = "mcl_hamburger_alt.png" + minetest.register_craftitem("mcl_hamburger:hamburger", hamburger_alt) +end + +local function register_achievements() + + awards.register_achievement("mcl_hamburger:hamburger", { + title = S("Burger Time!"), + description = S("Craft a Hamburger."), + icon = "mcl_hamburger_alt.png", + trigger = { + type = "craft", + item = "mcl_hamburger:hamburger", + target = 1 + }, + type = "Advancement", + group = "Overworld", + }) + +end + +local function register_doc_entry() + + -- register Doc entry + if minetest.get_modpath("doc") then + doc.add_entry_alias("craftitems", "mcl_hamburger:hamburger", "craftitems", "mcl_hamburger:hamburger") + end + +end + +if enable_burger then + -- make the villagers follow the item + minetest.registered_entities["mobs_mc:villager"].nofollow = false + -- add it to the follow items. + table.insert(minetest.registered_entities["mobs_mc:villager"].follow,"mcl_hamburger:hamburger") + -- register the item and crafting recipe. + mcl_hamburger.register_burger_craft("mcl_mobitems:cooked_beef") + -- add in the super cool achievement(s)! + register_achievements() + register_doc_entry() +end + diff --git a/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.de.tr b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.de.tr new file mode 100644 index 0000000000..8d375dbd53 --- /dev/null +++ b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.de.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_hamburger +A Hamburger=Ein Hamburger + +A tasty hamburger that is sure to lure villagers around like a lead. Can be eaten.=Ein leckerer Hamburger, der die Dorfbewohner sicher wie eine Leine anlocken wird. Kann gegessen werden. + +A tasty hamburger that is sure to lure villagers. 'I'll gladly pay you Tuesday, for a hamburger today.' - Wimpy.=Ein leckerer Hamburger, der die Dorfbewohner anlocken wird. "Ich bezahle dir gerne den Dienstag, für heute einen Hamburger." - Wimpy. + +Burger Time!=Burgerzeit! +Craft a Hamburger.=Stelle einen Hamburger her. +Wield this item to pull villagers to you.=Benutze diesen Gegenstand, um Dorfbewohner zu dir zu ziehen. diff --git a/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.es.tr b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.es.tr new file mode 100644 index 0000000000..ad10560e4a --- /dev/null +++ b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.es.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_hamburger +A Hamburger=Una hamburguesa + +A tasty hamburger that is sure to lure villagers around like a lead. Can be eaten.=Una sabrosa hamburguesa que seguramente atraerá a los aldeanos como una pista. Se puede comer. + +A tasty hamburger that is sure to lure villagers. 'I'll gladly pay you Tuesday, for a hamburger today.' - Wimpy.=Una sabrosa hamburguesa que seguramente atraerá a los aldeanos. 'Con gusto te pago el martes, por una hamburguesa hoy.' - Wimpy. + +Burger Time!=¡Tiempo de hamburguesas! +Craft a Hamburger.=Elabora una hamburguesa. +Wield this item to pull villagers to you.=Utiliza este objeto para atraer a los aldeanos hacia ti. diff --git a/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.fr.tr b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.fr.tr new file mode 100644 index 0000000000..1463a69ad8 --- /dev/null +++ b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.fr.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_hamburger +A Hamburger=Un hamburger + +A tasty hamburger that is sure to lure villagers around like a lead. Can be eaten.=Un hamburger savoureux qui ne manquera pas d'attirer les villageois comme une piste. Peut être mangé. + +A tasty hamburger that is sure to lure villagers. 'I'll gladly pay you Tuesday, for a hamburger today.' - Wimpy.=Un hamburger savoureux qui ne manquera pas d'attirer les villageois. «Je vous paierai volontiers mardi, pour un hamburger aujourd'hui.» - Wimpy. + +Burger Time!=L'heure des burgers! +Craft a Hamburger.=Fabriquez un hamburger. +Wield this item to pull villagers to you.=Maniez cet objet pour attirer les villageois vers vous. \ No newline at end of file diff --git a/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.ja.tr b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.ja.tr new file mode 100644 index 0000000000..7cd12d7356 --- /dev/null +++ b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.ja.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_hamburger +A Hamburger=ハンバーガー + +A tasty hamburger that is sure to lure villagers around like a lead. Can be eaten.=リードでも付けたかのように村人を引き寄せる、美味しいハンバーガーです。食べられます。 + +A tasty hamburger that is sure to lure villagers. 'I'll gladly pay you Tuesday, for a hamburger today.' - Wimpy.=村人たちを魅了する美味しいハンバーガーです。「今日のハンバーガー代、喜んで払いますよ、火曜日に」。- へたれ(WIMPY)。 + +Burger Time!=バーガータイム! +Craft a Hamburger.=ハンバーガーをクラフトします。 +Wield this item to pull villagers to you.=このアイテムを手に持つと、村人を引き寄せられます。 diff --git a/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.pl.tr b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.pl.tr new file mode 100644 index 0000000000..09569a2ba0 --- /dev/null +++ b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.pl.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_hamburger +A Hamburger=Hamburger + +A tasty hamburger that is sure to lure villagers around like a lead. Can be eaten.=Smaczny hamburger, który zwabi wieśniaków jak trop. Można jeść. + +A tasty hamburger that is sure to lure villagers. 'I'll gladly pay you Tuesday, for a hamburger today.' - Wimpy.=Smaczny hamburger, który z pewnością zwabi wieśniaków. - Chętnie zapłacę we wtorek za hamburgera dzisiaj. - Mięczak (Wimpy). + +Burger Time!=Czas na burgery! +Craft a Hamburger.=Stwórz hamburgera. +Wield this item to pull villagers to you.=Chwyć ten przedmiot, aby przyciągnąć wieśniaków do siebie. diff --git a/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.ru.tr b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.ru.tr new file mode 100644 index 0000000000..736f182a54 --- /dev/null +++ b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.ru.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_hamburger +A Hamburger=Гамбургер + +A tasty hamburger that is sure to lure villagers around like a lead. Can be eaten.=Вкусный гамбургер, который обязательно привлечет жителей деревни, как наживку. Можно есть. + +A tasty hamburger that is sure to lure villagers. 'I'll gladly pay you Tuesday, for a hamburger today.' - Wimpy.=Вкусный гамбургер, который обязательно привлечет жителей деревни. — Я с радостью заплачу тебе во вторник за гамбургер сегодня. - Вимпи. + +Burger Time!=Время бургеров! +Craft a Hamburger.=Изготовить гамбургер. +Wield this item to pull villagers to you.=Используйте этот предмет, чтобы притягивать к себе жителей деревни. diff --git a/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.zh_TW.tr b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.zh_TW.tr new file mode 100644 index 0000000000..46f30c88ef --- /dev/null +++ b/mods/ITEMS/mcl_hamburger/locale/mcl_hamburger.zh_TW.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_hamburger +A Hamburger=一個漢堡 +A tasty hamburger that is sure to lure villagers around like a lead. Can be eaten.=一個美味的漢堡包,肯定會像鉛一樣吸引村民。 可以吃 +A tasty hamburger that is sure to lure villagers. 'I'll gladly pay you Tuesday, for a hamburger today.' - Wimpy.=一個美味的漢堡包,一定會吸引村民。 “我很樂意在星期二付錢給你,今天就買一個漢堡包。” - 懦弱。 +Burger Time!=漢堡時間! +Craft a Hamburger.=製作一個漢堡包。 +Wield this item to pull villagers to you.=使用此物品將村民拉到你身邊。 + + + + + + + + + diff --git a/mods/ITEMS/mcl_hamburger/locale/template.txt b/mods/ITEMS/mcl_hamburger/locale/template.txt new file mode 100644 index 0000000000..850ff62b03 --- /dev/null +++ b/mods/ITEMS/mcl_hamburger/locale/template.txt @@ -0,0 +1,10 @@ +# textdomain: mcl_hamburger +A Hamburger= + +A tasty hamburger that is sure to lure villagers around like a lead. Can be eaten.= + +A tasty hamburger that is sure to lure villagers. 'I'll gladly pay you Tuesday, for a hamburger today.' - Wimpy.= + +Burger Time!= +Craft a Hamburger.= +Wield this item to pull villagers to you.= diff --git a/mods/ITEMS/mcl_hamburger/mod.conf b/mods/ITEMS/mcl_hamburger/mod.conf new file mode 100644 index 0000000000..f5baca5066 --- /dev/null +++ b/mods/ITEMS/mcl_hamburger/mod.conf @@ -0,0 +1,5 @@ +name = mcl_hamburger +author = Michieal +description = A cute (and easy to use) replacement for not having leashes in MC2 +depends = mcl_core, mcl_sounds, mobs_mc, mcl_mobitems, awards +optional_depends = doc diff --git a/mods/ITEMS/mcl_hamburger/readme.txt b/mods/ITEMS/mcl_hamburger/readme.txt new file mode 100644 index 0000000000..e479c01b9f --- /dev/null +++ b/mods/ITEMS/mcl_hamburger/readme.txt @@ -0,0 +1,43 @@ +Tags: Hamburger +Icon set: Fugue 16px Additional Icons +Author: Yusuke Kamiyamane +License: CC Attribution 3.0 Unported +Readme file +Commercial usage: Allowed +Posted: November 22, 2011 +Icon Readme file: + +Fugue Icons + +(C) 2011 Yusuke Kamiyamane. All rights reserved. +These icons are licensed under a Creative Commons +Attribution 3.0 License. + + +If you can't or don't want to provide attribution, please +purchase a royalty-free license. + + +I'm unavailable for custom icon design work. But your +suggestions are always welcome! + + +------------------------------------------------------------ + +The images contained within have been altered to be more legible within the game and not rendered with weird +antialiasing by Michieal. All extraneous information in the images have been removed to decrease file size. + +This mod is licensed under CC-BY-SA 3, with the intent of it being used by the Mineclone 2 game for Minetest. +This code was written by Michieal, with additions included by Cora. + +The achievement "Burger Time!" is an homage to the classic coin-op arcade game BurgerTime, by Data East (1982) and +Bally Midway. + +Information about the BurgerTime Arcade Game: + +From https://thepinballgameroom.com/product/burgertime-arcade-machine/ on the original game: +BurgerTime Arcade Machine, originally released as Hamburger in Japan, is a 1982 arcade game developed by Data East +initially for its DECO Cassette System. In the United States, Data East USA licensed BurgerTime Arcade Machine for +distribution by Bally Midway as a standard dedicated arcade game. Data East also released its own version of BurgerTime +in the United States through its DECO Cassette System. The Data East and Midway versions are distinguished by the +manufacturer’s name on the title screen and by the marquee and cabinet artworks, as the game itself is identical. diff --git a/mods/ITEMS/mcl_hamburger/textures/mcl_hamburger.png b/mods/ITEMS/mcl_hamburger/textures/mcl_hamburger.png new file mode 100644 index 0000000000..432d05bba2 Binary files /dev/null and b/mods/ITEMS/mcl_hamburger/textures/mcl_hamburger.png differ diff --git a/mods/ITEMS/mcl_hamburger/textures/mcl_hamburger_alt.png b/mods/ITEMS/mcl_hamburger/textures/mcl_hamburger_alt.png new file mode 100644 index 0000000000..70fd29448d Binary files /dev/null and b/mods/ITEMS/mcl_hamburger/textures/mcl_hamburger_alt.png differ diff --git a/mods/ITEMS/mcl_heads/locale/mcl_heads.ja.tr b/mods/ITEMS/mcl_heads/locale/mcl_heads.ja.tr new file mode 100644 index 0000000000..b3ced046c7 --- /dev/null +++ b/mods/ITEMS/mcl_heads/locale/mcl_heads.ja.tr @@ -0,0 +1,11 @@ +# textdomain: mcl_heads +Zombie Head=ゾンビヘッド +A zombie head is a small decorative block which resembles the head of a zombie. It can also be worn as a helmet, which reduces the detection range of zombies by 50%.=ゾンビヘッドは、ゾンビの頭を模した小さな装飾ブロックです。ヘルメットとして着用することもでき、ゾンビの探知範囲を50%狭めることができます。 +Creeper Head=クリーパーヘッド +A creeper head is a small decorative block which resembles the head of a creeper. It can also be worn as a helmet, which reduces the detection range of creepers by 50%.=クリーパーヘッドは、クリーパーの頭を模した小さな装飾ブロックです。ヘルメットとして着用することもでき、ゾンビの探知範囲を50%狭めることができます。 +Human Head=人の頭 +A human head is a small decorative block which resembles the head of a human (i.e. a player character). It can also be worn as a helmet for fun, but does not offer any protection.=人の頭は、人間(=プレイヤーキャラ)の頭部を模した小さな装飾ブロックです。遊びでヘルメットとして装着することもできますが、保護機能はありません。 +Skeleton Skull=スケルトンスカル +A skeleton skull is a small decorative block which resembles the skull of a skeleton. It can also be worn as a helmet, which reduces the detection range of skeletons by 50%.=スケルトンスカルは、スケルトンの頭蓋骨を模した小さな装飾ブロックです。ヘルメットとして着用することもでき、ゾンビの探知範囲を50%狭めることができます。 +Wither Skeleton Skull=ウィザースケルトンスカル +A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton. It can also be worn as a helmet for fun, but does not offer any protection.=ウィザースケルトンスカルは、ウィザースケルトンの頭蓋骨を模した小さな装飾ブロックです。ヘルメットとして楽しむこともできますが、保護機能はありません。 diff --git a/mods/ITEMS/mcl_honey/init.lua b/mods/ITEMS/mcl_honey/init.lua new file mode 100644 index 0000000000..82e3d09954 --- /dev/null +++ b/mods/ITEMS/mcl_honey/init.lua @@ -0,0 +1,147 @@ +--------------- +---- Honey ---- +--------------- + +-- Variables +local S = minetest.get_translator(minetest.get_current_modname()) +local alldirs = {{x=0,y=0,z=1}, {x=1,y=0,z=0}, {x=0,y=0,z=-1}, {x=-1,y=0,z=0}, {x=0,y=-1,z=0}, {x=0,y=1,z=0}} + +-- Honeycomb +minetest.register_craftitem("mcl_honey:honeycomb", { + description = S("Honeycomb"), + _doc_items_longdesc = S("Used to craft beehives and protect copper blocks from further oxidation."), + _doc_items_usagehelp = S("Use on copper blocks to prevent further oxidation."), + inventory_image = "mcl_honey_honeycomb.png", + groups = { craftitem = 1 }, +}) + +minetest.register_node("mcl_honey:honeycomb_block", { + description = S("Honeycomb Block"), + _doc_items_longdesc = S("Honeycomb Block. Used as a decoration."), + tiles = { + "mcl_honey_honeycomb_block.png" + }, + groups = { handy = 1, deco_block = 1 }, + sounds = { + dig = {name="slimenodes_dug", gain=0.6, pitch=1.2}, + dug = {name="slimenodes_dug", gain=0.6}, + place = {name="slimenodes_place", gain=0.6}, + footstep = {name="slimenodes_step", gain=0.3}, + }, + _mcl_blast_resistance = 0.6, + _mcl_hardness = 0.6, +}) + +-- Honey +minetest.register_craftitem("mcl_honey:honey_bottle", { + description = S("Honey Bottle"), + _doc_items_longdesc = S("Honey Bottle is used to craft honey blocks and to restore hunger points."), + _doc_items_usagehelp = S("Drinking will restore 6 hunger points. Can also be used to craft honey blocks."), + inventory_image = "mcl_honey_honey_bottle.png", + groups = { craftitem = 1, food = 3, eatable = 6, can_eat_when_full=1 }, + on_place = minetest.item_eat(6, "mcl_potions:glass_bottle"), + on_secondary_use = minetest.item_eat(6, "mcl_potions:glass_bottle"), + _mcl_saturation = 1.2, + stack_max = 16, +}) + +minetest.register_node("mcl_honey:honey_block", { + description = S("Honey Block"), + _doc_items_longdesc = S("Honey Block. Used as a decoration and in redstone. Is sticky on some sides."), + tiles = {"mcl_honey_block_side.png"}, + use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "blend" or true, + groups = { handy = 1, deco_block = 1, fall_damage_add_percent = -80 }, + sounds = { + dug = {name="slimenodes_dug", gain=0.6}, + place = {name="slimenodes_place", gain=0.6}, + footstep = {name="slimenodes_step", gain=0.3}, + }, + paramtype = "light", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.4, -0.4, -0.4, 0.4, 0.4, 0.4}, + {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, + } + }, + selection_box = { + type = "regular", + }, + _mcl_blast_resistance = 0, + _mcl_hardness = 0, + mvps_sticky = function(pos, node, piston_pos) + local connected = {} + for n, v in ipairs(alldirs) do + local neighbor_pos = vector.add(pos, v) + local neighbor_node = minetest.get_node(neighbor_pos) + if neighbor_node then + if neighbor_node.name == "ignore" then + minetest.get_voxel_manip():read_from_map(neighbor_pos, neighbor_pos) + neighbor_node = minetest.get_node(neighbor_pos) + end + local name = neighbor_node.name + if name ~= "air" and name ~= "ignore" and not mesecon.mvps_unsticky[name] then + local piston, piston_side, piston_up, piston_down = false, false, false, false + if name == "mesecons_pistons:piston_sticky_off" or name == "mesecons_pistons:piston_normal_off" then + piston, piston_side = true, true + elseif name == "mesecons_pistons:piston_up_sticky_off" or name == "mesecons_pistons:piston_up_normal_off" then + piston, piston_up = true, true + elseif name == "mesecons_pistons:piston_down_sticky_off" or name == "mesecons_pistons:piston_down_normal_off" then + piston, piston_down = true, true + end + if not( (piston_side and (n-1==neighbor_node.param2)) or (piston_up and (n==5)) or (piston_down and (n==6)) ) then + if piston and piston_pos then + if piston_pos.x == neighbor_pos.x and piston_pos.y == neighbor_pos.y and piston_pos.z == neighbor_pos.z then + -- Loopback to the same piston! Preventing unwanted behavior: + return {}, true + end + end + table.insert(connected, neighbor_pos) + end + end + end + end + return connected, false + end, +}) + +-- Crafting +minetest.register_craft({ + output = "mcl_honey:honeycomb_block", + recipe = { + { "mcl_honey:honeycomb", "mcl_honey:honeycomb" }, + { "mcl_honey:honeycomb", "mcl_honey:honeycomb" }, + }, +}) + +minetest.register_craft({ + output = "mcl_honey:honey_block", + recipe = { + { "mcl_honey:honey_bottle", "mcl_honey:honey_bottle" }, + { "mcl_honey:honey_bottle", "mcl_honey:honey_bottle" }, + }, + replacements = { + { "mcl_honey:honey_bottle", "mcl_potions:glass_bottle" }, + { "mcl_honey:honey_bottle", "mcl_potions:glass_bottle" }, + { "mcl_honey:honey_bottle", "mcl_potions:glass_bottle" }, + { "mcl_honey:honey_bottle", "mcl_potions:glass_bottle" }, + }, +}) + +minetest.register_craft({ + output = "mcl_honey:honey_bottle 4", + recipe = { + { "mcl_potions:glass_bottle", "mcl_potions:glass_bottle", "mcl_honey:honey_block" }, + { "mcl_potions:glass_bottle", "mcl_potions:glass_bottle", "" }, + }, +}) + +minetest.register_craft({ + type = "shapeless", + output = "mcl_core:sugar 3", + recipe = { "mcl_honey:honey_bottle" }, + replacements = { + { "mcl_honey:honey_bottle", "mcl_potions:glass_bottle" }, + }, +}) diff --git a/mods/ITEMS/mcl_honey/locale/mcl_honey.ja.tr b/mods/ITEMS/mcl_honey/locale/mcl_honey.ja.tr new file mode 100644 index 0000000000..4cb018f84f --- /dev/null +++ b/mods/ITEMS/mcl_honey/locale/mcl_honey.ja.tr @@ -0,0 +1,10 @@ +Honeycomb=ハニカム +Used to craft beehives and protect copper blocks from further oxidation.=ハチの巣を作ったり、銅ブロックがこれ以上酸化しないように保護するために使われます。 +Use on copper blocks to prevent further oxidation.=銅ブロックに使用すると、これ以上の酸化を防げます。 +Honeycomb Block=ハニカムブロック +Honeycomb Block. Used as a decoration.=ハニカムブロック。装飾用です。 +Honey Bottle=ハチミツ入り瓶 +Honey Bottle is used to craft honey blocks and to restore hunger points.=ハチミツ入り瓶は、ハチミツブロックの製造や満腹度回復に使用します。 +Drinking will restore 6 hunger points. Can also be used to craft honey blocks.=飲むと満腹度が6回復します。また、ハチミツブロックを作るのにも使えます。 +Honey Block=ハチミツブロック +Honey Block. Used as a decoration and in redstone. Is sticky on some sides.=ハチミツブロック。装飾品として、またはレッドストーン機構の部品として利用します。側面には粘着性があります。 \ No newline at end of file diff --git a/mods/ITEMS/mcl_honey/locale/template.txt b/mods/ITEMS/mcl_honey/locale/template.txt new file mode 100644 index 0000000000..a9814d6175 --- /dev/null +++ b/mods/ITEMS/mcl_honey/locale/template.txt @@ -0,0 +1,10 @@ +Honeycomb= +Used to craft beehives and protect copper blocks from further oxidation.= +Use on copper blocks to prevent further oxidation.= +Honeycomb Block= +Honeycomb Block. Used as a decoration.= +Honey Bottle= +Honey Bottle is used to craft honey blocks and to restore hunger points.= +Drinking will restore 6 hunger points. Can also be used to craft honey blocks.= +Honey Block= +Honey Block. Used as a decoration and in redstone. Is sticky on some sides.= \ No newline at end of file diff --git a/mods/ITEMS/mcl_honey/mod.conf b/mods/ITEMS/mcl_honey/mod.conf new file mode 100644 index 0000000000..4368112911 --- /dev/null +++ b/mods/ITEMS/mcl_honey/mod.conf @@ -0,0 +1,4 @@ +name = mcl_honey +author = PrairieWind +description = MineClone 2 mod that adds honey and honeycomb and the respective block versions. +depends = mesecons_mvps diff --git a/mods/ITEMS/mcl_honey/textures/mcl_honey_block_bottom.png b/mods/ITEMS/mcl_honey/textures/mcl_honey_block_bottom.png new file mode 100644 index 0000000000..9de9652844 Binary files /dev/null and b/mods/ITEMS/mcl_honey/textures/mcl_honey_block_bottom.png differ diff --git a/mods/ITEMS/mcl_honey/textures/mcl_honey_block_side.png b/mods/ITEMS/mcl_honey/textures/mcl_honey_block_side.png new file mode 100644 index 0000000000..4cdecfb037 Binary files /dev/null and b/mods/ITEMS/mcl_honey/textures/mcl_honey_block_side.png differ diff --git a/mods/ITEMS/mcl_honey/textures/mcl_honey_block_top.png b/mods/ITEMS/mcl_honey/textures/mcl_honey_block_top.png new file mode 100644 index 0000000000..c2f3304408 Binary files /dev/null and b/mods/ITEMS/mcl_honey/textures/mcl_honey_block_top.png differ diff --git a/mods/ITEMS/mcl_honey/textures/mcl_honey_honey_bottle.png b/mods/ITEMS/mcl_honey/textures/mcl_honey_honey_bottle.png new file mode 100644 index 0000000000..16956f56e6 Binary files /dev/null and b/mods/ITEMS/mcl_honey/textures/mcl_honey_honey_bottle.png differ diff --git a/mods/ITEMS/mcl_honey/textures/mcl_honey_honeycomb.png b/mods/ITEMS/mcl_honey/textures/mcl_honey_honeycomb.png new file mode 100644 index 0000000000..a590d517a9 Binary files /dev/null and b/mods/ITEMS/mcl_honey/textures/mcl_honey_honeycomb.png differ diff --git a/mods/ITEMS/mcl_honey/textures/mcl_honey_honeycomb_block.png b/mods/ITEMS/mcl_honey/textures/mcl_honey_honeycomb_block.png new file mode 100644 index 0000000000..42c4ce85e2 Binary files /dev/null and b/mods/ITEMS/mcl_honey/textures/mcl_honey_honeycomb_block.png differ diff --git a/mods/ITEMS/mcl_hoppers/init.lua b/mods/ITEMS/mcl_hoppers/init.lua index 1e53aa1bf0..258767aad6 100644 --- a/mods/ITEMS/mcl_hoppers/init.lua +++ b/mods/ITEMS/mcl_hoppers/init.lua @@ -1,30 +1,48 @@ local S = minetest.get_translator(minetest.get_current_modname()) +local F = minetest.formspec_escape +local C = minetest.colorize + +local LOGGING_ON = minetest.settings:get_bool("mcl_logging_hoppers", false) +local function mcl_log(message) + if LOGGING_ON then + mcl_util.mcl_log(message, "[Hoppers]", true) + end +end --[[ BEGIN OF NODE DEFINITIONS ]] -local mcl_hoppers_formspec = - "size[9,7]".. - "label[2,0;"..minetest.formspec_escape(minetest.colorize("#313131", S("Hopper"))).."]".. - "list[context;main;2,0.5;5,1;]".. - mcl_formspec.get_itemslot_bg(2,0.5,5,1).. - "label[0,2;"..minetest.formspec_escape(minetest.colorize("#313131", S("Inventory"))).."]".. - "list[current_player;main;0,2.5;9,3;9]".. - mcl_formspec.get_itemslot_bg(0,2.5,9,3).. - "list[current_player;main;0,5.74;9,1;]".. - mcl_formspec.get_itemslot_bg(0,5.74,9,1).. - "listring[context;main]".. - "listring[current_player;main]" +local mcl_hoppers_formspec = table.concat({ + "size[9,7]", + "label[2,0;" .. F(C("#313131", S("Hopper"))) .. "]", + "list[context;main;2,0.5;5,1;]", + mcl_formspec.get_itemslot_bg(2, 0.5, 5, 1), + "label[0,2;" .. F(C("#313131", S("Inventory"))) .. "]", + "list[current_player;main;0,2.5;9,3;9]", + mcl_formspec.get_itemslot_bg(0, 2.5, 9, 3), + "list[current_player;main;0,5.74;9,1;]", + mcl_formspec.get_itemslot_bg(0, 5.74, 9, 1), + "listring[context;main]", + "listring[current_player;main]", +}) -- Downwards hopper (base definition) +---@type node_definition local def_hopper = { inventory_image = "mcl_hoppers_item.png", wield_image = "mcl_hoppers_item.png", - groups = {pickaxey=1, container=2,deco_block=1,hopper=1}, + groups = {pickaxey = 1, container = 2, deco_block = 1, hopper = 1}, drawtype = "nodebox", paramtype = "light", -- FIXME: mcl_hoppers_hopper_inside.png is unused by hoppers. - tiles = {"mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png"}, + tiles = { + "mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", + "mcl_hoppers_hopper_outside.png", + "mcl_hoppers_hopper_outside.png", + "mcl_hoppers_hopper_outside.png", + "mcl_hoppers_hopper_outside.png", + "mcl_hoppers_hopper_outside.png", + }, node_box = { type = "fixed", fixed = { @@ -64,10 +82,10 @@ local def_hopper = { local meta2 = meta:to_table() meta:from_table(oldmetadata) local inv = meta:get_inventory() - for i=1,inv:get_size("main") do + for i = 1, inv:get_size("main") do local stack = inv:get_stack("main", i) if not stack:is_empty() then - local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5} + local p = vector.offset(pos, math.random(0, 10) / 10 - 0.5, 0, math.random(0, 10) / 10 - 0.5) minetest.add_item(p, stack) end end @@ -101,16 +119,16 @@ local def_hopper = { end end, on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - minetest.log("action", player:get_player_name().. - " moves stuff in mcl_hoppers at "..minetest.pos_to_string(pos)) + minetest.log("action", player:get_player_name() .. + " moves stuff in mcl_hoppers at " .. minetest.pos_to_string(pos)) end, on_metadata_inventory_put = function(pos, listname, index, stack, player) - minetest.log("action", player:get_player_name().. - " moves stuff to mcl_hoppers at "..minetest.pos_to_string(pos)) + minetest.log("action", player:get_player_name() .. + " moves stuff to mcl_hoppers at " .. minetest.pos_to_string(pos)) end, on_metadata_inventory_take = function(pos, listname, index, stack, player) - minetest.log("action", player:get_player_name().. - " takes stuff from mcl_hoppers at "..minetest.pos_to_string(pos)) + minetest.log("action", player:get_player_name() .. + " takes stuff from mcl_hoppers at " .. minetest.pos_to_string(pos)) end, sounds = mcl_sounds.node_sound_metal_defaults(), @@ -124,18 +142,22 @@ local def_hopper = { -- Enabled downwards hopper local def_hopper_enabled = table.copy(def_hopper) def_hopper_enabled.description = S("Hopper") -def_hopper_enabled._tt_help = S("5 inventory slots").."\n"..S("Collects items from above, moves items to container below").."\n"..S("Can be disabled with redstone power") -def_hopper_enabled._doc_items_longdesc = S("Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempt to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers.").."\n\n".. +def_hopper_enabled._tt_help = S("5 inventory slots") .. + "\n" .. S("Collects items from above, moves items to container below") .. "\n" .. + S("Can be disabled with redstone power") +def_hopper_enabled._doc_items_longdesc = S("Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempt to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers.") + .. "\n\n" .. -S("Hoppers interact with containers the following way:").."\n".. -S("• Furnaces: Hoppers from above will put items into the source slot. Hoppers from below take items from the output slot. They also take items from the fuel slot when they can't be used as a fuel. Sideway hoppers that point to the furnace put items into the fuel slot").."\n".. -S("• Ender chests: No interaction.").."\n".. -S("• Other containers: Normal interaction.").."\n\n".. + S("Hoppers interact with containers the following way:") .. "\n" .. + S("• Furnaces: Hoppers from above will put items into the source slot. Hoppers from below take items from the output slot. They also take items from the fuel slot when they can't be used as a fuel. Sideway hoppers that point to the furnace put items into the fuel slot") + .. "\n" .. + S("• Ender chests: No interaction.") .. "\n" .. + S("• Other containers: Normal interaction.") .. "\n\n" .. -S("Hoppers can be disabled when supplied with redstone power. Disabled hoppers don't move items.") + S("Hoppers can be disabled when supplied with redstone power. Disabled hoppers don't move items.") def_hopper_enabled._doc_items_usagehelp = S("To place a hopper vertically, place it on the floor or a ceiling. To place it sideways, place it at the side of a block. Use the hopper to access its inventory.") def_hopper_enabled.on_place = function(itemstack, placer, pointed_thing) - local upos = pointed_thing.under + local upos = pointed_thing.under local apos = pointed_thing.above local uposnode = minetest.get_node(upos) @@ -166,21 +188,22 @@ def_hopper_enabled.on_place = function(itemstack, placer, pointed_thing) fake_itemstack:set_name("mcl_hoppers:hopper_side") param2 = 1 end - local itemstack,_ = minetest.item_place_node(fake_itemstack, placer, pointed_thing, param2) + local itemstack, _ = minetest.item_place_node(fake_itemstack, placer, pointed_thing, param2) itemstack:set_name("mcl_hoppers:hopper") return itemstack end def_hopper_enabled.mesecons = { effector = { action_on = function(pos, node) - minetest.swap_node(pos, {name="mcl_hoppers:hopper_disabled", param2=node.param2}) + minetest.swap_node(pos, {name = "mcl_hoppers:hopper_disabled", param2 = node.param2}) end, }, } minetest.register_node("mcl_hoppers:hopper", def_hopper_enabled) --- Disabled downwards hopper +---Disabled downwards hopper +---@type node_definition local def_hopper_disabled = table.copy(def_hopper) def_hopper_disabled.description = S("Disabled Hopper") def_hopper_disabled.inventory_image = nil @@ -190,7 +213,7 @@ def_hopper_disabled.drop = "mcl_hoppers:hopper" def_hopper_disabled.mesecons = { effector = { action_off = function(pos, node) - minetest.swap_node(pos, {name="mcl_hoppers:hopper", param2=node.param2}) + minetest.swap_node(pos, {name = "mcl_hoppers:hopper", param2 = node.param2}) end, }, } @@ -204,15 +227,23 @@ if minetest.get_modpath("screwdriver") then on_rotate = screwdriver.rotate_simple end --- Sidewars hopper (base definition) +---Sidewars hopper (base definition) +---@type node_definition local def_hopper_side = { _doc_items_create_entry = false, drop = "mcl_hoppers:hopper", - groups = {pickaxey=1, container=2,not_in_creative_inventory=1,hopper=2}, + groups = {pickaxey = 1, container = 2, not_in_creative_inventory = 1, hopper = 2}, drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", - tiles = {"mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png", "mcl_hoppers_hopper_outside.png"}, + tiles = { + "mcl_hoppers_hopper_inside.png^mcl_hoppers_hopper_top.png", + "mcl_hoppers_hopper_outside.png", + "mcl_hoppers_hopper_outside.png", + "mcl_hoppers_hopper_outside.png", + "mcl_hoppers_hopper_outside.png", + "mcl_hoppers_hopper_outside.png", + }, node_box = { type = "fixed", fixed = { @@ -252,10 +283,10 @@ local def_hopper_side = { local meta2 = meta meta:from_table(oldmetadata) local inv = meta:get_inventory() - for i=1,inv:get_size("main") do + for i = 1, inv:get_size("main") do local stack = inv:get_stack("main", i) if not stack:is_empty() then - local p = {x=pos.x+math.random(0, 10)/10-0.5, y=pos.y, z=pos.z+math.random(0, 10)/10-0.5} + local p = vector.offset(pos, math.random(0, 10) / 10 - 0.5, 0, math.random(0, 10) / 10 - 0.5) minetest.add_item(p, stack) end end @@ -289,16 +320,16 @@ local def_hopper_side = { end end, on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) - minetest.log("action", player:get_player_name().. - " moves stuff in mcl_hoppers at "..minetest.pos_to_string(pos)) + minetest.log("action", player:get_player_name() .. + " moves stuff in mcl_hoppers at " .. minetest.pos_to_string(pos)) end, on_metadata_inventory_put = function(pos, listname, index, stack, player) - minetest.log("action", player:get_player_name().. - " moves stuff to mcl_hoppers at "..minetest.pos_to_string(pos)) + minetest.log("action", player:get_player_name() .. + " moves stuff to mcl_hoppers at " .. minetest.pos_to_string(pos)) end, on_metadata_inventory_take = function(pos, listname, index, stack, player) - minetest.log("action", player:get_player_name().. - " takes stuff from mcl_hoppers at "..minetest.pos_to_string(pos)) + minetest.log("action", player:get_player_name() .. + " takes stuff from mcl_hoppers at " .. minetest.pos_to_string(pos)) end, on_rotate = on_rotate, sounds = mcl_sounds.node_sound_metal_defaults(), @@ -307,23 +338,25 @@ local def_hopper_side = { _mcl_hardness = 3, } +---@type node_definition local def_hopper_side_enabled = table.copy(def_hopper_side) def_hopper_side_enabled.description = S("Side Hopper") def_hopper_side_enabled.mesecons = { effector = { action_on = function(pos, node) - minetest.swap_node(pos, {name="mcl_hoppers:hopper_side_disabled", param2=node.param2}) + minetest.swap_node(pos, {name = "mcl_hoppers:hopper_side_disabled", param2 = node.param2}) end, }, } minetest.register_node("mcl_hoppers:hopper_side", def_hopper_side_enabled) +---@type node_definition local def_hopper_side_disabled = table.copy(def_hopper_side) def_hopper_side_disabled.description = S("Disabled Side Hopper") def_hopper_side_disabled.mesecons = { effector = { action_off = function(pos, node) - minetest.swap_node(pos, {name="mcl_hoppers:hopper_side", param2=node.param2}) + minetest.swap_node(pos, {name = "mcl_hoppers:hopper_side", param2 = node.param2}) end, }, } @@ -331,16 +364,102 @@ minetest.register_node("mcl_hoppers:hopper_side_disabled", def_hopper_side_disab --[[ END OF NODE DEFINITIONS ]] +local function hopper_pull_from_mc(mc_ent, dest_pos, inv_size) + local inv = mcl_entity_invs.load_inv(mc_ent, inv_size) + if not inv then + mcl_log("No inv") + return false + end + + local dest_meta = minetest.get_meta(dest_pos) + local dest_inv = dest_meta:get_inventory() + if not dest_inv then + mcl_log("No dest inv") + return + end + + mcl_log("inv. size: " .. mc_ent._inv_size) + for i = 1, mc_ent._inv_size, 1 do + local stack = inv:get_stack("main", i) + + mcl_log("i: " .. tostring(i)) + mcl_log("Name: [" .. tostring(stack:get_name()) .. "]") + mcl_log("Count: " .. tostring(stack:get_count())) + mcl_log("stack max: " .. tostring(stack:get_stack_max())) + + if not stack:get_name() or stack:get_name() ~= "" then + if dest_inv:room_for_item("main", stack:peek_item()) then + mcl_log("Room so unload") + dest_inv:add_item("main", stack:take_item()) + inv:set_stack("main", i, stack) + + -- Take one item and stop until next time + return + else + mcl_log("no Room") + end + + else + mcl_log("nothing there") + end + end +end + --[[ BEGIN OF ABM DEFINITONS ]] +minetest.register_abm({ + label = "Hoppers pull from minecart hoppers", + nodenames = {"mcl_hoppers:hopper", "mcl_hoppers:hopper_side"}, + interval = 0.5, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + mcl_log("ABM for: " .. minetest.pos_to_string(pos)) + local objs = minetest.get_objects_inside_radius(pos, 3) + + if objs and #objs > 0 then + for k, v in pairs(objs) do + local entity = v:get_luaentity() + if entity and entity.name then + --mcl_log("Name of object near: " .. tostring(entity.name)) + + if entity.name == "mcl_minecarts:hopper_minecart" or entity.name == "mcl_minecarts:chest_minecart" then + local hm_pos = entity.object:get_pos() + mcl_log("We have a minecart with inventory close: " .. minetest.pos_to_string(hm_pos)) + + --if hm_pos.y == pos.y + 1 then mcl_log("y is correct") end + --if (hm_pos.x >= pos.x - DIST_FROM_MC and hm_pos.x <= pos.x + DIST_FROM_MC) then mcl_log("x is within range") end + --if (hm_pos.z >= pos.z - DIST_FROM_MC and hm_pos.z <= pos.z + DIST_FROM_MC) then mcl_log("z is within range") end + + local DIST_FROM_MC = 1.5 + if (hm_pos.y == pos.y + 1) + and (hm_pos.x >= pos.x - DIST_FROM_MC and hm_pos.x <= pos.x + DIST_FROM_MC) + and (hm_pos.z >= pos.z - DIST_FROM_MC and hm_pos.z <= pos.z + DIST_FROM_MC) then + mcl_log("Minecart close enough") + if entity.name == "mcl_minecarts:hopper_minecart" then + hopper_pull_from_mc(entity, pos, 5) + elseif entity.name == "mcl_minecarts:chest_minecart" then + hopper_pull_from_mc(entity, pos, 27) + end + end + end + else + mcl_log("no entity") + end + end + else + mcl_log("objs missing") + end + end, +}) + -- Make hoppers suck in dropped items minetest.register_abm({ label = "Hoppers suck in dropped items", - nodenames = {"mcl_hoppers:hopper","mcl_hoppers:hopper_side"}, + nodenames = {"mcl_hoppers:hopper", "mcl_hoppers:hopper_side"}, interval = 1.0, chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) - local abovenode = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}) + local abovenode = minetest.get_node(vector.offset(pos, 0, 1, 0)) if not minetest.registered_items[abovenode.name] then return end -- Don't bother checking item enties if node above is a container (should save some CPU) if minetest.get_item_group(abovenode.name, "container") ~= 0 then @@ -349,15 +468,16 @@ minetest.register_abm({ local meta = minetest.get_meta(pos) local inv = meta:get_inventory() - for _,object in pairs(minetest.get_objects_inside_radius(pos, 2)) do - if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and not object:get_luaentity()._removed then + for _, object in pairs(minetest.get_objects_inside_radius(pos, 2)) do + if not object:is_player() and object:get_luaentity() and object:get_luaentity().name == "__builtin:item" and + not object:get_luaentity()._removed then if inv and inv:room_for_item("main", ItemStack(object:get_luaentity().itemstring)) then -- Item must get sucked in when the item just TOUCHES the block above the hopper -- This is the reason for the Y calculation. -- Test: Items on farmland and slabs get sucked, but items on full blocks don't local posob = object:get_pos() local posob_miny = posob.y + object:get_properties().collisionbox[2] - if math.abs(posob.x-pos.x) <= 0.5 and (posob_miny-pos.y < 1.5 and posob.y-pos.y >= 0.3) then + if math.abs(posob.x - pos.x) <= 0.5 and (posob_miny - pos.y < 1.5 and posob.y - pos.y >= 0.3) then inv:add_item("main", ItemStack(object:get_luaentity().itemstring)) object:get_luaentity().itemstring = "" object:remove() @@ -368,8 +488,14 @@ minetest.register_abm({ end, }) --- Returns true if itemstack is fuel, but not for lava bucket if destination already has one -local is_transferrable_fuel = function(itemstack, src_inventory, src_list, dst_inventory, dst_list) +---Returns true if itemstack is fuel, but not for lava bucket if destination already has one +---@param itemstack ItemStack +---@param src_inventory InvRef +---@param src_list string +---@param dst_inventory InvRef +---@param dst_list string +---@return boolean +local function is_transferrable_fuel(itemstack, src_inventory, src_list, dst_inventory, dst_list) if mcl_util.is_fuel(itemstack) then if itemstack:get_name() == "mcl_buckets:bucket_lava" then return dst_inventory:is_empty(dst_list) @@ -381,8 +507,6 @@ local is_transferrable_fuel = function(itemstack, src_inventory, src_list, dst_i end end - - minetest.register_abm({ label = "Hopper/container item exchange", nodenames = {"mcl_hoppers:hopper"}, @@ -391,8 +515,8 @@ minetest.register_abm({ chance = 1, action = function(pos, node, active_object_count, active_object_count_wider) -- Get node pos' for item transfer - local uppos = {x=pos.x,y=pos.y+1,z=pos.z} - local downpos = {x=pos.x,y=pos.y-1,z=pos.z} + local uppos = vector.offset(pos, 0, 1, 0) + local downpos = vector.offset(pos, 0, -1, 0) -- Suck an item from the container above into the hopper local upnode = minetest.get_node(uppos) @@ -402,7 +526,7 @@ minetest.register_abm({ -- Also suck in non-fuel items from furnace fuel slot if not sucked and g == 4 then - local finv = minetest.get_inventory({type="node", pos=uppos}) + local finv = minetest.get_inventory({type = "node", pos = uppos}) if finv and not mcl_util.is_fuel(finv:get_stack("fuel", 1)) then mcl_util.move_item_container(uppos, pos, "fuel") end @@ -426,15 +550,15 @@ minetest.register_abm({ local face = minetest.get_node(pos).param2 local front = {} if face == 0 then - front = {x=pos.x-1,y=pos.y,z=pos.z} + front = vector.offset(pos, -1, 0, 0) elseif face == 1 then - front = {x=pos.x,y=pos.y,z=pos.z+1} + front = vector.offset(pos, 0, 0, 1) elseif face == 2 then - front = {x=pos.x+1,y=pos.y,z=pos.z} + front = vector.offset(pos, 1, 0, 0) elseif face == 3 then - front = {x=pos.x,y=pos.y,z=pos.z-1} + front = vector.offset(pos, 0, 0, -1) end - local above = {x=pos.x,y=pos.y+1,z=pos.z} + local above = vector.offset(pos, 0, 1, 0) local frontnode = minetest.get_node(front) if not minetest.registered_nodes[frontnode.name] then return end @@ -447,7 +571,7 @@ minetest.register_abm({ -- Also suck in non-fuel items from furnace fuel slot if not sucked and g == 4 then - local finv = minetest.get_inventory({type="node", pos=above}) + local finv = minetest.get_inventory({type = "node", pos = above}) if finv and not mcl_util.is_fuel(finv:get_stack("fuel", 1)) then mcl_util.move_item_container(above, pos, "fuel") end @@ -459,9 +583,9 @@ minetest.register_abm({ mcl_util.move_item_container(pos, front) elseif g == 4 then -- Put fuel into fuel slot - local sinv = minetest.get_inventory({type="node", pos = pos}) - local dinv = minetest.get_inventory({type="node", pos = front}) - local slot_id,_ = mcl_util.get_eligible_transfer_item_slot(sinv, "main", dinv, "fuel", is_transferrable_fuel) + local sinv = minetest.get_inventory({type = "node", pos = pos}) + local dinv = minetest.get_inventory({type = "node", pos = front}) + local slot_id, _ = mcl_util.get_eligible_transfer_item_slot(sinv, "main", dinv, "fuel", is_transferrable_fuel) if slot_id then mcl_util.move_item_container(pos, front, nil, slot_id, "fuel") end @@ -469,110 +593,124 @@ minetest.register_abm({ end }) -minetest.register_abm({ - label = "Bonemeal extraction from composter", - nodenames = {"mcl_hoppers:hopper", "mcl_hoppers:hopper_side"}, - neighbors = {"mcl_composters:composter_ready"}, - interval = 1.0, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local uppos = {x=pos.x,y=pos.y+1,z=pos.z} - local downpos = {x=pos.x,y=pos.y-1,z=pos.z} - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - -- Get bonemeal from composter above - local upnode = minetest.get_node(uppos) - if upnode.name == "mcl_composters:composter_ready" then - minetest.swap_node(uppos, {name="mcl_composters:composter"}) - inv:add_item("main", "mcl_dye:white") - end - end, -}) +if minetest.get_modpath("mcl_composters") then + minetest.register_abm({ + label = "Bonemeal extraction from composter", + nodenames = {"mcl_hoppers:hopper", "mcl_hoppers:hopper_side"}, + neighbors = {"mcl_composters:composter_ready"}, + interval = 1.0, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local uppos = vector.offset(pos, 0, 1, 0) + --local downpos = vector.offset(pos, 0, -1, 0) -minetest.register_abm({ - label = "Add compostable items on composter", - nodenames = {"mcl_hoppers:hopper"}, - neighbors = {"mcl_composters:composter", "mcl_composters:composter_1", "mcl_composters:composter_2", - "mcl_composters:composter_3", "mcl_composters:composter_4", "mcl_composters:composter_5", - "mcl_composters:composter_6", "mcl_composters:composter_7",}, - interval = 1.0, - chance = 1, - action = function(pos, node, active_object_count, active_object_count_wider) - local uppos = {x=pos.x,y=pos.y+1,z=pos.z} - local downpos = {x=pos.x,y=pos.y-1,z=pos.z} - local meta = minetest.get_meta(pos) - local inv = meta:get_inventory() - --Consume compostable items and update composter below - local downnode = minetest.get_node(downpos) - if downnode.name == "mcl_composters:composter" or downnode.name == "mcl_composters:composter_1" - or downnode.name == "mcl_composters:composter_2" or downnode.name == "mcl_composters:composter_3" - or downnode.name == "mcl_composters:composter_4" or downnode.name == "mcl_composters:composter_5" - or downnode.name == "mcl_composters:composter_6" or downnode.name == "mcl_composters:composter_7" then - local itemcomp = inv:get_list("main") - local hslot = mcl_util.get_first_occupied_inventory_slot(minetest.get_inventory({type="node", pos = pos}), "main") - if hslot == nil then return end - local compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability") - if compchance == 0 then - hslot = hslot+1 - if hslot == 6 then return end - compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability") - if compchance == 0 then - hslot = hslot+1 - if hslot == 6 then return end - compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability") - if compchance == 0 then - hslot = hslot+1 - if hslot == 6 then return end - compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability") - if compchance == 0 then - hslot = hslot+1 - if hslot == 6 then return end - compchance = minetest.get_item_group(itemcomp[hslot]:get_name(), "compostability") - end - end - end - end - if compchance > 0 then - itemcomp[hslot]:take_item() - inv:set_list("main", itemcomp) - local rand = math.random(0,100) - if compchance >= rand then - local level = 0 - if downnode.name == "mcl_composters:composter_1" then - level = 1 - elseif downnode.name == "mcl_composters:composter_2" then - level = 2 - elseif downnode.name == "mcl_composters:composter_3" then - level = 3 - elseif downnode.name == "mcl_composters:composter_4" then - level = 4 - elseif downnode.name == "mcl_composters:composter_5" then - level = 5 - elseif downnode.name == "mcl_composters:composter_6" then - level = 6 - elseif downnode.name == "mcl_composters:composter_7" then - level = 7 - end - mcl_dye.add_bone_meal_particle(vector.offset(downpos, 0, level/8, 0)) - if level < 7 then - level = level + 1 - else - level = "ready" - end - minetest.swap_node(downpos, {name="mcl_composters:composter_" .. level}) - end - end - end - end, -}) + -- Get bonemeal from composter above + local upnode = minetest.get_node(uppos) + if upnode.name == "mcl_composters:composter_ready" then + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + + minetest.swap_node(uppos, {name = "mcl_composters:composter"}) + + inv:add_item("main", "mcl_bone_meal:bone_meal") + end + end, + }) + + ---@param node node + ---@return integer? + ---@nodiscard + local function composter_level(node) + local nn = node.name + if nn == "mcl_composters:composter" then + return 0 + elseif nn == "mcl_composters:composter_1" then + return 1 + elseif nn == "mcl_composters:composter_2" then + return 2 + elseif nn == "mcl_composters:composter_3" then + return 3 + elseif nn == "mcl_composters:composter_4" then + return 4 + elseif nn == "mcl_composters:composter_5" then + return 5 + elseif nn == "mcl_composters:composter_6" then + return 6 + elseif nn == "mcl_composters:composter_7" then + return 7 + else + return nil + end + end + + for i = 1, 7 do + assert(composter_level({name = "mcl_composters:composter_" .. i}) == i) + end + + assert(composter_level({name = "mcl_composters:composter"}) == 0) + assert(composter_level({name = "mcl_composters:some_other_node"}) == nil) + + minetest.register_abm({ + label = "Add compostable items on composter", + nodenames = {"mcl_hoppers:hopper"}, + neighbors = { + "mcl_composters:composter", + "mcl_composters:composter_1", + "mcl_composters:composter_2", + "mcl_composters:composter_3", + "mcl_composters:composter_4", + "mcl_composters:composter_5", + "mcl_composters:composter_6", + "mcl_composters:composter_7", + }, + interval = 1.0, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + --local uppos = vector.offset(pos, 0, 1, 0) + local downpos = vector.offset(pos, 0, -1, 0) + + local downnode = minetest.get_node(downpos) + + ---@type integer|string|nil + local level = composter_level(downnode) + + --Consume compostable items and update composter below + if level then + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + + for i = 1, 5 do + local stack = inv:get_stack("main", i) + local compchance = minetest.get_item_group(stack:get_name(), "compostability") + + if compchance > 0 then + stack:take_item() + inv:set_stack("main", i, stack) + + if compchance >= math.random(0, 100) then + mcl_dye.add_bone_meal_particle(vector.offset(downpos, 0, level / 8, 0)) + if level < 7 then + level = level + 1 + else + level = "ready" + end + minetest.swap_node(downpos, {name = "mcl_composters:composter_" .. level}) + end + break + end + end + end + end, + }) +end minetest.register_craft({ output = "mcl_hoppers:hopper", recipe = { - {"mcl_core:iron_ingot","","mcl_core:iron_ingot"}, - {"mcl_core:iron_ingot","mcl_chests:chest","mcl_core:iron_ingot"}, - {"","mcl_core:iron_ingot",""}, - } + {"mcl_core:iron_ingot", "", "mcl_core:iron_ingot"}, + {"mcl_core:iron_ingot", "mcl_chests:chest", "mcl_core:iron_ingot"}, + {"", "mcl_core:iron_ingot", ""}, + }, }) -- Add entry aliases for the Help @@ -586,7 +724,7 @@ minetest.register_alias("mcl_hoppers:hopper_item", "mcl_hoppers:hopper") minetest.register_lbm({ label = "Update hopper formspecs (0.60.0", name = "mcl_hoppers:update_formspec_0_60_0", - nodenames = { "group:hopper" }, + nodenames = {"group:hopper"}, run_at_every_load = false, action = function(pos, node) local meta = minetest.get_meta(pos) diff --git a/mods/ITEMS/mcl_hoppers/locale/mcl_hoppers.ja.tr b/mods/ITEMS/mcl_hoppers/locale/mcl_hoppers.ja.tr new file mode 100644 index 0000000000..81d32f48c4 --- /dev/null +++ b/mods/ITEMS/mcl_hoppers/locale/mcl_hoppers.ja.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_hoppers +Hopper=ホッパー +Hoppers are containers with 5 inventory slots. They collect dropped items from above, take items from a container above and attempt to put its items it into an adjacent container. Hoppers can go either downwards or sideways. Hoppers interact with chests, droppers, dispensers, shulker boxes, furnaces and hoppers.=ホッパーは、5つのインベントリースロットを持つコンテナです。それらは上から落ちてくるアイテムを集めたり、上のコンテナからアイテムを取ったり、そのアイテムを隣のコンテナに入れようとします。ホッパーは下方向にも横方向にも移送することができます。ホッパーはチェスト、ドロッパー、ディスペンサー、シュルカーボックス、かまど、ホッパーと相互作用します。 +Hoppers interact with containers the following way:=ホッパーはコンテナ類と次のように相互作用: +• Furnaces: Hoppers from above will put items into the source slot. Hoppers from below take items from the output slot. They also take items from the fuel slot when they can't be used as a fuel. Sideway hoppers that point to the furnace put items into the fuel slot=かまど: 上方のホッパーは、アイテムを供給スロットに投入します。下方のホッパーは、出力スロットからアイテムを取り出します。また、燃料として使用できないアイテムは燃料スロットから取り出します。かまどの方を向いている横向きのホッパーは、燃料スロットにアイテムを投入します +• Ender chests: No interaction.=エンダーチェスト: 相互作用なし。 +• Other containers: Normal interaction.=その他のコンテナ: 通常の相互作用。 +Hoppers can be disabled when supplied with redstone power. Disabled hoppers don't move items.=ホッパーは、レッドストーン動力を供給すると無効化できます。無効化されたホッパーは、アイテムを移動させません。 +To place a hopper vertically, place it on the floor or a ceiling. To place it sideways, place it at the side of a block. Use the hopper to access its inventory.=ホッパーを縦に置く場合は、床または天井に設置します。横向きに設置する場合は、ブロックの横に設置します。ホッパーを使用すると、インベントリにアクセスできます。 +Disabled Hopper=無効化されたホッパー +Side Hopper=サイドホッパー +Disabled Side Hopper=無効化されたサイドホッパー +Inventory=インベントリ +5 inventory slots=5つのインベントリースロット +Collects items from above, moves items to container below=上からのアイテムを集め、下のコンテナに移動 +Can be disabled with redstone power=レッドストーン動力で無効化可能 diff --git a/mods/ITEMS/mcl_hoppers/mod.conf b/mods/ITEMS/mcl_hoppers/mod.conf index c89292f6b4..639a5f59e5 100644 --- a/mods/ITEMS/mcl_hoppers/mod.conf +++ b/mods/ITEMS/mcl_hoppers/mod.conf @@ -1,4 +1,4 @@ name = mcl_hoppers description = It's just a clone of Minecraft hoppers, functions nearly identical to them minus mesecons making them stop and the way they're placed. -depends = mcl_core, mcl_formspec, mcl_sounds, mcl_util +depends = mcl_core, mcl_formspec, mcl_sounds, mcl_util, mcl_dye optional_depends = doc, screwdriver diff --git a/mods/ITEMS/mcl_itemframes/item_frames_API.lua b/mods/ITEMS/mcl_itemframes/item_frames_API.lua index 741e6ce71f..231482800a 100644 --- a/mods/ITEMS/mcl_itemframes/item_frames_API.lua +++ b/mods/ITEMS/mcl_itemframes/item_frames_API.lua @@ -34,6 +34,8 @@ local glow_amount = 6 -- LIGHT_MAX is 15, but the items aren't supposed to be a local frame_item_base = {} local map_item_base = {} +local TIMER_INTERVAL = 40.0 + -- Time to Fleckenstein! (it just sounds cool lol) --- self: the object to roll. @@ -247,6 +249,7 @@ mcl_itemframes.update_item_entity = function(pos, node, param2) local map_id_entity = {} local map_id_lua = {} + local timer = minetest.get_node_timer(pos) if map_id == "" then -- handle regular items placed into custom frame. if mcl_itemframes.DEBUG then @@ -268,13 +271,32 @@ mcl_itemframes.update_item_entity = function(pos, node, param2) if itemname == "" or itemname == nil then map_id_lua._texture = "blank.png" map_id_lua._scale = 1 + + -- set up glow, as this is the default/initial clause on placement. if has_glow then map_id_lua.glow = glow_amount end + + -- if there's nothing to display, then kill the timer. + if timer:is_started() == true then + timer:stop() + end else map_id_lua._texture = itemname local def = minetest.registered_items[itemname] map_id_lua._scale = def and def.wield_scale and def.wield_scale.x or 1 + + -- fix for /ClearObjects + if minetest.get_item_group(itemname, "clock") == 0 then + -- Do timer related stuff - but only if there is something to display... and it's not a clock. + if timer:is_started() == false then + timer:start(TIMER_INTERVAL) + else + timer:stop() + timer:start(TIMER_INTERVAL) + end + end + end if mcl_itemframes.DEBUG then minetest.log("action", "[mcl_itemframes] Update_Generic_Item: item's name: " .. itemname) @@ -297,6 +319,15 @@ mcl_itemframes.update_item_entity = function(pos, node, param2) else minetest.log("error", "[mcl_itemframes] Update_Generic_Item: Failed to set Map Item in " .. found_name_to_use .. "'s frame.") end + + -- give maps a refresh timer. + if timer:is_started() == false then + timer:start(TIMER_INTERVAL) + else + timer:stop() + timer:start(TIMER_INTERVAL) + end + end -- finally, set the rotation (roll) of the displayed object. @@ -364,7 +395,7 @@ function mcl_itemframes.create_base_item_entity() textures = { "blank.png" }, _texture = "blank.png", _scale = 1, - + groups = { immortal = 1, }, on_activate = function(self, staticdata) if staticdata and staticdata ~= "" then local data = staticdata:split(";") @@ -395,7 +426,7 @@ function mcl_itemframes.create_base_item_entity() end return "" end, - + on_punch = function() return true end, _update_texture = function(self) if self._texture then self.object:set_properties({ @@ -561,6 +592,23 @@ function mcl_itemframes.custom_register_lbm() end +local function register_frame_achievements() + + awards.register_achievement("mcl_itemframes:glowframe", { + title = S("Glow and Behold!"), + description = S("Craft a glow item frame."), + icon = "mcl_itemframes_glow_item_frame.png", + trigger = { + type = "craft", + item = "mcl_itemframes:glow_item_frame", + target = 1 + }, + type = "Advancement", + group = "Overworld", + }) + +end + function mcl_itemframes.create_base_definitions() if mcl_itemframes.DEBUG then minetest.log("action", "[mcl_itemframes] create_base_definitions.") @@ -590,7 +638,7 @@ function mcl_itemframes.create_base_definitions() paramtype = "light", paramtype2 = "facedir", sunlight_propagates = true, - groups = { dig_immediate = 3, deco_block = 1, dig_by_piston = 1, container = 7, attached_node_facedir = 1 }, + groups = { dig_immediate = 3, deco_block = 1, dig_by_piston = 1, container = 7, }, -- attached_node_facedir = 1 }, -- allows for more placement options. sounds = mcl_sounds.node_sound_defaults(), node_placement_prediction = "", @@ -598,16 +646,19 @@ function mcl_itemframes.create_base_definitions() local inv = minetest.get_meta(pos):get_inventory() local stack = inv:get_stack("main", 1) local itemname = stack:get_name() + local node = {} if minetest.get_item_group(itemname, "clock") > 0 then local new_name = "mcl_clock:clock_" .. (mcl_worlds.clock_works(pos) and mcl_clock.old_time or mcl_clock.random_frame) if itemname ~= new_name then stack:set_name(new_name) inv:set_stack("main", 1, stack) - local node = minetest.get_node(pos) + node = minetest.get_node(pos) mcl_itemframes.update_item_entity(pos, node, node.param2) - end minetest.get_node_timer(pos):start(1.0) + else + node = minetest.get_node(pos) + mcl_itemframes.update_item_entity(pos, node, node.param2) end end, @@ -616,6 +667,14 @@ function mcl_itemframes.create_base_definitions() return itemstack end + local dir = vector.subtract(pointed_thing.under, pointed_thing.above) + local wdir = minetest.dir_to_wallmounted(dir) + + -- remove bottom and top of objects. + if wdir == 0 or wdir == 1 then + return itemstack + end + -- Use pointed node's on_rightclick function first, if present local node = minetest.get_node(pointed_thing.under) if placer and not placer:get_player_control().sneak then @@ -784,15 +843,11 @@ function mcl_itemframes.create_base_definitions() mcl_itemframes.glow_frame_base.inventory_image = "mcl_itemframes_glow_item_frame_item.png" mcl_itemframes.glow_frame_base.wield_image = "mcl_itemframes_glow_item_frame.png" mcl_itemframes.glow_frame_base.mesh = "mcl_itemframes_glow_item_frame.obj" + mcl_itemframes.glow_frame_base.glow = 1 --make the glow frames have some glow at night, but not enough to be a light source. - --[[ - minetest.register_node("mcl_itemframes:glow_item_frame", mcl_itemframes.glow_frame_base) + -- set up the achievement for glow frames. + register_frame_achievements() - mcl_itemframes.update_frame_registry("false", "mcl_itemframes:item_frame", false) - mcl_itemframes.update_frame_registry("false", "mcl_itemframes:glow_item_frame", true) - create_register_lbm("mcl_itemframes:item_frame") - create_register_lbm("mcl_itemframes:glow_item_frame") - --]] end -- for compatibility: diff --git a/mods/ITEMS/mcl_itemframes/locale/mcl_itemframes.ja.tr b/mods/ITEMS/mcl_itemframes/locale/mcl_itemframes.ja.tr new file mode 100644 index 0000000000..daf21337f3 --- /dev/null +++ b/mods/ITEMS/mcl_itemframes/locale/mcl_itemframes.ja.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_itemframes +Item Frame=アイテムフレーム +Item frames are decorative blocks in which items can be placed.=アイテムフレームは、アイテムを配置することができる装飾ブロックです。 +Just place any item on the item frame. Use the item frame again to retrieve the item.=アイテムフレームに任意のアイテムを置くだけです。アイテムを取り出すには、再度アイテムフレームに触ります。 +Can hold an item=アイテムを保持可能 +Glow Item Frame=発光するアイテムフレーム +Glow item frames are decorative blocks in which items can be placed.=発光するアイテムフレームは、アイテムを配置することができる装飾ブロックです。 +Can hold an item and glows=アイテムを保持でき、発光する \ No newline at end of file diff --git a/mods/ITEMS/mcl_jukebox/locale/mcl_jukebox.ja.tr b/mods/ITEMS/mcl_jukebox/locale/mcl_jukebox.ja.tr new file mode 100644 index 0000000000..7f62b56256 --- /dev/null +++ b/mods/ITEMS/mcl_jukebox/locale/mcl_jukebox.ja.tr @@ -0,0 +1,11 @@ +# textdomain: mcl_jukebox +Music Disc=音楽ディスク +A music disc holds a single music track which can be used in a jukebox to play music.=音楽ディスクには1曲の音楽が収録されており、ジュークボックスで音楽を再生するのに使用できます。 +Place a music disc into an empty jukebox to play the music. Use the jukebox again to retrieve the music disc. The music can only be heard by you, not by other players.=空のジュークボックスに音楽ディスクを入れると、音楽が再生されます。再びジュークボックスを使用すると、音楽ディスクを取り出します。音楽は自分だけが聴くことができ、他のプレーヤーは聴くことができません。 +Music Disc=音楽ディスク +@1—@2=@1—@2 +Jukebox=ジュークボックス +Jukeboxes play music when they're supplied with a music disc.=ジュークボックスは、音楽ディスクが供給されると音楽を再生します。 +Place a music disc into an empty jukebox to insert the music disc and play music. If the jukebox already has a music disc, you will retrieve this music disc first. The music can only be heard by you, not by other players.=空のジュークボックスに音楽ディスクを入れると、音楽が再生されます。すでに音楽ディスクが入っている場合は、まずその音楽ディスクを取り出します。音楽は自分だけが聴くことができ、他のプレーヤーは聴くことができません。 +Now playing: @1—@2=再生中: @1—@2 +Uses music discs to play music=音楽再生に音楽ディスクを使用 diff --git a/mods/ITEMS/mcl_lanterns/locale/mcl_lanterns.ja.tr b/mods/ITEMS/mcl_lanterns/locale/mcl_lanterns.ja.tr new file mode 100644 index 0000000000..2d403d9d99 --- /dev/null +++ b/mods/ITEMS/mcl_lanterns/locale/mcl_lanterns.ja.tr @@ -0,0 +1,6 @@ +# textdomain: mcl_lanterns +Lantern=ランタン +Soul Lantern=魂のランタン +Lanterns are light sources which can be placed on the top or the bottom of most blocks.=ランタンは、ほとんどのブロックの上部または下部に配置できる光源です。 +Chain=鎖 +Chains are metallic decoration blocks.=鎖は金属製の装飾ブロックです。 \ No newline at end of file diff --git a/mods/ITEMS/mcl_lightning_rods/init.lua b/mods/ITEMS/mcl_lightning_rods/init.lua index 72763a37be..82e04db0cb 100644 --- a/mods/ITEMS/mcl_lightning_rods/init.lua +++ b/mods/ITEMS/mcl_lightning_rods/init.lua @@ -9,32 +9,19 @@ local cbox = { }, } -local text_top = "[combine:16x16:6,6=mcl_lightning_rods_rod.png" -local text_side = "[combine:16x16:7,0=mcl_lightning_rods_rod.png:-6,0=mcl_lightning_rods_rod.png\\^[transformR270" - -local text_top_active = "[combine:16x16:6,6=mcl_lightning_rods_rod.png\\^[brighten" -local text_side_active = "[combine:16x16:7,0=mcl_lightning_rods_rod.png\\^[brighten:-6,0=mcl_lightning_rods_rod.png\\^[transformR270\\^[brighten" - ---@type node_definition local rod_def = { description = S("Lightning Rod"), _doc_items_longdesc = S("A block that attracts lightning"), - tiles = { - text_top, - text_top, - text_side, - text_side, - text_side, - text_side, - }, - drawtype = "nodebox", + tiles = { "mcl_lightning_rods_rod.png" }, + drawtype = "mesh", + mesh = "mcl_lightning_rods_rod.obj", is_ground_content = false, paramtype = "light", paramtype2 = "facedir", use_texture_alpha = "opaque", groups = { pickaxey = 2, attracts_lightning = 1 }, sounds = mcl_sounds.node_sound_metal_defaults(), - node_box = cbox, selection_box = cbox, collision_box = cbox, node_placement_prediction = "", @@ -80,14 +67,7 @@ minetest.register_node("mcl_lightning_rods:rod", rod_def) local rod_def_a = table.copy(rod_def) -rod_def_a.tiles = { - text_top_active, - text_top_active, - text_side_active, - text_side_active, - text_side_active, - text_side_active, -} +rod_def_a.tiles = { "mcl_lightning_rods_rod.png^[brighten" } rod_def_a.groups.not_in_creative_inventory = 1 diff --git a/mods/ITEMS/mcl_lightning_rods/locale/mcl_lightning_rods.ja.tr b/mods/ITEMS/mcl_lightning_rods/locale/mcl_lightning_rods.ja.tr new file mode 100644 index 0000000000..33376bf983 --- /dev/null +++ b/mods/ITEMS/mcl_lightning_rods/locale/mcl_lightning_rods.ja.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_lightning_rods +Lightning Rod=避雷針 +A block that attracts lightning=雷を引きつけるブロック \ No newline at end of file diff --git a/mods/ITEMS/mcl_lightning_rods/models/mcl_lightning_rods_rod.obj b/mods/ITEMS/mcl_lightning_rods/models/mcl_lightning_rods_rod.obj new file mode 100644 index 0000000000..7870fc5bd9 --- /dev/null +++ b/mods/ITEMS/mcl_lightning_rods/models/mcl_lightning_rods_rod.obj @@ -0,0 +1,90 @@ +# Blender 3.3.1 +# www.blender.org +o Cube +v -0.062500 -0.500000 0.062500 +v -0.062500 0.250000 0.062500 +v -0.062500 -0.500000 -0.062500 +v -0.062500 0.250000 -0.062500 +v 0.062500 -0.500000 0.062500 +v 0.062500 0.250000 0.062500 +v 0.062500 -0.500000 -0.062500 +v 0.062500 0.250000 -0.062500 +v -0.125000 0.250000 0.125000 +v -0.125000 0.250000 -0.125000 +v 0.125000 0.250000 -0.125000 +v 0.125000 0.250000 0.125000 +v -0.125000 0.500000 0.125000 +v -0.125000 0.500000 -0.125000 +v 0.125000 0.500000 -0.125000 +v 0.125000 0.500000 0.125000 +vn -1.0000 -0.0000 -0.0000 +vn -0.0000 -0.0000 -1.0000 +vn 1.0000 -0.0000 -0.0000 +vn -0.0000 -0.0000 1.0000 +vn -0.0000 -1.0000 -0.0000 +vn -0.0000 1.0000 -0.0000 +vt 0.000000 0.750000 +vt 0.125000 0.750000 +vt 0.062500 0.937500 +vt 0.000000 0.000000 +vt 0.125000 0.000000 +vt 0.187500 0.812500 +vt 0.062500 0.937500 +vt 0.125000 0.750000 +vt -0.000000 0.750000 +vt 0.062500 0.812500 +vt 0.125000 0.000000 +vt 0.000000 -0.000000 +vt 0.062500 0.812500 +vt 0.187500 0.937500 +vt 0.125000 0.750000 +vt -0.000000 0.750000 +vt 0.187500 0.937500 +vt 0.125000 -0.000000 +vt 0.000000 -0.000000 +vt 0.062500 0.812500 +vt 0.187500 0.937500 +vt 0.125000 0.750000 +vt 0.000000 0.750000 +vt 0.187500 0.812500 +vt 0.125000 -0.000000 +vt -0.000000 0.000000 +vt 0.187500 0.812500 +vt 0.062500 0.937500 +vt 0.000000 1.000000 +vt 0.250000 0.750000 +vt -0.000000 0.750000 +vt 0.250025 0.999950 +vt -0.000000 0.750000 +vt 0.250000 0.750000 +vt 0.250000 0.750000 +vt 0.000000 1.000000 +vt -0.000000 0.750000 +vt 0.000000 0.750000 +vt 0.250000 1.000000 +vt 0.250000 0.750000 +vt 0.250000 1.000000 +vt -0.000000 1.000000 +vt 0.250000 0.750000 +vt 0.000100 0.999900 +vt 0.250000 1.000000 +vt 0.250000 1.000000 +vt 0.000000 0.750000 +vt 0.000100 0.999900 +vt 0.000000 1.000000 +vt 0.250000 1.000000 +s 0 +f 1/1/1 2/4/1 4/11/1 3/8/1 +f 3/9/2 4/12/2 8/25/2 7/22/2 +f 7/23/3 8/26/3 6/18/3 5/15/3 +f 5/16/4 6/19/4 2/5/4 1/2/4 +f 3/10/5 7/24/5 5/17/5 1/3/5 +f 8/27/5 4/13/5 10/33/5 11/35/5 +f 12/38/3 11/35/3 15/46/3 16/49/3 +f 6/20/5 8/28/5 11/36/5 12/38/5 +f 4/14/5 2/6/5 9/30/5 10/32/5 +f 2/7/5 6/21/5 12/39/5 9/29/5 +f 15/47/6 14/43/6 13/41/6 16/49/6 +f 10/33/1 9/30/1 13/41/1 14/44/1 +f 9/31/4 12/40/4 16/50/4 13/42/4 +f 11/37/2 10/34/2 14/45/2 15/48/2 diff --git a/mods/ITEMS/mcl_loom/locale/mcl_loom.ja.tr b/mods/ITEMS/mcl_loom/locale/mcl_loom.ja.tr new file mode 100644 index 0000000000..8e5e8b076e --- /dev/null +++ b/mods/ITEMS/mcl_loom/locale/mcl_loom.ja.tr @@ -0,0 +1,4 @@ +# textdomain: mcl_loom +Loom=機織り機 +Used to create banner designs=旗のデザイン作成に使用 +This is the shepherd villager's work station. It is used to create banner designs.=羊飼いの村人の職場です。旗のデザイン作成に使用します。 diff --git a/mods/ITEMS/mcl_mangrove/init.lua b/mods/ITEMS/mcl_mangrove/init.lua index eb4735a620..410da28d45 100644 --- a/mods/ITEMS/mcl_mangrove/init.lua +++ b/mods/ITEMS/mcl_mangrove/init.lua @@ -52,9 +52,9 @@ minetest.register_node("mcl_mangrove:mangrove_tree", { tiles = {"mcl_mangrove_log_top.png", "mcl_mangrove_log_top.png", "mcl_mangrove_log.png"}, paramtype2 = "facedir", on_place = mcl_util.rotate_axis, + after_destruct = mcl_core.update_leaves, groups = {handy=1,axey=1, tree=1, flammable=2, building_block=1, material_wood=1, fire_encouragement=5, fire_flammability=5}, sounds = mcl_sounds.node_sound_wood_defaults(), - on_place = mcl_util.rotate_axis, _mcl_blast_resistance = 2, _mcl_hardness = 2, _mcl_stripped_variant = "mcl_mangrove:mangrove_stripped_trunk", @@ -86,7 +86,7 @@ minetest.register_node("mcl_mangrove:mangrove_wood", { _mcl_hardness = 2, }) -minetest.register_node("mcl_mangrove:mangroveleaves", { +local l_def = { description = S("Mangrove Leaves"), _doc_items_longdesc = S("mangrove leaves are grown from mangrove trees."), _doc_items_hidden = false, @@ -95,7 +95,11 @@ minetest.register_node("mcl_mangrove:mangroveleaves", { place_param2 = 1, -- Prevent leafdecay for placed nodes tiles = {"mcl_mangrove_leaves.png"}, paramtype = "light", - groups = {handy=1,shearsy=1,swordy=1, leafdecay=10, flammable=2, leaves=1, deco_block=1, dig_by_piston=1, fire_encouragement=30, fire_flammability=60}, + groups = { + handy = 1, hoey = 1, shearsy = 1, swordy = 1, dig_by_piston = 1, + flammable = 2, fire_encouragement = 30, fire_flammability = 60, + leaves = 1, deco_block = 1, compostability = 30 + }, drop = get_drops(0), _mcl_shears_drop = true, sounds = mcl_sounds.node_sound_leaves_defaults(), @@ -103,7 +107,19 @@ minetest.register_node("mcl_mangrove:mangroveleaves", { _mcl_hardness = 0.2, _mcl_silk_touch_drop = true, _mcl_fortune_drop = { get_drops(1), get_drops(2), get_drops(3), get_drops(4) }, -}) +} + +minetest.register_node("mcl_mangrove:mangroveleaves", l_def) + +local o_def = table.copy(l_def) +o_def._doc_items_create_entry = false +o_def.place_param2 = nil +o_def.groups.not_in_creative_inventory = 1 +o_def.groups.orphan_leaves = 1 +o_def._mcl_shears_drop = {"mcl_mangrove:mangroveleaves"} +o_def._mcl_silk_touch_drop = {"mcl_mangrove:mangroveleaves"} + +minetest.register_node("mcl_mangrove:mangroveleaves_orphan", o_def) minetest.register_node("mcl_mangrove:mangrove_stripped_trunk", { description = S("Stripped Mangrove Wood"), @@ -147,11 +163,13 @@ minetest.register_node("mcl_mangrove:mangrove_roots", { drawtype = "allfaces_optional", groups = { handy = 1, hoey = 1, shearsy = 1, axey = 1, swordy = 1, dig_by_piston = 0, - leaves = 1, deco_block = 1,flammable = 10, fire_encouragement = 30, fire_flammability = 60, compostability = 30 + flammable = 10, fire_encouragement = 30, fire_flammability = 60, + deco_block = 1, compostability = 30 }, drop = "mcl_mangrove:mangrove_roots", _mcl_shears_drop = true, - sounds = mcl_sounds.node_sound_leaves_defaults(), _mcl_blast_resistance = 0.7, + sounds = mcl_sounds.node_sound_leaves_defaults(), + _mcl_blast_resistance = 0.7, _mcl_hardness = 0.7, _mcl_silk_touch_drop = true, _mcl_fortune_drop = { "mcl_mangrove:mangrove_roots 1", "mcl_mangrove:mangrove_roots 2", "mcl_mangrove:mangrove_roots 3", "mcl_mangrove:mangrove_roots 4" }, @@ -308,7 +326,7 @@ local wlroots = { }, sounds = mcl_sounds.node_sound_water_defaults(), drawtype = "allfaces_optional", - use_texture_alpha = "clip", + use_texture_alpha = "blend", is_ground_content = false, paramtype = "light", walkable = true, @@ -317,8 +335,7 @@ local wlroots = { buildable_to = false, liquids_pointable = true, drop = "mcl_mangrove:mangrove_roots", - - groups = { + groups = { handy = 1, hoey = 1, water=3, liquid=3, puts_out_fire=1, dig_by_piston = 1, deco_block = 1, not_in_creative_inventory=1 }, _mcl_blast_resistance = 100, _mcl_hardness = -1, -- Hardness intentionally set to infinite instead of 100 (Minecraft value) to avoid problems in creative mode @@ -330,6 +347,9 @@ local wlroots = { end, } local rwlroots = table.copy(wlroots) +-- FIXME luacheck complains that this is a repeated definition of water_tex. +-- Maybe the tiles definition below should be replaced with the animated tile +-- definition as per above? water_tex = "default_river_water_source_animated.png^[verticalframe:16:0" rwlroots.tiles = { "("..water_tex..")^mcl_mangrove_roots_top.png", @@ -364,8 +384,8 @@ mcl_doors:register_door("mcl_mangrove:mangrove_door", { groups = {handy=1,axey=1, material_wood=1, flammable=-1}, _mcl_hardness = 3, _mcl_blast_resistance = 3, - tiles_bottom = {"mcl_mangrove_door_bottom.png", "mcl_mangrove_planks.png"}, - tiles_top = {"mcl_mangrove_door_top.png", "mcl_mangrove_planks.png"}, + tiles_bottom = {"mcl_mangrove_door_bottom.png", "mcl_doors_door_mangrove_side_lower.png"}, + tiles_top = {"mcl_mangrove_door_top.png", "mcl_doors_door_mangrove_side_upper.png"}, sounds = mcl_sounds.node_sound_wood_defaults(), }) diff --git a/mods/ITEMS/mcl_mangrove/locale/mcl_mangrove.ja.tr b/mods/ITEMS/mcl_mangrove/locale/mcl_mangrove.ja.tr new file mode 100644 index 0000000000..142495e92d --- /dev/null +++ b/mods/ITEMS/mcl_mangrove/locale/mcl_mangrove.ja.tr @@ -0,0 +1,36 @@ +# textdomain: mcl_mangrove +Mangrove Wood=マングローブの木 +The trunk of a Mangrove tree.=マングローブの樹幹部分です。 +Mangrove Bark=マングローブの樹皮 +The bark of a Mangrove tree.=マングローブの木の樹皮です。 +Mangrove Wood Planks=マングローブの板材 +Mangrove Leaves=マングローブの葉 +mangrove leaves are grown from mangrove trees.=マングローブの葉は、マングローブの木から育ちます。 +Stripped Mangrove Wood=樹皮を剥いだマングローブの木 +The stripped wood of a Mangrove tree=剥き身となったマングローブの木 +Stripped Mangrove Bark=剥がされたマングローブの樹皮 +The stripped bark of a Mangrove tree=マングローブの木から剥がされた樹皮 +Mangrove Roots=マングローブの根 +Mangrove roots are decorative blocks that form as part of mangrove trees.=マングローブの根は、マングローブの木の一部として形成される装飾ブロックです。 +Mangrove Propagule=マングローブの芽 +Needs soil and light to grow=生育に必要なのは土と光 +When placed on soil (such as dirt) and exposed to light, an propagule will grow into an mangrove after some time.=土壌(土など)の上に置き、光を当てると、しばらくのちマングローブに成長します。 +Hanging Propagule=芽 +Grows on Mangrove leaves=マングローブの葉に生育 +water logged mangrove roots=水没したマングローブの根 +Mangrove roots, despite being a full block, can be waterlogged and do not flow water out=マングローブの根は、フルブロックであるにもかかわらず水没することがあり、水が流出しない +These cannot be crafted yet only occure when get in contact of water.=これはクラフトできないものの、水と接触したときだけ発生します。 +Muddy Mangrove Roots=泥に塗れたマングローブの根 +crafted with Mud and Mangrove roots=泥とマングローブの根で作られたもの +Muddy Mangrove Roots is a block from mangrove swamp.It drowns player a bit inside it.=泥に塗れたマングローブの根は、マングローブの沼地から1ブロックの場所にあります。 +Mangrove Door=マングローブのドア +Wooden doors are 2-block high barriers which can be opened or closed by hand and by a redstone signal.=木製のドアは、高さ2ブロックの障壁で、手やレッドストーンの信号で開閉できます。 +To open or close a wooden door, rightclick it or supply its lower half with a redstone signal.=木製のドアを開閉するには、右クリックするか、下半分にレッドストーン信号を供給してください。 +Mangrove Trapdoor=マングローブのトラップドア +Wooden trapdoors are horizontal barriers which can be opened and closed by hand or a redstone signal. 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.=木製のトラップドアは、手やレッドストーンの信号で開閉できる水平障壁です。配置の仕方によって、ブロックの上部または下部を占めます。開いているときは、梯子のようによじ登ることができます。 +To open or close the trapdoor, rightclick it or send a redstone signal to it.=トラップドアを開閉するには、トラップドアを右クリックするか、レッドストーン信号を送信してください。 +Mangrove Wood Fence=マングローブのフェンス +Mangrove Wood Fence Gate=マングローブのフェンスゲート +Mangrove Wood Stairs=マングローブの階段 +Mangrove Wood Slab=マングローブのスラブ +Double Mangrove Wood Slab=マングローブの2重スラブ diff --git a/mods/ITEMS/mcl_mangrove/schematics/mcl_mangrove_bee_nest.mts b/mods/ITEMS/mcl_mangrove/schematics/mcl_mangrove_bee_nest.mts new file mode 100644 index 0000000000..6301174631 Binary files /dev/null and b/mods/ITEMS/mcl_mangrove/schematics/mcl_mangrove_bee_nest.mts differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_doors_door_mangrove_side_lower.png b/mods/ITEMS/mcl_mangrove/textures/mcl_doors_door_mangrove_side_lower.png new file mode 100644 index 0000000000..9a217e1aea Binary files /dev/null and b/mods/ITEMS/mcl_mangrove/textures/mcl_doors_door_mangrove_side_lower.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_doors_door_mangrove_side_upper.png b/mods/ITEMS/mcl_mangrove/textures/mcl_doors_door_mangrove_side_upper.png new file mode 100644 index 0000000000..2b27f4aebb Binary files /dev/null and b/mods/ITEMS/mcl_mangrove/textures/mcl_doors_door_mangrove_side_upper.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_door_bottom.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_door_bottom.png index fc6097a086..91c2df8b86 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_door_bottom.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_door_bottom.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_door_top.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_door_top.png index f84b4f462b..8691b0f93f 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_door_top.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_door_top.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_doors.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_doors.png index 589a399864..1f495d9976 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_doors.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_doors.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_fence.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_fence.png index 23390877d4..47943496f2 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_fence.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_fence.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_fence_gate.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_fence_gate.png index 23390877d4..47943496f2 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_fence_gate.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_fence_gate.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_leaves.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_leaves.png index 1ece384d4e..cae97fdb4f 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_leaves.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_leaves.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_log.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_log.png index f9854648be..fdbc0e9495 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_log.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_log.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_log_top.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_log_top.png index 4b47c97a02..aa8906485b 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_log_top.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_log_top.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_planks.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_planks.png index a5abb7d336..47943496f2 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_planks.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_planks.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule.png index c6786d2077..f2f67dbdcc 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule_hanging.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule_hanging.png index e3837022d9..25c603021c 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule_hanging.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule_hanging.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule_item.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule_item.png index e2626a788e..a6bb0233c0 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule_item.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_propagule_item.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_roots_side.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_roots_side.png index 294ed0c6ad..f0409f2dcd 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_roots_side.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_roots_side.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_roots_top.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_roots_top.png index a2cce5da32..8ed1322535 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_roots_top.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_roots_top.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_trapdoor.png b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_trapdoor.png index 11d0b0cb49..ea50c5a5f3 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_trapdoor.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_mangrove_trapdoor.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_stripped_mangrove_log_side.png b/mods/ITEMS/mcl_mangrove/textures/mcl_stripped_mangrove_log_side.png index aee0ffdf47..cb9ac10aca 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_stripped_mangrove_log_side.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_stripped_mangrove_log_side.png differ diff --git a/mods/ITEMS/mcl_mangrove/textures/mcl_stripped_mangrove_log_top.png b/mods/ITEMS/mcl_mangrove/textures/mcl_stripped_mangrove_log_top.png index def02fba51..da228d4be4 100644 Binary files a/mods/ITEMS/mcl_mangrove/textures/mcl_stripped_mangrove_log_top.png and b/mods/ITEMS/mcl_mangrove/textures/mcl_stripped_mangrove_log_top.png differ diff --git a/mods/ITEMS/mcl_maps/locale/mcl_maps.ja.tr b/mods/ITEMS/mcl_maps/locale/mcl_maps.ja.tr new file mode 100644 index 0000000000..a521f3ebad --- /dev/null +++ b/mods/ITEMS/mcl_maps/locale/mcl_maps.ja.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_maps +Empty Map=白紙の地図 +Empty maps are not useful as maps, but they can be stacked and turned to maps which can be used.=白紙の地図は地図として使えませんが、スタックしたり、使える地図に変えられます。 +Rightclick to create a filled map (which can't be stacked anymore).=右クリックで塗りつぶしたマップを作成します(スタックはできなくなります)。 +Map=地図 +Shows a map image.=地図画像を表示します。 +When created, the map saves the nearby area as an image that can be viewed any time by holding the map.=作成すると、その付近の地図が画像として保存され、地図をかざすといつでも見ることができます。 +Hold the map in your hand. This will display a map on your screen.=地図を手に持ってください。これで画面に地図が表示されます。 diff --git a/mods/ITEMS/mcl_mobitems/init.lua b/mods/ITEMS/mcl_mobitems/init.lua index 256be90254..357762645b 100644 --- a/mods/ITEMS/mcl_mobitems/init.lua +++ b/mods/ITEMS/mcl_mobitems/init.lua @@ -181,6 +181,14 @@ minetest.register_craftitem("mcl_mobitems:bone", { _mcl_toollike_wield = true, }) +minetest.register_craftitem("mcl_mobitems:ink_sac", { + description = S("Squid Ink Sac"), + _doc_items_longdesc = S("This item is dropped by dead squids. Squid ink can be used to as an ingredient to craft book and quill or black dye."), + inventory_image = "mcl_mobitems_ink_sac.png", + stack_max = 64, + groups = { craftitem = 1 }, +}) + minetest.register_craftitem("mcl_mobitems:string",{ description = S("String"), _doc_items_longdesc = S("Strings are used in crafting."), @@ -402,11 +410,11 @@ minetest.register_alias("mobs_mc:gold_horse_armor", "mcl_mobitems:gold_horse_arm minetest.register_alias("mobs_mc:diamond_horse_armor", "mcl_mobitems:diamond_horse_armor") minetest.register_craftitem("mcl_mobitems:glow_ink_sac", { - description = S("Glow Ink Sac"), - _doc_items_longdesc = S("Use it to craft the Glow Item Frame."), - _doc_items_usagehelp = S("Use the Glow Ink Sac and the normal Item Frame to craft the Glow Item Frame."), - inventory_image = "extra_mobs_glow_ink_sac.png", - groups = { craftitem = 1 }, + description = S("Glow Ink Sac"), + _doc_items_longdesc = S("Use it to craft the Glow Item Frame."), + _doc_items_usagehelp = S("Use the Glow Ink Sac and the normal Item Frame to craft the Glow Item Frame."), + inventory_image = "extra_mobs_glow_ink_sac.png", + groups = { craftitem = 1 }, }) diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.de.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.de.tr index f9a0aaf507..c1278ad369 100644 --- a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.de.tr +++ b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.de.tr @@ -52,6 +52,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Halten Sie den Knochen in der Nähe von Wölfen, um sie anzulocken. Benutzen Sie die „Platzieren“-Taste auf dem Wolf, um ihm den Knochen zu geben und ihn zu zähmen. Sie können dem gezähmten Wolf Befehle erteilen, indem Sie die „Platzieren“-Taste auf ihm benutzen. +Squid Ink Sac=Tintenbeutel +This item is dropped by dead squids. Squid ink can be used to as an ingredient to craft book and quill or black dye.=Dieser Gegenstand wird von toten Tintenfischen abgeworfen. Tintenbeutel können benutzt werden, um Buch und Feder oder schwarzen Farbstoff zu fertigen. + String=Faden Strings are used in crafting.=Fäden sind nützlich in der Fertigung. Blaze Rod=Lohenrute diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.es.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.es.tr index 9b149788ad..1add14030a 100644 --- a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.es.tr +++ b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.es.tr @@ -52,6 +52,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Empuña el hueso cerca de los lobos para atraerlos. Usa la tecla "Colocar" en el lobo para darle un hueso y domesticarlo. Luego puede dar órdenes al lobo domesticado utilizando la tecla "Colocar". +Squid Ink Sac=Saco de tinta +This item is dropped by dead squids. Squid ink can be used to as an ingredient to craft book and quill or black dye.= + String=Cuerda Strings are used in crafting.=Las cuerdas se usan en la elaboración. Blaze Rod=Vara de blaze diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.fr.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.fr.tr index 8a916e99ab..09b7ea70bc 100644 --- a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.fr.tr +++ b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.fr.tr @@ -52,6 +52,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Maniez l'os près des loups pour les attirer. Utilisez la touche «Placer» sur le loup pour lui donner un os et l'apprivoiser. Vous pouvez ensuite donner des commandes au loup apprivoisé en utilisant la touche "Placer" sur celui-ci. +Squid Ink Sac=Poche d'encre +This item is dropped by dead squids. Squid ink can be used to as an ingredient to craft book and quill or black dye.= + String=Ficelle Strings are used in crafting.=Les ficelles sont utilisées dans l'artisanat. Blaze Rod=Bâton de Blaze diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.ja.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.ja.tr new file mode 100644 index 0000000000..f5d18c7f1b --- /dev/null +++ b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.ja.tr @@ -0,0 +1,108 @@ +# textdomain: mcl_mobitems +Rotten Flesh=腐った肉 +80% chance of food poisoning=80%の確率で食中毒 + +Yuck! This piece of flesh clearly has seen better days. If you're really desperate, you can eat it to restore a few hunger points, but there's a 80% chance it causes food poisoning, which increases your hunger for a while.=ウッ この肉片は明らかに期限切れです。あなたが差し迫っているというのなら、食べて空腹を紛らわせるのもアリですが、八割方 食中りを起こし、しばらくは空腹感が増します。 + +Raw Mutton=生の羊肉 + +Raw mutton is the flesh from a sheep and can be eaten safely. Cooking it will greatly increase its nutritional value.=生の羊の肉なので、安全に食べられます。調理することで栄養価は格段にアップします。 + +Cooked Mutton=ジンギスカン +Cooked mutton is the cooked flesh from a sheep and is used as food.=ジンギスカンは羊の肉を調理したもので、食用です。 +Raw Beef=生の牛肉 + +Raw beef is the flesh from cows and can be eaten safely. Cooking it will greatly increase its nutritional value.=生の牛の肉なので、安全に食べられます。調理することで栄養価が大幅にアップします。 + +Steak=ステーキ +Steak is cooked beef from cows and can be eaten.=ステーキは牛肉を調理したもので、食べることができます。 +Raw Chicken=生の鶏肉 +30% chance of food poisoning=30%の確率で食中毒 + +Raw chicken is a food item which is not safe to consume. You can eat it to restore a few hunger points, but there's a 30% chance to suffer from food poisoning, which increases your hunger rate for a while. Cooking raw chicken will make it safe to eat and increases its nutritional value.=生の鶏肉は、安全に摂取できない食品です。食べると空腹度が少し回復しますが、30%の確率で食中毒になり、しばらくの間は空腹感が増します。生の鶏肉を調理すると、安全に食べることができ、栄養価も高まります。 + +Cooked Chicken=ヤキトリ +A cooked chicken is a healthy food item which can be eaten.=ヤキトリは、食べても大丈夫なヘルシー食品です。 +Raw Porkchop=生の豚肉 + +A raw porkchop is the flesh from a pig and can be eaten safely. Cooking it will greatly increase its nutritional value.=生の豚の肉なので、安全に食べられます。調理することで栄養価が大幅にアップします。 + +Cooked Porkchop=チャーシュー +Cooked porkchop is the cooked flesh of a pig and is used as food.=チャーシューは豚の肉を調理したもので、食用です。 +Raw Rabbit=生の兎肉 + +Raw rabbit is a food item from a dead rabbit. It can be eaten safely. Cooking it will increase its nutritional value.=死んだウサギ由来の食材です。安全に食べられます。調理することで栄養価が上がります。 + +Cooked Rabbit=ウサギの丸焼き +This is a food item which can be eaten.=これは食料品です。 +Milk=牛乳 +Removes all status effects=全ステータス効果を除去 + +Milk is very refreshing and can be obtained by using a bucket on a cow. Drinking it will remove all status effects, but restores no hunger points.=牛乳はとてもさわやかで、バケツを牛に使うことで採れます。これを飲むと全てのステータス効果を除去しますが、お腹は満たせません。 + +Use the placement key to drink the milk.=配置キーを使うと、牛乳を飲みます。 +Spider Eye=クモの目 +Poisonous=有毒 + +Spider eyes are used mainly in crafting. If you're really desperate, you can eat a spider eye, but it will poison you briefly.=クモの目は主にクラフトに使われます。あなたがどうしようもなく過酷なら、食べることもできます…が、早い話これは毒です。 + +Bone=骨 + +Bones can be used to tame wolves so they will protect you. They are also useful as a crafting ingredient.=骨は、オオカミがあなたを守ってくれるよう馴らすために使えます。また、クラフトの材料としても有用です。 + +Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=骨をオオカミの近くで振り、引き付けます。オオカミに「設置」キーを使うと、骨を与えて手なずけられます。手なずけたオオカミに「設置」キーを使えば、オオカミに号令が出せます。 + +String=糸 +Strings are used in crafting.=糸はクラフトに使えます。 +Blaze Rod=ブレイズロッド +This is a crafting component dropped from dead blazes.=これは死んだブレイズから落ちた、クラフトの構成材です。 +Blaze Powder=ブレイズパウダー +This item is mainly used for crafting.=このアイテムは主にクラフトに使われます。 +Magma Cream=マグマクリーム +Magma cream is a crafting component.=マグマクリームはクラフトの構成材です。 +Ghast Tear=ガストの涙 +Place this item in an item frame as decoration.=これをアイテムフレームに入れれば、飾りになります。 +Nether Star=ネザースター + +A nether star is dropped when the Wither dies. Place it in an item frame to show the world how hardcore you are! Or just as decoration.=ネザースターは、ウィザーが死んだ時にドロップします。アイテムフレームに入れれば、あなたのハードコアぶりを世界にアピールできます! あるいはただの飾りです。 + +Leather=革 +Leather is a versatile crafting component.=革は、多用途なクラフトの構成材です。 +Feather=羽 +Feathers are used in crafting and are dropped from chickens.=羽は、クラフトに使うもので、ニワトリからドロップします。 +Rabbit Hide=ウサギの皮 +Rabbit hide is used to create leather.=ウサギの皮は、革の原料として使われます。 +Rabbit's Foot=ウサギの足 +Must be your lucky day! Place this item in an item frame for decoration.=ラッキーデーに違いない! これはアイテムフレームに入れて飾ってください。 +Saddle=鞍 +Can be placed on animals to ride them=動物に被せて騎乗可能 +Saddles can be put on some animals in order to mount them.=動物によっては、鞍を装着して騎乗できます。 + +Use the placement key with the saddle in your hand to try to put on the saddle. Saddles fit on horses, mules, donkeys and pigs. Horses, mules and donkeys need to be tamed first, otherwise they'll reject the saddle. Saddled animals can be mounted by using the placement key on them again.=鞍を手にした状態で配置キーを使い、装着させてみましょう。鞍はウマ、ラバ、ロバ、ブタにフィットします。ウマ、ラバ、ロバは先に手なずけておかないと、鞍を拒んでしまいます。鞍をつけた動物には、もう一度配置キーを使えば騎乗できます。 + +Rabbit Stew=ラビットシチュー +Rabbit stew is a very nutricious food item.=ラビットシチューは、とても栄養豊富な食品です。 +Shulker Shell=シュルカーの殻 +Shulker shells are used in crafting. They are dropped from dead shulkers.=シュルカーの殻はクラフトに使われます。それは死んだシュルカーからドロップされます。 +Slimeball=スライムボール +Slimeballs are used in crafting. They are dropped from slimes.=スライムボールはクラフトに使われます。それはスライムからドロップされます。 +Gunpowder=火薬 +Carrot on a Stick=ニンジン付きの棒 +Lets you ride a saddled pig=鞍をつけたブタに乗れる +A carrot on a stick can be used on saddled pigs to ride them.=ニンジン付きの棒を使えば、鞍をつけたブタに騎乗できます。 + +Place it on a saddled pig to mount it. You can now ride the pig like a horse. Pigs will also walk towards you when you just wield the carrot on a stick.=鞍をつけたブタの上にそれを掲げます。 これで、ブタに騎乗できること馬のごとしです。 ニンジン付きの棒を振るうだけでも、ブタはあなたに向かって歩いてきます。 + +Nautilus Shell=オウムガイの殻 +Used to craft a conduit=コンジットのクラフトに使用可 +The Nautilus Shell is used to craft a conduit. They can be obtained by fishing or killing a drowned that is wielding a shell.=オウムガイの殻は、コンジットをクラフトするのに使えます。 釣りをするか、貝を振り回しているドラウンドを殺ると入手できます。 +Heart of the Sea=海洋の心 +The Heart of the Sea is used to craft a conduit. They can be obtained by finding them in a buried treasure chest.=海洋の心は、コンジットをクラフトするのに使えます。 それは埋められた宝箱の中から見つけることで入手できます。 + +Iron Horse Armor=鉄の馬鎧 +Iron horse armor can be worn by horses to increase their protection from harm a bit.=鉄の馬鎧は、ウマに装着することで、危害から守る力を少し高めることができます。 +Golden Horse Armor=金の馬鎧 +Golden horse armor can be worn by horses to increase their protection from harm.=金の馬鎧は、ウマに装着することで、危害から守る力を高めることができます。 +Diamond Horse Armor=ダイヤモンドの馬鎧 +Diamond horse armor can be worn by horses to greatly increase their protection from harm.=ダイヤモンドの馬鎧は、ウマに装着することで、危害から守る力を大幅に高めることができます。 +Place it on a horse to put on the horse armor. Donkeys and mules can't wear horse armor.=ウマに被せると、馬鎧を着せることができます。ロバとラバには、馬鎧を着せられません。 diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.pl.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.pl.tr index dd78a692f4..a58bfb474f 100644 --- a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.pl.tr +++ b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.pl.tr @@ -53,6 +53,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Trzymaj kość w pobliżu wilków aby je zwabić. Użyj przycisku "Umieść" na wilku aby dać mu kość i go oswoić. Możesz wtedy wydawać polecenia oswojonemu wilkowi klikając przycisk "Umieść" na nim. +Squid Ink Sac=Torbiel z atramentem +This item is dropped by dead squids. Squid ink can be used to as an ingredient to craft book and quill or black dye.= + String=Nić Strings are used in crafting.=Nić jest użyteczna w wytwarzaniu. Blaze Rod=Płomienna różdżka diff --git a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.ru.tr b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.ru.tr index 64f73618c9..4e3fc020be 100644 --- a/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.ru.tr +++ b/mods/ITEMS/mcl_mobitems/locale/mcl_mobitems.ru.tr @@ -52,6 +52,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.=Положите кость рядом с волками, чтобы привлечь их. Используйте клавишу “Разместить” на волке, чтобы дать ему кость и приручить его. Вы можете командовать приручёнными волками с помощью клавиши “Разместить”. +Squid Ink Sac=Чернильный мешок +This item is dropped by dead squids. Squid ink can be used to as an ingredient to craft book and quill or black dye.= + String=Нити Strings are used in crafting.=Нити используются для крафтинга Blaze Rod=Огненный стержень diff --git a/mods/ITEMS/mcl_mobitems/locale/template.txt b/mods/ITEMS/mcl_mobitems/locale/template.txt index 690ae3fac8..f26ab52d7c 100644 --- a/mods/ITEMS/mcl_mobitems/locale/template.txt +++ b/mods/ITEMS/mcl_mobitems/locale/template.txt @@ -52,6 +52,9 @@ Bones can be used to tame wolves so they will protect you. They are also useful Wield the bone near wolves to attract them. Use the “Place” key on the wolf to give it a bone and tame it. You can then give commands to the tamed wolf by using the “Place” key on it.= +Squid Ink Sac= +This item is dropped by dead squids. Squid ink can be used to as an ingredient to craft book and quill or black dye.= + String= Strings are used in crafting.= Blaze Rod= diff --git a/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_ink_sac.png b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_ink_sac.png new file mode 100644 index 0000000000..95a8df4ad1 Binary files /dev/null and b/mods/ITEMS/mcl_mobitems/textures/mcl_mobitems_ink_sac.png differ diff --git a/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.ja.tr b/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.ja.tr new file mode 100644 index 0000000000..e80806c5d3 --- /dev/null +++ b/mods/ITEMS/mcl_mobspawners/locale/mcl_mobspawners.ja.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_mobspawners +Mob Spawner=モブスポナー +A mob spawner regularily causes mobs to appear around it while a player is nearby. Some mob spawners are disabled while in light.=モブスポナーは、プレイヤーが近くにいる間、定期的にその周りにモブを出現させます。 一部のモブスポナーは、照らされていると無効化します。 +If you have a spawn egg, you can use it to change the mob to spawn. Just place the item on the mob spawner. Player-set mob spawners always spawn mobs regardless of the light level.=スポーンエッグを持っていれば、それを使ってスポーンするモブを変更できます。アイテムをモブスポナーに置くだけです。プレイヤーが設定したモブスポナーは、光量に関係なく常にモブをスポーンします。 +Makes mobs appear=モブを出現させる diff --git a/mods/ITEMS/mcl_monster_eggs/locale/mcl_monster_eggs.ja.tr b/mods/ITEMS/mcl_monster_eggs/locale/mcl_monster_eggs.ja.tr new file mode 100644 index 0000000000..5c88cc5be9 --- /dev/null +++ b/mods/ITEMS/mcl_monster_eggs/locale/mcl_monster_eggs.ja.tr @@ -0,0 +1,9 @@ +# textdomain: mcl_monster_eggs +An infested block is a block from which a silverfish will pop out when it is broken. It looks identical to its normal counterpart.=虫喰いブロックは、壊れるとそこからシルバーフィッシュが飛び出してきます。見た目は通常のブロックと同じです。 +Infested Stone=虫喰い石 +Infested Cobblestone=虫喰い丸石 +Infested Stone Bricks=虫喰い石レンガ +Infested Cracked Stone Bricks=ひび割れた虫喰い石レンガ +Infested Mossy Stone Bricks=苔むした虫喰い石レンガ +Infested Chiseled Stone Bricks=模様入り虫喰い石レンガ +Hides a silverfish=シルバーフィッシュを隠す diff --git a/mods/ITEMS/mcl_mud/locale/mcl_mud.ja.tr b/mods/ITEMS/mcl_mud/locale/mcl_mud.ja.tr new file mode 100644 index 0000000000..3c4eba8455 --- /dev/null +++ b/mods/ITEMS/mcl_mud/locale/mcl_mud.ja.tr @@ -0,0 +1,7 @@ +# textdomain: mcl_mud +Mud=泥 +Mud is a decorative block that generates in mangrove swamps. Mud can also be obtained by using water bottles on dirt or coarse dirt.=泥は、マングローブの湿地に発生する装飾ブロックです。泥は、土や粗い土の上に水入り瓶を使っても得られます。 +Packed Mud=固めた泥 +Packed mud is a decorative block used to craft mud bricks.=固めた泥は、泥レンガを作るための装飾ブロックです。 +Mud Bricks=泥レンガ +Decorative block crafted from packed mud.=固めた泥で作った装飾ブロックです。 \ No newline at end of file diff --git a/mods/ITEMS/mcl_mushrooms/locale/mcl_mushrooms.ja.tr b/mods/ITEMS/mcl_mushrooms/locale/mcl_mushrooms.ja.tr new file mode 100644 index 0000000000..c0dd56daf7 --- /dev/null +++ b/mods/ITEMS/mcl_mushrooms/locale/mcl_mushrooms.ja.tr @@ -0,0 +1,24 @@ +# textdomain: mcl_mushrooms +This decorative block is like a huge mushroom stem, but with the stem texture on all sides.=巨大なキノコの柄のような装飾ブロックですが、四方に柄のテクスチャが施されています。 +Huge red mushroom blocks are the cap parts of huge red mushrooms. It consists of a red skin and can have pores on each of its sides.=巨大な赤色キノコのブロックは、巨大な赤色キノコのキャップ部分です。赤色の皮からなり、各面に孔口を持つこともあります。 +The stem part of a huge red mushroom.=巨大な赤色キノコの柄の部分。 +Huge Red Mushroom Block=巨大な赤色キノコのブロック +Huge Red Mushroom Stem=巨大な赤色キノコの柄 +Huge Red Mushroom All-Faces Stem=巨大な赤色キノコの柄(全面) +Huge brown mushroom blocks are the cap parts of huge brown mushrooms. It consists of a brown skin and can have pores on each of its sides.=巨大な茶色キノコのブロックは、巨大な茶色キノコのキャップ部分です。茶色の皮からなり、各面に孔口を持つこともあります。 +The stem part of a huge brown mushroom.=巨大な茶色キノコの柄の部分。 +Huge Brown Mushroom Block=巨大な茶色キノコのブロック +Huge Brown Mushroom Stem=巨大な茶色キノコの柄 +Huge Brown Mushroom All-Faces Stem=巨大な茶色キノコの柄(全面) +Brown mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.=茶色キノコは、暗闇の中で成長し広がる菌類ですが、光に弱いという特徴があります。食用には適しませんが、食品に加工することはできます。 +Red mushrooms are fungi which grow and spread in darkness, but are sensitive to light. They are inedible as such, but they can be used to craft food items.=赤色キノコは、暗闇で中で成長し広がる菌類ですが、光に弱いという特徴があります。食用には適しませんが、食品に加工することはできます。 +A single mushroom of this species will slowly spread over time towards a random solid opaque block with a light level of 12 or lower in a 3×3×3 cube around the mushroom. It stops spreading when there are 5 or more mushrooms of the same species within an area of 9×3×9 blocks around the mushroom.=この種のキノコは、キノコの周囲の3×3×3キューブ内にある光度12以下のランダムな不透明固体ブロックに向かって、時間経過と共にゆっくりと広がっていきます。キノコの周囲9×3×9ブロックの範囲に同じ種のキノコが5個以上あると、拡散を止めます。 +Mushrooms will eventually uproot at a light level of 12 or higher. On mycelium or podzol, they survive and spread at any light level.=キノコは、光量が12以上になると根こそぎになります。菌糸体やポドゾルの上では、どのような光量でも生き残り、広がっていきます。 +This mushroom can be placed on mycelium and podzol at any light level. It can also be placed on blocks which are both solid and opaque, as long as the light level at daytime is not higher than 12.=このキノコは、どんな光量でも菌糸体やポドゾルの上に置けます。また、昼間の光量が12以下であれば、固体や不透明なブロックの上にも置くことができます。 +Brown Mushroom=茶色キノコ +Red Mushroom=赤色キノコ +Mushroom Stew=キノコシチュー +Mushroom stew is a healthy soup which can be consumed to restore some hunger points.=キノコシチューは、満腹度を満たすために食べられるヘルシースープです。 +By placing huge mushroom blocks of the same species next to each other, the sides that touch each other will turn into pores permanently.=同種の巨大なキノコのブロックを隣り合わせに置くことで、接した面が永久に孔口になります。 +Grows on podzol, mycelium and other blocks=ポドゾル、菌糸体、その他のブロックに生育 +Spreads in darkness=暗闇の中で拡散 diff --git a/mods/ITEMS/mcl_nether/locale/mcl_nether.ja.tr b/mods/ITEMS/mcl_nether/locale/mcl_nether.ja.tr new file mode 100644 index 0000000000..3ba6bf9fe7 --- /dev/null +++ b/mods/ITEMS/mcl_nether/locale/mcl_nether.ja.tr @@ -0,0 +1,45 @@ +# textdomain: mcl_nether +Glowstone=グローストーン +Glowstone is a naturally-glowing block which is home to the Nether.=グローストーンは、ネザーをホームとする、自然に発光するブロックです。 +Nether Quartz Ore=ネザークォーツ鉱石 +Nether quartz ore is an ore containing nether quartz. It is commonly found around netherrack in the Nether.=ネザークォーツ鉱石は、ネザークォーツを含む鉱石です。ネザーの、ネザーラック周辺によく見られます。 +Netherrack=ネザーラック +Netherrack is a stone-like block home to the Nether. Starting a fire on this block will create an eternal fire.=ネザーラックは、ネザーにある石のようなブロックです。このブロックに火を点けると、永続的な炎が発生します。 +Magma Block=マグマブロック +Magma blocks are hot solid blocks which hurt anyone standing on it, unless they have fire resistance. Starting a fire on this block will create an eternal fire.=マグマブロックは高温の固体ブロックであり、その上に立つ者は、火耐性がない限りダメージを受けます。このブロック上で火を起こすと、永続的な炎が発生します。 +@1 stood too long on a magma block.=@1 はマグマブロックの上に長く立ちすぎました。 +Soul Sand=ソウルサンド +Soul sand is a block from the Nether. One can only slowly walk on soul sand. The slowing effect is amplified when the soul sand is on top of ice, packed ice or a slime block.=ソウルサンドはネザー由来のブロックです。ソウルサンド上ではゆっくりしか歩けません。ソウルサンドが氷や氷塊、スライムブロックの上にある場合、速度低下の効果が増幅されます。 +Nether Brick Block=ネザーレンガブロック +Red Nether Brick Block=赤いネザーレンガブロック +Nether Wart Block=ネザーウォートブロック +A nether wart block is a purely decorative block made from nether wart.=ネザーウォートブロックは、ネザーウォートを使った純粋な装飾用ブロックです。 +Block of Quartz=クォーツブロック +Chiseled Quartz Block=模様入りクォーツブロック +Pillar Quartz Block=クォーツブロックピラー +Smooth Quartz=滑らかなクォーツ +Glowstone Dust=グローストーンダスト +Glowstone dust is the dust which comes out of broken glowstones. It is mainly used in crafting.=グローストーンダストは、グローストーンが割れたときに出る粉です。主にクラフトに使用されます。 +Nether Quartz=ネザークォーツ +Nether quartz is a versatile crafting ingredient.=ネザークォーツは、汎用性の高いクラフト材料です。 +Nether Brick=ネザーレンガ +Nether bricks are the main crafting ingredient for crafting nether brick blocks and nether fences.=ネザーレンガは、ネザーレンガブロックやネザーフェンスを製作するための主なクラフト材料です。 +Nether Lava Source=ネザー溶岩源 +Flowing Nether Lava=流れるネザー溶岩 +Premature Nether Wart (Stage 1)=未成熟なネザーウォート(段階1) +A premature nether wart has just recently been planted on soul sand. Nether wart slowly grows on soul sand in 4 stages (the second and third stages look identical). Although nether wart is home to the Nether, it grows in any dimension.=未成熟なネザーウォートは、ソウルサンドに植えられたばかりです。ネザーウォートはソウルサンドの上で4段階に分けてゆっくりと成長します(2段階目と3段階目の見た目は同じ)。ネザーウォートはネザーに生息しているものの、どこの次元でも成長します。 +Premature Nether Wart (Stage 2)=未成熟なネザーウォート(段階2) +Premature Nether Wart (Stage 3)=未成熟なネザーウォート(段階3) +Mature Nether Wart=成熟したネザーウォート +The mature nether wart is a plant from the Nether and reached its full size and won't grow any further. It is ready to be harvested for its items.=成熟したネザーウォートは、フルサイズに達し成長の止まった、ネザー由来の植物です。もうアイテムとして収穫可能です。 +Nether Wart=ネザーウォート +Nether warts are plants home to the Nether. They can be planted on soul sand and grow in 4 stages.=ネザーウォート(ウォート=イボ)は、ネザーに生息する植物です。ソウルサンドに植えることができ、4段階に分けて成長します。 +Place this item on soul sand to plant it and watch it grow.=このアイテムをソウルサンドの上に置いて植えると、その成長を見ることができます。 +Burns your feet=足裏の火傷 +Grows on soul sand=ソウルサンドの上で育つ +Reduces walking speed=歩行速度 低下 +Netherite Scrap=ネザライトスクラップ +Netherite Ingot=ネザライトインゴット +Ancient Debris=古代の残骸 +Netherite Block=ネザライトブロック +Netherite block is very hard and can be made of 9 netherite ingots.=ネザライトブロックは、非常に硬く、9個のネザライトインゴットから作れます。 \ No newline at end of file diff --git a/mods/ITEMS/mcl_nether/textures/mcl_nether_gold_ore.png b/mods/ITEMS/mcl_nether/textures/mcl_nether_gold_ore.png new file mode 100644 index 0000000000..2a670e61ab Binary files /dev/null and b/mods/ITEMS/mcl_nether/textures/mcl_nether_gold_ore.png differ diff --git a/mods/ITEMS/mcl_ocean/kelp.lua b/mods/ITEMS/mcl_ocean/kelp.lua index 5cddabd300..5957bafb22 100644 --- a/mods/ITEMS/mcl_ocean/kelp.lua +++ b/mods/ITEMS/mcl_ocean/kelp.lua @@ -741,7 +741,7 @@ minetest.register_craftitem("mcl_ocean:kelp", { inventory_image = "mcl_ocean_kelp_item.png", wield_image = "mcl_ocean_kelp_item.png", on_place = kelp.kelp_on_place, - groups = {deco_block = 1, compostability = 30}, + groups = {deco_block = 1, compostability = 30, smoker_cookable = 1}, }) if mod_doc then diff --git a/mods/ITEMS/mcl_ocean/locale/mcl_ocean.ja.tr b/mods/ITEMS/mcl_ocean/locale/mcl_ocean.ja.tr new file mode 100644 index 0000000000..1db188129f --- /dev/null +++ b/mods/ITEMS/mcl_ocean/locale/mcl_ocean.ja.tr @@ -0,0 +1,60 @@ +# textdomain: mcl_ocean +Sea Lantern=シーランタン +Sea lanterns are decorative light sources which look great underwater but can be placed anywhere.=シーランタンは、水中で映える装飾的な光源ですが、どこにでも設置できます。 +Prismarine=プリズマリン +Prismarine is used as a building block. It slowly changes its color.=プリズマリンは、建築ブロックとして使用されます。 それはゆっくりと色を変えます。 +Prismarine Bricks=プリズマリンレンガ +Dark Prismarine=暗色プリズマリン +Prismarine Crystals=プリズマリンクリスタル +Prismarine Shard=プリズマリンの欠片 +Dried Kelp=乾燥コンブ +Dried Kelp Block=乾燥コンブブロック +Brain Coral Block=脳サンゴブロック +Brain Coral Fan=脳ウチワサンゴ +Brain Coral=脳サンゴ +Bubble Coral Block=泡サンゴブロック +Bubble Coral Fan=泡ウチワサンゴ +Bubble Coral=泡サンゴ +Fire Coral Block=火サンゴブロック +Fire Coral Fan=火ウチワサンゴ +Fire Coral=火サンゴ +Horn Coral Block=角サンゴブロック +Horn Coral Fan=角ウチワサンゴ +Horn Coral=角サンゴ +Tube Coral Block=管サンゴブロック +Tube Coral Fan=管ウチワサンゴ +Tube Coral=管サンゴ +Dead Brain Coral Block=死した脳サンゴブロック +Dead Brain Coral Fan=死した脳ウチワサンゴ +Dead Brain Coral=死した脳サンゴ +Dead Bubble Coral Block=死した泡サンゴブロック +Dead Bubble Coral Fan=死した泡ウチワサンゴ +Dead Bubble Coral=死した泡サンゴ +Dead Fire Coral Block=死した火サンゴブロック +Dead Fire Coral Fan=死した火ウチワサンゴ +Dead Fire Coral=死した火サンゴ +Dead Horn Coral Block=死した角サンゴブロック +Dead Horn Coral Fan=死した角ウチワサンゴ +Dead Horn Coral=死した角サンゴ +Dead Tube Coral Block=死した管サンゴブロック +Dead Tube Coral Fan=死した管ウチワサンゴ +Dead Tube Coral=死した管サンゴ +Seagrass=海草 +Kelp=コンブ +Kelp grows inside water on top of dirt, sand or gravel.=昆布が育つのは、水中の土・砂・砂利の上です。 +Coral blocks live in the oceans and need a water source next to them to survive. Without water, they die off.=サンゴのブロックは海に生息しており、生きていくためには隣に水源が必要です。水がないと死んでしまうのです。 +Corals grow on top of coral blocks and need to be inside a water source to survive. Without water, it will die off, as well as the coral block below.=サンゴはサンゴブロックの上で成長し、生きていくためには水源の中にいる必要があります。 水がなければ、下のサンゴブロックと同様に死んでしまいます。 +Corals fans grow on top of coral blocks and need to be inside a water source to survive. Without water, it will die off, as well as the coral block below.=ウチワサンゴはサンゴブロックの上で成長し、生きていくためには水源の中にいる必要があります。 水がなければ、下のサンゴブロックと同様に死んでしまいます。 +Seagrass grows inside water on top of dirt, sand or gravel.=海草が育つのは、水中の土・砂・砂利の上です。 +A decorative block that serves as a great furnace fuel.=炉の燃料として最適な装飾ブロック。 +Dried kelp is a food item.=乾燥コンブは食品です。 +Grows on coral block of same species=同種のサンゴブロックに生育 +Needs water to live=生きるために水が必要 +Grows in water on dirt, sand, gravel=水中の土・砂・砂利の上で成長 +Glows in the water=水中で成長 +4 possible sizes=4種類のサイズが可能 +Grows on dead brain coral block=死した脳サンゴブロックに生育 +Sea Pickle=ヒカリボヤ +Sea pickles grow on dead brain coral blocks and provide light when underwater. They come in 4 sizes that vary in brightness.=死した脳サンゴブロックに生え、水中での光源となるヒカリボヤ。明るさの異なる4種類のサイズがあります。 +It can only be placed on top of dead brain coral blocks. Placing a sea pickle on another sea pickle will make it grow and brighter.=死した脳サンゴブロックの上にしか置けません。ヒカリボヤを別のヒカリボヤの上に置くと成長し、明るくなります。 + diff --git a/mods/ITEMS/mcl_ocean/seagrass.lua b/mods/ITEMS/mcl_ocean/seagrass.lua index 2f58a28124..8213fec103 100644 --- a/mods/ITEMS/mcl_ocean/seagrass.lua +++ b/mods/ITEMS/mcl_ocean/seagrass.lua @@ -82,8 +82,8 @@ minetest.register_craftitem("mcl_ocean:seagrass", { description = S("Seagrass"), _tt_help = S("Grows in water on dirt, sand, gravel"), _doc_items_create_entry = false, - inventory_image = "mcl_ocean_seagrass.png^[verticalframe:12:0", - wield_image = "mcl_ocean_seagrass.png^[verticalframe:12:0", + inventory_image = "mcl_ocean_seagrass_item.png", + wield_image = "mcl_ocean_seagrass_item.png", on_place = seagrass_on_place, groups = {deco_block = 1, compostability = 30}, }) @@ -106,7 +106,7 @@ for s=1, #surfaces do doc_longdesc = S("Seagrass grows inside water on top of dirt, sand or gravel.") desc = S("Seagrass") doc_create = true - doc_img = "mcl_ocean_seagrass.png^[verticalframe:12:0" + doc_img = "mcl_ocean_seagrass_item.png" else doc_create = false end @@ -126,8 +126,8 @@ for s=1, #surfaces do animation = {type="vertical_frames", aspect_w=16, aspect_h=16, length=1.0}, } }, - inventory_image = "("..def.tiles[1]..")^(mcl_ocean_seagrass.png^[verticalframe:12:0)", - wield_image = "mcl_ocean_seagrass.png^[verticalframe:12:0", + inventory_image = "mcl_ocean_seagrass_item.png", + wield_image = "mcl_ocean_seagrass_item.png", selection_box = { type = "fixed", fixed = { diff --git a/mods/ITEMS/mcl_ocean/textures/mcl_ocean_seagrass_item.png b/mods/ITEMS/mcl_ocean/textures/mcl_ocean_seagrass_item.png new file mode 100644 index 0000000000..99b11dc294 Binary files /dev/null and b/mods/ITEMS/mcl_ocean/textures/mcl_ocean_seagrass_item.png differ diff --git a/mods/ITEMS/mcl_portals/locale/mcl_portals.ja.tr b/mods/ITEMS/mcl_portals/locale/mcl_portals.ja.tr new file mode 100644 index 0000000000..aea9846912 --- /dev/null +++ b/mods/ITEMS/mcl_portals/locale/mcl_portals.ja.tr @@ -0,0 +1,15 @@ +# textdomain: mcl_portals +End Portal=エンドポータル +An End portal teleports creatures and objects to the mysterious End dimension (and back!).=エンドポータルは、生物や物を不可思議なエンドの次元にテレポートさせます(また戻ってくる事も可能)。 +Hop into the portal to teleport. Entering an End portal in the Overworld teleports you to a fixed position in the End dimension and creates a 5×5 obsidian platform at your destination. End portals in the End will lead back to your spawn point in the Overworld.=ポータルに飛び込むとテレポート。(オーバーワールドにあるエンドポータルに入ると、エンド次元の固定位置にテレポートし、目的地に5×5の黒曜石のプラットフォームが作成されます。そのエンドポータルに入れば、オーバーワールドのスポーン地点に戻れます) +End Portal Frame=エンドポータル・フレーム +End portal frames are used in the construction of End portals. Each block has a socket for an eye of ender.=エンドポータル・フレームは、エンダーアイを入れるソケットがあり、エンドポータルの構築に使われます。 +NOTE: The End dimension is currently incomplete and might change in future versions.=注:エンド次元は現在未完成であり、将来のバージョンで変更される可能性があります。 +End Portal Frame with Eye of Ender=エンドポータル・フレーム(エンダーアイ入り) +Nether Portal=ネザーポータル +A Nether portal teleports creatures and objects to the hot and dangerous Nether dimension (and back!). Enter at your own risk!=ネザーポータルは、生物や物を熱くて危険なネザー次元にテレポートさせます(また戻ってくる事も可能)。入るのは自己責任で! +Stand in the portal for a moment to activate the teleportation. Entering a Nether portal for the first time will also create a new portal in the other dimension. If a Nether portal has been built in the Nether, it will lead to the Overworld. A Nether portal is destroyed if the any of the obsidian which surrounds it is destroyed, or if it was caught in an explosion.=ポータルの中でしばらく立っていると、テレポートが有効になります。初めて入った時は、異次元の方にも新たなポータルが作られます(それはオーバーワールドに通じています)。ネザーポータルは、それを囲む黒曜石のどれかが破壊されたり、爆発に巻き込まれたりすると壊れます。 +Obsidian is also used as the frame of Nether portals.=黒曜石は、ネザーポータルの枠組としても使われます。 +To open a Nether portal, place an upright frame of obsidian with a width of at least 4 blocks and a height of 5 blocks, leaving only air in the center. After placing this frame, light a fire in the obsidian frame. Nether portals only work in the Overworld and the Nether.=ネザーポータルを開くには、まず黒曜石で直立した枠組を構築します(幅4ブロック以上、高さ5ブロック以上。内側は中空にして黒曜石を配置)。その後、枠の中に火をつけます。ネザーポータルは、オーバーワールドとネザーでしか使えません。 +Once placed, an eye of ender can not be taken back.=エンダーアイは、一度置くと取り戻せません。 +Used to construct end portals=エンドポータルの構築に使用 diff --git a/mods/ITEMS/mcl_potions/commands.lua b/mods/ITEMS/mcl_potions/commands.lua index 1fbf591d9d..76ac71e723 100644 --- a/mods/ITEMS/mcl_potions/commands.lua +++ b/mods/ITEMS/mcl_potions/commands.lua @@ -19,6 +19,7 @@ get_chat_function["water_breathing"] = mcl_potions.water_breathing_func get_chat_function["leaping"] = mcl_potions.leaping_func get_chat_function["swiftness"] = mcl_potions.swiftness_func get_chat_function["heal"] = mcl_potions.healing_func +get_chat_function["bad_omen"] = mcl_potions.bad_omen_func minetest.register_chatcommand("effect",{ params = S(" []"), diff --git a/mods/ITEMS/mcl_potions/functions.lua b/mods/ITEMS/mcl_potions/functions.lua index 15be8a90c9..de3f6df10f 100644 --- a/mods/ITEMS/mcl_potions/functions.lua +++ b/mods/ITEMS/mcl_potions/functions.lua @@ -9,6 +9,7 @@ EF.leaping = {} EF.swift = {} -- for swiftness AND slowness EF.night_vision = {} EF.fire_proof = {} +EF.bad_omen = {} local EFFECT_TYPES = 0 for _,_ in pairs(EF) do @@ -350,6 +351,26 @@ minetest.register_globalstep(function(dtime) end + -- Check for Bad Omen + for player, vals in pairs(EF.bad_omen) do + + is_player = player:is_player() + + EF.bad_omen[player].timer = EF.bad_omen[player].timer + dtime + + if player:get_pos() then mcl_potions._add_spawner(player, "#0b6138") end + + if EF.bad_omen[player] and EF.bad_omen[player].timer >= EF.bad_omen[player].dur then + EF.bad_omen[player] = nil + if is_player then + meta = player:get_meta() + meta:set_string("_has_bad_omen", minetest.serialize(EF.bad_omen[player])) + potions_set_hud(player) + end + end + + end + end) -- Prevent damage to player with Fire Resistance enabled @@ -386,7 +407,8 @@ function mcl_potions._clear_cached_player_data(player) EF.swift[player] = nil EF.night_vision[player] = nil EF.fire_proof[player] = nil - + EF.bad_omen[player] = nil + meta = player:get_meta() meta:set_int("night_vision", 0) end @@ -400,9 +422,9 @@ function mcl_potions._reset_player_effects(player, set_hud) mcl_potions.make_invisible(player, false) playerphysics.remove_physics_factor(player, "jump", "mcl_potions:leaping") - + playerphysics.remove_physics_factor(player, "speed", "mcl_potions:swiftness") - + mcl_weather.skycolor.update_sky_color({player}) mcl_potions._clear_cached_player_data(player) @@ -429,6 +451,7 @@ function mcl_potions._save_player_effects(player) meta:set_string("_is_swift", minetest.serialize(EF.swift[player])) meta:set_string("_is_cat", minetest.serialize(EF.night_vision[player])) meta:set_string("_is_fire_proof", minetest.serialize(EF.fire_proof[player])) + meta:set_string("_has_bad_omen", minetest.serialize(EF.bad_omen[player])) end @@ -480,6 +503,10 @@ function mcl_potions._load_player_effects(player) EF.fire_proof[player] = minetest.deserialize(meta:get_string("_is_fire_proof")) end + if minetest.deserialize(meta:get_string("_has_bad_omen")) then + EF.bad_omen[player] = minetest.deserialize(meta:get_string("_has_bad_omen")) + end + end -- Returns true if player has given effect @@ -490,6 +517,18 @@ function mcl_potions.player_has_effect(player, effect_name) return EF[effect_name][player] ~= nil end +function mcl_potions.player_get_effect(player, effect_name) + if not EF[effect_name] or not EF[effect_name][player] then + return false + end + return EF[effect_name][player] +end + +function mcl_potions.player_clear_effect(player,effect) + EF[effect][player] = nil + potions_set_icons(player) +end + minetest.register_on_leaveplayer( function(player) mcl_potions._save_player_effects(player) mcl_potions._clear_cached_player_data(player) -- clearout the buffer to prevent looking for a player not there @@ -966,3 +1005,18 @@ function mcl_potions._extinguish_nearby_fire(pos, radius) end return exting end + +function mcl_potions.bad_omen_func(player, factor, duration) + if not EF.bad_omen[player] then + EF.bad_omen[player] = {dur = duration, timer = 0, factor = factor} + else + local victim = EF.bad_omen[player] + victim.dur = math.max(duration, victim.dur - victim.timer) + victim.timer = 0 + victim.factor = factor + end + + if player:is_player() then + potions_set_icons(player) + end +end diff --git a/mods/ITEMS/mcl_potions/locale/mcl_potions.ja.tr b/mods/ITEMS/mcl_potions/locale/mcl_potions.ja.tr new file mode 100644 index 0000000000..89e8fc9abe --- /dev/null +++ b/mods/ITEMS/mcl_potions/locale/mcl_potions.ja.tr @@ -0,0 +1,115 @@ +# textdomain: mcl_potions + []=<エフェクト> <デュレーション> [<ファクター>] + +Add a status effect to yourself. Arguments: : name of status effect, e.g. poison. : duration in seconds. : effect strength multiplier (1 @= 100%)=自分自身にステータス効果を付加する。引数は以下の通り。<エフェクト>: ステータス効果の名前。 <デュレーション>:継続時間(秒)。 <ファクター>: 効果の強さの倍率 (1 @= 100%)。 + +Missing effect parameter!=エフェクト のパラメータがありません! +Missing or invalid duration parameter!=デュレーション パラメータがないか、無効です! +Invalid factor parameter!=ファクター のパラメーターが無効です! +@1 is not an available status effect.=@1 は利用可能なステータス効果ではありません。 +Fermented Spider Eye=発酵したクモの目 +Glass Bottle=ガラス瓶 +Liquid container=液体用容器 + +A glass bottle is used as a container for liquids and can be used to collect water directly.=ガラス瓶は液体用の容器として使われ、直接 水を採取することができます。 + +To collect water, use it on a cauldron with water (which removes a level of water) or any water source (which removes no water).=水を集めるには、水の入った釜(水を1レベル取り除く)か、水源(水を全く取り除かない)に使用します。 + +Water Bottle=水入り瓶 +Water bottles can be used to fill cauldrons. Drinking water has no effect.=水入り瓶は大釜を満たすのに使えます。水を飲んでも効果はありません。 + +Use the “Place” key to drink. Place this item on a cauldron to pour the water into the cauldron.=飲むときは「置く」キーを使用します。このアイテムを大釜の上に置くと水を注げます。 + +River Water Bottle=河川水入り瓶 +River water bottles can be used to fill cauldrons. Drinking it has no effect.=河川水入り瓶は大釜を満たすのに使えます。飲んでも効果はありません。 + +Use the “Place” key to drink. Place this item on a cauldron to pour the river water into the cauldron.=「置く」キーで飲むことができます。このアイテムを大釜の上に置くと河川水を注げます。 + +Splash Water Bottle=水入り飛散瓶 +Extinguishes fire and hurts some mobs=火を消し、一部のモブにダメージを与える + +A throwable water bottle that will shatter on impact, where it extinguishes nearby fire and hurts mobs that are vulnerable to water.=投げられる水入り瓶で、衝撃で粉々になり、そこで近くの火を消したり、水に弱いモブにダメージを与えます。 + +Lingering Water Bottle=水入り滞留瓶 + +A throwable water bottle that will shatter on impact, where it creates a cloud of water vapor that lingers on the ground for a while. This cloud extinguishes fire and hurts mobs that are vulnerable to water.=投げられる水入り瓶で、衝撃で粉々になり、そこで水蒸気の雲を作り、しばらく地面に留まります。この雲は火を消し、水に弱いモブにダメージを与えます。 + +Glistering Melon=きらめくメロン + +This shiny melon is full of tiny gold nuggets and would be nice in an item frame. It isn't edible and not useful for anything else.=このピカピカのメロンには小さな金塊がたくさん入っていて、アイテムフレームに入れるといい感じです。食用ではないので、他の用途には使えません。 + +A throwable potion that will shatter on impact, where it creates a magic cloud that lingers around for a while. Any player or mob inside the cloud will receive the potion's effect, possibly repeatedly.=投げられるポーションで、衝撃を与えると粉々になり、魔法の雲を作り出し、しばらく周囲に留まります。雲の中にいるプレイヤーやモブはポーションの効果を繰り返し受けることができます。 + +Use the “Punch” key to throw it.=「パンチ」キーで投げます。 +Use the “Place” key to drink it.=「置く」キーで飲めます。 +Drinking a potion gives you a particular effect.=ポーションを飲むと、特定の効果が得られます。 +1 HP/@1s | @2=1 HP/@1s | @2 +@1 HP=@1 HP +@1 Potion=ポーション(@1) +Splash @1 Potion=飛散ポーション(@1) +Lingering @1 Potion=滞留ポーション(@1) +Arrow of @1=@1 の矢 + II= II + IV= IV +@1 Potion@2=ポーション(@1@2) +Splash @1@2 Potion=飛散ポーション(@1@2) +Lingering @1@2 Potion=滞留ポーション(@1@2) +Arrow of @1@2=@1@2 の矢 +@1 + Potion=ポーション(@1 +) +Splash @1 + Potion=飛散ポーション(@1 +) +Lingering @1 + Potion=滞留ポーション(@1 +) +Arrow of @1 +=@1 の矢 + +Awkward Potion=奇妙なポーション +Awkward Splash Potion=奇妙な飛散ポーション +Awkward Lingering Potion=奇妙な滞留ポーション +Has an awkward taste and is used for brewing potions.=味に癖があり、ポーションの醸造に使用されます。 +Mundane Potion=平凡なポーション +Mundane Splash Potion=平凡な飛散ポーション +Mundane Lingering Potion=平凡な滞留ポーション +Has a terrible taste and is not useful for brewing potions.=味は最悪で、ポーションの醸造には使えません。 +Thick Potion=濃厚なポーション +Thick Splash Potion=濃厚な飛散ポーション +Thick Lingering Potion=濃厚な滞留ポーション +Has a bitter taste and is not useful for brewing potions.=苦味があり、ポーションの醸造には使えません。 +Dragon's Breath=ドラゴンブレス + +This item is used in brewing and can be combined with splash potions to create lingering potions.=醸造に使用するアイテムで、飛散ポーションと組み合わせて滞留ポーションが作れます。 + +Healing=治癒 ++4 HP=+4 HP ++8 HP=+8 HP +Instantly heals.=即座に治癒します。 +Harming=負傷 +-6 HP=-6 HP +-12 HP=-12 HP +Instantly deals damage.=即座にダメージを与えます。 +Night Vision=暗視 +Increases the perceived brightness of light under a dark sky.=暗い空の下で、光の明るさを感じやすくします。 +Swiftness=加速 +Increases walking speed.=歩行速度が上がります。 +Slowness=減速 +Decreases walking speed.=歩行速度が下がります。 +Leaping=跳躍 +Increases jump strength.=ジャンプ力を高めます。 +Poison=毒薬 +Applies the poison effect which deals damage at a regular interval.=一定間隔でダメージを与える毒効果を及ぼします。 +Regeneration=再生 +Regenerates health over time.=時間経過でヘルスを回復します。 +Invisibility=透過 +Grants invisibility.=不可視性を付与します。 +Water Breathing=吸気 +Grants limitless breath underwater.=水中で無限の呼吸を付与します。 +Fire Resistance=耐火 +Grants immunity to damage from heat sources like fire.=火などの熱源から受けるダメージに対する免疫力を付与します。 +Weakness=弱化 +Weakness +=弱化 + +Strength=剛力 +Strength II=剛力 II +Strength +=剛力 + +Try different combinations to create potions.=いろいろな組み合わせを試して、ポーションを作ってみましょう。 +No effect=効果なし + +A throwable potion that will shatter on impact, where it gives all nearby players and mobs a status effect.=投げられるポーションで、衝撃で粉々になり、近くのプレイヤーやモブにステータス効果を与えます。 + +This particular arrow is tipped and will give an effect when it hits a player or mob.=この矢は先端が尖っており、プレイヤーやモブに当たると効果を発揮します。 + diff --git a/mods/ITEMS/mcl_potions/textures/mcl_potions_effect_bad_omen.png b/mods/ITEMS/mcl_potions/textures/mcl_potions_effect_bad_omen.png new file mode 100644 index 0000000000..dfe8f03326 Binary files /dev/null and b/mods/ITEMS/mcl_potions/textures/mcl_potions_effect_bad_omen.png differ diff --git a/mods/ITEMS/mcl_raw_ores/locale/mcl_raw_ores.ja.tr b/mods/ITEMS/mcl_raw_ores/locale/mcl_raw_ores.ja.tr new file mode 100644 index 0000000000..9be0296577 --- /dev/null +++ b/mods/ITEMS/mcl_raw_ores/locale/mcl_raw_ores.ja.tr @@ -0,0 +1,9 @@ +# textdomain: mcl_raw_ores +Raw Iron=鉄の粗鉱 +Raw Gold=金の粗鉱 +Raw Iron. Mine an Iron ore to get it.=未処理の鉄。鉄鉱石を採掘して入手します。 +Raw Gold. Mine a Gold ore to get it.=未処理の金。金鉱石を採掘して入手します。 +Block of Raw Iron=鉄の粗鉱ブロック +Block of Raw Gold=金の粗鉱ブロック +A block of raw Iron is mostly a decorative block but also useful as a compact storage of raw Iron.=鉄の粗鉱ブロックは、主に装飾用のブロックですが、鉄の粗鉱をコンパクトに収納するのにも便利です。 +A block of raw Gold is mostly a decorative block but also useful as a compact storage of raw Gold.=金の粗鉱ブロックは、主に装飾用のブロックですが、金の粗鉱をコンパクトに収納するのにも便利です。 \ No newline at end of file diff --git a/mods/ITEMS/mcl_shields/locale/mcl_shields.ja.tr b/mods/ITEMS/mcl_shields/locale/mcl_shields.ja.tr new file mode 100644 index 0000000000..794139e382 --- /dev/null +++ b/mods/ITEMS/mcl_shields/locale/mcl_shields.ja.tr @@ -0,0 +1,19 @@ +# textdomain: mcl_shields +Shield=盾 +A shield is a tool used for protecting the player against attacks.=盾は、攻撃からプレイヤーを守るために使う道具です。 +White Shield=盾(白色) +Grey Shield=盾(灰色) +Light Grey Shield=盾(薄灰色) +Black Shield=盾(黒色) +Red Shield=盾(赤色) +Yellow Shield=盾(黄色) +Green Shield=盾(緑色) +Cyan Shield=盾(青緑色) +Blue Shield=盾(青色) +Magenta Shield=盾(赤紫色) +Orange Shield=盾(橙色) +Purple Shield=盾(紫色) +Brown Shield=盾(茶色) +Pink Shield=盾(桃色) +Lime Shield=盾(黄緑色) +Light Blue Shield=盾(空色) diff --git a/mods/ITEMS/mcl_shields/textures/mcl_shield_hud.png b/mods/ITEMS/mcl_shields/textures/mcl_shield_hud.png index 4286d3e83c..f4d0b080f3 100644 Binary files a/mods/ITEMS/mcl_shields/textures/mcl_shield_hud.png and b/mods/ITEMS/mcl_shields/textures/mcl_shield_hud.png differ diff --git a/mods/ITEMS/mcl_signs/README.txt b/mods/ITEMS/mcl_signs/README.txt index 5ef65481ce..e4fbead8ad 100644 --- a/mods/ITEMS/mcl_signs/README.txt +++ b/mods/ITEMS/mcl_signs/README.txt @@ -2,7 +2,7 @@ --- # Mineclone2-Signs --- -A reworking of MineClone 2's mcl_signs to be colorable and made to glow. Rquires Minetest and Mineclone2. +A reworking of MineClone 2's mcl_signs to be colorable and made to glow. Requires Minetest and Mineclone2. --- Created by Michieal (FaerRaven) @ DateTime: 10/14/22 4:05 PM diff --git a/mods/ITEMS/mcl_signs/init.lua b/mods/ITEMS/mcl_signs/init.lua index 403b53ef84..e724def68c 100644 --- a/mods/ITEMS/mcl_signs/init.lua +++ b/mods/ITEMS/mcl_signs/init.lua @@ -125,9 +125,11 @@ mcl_signs.register_sign_craft("mcl_core", "mcl_core:junglewood", "_junglewood") mcl_signs.register_sign("mcl_core", "#ea7479", "_acaciawood", "Acacia Sign") mcl_signs.register_sign_craft("mcl_core", "mcl_core:acaciawood", "_acaciawood") --- mangrove_wood Sign "#c7545c" -mcl_signs.register_sign("mcl_core", "#b8693d", "_mangrove_wood", "Mangrove Sign") -mcl_signs.register_sign_craft("mcl_core", "mcl_core:mangrove_wood", "_mangrove_wood") +if minetest.get_modpath("mcl_mangrove") then + -- mangrove_wood Sign "#c7545c" + mcl_signs.register_sign("mcl_mangrove", "#b8693d", "_mangrove_wood", "Mangrove Sign") + mcl_signs.register_sign_craft("mcl_mangrove", "mcl_mangrove:mangrove_wood", "_mangrove_wood") +end -- add in the nether wood signs if minetest.get_modpath("mcl_crimson") then diff --git a/mods/ITEMS/mcl_signs/locale/mcl_signs.ja.tr b/mods/ITEMS/mcl_signs/locale/mcl_signs.ja.tr new file mode 100644 index 0000000000..c6b4032c38 --- /dev/null +++ b/mods/ITEMS/mcl_signs/locale/mcl_signs.ja.tr @@ -0,0 +1,16 @@ +# textdomain: mcl_signs +Sign=看板 +Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them.=看板は書くことができ、2つのバリエーションがあります(壁かけ看板と立て看板)。看板の設置は、他のブロックの上部と側面にできますが、下部にはできません。 +After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again. Can be colored and made to glow.=看板を設置した後、そこに何かを書き込めます。文字数は、1行あたり15文字で4行まで、それ以上は失われます。すべての文字がサポートされているわけではありません。一度書いた文字は変更できません(変えるには看板を壊して再配置)。着色や発光が可能です。 +Enter sign text:=看板の文字を入力: +Maximum line length: 15=1行あたりの最大文字数:15 +Maximum lines: 4=最大行数:4 +Done=完了 +Can be written=書き込み可能 +Oak Sign=オークの看板 +Birch Sign=シラカバの看板 +Spruce Sign=トウヒの看板 +Dark Oak Sign=ダークオークの看板 +Jungle Sign=ジャングルの看板 +Acacia Sign=アカシアの看板 +Mangrove Sign=マングローブの看板 diff --git a/mods/ITEMS/mcl_signs/signs_api.lua b/mods/ITEMS/mcl_signs/signs_api.lua index 9d88b8ed1b..1f7369ba3c 100644 --- a/mods/ITEMS/mcl_signs/signs_api.lua +++ b/mods/ITEMS/mcl_signs/signs_api.lua @@ -7,10 +7,9 @@ --local logging = minetest.settings:get_bool("mcl_logging_mcl_signs",true) local DEBUG = minetest.settings:get_bool("mcl_logging_mcl_signs", false) -- special debug setting. -local table = table -- copied from the original signs init file. if DEBUG then - minetest.log("action", "[mcl_signs] Signs API Loading") + minetest.log("action", "[mcl_signs] Signs API Loading") end -- LOCALIZATION @@ -29,12 +28,16 @@ local NUMBER_OF_LINES = 4 local LINE_HEIGHT = 14 local CHAR_WIDTH = 5 +local TIMER_INTERVAL = 40.0 -- ----------------------- +-- CACHE LOCAL COPIES +local table = table +local string = string -- CACHE NODE_SOUNDS local node_sounds if minetest.get_modpath("mcl_sounds") then - node_sounds = mcl_sounds.node_sound_wood_defaults() + node_sounds = mcl_sounds.node_sound_wood_defaults() end -- SET UP THE CHARACTER MAPPING @@ -55,17 +58,17 @@ local chars_file = io.open(modpath .. "/characters.txt", "r") -- FIXME: Support more characters (many characters are missing). Currently ASCII and Latin-1 Supplement are supported. local charmap = {} if not chars_file then - minetest.log("error", "[mcl_signs] : character map file not found") + minetest.log("error", "[mcl_signs] : character map file not found") else - while true do - local char = chars_file:read("*l") - if char == nil then - break - end - local img = chars_file:read("*l") - chars_file:read("*l") - charmap[char] = img - end + while true do + local char = chars_file:read("*l") + if char == nil then + break + end + local img = chars_file:read("*l") + chars_file:read("*l") + charmap[char] = img + end end local pi = 3.1415926 -- enough accuracy, to build an engine for a car. @@ -75,7 +78,7 @@ local math = math -- locally cached copy of the official colors; this way, it updates as mcl_colors updates. local mcl_colors_official = mcl_colors if DEBUG then - minetest.log("verbose", "[mcl_signs]Official MCL_Colors:\n" .. dump(mcl_colors_official)) + minetest.log("verbose", "[mcl_signs]Official MCL_Colors:\n" .. dump(mcl_colors_official)) end -- INITIALIZE THE GLOBAL API FOR SIGNS. @@ -85,22 +88,22 @@ mcl_signs = {} mcl_signs.sign_groups = { handy = 1, axey = 1, deco_block = 1, material_wood = 1, attached_node = 1, dig_by_piston = 1, flammable = -1 } --- colors used for wools. mcl_signs.mcl_wool_colors = { - unicolor_white = "#FFFFFF", - unicolor_dark_orange = "#502A00", - unicolor_grey = "#5B5B5B", - unicolor_darkgrey = "#303030", - unicolor_blue = "#0000CC", - unicolor_dark_green = "#005000", - unicolor_green_or_lime = "#50CC00", - unicolor_violet_purple = "#5000CC", - unicolor_light_red_pink = "#FF5050", - unicolor_yellow = "#CCCC00", - unicolor_orange = "#CC5000", - unicolor_red = "#CC0000", - unicolor_cyan = "#00CCCC", - unicolor_red_violet_magenta = "#CC0050", - unicolor_black = "#000000", - unicolor_light_blue = "#5050FF", + unicolor_white = "#FFFFFF", + unicolor_dark_orange = "#502A00", + unicolor_grey = "#5B5B5B", + unicolor_darkgrey = "#303030", + unicolor_blue = "#0000CC", + unicolor_dark_green = "#005000", + unicolor_green_or_lime = "#50CC00", + unicolor_violet_purple = "#5000CC", + unicolor_light_red_pink = "#FF5050", + unicolor_yellow = "#CCCC00", + unicolor_orange = "#CC5000", + unicolor_red = "#CC0000", + unicolor_cyan = "#00CCCC", + unicolor_red_violet_magenta = "#CC0050", + unicolor_black = "#000000", + unicolor_light_blue = "#5050FF", } mcl_signs.signtext_info_wall = {} mcl_signs.signtext_info_standing = {} -- built in build_signs_info(). @@ -117,400 +120,407 @@ mcl_signs.wall_standard = {} -- initialize mcl_signs.standing_standard = {} -- initialize function mcl_signs.build_signs_info() - local n = 23 / 56 - 1 / 128 -- some required magic number from the original code. - local m = -1 / 16 + 1 / 64 -- " " " " " " " " + local n = 23 / 56 - 1 / 128 -- some required magic number from the original code. + local m = -1 / 16 + 1 / 64 -- " " " " " " " " - mcl_signs.signtext_info_wall = { - { delta = { x = 0, y = 0, z = n }, yaw = 0 }, - { delta = { x = n, y = 0, z = 0 }, yaw = pi / -2 }, - { delta = { x = 0, y = 0, z = -n }, yaw = pi }, - { delta = { x = -n, y = 0, z = 0 }, yaw = pi / 2 }, - } + mcl_signs.signtext_info_wall = { + { delta = { x = 0, y = 0, z = n }, yaw = 0 }, + { delta = { x = n, y = 0, z = 0 }, yaw = pi / -2 }, + { delta = { x = 0, y = 0, z = -n }, yaw = pi }, + { delta = { x = -n, y = 0, z = 0 }, yaw = pi / 2 }, + } - -- PLACE YAW VALUES INTO THE TABLE. - for rot = 0, 15 do - local yaw = pi * 2 - (((pi * 2) / 16) * rot) - local delta = vector.multiply(minetest.yaw_to_dir(yaw), m) - -- Offset because sign is a bit above node boundaries - delta.y = delta.y + 2 / 28 - table.insert(mcl_signs.signtext_info_standing, { delta = delta, yaw = yaw }) - end + -- PLACE YAW VALUES INTO THE TABLE. + for rot = 0, 15 do + local yaw = pi * 2 - (((pi * 2) / 16) * rot) + local delta = vector.multiply(minetest.yaw_to_dir(yaw), m) + -- Offset because sign is a bit above node boundaries + delta.y = delta.y + 2 / 28 + table.insert(mcl_signs.signtext_info_standing, { delta = delta, yaw = yaw }) + end end -- wall signs' & hanging signs' base (definition) mcl_signs.wall_standard = { - description = S("Sign"), - _tt_help = S("Can be written"), - _doc_items_longdesc = S("Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them."), - _doc_items_usagehelp = S("After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again. Can be colored and made to glow."), - inventory_image = "default_sign.png", - walkable = false, - is_ground_content = false, - wield_image = "default_sign.png", - node_placement_prediction = "", - paramtype = "light", - sunlight_propagates = true, - paramtype2 = "wallmounted", - drawtype = "mesh", - mesh = "mcl_signs_signonwallmount.obj", - selection_box = { type = "wallmounted", wall_side = { -0.5, -7 / 28, -0.5, -23 / 56, 7 / 28, 0.5 } }, - tiles = { "mcl_signs_sign.png" }, - use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false, - groups = mcl_signs.sign_groups, - stack_max = 16, - sounds = node_sounds, + description = S("Sign"), + _tt_help = S("Can be written"), + _doc_items_longdesc = S("Signs can be written and come in two variants: Wall sign and sign on a sign post. Signs can be placed on the top and the sides of other blocks, but not below them."), + _doc_items_usagehelp = S("After placing the sign, you can write something on it. You have 4 lines of text with up to 15 characters for each line; anything beyond these limits is lost. Not all characters are supported. The text can not be changed once it has been written; you have to break and place the sign again. Can be colored and made to glow."), + inventory_image = "default_sign.png", + walkable = false, + is_ground_content = false, + wield_image = "default_sign.png", + node_placement_prediction = "", + paramtype = "light", + sunlight_propagates = true, + paramtype2 = "wallmounted", + drawtype = "mesh", + mesh = "mcl_signs_signonwallmount.obj", + selection_box = { type = "wallmounted", wall_side = { -0.5, -7 / 28, -0.5, -23 / 56, 7 / 28, 0.5 } }, + tiles = { "mcl_signs_sign.png" }, + use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false, + groups = mcl_signs.sign_groups, + stack_max = 16, + sounds = node_sounds, - on_place = function(itemstack, placer, pointed_thing) - local above = pointed_thing.above - local under = pointed_thing.under + on_timer = function(pos) + -- fix for /ClearObjects + mcl_signs:update_sign(pos) + -- note: update_sign decides to keep the timer running based on if there is text. + -- This prevents every sign from having a timer, when not needed. + end, - -- Use pointed node's on_rightclick function first, if present - local node_under = minetest.get_node(under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then - return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack - end - end + on_place = function(itemstack, placer, pointed_thing) + local above = pointed_thing.above + local under = pointed_thing.under - local dir = vector.subtract(under, above) + -- Use pointed node's on_rightclick function first, if present + local node_under = minetest.get_node(under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then + return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack + end + end - -- Only build when it's legal - local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] - if not abovenodedef or abovenodedef.buildable_to == false then - return itemstack - end + local dir = vector.subtract(under, above) - local wdir = minetest.dir_to_wallmounted(dir) + -- Only build when it's legal + local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] + if not abovenodedef or abovenodedef.buildable_to == false then + return itemstack + end - --local placer_pos = placer:get_pos() + local wdir = minetest.dir_to_wallmounted(dir) - local fdir = minetest.dir_to_facedir(dir) + --local placer_pos = placer:get_pos() - local sign_info - local nodeitem = ItemStack(itemstack) - -- Ceiling - if wdir == 0 then - --how would you add sign to ceiling? - return itemstack - -- Floor - end + local fdir = minetest.dir_to_facedir(dir) - if wdir == 1 then - -- Standing sign + local sign_info + local nodeitem = ItemStack(itemstack) + -- Ceiling + if wdir == 0 then + --how would you add sign to ceiling? + return itemstack + -- Floor + end - -- Determine the sign rotation based on player's yaw - local yaw = pi * 2 - placer:get_look_horizontal() + if wdir == 1 then + -- Standing sign - -- Select one of 16 possible rotations (0-15) - local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) + -- Determine the sign rotation based on player's yaw + local yaw = pi * 2 - placer:get_look_horizontal() - if rotation_level > 15 then - rotation_level = 0 - elseif rotation_level < 0 then - rotation_level = 15 - end + -- Select one of 16 possible rotations (0-15) + local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) - -- The actual rotation is a combination of predefined mesh and facedir (see node definition) - if rotation_level % 4 == 0 then - nodeitem:set_name("mcl_signs:standing_sign") - elseif rotation_level % 4 == 1 then - nodeitem:set_name("mcl_signs:standing_sign22_5") - elseif rotation_level % 4 == 2 then - nodeitem:set_name("mcl_signs:standing_sign45") - elseif rotation_level % 4 == 3 then - nodeitem:set_name("mcl_signs:standing_sign67_5") - end - fdir = math.floor(rotation_level / 4) + if rotation_level > 15 then + rotation_level = 0 + elseif rotation_level < 0 then + rotation_level = 15 + end - -- Place the node! - local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) - if not success then - return itemstack - end - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item() - end - sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] - -- Side - else - -- Wall sign - local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) - if not success then - return itemstack - end - sign_info = mcl_signs.signtext_info_wall[fdir + 1] - end + -- The actual rotation is a combination of predefined mesh and facedir (see node definition) + if rotation_level % 4 == 0 then + nodeitem:set_name("mcl_signs:standing_sign") + elseif rotation_level % 4 == 1 then + nodeitem:set_name("mcl_signs:standing_sign22_5") + elseif rotation_level % 4 == 2 then + nodeitem:set_name("mcl_signs:standing_sign45") + elseif rotation_level % 4 == 3 then + nodeitem:set_name("mcl_signs:standing_sign67_5") + end + fdir = math.floor(rotation_level / 4) - -- Determine spawn position of entity - local place_pos - if minetest.registered_nodes[node_under.name].buildable_to then - place_pos = under - else - place_pos = above - end + -- Place the node! + local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) + if not success then + return itemstack + end + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] + -- Side + else + -- Wall sign + local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) + if not success then + return itemstack + end + sign_info = mcl_signs.signtext_info_wall[fdir + 1] + end - local text_entity = minetest.add_entity({ - x = place_pos.x + sign_info.delta.x, - y = place_pos.y + sign_info.delta.y, - z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") - text_entity:set_yaw(sign_info.yaw) - text_entity:get_luaentity()._signnodename = nodeitem:get_name() - if DEBUG then - minetest.log("verbose", "[mcl_signs]Placed position:" .. dump(place_pos) .. "\nSign_info: " .. dump(sign_info)) - end + -- Determine spawn position of entity + local place_pos + if minetest.registered_nodes[node_under.name].buildable_to then + place_pos = under + else + place_pos = above + end - minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) + local text_entity = minetest.add_entity({ + x = place_pos.x + sign_info.delta.x, + y = place_pos.y + sign_info.delta.y, + z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") + text_entity:set_yaw(sign_info.yaw) + text_entity:get_luaentity()._signnodename = nodeitem:get_name() + if DEBUG then + minetest.log("verbose", "[mcl_signs]Placed position:" .. dump(place_pos) .. "\nSign_info: " .. dump(sign_info)) + end - mcl_signs:show_formspec(placer, place_pos) - return itemstack - end, - on_destruct = function(pos) - mcl_signs:destruct_sign(pos) - end, + minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) - -- Not Useless Code. force updates the sign. - on_punch = function(pos, node, puncher) - mcl_signs:update_sign(pos) - if DISINTEGRATE then - mcl_signs:destruct_sign(pos) - end - end, - on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - local r = screwdriver.rotate.wallmounted(pos, node, mode) - node.param2 = r - minetest.swap_node(pos, node) - mcl_signs:update_sign(pos, nil, nil, true) - return true - else - return false - end - end, - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - if DEBUG then - minetest.log("verbose", "[mcl_signs] Wall_Sign Right Click event.") - end + mcl_signs:show_formspec(placer, place_pos) + return itemstack + end, + on_destruct = function(pos) + mcl_signs:destruct_sign(pos) + end, - -- make sure player is clicking - if not clicker or not clicker:is_player() then - return - end + -- Not Useless Code. force updates the sign. + on_punch = function(pos, node, puncher) + mcl_signs:update_sign(pos) + end, + on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + local r = screwdriver.rotate.wallmounted(pos, node, mode) + node.param2 = r + minetest.swap_node(pos, node) + mcl_signs:update_sign(pos, nil, nil, true) + return true + else + return false + end + end, + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + if DEBUG then + minetest.log("verbose", "[mcl_signs] Wall_Sign Right Click event.") + end - local item = clicker:get_wielded_item() - local iname = item:get_name() + -- make sure player is clicking + if not clicker or not clicker:is_player() then + return + end - if node then - if DEBUG then - minetest.log("verbose", "[mcl_signs] Wall_Sign Right Click event on valid node.") - end + local item = clicker:get_wielded_item() + local iname = item:get_name() - -- handle glow from glow_ink_sac *first* - if (iname == "mcl_mobitems:glow_ink_sac") then - clicker:set_wielded_item(item) - local success = mcl_signs:glow_sign(pos) - if success then - if DEBUG then - minetest.log("verbose", "[mcl_signs] Sign Glow Success.") - end - itemstack:take_item() - end - return - end + if node then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Wall_Sign Right Click event on valid node.") + end - -- "mcl_dye:black" is a special case: it makes the sign's lettering black AND removes glow. - if (iname == "mcl_dye:black") then - clicker:set_wielded_item(item) - local success = mcl_signs:glow_sign(pos, true) - mcl_signs:color_sign(pos, mcl_colors.BLACK) - if success then - if DEBUG then - minetest.log("verbose", "[mcl_signs] Sign Glow removal Success.") - end + -- handle glow from glow_ink_sac *first* + if (iname == "mcl_mobitems:glow_ink_sac") then + clicker:set_wielded_item(item) + local success = mcl_signs:glow_sign(pos) + if success then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Sign Glow Success.") + end + itemstack:take_item() + end + return + end - itemstack:take_item() - end - return - end + -- "mcl_dye:black" is a special case: it makes the sign's lettering black AND removes glow. + if (iname == "mcl_dye:black") then + clicker:set_wielded_item(item) + local success = mcl_signs:glow_sign(pos, true) + mcl_signs:color_sign(pos, mcl_colors.BLACK) + if success then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Sign Glow removal Success.") + end - -- check the wielded item to make sure that it is a dye. - local txt_color = mcl_signs:get_color_for_sign(iname) - if txt_color ~= "false" then - clicker:set_wielded_item(item) - local success = mcl_signs:color_sign(pos, txt_color) - if success then - if DEBUG then - minetest.log("verbose", "[mcl_signs] Sign Color Success.") - end - itemstack:take_item() - end - end - end - end, + itemstack:take_item() + end + return + end - _mcl_hardness = 1, - _mcl_blast_resistance = 1, + -- check the wielded item to make sure that it is a dye. + local txt_color = mcl_signs:get_color_for_sign(iname) + if txt_color ~= "false" then + clicker:set_wielded_item(item) + local success = mcl_signs:color_sign(pos, txt_color) + if success then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Sign Color Success.") + end + itemstack:take_item() + end + end + end + end, + + _mcl_hardness = 1, + _mcl_blast_resistance = 1, } -- standing sign base (definition) mcl_signs.standing_standard = { - paramtype = "light", - use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false, - sunlight_propagates = true, - walkable = false, - is_ground_content = false, - paramtype2 = "facedir", - drawtype = "mesh", - mesh = "mcl_signs_sign.obj", - selection_box = { type = "fixed", fixed = { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } }, - tiles = { "mcl_signs_sign.png" }, - groups = mcl_signs.sign_groups, - drop = "mcl_signs:wall_sign", - stack_max = 16, - sounds = node_sounds, + paramtype = "light", + use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "opaque" or false, + sunlight_propagates = true, + walkable = false, + is_ground_content = false, + paramtype2 = "facedir", + drawtype = "mesh", + mesh = "mcl_signs_sign.obj", + selection_box = { type = "fixed", fixed = { -0.2, -0.5, -0.2, 0.2, 0.5, 0.2 } }, + tiles = { "mcl_signs_sign.png" }, + groups = mcl_signs.sign_groups, + drop = "mcl_signs:wall_sign", + stack_max = 16, + sounds = node_sounds, - on_destruct = function(pos) - mcl_signs:destruct_sign(pos) - end, + on_destruct = function(pos) + mcl_signs:destruct_sign(pos) + end, - -- Not Useless Code. this force updates the sign. - on_punch = function(pos, node, puncher) - mcl_signs:update_sign(pos) - if DISINTEGRATE then - mcl_signs:destruct_sign(pos) - end - end, - on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign22_5" - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end, + on_timer = function(pos) + -- fix for /ClearObjects + mcl_signs:update_sign(pos) + minetest.get_node_timer(pos):start(40.0) + end, - on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) + -- Not Useless Code. this force updates the sign. + on_punch = function(pos, node, puncher) + mcl_signs:update_sign(pos) + end, + on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign22_5" + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end, - if DEBUG then - minetest.log("verbose", "[mcl_signs] Standing_Sign Right Click event.") - end + on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) - -- make sure player is clicking - if not clicker or not clicker:is_player() then - return - end + if DEBUG then + minetest.log("verbose", "[mcl_signs] Standing_Sign Right Click event.") + end - local item = clicker:get_wielded_item() - local iname = item:get_name() + -- make sure player is clicking + if not clicker or not clicker:is_player() then + return + end - if node then - -- handle glow from glow_ink_sac *first* - if DEBUG then - minetest.log("verbose", "[mcl_signs] Standing_Sign Right Click event on valid node.") - end + local item = clicker:get_wielded_item() + local iname = item:get_name() - if (iname == "mcl_mobitems:glow_ink_sac") then - clicker:set_wielded_item(item) - local success = mcl_signs:glow_sign(pos) - if success then - if DEBUG then - minetest.log("verbose", "[mcl_signs] Sign Glow Success.") - end - itemstack:take_item() - end - return - end + if node then + -- handle glow from glow_ink_sac *first* + if DEBUG then + minetest.log("verbose", "[mcl_signs] Standing_Sign Right Click event on valid node.") + end - -- check the wielded item to make sure that it is a dye. - local txt_color = mcl_signs:get_color_for_sign(iname) - if txt_color ~= "false" then - clicker:set_wielded_item(item) - local success = mcl_signs:color_sign(pos, txt_color) - if success then - if DEBUG then - minetest.log("verbose", "[mcl_signs] Sign Color Success.") - end - itemstack:take_item() - end - end - end - end, + if (iname == "mcl_mobitems:glow_ink_sac") then + clicker:set_wielded_item(item) + local success = mcl_signs:glow_sign(pos) + if success then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Sign Glow Success.") + end + itemstack:take_item() + end + return + end - _mcl_hardness = 1, - _mcl_blast_resistance = 1, + -- check the wielded item to make sure that it is a dye. + local txt_color = mcl_signs:get_color_for_sign(iname) + if txt_color ~= "false" then + clicker:set_wielded_item(item) + local success = mcl_signs:color_sign(pos, txt_color) + if success then + if DEBUG then + minetest.log("verbose", "[mcl_signs] Sign Color Success.") + end + itemstack:take_item() + end + end + end + end, + + _mcl_hardness = 1, + _mcl_blast_resistance = 1, } -- HELPER FUNCTIONS' VARIABLES local sign_glow = 6 local Dyes_table = { - { "mcl_dye:aqua", mcl_colors_official.AQUA }, - { "mcl_dye:black", mcl_colors_official.BLACK }, - { "mcl_dye:blue", mcl_colors_official.BLUE }, - { "mcl_dye:brown", mcl_colors_official.brown }, - { "mcl_dye:cyan", mcl_signs.mcl_wool_colors.unicolor_cyan }, - { "mcl_dye:green", mcl_colors_official.GREEN }, - { "mcl_dye:dark_green", mcl_colors_official.DARK_GREEN }, - { "mcl_dye:grey", mcl_colors_official.GRAY }, - { "mcl_dye:dark_grey", mcl_colors_official.DARK_GRAY }, - { "mcl_dye:lightblue", mcl_signs.mcl_wool_colors.unicolor_light_blue }, - { "mcl_dye:lime", mcl_signs.unicolor_green_or_lime }, - { "mcl_dye:magenta", mcl_colors_official.LIGHT_PURPLE }, - { "mcl_dye:orange", mcl_signs.mcl_wool_colors.unicolor_orange }, - { "mcl_dye:pink", mcl_signs.mcl_wool_colors.unicolor_light_red_pink }, - { "mcl_dye:purple", mcl_colors_official.LIGHT_PURPLE }, - { "mcl_dye:red", mcl_signs.mcl_wool_colors.unicolor_red }, - { "mcl_dye:silver", mcl_signs.mcl_wool_colors.unicolor_grey }, - { "mcl_dye:violet", mcl_colors_official.DARK_PURPLE }, - { "mcl_dye:white", mcl_colors_official.WHITE }, - { "mcl_dye:yellow", mcl_colors_official.YELLOW }, + { "mcl_dye:aqua", mcl_colors_official.AQUA }, + { "mcl_dye:black", mcl_colors_official.BLACK }, + { "mcl_dye:blue", mcl_colors_official.BLUE }, + { "mcl_dye:brown", mcl_colors_official.brown }, + { "mcl_dye:cyan", mcl_signs.mcl_wool_colors.unicolor_cyan }, + { "mcl_dye:green", mcl_colors_official.GREEN }, + { "mcl_dye:dark_green", mcl_colors_official.DARK_GREEN }, + { "mcl_dye:grey", mcl_colors_official.GRAY }, + { "mcl_dye:dark_grey", mcl_colors_official.DARK_GRAY }, + { "mcl_dye:lightblue", mcl_signs.mcl_wool_colors.unicolor_light_blue }, + { "mcl_dye:lime", mcl_signs.unicolor_green_or_lime }, + { "mcl_dye:magenta", mcl_colors_official.LIGHT_PURPLE }, + { "mcl_dye:orange", mcl_signs.mcl_wool_colors.unicolor_orange }, + { "mcl_dye:pink", mcl_signs.mcl_wool_colors.unicolor_light_red_pink }, + { "mcl_dye:purple", mcl_colors_official.LIGHT_PURPLE }, + { "mcl_dye:red", mcl_signs.mcl_wool_colors.unicolor_red }, + { "mcl_dye:silver", mcl_signs.mcl_wool_colors.unicolor_grey }, + { "mcl_dye:violet", mcl_colors_official.DARK_PURPLE }, + { "mcl_dye:white", mcl_colors_official.WHITE }, + { "mcl_dye:yellow", mcl_colors_official.YELLOW }, } local function update_sign_registry(type, name) - if type == "wall" then - table.insert(mcl_signs.registered_signs.wall_signs, name) - end - if type == "standing" then - table.insert(mcl_signs.registered_signs.standing_signs, name) - end - if type == "hanging" then - table.insert(mcl_signs.registered_signs.hanging_signs, name) - end + if type == "wall" then + table.insert(mcl_signs.registered_signs.wall_signs, name) + end + if type == "standing" then + table.insert(mcl_signs.registered_signs.standing_signs, name) + end + if type == "hanging" then + table.insert(mcl_signs.registered_signs.hanging_signs, name) + end end function mcl_signs.make_lbm() - local registered_sign_nodenames = {} + local registered_sign_nodenames = {} - for i = 0, #mcl_signs.registered_signs.wall_signs do - table.insert(registered_sign_nodenames, mcl_signs.registered_signs.wall_signs[i]) - end + for i = 0, #mcl_signs.registered_signs.wall_signs do + table.insert(registered_sign_nodenames, mcl_signs.registered_signs.wall_signs[i]) + end - for i = 0, #mcl_signs.registered_signs.standing_signs do - table.insert(registered_sign_nodenames, mcl_signs.registered_signs.standing_signs[i]) - end + for i = 0, #mcl_signs.registered_signs.standing_signs do + table.insert(registered_sign_nodenames, mcl_signs.registered_signs.standing_signs[i]) + end - for i = 0, #mcl_signs.registered_signs.hanging_signs do - table.insert(registered_sign_nodenames, mcl_signs.registered_signs.hanging_signs[i]) - end + for i = 0, #mcl_signs.registered_signs.hanging_signs do + table.insert(registered_sign_nodenames, mcl_signs.registered_signs.hanging_signs[i]) + end - -- the above is not yet used. - minetest.register_lbm({ - name = "mcl_signs:respawn_entities", - label = "Respawn sign text entities", - run_at_every_load = true, - nodenames = registered_sign_nodenames , - action = function(pos, node) - mcl_signs:update_sign(pos) - end, - }) + -- the above is not yet used. + minetest.register_lbm({ + name = "mcl_signs:respawn_entities", + label = "Respawn sign text entities", + run_at_every_load = true, + nodenames = registered_sign_nodenames, + action = function(pos, node) + mcl_signs:update_sign(pos) + end, + }) end function mcl_signs.register_dye (modname, item_name, color_code) - if minetest.get_modpath(modname) then - table.insert(Dyes_table, { item_name, color_code }) - end + if minetest.get_modpath(modname) then + table.insert(Dyes_table, { item_name, color_code }) + end end --- Register a new sign, tint the textures, and gives it an unique node name. Creates both wall and standing signs. @@ -524,227 +534,232 @@ end --- ttsign: the tool tip of the sign that gets translated. Shown when the mouse hovers the inventory sign. --- For example: the basic, default oak (wood) sign is just "Sign"; and a spruce sign would be "Spruce Sign" function mcl_signs.register_sign (modname, color, _name, ttsign) - local mod_name_pass = false - if modname ~= "" and modname ~= "false" then - if minetest.get_modpath(modname) then - mod_name_pass = true - end - if mod_name_pass == false then - return - end - end - local new_sign = {} + local mod_name_pass = false + if modname ~= "" and modname ~= "false" then + if minetest.get_modpath(modname) then + mod_name_pass = true + end + if mod_name_pass == false then + return + end + end + local new_sign = {} - if color == nil or color == "" then - color = "#FFFFFF" - end + if color == nil or color == "" then + color = "#FFFFFF" + end - new_sign = table.copy(mcl_signs.wall_standard) - new_sign.description = S(ttsign) + new_sign = table.copy(mcl_signs.wall_standard) + new_sign.description = S(ttsign) - new_sign.wield_image = "(default_sign.png^[multiply:" .. color .. ")" - new_sign.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } - new_sign.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" + new_sign.wield_image = "(default_sign.png^[multiply:" .. color .. ")" + new_sign.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } + new_sign.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" - -- currently have to do this, because of how the base node placement works. - new_sign.on_place = function(itemstack, placer, pointed_thing) - local above = pointed_thing.above - local under = pointed_thing.under + -- currently have to do this, because of how the base node placement works. + new_sign.on_place = function(itemstack, placer, pointed_thing) + local above = pointed_thing.above + local under = pointed_thing.under - -- Use pointed node's on_rightclick function first, if present - local node_under = minetest.get_node(under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then - return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack - end - end + -- Use pointed node's on_rightclick function first, if present + local node_under = minetest.get_node(under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then + return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack + end + end - local dir = vector.subtract(under, above) + local dir = vector.subtract(under, above) - -- Only build when it's legal - local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] - if not abovenodedef or abovenodedef.buildable_to == false then - return itemstack - end + -- Only build when it's legal + local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] + if not abovenodedef or abovenodedef.buildable_to == false then + return itemstack + end - local wdir = minetest.dir_to_wallmounted(dir) - local fdir = minetest.dir_to_facedir(dir) + local wdir = minetest.dir_to_wallmounted(dir) + local fdir = minetest.dir_to_facedir(dir) - local sign_info - local nodeitem = ItemStack(itemstack) - -- Ceiling - if wdir == 0 then - --how would you add sign to ceiling? - return itemstack - -- Floor - elseif wdir == 1 then - -- Standing sign + local sign_info + local nodeitem = ItemStack(itemstack) - -- Determine the sign rotation based on player's yaw - local yaw = pi * 2 - placer:get_look_horizontal() + local yaw = 0 - -- Select one of 16 possible rotations (0-15) - local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) + -- Ceiling + if wdir == 0 then + --how would you add sign to ceiling? simple - hanging sign. + -- add code for placement underneath a node. - if rotation_level > 15 then - rotation_level = 0 - elseif rotation_level < 0 then - rotation_level = 15 - end + return itemstack + -- Floor + elseif wdir == 1 then + -- Standing sign - -- The actual rotation is a combination of predefined mesh and facedir (see node definition) - if rotation_level % 4 == 0 then - nodeitem:set_name("mcl_signs:standing_sign" .. _name) - elseif rotation_level % 4 == 1 then - nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) - elseif rotation_level % 4 == 2 then - nodeitem:set_name("mcl_signs:standing_sign45" .. _name) - elseif rotation_level % 4 == 3 then - nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) - end - fdir = math.floor(rotation_level / 4) + -- Determine the sign rotation based on player's yaw + yaw = pi * 2 - placer:get_look_horizontal() - -- Place the node! - local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) - if not success then - return itemstack - end - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item() - end - sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] - -- Side - else - -- Wall sign - local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) - if not success then - return itemstack - end - sign_info = mcl_signs.signtext_info_wall[fdir + 1] - end + -- Select one of 16 possible rotations (0-15) + local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) - -- Determine spawn position of entity - local place_pos - if minetest.registered_nodes[node_under.name].buildable_to then - place_pos = under - else - place_pos = above - end + if rotation_level > 15 then + rotation_level = 0 + elseif rotation_level < 0 then + rotation_level = 15 + end - if DEBUG then - minetest.log("action", "[mcl_signs] Register_Sign::Placed position:" .. dump(place_pos) .. "\nSign_info: " .. dump(sign_info)) - end + -- The actual rotation is a combination of predefined mesh and facedir (see node definition) + if rotation_level % 4 == 0 then + nodeitem:set_name("mcl_signs:standing_sign" .. _name) + elseif rotation_level % 4 == 1 then + nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) + elseif rotation_level % 4 == 2 then + nodeitem:set_name("mcl_signs:standing_sign45" .. _name) + elseif rotation_level % 4 == 3 then + nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) + end + fdir = math.floor(rotation_level / 4) - local text_entity = minetest.add_entity({ - x = place_pos.x + sign_info.delta.x, - y = place_pos.y + sign_info.delta.y, - z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") - text_entity:set_yaw(sign_info.yaw) - text_entity:get_luaentity()._signnodename = nodeitem:get_name() + -- Place the node! + local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) + if not success then + return itemstack + end + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] + -- Side + else + -- Wall sign + local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) + if not success then + return itemstack + end + sign_info = mcl_signs.signtext_info_wall[fdir + 1] + end - minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) + -- Determine spawn position of entity + local place_pos + if minetest.registered_nodes[node_under.name].buildable_to then + place_pos = under + else + place_pos = above + end - mcl_signs:show_formspec(placer, place_pos) - return itemstack - end + if DEBUG then + minetest.log("action", "[mcl_signs] Register_Sign::Placed position:" .. dump(place_pos) .. "\nSign_info: " .. dump(sign_info)) + end - minetest.register_node("mcl_signs:wall_sign" .. _name, new_sign) - update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) + local text_entity = minetest.add_entity({ + x = place_pos.x + sign_info.delta.x, + y = place_pos.y + sign_info.delta.y, + z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") + text_entity:set_yaw(sign_info.yaw) + text_entity:get_luaentity()._signnodename = nodeitem:get_name() - -- debug step - if DEBUG then - minetest.log("action", "[mcl_signs] Registered: mcl_signs:wall_sign" .. _name .. color .. "\n" .. dump(new_sign)) - minetest.log("action", "[mcl_signs] mcl_signs:wall_sign_standard\n" .. dump(mcl_signs.wall_standard)) - end + minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) - -- standing sign base. - local new_sign_standing = {} - new_sign_standing = table.copy(mcl_signs.standing_standard) - new_sign_standing.drop = "mcl_signs:wall_sign" .. _name - new_sign_standing.wield_image = "(default_sign.png^[multiply:" .. color .. ")" - new_sign_standing.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } - new_sign_standing.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" + mcl_signs:show_formspec(placer, place_pos) + return itemstack + end - new_sign_standing.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign22_5" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end, + minetest.register_node(":mcl_signs:wall_sign" .. _name, new_sign) + update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) - minetest.register_node("mcl_signs:standing_sign" .. _name, new_sign_standing) - update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) - -- debug step - if DEBUG then - minetest.log("action", "[mcl_signs] Registered: mcl_signs:standing_sign" .. _name .. color .. "\n" .. dump(new_sign_standing)) - end + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Registered: mcl_signs:wall_sign" .. _name .. color .. "\n" .. dump(new_sign)) + minetest.log("action", "[mcl_signs] mcl_signs:wall_sign_standard\n" .. dump(mcl_signs.wall_standard)) + end - -- 22.5° - local ssign22_5d = table.copy(new_sign_standing) - ssign22_5d.mesh = "mcl_signs_sign22.5.obj" - ssign22_5d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign45" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.register_node("mcl_signs:standing_sign22_5" .. _name, ssign22_5d) - update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) + -- standing sign base. + local new_sign_standing = {} + new_sign_standing = table.copy(mcl_signs.standing_standard) + new_sign_standing.drop = "mcl_signs:wall_sign" .. _name + new_sign_standing.wield_image = "(default_sign.png^[multiply:" .. color .. ")" + new_sign_standing.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } + new_sign_standing.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" - -- 45° - local ssign45d = table.copy(new_sign_standing) - ssign45d.mesh = "mcl_signs_sign45.obj" - ssign45d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign67_5" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.register_node("mcl_signs:standing_sign45" .. _name, ssign45d) - update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) + new_sign_standing.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign22_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end, - -- 67.5° - local ssign67_5d = table.copy(new_sign_standing) - ssign67_5d.mesh = "mcl_signs_sign67.5.obj" - ssign67_5d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign" .. _name - node.param2 = (node.param2 + 1) % 4 - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.register_node("mcl_signs:standing_sign67_5" .. _name, ssign67_5d) - update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) + minetest.register_node(":mcl_signs:standing_sign" .. _name, new_sign_standing) + update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Registered: mcl_signs:standing_sign" .. _name .. color .. "\n" .. dump(new_sign_standing)) + end - -- register Doc entry - if minetest.get_modpath("doc") then - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) - end + -- 22.5° + local ssign22_5d = table.copy(new_sign_standing) + ssign22_5d.mesh = "mcl_signs_sign22.5.obj" + ssign22_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign45" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node(":mcl_signs:standing_sign22_5" .. _name, ssign22_5d) + update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) - --register standing sign's rotation_levels - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign22_5" .. _name , 1}) - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign45" .. _name , 2}) - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign67_5" .. _name , 3}) + -- 45° + local ssign45d = table.copy(new_sign_standing) + ssign45d.mesh = "mcl_signs_sign45.obj" + ssign45d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign67_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node(":mcl_signs:standing_sign45" .. _name, ssign45d) + update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) + + -- 67.5° + local ssign67_5d = table.copy(new_sign_standing) + ssign67_5d.mesh = "mcl_signs_sign67.5.obj" + ssign67_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign" .. _name + node.param2 = (node.param2 + 1) % 4 + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node(":mcl_signs:standing_sign67_5" .. _name, ssign67_5d) + update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) + + -- register Doc entry + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) + end + + --register standing sign's rotation_levels + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign22_5" .. _name, 1 }) + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign45" .. _name, 2 }) + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign67_5" .. _name, 3 }) end --- The same as register_sign, except caller defines the textures. Note, there is a greyscale version of the sign, @@ -769,205 +784,205 @@ end --- ttsign: the tool tip of the sign that gets translated. Shown when the mouse hovers the inventory sign. --- For example: the basic, default oak (wood) sign is just "Sign"; and a spruce sign would be "Spruce Sign" function mcl_signs.register_sign_custom (modname, _name, tiles, color, inventory_image, wield_image, ttsign) - local mod_name_pass = false - if modname ~= "" and modname ~= "false" then - if minetest.get_modpath(modname) then - mod_name_pass = true - end - if mod_name_pass == false then - return - end - end - local new_sign = {} + local mod_name_pass = false + if modname ~= "" and modname ~= "false" then + if minetest.get_modpath(modname) then + mod_name_pass = true + end + if mod_name_pass == false then + return + end + end + local new_sign = {} - new_sign = table.copy(mcl_signs.wall_standard) + new_sign = table.copy(mcl_signs.wall_standard) - new_sign.wield_image ="("..wield_image.."^[multiply:" .. color .. ")" - new_sign.tiles = { "("..tiles.."^[multiply:" .. color .. ")" } - new_sign.inventory_image = "("..inventory_image.."^[multiply:" .. color .. ")" - new_sign.description = S(ttsign) - -- currently have to do this, because of how the base node placement works. - new_sign.on_place = function(itemstack, placer, pointed_thing) - local above = pointed_thing.above - local under = pointed_thing.under + new_sign.wield_image = "(" .. wield_image .. "^[multiply:" .. color .. ")" + new_sign.tiles = { "(" .. tiles .. "^[multiply:" .. color .. ")" } + new_sign.inventory_image = "(" .. inventory_image .. "^[multiply:" .. color .. ")" + new_sign.description = S(ttsign) + -- currently have to do this, because of how the base node placement works. + new_sign.on_place = function(itemstack, placer, pointed_thing) + local above = pointed_thing.above + local under = pointed_thing.under - -- Use pointed node's on_rightclick function first, if present - local node_under = minetest.get_node(under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then - return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack - end - end + -- Use pointed node's on_rightclick function first, if present + local node_under = minetest.get_node(under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then + return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack + end + end - local dir = vector.subtract(under, above) + local dir = vector.subtract(under, above) - -- Only build when it's legal - local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] - if not abovenodedef or abovenodedef.buildable_to == false then - return itemstack - end + -- Only build when it's legal + local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] + if not abovenodedef or abovenodedef.buildable_to == false then + return itemstack + end - local wdir = minetest.dir_to_wallmounted(dir) - local fdir = minetest.dir_to_facedir(dir) + local wdir = minetest.dir_to_wallmounted(dir) + local fdir = minetest.dir_to_facedir(dir) - local sign_info - local nodeitem = ItemStack(itemstack) - -- Ceiling - if wdir == 0 then - --how would you add sign to ceiling? - return itemstack - -- Floor - elseif wdir == 1 then - -- Standing sign + local sign_info + local nodeitem = ItemStack(itemstack) + -- Ceiling + if wdir == 0 then + --how would you add sign to ceiling? + return itemstack + -- Floor + elseif wdir == 1 then + -- Standing sign - -- Determine the sign rotation based on player's yaw - local yaw = pi * 2 - placer:get_look_horizontal() + -- Determine the sign rotation based on player's yaw + local yaw = pi * 2 - placer:get_look_horizontal() - -- Select one of 16 possible rotations (0-15) - local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) + -- Select one of 16 possible rotations (0-15) + local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) - if rotation_level > 15 then - rotation_level = 0 - elseif rotation_level < 0 then - rotation_level = 15 - end + if rotation_level > 15 then + rotation_level = 0 + elseif rotation_level < 0 then + rotation_level = 15 + end - -- The actual rotation is a combination of predefined mesh and facedir (see node definition) - if rotation_level % 4 == 0 then - nodeitem:set_name("mcl_signs:standing_sign" .. _name) - elseif rotation_level % 4 == 1 then - nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) - elseif rotation_level % 4 == 2 then - nodeitem:set_name("mcl_signs:standing_sign45" .. _name) - elseif rotation_level % 4 == 3 then - nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) - end - fdir = math.floor(rotation_level / 4) + -- The actual rotation is a combination of predefined mesh and facedir (see node definition) + if rotation_level % 4 == 0 then + nodeitem:set_name("mcl_signs:standing_sign" .. _name) + elseif rotation_level % 4 == 1 then + nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) + elseif rotation_level % 4 == 2 then + nodeitem:set_name("mcl_signs:standing_sign45" .. _name) + elseif rotation_level % 4 == 3 then + nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) + end + fdir = math.floor(rotation_level / 4) - -- Place the node! - local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) - if not success then - return itemstack - end - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item() - end - sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] - -- Side - else - -- Wall sign - local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) - if not success then - return itemstack - end - sign_info = mcl_signs.signtext_info_wall[fdir + 1] - end + -- Place the node! + local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) + if not success then + return itemstack + end + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] + -- Side + else + -- Wall sign + local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) + if not success then + return itemstack + end + sign_info = mcl_signs.signtext_info_wall[fdir + 1] + end - -- Determine spawn position of entity - local place_pos - if minetest.registered_nodes[node_under.name].buildable_to then - place_pos = under - else - place_pos = above - end + -- Determine spawn position of entity + local place_pos + if minetest.registered_nodes[node_under.name].buildable_to then + place_pos = under + else + place_pos = above + end - local text_entity = minetest.add_entity({ - x = place_pos.x + sign_info.delta.x, - y = place_pos.y + sign_info.delta.y, - z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") - text_entity:set_yaw(sign_info.yaw) - text_entity:get_luaentity()._signnodename = nodeitem:get_name() + local text_entity = minetest.add_entity({ + x = place_pos.x + sign_info.delta.x, + y = place_pos.y + sign_info.delta.y, + z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") + text_entity:set_yaw(sign_info.yaw) + text_entity:get_luaentity()._signnodename = nodeitem:get_name() - minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) + minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) - mcl_signs:show_formspec(placer, place_pos) - return itemstack - end - minetest.register_node("mcl_signs:wall_sign" .. _name, new_sign) - update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) + mcl_signs:show_formspec(placer, place_pos) + return itemstack + end + minetest.register_node(":mcl_signs:wall_sign" .. _name, new_sign) + update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) - -- standing sign base. - local new_sign_standing = {} - new_sign_standing = table.copy(mcl_signs.standing_standard) - new_sign_standing.drop = "mcl_signs:wall_sign" .. _name - new_sign_standing.wield_image ="("..wield_image.."^[multiply:" .. color .. ")" - new_sign_standing.tiles = { "("..tiles.."^[multiply:" .. color .. ")" } - new_sign_standing.inventory_image = "("..inventory_image.."^[multiply:" .. color .. ")" - new_sign_standing.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign22_5" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end, - minetest.register_node("mcl_signs:standing_sign" .. _name, new_sign_standing) - update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) + -- standing sign base. + local new_sign_standing = {} + new_sign_standing = table.copy(mcl_signs.standing_standard) + new_sign_standing.drop = "mcl_signs:wall_sign" .. _name + new_sign_standing.wield_image = "(" .. wield_image .. "^[multiply:" .. color .. ")" + new_sign_standing.tiles = { "(" .. tiles .. "^[multiply:" .. color .. ")" } + new_sign_standing.inventory_image = "(" .. inventory_image .. "^[multiply:" .. color .. ")" + new_sign_standing.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign22_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end, + minetest.register_node(":mcl_signs:standing_sign" .. _name, new_sign_standing) + update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) - -- 22.5° - local ssign22_5d = table.copy(new_sign_standing) - ssign22_5d.mesh = "mcl_signs_sign22.5.obj" - ssign22_5d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign45" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.register_node("mcl_signs:standing_sign22_5" .. _name, ssign22_5d) - update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) + -- 22.5° + local ssign22_5d = table.copy(new_sign_standing) + ssign22_5d.mesh = "mcl_signs_sign22.5.obj" + ssign22_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign45" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node(":mcl_signs:standing_sign22_5" .. _name, ssign22_5d) + update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) - -- 45° - local ssign45d = table.copy(new_sign_standing) - ssign45d.mesh = "mcl_signs_sign45.obj" - ssign45d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign67_5" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.register_node("mcl_signs:standing_sign45" .. _name, ssign45d) - update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) + -- 45° + local ssign45d = table.copy(new_sign_standing) + ssign45d.mesh = "mcl_signs_sign45.obj" + ssign45d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign67_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node(":mcl_signs:standing_sign45" .. _name, ssign45d) + update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) - -- 67.5° - local ssign67_5d = table.copy(new_sign_standing) - ssign67_5d.mesh = "mcl_signs_sign67.5.obj" - ssign67_5d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign" .. _name - node.param2 = (node.param2 + 1) % 4 - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.register_node("mcl_signs:standing_sign67_5" .. _name, ssign67_5d) - update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) + -- 67.5° + local ssign67_5d = table.copy(new_sign_standing) + ssign67_5d.mesh = "mcl_signs_sign67.5.obj" + ssign67_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign" .. _name + node.param2 = (node.param2 + 1) % 4 + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.register_node(":mcl_signs:standing_sign67_5" .. _name, ssign67_5d) + update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) - -- register Doc entry - if minetest.get_modpath("doc") then - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) - end + -- register Doc entry + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) + end - --register standing sign's rotation_levels - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign22_5" .. _name , 1}) - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign45" .. _name , 2}) - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign67_5" .. _name , 3}) + --register standing sign's rotation_levels + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign22_5" .. _name, 1 }) + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign45" .. _name, 2 }) + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign67_5" .. _name, 3 }) end @@ -982,225 +997,225 @@ end --- ttsign: the tool tip of the sign that gets translated. Shown when the mouse hovers the inventory sign. --- For example: the basic, default oak (wood) sign is just "Sign"; and a spruce sign would be "Spruce Sign" function mcl_signs.reregister_sign (modname, color, _name, ttsign) - local mod_name_pass = false - if modname ~= "" and modname ~= "false" then - if minetest.get_modpath(modname) then - mod_name_pass = true - end - if mod_name_pass == false then - return - end - end - local new_sign = {} + local mod_name_pass = false + if modname ~= "" and modname ~= "false" then + if minetest.get_modpath(modname) then + mod_name_pass = true + end + if mod_name_pass == false then + return + end + end + local new_sign = {} - if color == nil or color == "" then - color = "#FFFFFF" - end + if color == nil or color == "" then + color = "#FFFFFF" + end - new_sign = table.copy(mcl_signs.wall_standard) - new_sign.description = S(ttsign) + new_sign = table.copy(mcl_signs.wall_standard) + new_sign.description = S(ttsign) - new_sign.wield_image = "(default_sign.png^[multiply:" .. color .. ")" - new_sign.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } - new_sign.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" + new_sign.wield_image = "(default_sign.png^[multiply:" .. color .. ")" + new_sign.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } + new_sign.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" - -- currently have to do this, because of how the base node placement works. - new_sign.on_place = function(itemstack, placer, pointed_thing) - local above = pointed_thing.above - local under = pointed_thing.under + -- currently have to do this, because of how the base node placement works. + new_sign.on_place = function(itemstack, placer, pointed_thing) + local above = pointed_thing.above + local under = pointed_thing.under - -- Use pointed node's on_rightclick function first, if present - local node_under = minetest.get_node(under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then - return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack - end - end + -- Use pointed node's on_rightclick function first, if present + local node_under = minetest.get_node(under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then + return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack + end + end - local dir = vector.subtract(under, above) + local dir = vector.subtract(under, above) - -- Only build when it's legal - local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] - if not abovenodedef or abovenodedef.buildable_to == false then - return itemstack - end + -- Only build when it's legal + local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] + if not abovenodedef or abovenodedef.buildable_to == false then + return itemstack + end - local wdir = minetest.dir_to_wallmounted(dir) - local fdir = minetest.dir_to_facedir(dir) + local wdir = minetest.dir_to_wallmounted(dir) + local fdir = minetest.dir_to_facedir(dir) - local sign_info - local nodeitem = ItemStack(itemstack) - -- Ceiling - if wdir == 0 then - --how would you add sign to ceiling? - return itemstack - -- Floor - elseif wdir == 1 then - -- Standing sign + local sign_info + local nodeitem = ItemStack(itemstack) + -- Ceiling + if wdir == 0 then + --how would you add sign to ceiling? + return itemstack + -- Floor + elseif wdir == 1 then + -- Standing sign - -- Determine the sign rotation based on player's yaw - local yaw = pi * 2 - placer:get_look_horizontal() + -- Determine the sign rotation based on player's yaw + local yaw = pi * 2 - placer:get_look_horizontal() - -- Select one of 16 possible rotations (0-15) - local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) + -- Select one of 16 possible rotations (0-15) + local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) - if rotation_level > 15 then - rotation_level = 0 - elseif rotation_level < 0 then - rotation_level = 15 - end + if rotation_level > 15 then + rotation_level = 0 + elseif rotation_level < 0 then + rotation_level = 15 + end - -- The actual rotation is a combination of predefined mesh and facedir (see node definition) - if rotation_level % 4 == 0 then - nodeitem:set_name("mcl_signs:standing_sign" .. _name) - elseif rotation_level % 4 == 1 then - nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) - elseif rotation_level % 4 == 2 then - nodeitem:set_name("mcl_signs:standing_sign45" .. _name) - elseif rotation_level % 4 == 3 then - nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) - end - fdir = math.floor(rotation_level / 4) + -- The actual rotation is a combination of predefined mesh and facedir (see node definition) + if rotation_level % 4 == 0 then + nodeitem:set_name("mcl_signs:standing_sign" .. _name) + elseif rotation_level % 4 == 1 then + nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) + elseif rotation_level % 4 == 2 then + nodeitem:set_name("mcl_signs:standing_sign45" .. _name) + elseif rotation_level % 4 == 3 then + nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) + end + fdir = math.floor(rotation_level / 4) - -- Place the node! - local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) - if not success then - return itemstack - end - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item() - end - sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] - -- Side - else - -- Wall sign - local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) - if not success then - return itemstack - end - sign_info = mcl_signs.signtext_info_wall[fdir + 1] - end + -- Place the node! + local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) + if not success then + return itemstack + end + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] + -- Side + else + -- Wall sign + local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) + if not success then + return itemstack + end + sign_info = mcl_signs.signtext_info_wall[fdir + 1] + end - -- Determine spawn position of entity - local place_pos - if minetest.registered_nodes[node_under.name].buildable_to then - place_pos = under - else - place_pos = above - end + -- Determine spawn position of entity + local place_pos + if minetest.registered_nodes[node_under.name].buildable_to then + place_pos = under + else + place_pos = above + end - if DEBUG then - minetest.log("action", "[mcl_signs] Register_Sign::Placed position:" .. dump(place_pos) .. "\nSign_info: " .. dump(sign_info)) - end + if DEBUG then + minetest.log("action", "[mcl_signs] Register_Sign::Placed position:" .. dump(place_pos) .. "\nSign_info: " .. dump(sign_info)) + end - local text_entity = minetest.add_entity({ - x = place_pos.x + sign_info.delta.x, - y = place_pos.y + sign_info.delta.y, - z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") - text_entity:set_yaw(sign_info.yaw) - text_entity:get_luaentity()._signnodename = nodeitem:get_name() + local text_entity = minetest.add_entity({ + x = place_pos.x + sign_info.delta.x, + y = place_pos.y + sign_info.delta.y, + z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") + text_entity:set_yaw(sign_info.yaw) + text_entity:get_luaentity()._signnodename = nodeitem:get_name() - minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) + minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) - mcl_signs:show_formspec(placer, place_pos) - return itemstack - end + mcl_signs:show_formspec(placer, place_pos) + return itemstack + end - minetest.override_item("mcl_signs:wall_sign" .. _name, new_sign) - update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) + minetest.override_item("mcl_signs:wall_sign" .. _name, new_sign) + update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) - -- debug step - if DEBUG then - minetest.log("action", "[mcl_signs] Registered: mcl_signs:wall_sign" .. _name .. color .. "\n" .. dump(new_sign)) - minetest.log("action", "[mcl_signs] mcl_signs:wall_sign_standard\n" .. dump(mcl_signs.wall_standard)) - end + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Registered: mcl_signs:wall_sign" .. _name .. color .. "\n" .. dump(new_sign)) + minetest.log("action", "[mcl_signs] mcl_signs:wall_sign_standard\n" .. dump(mcl_signs.wall_standard)) + end - -- standing sign base. - local new_sign_standing = {} - new_sign_standing = table.copy(mcl_signs.standing_standard) - new_sign_standing.drop = "mcl_signs:wall_sign" .. _name - new_sign_standing.wield_image = "(default_sign.png^[multiply:" .. color .. ")" - new_sign_standing.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } - new_sign_standing.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" - new_sign_standing.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign22_5" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end, - minetest.override_item("mcl_signs:standing_sign" .. _name, new_sign_standing) - update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) - -- debug step - if DEBUG then - minetest.log("action", "[mcl_signs] Registered: mcl_signs:standing_sign" .. _name .. color .. "\n" .. dump(new_sign_standing)) - end + -- standing sign base. + local new_sign_standing = {} + new_sign_standing = table.copy(mcl_signs.standing_standard) + new_sign_standing.drop = "mcl_signs:wall_sign" .. _name + new_sign_standing.wield_image = "(default_sign.png^[multiply:" .. color .. ")" + new_sign_standing.tiles = { "(mcl_signs_sign.png^[multiply:" .. color .. ")" } + new_sign_standing.inventory_image = "(default_sign.png^[multiply:" .. color .. ")" + new_sign_standing.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign22_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end, + minetest.override_item("mcl_signs:standing_sign" .. _name, new_sign_standing) + update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Registered: mcl_signs:standing_sign" .. _name .. color .. "\n" .. dump(new_sign_standing)) + end - -- 22.5° - local ssign22_5d = table.copy(new_sign_standing) - ssign22_5d.mesh = "mcl_signs_sign22.5.obj" - ssign22_5d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign45" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.override_item("mcl_signs:standing_sign22_5" .. _name, ssign22_5d) - update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) + -- 22.5° + local ssign22_5d = table.copy(new_sign_standing) + ssign22_5d.mesh = "mcl_signs_sign22.5.obj" + ssign22_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign45" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign22_5" .. _name, ssign22_5d) + update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) - -- 45° - local ssign45d = table.copy(new_sign_standing) - ssign45d.mesh = "mcl_signs_sign45.obj" - ssign45d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign67_5" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.override_item("mcl_signs:standing_sign45" .. _name, ssign45d) - update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) + -- 45° + local ssign45d = table.copy(new_sign_standing) + ssign45d.mesh = "mcl_signs_sign45.obj" + ssign45d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign67_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign45" .. _name, ssign45d) + update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) - -- 67.5° - local ssign67_5d = table.copy(new_sign_standing) - ssign67_5d.mesh = "mcl_signs_sign67.5.obj" - ssign67_5d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign" .. _name - node.param2 = (node.param2 + 1) % 4 - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.override_item("mcl_signs:standing_sign67_5" .. _name, ssign67_5d) - update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) + -- 67.5° + local ssign67_5d = table.copy(new_sign_standing) + ssign67_5d.mesh = "mcl_signs_sign67.5.obj" + ssign67_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign" .. _name + node.param2 = (node.param2 + 1) % 4 + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign67_5" .. _name, ssign67_5d) + update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) - -- register Doc entry - if minetest.get_modpath("doc") then - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) - end + -- register Doc entry + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) + end - --register standing sign's rotation_levels - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign22_5" .. _name , 1}) - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign45" .. _name , 2}) - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign67_5" .. _name , 3}) + --register standing sign's rotation_levels + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign22_5" .. _name, 1 }) + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign45" .. _name, 2 }) + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign67_5" .. _name, 3 }) end --- The same as reregister_sign, except caller defines the textures. Note, there is a greyscale version of the sign, @@ -1225,205 +1240,205 @@ end --- ttsign: the tool tip of the sign that gets translated. Shown when the mouse hovers the inventory sign. --- For example: the basic, default oak (wood) sign is just "Sign"; and a spruce sign would be "Spruce Sign" function mcl_signs.reregister_sign_custom (modname, _name, tiles, color, inventory_image, wield_image, ttsign) - local mod_name_pass = false - if modname ~= "" and modname ~= "false" then - if minetest.get_modpath(modname) then - mod_name_pass = true - end - if mod_name_pass == false then - return - end - end - local new_sign = {} + local mod_name_pass = false + if modname ~= "" and modname ~= "false" then + if minetest.get_modpath(modname) then + mod_name_pass = true + end + if mod_name_pass == false then + return + end + end + local new_sign = {} - new_sign = table.copy(mcl_signs.wall_standard) + new_sign = table.copy(mcl_signs.wall_standard) - new_sign.wield_image ="("..wield_image.."^[multiply:" .. color .. ")" - new_sign.tiles = { "("..tiles.."^[multiply:" .. color .. ")" } - new_sign.inventory_image = "("..inventory_image.."^[multiply:" .. color .. ")" - new_sign.description = S(ttsign) - -- currently have to do this, because of how the base node placement works. - new_sign.on_place = function(itemstack, placer, pointed_thing) - local above = pointed_thing.above - local under = pointed_thing.under + new_sign.wield_image = "(" .. wield_image .. "^[multiply:" .. color .. ")" + new_sign.tiles = { "(" .. tiles .. "^[multiply:" .. color .. ")" } + new_sign.inventory_image = "(" .. inventory_image .. "^[multiply:" .. color .. ")" + new_sign.description = S(ttsign) + -- currently have to do this, because of how the base node placement works. + new_sign.on_place = function(itemstack, placer, pointed_thing) + local above = pointed_thing.above + local under = pointed_thing.under - -- Use pointed node's on_rightclick function first, if present - local node_under = minetest.get_node(under) - if placer and not placer:get_player_control().sneak then - if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then - return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack - end - end + -- Use pointed node's on_rightclick function first, if present + local node_under = minetest.get_node(under) + if placer and not placer:get_player_control().sneak then + if minetest.registered_nodes[node_under.name] and minetest.registered_nodes[node_under.name].on_rightclick then + return minetest.registered_nodes[node_under.name].on_rightclick(under, node_under, placer, itemstack) or itemstack + end + end - local dir = vector.subtract(under, above) + local dir = vector.subtract(under, above) - -- Only build when it's legal - local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] - if not abovenodedef or abovenodedef.buildable_to == false then - return itemstack - end + -- Only build when it's legal + local abovenodedef = minetest.registered_nodes[minetest.get_node(above).name] + if not abovenodedef or abovenodedef.buildable_to == false then + return itemstack + end - local wdir = minetest.dir_to_wallmounted(dir) - local fdir = minetest.dir_to_facedir(dir) + local wdir = minetest.dir_to_wallmounted(dir) + local fdir = minetest.dir_to_facedir(dir) - local sign_info - local nodeitem = ItemStack(itemstack) - -- Ceiling - if wdir == 0 then - --how would you add sign to ceiling? - return itemstack - -- Floor - elseif wdir == 1 then - -- Standing sign + local sign_info + local nodeitem = ItemStack(itemstack) + -- Ceiling + if wdir == 0 then + --how would you add sign to ceiling? + return itemstack + -- Floor + elseif wdir == 1 then + -- Standing sign - -- Determine the sign rotation based on player's yaw - local yaw = pi * 2 - placer:get_look_horizontal() + -- Determine the sign rotation based on player's yaw + local yaw = pi * 2 - placer:get_look_horizontal() - -- Select one of 16 possible rotations (0-15) - local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) + -- Select one of 16 possible rotations (0-15) + local rotation_level = mcl_signs:round((yaw / (pi * 2)) * 16) - if rotation_level > 15 then - rotation_level = 0 - elseif rotation_level < 0 then - rotation_level = 15 - end + if rotation_level > 15 then + rotation_level = 0 + elseif rotation_level < 0 then + rotation_level = 15 + end - -- The actual rotation is a combination of predefined mesh and facedir (see node definition) - if rotation_level % 4 == 0 then - nodeitem:set_name("mcl_signs:standing_sign" .. _name) - elseif rotation_level % 4 == 1 then - nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) - elseif rotation_level % 4 == 2 then - nodeitem:set_name("mcl_signs:standing_sign45" .. _name) - elseif rotation_level % 4 == 3 then - nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) - end - fdir = math.floor(rotation_level / 4) + -- The actual rotation is a combination of predefined mesh and facedir (see node definition) + if rotation_level % 4 == 0 then + nodeitem:set_name("mcl_signs:standing_sign" .. _name) + elseif rotation_level % 4 == 1 then + nodeitem:set_name("mcl_signs:standing_sign22_5" .. _name) + elseif rotation_level % 4 == 2 then + nodeitem:set_name("mcl_signs:standing_sign45" .. _name) + elseif rotation_level % 4 == 3 then + nodeitem:set_name("mcl_signs:standing_sign67_5" .. _name) + end + fdir = math.floor(rotation_level / 4) - -- Place the node! - local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) - if not success then - return itemstack - end - if not minetest.is_creative_enabled(placer:get_player_name()) then - itemstack:take_item() - end - sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] - -- Side - else - -- Wall sign - local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) - if not success then - return itemstack - end - sign_info = mcl_signs.signtext_info_wall[fdir + 1] - end + -- Place the node! + local _, success = minetest.item_place_node(nodeitem, placer, pointed_thing, fdir) + if not success then + return itemstack + end + if not minetest.is_creative_enabled(placer:get_player_name()) then + itemstack:take_item() + end + sign_info = mcl_signs.signtext_info_standing[rotation_level + 1] + -- Side + else + -- Wall sign + local _, success = minetest.item_place_node(itemstack, placer, pointed_thing, wdir) + if not success then + return itemstack + end + sign_info = mcl_signs.signtext_info_wall[fdir + 1] + end - -- Determine spawn position of entity - local place_pos - if minetest.registered_nodes[node_under.name].buildable_to then - place_pos = under - else - place_pos = above - end + -- Determine spawn position of entity + local place_pos + if minetest.registered_nodes[node_under.name].buildable_to then + place_pos = under + else + place_pos = above + end - local text_entity = minetest.add_entity({ - x = place_pos.x + sign_info.delta.x, - y = place_pos.y + sign_info.delta.y, - z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") - text_entity:set_yaw(sign_info.yaw) - text_entity:get_luaentity()._signnodename = nodeitem:get_name() + local text_entity = minetest.add_entity({ + x = place_pos.x + sign_info.delta.x, + y = place_pos.y + sign_info.delta.y, + z = place_pos.z + sign_info.delta.z }, "mcl_signs:text") + text_entity:set_yaw(sign_info.yaw) + text_entity:get_luaentity()._signnodename = nodeitem:get_name() - minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) + minetest.sound_play({ name = "default_place_node_hard", gain = 1.0 }, { pos = place_pos }, true) - mcl_signs:show_formspec(placer, place_pos) - return itemstack - end - minetest.override_item("mcl_signs:wall_sign" .. _name, new_sign) - update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) + mcl_signs:show_formspec(placer, place_pos) + return itemstack + end + minetest.override_item("mcl_signs:wall_sign" .. _name, new_sign) + update_sign_registry("wall", "mcl_signs:wall_sign" .. _name) - -- standing sign base. - local new_sign_standing = {} - new_sign_standing = table.copy(mcl_signs.standing_standard) - new_sign_standing.drop = "mcl_signs:wall_sign" .. _name - new_sign_standing.wield_image ="("..wield_image.."^[multiply:" .. color .. ")" - new_sign_standing.tiles = { "("..tiles.."^[multiply:" .. color .. ")" } - new_sign_standing.inventory_image = "("..inventory_image.."^[multiply:" .. color .. ")" - new_sign_standing.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign22_5" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end, - minetest.override_item("mcl_signs:standing_sign" .. _name, new_sign_standing) - update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) + -- standing sign base. + local new_sign_standing = {} + new_sign_standing = table.copy(mcl_signs.standing_standard) + new_sign_standing.drop = "mcl_signs:wall_sign" .. _name + new_sign_standing.wield_image = "(" .. wield_image .. "^[multiply:" .. color .. ")" + new_sign_standing.tiles = { "(" .. tiles .. "^[multiply:" .. color .. ")" } + new_sign_standing.inventory_image = "(" .. inventory_image .. "^[multiply:" .. color .. ")" + new_sign_standing.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign22_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end, + minetest.override_item("mcl_signs:standing_sign" .. _name, new_sign_standing) + update_sign_registry("standing", "mcl_signs:standing_sign" .. _name) - -- 22.5° - local ssign22_5d = table.copy(new_sign_standing) - ssign22_5d.mesh = "mcl_signs_sign22.5.obj" - ssign22_5d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign45" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.override_item("mcl_signs:standing_sign22_5" .. _name, ssign22_5d) - update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) + -- 22.5° + local ssign22_5d = table.copy(new_sign_standing) + ssign22_5d.mesh = "mcl_signs_sign22.5.obj" + ssign22_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign45" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign22_5" .. _name, ssign22_5d) + update_sign_registry("standing", "mcl_signs:standing_sign22_5" .. _name) - -- 45° - local ssign45d = table.copy(new_sign_standing) - ssign45d.mesh = "mcl_signs_sign45.obj" - ssign45d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign67_5" .. _name - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.override_item("mcl_signs:standing_sign45" .. _name, ssign45d) - update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) + -- 45° + local ssign45d = table.copy(new_sign_standing) + ssign45d.mesh = "mcl_signs_sign45.obj" + ssign45d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign67_5" .. _name + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign45" .. _name, ssign45d) + update_sign_registry("standing", "mcl_signs:standing_sign45" .. _name) - -- 67.5° - local ssign67_5d = table.copy(new_sign_standing) - ssign67_5d.mesh = "mcl_signs_sign67.5.obj" - ssign67_5d.on_rotate = function(pos, node, user, mode) - if mode == screwdriver.ROTATE_FACE then - node.name = "mcl_signs:standing_sign" .. _name - node.param2 = (node.param2 + 1) % 4 - minetest.swap_node(pos, node) - elseif mode == screwdriver.ROTATE_AXIS then - return false - end - mcl_signs:update_sign(pos, nil, nil, true) - return true - end - minetest.override_item("mcl_signs:standing_sign67_5" .. _name, ssign67_5d) - update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) + -- 67.5° + local ssign67_5d = table.copy(new_sign_standing) + ssign67_5d.mesh = "mcl_signs_sign67.5.obj" + ssign67_5d.on_rotate = function(pos, node, user, mode) + if mode == screwdriver.ROTATE_FACE then + node.name = "mcl_signs:standing_sign" .. _name + node.param2 = (node.param2 + 1) % 4 + minetest.swap_node(pos, node) + elseif mode == screwdriver.ROTATE_AXIS then + return false + end + mcl_signs:update_sign(pos, nil, nil, true) + return true + end + minetest.override_item("mcl_signs:standing_sign67_5" .. _name, ssign67_5d) + update_sign_registry("standing", "mcl_signs:standing_sign67_5" .. _name) - -- register Doc entry - if minetest.get_modpath("doc") then - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) - doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) - end + -- register Doc entry + if minetest.get_modpath("doc") then + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:wall_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign22_5" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign45" .. _name) + doc.add_entry_alias("nodes", "mcl_signs:wall_sign", "nodes", "mcl_signs:standing_sign67_5" .. _name) + end - --register standing sign's rotation_levels - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign22_5" .. _name , 1}) - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign45" .. _name , 2}) - table.insert(mcl_signs.standing_rotation_levels, {"mcl_signs:standing_sign67_5" .. _name , 3}) + --register standing sign's rotation_levels + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign22_5" .. _name, 1 }) + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign45" .. _name, 2 }) + table.insert(mcl_signs.standing_rotation_levels, { "mcl_signs:standing_sign67_5" .. _name, 3 }) end @@ -1438,485 +1453,551 @@ end --- --- _name: the sign's name suffix, such as "_dark" or "_red", etc., appended to "wall_sign" or "standing_sign" function mcl_signs.register_sign_craft(modname, wood_item_string, _name) - local mod_name_pass = false - if modname ~= "" and modname ~= "false" then - if minetest.get_modpath(modname) then - mod_name_pass = true - end - if mod_name_pass == false then - return - end - end + local mod_name_pass = false + if modname ~= "" and modname ~= "false" then + if minetest.get_modpath(modname) then + mod_name_pass = true + end + if mod_name_pass == false then + return + end + end - minetest.register_craft({ - type = "fuel", - recipe = "mcl_signs:wall_sign" .. _name, - burntime = 10, - }) + minetest.register_craft({ + type = "fuel", + recipe = "mcl_signs:wall_sign" .. _name, + burntime = 10, + }) - -- debug step - if DEBUG then - minetest.log("action", "[mcl_signs] Register Sign Crafts: \n" .. modname .. "\n" .. wood_item_string .. "\n" .. _name) - end + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Register Sign Crafts: \n" .. modname .. "\n" .. wood_item_string .. "\n" .. _name) + end - -- register crafts (actual recipe) - if minetest.get_modpath(modname) then + -- register crafts (actual recipe) + if minetest.get_modpath(modname) then - local itemstring = "mcl_signs:wall_sign" + local itemstring = "mcl_signs:wall_sign" - minetest.register_craft({ - output = itemstring .. _name .. " 3", - recipe = { - { wood_item_string, wood_item_string, wood_item_string }, - { wood_item_string, wood_item_string, wood_item_string }, - { "", "mcl_core:stick", "" }, - }, - }) - end + minetest.register_craft({ + output = itemstring .. _name .. " 3", + recipe = { + { wood_item_string, wood_item_string, wood_item_string }, + { wood_item_string, wood_item_string, wood_item_string }, + { "", "mcl_core:stick", "" }, + }, + }) + end +end +function mcl_signs.register_hanging_sign_craft(modname, wood_item_string, _name) + local mod_name_pass = false + if modname ~= "" and modname ~= "false" then + if minetest.get_modpath(modname) then + mod_name_pass = true + end + if mod_name_pass == false then + return + end + end + + minetest.register_craft({ + type = "fuel", + recipe = ":mcl_signs:wall_sign" .. _name, + burntime = 10, + }) + + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Register Sign Crafts: \n" .. modname .. "\n" .. wood_item_string .. "\n" .. _name) + end + + -- register crafts (actual recipe) + if minetest.get_modpath(modname) then + + local itemstring = ":mcl_signs:hanging_sign" + local quantity = "6" + + local bamboo = string.find(wood_item_string, "bamboo") + if bamboo then + quantity = "2" + end + minetest.register_craft({ + output = itemstring .. _name .. " " .. quantity, + recipe = { + { "mcl_lanterns:chain", "", "mcl_lanterns:chain" }, + { wood_item_string, wood_item_string, wood_item_string }, + { wood_item_string, wood_item_string, wood_item_string }, + }, + }) + end end -- Helper functions local function string_to_array(str) - local string_table = {} - for i = 1, string.len(str) do - table.insert(string_table, string.sub(str, i, i)) - end - return string_table + local string_table = {} + for i = 1, string.len(str) do + table.insert(string_table, string.sub(str, i, i)) + end + return string_table end local function string_to_line_array(str) - local linechar_table = {} - local current = 1 - local linechar = 1 - linechar_table[1] = "" - for _, char in ipairs(string_to_array(str)) do - -- New line - if char == "\n" then - current = current + 1 - linechar_table[current] = "" - linechar = 1 - else - linechar_table[current] = linechar_table[current] .. char - linechar = linechar + 1 - end - end - return linechar_table + local linechar_table = {} + local current = 1 + local linechar = 1 + linechar_table[1] = "" + for _, char in ipairs(string_to_array(str)) do + -- New line + if char == "\n" then + current = current + 1 + linechar_table[current] = "" + linechar = 1 + else + linechar_table[current] = linechar_table[current] .. char + linechar = linechar + 1 + end + end + return linechar_table end local function get_rotation_level(facedir, nodename) - local nnames = mcl_signs.standing_rotation_levels -- functional copy... was easier this way. #LazyAF :P + local nnames = mcl_signs.standing_rotation_levels -- functional copy... was easier this way. #LazyAF :P - local rl - local offset = 0 - for x = 1, #nnames do - if nnames[x][1] == nodename then - offset = nnames[x][2] - break - end - end - rl = facedir * 4 + offset - if DEBUG then - minetest.log("action", "[mcl_signs] GetRotationLevel: NodeName: " .. nodename .. " RL value: " .. rl) - end - return rl + local rl + local offset = 0 + for x = 1, #nnames do + if nnames[x][1] == nodename then + offset = nnames[x][2] + break + end + end + rl = facedir * 4 + offset + if DEBUG then + minetest.log("action", "[mcl_signs] GetRotationLevel: NodeName: " .. nodename .. " RL value: " .. rl) + end + return rl end function mcl_signs:round(num, idp) - local mult = 10 ^ (idp or 0) - return math.floor(num * mult + 0.5) / mult + local mult = 10 ^ (idp or 0) + return math.floor(num * mult + 0.5) / mult end function mcl_signs:get_color_for_sign(item_name) - for d = 1, #Dyes_table do - if Dyes_table[d][1] == item_name then - return Dyes_table[d][2] - end - end - return "false" + for d = 1, #Dyes_table do + if Dyes_table[d][1] == item_name then + return Dyes_table[d][2] + end + end + return "false" end function mcl_signs:color_sign (pos, text_color) - local success = mcl_signs:update_sign(pos, nil, nil, true, text_color) + local success = mcl_signs:update_sign(pos, nil, nil, true, text_color) - -- debug step - local meta = minetest.get_meta(pos) - if not meta then - minetest.log("error", "[mcl_signs] Sign Color Fail - Metadata.") + -- debug step + local meta = minetest.get_meta(pos) + if not meta then + minetest.log("error", "[mcl_signs] Sign Color Fail - Metadata.") - return false - end - if DEBUG then - minetest.log("verbose", "[mcl_signs] Post-Sign Color: " .. meta:get_string("mcl_signs:text_color") .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) - end + return false + end + if DEBUG then + minetest.log("verbose", "[mcl_signs] Post-Sign Color: " .. meta:get_string("mcl_signs:text_color") .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) + end - return success + return success end function mcl_signs:glow_sign (pos, remove_glow) - local success = true - -- Get Meta Data for the sign. - local meta = minetest.get_meta(pos) + local success = true + -- Get Meta Data for the sign. + local meta = minetest.get_meta(pos) - if not meta then - return false - end - local text = meta:get_string("text") - if text == nil then - text = "" - end + if not meta then + return false + end + local text = meta:get_string("text") + if text == nil then + text = "" + end - -- we can't make the text glow if there isn't any text - if text == "" then - return false - end + -- we can't make the text glow if there isn't any text + if text == "" then + return false + end - if remove_glow == nil then - remove_glow = false - end + if remove_glow == nil then + remove_glow = false + end - -- set up text glow - local objects = minetest.get_objects_inside_radius(pos, 0.5) - local text_entity - for _, v in ipairs(objects) do - local ent = v:get_luaentity() - if ent and ent.name == "mcl_signs:text" then - text_entity = v - break - end - end - if remove_glow == true then - text_entity:set_properties({ - glow = nil, - }) - meta:set_string("mcl_signs:glowing_sign", "false") - else - text_entity:set_properties({ - glow = sign_glow, - }) - meta:set_string("mcl_signs:glowing_sign", "true") - end - if not text_entity then - return false - end - text_entity:get_luaentity()._glowing_sign = meta:get_string("mcl_signs:glowing_sign") + -- set up text glow + local objects = minetest.get_objects_inside_radius(pos, 0.5) + local text_entity + for _, v in ipairs(objects) do + local ent = v:get_luaentity() + if ent and ent.name == "mcl_signs:text" then + text_entity = v + break + end + end + if remove_glow == true then + text_entity:set_properties({ + glow = nil, + }) + meta:set_string("mcl_signs:glowing_sign", "false") + else + text_entity:set_properties({ + glow = sign_glow, + }) + meta:set_string("mcl_signs:glowing_sign", "true") + end + if not text_entity then + return false + end + text_entity:get_luaentity()._glowing_sign = meta:get_string("mcl_signs:glowing_sign") - -- debug step - if DEBUG then - minetest.log("verbose", "[mcl_signs] Post-Sign Glow: " .. meta:get_string("mcl_signs:text_color") .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) - end - return success + -- debug step + if DEBUG then + minetest.log("verbose", "[mcl_signs] Post-Sign Glow: " .. meta:get_string("mcl_signs:text_color") .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) + end + return success end function mcl_signs:create_lettering(text, signnodename, sign_color) - if sign_color == nil then - sign_color = mcl_colors.BLACK - end - local texture = mcl_signs:generate_texture(mcl_signs:create_lines(text), signnodename, sign_color) + if sign_color == nil then + sign_color = mcl_colors.BLACK + end + local texture = mcl_signs:generate_texture(mcl_signs:create_lines(text), signnodename, sign_color) - -- debug step - if DEBUG then - minetest.log("action", "[mcl_signs] Creating sign text; text:" .. text) - end + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Creating sign text; text:" .. text) + end - return texture + return texture end function mcl_signs:create_lines(text) - local line_num = 1 - local text_table = {} - for _, line in ipairs(string_to_line_array(text)) do - if line_num > NUMBER_OF_LINES then - break - end - table.insert(text_table, line) - line_num = line_num + 1 - end - return text_table + local line_num = 1 + local text_table = {} + for _, line in ipairs(string_to_line_array(text)) do + if line_num > NUMBER_OF_LINES then + break + end + table.insert(text_table, line) + line_num = line_num + 1 + end + return text_table end function mcl_signs:generate_line(s, ypos) - local i = 1 - local parsed = {} - local width = 0 - local chars = 0 - local printed_char_width = CHAR_WIDTH + 1 - while chars < LINE_LENGTH and i <= #s do - local file - -- Get and render character - if charmap[s:sub(i, i)] then - file = charmap[s:sub(i, i)] - i = i + 1 - elseif i < #s and charmap[s:sub(i, i + 1)] then - file = charmap[s:sub(i, i + 1)] - i = i + 2 - else - -- No character image found. - -- Use replacement character: - file = "_rc" - i = i + 1 - if DEBUG then - minetest.log("verbose", "[mcl_signs] Unknown symbol in '" .. s .. "' at " .. i) - end - end - if file then - width = width + printed_char_width - table.insert(parsed, file) - chars = chars + 1 - end - end - width = width - 1 + local i = 1 + local parsed = {} + local width = 0 + local chars = 0 + local printed_char_width = CHAR_WIDTH + 1 + while chars < LINE_LENGTH and i <= #s do + local file + -- Get and render character + if charmap[s:sub(i, i)] then + file = charmap[s:sub(i, i)] + i = i + 1 + elseif i < #s and charmap[s:sub(i, i + 1)] then + file = charmap[s:sub(i, i + 1)] + i = i + 2 + else + -- No character image found. + -- Use replacement character: + file = "_rc" + i = i + 1 + if DEBUG then + minetest.log("verbose", "[mcl_signs] Unknown symbol in '" .. s .. "' at " .. i) + end + end + if file then + width = width + printed_char_width + table.insert(parsed, file) + chars = chars + 1 + end + end + width = width - 1 - local texture = "" - local xpos = math.floor((SIGN_WIDTH - width) / 2) + local texture = "" + local xpos = math.floor((SIGN_WIDTH - width) / 2) - for j = 1, #parsed do - texture = texture .. ":" .. xpos .. "," .. ypos .. "=" .. parsed[j] .. ".png" - xpos = xpos + printed_char_width - end - return texture + for j = 1, #parsed do + texture = texture .. ":" .. xpos .. "," .. ypos .. "=" .. parsed[j] .. ".png" + xpos = xpos + printed_char_width + end + return texture end function mcl_signs:generate_texture(lines, signnodename, letter_color) - local texture = "[combine:" .. SIGN_WIDTH .. "x" .. SIGN_WIDTH - local ypos = 0 + local texture = "[combine:" .. SIGN_WIDTH .. "x" .. SIGN_WIDTH + local ypos = 0 - -- Handle all of the dynamically created signs. - for x = 1, #mcl_signs.registered_signs.wall_signs do - if signnodename == mcl_signs.registered_signs.wall_signs[x] then - ypos = 30 - break - end - end - for x = 1, #mcl_signs.registered_signs.standing_signs do - if signnodename == mcl_signs.registered_signs.standing_signs[x] then - ypos = 0 - break - end - end - -- for future inclusion, when the hanging sings are made. - --[[ - for x = 1, #mcl_signs.registered_signs.hanging_signs do - if signnodename == mcl_signs.registered_signs.hanging_signs[x] then - ypos = 30 - break - end - end - ]] + -- Handle all of the dynamically created signs. + for x = 1, #mcl_signs.registered_signs.wall_signs do + if signnodename == mcl_signs.registered_signs.wall_signs[x] then + ypos = 30 + break + end + end + for x = 1, #mcl_signs.registered_signs.standing_signs do + if signnodename == mcl_signs.registered_signs.standing_signs[x] then + ypos = 0 + break + end + end + -- for future inclusion, when the hanging sings are made. + --[[ + for x = 1, #mcl_signs.registered_signs.hanging_signs do + if signnodename == mcl_signs.registered_signs.hanging_signs[x] then + ypos = 30 + break + end + end + ]] - -- kept in for now, compatibility with existing hard coded signs. TODO: Remove after done with api. - if signnodename == "mcl_signs:wall_sign" or signnodename == "mcl_signs:wall_sign_dark" then - ypos = 30 - end + -- kept in for now, compatibility with existing hard coded signs. TODO: Remove after done with api. + if signnodename == "mcl_signs:wall_sign" or signnodename == "mcl_signs:wall_sign_dark" then + ypos = 30 + end - -- debug step - if DEBUG then - minetest.log("action", "[mcl_signs] Generate_Texture::Debug_Data:\nSignNodeName: " .. dump(signnodename) .. "\nYPOS: " .. ypos) - end + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Generate_Texture::Debug_Data:\nSignNodeName: " .. dump(signnodename) .. "\nYPOS: " .. ypos) + end - for i = 1, #lines do - texture = texture .. mcl_signs:generate_line(lines[i], ypos) - ypos = ypos + LINE_HEIGHT - end + for i = 1, #lines do + texture = texture .. mcl_signs:generate_line(lines[i], ypos) + ypos = ypos + LINE_HEIGHT + end - texture = "(" .. texture .. "^[multiply:" .. letter_color .. ")" - return texture + texture = "(" .. texture .. "^[multiply:" .. letter_color .. ")" + return texture end function mcl_signs:get_wall_signtext_info(param2, nodename) - local dir = minetest.wallmounted_to_dir(param2) - if dir.x > 0 then - return 2 - elseif dir.z > 0 then - return 1 - elseif dir.x < 0 then - return 4 - else - return 3 - end + local dir = minetest.wallmounted_to_dir(param2) + if dir.x > 0 then + return 2 + elseif dir.z > 0 then + return 1 + elseif dir.x < 0 then + return 4 + else + return 3 + end end function mcl_signs:destruct_sign(pos) - local objects = minetest.get_objects_inside_radius(pos, 0.5) - for _, v in ipairs(objects) do - local ent = v:get_luaentity() - if ent and ent.name == "mcl_signs:text" then - v:remove() - end - end - local players = minetest.get_connected_players() - for p = 1, #players do - if vector.distance(players[p]:get_pos(), pos) <= 30 then - minetest.close_formspec(players[p]:get_player_name(), "mcl_signs:set_text_" .. pos.x .. "_" .. pos.y .. "_" .. pos.z) - end - end + local objects = minetest.get_objects_inside_radius(pos, 0.5) + for _, v in ipairs(objects) do + local ent = v:get_luaentity() + if ent and ent.name == "mcl_signs:text" then + v:remove() + end + end + local players = minetest.get_connected_players() + for p = 1, #players do + if vector.distance(players[p]:get_pos(), pos) <= 30 then + minetest.close_formspec(players[p]:get_player_name(), "mcl_signs:set_text_" .. pos.x .. "_" .. pos.y .. "_" .. pos.z) + end + end end function mcl_signs:update_sign(pos, fields, sender, force_remove, text_color) - -- Get Meta Data for the sign. - local meta = minetest.get_meta(pos) + -- Get Meta Data for the sign. + local meta = minetest.get_meta(pos) - if not meta then - return false - end - local text = meta:get_string("text") - if fields and (text == "" and fields.text) then - meta:set_string("text", fields.text) - text = fields.text - end - if text == nil then - text = "" - end + if not meta then + return false + end + local text = meta:get_string("text", "") + if fields and (text == "" and fields.text) then + meta:set_string("text", fields.text) + text = fields.text + end + if text == nil then + text = "" + end - -- find text color. - local sign_color + -- find text color. + local sign_color - if meta:get_string("mcl_signs:text_color") == "" then - -- if no sign text color has been assigned, make it black. - sign_color = mcl_colors.BLACK - meta:set_string("mcl_signs:text_color", sign_color) - else - sign_color = meta:get_string("mcl_signs:text_color") - end + if meta:get_string("mcl_signs:text_color") == "" then + -- if no sign text color has been assigned, make it black. + sign_color = mcl_colors.BLACK + meta:set_string("mcl_signs:text_color", sign_color) + else + sign_color = meta:get_string("mcl_signs:text_color") + end - if text_color == nil or text == "" then - text_color = "false" - end + if text_color == nil or text == "" then + text_color = "false" + end - if text_color == "false" then - text_color = sign_color --if a new color hasn't been chosen, then keep the existing color. - end + if text_color == "false" then + text_color = sign_color --if a new color hasn't been chosen, then keep the existing color. + end - -- find the sign's glow value - local has_glow = false + -- find the sign's glow value + local has_glow = false - if meta:get_string("mcl_signs:glowing_sign") == "" or meta:get_string("mcl_signs:glowing_sign") == "false" then - has_glow = false - meta:set_string("mcl_signs:glowing_sign", "false") - else - has_glow = true - end + if meta:get_string("mcl_signs:glowing_sign") == "" or meta:get_string("mcl_signs:glowing_sign") == "false" then + has_glow = false + meta:set_string("mcl_signs:glowing_sign", "false") + else + has_glow = true + end - -- debug step - if DEBUG then - minetest.log("action", "[mcl_signs] Update_Signs: Pre-Sign Update: " .. sign_color .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) - end + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Update_Signs: Pre-Sign Update: " .. sign_color .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) + end - local sign_info - local npos = minetest.get_node(pos) - local npos_name = npos.name + local sign_info + local npos = minetest.get_node(pos) + local npos_name = npos.name - -- Handle all of the dynamically created signs. - for x = 1, #mcl_signs.registered_signs.wall_signs do - if npos_name == mcl_signs.registered_signs.wall_signs[x] then - sign_info = mcl_signs.signtext_info_wall[mcl_signs:get_wall_signtext_info(npos.param2)] - break - end - end - for x = 1, #mcl_signs.registered_signs.standing_signs do - if npos_name == mcl_signs.registered_signs.standing_signs[x] then - sign_info = mcl_signs.signtext_info_standing[get_rotation_level(npos.param2, npos_name) + 1] - break - end - end - -- for future inclusion, when the hanging sings are made. - --[[ - for x = 1, #mcl_signs.registered_signs.hanging_signs do - if nn == mcl_signs.registered_signs.hanging_signs[x] then - sign_info = mcl_signs.signtext_info_wall[mcl_signs:get_wall_signtext_info(n.param2)] - break - end - end - ]] + -- Handle all of the dynamically created signs. + for x = 1, #mcl_signs.registered_signs.wall_signs do + if npos_name == mcl_signs.registered_signs.wall_signs[x] then + sign_info = mcl_signs.signtext_info_wall[mcl_signs:get_wall_signtext_info(npos.param2)] + break + end + end + for x = 1, #mcl_signs.registered_signs.standing_signs do + if npos_name == mcl_signs.registered_signs.standing_signs[x] then + sign_info = mcl_signs.signtext_info_standing[get_rotation_level(npos.param2, npos_name) + 1] + break + end + end + -- for future inclusion, when the hanging sings are made. + --[[ + for x = 1, #mcl_signs.registered_signs.hanging_signs do + if nn == mcl_signs.registered_signs.hanging_signs[x] then + sign_info = mcl_signs.signtext_info_wall[mcl_signs:get_wall_signtext_info(n.param2)] + break + end + end + ]] - -- the following if..elseif..end block is here for compatibility with the old code. TODO: remove this block after the new api is complete. - if npos_name == "mcl_signs:standing_sign_dark" or npos_name == "mcl_signs:standing_sign22_5_dark" or npos_name == "mcl_signs:standing_sign45_dark" or npos_name == "mcl_signs:standing_sign67_5_dark" then - sign_info = mcl_signs.signtext_info_standing[get_rotation_level(npos.param2, npos_name) + 1] - elseif npos_name == "mcl_signs:wall_sign_dark" then - sign_info = mcl_signs.signtext_info_wall[mcl_signs:get_wall_signtext_info(npos.param2)] - end - if sign_info == nil then - minetest.log("error", "[mcl_signs] Update_Signs: Missing sign_info!") - return false - end + -- the following if..elseif..end block is here for compatibility with the old code. TODO: remove this block after the new api is complete. + if npos_name == "mcl_signs:standing_sign_dark" or npos_name == "mcl_signs:standing_sign22_5_dark" or npos_name == "mcl_signs:standing_sign45_dark" or npos_name == "mcl_signs:standing_sign67_5_dark" then + sign_info = mcl_signs.signtext_info_standing[get_rotation_level(npos.param2, npos_name) + 1] + elseif npos_name == "mcl_signs:wall_sign_dark" then + sign_info = mcl_signs.signtext_info_wall[mcl_signs:get_wall_signtext_info(npos.param2)] + end + if sign_info == nil then + minetest.log("error", "[mcl_signs] Update_Signs: Missing sign_info!") + return false + end - local objects = minetest.get_objects_inside_radius(pos, 0.5) - local text_entity - for _, v in ipairs(objects) do - local ent = v:get_luaentity() - if ent and ent.name == "mcl_signs:text" then - if force_remove then - v:remove() - else - text_entity = v - break - end - end - end + local text_entity + text_entity = mcl_signs:get_text_entity(pos,force_remove) - if not text_entity then - if DEBUG then - minetest.log("action", "[mcl_signs] Update_Sign: Text_Entity - does not exist, creating it now.") - end - text_entity = minetest.add_entity({ - x = pos.x + sign_info.delta.x, - y = pos.y + sign_info.delta.y, - z = pos.z + sign_info.delta.z }, "mcl_signs:text") + if not text_entity then + if DEBUG then + minetest.log("action", "[mcl_signs] Update_Sign: Text_Entity - does not exist, creating it now.") + end + text_entity = minetest.add_entity({ + x = pos.x + sign_info.delta.x, + y = pos.y + sign_info.delta.y, + z = pos.z + sign_info.delta.z }, "mcl_signs:text") - if DEBUG then - minetest.log("action", "[mcl_signs] Update_Sign: Placed position:" .. dump(pos) .. "\nSign_info: " .. dump(sign_info)) - end - end - text_entity:get_luaentity()._signnodename = npos_name + if DEBUG then + minetest.log("action", "[mcl_signs] Update_Sign: Placed position:" .. dump(pos) .. "\nSign_info: " .. dump(sign_info)) + end + end + text_entity:get_luaentity()._signnodename = npos_name - -- set up special case: Dark Oak Sign. Dark Oak signs are soooo dark, they start off with white lettering. - if npos_name == "mcl_signs:wall_sign_darkwood" or - npos_name == "mcl_signs:standing_sign67_5_darkwood" or - npos_name == "mcl_signs:standing_sign45_darkwood" or - npos_name == "mcl_signs:standing_sign22_5_darkwood" or - npos_name == "mcl_signs:standing_sign_darkwood" - then - if text_color == "#000000" then - text_color = "#ffffff" - end - end + -- set up special case: Dark Oak Sign. Dark Oak signs are soooo dark, they start off with white lettering. + if npos_name == "mcl_signs:wall_sign_darkwood" or + npos_name == "mcl_signs:standing_sign67_5_darkwood" or + npos_name == "mcl_signs:standing_sign45_darkwood" or + npos_name == "mcl_signs:standing_sign22_5_darkwood" or + npos_name == "mcl_signs:standing_sign_darkwood" + then + if text_color == "#000000" then + text_color = "#ffffff" + end + end - -- Set the actual properties for the sign + -- Set the actual properties for the sign - text_entity:set_properties({ - textures = { mcl_signs:create_lettering(text, npos_name, text_color) }, - }) + text_entity:set_properties({ + textures = { mcl_signs:create_lettering(text, npos_name, text_color) }, + }) - if has_glow then - text_entity:set_properties({ - glow = sign_glow, - }) - end + if has_glow then + text_entity:set_properties({ + glow = sign_glow, + }) + end - text_entity:set_yaw(sign_info.yaw) - if DEBUG then - minetest.log("verbose", "[mcl_signs] Update_Sign: After texture recreation.") - minetest.log("action","[mcl_signs] Update_Sign: " .. npos_name .. "\nPlaced position:" .. dump(pos) .. "\nSign_info: " .. dump(sign_info)) - end + text_entity:set_yaw(sign_info.yaw) + if DEBUG then + minetest.log("verbose", "[mcl_signs] Update_Sign: After texture recreation.") + minetest.log("action", "[mcl_signs] Update_Sign: " .. npos_name .. "\nPlaced position:" .. dump(pos) .. "\nSign_info: " .. dump(sign_info)) + end - -- save sign metadata. - meta:set_string("mcl_signs:text_color", text_color) - -- debug step - if DEBUG then - minetest.log("action", "[mcl_signs] Update_Sign: Post-Sign Update: " .. meta:get_string("mcl_signs:text_color") .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) - end + -- save sign metadata. + meta:set_string("mcl_signs:text_color", text_color) - return true + -- Moved timer stuff to here, to make sure that it's called and only has one set of code. + local timer = minetest.get_node_timer(pos) + if text_entity and text ~= "" then + -- Do timer related stuff - but only if there is text to display. + -- Also, prevent excessive use with punching. (see node def.) + if timer:is_started() == false then + timer:start(TIMER_INTERVAL) + else + timer:stop() + timer:start(TIMER_INTERVAL) + end + else + if timer:is_started() == true then + timer:stop() + end + end + + -- debug step + if DEBUG then + minetest.log("action", "[mcl_signs] Update_Sign: Post-Sign Update: " .. meta:get_string("mcl_signs:text_color") .. " " .. meta:get_string("mcl_signs:glowing_sign") .. ".\n" .. dump(pos)) + end + + return true end function mcl_signs:show_formspec(player, pos) - minetest.show_formspec( - player:get_player_name(), - "mcl_signs:set_text_" .. pos.x .. "_" .. pos.y .. "_" .. pos.z, - "size[6,3]textarea[0.25,0.25;6,1.5;text;" .. F(S("Enter sign text:")) .. ";]label[0,1.5;" .. F(S("Maximum line length: 15")) .. "\n" .. F(S("Maximum lines: 4")) .. "]button_exit[0,2.5;6,1;submit;" .. F(S("Done")) .. "]" - ) + minetest.show_formspec( + player:get_player_name(), + "mcl_signs:set_text_" .. pos.x .. "_" .. pos.y .. "_" .. pos.z, + "size[6,3]textarea[0.25,0.25;6,1.5;text;" .. F(S("Enter sign text:")) .. ";]label[0,1.5;" .. F(S("Maximum line length: 15")) .. "\n" .. F(S("Maximum lines: 4")) .. "]button_exit[0,2.5;6,1;submit;" .. F(S("Done")) .. "]" + ) end + +function mcl_signs:get_text_entity (pos, force_remove) + local objects = minetest.get_objects_inside_radius(pos, 0.5) + local text_entity = false -- just to have a check for failure. + for _, v in ipairs(objects) do + local ent = v:get_luaentity() + if ent and ent.name == "mcl_signs:text" then + if force_remove ~= nil and force_remove == true then + v:remove() + else + text_entity = v + break + end + end + end + return text_entity +end \ No newline at end of file diff --git a/mods/ITEMS/mcl_smithing_table/locale/mcl_smithing_table.ja.tr b/mods/ITEMS/mcl_smithing_table/locale/mcl_smithing_table.ja.tr new file mode 100644 index 0000000000..792b0afe05 --- /dev/null +++ b/mods/ITEMS/mcl_smithing_table/locale/mcl_smithing_table.ja.tr @@ -0,0 +1,2 @@ +# textdomain: mcl_smithing_table +Smithing table=鍛冶台 diff --git a/mods/ITEMS/mcl_smoker/locale/mcl_smoker.ja.tr b/mods/ITEMS/mcl_smoker/locale/mcl_smoker.ja.tr new file mode 100644 index 0000000000..9c058c7136 --- /dev/null +++ b/mods/ITEMS/mcl_smoker/locale/mcl_smoker.ja.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_smoker +Inventory=インベントリ +Smoker=燻製器 +Cooks food faster than furnace=食料はかまどより早く調理可能 +Use the recipe book to see what you can smelt, what you can use as fuel and how long it will burn.=レシピ本を使って、何を製錬できるか、何を燃料にできるか、どれくらい燃えるかを確認しましょう。 +Use the furnace to open the furnace menu.\nPlace a furnace fuel in the lower slot and the source material in the upper slot.\nThe furnace will slowly use its fuel to smelt the item.\nThe result will be placed into the output slot at the right side.=かまどを使用してかまどのメニューを開きます。かまどの燃料を下スロットに、素材を上スロットに入れます。かまどはゆっくりと燃料を使い、アイテムを製錬します。製錬結果は右側の出力スロットに置かれます。 +Smokers cook several items, mainly raw foods, into cooked foods, but twice as fast as a normal furnace.=燻製器は、生ものを中心とした数種類を調理品に仕上げますが、普通のかまどの2倍早く調理します。 +Burning Smoker=燻製器 燃焼中 diff --git a/mods/ITEMS/mcl_sponges/locale/mcl_sponges.ja.tr b/mods/ITEMS/mcl_sponges/locale/mcl_sponges.ja.tr new file mode 100644 index 0000000000..e2fa7d1dda --- /dev/null +++ b/mods/ITEMS/mcl_sponges/locale/mcl_sponges.ja.tr @@ -0,0 +1,10 @@ +# textdomain: mcl_sponges +Sponge=スポンジ +Sponges are blocks which remove water around them when they are placed or come in contact with water, turning it into a wet sponge.=スポンジは、水に置いたり触れたりすると周囲の水分を奪い、濡れたスポンジに変化するブロックです。 +Waterlogged Sponge=水を吸ったスポンジ +A waterlogged sponge can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of a furnace, the water will pour into the bucket.=水を吸ったスポンジをかまどの中で乾燥させると、(乾いた)スポンジになります。かまどの燃料スロットに空のバケツがあると、バケツに水が流れ込みます。 +Riverwaterlogged Sponge=河川水を吸ったスポンジ +This is a sponge soaking wet with river water. It can be dried in the furnace to turn it into (dry) sponge. When there's an empty bucket in the fuel slot of the furnace, the river water will pour into the bucket.=河川水で濡れたスポンジです。かまどで乾燥させれば、(乾いた)スポンジになります。かまどの燃料スロットに空のバケツがあると、河川水がバケツに流れ込みます。 +A sponge becomes riverwaterlogged (instead of waterlogged) if it sucks up more river water than (normal) water.=スポンジが(通常の)水よりも河川水を多く吸い込むと、(水ではなく)河川水を吸った状態になります。 +Removes water on contact=接触している水を除去 +Can be dried in furnace=かまどで乾燥可能 diff --git a/mods/ITEMS/mcl_spyglass/locale/mcl_spyglass.ja.tr b/mods/ITEMS/mcl_spyglass/locale/mcl_spyglass.ja.tr new file mode 100644 index 0000000000..9c132604e6 --- /dev/null +++ b/mods/ITEMS/mcl_spyglass/locale/mcl_spyglass.ja.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_spyglass +Spyglass=望遠鏡 +A spyglass is an item that can be used for zooming in on specific locations.=望遠鏡は、特定の場所を拡大して見るためのアイテムです。 diff --git a/mods/ITEMS/mcl_stairs/locale/mcl_stairs.ja.tr b/mods/ITEMS/mcl_stairs/locale/mcl_stairs.ja.tr new file mode 100644 index 0000000000..630f382e99 --- /dev/null +++ b/mods/ITEMS/mcl_stairs/locale/mcl_stairs.ja.tr @@ -0,0 +1,104 @@ +# textdomain: mcl_stairs +Stairs are useful to reach higher places by walking over them; jumping is not required. Placing stairs in a corner pattern will create corner stairs. Stairs placed on the ceiling or at the upper half of the side of a block will be placed upside down.=階段は、その上を歩いて高いところに行くのに便利なものです(ジャンプは不要)。階段を隅に配置すると、隅階段になります。天井やブロックの側面の上半分に階段を設置すると、逆さまに設置されます。 +Double @1=2重 @1 +Slabs are half as high as their full block counterparts and occupy either the lower or upper part of a block, depending on how it was placed. Slabs can be easily stepped on without needing to jump. When a slab is placed on another slab of the same type, a double slab is created.=スラブは、高さがフルブロックの半分で、配置によってブロックの下部または上部を占めます。スラブはジャンプすることなく簡単に登れます。スラブの上に同種のスラブを置くと、2重スラブになります。 +Upper @1=上部 @1 +Double slabs are full blocks which are created by placing two slabs of the same kind on each other.=2重スラブとは、同種のスラブを2枚重ねて作るフルブロックのことです。 +Oak Wood Stairs=オーク材の階段 +Oak Wood Slab=オーク材のスラブ +Double Oak Wood Slab=オーク材2重スラブ +Jungle Wood Stairs=ジャングル材の階段 +Jungle Wood Slab=ジャングル材のスラブ +Double Jungle Wood Slab=ジャングル材の2重スラブ +Acacia Wood Stairs=アカシア材の階段 +Acacia Wood Slab=アカシア材のスラブ +Double Acacia Wood Slab=アカシア材の2重スラブ +Spruce Wood Stairs=トウヒ材の階段 +Spruce Wood Slab=トウヒ材のスラブ +Double Spruce Wood Slab=トウヒ材の2重スラブ +Birch Wood Stairs=シラカバ材の階段 +Birch Wood Slab=シラカバ材のスラブ +Double Birch Wood Slab=シラカバ材の2重スラブ +Dark Oak Wood Stairs=ダークオーク材の階段 +Dark Oak Wood Slab=ダークオーク材のスラブ +Double Dark Oak Wood Slab=ダークオーク材の2重スラブ +Stone Stairs=石の階段 +Stone Slab=石のスラブ +Double Stone Slab=石の2重スラブ +Polished Stone Slab=研がれた石のスラブ +Double Polished Stone Slab=研がれた石の2重スラブ +Andesite Stairs=安山岩の階段 +Andesite Slab=安山岩のスラブ +Double Andesite Slab=安山岩の2重スラブ +Granite Stairs=花崗岩の階段 +Granite Slab=花崗岩のスラブ +Double Granite Slab=花崗岩の2重スラブ +Diorite Stairs=閃緑岩の階段 +Diorite Slab=閃緑岩のスラブ +Double Diorite Slab=閃緑岩の2重スラブ +Cobblestone Stairs=丸石の階段 +Cobblestone Slab=丸石のスラブ +Double Cobblestone Slab=丸石の2重スラブ +Mossy Cobblestone Stairs=苔むした丸石の階段 +Mossy Cobblestone Slab=苔むした丸石のスラブ +Double Mossy Cobblestone Slab=苔むした丸石の2重スラブ +Brick Stairs=レンガの階段 +Brick Slab=レンガのスラブ +Double Brick Slab=レンガの2重スラブ +Sandstone Stairs=砂岩の階段 +Sandstone Slab=砂岩のスラブ +Double Sandstone Slab=砂岩の2重スラブ +Smooth Sandstone Stairs=滑らかな砂岩の階段 +Smooth Sandstone Slab=滑らかな砂岩のスラブ +Double Smooth Sandstone Slab=滑らかな砂岩の2重スラブ +Red Sandstone Stairs=赤い砂岩の階段 +Red Sandstone Slab=赤い砂岩のスラブ +Double Red Sandstone Slab=赤い砂岩の2重スラブ +Smooth Red Sandstone Stairs=滑らかな赤い砂岩の階段 +Smooth Red Sandstone Slab=滑らかな赤い砂岩のスラブ +Double Smooth Red Sandstone Slab=滑らかな赤い砂岩の2重スラブ +Stone Bricks Stairs=石レンガの階段 +Stone Bricks Slab=石レンガのスラブ +Double Stone Bricks Slab=石レンガの2重スラブ +Quartz Stairs=クォーツの階段 +Quartz Slab=クォーツのスラブ +Double Quartz Slab=クォーツの2重スラブ +Smooth Quartz Stairs=滑らかなクォーツの階段 +Smooth Quartz Slab=滑らかなクォーツのスラブ +Double Smooth Quartz Slab=滑らかなクォーツの2重スラブ +Nether Brick Stairs=ネザーレンガの階段 +Nether Brick Slab=ネザーレンガのスラブ +Double Nether Brick Slab=ネザーレンガの2重スラブ +Red Nether Brick Stairs=赤いネザーレンガの階段 +Red Nether Brick Slab=赤いネザーレンガのスラブ +Double Red Nether Brick Slab=赤いネザーレンガの2重スラブ +End Stone Brick Stairs=エンドストーンレンガの階段 +End Stone Brick Slab=エンドストーンレンガのスラブ +Double End Stone Brick Slab=エンドストーンレンガの2重スラブ +Purpur Stairs=プルプァの階段 +Purpur Slab=プルプァのスラブ +Double Purpur Slab=プルプァの2重スラブ +Prismarine Stairs=プリズマリンの階段 +Prismarine Slab=プリズマリンのスラブ +Double Prismarine Slab=プリズマリンの2重スラブ +Prismarine Brick Stairs=プリズマリンレンガの階段 +Prismarine Brick Slab=プリズマリンレンガのスラブ +Double Prismarine Brick Slab=プリズマリンレンガの2重スラブ +Dark Prismarine Stairs=暗色プリズマリンの階段 +Dark Prismarine Slab=暗色プリズマリンのスラブ +Double Dark Prismarine Slab=暗色プリズマリンの2重スラブ +Polished Andesite Slab=研がれた安山岩のスラブ +Double Polished Andesite Slab=研がれた安山岩の2重スラブ +Polished Andesite Stairs=研がれた安山岩の階段 +Polished Granite Slab=研がれた花崗岩のスラブ +Double Polished Granite Slab=研がれた花崗岩の2重スラブ +Polished Granite Stairs=研がれた花崗岩の階段 +Polished Diorite Slab=研がれた閃緑岩のスラブ +Double Polished Diorite Slab=研がれた閃緑岩の2重スラブ +Polished Diorite Stairs=研がれた閃緑岩の階段 +Mossy Stone Brick Stairs=苔むした石レンガの階段 +Mossy Stone Brick Slab=苔むした石レンガのスラブ +Double Mossy Stone Brick Slab=苔むした石レンガの2重スラブ +Mud Brick Stair=泥レンガの階段 +Mud Brick Slab=泥レンガのスラブ +Double Mud Brick Slab=泥レンガの2重スラブ \ No newline at end of file diff --git a/mods/ITEMS/mcl_stonecutter/locale/mcl_stonecutter.ja.tr b/mods/ITEMS/mcl_stonecutter/locale/mcl_stonecutter.ja.tr new file mode 100644 index 0000000000..d26819d64f --- /dev/null +++ b/mods/ITEMS/mcl_stonecutter/locale/mcl_stonecutter.ja.tr @@ -0,0 +1,4 @@ +# textdomain: mcl_stonecutter +Stone Cutter=ストーンカッター +Used to cut stone like materials.=石のような素材を切断するのに使用します。 +Stonecutters are used to create stairs and slabs from stone like materials. It is also the jobsite for the Stone Mason Villager.=ストーンカッターは、石のような素材から階段やスラブを作れます。石工の村人の仕事場でもあります。 diff --git a/mods/ITEMS/mcl_throwing/locale/mcl_throwing.ja.tr b/mods/ITEMS/mcl_throwing/locale/mcl_throwing.ja.tr new file mode 100644 index 0000000000..983002598b --- /dev/null +++ b/mods/ITEMS/mcl_throwing/locale/mcl_throwing.ja.tr @@ -0,0 +1,12 @@ +# textdomain: mcl_throwing +@1 used the ender pearl too often.=@1 はエンダーパールを使いすぎました。 +Use the punch key to throw.=「パンチ」キーで投げる。 +Snowball=雪玉 +Snowballs can be thrown or launched from a dispenser for fun. Hitting something with a snowball does nothing.=雪玉は、投げたりディスペンサーから発射したりして楽しめます。雪玉を何かにぶつけても何も起こりません。 +Egg=卵 +Eggs can be thrown or launched from a dispenser and breaks on impact. There is a small chance that 1 or even 4 chicks will pop out of the egg.=卵は投げたりディスペンサーから発射したりでき、衝撃で割れます。 卵からヒナが 1 ~ 4 羽飛び出す可能性がわずかにあります。 +Ender Pearl=エンダーパール +An ender pearl is an item which can be used for teleportation at the cost of health. It can be thrown and teleport the thrower to its impact location when it hits a solid block or a plant. Each teleportation hurts the user by 5 hit points.=エンダーパールは、ヘルスを消費してテレポートができるアイテムです。投げることができ、固体ブロックや植物にぶつかると、投擲者がその衝突した場所にテレポートします。テレポートするたびに、使用者は5ヒットポイントずつダメージを受けます。 +Throwable=投擲可能 +Chance to hatch chicks when broken=壊れてもヒナが孵化するチャンス +Teleports you on impact for cost of 5 HP=HPを5消費し衝撃でテレポート diff --git a/mods/ITEMS/mcl_throwing/register.lua b/mods/ITEMS/mcl_throwing/register.lua index 9626be6268..43dedd33b7 100644 --- a/mods/ITEMS/mcl_throwing/register.lua +++ b/mods/ITEMS/mcl_throwing/register.lua @@ -141,7 +141,7 @@ local function egg_on_step(self, dtime) local r = math.random(1,8) if r == 1 then - mcl_mobs:spawn_child(self._lastpos, "mobs_mc:chicken") + mcl_mobs.spawn_child(self._lastpos, "mobs_mc:chicken") -- BONUS ROUND: 1/32 chance to spawn 3 additional chicks local r = math.random(1,32) @@ -153,7 +153,7 @@ local function egg_on_step(self, dtime) } for o=1, 3 do local pos = vector.add(self._lastpos, offsets[o]) - mcl_mobs:spawn_child(pos, "mobs_mc:chicken") + mcl_mobs.spawn_child(pos, "mobs_mc:chicken") end end end diff --git a/mods/ITEMS/mcl_tnt/init.lua b/mods/ITEMS/mcl_tnt/init.lua index bf7b523853..83c9620927 100644 --- a/mods/ITEMS/mcl_tnt/init.lua +++ b/mods/ITEMS/mcl_tnt/init.lua @@ -1,15 +1,25 @@ local S = minetest.get_translator(minetest.get_current_modname()) local tnt_griefing = minetest.settings:get_bool("mcl_tnt_griefing", true) -local function spawn_tnt(pos, entname) - minetest.sound_play("tnt_ignite", {pos = pos,gain = 1.0,max_hear_distance = 15,}, true) - local tnt = minetest.add_entity(pos, entname) - tnt:set_armor_groups({immortal=1}) - return tnt -end - tnt = {} +tnt.BOOMTIMER = 4 +tnt.BLINKTIMER = 0.25 + +---@param pos Vector +---@param entname string +---@return ObjectRef? +local function spawn_tnt(pos, entname) + minetest.sound_play("tnt_ignite", { pos = pos, gain = 1.0, max_hear_distance = 15 }, true) + local ent = minetest.add_entity(pos, entname) + if ent then + ent:set_armor_groups({ immortal = 1 }) + end + return ent +end + +---@param pos Vector +---@return ObjectRef? function tnt.ignite(pos) minetest.remove_node(pos) local e = spawn_tnt(pos, "mcl_tnt:tnt") @@ -17,61 +27,73 @@ function tnt.ignite(pos) return e end --- Add smoke particle of entity at pos. --- Intended to be called every step +---Add smoke particle of entity at pos. +--- +---Intended to be called every step. +---@param pos Vector function tnt.smoke_step(pos) minetest.add_particle({ - pos = {x=pos.x,y=pos.y+0.5,z=pos.z}, - velocity = vector.new(math.random() * 0.2 - 0.1, 1.0 + math.random(), math.random() * 0.2 - 0.1), - acceleration = vector.new(0, -0.1, 0), - expirationtime = 0.15 + math.random() * 0.25, - size = 1.0 + math.random(), + pos = vector.offset(pos, 0, 0.5, 0), + velocity = vector.new(math.random() * 0.2 - 0.1, 1.0 + math.random(), math.random() * 0.2 - 0.1), + acceleration = vector.new(0, -0.1, 0), + expirationtime = 0.15 + math.random() * 0.25, + size = 1.0 + math.random(), collisiondetection = false, - texture = "mcl_particles_smoke.png" + texture = "mcl_particles_smoke.png" }) end -tnt.BOOMTIMER = 4 -tnt.BLINKTIMER = 0.25 - local TNT_RANGE = 3 local sounds if minetest.get_modpath("mcl_sounds") then sounds = mcl_sounds.node_sound_wood_defaults() end + local tnt_mesecons if minetest.get_modpath("mesecons") then - tnt_mesecons = {effector = { - action_on = tnt.ignite, - rules = mesecon.rules.alldirs, - }} + tnt_mesecons = { + effector = { + action_on = tnt.ignite, + rules = mesecon.rules.alldirs, + }, + } end local longdesc if tnt_griefing then - longdesc = S("An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.", TNT_RANGE) + longdesc = S("An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals." + , TNT_RANGE) else - longdesc = S("An explosive device. When it explodes, it will hurt living beings. TNT has an explosion radius of @1. TNT can be ignited by tools, explosions, fire, lava and redstone signals.", TNT_RANGE) + longdesc = S("An explosive device. When it explodes, it will hurt living beings. TNT has an explosion radius of @1. TNT can be ignited by tools, explosions, fire, lava and redstone signals." + , TNT_RANGE) end minetest.register_node("mcl_tnt:tnt", { - tiles = {"default_tnt_top.png", "default_tnt_bottom.png", - "default_tnt_side.png", "default_tnt_side.png", - "default_tnt_side.png", "default_tnt_side.png"}, + tiles = { + "default_tnt_top.png", + "default_tnt_bottom.png", + "default_tnt_side.png", + "default_tnt_side.png", + "default_tnt_side.png", + "default_tnt_side.png", + }, is_ground_content = false, stack_max = 64, description = S("TNT"), paramtype = "light", sunlight_propagates = true, - _tt_help = S("Ignited by tools, explosions, fire, lava, redstone power").."\n"..S("Explosion radius: @1", tostring(TNT_RANGE)), + _tt_help = S("Ignited by tools, explosions, fire, lava, redstone power") .. + "\n" .. S("Explosion radius: @1", tostring(TNT_RANGE)), _doc_items_longdesc = longdesc, _doc_items_usagehelp = S("Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds."), - groups = { dig_immediate = 3, tnt = 1, enderman_takable=1, flammable=-1 }, + groups = { dig_immediate = 3, tnt = 1, enderman_takable = 1, flammable = -1 }, mesecons = tnt_mesecons, - on_blast = function(pos) - local e = tnt.ignite(pos) - e:get_luaentity().timer = tnt.BOOMTIMER - (0.5 + math.random()) + on_blast = function(pos, _) + local e = tnt.ignite(pos) + if e then + e:get_luaentity().timer = tnt.BOOMTIMER - (0.5 + math.random()) + end end, _on_ignite = function(player, pointed_thing) tnt.ignite(pointed_thing.under) @@ -84,7 +106,7 @@ minetest.register_node("mcl_tnt:tnt", { _on_dispense = function(stack, pos, droppos, dropnode, dropdir) -- Place and ignite TNT if minetest.registered_nodes[dropnode.name].buildable_to then - minetest.set_node(droppos, {name = stack:get_name()}) + minetest.set_node(droppos, { name = stack:get_name() }) tnt.ignite(droppos) end end, @@ -94,24 +116,30 @@ minetest.register_node("mcl_tnt:tnt", { local TNT = { -- Static definition physical = true, -- Collides with things - --weight = -100, - collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5}, + --weight = -100, + collisionbox = { -0.5, -0.5, -0.5, 0.5, 0.5, 0.5 }, visual = "cube", - textures = {"default_tnt_top.png", "default_tnt_bottom.png", - "default_tnt_side.png", "default_tnt_side.png", - "default_tnt_side.png", "default_tnt_side.png"}, + textures = { + "default_tnt_top.png", + "default_tnt_bottom.png", + "default_tnt_side.png", + "default_tnt_side.png", + "default_tnt_side.png", + "default_tnt_side.png", + }, -- Initial value for our timer timer = 0, blinktimer = 0, tnt_knockback = true, - blinkstatus = true,} + blinkstatus = true, +} -function TNT:on_activate(staticdata) - local phi = math.random(0, 65535) / 65535 * 2*math.pi +function TNT:on_activate(_, _) + local phi = math.random(0, 65535) / 65535 * 2 * math.pi local hdir_x = math.cos(phi) * 0.02 local hdir_z = math.sin(phi) * 0.02 - self.object:set_velocity({x=hdir_x, y=2, z=hdir_z}) - self.object:set_acceleration({x=0, y=-10, z=0}) + self.object:set_velocity(vector.new(hdir_x, 2, hdir_z)) + self.object:set_acceleration(vector.new(0, -10, 0)) self.object:set_texture_mod("^mcl_tnt_blink.png") end @@ -121,8 +149,8 @@ end time = 0.5, minpos = vector.subtract(pos, radius / 2), maxpos = vector.add(pos, radius / 2), - minvel = {x = -10, y = -10, z = -10}, - maxvel = {x = 10, y = 10, z = 10}, + minvel = vector.new(-10, -10, -10), + maxvel = vector.new(10, 10, 10), minacc = vector.new(), maxacc = vector.new(), minexptime = 1, @@ -152,9 +180,9 @@ end time = 0.1, minpos = vector.subtract(pos, radius / 2), maxpos = vector.add(pos, radius / 2), - minvel = {x = -3, y = 0, z = -3}, - maxvel = {x = 3, y = 5, z = 3}, - minacc = {x = 0, y = -10, z = 0}, + minvel = vector.new(-3, 0, -3), + maxvel = vector.new(3, 5, 3), + minacc = vector.new(0, -10, 0), minexptime = 0.8, maxexptime = 2.0, minsize = radius * 0.66, @@ -164,7 +192,7 @@ end }) end]] -function TNT:on_step(dtime) +function TNT:on_step(dtime, _) local pos = self.object:get_pos() tnt.smoke_step(pos) self.timer = self.timer + dtime @@ -190,10 +218,10 @@ if minetest.get_modpath("mcl_mobitems") then minetest.register_craft({ output = "mcl_tnt:tnt", recipe = { - {"mcl_mobitems:gunpowder", "group:sand", "mcl_mobitems:gunpowder"}, - {"group:sand", "mcl_mobitems:gunpowder", "group:sand"}, - {"mcl_mobitems:gunpowder", "group:sand", "mcl_mobitems:gunpowder"} - } + { "mcl_mobitems:gunpowder", "group:sand", "mcl_mobitems:gunpowder" }, + { "group:sand", "mcl_mobitems:gunpowder", "group:sand" }, + { "mcl_mobitems:gunpowder", "group:sand", "mcl_mobitems:gunpowder" } + }, }) end diff --git a/mods/ITEMS/mcl_tnt/locale/mcl_tnt.ja.tr b/mods/ITEMS/mcl_tnt/locale/mcl_tnt.ja.tr new file mode 100644 index 0000000000..fbb2e76b38 --- /dev/null +++ b/mods/ITEMS/mcl_tnt/locale/mcl_tnt.ja.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_tnt +@1 was caught in an explosion.=@1 は爆発に巻き込まれました。 +TNT=TNT +An explosive device. When it explodes, it will hurt living beings and destroy blocks around it. TNT has an explosion radius of @1. With a small chance, blocks may drop as an item (as if being mined) rather than being destroyed. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=爆破装置です。爆発すると、生物を傷つけ、周囲のブロックを破壊します。 TNTの爆発半径は@1です。 小確率で、ブロックは破壊されずにアイテムとして(採掘されるように)ドロップすることがあります。TNTは道具、爆発、火、溶岩、レッドストーン信号で着火できます。 +An explosive device. When it explodes, it will hurt living beings. TNT has an explosion radius of @1. TNT can be ignited by tools, explosions, fire, lava and redstone signals.=爆破装置です。爆発すると、生物を傷つけます。TNTの爆発半径は@1です。 TNTは道具、爆発、火、溶岩、レッドストーン信号で着火できます。 +Place the TNT and ignite it with one of the methods above. Quickly get in safe distance. The TNT will start to be affected by gravity and explodes in 4 seconds.=TNTを設置し、上記のいずれかの方法で点火します。速やかに安全な距離をとって。TNTは重力の影響を受け始め、4秒後に爆発します。 +Ignited by tools, explosions, fire, lava, redstone power=道具、爆発、火、溶岩、レッドストーン動力で点火 +Explosion radius: @1=爆発半径: @1 diff --git a/mods/ITEMS/mcl_tools/locale/mcl_tools.ja.tr b/mods/ITEMS/mcl_tools/locale/mcl_tools.ja.tr new file mode 100644 index 0000000000..063bd8a48c --- /dev/null +++ b/mods/ITEMS/mcl_tools/locale/mcl_tools.ja.tr @@ -0,0 +1,36 @@ +# textdomain: mcl_tools +You use your bare hand whenever you are not wielding any item. With your hand you can mine most blocks, but this is the slowest method and only the weakest blocks will yield their useful drop. The hand also deals minor damage by punching. Using the hand is often a last resort, as proper mining tools and weapons are much better.=何のアイテムも用いていないときは、いつだって素手を使います。手でほとんどのブロックを採掘できますが、この方法は最も時間がかかるうえ、有用なドロップをもたらすのは脆弱なブロックだけです。また、手で殴ることで小さなダメージを与えることもできます。 適切な採掘道具や武器の方がはるかに良いので、手を使うのは往々にして最後の手段です。 +When you are wielding an item which is not a mining tool or a weapon, it will behave as if it were the hand when you start mining or punching.=採掘道具でも武器でもないアイテムを手にしている場合、パンチや採掘にとりかかると、あたかも手であるかのように振る舞います。 +In Creative Mode, the hand is able to break all blocks instantly.=クリエイティブモードでは、手ですべてのブロックを瞬時に壊せます。 +Pickaxes are mining tools to mine hard blocks, such as stone. A pickaxe can also be used as weapon, but it is rather inefficient.=ツルハシは、石のような硬いブロックを採掘するための道具です。武器としても使えますが、効率は良くありません。 +An axe is your tool of choice to cut down trees, wood-based blocks and other blocks. Axes deal a lot of damage as well, but they are rather slow.=斧は、木や木材ベースのブロック、その他お好みのものを切り倒すための道具です。 斧もやはり多大なダメージを与えますが、やや遅めです。 +Swords are great in melee combat, as they are fast, deal high damage and can endure countless battles. Swords can also be used to cut down a few particular blocks, such as cobwebs.=剣は速く近接戦闘に優れており、高いダメージを与え、数知れない戦闘に耐えられます。また、クモの巣のような特殊なブロックを切り払うのにも使えます。 +Shovels are tools for digging coarse blocks, such as dirt, sand and gravel. They can also be used to turn grass blocks to grass paths. Shovels can be used as weapons, but they are very weak.=シャベルは、土や砂、砂利などの粗いブロックを掘るための道具です。また、草原をオフロードにすることもできます。シャベルは武器としても使えますが、とても弱いです。 +To turn a grass block into a grass path, hold the shovel in your hand, then use (rightclick) the top or side of a grass block. This only works when there's air above the grass block.=草原をオフロードに変えるには、シャベルを手に持って、草原の上か横に使用(右クリック)します。 これは草原の上に空気があるときのみ有効です。 +Shears are tools to shear sheep and to mine a few block types. Shears are a special mining tool and can be used to obtain the original item from grass, leaves and similar blocks that require cutting.=ハサミは、羊毛を刈ったり数種類のブロックを採るための道具です。 ハサミは特殊な採掘道具で、草や葉などの切断を要するブロックから、あらたなアイテムを入手するために使えます。 +To shear sheep or carve faceless pumpkins, use the “place” key on them. Faces can only be carved at the side of faceless pumpkins. Mining works as usual, but the drops are different for a few blocks.=羊毛を刈ったり、顔のないカボチャを彫ったりするには「配置」キーを使ってください。顔のないカボチャの側面にだけ、顔が彫れます。 採掘作用は普通ながらも、いくつかのブロックからは、かわったものをドロップさせます。 +Wooden PickAxe=木製のツルハシ +Stone PickAxe=石のツルハシ +Iron PickAxe=鉄のツルハシ +Golden PickAxe=金のツルハシ +Diamond PickAxe=ダイヤモンドのツルハシ +Netherite PickAxe=ネザライトのツルハシ +Wooden Shovel=木製のシャベル +Stone Shovel=石のシャベル +Iron Shovel=鉄のシャベル +Golden Shovel=金のシャベル +Diamond Shovel=ダイヤモンドのシャベル +Netherite Shovel=ネザライトのシャベル +Wooden Axe=木製の斧 +Stone Axe=石の斧 +Iron Axe=鉄の斧 +Golden Axe=金の斧 +Diamond Axe=ダイヤモンドの斧 +Netherite Axe=ネザライトの斧 +Wooden Sword=木製の剣 +Stone Sword=石の剣 +Iron Sword=鉄の剣 +Golden Sword=金の剣 +Diamond Sword=ダイヤモンドの剣 +Netherite Sword=ネザライトの剣 +Shears=ハサミ diff --git a/mods/ITEMS/mcl_torches/locale/mcl_torches.ja.tr b/mods/ITEMS/mcl_torches/locale/mcl_torches.ja.tr new file mode 100644 index 0000000000..eccc360536 --- /dev/null +++ b/mods/ITEMS/mcl_torches/locale/mcl_torches.ja.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_torches +Torch=松明 +Torches are light sources which can be placed at the side or on the top of most blocks.=松明は光源で、ほとんどのブロックの側面や上部に設置できます。 diff --git a/mods/ITEMS/mcl_totems/locale/mcl_totems.ja.tr b/mods/ITEMS/mcl_totems/locale/mcl_totems.ja.tr new file mode 100644 index 0000000000..ff57aa2649 --- /dev/null +++ b/mods/ITEMS/mcl_totems/locale/mcl_totems.ja.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_totems +Totem of Undying=不死のトーテム +A totem of undying is a rare artifact which may safe you from certain death.=不死のトーテムはレアなアーティファクトで、あなたを絶命から救ってくれるかもです。 +The totem only works while you hold it in your hand. If you receive fatal damage, you are saved from death and you get a second chance with 1 HP. The totem is destroyed in the process, however.=トーテムは手に持っている間だけ御利益があります。致命傷を受けても、死から救済され HP1で再チャンスを得られます。がしかし、その過程でトーテムは壊れてしまいます。 +Protects you from death while wielding it=それを手にしている間、死からあなたを守護 diff --git a/mods/ITEMS/mcl_walls/locale/mcl_walls.ja.tr b/mods/ITEMS/mcl_walls/locale/mcl_walls.ja.tr new file mode 100644 index 0000000000..c568788a76 --- /dev/null +++ b/mods/ITEMS/mcl_walls/locale/mcl_walls.ja.tr @@ -0,0 +1,17 @@ +# textdomain: mcl_walls +A piece of wall. It cannot be jumped over with a simple jump. When multiple of these are placed to next to each other, they will automatically build a nice wall structure.=壁の一部。単なるジャンプでは飛び越えられません。これを複数個並べて置いたなら、自動的にイイ感じの壁面に仕上がるでしょう。 +Cobblestone Wall=丸石の壁 +Mossy Cobblestone Wall=苔むした丸石の壁 +Andesite Wall=安山岩の壁 +Granite Wall=花崗岩の壁 +Diorite Wall=閃緑岩の壁 +Brick Wall=レンガの壁 +Sandstone Wall=砂岩の壁 +Red Sandstone Wall=赤い砂岩の壁 +Stone Brick Wall=石レンガの壁 +Mossy Stone Brick Wall=苔むした石レンガの壁 +Prismarine Wall=プリズマリンの壁 +End Stone Brick Wall=エンドストーンレンガの壁 +Nether Brick Wall=ネザーレンガの壁 +Red Nether Brick Wall=赤いネザーレンガの壁 +Mud Brick Wall=泥レンガの壁 \ No newline at end of file diff --git a/mods/ITEMS/mcl_wool/locale/mcl_wool.ja.tr b/mods/ITEMS/mcl_wool/locale/mcl_wool.ja.tr new file mode 100644 index 0000000000..9b8ed335ac --- /dev/null +++ b/mods/ITEMS/mcl_wool/locale/mcl_wool.ja.tr @@ -0,0 +1,37 @@ +# textdomain: mcl_wool +Wool=羊毛 +Carpet=カーペット +White Wool=白色の羊毛 +White Carpet=白色のカーペット +Grey Wool=灰色の羊毛 +Grey Carpet=灰色のカーペット +Light Grey Wool=薄灰色の羊毛 +Light Grey Carpet=薄灰色のカーペット +Black Wool=黒色の羊毛 +Black Carpet=黒色のカーペット +Red Wool=赤色の羊毛 +Red Carpet=赤色のカーペット +Yellow Wool=黄色の羊毛 +Yellow Carpet=黄色のカーペット +Green Wool=緑色の羊毛 +Green Carpet=緑色のカーペット +Cyan Wool=青緑色の羊毛 +Cyan Carpet=青緑色のカーペット +Blue Wool=青色の羊毛 +Blue Carpet=青色のカーペット +Magenta Wool=赤紫色の羊毛 +Magenta Carpet=赤紫色のカーペット +Orange Wool=橙色の羊毛 +Orange Carpet=橙色のカーペット +Purple Wool=紫色の羊毛 +Purple Carpet=紫色のカーペット +Brown Wool=茶色の羊毛 +Brown Carpet=茶色のカーペット +Pink Wool=桃色の羊毛 +Pink Carpet=桃色のカーペット +Lime Wool=黄緑色の羊毛 +Lime Carpet=黄緑色のカーペット +Light Blue Wool=空色の羊毛 +Light Blue Carpet=空色のカーペット +Wool is a decorative block which comes in many different colors.=羊毛は、多彩なカラーバリエーションを持つ装飾ブロックです。 +Carpets are thin floor covers which come in many different colors.=カーペットは、多彩なカラーバリエーションを持つ薄い敷物です。 diff --git a/mods/ITEMS/mclx_core/locale/mclx_core.ja.tr b/mods/ITEMS/mclx_core/locale/mclx_core.ja.tr new file mode 100644 index 0000000000..038ab5675f --- /dev/null +++ b/mods/ITEMS/mclx_core/locale/mclx_core.ja.tr @@ -0,0 +1,5 @@ +# textdomain: mclx_core +River Water Source=河川水源 +River water has the same properties as water, but has a reduced flowing distance and is not renewable.=河川水は水と同じ性質を持っていますが、流れる距離が短く、再生も不可能です。 +River Water=河川水 +Flowing River Water=流れる河川水 diff --git a/mods/ITEMS/mclx_fences/locale/mclx_fences.ja.tr b/mods/ITEMS/mclx_fences/locale/mclx_fences.ja.tr new file mode 100644 index 0000000000..3e1383cefe --- /dev/null +++ b/mods/ITEMS/mclx_fences/locale/mclx_fences.ja.tr @@ -0,0 +1,4 @@ +# textdomain: mclx_fences +Red Nether Brick Fence=赤いネザーレンガのフェンス +Red Nether Brick Fence Gate=赤いネザーレンガのフェンスゲート +Nether Brick Fence Gate=ネザーレンガのフェンスゲート diff --git a/mods/ITEMS/mclx_stairs/locale/mclx_stairs.ja.tr b/mods/ITEMS/mclx_stairs/locale/mclx_stairs.ja.tr new file mode 100644 index 0000000000..bbe2ee2096 --- /dev/null +++ b/mods/ITEMS/mclx_stairs/locale/mclx_stairs.ja.tr @@ -0,0 +1,82 @@ +# textdomain: mclx_stairs +Oak Bark Stairs=オーク樹皮の階段 +Oak Bark Slab=オーク樹皮のスラブ +Double Oak Bark Slab=オーク樹皮の2重スラブ +Acacia Bark Stairs=アカシア樹皮の階段 +Acacia Bark Slab=アカシア樹皮のスラブ +Double Acacia Bark Slab=アカシア樹皮の2重スラブ +Spruce Bark Stairs=トウヒ樹皮の階段 +Spruce Bark Slab=トウヒ樹皮のスラブ +Double Spruce Bark Slab=トウヒ樹皮の2重スラブ +Birch Bark Stairs=シラカバ樹皮の階段 +Birch Bark Slab=シラカバ樹皮のスラブ +Double Birch Bark Slab=シラカバ樹皮の2重スラブ +Jungle Bark Stairs=ジャングル樹皮の階段 +Jungle Bark Slab=ジャングル樹皮のスラブ +Double Jungle Bark Slab=ジャングル樹皮の2重スラブ +Dark Oak Bark Stairs=ダークオーク樹皮の階段 +Dark Oak Bark Slab=ダークオーク樹皮のスラブ +Double Dark Oak Bark Slab=ダークオーク樹皮の2重スラブ +Lapis Lazuli Slab=ラピスラズリのスラブ +Double Lapis Lazuli Slab=ラピスラズリの2重スラブ +Lapis Lazuli Stairs=ラピスラズリの階段 +Slab of Gold=金のスラブ +Double Slab of Gold=金の2重スラブ +Stairs of Gold=金の階段 +Slab of Iron=鉄のスラブ +Double Slab of Iron=鉄の2重スラブ +Stairs of Iron=鉄の階段 +Cracked Stone Brick Stairs=ひび割れた石レンガの階段 +Cracked Stone Brick Slab=ひび割れた石レンガのスラブ +Double Cracked Stone Brick Slab=ひび割れた石レンガの2重スラブ +White Concrete Stairs=白色コンクリートの階段 +White Concrete Slab=白色コンクリートのスラブ +Double White Concrete Slab=白色コンクリートの2重スラブ +Grey Concrete Stairs=灰色コンクリートの階段 +Grey Concrete Slab=灰色コンクリートのスラブ +Double Grey Concrete Slab=灰色コンクリートの2重スラブ +Light Grey Concrete Stairs=薄灰色コンクリートの階段 +Light Grey Concrete Slab=薄灰色コンクリートのスラブ +Double Light Grey Concrete Slab=薄灰色コンクリートの2重スラブ +Black Concrete Stairs=黒色コンクリートの階段 +Black Concrete Slab=黒色コンクリートのスラブ +Double Black Concrete Slab=黒色コンクリートの2重スラブ +Red Concrete Stairs=赤色コンクリートの階段 +Red Concrete Slab=赤色コンクリートのスラブ +Double Red Concrete Slab=赤色コンクリートの2重スラブ +Yellow Concrete Stairs=黄色コンクリートの階段 +Yellow Concrete Slab=黄色コンクリートのスラブ +Double Yellow Concrete Slab=黄色コンクリートの2重スラブ +Green Concrete Stairs=緑色コンクリートの階段 +Green Concrete Slab=緑色コンクリートのスラブ +Double Green Concrete Slab=緑色コンクリートの2重スラブ +Cyan Concrete Stairs=青緑色コンクリートの階段 +Cyan Concrete Slab=青緑色コンクリートのスラブ +Double Cyan Concrete Slab=青緑色コンクリートの2重スラブ +Blue Concrete Stairs=青色コンクリートの階段 +Blue Concrete Slab=青色コンクリートのスラブ +Double Blue Concrete Slab=青色コンクリートの2重スラブ +Magenta Concrete Stairs=赤紫色コンクリートの階段 +Magenta Concrete Slab=赤紫色コンクリートのスラブ +Double Magenta Concrete Slab=赤紫色コンクリートの2重スラブ +Orange Concrete Stairs=橙色コンクリートの階段 +Orange Concrete Slab=橙色コンクリートのスラブ +Double Orange Concrete Slab=橙色コンクリートの2重スラブ +Purple Concrete Stairs=紫色コンクリートの階段 +Purple Concrete Slab=紫色コンクリートのスラブ +Double Purple Concrete Slab=紫色コンクリートの2重スラブ +Brown Concrete Stairs=茶色コンクリートの階段 +Brown Concrete Slab=茶色コンクリートのスラブ +Double Brown Concrete Slab=茶色コンクリートの2重スラブ +Pink Concrete Stairs=桃色コンクリートの階段 +Pink Concrete Slab=桃色コンクリートのスラブ +Double Pink Concrete Slab=桃色コンクリートの2重スラブ +Lime Concrete Stairs=黄緑色コンクリートの階段 +Lime Concrete Slab=黄緑色コンクリートのスラブ +Double Lime Concrete Slab=黄緑色コンクリートの2重スラブ +Light Blue Concrete Stairs=空色コンクリートの階段 +Light Blue Concrete Slab=空色コンクリートのスラブ +Double Light Blue Concrete Slab=空色コンクリートの2重スラブ +Concrete Slab=コンクリートのスラブ +Double Concrete Slab=コンクリートの2重スラブ +Concrete Stairs=コンクリートの階段 diff --git a/mods/ITEMS/screwdriver/locale/screwdriver.ja.tr b/mods/ITEMS/screwdriver/locale/screwdriver.ja.tr new file mode 100644 index 0000000000..dbb80fb619 --- /dev/null +++ b/mods/ITEMS/screwdriver/locale/screwdriver.ja.tr @@ -0,0 +1,2 @@ +#textdomain: screwdriver +Screwdriver=ドライバー diff --git a/mods/ITEMS/xpanes/locale/xpanes.ja.tr b/mods/ITEMS/xpanes/locale/xpanes.ja.tr new file mode 100644 index 0000000000..bd67ee4988 --- /dev/null +++ b/mods/ITEMS/xpanes/locale/xpanes.ja.tr @@ -0,0 +1,23 @@ +# textdomain: xpanes +Glass panes are thin layers of glass which neatly connect to their neighbors as you build them.=ガラス板は、薄い層状のガラスで、組み立てると隣のガラスときれいにつながっていきます。 +Stained glass panes are thin layers of stained glass which neatly connect to their neighbors as you build them. They come in many different colors.=色ガラス板は、薄い層状の色ガラスで、組み立てると隣のガラスときれいにつながっていきます。カラーバリエーションも豊富です。 +Iron Bars=鉄格子 +Iron bars neatly connect to their neighbors as you build them.=鉄格子は、組み立てると隣の格子ときれいにつながっていきます。 +Glass Pane=ガラス板 +Stained Glass Pane=色ガラス板 +Red Stained Glass Pane=赤色ガラス板 +Green Stained Glass Pane=緑色ガラス板 +Blue Stained Glass Pane=青色ガラス板 +Light Blue Stained Glass Pane=空色ガラス板 +Black Stained Glass Pane=黒色ガラス板 +White Stained Glass Pane=白色ガラス板 +Yellow Stained Glass Pane=黃色ガラス板 +Brown Stained Glass Pane=茶色ガラス板 +Orange Stained Glass Pane=橙色ガラス板 +Pink Stained Glass Pane=桃色ガラス板 +Grey Stained Glass Pane=灰色ガラス板 +Lime Stained Glass Pane=黄緑色ガラス板 +Light Grey Stained Glass Pane=薄灰色ガラス板 +Magenta Stained Glass Pane=赤紫色ガラス板 +Purple Stained Glass Pane=紫色ガラス板 +Cyan Stained Glass Pane=青緑色ガラス板 diff --git a/mods/MAPGEN/mcl_biomes/init.lua b/mods/MAPGEN/mcl_biomes/init.lua index d468ae4f41..25e8f3e341 100644 --- a/mods/MAPGEN/mcl_biomes/init.lua +++ b/mods/MAPGEN/mcl_biomes/init.lua @@ -42,6 +42,8 @@ local function register_classic_superflat_biome() heat_point = 50, _mcl_biome_type = "medium", _mcl_palette_index = 0, + _mcl_skycolor = "#78A7FF", + _mcl_fogcolor = overworld_fogcolor }) end @@ -128,6 +130,15 @@ local function register_biomes() "MangroveSwamp", } +local beach_skycolor = "#78A7FF" -- This is the case for all beach biomes except for the snowy ones! Those beaches will have their own colour instead of this one. +local ocean_skycolor = "#7BA4FF" -- This is the case for all ocean biomes except for non-deep frozen oceans! Those oceans will have their own colour instead of this one. +local overworld_fogcolor = "#C0D8FF" + +local nether_skycolor = "#6EB1FF" + +local end_fogcolor = "#A080A0" +local end_skycolor = "#000000" + -- Ice Plains Spikes (rare) minetest.register_biome({ name = "IcePlainsSpikes", @@ -146,6 +157,8 @@ local function register_biomes() heat_point = -5, _mcl_biome_type = "snowy", _mcl_palette_index = 2, + _mcl_skycolor = "#7FA1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "IcePlainsSpikes_ocean", @@ -162,6 +175,8 @@ local function register_biomes() heat_point = -5, _mcl_biome_type = "snowy", _mcl_palette_index = 2, + _mcl_skycolor = "#7FA1FF", + _mcl_fogcolor = overworld_fogcolor }) -- Cold Taiga @@ -180,6 +195,8 @@ local function register_biomes() heat_point = 8, _mcl_biome_type = "snowy", _mcl_palette_index = 3, + _mcl_skycolor = "#839EFF", + _mcl_fogcolor = overworld_fogcolor }) -- A cold beach-like biome, implemented as low part of Cold Taiga @@ -200,6 +217,8 @@ local function register_biomes() heat_point = 8, _mcl_biome_type = "snowy", _mcl_palette_index = 3, + _mcl_skycolor = "#7FA1FF", + _mcl_fogcolor = overworld_fogcolor }) -- Water part of the beach. Added to prevent snow being on the ice. minetest.register_biome({ @@ -218,6 +237,8 @@ local function register_biomes() heat_point = 8, _mcl_biome_type = "snowy", _mcl_palette_index = 3, + _mcl_skycolor = "#7FA1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "ColdTaiga_ocean", @@ -234,9 +255,11 @@ local function register_biomes() vertical_blend = 1, _mcl_biome_type = "snowy", _mcl_palette_index = 3, + _mcl_skycolor = "#7FA1FF", + _mcl_fogcolor = overworld_fogcolor }) - -- Mega Taiga + -- Mega Pine Taiga minetest.register_biome({ name = "MegaTaiga", node_top = "mcl_core:podzol", @@ -251,6 +274,8 @@ local function register_biomes() heat_point = 10, _mcl_biome_type = "cold", _mcl_palette_index = 4, + _mcl_skycolor = "#7CA3FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "MegaTaiga_ocean", @@ -266,6 +291,8 @@ local function register_biomes() heat_point = 10, _mcl_biome_type = "cold", _mcl_palette_index = 4, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Mega Spruce Taiga @@ -283,6 +310,8 @@ local function register_biomes() heat_point = 8, _mcl_biome_type = "cold", _mcl_palette_index = 5, + _mcl_skycolor = "#7DA3FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "MegaSpruceTaiga_ocean", @@ -298,6 +327,8 @@ local function register_biomes() heat_point = 8, _mcl_biome_type = "cold", _mcl_palette_index = 5, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Extreme Hills @@ -316,6 +347,8 @@ local function register_biomes() heat_point = 45, _mcl_biome_type = "cold", _mcl_palette_index = 6, + _mcl_skycolor = "#7DA2FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "ExtremeHills_beach", @@ -332,6 +365,8 @@ local function register_biomes() heat_point = 45, _mcl_biome_type = "cold", _mcl_palette_index = 6, + _mcl_skycolor = beach_skycolor, + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "ExtremeHills_ocean", @@ -348,6 +383,8 @@ local function register_biomes() heat_point = 45, _mcl_biome_type = "cold", _mcl_palette_index = 6, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Extreme Hills M @@ -366,6 +403,8 @@ local function register_biomes() heat_point = 25, _mcl_biome_type = "cold", _mcl_palette_index = 7, + _mcl_skycolor = "#7DA2FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "ExtremeHillsM_ocean", @@ -381,6 +420,8 @@ local function register_biomes() heat_point = 25, _mcl_biome_type = "cold", _mcl_palette_index = 7, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Extreme Hills+ @@ -401,6 +442,8 @@ local function register_biomes() vertical_blend = 6, _mcl_biome_type = "cold", _mcl_palette_index = 8, + _mcl_skycolor = "#7DA2FF", + _mcl_fogcolor = overworld_fogcolor }) ---- Sub-biome for Extreme Hills+ for those snow forests minetest.register_biome({ @@ -419,6 +462,8 @@ local function register_biomes() heat_point = 25, _mcl_biome_type = "cold", _mcl_palette_index = 8, + _mcl_skycolor = "#7DA2FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "ExtremeHills+_ocean", @@ -434,6 +479,8 @@ local function register_biomes() heat_point = 25, _mcl_biome_type = "cold", _mcl_palette_index = 8, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Stone beach @@ -449,6 +496,8 @@ local function register_biomes() heat_point = 8, _mcl_biome_type = "cold", _mcl_palette_index = 9, + _mcl_skycolor = "#7DA2FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ @@ -464,6 +513,8 @@ local function register_biomes() heat_point = 8, _mcl_biome_type = "cold", _mcl_palette_index = 9, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Ice Plains @@ -485,6 +536,8 @@ local function register_biomes() heat_point = 8, _mcl_biome_type = "snowy", _mcl_palette_index = 10, + _mcl_skycolor = "#7FA1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "IcePlains_ocean", @@ -500,6 +553,8 @@ local function register_biomes() heat_point = 8, _mcl_biome_type = "snowy", _mcl_palette_index = 10, + _mcl_skycolor = "#7FA1FF", + _mcl_fogcolor = overworld_fogcolor }) -- Plains @@ -517,6 +572,8 @@ local function register_biomes() heat_point = 58, _mcl_biome_type = "medium", _mcl_palette_index = 0, + _mcl_skycolor = "#78A7FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Plains_beach", @@ -532,6 +589,8 @@ local function register_biomes() heat_point = 58, _mcl_biome_type = "medium", _mcl_palette_index = 0, + _mcl_skycolor = beach_skycolor, + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Plains_ocean", @@ -547,6 +606,8 @@ local function register_biomes() heat_point = 58, _mcl_biome_type = "medium", _mcl_palette_index = 0, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Sunflower Plains @@ -564,6 +625,8 @@ local function register_biomes() heat_point = 45, _mcl_biome_type = "medium", _mcl_palette_index = 11, + _mcl_skycolor = "#78A7FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "SunflowerPlains_ocean", @@ -579,6 +642,8 @@ local function register_biomes() heat_point = 45, _mcl_biome_type = "medium", _mcl_palette_index = 11, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Taiga @@ -596,6 +661,8 @@ local function register_biomes() heat_point = 22, _mcl_biome_type = "cold", _mcl_palette_index = 12, + _mcl_skycolor = "#7DA3FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Taiga_beach", @@ -611,6 +678,8 @@ local function register_biomes() heat_point = 22, _mcl_biome_type = "cold", _mcl_palette_index = 12, + _mcl_skycolor = beach_skycolor, + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Taiga_ocean", @@ -626,6 +695,8 @@ local function register_biomes() heat_point = 22, _mcl_biome_type = "cold", _mcl_palette_index = 12, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Forest @@ -643,6 +714,8 @@ local function register_biomes() heat_point = 45, _mcl_biome_type = "medium", _mcl_palette_index = 13, + _mcl_skycolor = "#79A6FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Forest_beach", @@ -658,6 +731,8 @@ local function register_biomes() heat_point = 45, _mcl_biome_type = "medium", _mcl_palette_index = 13, + _mcl_skycolor = beach_skycolor, + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Forest_ocean", @@ -673,6 +748,8 @@ local function register_biomes() heat_point = 45, _mcl_biome_type = "medium", _mcl_palette_index = 13, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Flower Forest @@ -690,6 +767,8 @@ local function register_biomes() heat_point = 32, _mcl_biome_type = "medium", _mcl_palette_index = 14, + _mcl_skycolor = "#79A6FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "FlowerForest_beach", @@ -705,6 +784,8 @@ local function register_biomes() heat_point = 32, _mcl_biome_type = "medium", _mcl_palette_index = 14, + _mcl_skycolor = beach_skycolor, + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "FlowerForest_ocean", @@ -720,6 +801,8 @@ local function register_biomes() heat_point = 32, _mcl_biome_type = "medium", _mcl_palette_index = 14, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Birch Forest @@ -737,6 +820,8 @@ local function register_biomes() heat_point = 31, _mcl_biome_type = "medium", _mcl_palette_index = 15, + _mcl_skycolor = "#7AA5FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "BirchForest_ocean", @@ -752,6 +837,8 @@ local function register_biomes() heat_point = 31, _mcl_biome_type = "medium", _mcl_palette_index = 15, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Birch Forest M @@ -769,6 +856,8 @@ local function register_biomes() heat_point = 27, _mcl_biome_type = "medium", _mcl_palette_index = 16, + _mcl_skycolor = "#7AA5FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "BirchForestM_ocean", @@ -784,6 +873,8 @@ local function register_biomes() heat_point = 27, _mcl_biome_type = "medium", _mcl_palette_index = 16, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Desert @@ -802,6 +893,8 @@ local function register_biomes() heat_point = 94, _mcl_biome_type = "hot", _mcl_palette_index = 17, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Desert_ocean", @@ -817,6 +910,8 @@ local function register_biomes() heat_point = 94, _mcl_biome_type = "hot", _mcl_palette_index = 17, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Roofed Forest @@ -834,6 +929,8 @@ local function register_biomes() heat_point = 27, _mcl_biome_type = "medium", _mcl_palette_index = 18, + _mcl_skycolor = "#79A6FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "RoofedForest_ocean", @@ -849,6 +946,8 @@ local function register_biomes() heat_point = 27, _mcl_biome_type = "medium", _mcl_palette_index = 18, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Mesa: Starts with a couple of sand-covered layers (the "sandlevel"), @@ -867,6 +966,8 @@ local function register_biomes() heat_point = 100, _mcl_biome_type = "hot", _mcl_palette_index = 19, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) -- Helper biome for the red sand at the bottom of Mesas. minetest.register_biome({ @@ -884,6 +985,8 @@ local function register_biomes() heat_point = 100, _mcl_biome_type = "hot", _mcl_palette_index = 19, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Mesa_ocean", @@ -900,6 +1003,8 @@ local function register_biomes() heat_point = 100, _mcl_biome_type = "hot", _mcl_palette_index = 19, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Mesa Bryce: Variant of Mesa, but with perfect strata and a much smaller red sand desert @@ -917,6 +1022,8 @@ local function register_biomes() heat_point = 100, _mcl_biome_type = "hot", _mcl_palette_index = 20, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "MesaBryce_sandlevel", @@ -933,6 +1040,8 @@ local function register_biomes() heat_point = 100, _mcl_biome_type = "hot", _mcl_palette_index = 20, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "MesaBryce_ocean", @@ -949,6 +1058,8 @@ local function register_biomes() heat_point = 100, _mcl_biome_type = "hot", _mcl_palette_index = 20, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) @@ -970,6 +1081,8 @@ local function register_biomes() vertical_blend = 0, -- we want a sharp transition _mcl_biome_type = "hot", _mcl_palette_index = 21, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) -- The oak forest plateau of this biome. -- This is a plateau for grass blocks, dry shrubs, tall grass, coarse dirt and oaks. @@ -989,6 +1102,8 @@ local function register_biomes() heat_point = 60, _mcl_biome_type = "hot", _mcl_palette_index = 21, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "MesaPlateauF_sandlevel", @@ -1005,6 +1120,8 @@ local function register_biomes() heat_point = 60, _mcl_biome_type = "hot", _mcl_palette_index = 21, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "MesaPlateauF_ocean", @@ -1021,6 +1138,8 @@ local function register_biomes() heat_point = 60, _mcl_biome_type = "hot", _mcl_palette_index = 21, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Mesa Plateau FM @@ -1042,6 +1161,8 @@ local function register_biomes() vertical_blend = 5, _mcl_biome_type = "hot", _mcl_palette_index = 22, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) -- Grass plateau minetest.register_biome({ @@ -1059,6 +1180,8 @@ local function register_biomes() heat_point = 60, _mcl_biome_type = "hot", _mcl_palette_index = 22, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "MesaPlateauFM_sandlevel", @@ -1077,6 +1200,8 @@ local function register_biomes() vertical_blend = 4, _mcl_biome_type = "hot", _mcl_palette_index = 22, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "MesaPlateauFM_ocean", @@ -1093,6 +1218,8 @@ local function register_biomes() heat_point = 60, _mcl_biome_type = "hot", _mcl_palette_index = 22, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) @@ -1111,6 +1238,8 @@ local function register_biomes() heat_point = 79, _mcl_biome_type = "hot", _mcl_palette_index = 1, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Savanna_beach", @@ -1126,6 +1255,8 @@ local function register_biomes() heat_point = 79, _mcl_biome_type = "hot", _mcl_palette_index = 1, + _mcl_skycolor = beach_skycolor, + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Savanna_ocean", @@ -1141,6 +1272,8 @@ local function register_biomes() heat_point = 79, _mcl_biome_type = "hot", _mcl_palette_index = 1, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Savanna M @@ -1160,6 +1293,8 @@ local function register_biomes() heat_point = 100, _mcl_biome_type = "hot", _mcl_palette_index = 23, + _mcl_skycolor = "#6EB1FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "SavannaM_ocean", @@ -1175,6 +1310,8 @@ local function register_biomes() heat_point = 100, _mcl_biome_type = "hot", _mcl_palette_index = 23, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Jungle @@ -1192,6 +1329,8 @@ local function register_biomes() heat_point = 81, _mcl_biome_type = "medium", _mcl_palette_index = 24, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Jungle_shore", @@ -1207,6 +1346,8 @@ local function register_biomes() heat_point = 81, _mcl_biome_type = "medium", _mcl_palette_index = 24, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Jungle_ocean", @@ -1223,6 +1364,8 @@ local function register_biomes() heat_point = 81, _mcl_biome_type = "medium", _mcl_palette_index = 24, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Jungle M @@ -1241,6 +1384,8 @@ local function register_biomes() heat_point = 81, _mcl_biome_type = "medium", _mcl_palette_index = 25, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "JungleM_shore", @@ -1256,6 +1401,8 @@ local function register_biomes() heat_point = 81, _mcl_biome_type = "medium", _mcl_palette_index = 25, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "JungleM_ocean", @@ -1272,6 +1419,8 @@ local function register_biomes() heat_point = 81, _mcl_biome_type = "medium", _mcl_palette_index = 25, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Jungle Edge @@ -1289,6 +1438,8 @@ local function register_biomes() heat_point = 76, _mcl_biome_type = "medium", _mcl_palette_index = 26, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "JungleEdge_ocean", @@ -1304,6 +1455,8 @@ local function register_biomes() heat_point = 76, _mcl_biome_type = "medium", _mcl_palette_index = 26, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Jungle Edge M (very rare). @@ -1324,6 +1477,8 @@ local function register_biomes() heat_point = 79, _mcl_biome_type = "medium", _mcl_palette_index = 27, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "JungleEdgeM_ocean", @@ -1339,6 +1494,8 @@ local function register_biomes() heat_point = 79, _mcl_biome_type = "medium", _mcl_palette_index = 27, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Mangrove swamp @@ -1357,6 +1514,8 @@ local function register_biomes() heat_point = 94, _mcl_biome_type = "hot", _mcl_palette_index = 27, + _mcl_skycolor = "#78A7FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "MangroveSwamp_shore", @@ -1372,6 +1531,8 @@ local function register_biomes() heat_point = 94, _mcl_biome_type = "hot", _mcl_palette_index = 27, + _mcl_skycolor = "#78A7FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "MangroveSwamp_ocean", @@ -1388,6 +1549,8 @@ local function register_biomes() heat_point = 94, _mcl_biome_type = "hot", _mcl_palette_index = 27, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Swampland minetest.register_biome({ @@ -1405,6 +1568,8 @@ local function register_biomes() heat_point = 50, _mcl_biome_type = "medium", _mcl_palette_index = 28, + _mcl_skycolor = "#78A7FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Swampland_shore", @@ -1420,6 +1585,8 @@ local function register_biomes() heat_point = 50, _mcl_biome_type = "medium", _mcl_palette_index = 28, + _mcl_skycolor = "#78A7FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "Swampland_ocean", @@ -1436,6 +1603,8 @@ local function register_biomes() heat_point = 50, _mcl_biome_type = "medium", _mcl_palette_index = 28, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Mushroom Island / Mushroom Island Shore (rare) @@ -1456,6 +1625,8 @@ local function register_biomes() heat_point = 50, _mcl_biome_type = "medium", _mcl_palette_index = 29, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ @@ -1472,6 +1643,8 @@ local function register_biomes() heat_point = 50, _mcl_biome_type = "medium", _mcl_palette_index = 29, + _mcl_skycolor = "#77A8FF", + _mcl_fogcolor = overworld_fogcolor }) minetest.register_biome({ name = "MushroomIsland_ocean", @@ -1487,6 +1660,8 @@ local function register_biomes() heat_point = 50, _mcl_biome_type = "medium", _mcl_palette_index = 29, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Add deep ocean and underground biomes automatically. @@ -1509,6 +1684,8 @@ local function register_biomes() vertical_blend = 5, _mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type, _mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index, + _mcl_skycolor = ocean_skycolor, + _mcl_fogcolor = overworld_fogcolor }) -- Underground biomes are used to identify the underground and to prevent nodes from the surface @@ -1521,6 +1698,8 @@ local function register_biomes() y_max = DEEP_OCEAN_MIN - 1, _mcl_biome_type = minetest.registered_biomes[biome]._mcl_biome_type, _mcl_palette_index = minetest.registered_biomes[biome]._mcl_palette_index, + _mcl_skycolor = minetest.registered_biomes[biome]._mcl_skycolor, + _mcl_fogcolor = minetest.registered_biomes[biome]._mcl_fogcolor, }) end @@ -1575,6 +1754,8 @@ local function register_dimension_biomes() humidity_point = 0, _mcl_biome_type = "hot", _mcl_palette_index = 17, +-- _mcl_skycolor = nether_skycolor, +-- _mcl_fogcolor = "#330808" }) minetest.register_decoration({ @@ -1604,6 +1785,8 @@ local function register_dimension_biomes() humidity_point = 33, _mcl_biome_type = "hot", _mcl_palette_index = 17, +-- _mcl_skycolor = nether_skycolor, +-- _mcl_fogcolor = "#1B4745" }) minetest.register_decoration({ deco_type = "simple", @@ -1653,6 +1836,8 @@ local function register_dimension_biomes() humidity_point = 47, _mcl_biome_type = "hot", _mcl_palette_index = 17, +-- _mcl_skycolor = nether_skycolor, +-- _mcl_fogcolor = "#330303" }) minetest.register_decoration({ deco_type = "simple", @@ -1680,6 +1865,8 @@ local function register_dimension_biomes() humidity_point = 70, _mcl_biome_type = "hot", _mcl_palette_index = 17, +-- _mcl_skycolor = nether_skycolor, +-- _mcl_fogcolor = "#1A051A" }) minetest.register_decoration({ deco_type = "simple", @@ -1707,6 +1894,8 @@ local function register_dimension_biomes() humidity_point = 80, _mcl_biome_type = "hot", _mcl_palette_index = 17, +-- _mcl_skycolor = nether_skycolor, +-- _mcl_fogcolor = "#685F70" }) minetest.register_decoration({ @@ -1759,6 +1948,25 @@ local function register_dimension_biomes() vertical_blend = 16, _mcl_biome_type = "medium", _mcl_palette_index = 0, +-- _mcl_skycolor = end_skycolor, +-- _mcl_fogcolor = end_fogcolor + }) + minetest.register_biome({ + name = "EndBarrens", + node_stone = "air", + node_filler = "air", + node_water = "air", + node_river_water = "air", + node_cave_liquid = "air", + y_min = mcl_vars.mg_end_min, + y_max = mcl_vars.mg_end_max + 80, + heat_point = 1000, + humidity_point = 1000, + vertical_blend = 16, + _mcl_biome_type = "medium", + _mcl_palette_index = 0, +-- _mcl_skycolor = end_skycolor, +-- _mcl_fogcolor = end_fogcolor }) minetest.register_biome({ name = "EndMidlands", @@ -1774,6 +1982,8 @@ local function register_dimension_biomes() vertical_blend = 16, _mcl_biome_type = "medium", _mcl_palette_index = 0, +-- _mcl_skycolor = end_skycolor, +-- _mcl_fogcolor = end_fogcolor }) minetest.register_biome({ name = "EndHighlands", @@ -1789,6 +1999,8 @@ local function register_dimension_biomes() vertical_blend = 16, _mcl_biome_type = "medium", _mcl_palette_index = 0, +-- _mcl_skycolor = end_skycolor, +-- _mcl_fogcolor = end_fogcolor }) minetest.register_biome({ name = "EndSmallIslands", @@ -1804,6 +2016,8 @@ local function register_dimension_biomes() vertical_blend = 16, _mcl_biome_type = "medium", _mcl_palette_index = 0, +-- _mcl_skycolor = end_skycolor, +-- _mcl_fogcolor = end_fogcolor }) minetest.register_biome({ @@ -1822,6 +2036,8 @@ local function register_dimension_biomes() min_pos = {x = -1250, y = mcl_vars.mg_end_min, z = -1250}, _mcl_biome_type = "medium", _mcl_palette_index = 0, +-- _mcl_skycolor = end_skycolor, +-- _mcl_fogcolor = end_fogcolor }) minetest.register_biome({ @@ -1838,6 +2054,8 @@ local function register_dimension_biomes() vertical_blend = 16, _mcl_biome_type = "medium", _mcl_palette_index = 0, +-- _mcl_skycolor = end_skycolor, +-- _mcl_fogcolor = end_fogcolor }) end @@ -3160,7 +3378,48 @@ local function register_decorations() flags = "place_center_x, place_center_z", rotation = "random", }) - + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, + sidelen = 16, + --[[noise_params = { + offset = 0.01, + scale = 0.00001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.33 + },]]-- + fill_ratio = 0.0002, + biomes = {"FlowerForest"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic_bee_nest.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + spawn_by = "group:flower", + }) + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, + sidelen = 16, + --[[noise_params = { + offset = 0.01, + scale = 0.00001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.33 + },]]-- + fill_ratio = 0.00002, + biomes = {"Forest"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + schematic = mod_mcl_core.."/schematics/mcl_core_oak_classic_bee_nest.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + spawn_by = "group:flower", + }) -- Rare balloon oak minetest.register_decoration({ @@ -3269,7 +3528,27 @@ local function register_decorations() flags = "place_center_x, place_center_z, force_placement", rotation = "random", }) - + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"mcl_mud:mud"}, + sidelen = 80, + --[[noise_params = { + offset = 0.01, + scale = 0.00001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.33 + },]]-- + fill_ratio = 0.0005, + biomes = {"MangroveSwamp"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + schematic = mod_mcl_mangrove.."/schematics/mcl_mangrove_bee_nest.mts", + flags = "place_center_x, place_center_z, force_placement", + rotation = "random", + spawn_by = "group:flower", + }) minetest.register_decoration({ deco_type = "simple", place_on = {"mcl_mud:mud"}, @@ -3630,6 +3909,27 @@ local function register_decorations() schematic = mod_mcl_core.."/schematics/mcl_core_birch.mts", flags = "place_center_x, place_center_z", }) + minetest.register_decoration({ + deco_type = "schematic", + place_on = {"group:grass_block_no_snow", "mcl_core:dirt"}, + sidelen = 16, + --[[noise_params = { + offset = 0.01, + scale = 0.00001, + spread = {x = 250, y = 250, z = 250}, + seed = 2, + octaves = 3, + persist = 0.33 + },]]-- + fill_ratio = 0.00002, + biomes = {"Forest", "BirchForest", "BirchForestM"}, + y_min = 1, + y_max = mcl_vars.mg_overworld_max, + schematic = mod_mcl_core.."/schematics/mcl_core_birch_bee_nest.mts", + flags = "place_center_x, place_center_z", + rotation = "random", + spawn_by = "group:flower", + }) -- Dark Oak minetest.register_decoration({ diff --git a/mods/MAPGEN/mcl_structures/api.lua b/mods/MAPGEN/mcl_structures/api.lua index 120cd7c7fc..cf47b4e309 100644 --- a/mods/MAPGEN/mcl_structures/api.lua +++ b/mods/MAPGEN/mcl_structures/api.lua @@ -114,7 +114,7 @@ function mcl_structures.construct_nodes(p1,p2,nodes) end local function construct_nodes(pos,def,pr) - return mcl_structures.construct_nodes(vector.offset(pos,-def.sidelen/2,0,-def.sidelen/2),vector.offset(pos,def.sidelen/2,def.sidelen,def.sidelen/2)) + return mcl_structures.construct_nodes(vector.offset(pos,-def.sidelen/2,0,-def.sidelen/2),vector.offset(pos,def.sidelen/2,def.sidelen,def.sidelen/2),def.construct_nodes) end @@ -227,9 +227,19 @@ local function process_queue() minetest.after(0.5,process_queue) end -function mcl_structures.spawn_mobs(mob,spawnon,p1,p2,pr,n) +function mcl_structures.spawn_mobs(mob,spawnon,p1,p2,pr,n,water) n = n or 1 - local sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon) + local sp = {} + if water then + local nn = minetest.find_nodes_in_area(p1,p2,spawnon) + for k,v in pairs(nn) do + if minetest.get_item_group(minetest.get_node(vector.offset(v,0,1,0)).name,"water") > 0 then + table.insert(sp,v) + end + end + else + sp = minetest.find_nodes_in_area_under_air(p1,p2,spawnon) + end table.shuffle(sp) for i,node in pairs(sp) do if not peaceful and i <= n then diff --git a/mods/MAPGEN/mcl_structures/end_spawn.lua b/mods/MAPGEN/mcl_structures/end_spawn.lua index cf66e4b9ff..5769ac4879 100644 --- a/mods/MAPGEN/mcl_structures/end_spawn.lua +++ b/mods/MAPGEN/mcl_structures/end_spawn.lua @@ -107,8 +107,8 @@ mcl_structures.register_structure("end_spike",{ place_func = function(pos,def,pr) local d = pr:next(6,12) local h = d * pr:next(4,6) - local p1 = vector.add(pos,-d/2,0,-d/2) - local p2 = vector.add(pos,d/2,h+d,d/2) + local p1 = vector.offset(pos, -d / 2, 0, -d / 2) + local p2 = vector.offset(pos, d / 2, h + d, d / 2) minetest.emerge_area(p1, p2, function(blockpos, action, calls_remaining, param) if calls_remaining ~= 0 then return end local s = make_endspike(pos,d,h) diff --git a/mods/MAPGEN/mcl_structures/locale/mcl_structures.ja.tr b/mods/MAPGEN/mcl_structures/locale/mcl_structures.ja.tr new file mode 100644 index 0000000000..12ad5c643b --- /dev/null +++ b/mods/MAPGEN/mcl_structures/locale/mcl_structures.ja.tr @@ -0,0 +1,7 @@ +# textdomain: mcl_structures +Generate a pre-defined structure near your position.=自分の位置の近くに、既成の構造体を生成します。 +Structure placed.=構造体を配置しました。 +Village built. WARNING: Villages are experimental and might have bugs.=村を構築しました。 注:村は実験的なものであり、バグがあるかもしれません。 +Error: No structure type given. Please use “/spawnstruct ”.=エラー:構造体タイプが指定されていません。 "/spawnstruct " を使用してください。 +Error: Unknown structure type. Please use “/spawnstruct ”.=エラー:構造体タイプが不明です。 "/spawnstruct " を使用してください。 +Use /help spawnstruct to see a list of avaiable types.=使用可能なタイプのリストを見るには、 /help spawnstruct を使用してください。 diff --git a/mods/MAPGEN/mcl_structures/pillager_outpost.lua b/mods/MAPGEN/mcl_structures/pillager_outpost.lua index 7196720441..9b72071f0a 100644 --- a/mods/MAPGEN/mcl_structures/pillager_outpost.lua +++ b/mods/MAPGEN/mcl_structures/pillager_outpost.lua @@ -17,6 +17,7 @@ mcl_structures.register_structure("pillager_outpost",{ y_max = mcl_vars.mg_overworld_max, y_min = 1, biomes = { "Desert", "Plains", "Savanna", "IcePlains", "Taiga" }, + construct_nodes = {"mcl_anvils:anvil_damage_2"}, filenames = { modpath.."/schematics/mcl_structures_pillager_outpost.mts", modpath.."/schematics/mcl_structures_pillager_outpost_2.mts" @@ -67,7 +68,12 @@ mcl_structures.register_structure("pillager_outpost",{ mcl_structures.spawn_mobs("mobs_mc:pillager",spawnon,p1,p2,pr,5) mcl_structures.spawn_mobs("mobs_mc:parrot",{"mesecons_pressureplates:pressure_plate_stone_off"},p1,p2,pr,3) mcl_structures.spawn_mobs("mobs_mc:iron_golem",{"mesecons_button:button_stone_off"},p1,p2,pr,1) - mcl_structures.construct_nodes(p1,p2,{"group:wall"}) + for _,n in pairs(minetest.find_nodes_in_area(p1,p2,{"group:wall"})) do + local def = minetest.registered_nodes[minetest.get_node(n).name:gsub("_%d+$","")] + if def and def.on_construct then + def.on_construct(n) + end + end end }) diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_temple.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_temple.mts new file mode 100644 index 0000000000..0a16fa9b24 Binary files /dev/null and b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_temple.mts differ diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_temple_2.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_temple_2.mts new file mode 100644 index 0000000000..8a5a6a3137 Binary files /dev/null and b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_ocean_temple_2.mts differ diff --git a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_outpost.mts b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_outpost.mts index dac927b667..8ee1daffae 100644 Binary files a/mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_outpost.mts and b/mods/MAPGEN/mcl_structures/schematics/mcl_structures_woodland_outpost.mts differ diff --git a/mods/MAPGEN/mcl_structures/shipwrecks.lua b/mods/MAPGEN/mcl_structures/shipwrecks.lua index a6dbb4981a..a9c48e0b55 100644 --- a/mods/MAPGEN/mcl_structures/shipwrecks.lua +++ b/mods/MAPGEN/mcl_structures/shipwrecks.lua @@ -149,7 +149,7 @@ mcl_structures.register_structure("shipwreck",{ { itemstring = "mcl_core:iron_ingot", weight = 90, amount_min = 1, amount_max = 5 }, { itemstring = "mcl_core:iron_nugget", weight = 50, amount_min = 1, amount_max = 10 }, { itemstring = "mcl_core:emerald", weight = 40, amount_min = 1, amount_max = 5 }, - { itemstring = "mcl_dye:blue", weight = 20, amount_min = 1, amount_max = 10 }, + { itemstring = "mcl_core:lapis", weight = 20, amount_min = 1, amount_max = 10 }, { itemstring = "mcl_core:gold_ingot", weight = 10, amount_min = 1, amount_max = 5 }, { itemstring = "mcl_core:gold_nugget", weight = 10, amount_min = 1, amount_max = 10 }, { itemstring = "mcl_experience:bottle", weight = 5, amount_min = 1, amount_max = 1 }, @@ -172,3 +172,92 @@ mcl_structures.register_structure("shipwreck",{ } } }) + +local spawnon = { "mcl_stairs:slab_prismarine_dark"} + +mcl_structures.register_structure("ocean_temple",{ + place_on = {"group:sand","mcl_core:gravel"}, + spawn_by = {"group:water"}, + num_spawn_by = 4, + noise_params = { + offset = 0, + scale = 0.0000122, + spread = {x = 250, y = 250, z = 250}, + seed = 32345, + octaves = 3, + persist = 0.001, + flags = "absvalue", + }, + sidelen = 32, + flags = "force_placement", + biomes = ocean_biomes, + y_max = water_level-4, + y_min = mcl_vars.mg_overworld_min, + filenames = { + modpath .. "/schematics/mcl_structures_ocean_temple.mts", + modpath .. "/schematics/mcl_structures_ocean_temple_2.mts", + }, + y_offset = function(pr) return pr:next(-2,0) end, + after_place = function(p,def,pr) + local p1 = vector.offset(p,-9,0,-9) + local p2 = vector.offset(p,9,32,9) + mcl_structures.spawn_mobs("mobs_mc:guardian",spawnon,p1,p2,pr,5,true) + mcl_structures.spawn_mobs("mobs_mc:guardian_elder",spawnon,p1,p2,pr,1,true) + mcl_structures.construct_nodes(p1,p2,{"group:wall"}) + end, + loot = { + ["mcl_chests:chest_small"] = { + stacks_min = 3, + stacks_max = 10, + items = { + { itemstring = "mcl_sus_stew:stew", weight = 10, amount_min = 1, amount_max = 1 }, + { itemstring = "mcl_core:paper", weight = 8, amount_min = 1, amount_max = 12 }, + { itemstring = "mcl_fishing:fish_raw", weight = 5, amount_min = 8, amount_max = 21 }, + { itemstring = "mcl_fishing:salmon_raw", weight = 7, amount_min = 4, amount_max = 8 }, + { itemstring = "mcl_tnt:tnt", weight = 1, amount_min = 1, amount_max = 2 }, + }, + { + stacks_min = 2, + stacks_max = 6, + items = { + { itemstring = "mcl_core:iron_ingot", weight = 10, amount_min = 1, amount_max = 5 }, + { itemstring = "mcl_core:goldblock", weight = 1, amount_min = 1, amount_max = 2 }, + { itemstring = "mcl_experience:bottle", weight = 5, amount_min = 1, amount_max = 1 }, + { itemstring = "mcl_core:diamond", weight = 5, amount_min = 1, amount_max = 1 }, + { itemstring = "mcl_fishing:fishing_rod", weight = 1, amount_min = 1, amount_max = 1 }, + } + }, + { + stacks_min = 4, + stacks_max = 4, + items = { + --{ itemstring = "FIXME TREASURE MAP", weight = 8, amount_min = 1, amount_max = 5 }, + { itemstring = "mcl_books:book", weight = 1, amount_min = 1, amount_max = 5 }, + { itemstring = "mcl_clock:clock", weight = 1, amount_min = 1, amount_max = 1 }, + { itemstring = "mcl_compass:compass", weight = 1, amount_min = 1, amount_max = 1 }, + { itemstring = "mcl_maps:empty_map", weight = 1, amount_min = 1, amount_max = 1 }, + } + }, + } + } +}) + +mcl_structures.register_structure_spawn({ + name = "mobs_mc:guardian", + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + chance = 10, + interval = 60, + limit = 9, + spawnon = spawnon, +}) + +mcl_structures.register_structure_spawn({ + name = "mobs_mc:guardian_elder", + y_min = mcl_vars.mg_overworld_min, + y_max = mcl_vars.mg_overworld_max, + chance = 100, + interval = 60, + limit = 4, + spawnon = spawnon, +}) diff --git a/mods/MAPGEN/mcl_structures/woodland_mansion.lua b/mods/MAPGEN/mcl_structures/woodland_mansion.lua index c4d4948713..5429e48921 100644 --- a/mods/MAPGEN/mcl_structures/woodland_mansion.lua +++ b/mods/MAPGEN/mcl_structures/woodland_mansion.lua @@ -20,7 +20,7 @@ mcl_structures.register_structure("woodland_cabin",{ modpath.."/schematics/mcl_structures_woodland_cabin.mts", modpath.."/schematics/mcl_structures_woodland_outpost.mts", }, - construct_nodes = {"mcl_barrels:barrel_closed"}, + construct_nodes = {"mcl_barrels:barrel_closed","mcl_books:bookshelf"}, after_place = function(p,def,pr) local p1=vector.offset(p,-def.sidelen,-1,-def.sidelen) local p2=vector.offset(p,def.sidelen,def.sidelen,def.sidelen) diff --git a/mods/MAPGEN/mcl_villages/const.lua b/mods/MAPGEN/mcl_villages/const.lua index 65f43f3445..b844e64302 100644 --- a/mods/MAPGEN/mcl_villages/const.lua +++ b/mods/MAPGEN/mcl_villages/const.lua @@ -52,16 +52,16 @@ schem_path = settlements.modpath.."/schematics/" local basic_pseudobiome_villages = minetest.settings:get_bool("basic_pseudobiome_villages", true) settlements.schematic_table = { - {name = "large_house", mts = schem_path.."large_house.mts", hwidth = 11, hdepth = 12, hheight = 9, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, - {name = "blacksmith", mts = schem_path.."blacksmith.mts", hwidth = 7, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.055, rplc = basic_pseudobiome_villages }, - {name = "butcher", mts = schem_path.."butcher.mts", hwidth = 11, hdepth = 8, hheight = 10, hsize = 14, max_num = 0.03 , rplc = basic_pseudobiome_villages }, + {name = "large_house", mts = schem_path.."large_house.mts", hwidth = 12, hdepth = 12, hheight = 9, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, + {name = "blacksmith", mts = schem_path.."blacksmith.mts", hwidth = 8, hdepth = 11, hheight = 13, hsize = 13, max_num = 0.055, rplc = basic_pseudobiome_villages }, + {name = "butcher", mts = schem_path.."butcher.mts", hwidth = 12, hdepth = 8, hheight = 10, hsize = 14, max_num = 0.03 , rplc = basic_pseudobiome_villages }, {name = "church", mts = schem_path.."church.mts", hwidth = 13, hdepth = 13, hheight = 14, hsize = 15, max_num = 0.04 , rplc = basic_pseudobiome_villages }, - {name = "farm", mts = schem_path.."farm.mts", hwidth = 7, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.1 , rplc = basic_pseudobiome_villages }, - {name = "lamp", mts = schem_path.."lamp.mts", hwidth = 3, hdepth = 3, hheight = 13, hsize = 10, max_num = 0.1 , rplc = false }, + {name = "farm", mts = schem_path.."farm.mts", hwidth = 9, hdepth = 7, hheight = 13, hsize = 13, max_num = 0.1 , rplc = basic_pseudobiome_villages }, + {name = "lamp", mts = schem_path.."lamp.mts", hwidth = 3, hdepth = 4, hheight = 13, hsize = 10, max_num = 0.1 , rplc = false }, {name = "library", mts = schem_path.."library.mts", hwidth = 12, hdepth = 12, hheight = 8, hsize = 13, max_num = 0.04 , rplc = basic_pseudobiome_villages }, - {name = "medium_house", mts = schem_path.."medium_house.mts", hwidth = 8, hdepth = 12, hheight = 8, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, - {name = "small_house", mts = schem_path.."small_house.mts", hwidth = 9, hdepth = 7, hheight = 8, hsize = 13, max_num = 0.7 , rplc = basic_pseudobiome_villages }, - {name = "tavern", mts = schem_path.."tavern.mts", hwidth = 11, hdepth = 10, hheight = 10, hsize = 13, max_num = 0.050, rplc = basic_pseudobiome_villages }, + {name = "medium_house", mts = schem_path.."medium_house.mts", hwidth = 9, hdepth = 12, hheight = 8, hsize = 14, max_num = 0.08 , rplc = basic_pseudobiome_villages }, + {name = "small_house", mts = schem_path.."small_house.mts", hwidth = 9, hdepth = 8, hheight = 8, hsize = 13, max_num = 0.7 , rplc = basic_pseudobiome_villages }, + {name = "tavern", mts = schem_path.."tavern.mts", hwidth = 12, hdepth = 10, hheight = 10, hsize = 13, max_num = 0.050, rplc = basic_pseudobiome_villages }, {name = "well", mts = schem_path.."well.mts", hwidth = 6, hdepth = 8, hheight = 6, hsize = 10, max_num = 0.045, rplc = basic_pseudobiome_villages }, } diff --git a/mods/MAPGEN/mcl_villages/foundation.lua b/mods/MAPGEN/mcl_villages/foundation.lua index 71c5cfdda4..e53a4a3ce0 100644 --- a/mods/MAPGEN/mcl_villages/foundation.lua +++ b/mods/MAPGEN/mcl_villages/foundation.lua @@ -1,16 +1,34 @@ +local function mcl_log (message) + mcl_util.mcl_log (message, "[Village - Foundation]") +end + +local foundation_materials = {} + +foundation_materials["mcl_core:sand"] = "mcl_core:sandstone" +--"mcl_core:sandstonecarved" + ------------------------------------------------------------------------------- -- function to fill empty space below baseplate when building on a hill ------------------------------------------------------------------------------- -function settlements.ground(pos, pr) -- role model: Wendelsteinkircherl, Brannenburg +function settlements.ground(pos, pr, platform_material) -- role model: Wendelsteinkircherl, Brannenburg local p2 = vector.new(pos) local cnt = 0 + local mat = "mcl_core:dirt" + if not platform_material then + mat = "mcl_core:dirt" + else + mat = platform_material + end + p2.y = p2.y-1 while true do cnt = cnt+1 if cnt > 20 then break end if cnt>pr:next(2,4) then - mat = "mcl_core:stone" + if not platform_material then + mat = "mcl_core:stone" + end end minetest.swap_node(p2, {name=mat}) p2.y = p2.y-1 @@ -40,6 +58,12 @@ function settlements.terraform(settlement_info, pr) end --fheight = schematic_data["hheight"] * 3 -- remove trees and leaves above fheight = schematic_data["hheight"] -- remove trees and leaves above + + local surface_mat = settlement_info[i]["surface_mat"] + mcl_log("Surface material: " .. tostring(surface_mat)) + local platform_mat = foundation_materials[surface_mat] + mcl_log("Foundation material: " .. tostring(platform_mat)) + -- -- now that every info is available -> create platform and clear space above -- @@ -48,7 +72,8 @@ function settlements.terraform(settlement_info, pr) for yi = 0,fheight *3 do if yi == 0 then local p = {x=pos.x+xi, y=pos.y, z=pos.z+zi} - settlements.ground(p, pr) + -- Pass in biome info and make foundations of same material (seed: apple for desert) + settlements.ground(p, pr, platform_mat) else -- write ground -- local p = {x=pos.x+xi, y=pos.y+yi, z=pos.z+zi} diff --git a/mods/MAPGEN/mcl_villages/locale/mcl_villages.ja.tr b/mods/MAPGEN/mcl_villages/locale/mcl_villages.ja.tr new file mode 100644 index 0000000000..4d0e4794fc --- /dev/null +++ b/mods/MAPGEN/mcl_villages/locale/mcl_villages.ja.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_villages +Chiseled Stone Village Bricks=模様入り石村レンガ +mcl_villages build tool=mcl_villages 構築ツール \ No newline at end of file diff --git a/mods/MAPGEN/mcl_villages/schematics/blacksmith.mts b/mods/MAPGEN/mcl_villages/schematics/blacksmith.mts index dab65afa47..d4e26fb26b 100644 Binary files a/mods/MAPGEN/mcl_villages/schematics/blacksmith.mts and b/mods/MAPGEN/mcl_villages/schematics/blacksmith.mts differ diff --git a/mods/MAPGEN/mcl_villages/schematics/butcher.mts b/mods/MAPGEN/mcl_villages/schematics/butcher.mts index 1786599dcc..06dd25112e 100644 Binary files a/mods/MAPGEN/mcl_villages/schematics/butcher.mts and b/mods/MAPGEN/mcl_villages/schematics/butcher.mts differ diff --git a/mods/MAPGEN/mcl_villages/schematics/large_house.mts b/mods/MAPGEN/mcl_villages/schematics/large_house.mts index 3939a2c434..6cc19543ed 100644 Binary files a/mods/MAPGEN/mcl_villages/schematics/large_house.mts and b/mods/MAPGEN/mcl_villages/schematics/large_house.mts differ diff --git a/mods/MAPGEN/mcl_villages/schematics/medium_house.mts b/mods/MAPGEN/mcl_villages/schematics/medium_house.mts index fa859ac484..6a90a0cfa1 100644 Binary files a/mods/MAPGEN/mcl_villages/schematics/medium_house.mts and b/mods/MAPGEN/mcl_villages/schematics/medium_house.mts differ diff --git a/mods/MAPGEN/mcl_villages/schematics/small_house.mts b/mods/MAPGEN/mcl_villages/schematics/small_house.mts index a3789504ee..92c0c150dd 100644 Binary files a/mods/MAPGEN/mcl_villages/schematics/small_house.mts and b/mods/MAPGEN/mcl_villages/schematics/small_house.mts differ diff --git a/mods/MAPGEN/mcl_villages/schematics/tavern.mts b/mods/MAPGEN/mcl_villages/schematics/tavern.mts index c26c14dbcc..32b9052610 100644 Binary files a/mods/MAPGEN/mcl_villages/schematics/tavern.mts and b/mods/MAPGEN/mcl_villages/schematics/tavern.mts differ diff --git a/mods/MAPGEN/tsm_railcorridors/gameconfig.lua b/mods/MAPGEN/tsm_railcorridors/gameconfig.lua index 3ada3052ff..4a27586a2f 100644 --- a/mods/MAPGEN/tsm_railcorridors/gameconfig.lua +++ b/mods/MAPGEN/tsm_railcorridors/gameconfig.lua @@ -92,7 +92,7 @@ function tsm_railcorridors.get_treasures(pr) { itemstring = "mcl_farming:melon_seeds", weight = 10, amount_min = 2, amount_max = 4 }, { itemstring = "mcl_farming:pumpkin_seeds", weight = 10, amount_min = 2, amount_max = 4 }, { itemstring = "mcl_core:iron_ingot", weight = 10, amount_min = 1, amount_max = 5 }, - { itemstring = "mcl_dye:blue", weight = 5, amount_min = 4, amount_max = 9 }, + { itemstring = "mcl_core:lapis", weight = 5, amount_min = 4, amount_max = 9 }, { itemstring = "mesecons:redstone", weight = 5, amount_min = 4, amount_max = 9 }, { itemstring = "mcl_core:gold_ingot", weight = 5, amount_min = 1, amount_max = 3 }, { itemstring = "mcl_core:diamond", weight = 3, amount_min = 1, amount_max = 2 }, diff --git a/mods/MISC/findbiome/locale/findbiome.ja.tr b/mods/MISC/findbiome/locale/findbiome.ja.tr new file mode 100644 index 0000000000..60eb7e3c84 --- /dev/null +++ b/mods/MISC/findbiome/locale/findbiome.ja.tr @@ -0,0 +1,10 @@ +# textdomain: findbiome +Find and teleport to biome=バイオームを探し、テレポート +=<バイオーム> +No player.=プレイヤーがいません。 +Biome does not exist!=バイオームが存在しません! +Biome found at @1.=@1 で発見したバイオームです。 +No biome found!=バイオームが見つかりません! +List all biomes=バイオームの全リスト +No biomes.=バイオームがありません。 +Not supported. The “biomeinfo” mod is required for v6 mapgen support!=サポートされていません。v6 mapgen のサポートには "biomeinfo" モッドが必要です! diff --git a/mods/MISC/mcl_commands/locale/mcl_commands.ja.tr b/mods/MISC/mcl_commands/locale/mcl_commands.ja.tr new file mode 100644 index 0000000000..16f7d357cf --- /dev/null +++ b/mods/MISC/mcl_commands/locale/mcl_commands.ja.tr @@ -0,0 +1,23 @@ +# textdomain: mcl_commands +Players can't be killed right now, damage has been disabled.=今、プレイヤーを殺ることはできません。ダメージは無効になっています。 +Player @1 does not exist.=プレイヤー @1 は存在しません。 +You are already dead=あなたはもう死んでいる +@1 is already dead=@1 はもう死んでいる +@1 committed suicide.=@1 は自害しました。 +@1 was killed by @2.=@1 は @2 に殺られました。 +[]=[<名前>] +Kill player or yourself=プレイヤーまたは自分自身を殺害 +Can use /say= /say を使用可能 +=<メッセージ> +Send a message to every player=全プレイヤーにメッセージを送信 +Invalid usage, see /help say.=無効な使用方法です、 /help say を参照してください。 +,, =,, <ノード文字列> +Set node at given position=指定された位置にノードを設定 +Invalid node=無効なノード +@1 spawned.=@1 がスポーンしました。 +Invalid parameters (see /help setblock)=無効なパラメータ ( /help setblock を参照の事) +List bans=BANのリスト +Ban list: @1=BANリスト: @1 +Show who is logged on=誰がログオンしているかを表示 +Displays the world seed=ワールドのシードを表示 +Only peaceful mobs allowed!=平和的なモブのみ許されます! diff --git a/mods/MISC/mcl_privs/locale/mcl_privs.ja.tr b/mods/MISC/mcl_privs/locale/mcl_privs.ja.tr new file mode 100644 index 0000000000..7b8a9fbc78 --- /dev/null +++ b/mods/MISC/mcl_privs/locale/mcl_privs.ja.tr @@ -0,0 +1,2 @@ +# textdomain: mcl_privs +Can place and use advanced blocks like mob spawners, command blocks and barriers.=モブスポナー、コマンドブロック、バリアなどの高度なブロックを配置・使用できます。 diff --git a/mods/MISC/mcl_wip/locale/mcl_wip.ja.tr b/mods/MISC/mcl_wip/locale/mcl_wip.ja.tr new file mode 100644 index 0000000000..7c3b3d14db --- /dev/null +++ b/mods/MISC/mcl_wip/locale/mcl_wip.ja.tr @@ -0,0 +1,4 @@ +# textdomain: mcl_wip +# WIP means “Work in Progress” +(WIP)=(制作途中) +(Temporary)=(仮) diff --git a/mods/PLAYER/mcl_hunger/locale/mcl_hunger.ja.tr b/mods/PLAYER/mcl_hunger/locale/mcl_hunger.ja.tr new file mode 100644 index 0000000000..8e5fe234a6 --- /dev/null +++ b/mods/PLAYER/mcl_hunger/locale/mcl_hunger.ja.tr @@ -0,0 +1,8 @@ +# textdomain: mcl_hunger +@1 succumbed to the poison.=@1 は毒にやられました。 +Food=食料 +Saturation=満腹状態 +%s: %.1f/%d= +Exhaust.=尽きた。 +%s: %d/%d= +@1 starved to death.=@1 は餓死しました。 diff --git a/mods/PLAYER/mcl_playerplus/init.lua b/mods/PLAYER/mcl_playerplus/init.lua index c21392e752..0faa9c53f7 100644 --- a/mods/PLAYER/mcl_playerplus/init.lua +++ b/mods/PLAYER/mcl_playerplus/init.lua @@ -3,6 +3,8 @@ mcl_playerplus = { is_pressing_jump = {}, } +local hud_water = {} + local get_connected_players = minetest.get_connected_players local dir_to_yaw = minetest.dir_to_yaw local get_item_group = minetest.get_item_group @@ -25,6 +27,26 @@ local mcl_playerplus_internal = {} local time = 0 local look_pitch = 0 + +local function calculate_water_depth(pos) + for i=1, 50 do + if get_item_group(minetest.get_node(vector.new(pos.x,pos.y+i,pos.z)).name, "water") == 0 then + return i + end + end + return 50 +end + +local function remove_water_hud(player) + if hud_water[player] then + mcl_weather.skycolor.update_sky_color() + for i=1, #hud_water[player] do + player:hud_remove(hud_water[player][i]) + end + hud_water[player] = nil + end +end + local function player_collision(player) local pos = player:get_pos() @@ -349,16 +371,16 @@ minetest.register_globalstep(function(dtime) -- set head pitch and yaw when flying local head_rot = vector.new(pitch - degrees(dir_to_pitch(player_velocity)) + 50, player_vel_yaw - yaw, 0) set_bone_pos(player,"Head_Control", nil, head_rot) - + -- sets eye height, and nametag color accordingly set_properties(player, player_props_elytra) - + -- control body bone when flying local body_rot = vector.new((75 - degrees(dir_to_pitch(player_velocity))), -player_vel_yaw + yaw, 0) set_bone_pos(player, "Body_Control", nil, body_rot) elseif parent then set_properties(player, player_props_riding) - + local parent_yaw = degrees(parent:get_yaw()) local head_rot = vector.new(pitch, -limit_vel_yaw(yaw, parent_yaw) + parent_yaw, 0) set_bone_pos(player, "Head_Control", nil, head_rot) @@ -367,10 +389,10 @@ minetest.register_globalstep(function(dtime) -- controls head pitch when sneaking local head_rot = vector.new(pitch, player_vel_yaw - yaw, player_vel_yaw - yaw) set_bone_pos(player, "Head_Control", nil, head_rot) - + -- sets eye height, and nametag color accordingly set_properties(player, player_props_sneaking) - + -- sneaking body conrols set_bone_pos(player, "Body_Control", nil, vector.new(0, -player_vel_yaw + yaw, 0)) elseif get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 and is_sprinting(name) == true then @@ -378,10 +400,10 @@ minetest.register_globalstep(function(dtime) is_swimming = true local head_rot = vector.new(pitch - degrees(dir_to_pitch(player_velocity)) + 20, player_vel_yaw - yaw, 0) set_bone_pos(player, "Head_Control", nil, head_rot) - + -- sets eye height, and nametag color accordingly set_properties(player, player_props_swimming) - + -- control body bone when swimming local body_rot = vector.new((75 + degrees(dir_to_pitch(player_velocity))), player_vel_yaw - yaw, 180) set_bone_pos(player,"Body_Control", nil, body_rot) @@ -395,6 +417,25 @@ minetest.register_globalstep(function(dtime) set_bone_pos(player,"Body_Control", nil, vector.new(0, -player_vel_yaw + yaw, 0)) end + if get_item_group(mcl_playerinfo[name].node_head, "water") ~= 0 then + if not hud_water[player] or hud_water[player] and calculate_water_depth(player:get_pos()) ~= #hud_water[player] then + remove_water_hud(player) + hud_water[player] = {} + for i=1, calculate_water_depth(player:get_pos()) do + table.insert(hud_water[player], player:hud_add({ + hud_elem_type = "image", + text = "mcl_playerplus_water.png", + position = {x = 0.5, y = 0.5}, + scale = {x = 32, y = 16}, + offset = {x = 0, y = 0}, + z_index = -1002, + })) + end + end + else + remove_water_hud(player) + end + elytra.last_yaw = player:get_look_horizontal() -- Update jump status immediately since we need this info in real time. -- WARNING: This section is HACKY as hell since it is all just based on heuristics. @@ -549,7 +590,7 @@ minetest.register_globalstep(function(dtime) --[[ Swimming: Cause exhaustion. NOTE: As of 0.4.15, it only counts as swimming when you are with the feet inside the liquid! Head alone does not count. We respect that for now. ]] - if not parent and (get_item_group(node_feet, "liquid") ~= 0 or + if not player:get_attach() and (get_item_group(node_feet, "liquid") ~= 0 or get_item_group(node_stand, "liquid") ~= 0) then local lastPos = mcl_playerplus_internal[name].lastPos if lastPos then @@ -639,7 +680,7 @@ minetest.register_on_joinplayer(function(player) jump_cooldown = -1, -- Cooldown timer for jumping, we need this to prevent the jump exhaustion to increase rapidly } mcl_playerplus.elytra[player] = {active = false, rocketing = 0, speed = 0} - + -- Minetest bug: get_bone_position() returns all zeros vectors. -- Workaround: call set_bone_position() one time first. player:set_bone_position("Head_Control", vector.new(0, 6.75, 0)) diff --git a/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.ja.tr b/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.ja.tr new file mode 100644 index 0000000000..6395fa64ed --- /dev/null +++ b/mods/PLAYER/mcl_playerplus/locale/mcl_playerplus.ja.tr @@ -0,0 +1,3 @@ +# textdomain: mcl_playerplus +@1 suffocated to death.=@1 は窒息死しました。 +@1 was prickled to death by a cactus.=@1 はサボテンにチクチク刺されて死にました。 diff --git a/mods/PLAYER/mcl_playerplus/textures/mcl_playerplus_water.png b/mods/PLAYER/mcl_playerplus/textures/mcl_playerplus_water.png new file mode 100644 index 0000000000..0524ce8d69 Binary files /dev/null and b/mods/PLAYER/mcl_playerplus/textures/mcl_playerplus_water.png differ diff --git a/mods/PLAYER/mcl_skins/edit_skin.lua b/mods/PLAYER/mcl_skins/edit_skin.lua index 72947d3826..3ced41d6da 100644 --- a/mods/PLAYER/mcl_skins/edit_skin.lua +++ b/mods/PLAYER/mcl_skins/edit_skin.lua @@ -25,21 +25,21 @@ mcl_skins = { -- Base color is separate to keep the number of junk nodes registered in check base_color = {0xffeeb592, 0xffb47a57, 0xff8d471d}, color = { - 0xff613915, -- 1 Dark brown Steve hair, Alex bottom + 0xff613915, -- 1 Dark brown 0xff97491b, -- 2 Medium brown 0xffb17050, -- 3 Light brown 0xffe2bc7b, -- 4 Beige 0xff706662, -- 5 Gray 0xff151515, -- 6 Black 0xffc21c1c, -- 7 Red - 0xff178c32, -- 8 Green Alex top + 0xff178c32, -- 8 Green 0xffae2ad3, -- 9 Plum 0xffebe8e4, -- 10 White 0xffe3dd26, -- 11 Yellow - 0xff449acc, -- 12 Light blue Steve top - 0xff124d87, -- 13 Dark blue Steve bottom + 0xff449acc, -- 12 Light blue + 0xff124d87, -- 13 Dark blue 0xfffc0eb3, -- 14 Pink - 0xffd0672a, -- 15 Orange Alex hair + 0xffd0672a, -- 15 Orange }, footwear = {}, mouth = {}, @@ -574,16 +574,16 @@ local function init() for _, item in pairs(json) do mcl_skins.register_item(item) end - mcl_skins.steve.base_color = mcl_skins.base_color[1] - mcl_skins.steve.hair_color = mcl_skins.color[1] - mcl_skins.steve.top_color = mcl_skins.color[12] - mcl_skins.steve.bottom_color = mcl_skins.color[13] + mcl_skins.steve.base_color = mcl_skins.base_color[2] + mcl_skins.steve.hair_color = 0xff5d473b + mcl_skins.steve.top_color = 0xff993535 + mcl_skins.steve.bottom_color = 0xff644939 mcl_skins.steve.slim_arms = false mcl_skins.alex.base_color = mcl_skins.base_color[1] - mcl_skins.alex.hair_color = mcl_skins.color[15] - mcl_skins.alex.top_color = mcl_skins.color[8] - mcl_skins.alex.bottom_color = mcl_skins.color[1] + mcl_skins.alex.hair_color = 0xff715d57 + mcl_skins.alex.top_color = 0xff346840 + mcl_skins.alex.bottom_color = 0xff383532 mcl_skins.alex.slim_arms = true end diff --git a/mods/PLAYER/mcl_skins/list.json b/mods/PLAYER/mcl_skins/list.json index 163111a4ce..01bb622e53 100644 --- a/mods/PLAYER/mcl_skins/list.json +++ b/mods/PLAYER/mcl_skins/list.json @@ -18,11 +18,13 @@ }, { "type": "eye", - "texture": "mcl_skins_eye_1.png" + "texture": "mcl_skins_eye_1.png", + "alex": true }, { "type": "eye", - "texture": "mcl_skins_eye_2.png" + "texture": "mcl_skins_eye_2.png", + "steve": true }, { "type": "eye", @@ -34,9 +36,7 @@ }, { "type": "eye", - "texture": "mcl_skins_eye_5.png", - "steve": true, - "alex": true + "texture": "mcl_skins_eye_5.png" }, { "type": "eye", @@ -73,21 +73,23 @@ }, { "type": "mouth", - "texture": "mcl_skins_mouth_7.png", - "alex": true + "texture": "mcl_skins_mouth_7.png" }, { - "type": "mouth" + "type": "mouth", + "alex": true }, { "type": "hair", "texture": "mcl_skins_hair_1.png", - "mask": "mcl_skins_hair_1_mask.png" + "mask": "mcl_skins_hair_1_mask.png", + "alex": true }, { "type": "hair", "texture": "mcl_skins_hair_2.png", - "mask": "mcl_skins_hair_2_mask.png" + "mask": "mcl_skins_hair_2_mask.png", + "steve": true }, { "type": "hair", @@ -127,14 +129,12 @@ { "type": "hair", "texture": "mcl_skins_hair_10.png", - "mask": "mcl_skins_hair_10_mask.png", - "steve": true + "mask": "mcl_skins_hair_10_mask.png" }, { "type": "hair", "texture": "mcl_skins_hair_11.png", - "mask": "mcl_skins_hair_11_mask.png", - "alex": true + "mask": "mcl_skins_hair_11_mask.png" }, { "type": "hair" @@ -145,7 +145,8 @@ }, { "type": "headwear", - "texture": "mcl_skins_headwear_2.png" + "texture": "mcl_skins_headwear_2.png", + "alex": true }, { "type": "headwear", @@ -173,13 +174,14 @@ }, { "type": "headwear", - "steve": true, - "alex": true + "steve": true }, { "type": "bottom", "texture": "mcl_skins_bottom_1.png", - "mask": "mcl_skins_bottom_1_mask.png" + "mask": "mcl_skins_bottom_1_mask.png", + "steve": true, + "alex": true }, { "type": "bottom", @@ -194,14 +196,14 @@ { "type": "bottom", "texture": "mcl_skins_bottom_4.png", - "mask": "mcl_skins_bottom_4_mask.png", - "steve": true, - "alex": true + "mask": "mcl_skins_bottom_4_mask.png" }, { "type": "top", "texture": "mcl_skins_top_1.png", - "mask": "mcl_skins_top_1_mask.png" + "mask": "mcl_skins_top_1_mask.png", + "steve": true, + "alex": true }, { "type": "top", @@ -241,14 +243,12 @@ { "type": "top", "texture": "mcl_skins_top_9.png", - "mask": "mcl_skins_top_9_mask.png", - "alex": true + "mask": "mcl_skins_top_9_mask.png" }, { "type": "top", "texture": "mcl_skins_top_10.png", - "mask": "mcl_skins_top_10_mask.png", - "steve": true + "mask": "mcl_skins_top_10_mask.png" }, { "type": "base", diff --git a/mods/PLAYER/mcl_skins/locale/mcl_skins.ja.tr b/mods/PLAYER/mcl_skins/locale/mcl_skins.ja.tr new file mode 100644 index 0000000000..87361bb75f --- /dev/null +++ b/mods/PLAYER/mcl_skins/locale/mcl_skins.ja.tr @@ -0,0 +1,14 @@ +# textdomain: mcl_skins +Skins=スキン +Templates=テンプレート +Arm size=腕の大きさ +Bases=ベース +Footwears=靴 +Eyes=目 +Mouths=口 +Bottoms=下衣 +Tops=上衣 +Hairs=髪 +Headwears=帽子 +Open skin configuration screen.=スキン設定画面を開きます。 +Select=選択 diff --git a/mods/PLAYER/mcl_skins/media_credits.txt b/mods/PLAYER/mcl_skins/media_credits.txt index b810583566..cda321d60d 100644 --- a/mods/PLAYER/mcl_skins/media_credits.txt +++ b/mods/PLAYER/mcl_skins/media_credits.txt @@ -20,6 +20,7 @@ mcl_skins_top_6.png mcl_skins_bottom_3.png mcl_skins_eye_7.png mcl_skins_mouth_7.png +mcl_skins_hair_10.png Original work by MrRar License: CC BY-SA 4.0 @@ -99,7 +100,6 @@ Source: http://minetest.fensta.bplaced.net/#id=1258 mcl_skins_bottom_4.png mcl_skins_top_9.png mcl_skins_top_10.png -mcl_skins_hair_10.png mcl_skins_hair_11.png Name: Pixel Perfection Legacy 1.19 Author: Nova_Wostra. Adapted for mcl_skins by MrRar. diff --git a/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_1.png b/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_1.png index df2397d329..789468518f 100644 Binary files a/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_1.png and b/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_1.png differ diff --git a/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_10.png b/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_10.png index 72a50f722f..962d1aa700 100644 Binary files a/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_10.png and b/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_10.png differ diff --git a/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_10_mask.png b/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_10_mask.png index 7c8822cf6c..775d8cd967 100644 Binary files a/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_10_mask.png and b/mods/PLAYER/mcl_skins/textures/mcl_skins_hair_10_mask.png differ diff --git a/mods/PLAYER/mcl_spawn/init.lua b/mods/PLAYER/mcl_spawn/init.lua index c8746fdf0f..eb0208dcb0 100644 --- a/mods/PLAYER/mcl_spawn/init.lua +++ b/mods/PLAYER/mcl_spawn/init.lua @@ -459,10 +459,12 @@ function mcl_spawn.set_spawn_pos(player, pos, message) - local old_bed_meta = minetest.get_meta(oldpos) - if oldpos ~= pos and old_bed_meta then - mcl_log("Removing old bed meta") - old_bed_meta:set_string("player", "") + if oldpos and oldpos ~= pos then + local old_bed_meta = minetest.get_meta(oldpos) + if old_bed_meta then + mcl_log("Removing old bed meta") + old_bed_meta:set_string("player", "") + end else mcl_log("No old bed meta to remove or same as current") end diff --git a/mods/PLAYER/mcl_spawn/locale/mcl_spawn.ja.tr b/mods/PLAYER/mcl_spawn/locale/mcl_spawn.ja.tr new file mode 100644 index 0000000000..079683f68f --- /dev/null +++ b/mods/PLAYER/mcl_spawn/locale/mcl_spawn.ja.tr @@ -0,0 +1,5 @@ +# textdomain: mcl_spawn +New respawn position set!=新しいリスポーン位置を設定しました! +Respawn position cleared!=リスポーン位置をクリアしました! +Couldn't get level of your respawn anchor!=リスポーン アンカーのレベルを取得できませんでした! +Your spawn bed was missing or blocked, and you had no charged respawn anchor!=リスポーン ベッドが見つからないかブロックされており、あとチャージされたリスポーン アンカーがありませんでした! \ No newline at end of file diff --git a/settingtypes.txt b/settingtypes.txt index 39dbc2e90b..25ac943ea5 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -42,6 +42,9 @@ mcl_tnt_griefing (TNT destroys blocks) bool true # Comma separated list of disabled structure names mcl_disabled_structures (Disabled structures) string +# Comma separated list of disabled event names +mcl_disabled_events (Disabled events) string + [Players] # If enabled, players respawn at the bed they last lay on instead of normal # spawn. @@ -219,6 +222,12 @@ mcl_bookshelf_inventories (Enable bookshelf inventories) bool true # Enable swiftness on enchanted golden apples mcl_enable_fapples (Enable swiftness on enchanted golden apples) bool true +# All tameable mobs listen to the "sit" righclick like dogs +mcl_extended_pet_control (Extended pet control) bool true + +# Enable hamburgers for villagers to follow +mcl_enable_hamburger (Enable Hamburger) bool true + [Debugging] # If enabled, this will show the itemstring of an item in the description. mcl_item_id_debug (Item ID Debug) bool false @@ -233,4 +242,7 @@ mcl_logging_mapgen (Chunk generation logging) bool false mcl_logging_structures (Structure generation logging) bool true #Complete debug logging for mcl_signs events. Use this if you have issues with signs. -mcl_logging_mcl_signs (Complete debug logging for mcl_signs) bool true +mcl_logging_mcl_signs (Complete debug logging for mcl_signs) bool false + +#Debug logging for mcl_events. +mcl_logging_event_api (Debug logging for mcl_events) bool false diff --git a/tools/colors.txt b/tools/colors.txt new file mode 100644 index 0000000000..de20aa49ae --- /dev/null +++ b/tools/colors.txt @@ -0,0 +1,2240 @@ +## Mcl2 colors.txt file for minetestmapper +## by Ranko Saotome using the tools provided by minetestmapper + +# mcl_amethyst +mcl_amethyst:amethyst_block 143 94 174 +mcl_amethyst:amethyst_cluster 165 121 193 +mcl_amethyst:budding_amethyst_block 138 88 170 +mcl_amethyst:calcite 189 193 207 +mcl_amethyst:large_amethyst_bud 177 136 203 +mcl_amethyst:medium_amethyst_bud 187 148 212 +mcl_amethyst:small_amethyst_bud 181 140 206 +mcl_amethyst:tinted_glass 126 74 160 + +# mcl_anvils +mcl_anvils:anvil 53 53 53 +mcl_anvils:anvil_damage_1 52 52 52 +mcl_anvils:anvil_damage_2 50 50 50 + +# mcl_armor_stand +mcl_armor_stand:armor_stand 115 89 68 + +# mcl_banners +mcl_banners:hanging_banner 102 88 74 +mcl_banners:standing_banner 102 88 74 + +# mcl_barrels +mcl_barrels:barrel_closed 81 63 49 +mcl_barrels:barrel_open 60 46 36 + +# mcl_beacons +mcl_beacons:beacon 116 168 197 + +# mcl_beds +mcl_beds:bed_black_bottom 109 90 78 +mcl_beds:bed_black_top 109 90 78 +mcl_beds:bed_blue_bottom 108 98 107 +mcl_beds:bed_blue_top 108 98 107 +mcl_beds:bed_brown_bottom 121 94 79 +mcl_beds:bed_brown_top 121 94 79 +mcl_beds:bed_cyan_bottom 109 106 102 +mcl_beds:bed_cyan_top 109 106 102 +mcl_beds:bed_green_bottom 109 103 79 +mcl_beds:bed_green_top 109 103 79 +mcl_beds:bed_grey_bottom 119 100 89 +mcl_beds:bed_grey_top 119 100 89 +mcl_beds:bed_light_blue_bottom 118 118 134 +mcl_beds:bed_light_blue_top 118 118 134 +mcl_beds:bed_lime_bottom 122 123 87 +mcl_beds:bed_lime_top 122 123 87 +mcl_beds:bed_magenta_bottom 136 101 112 +mcl_beds:bed_magenta_top 136 101 112 +mcl_beds:bed_orange_bottom 152 107 81 +mcl_beds:bed_orange_top 152 107 81 +mcl_beds:bed_pink_bottom 152 111 106 +mcl_beds:bed_pink_top 152 111 106 +mcl_beds:bed_purple_bottom 119 94 102 +mcl_beds:bed_purple_top 119 94 102 +mcl_beds:bed_red_bottom 136 90 79 +mcl_beds:bed_red_top 136 90 79 +mcl_beds:bed_silver_bottom 137 118 109 +mcl_beds:bed_silver_top 137 118 109 +mcl_beds:bed_white_bottom 170 152 135 +mcl_beds:bed_white_top 170 152 135 +mcl_beds:bed_yellow_bottom 161 134 86 +mcl_beds:bed_yellow_top 161 134 86 +mcl_beds:respawn_anchor 93 75 91 +mcl_beds:respawn_anchor_charged_1 105 75 136 +mcl_beds:respawn_anchor_charged_2 105 75 136 +mcl_beds:respawn_anchor_charged_3 105 75 136 +mcl_beds:respawn_anchor_charged_4 105 75 136 + +# mcl_bells +mcl_bells:bell 207 203 82 + +# mcl_blackstone +mcl_blackstone:basalt 71 71 71 +mcl_blackstone:basalt_polished 80 79 79 +mcl_blackstone:basalt_smooth 88 87 88 +mcl_blackstone:blackstone 33 31 35 +mcl_blackstone:blackstone_brick_polished 42 39 44 +mcl_blackstone:blackstone_chiseled_polished 42 39 44 +mcl_blackstone:blackstone_gilded 33 31 35 +mcl_blackstone:blackstone_polished 44 42 47 +mcl_blackstone:nether_gold 133 52 40 +mcl_blackstone:quartz_brick 190 185 182 +mcl_blackstone:soul_fire 89 169 169 +mcl_blackstone:soul_soil 94 72 54 +mcl_blackstone:soul_torch 98 108 100 +mcl_blackstone:soul_torch_wall 98 108 100 +mcl_blackstone:wall 33 31 35 +mcl_blackstone:wall_0 33 31 35 +mcl_blackstone:wall_1 33 31 35 +mcl_blackstone:wall_10 33 31 35 +mcl_blackstone:wall_11 33 31 35 +mcl_blackstone:wall_12 33 31 35 +mcl_blackstone:wall_13 33 31 35 +mcl_blackstone:wall_14 33 31 35 +mcl_blackstone:wall_15 33 31 35 +mcl_blackstone:wall_16 33 31 35 +mcl_blackstone:wall_2 33 31 35 +mcl_blackstone:wall_21 33 31 35 +mcl_blackstone:wall_3 33 31 35 +mcl_blackstone:wall_4 33 31 35 +mcl_blackstone:wall_5 33 31 35 +mcl_blackstone:wall_6 33 31 35 +mcl_blackstone:wall_7 33 31 35 +mcl_blackstone:wall_8 33 31 35 +mcl_blackstone:wall_9 33 31 35 + +# mcl_blast_furnace +mcl_blast_furnace:blast_furnace 130 120 115 +mcl_blast_furnace:blast_furnace_active 130 120 115 + +# mcl_books +mcl_books:bookshelf 111 86 66 + +# mcl_brewing +mcl_brewing:stand_000 141 134 134 +mcl_brewing:stand_001 141 134 134 +mcl_brewing:stand_010 141 134 134 +mcl_brewing:stand_011 141 134 134 +mcl_brewing:stand_100 141 134 134 +mcl_brewing:stand_101 141 134 134 +mcl_brewing:stand_110 141 134 134 +mcl_brewing:stand_111 141 134 134 + +# mcl_cake +mcl_cake:cake 241 233 231 +mcl_cake:cake_1 241 233 231 +mcl_cake:cake_2 241 233 231 +mcl_cake:cake_3 241 233 231 +mcl_cake:cake_4 241 233 231 +mcl_cake:cake_5 241 233 231 +mcl_cake:cake_6 241 233 231 + +# mcl_campfires +mcl_campfires:campfire 83 69 65 +mcl_campfires:campfire_lit 210 114 39 +mcl_campfires:soul_campfire 83 69 65 +mcl_campfires:soul_campfire_lit 39 189 195 + +# mcl_cartography_table +mcl_cartography_table:cartography_table 127 110 96 + +# mcl_cauldrons +mcl_cauldrons:cauldron 25 25 25 +mcl_cauldrons:cauldron_1 38 98 129 +mcl_cauldrons:cauldron_1_lava 183 54 21 +mcl_cauldrons:cauldron_1r 32 121 138 +mcl_cauldrons:cauldron_2 38 98 129 +mcl_cauldrons:cauldron_2_lava 183 54 21 +mcl_cauldrons:cauldron_2r 32 121 138 +mcl_cauldrons:cauldron_3 38 98 129 +mcl_cauldrons:cauldron_3_lava 183 54 21 +mcl_cauldrons:cauldron_3r 32 121 138 + +# mcl_chests +mcl_chests:black_shulker_box 101 92 87 +mcl_chests:blue_shulker_box 107 109 128 +mcl_chests:brown_shulker_box 110 95 82 +mcl_chests:chest 100 79 62 +mcl_chests:cyan_shulker_box 107 121 130 +mcl_chests:dark_green_shulker_box 107 128 92 +mcl_chests:dark_grey_shulker_box 119 112 113 +mcl_chests:dark_grey_shulker_box_small 0 0 0 +mcl_chests:ender_chest 75 68 62 +mcl_chests:green_shulker_box 120 136 95 +mcl_chests:grey_shulker_box 147 142 145 +mcl_chests:lightblue_shulker_box 124 143 159 +mcl_chests:magenta_shulker_box 148 106 132 +mcl_chests:orange_shulker_box 160 102 80 +mcl_chests:pink_shulker_box 176 131 161 +mcl_chests:red_shulker_box 151 92 83 +mcl_chests:trapped_chest 100 79 62 +mcl_chests:trapped_chest_on 100 79 62 +mcl_chests:violet_shulker_box 142 99 104 +mcl_chests:white_shulker_box 186 183 187 +mcl_chests:yellow_shulker_box 178 132 81 + +# mcl_cocoas +mcl_cocoas:cocoa_3 140 74 54 + +# mcl_colorblocks +mcl_colorblocks:concrete_black 8 10 15 +mcl_colorblocks:concrete_blue 46 48 147 +mcl_colorblocks:concrete_brown 98 60 32 +mcl_colorblocks:concrete_cyan 21 123 140 +mcl_colorblocks:concrete_green 75 94 37 +mcl_colorblocks:concrete_grey 56 59 64 +mcl_colorblocks:concrete_light_blue 37 140 200 +mcl_colorblocks:concrete_lime 96 171 25 +mcl_colorblocks:concrete_magenta 171 49 162 +mcl_colorblocks:concrete_orange 226 101 1 +mcl_colorblocks:concrete_pink 213 103 144 +mcl_colorblocks:concrete_powder_black 23 26 30 +mcl_colorblocks:concrete_powder_blue 72 76 169 +mcl_colorblocks:concrete_powder_brown 128 87 54 +mcl_colorblocks:concrete_powder_cyan 38 150 160 +mcl_colorblocks:concrete_powder_green 104 127 45 +mcl_colorblocks:concrete_powder_grey 91 98 103 +mcl_colorblocks:concrete_powder_light_blue 76 181 212 +mcl_colorblocks:concrete_powder_lime 126 186 42 +mcl_colorblocks:concrete_powder_magenta 196 94 189 +mcl_colorblocks:concrete_powder_orange 227 141 38 +mcl_colorblocks:concrete_powder_pink 224 149 176 +mcl_colorblocks:concrete_powder_purple 138 58 180 +mcl_colorblocks:concrete_powder_red 172 57 52 +mcl_colorblocks:concrete_powder_silver 160 160 155 +mcl_colorblocks:concrete_powder_white 224 225 225 +mcl_colorblocks:concrete_powder_yellow 230 198 54 +mcl_colorblocks:concrete_purple 103 32 159 +mcl_colorblocks:concrete_red 146 34 34 +mcl_colorblocks:concrete_silver 128 129 118 +mcl_colorblocks:concrete_white 208 214 215 +mcl_colorblocks:concrete_yellow 241 177 21 +mcl_colorblocks:glazed_terracotta_black 61 28 28 +mcl_colorblocks:glazed_terracotta_blue 35 83 135 +mcl_colorblocks:glazed_terracotta_brown 116 93 73 +mcl_colorblocks:glazed_terracotta_cyan 117 144 148 +mcl_colorblocks:glazed_terracotta_green 122 141 83 +mcl_colorblocks:glazed_terracotta_grey 96 96 96 +mcl_colorblocks:glazed_terracotta_light_blue 123 174 208 +mcl_colorblocks:glazed_terracotta_lime 160 213 86 +mcl_colorblocks:glazed_terracotta_magenta 210 112 216 +mcl_colorblocks:glazed_terracotta_orange 196 150 102 +mcl_colorblocks:glazed_terracotta_pink 251 145 173 +mcl_colorblocks:glazed_terracotta_purple 118 55 159 +mcl_colorblocks:glazed_terracotta_red 189 72 63 +mcl_colorblocks:glazed_terracotta_silver 150 160 160 +mcl_colorblocks:glazed_terracotta_white 205 217 219 +mcl_colorblocks:glazed_terracotta_yellow 236 205 111 +mcl_colorblocks:hardened_clay 143 104 88 +mcl_colorblocks:hardened_clay_black 70 53 46 +mcl_colorblocks:hardened_clay_blue 68 91 143 +mcl_colorblocks:hardened_clay_brown 96 69 61 +mcl_colorblocks:hardened_clay_cyan 71 108 124 +mcl_colorblocks:hardened_clay_green 75 102 63 +mcl_colorblocks:hardened_clay_grey 110 92 85 +mcl_colorblocks:hardened_clay_light_blue 91 128 171 +mcl_colorblocks:hardened_clay_lime 106 135 73 +mcl_colorblocks:hardened_clay_magenta 150 80 85 +mcl_colorblocks:hardened_clay_orange 157 95 70 +mcl_colorblocks:hardened_clay_pink 164 80 76 +mcl_colorblocks:hardened_clay_purple 82 71 124 +mcl_colorblocks:hardened_clay_red 159 82 67 +mcl_colorblocks:hardened_clay_silver 149 129 117 +mcl_colorblocks:hardened_clay_white 213 197 184 +mcl_colorblocks:hardened_clay_yellow 177 128 51 + +# mcl_comparators +mcl_comparators:comparator_off_comp 116 106 102 +mcl_comparators:comparator_off_sub 116 106 102 +mcl_comparators:comparator_on_comp 118 106 102 +mcl_comparators:comparator_on_sub 118 106 102 + +# mcl_compass +mcl_compass:lodestone 86 76 72 + +# mcl_composters +mcl_composters:composter 143 112 88 +mcl_composters:composter_1 76 76 41 +mcl_composters:composter_2 76 76 41 +mcl_composters:composter_3 76 76 41 +mcl_composters:composter_4 76 76 41 +mcl_composters:composter_5 76 76 41 +mcl_composters:composter_6 76 76 41 +mcl_composters:composter_7 76 76 41 +mcl_composters:composter_ready 124 120 95 + +# mcl_copper +mcl_copper:block 150 78 57 +mcl_copper:block_cut 150 78 58 +mcl_copper:block_exposed 130 94 84 +mcl_copper:block_exposed_cut 132 94 84 +mcl_copper:block_oxidized 90 110 111 +mcl_copper:block_oxidized_cut 91 112 112 +mcl_copper:block_raw 171 91 69 +mcl_copper:block_weathered 104 104 102 +mcl_copper:block_weathered_cut 109 105 102 +mcl_copper:stone_with_copper 131 123 118 + +# mcl_core +mcl_core:acacialeaves 110 88 44 +mcl_core:acaciasapling 111 94 65 +mcl_core:acaciatree 137 89 58 +mcl_core:acaciatree_bark 107 94 77 +mcl_core:acaciawood 153 103 71 +mcl_core:andesite 105 111 107 +mcl_core:andesite_smooth 107 114 110 +mcl_core:bedrock 92 79 68 +mcl_core:birchleaves 27 56 27 +mcl_core:birchsapling 93 114 84 +mcl_core:birchtree 160 137 119 +mcl_core:birchtree_bark 199 190 180 +mcl_core:birchwood 147 116 90 +mcl_core:bone_block 222 203 171 +mcl_core:brick_block 140 92 81 +mcl_core:cactus 90 106 66 +mcl_core:clay 124 124 124 +mcl_core:coalblock 54 51 54 +mcl_core:coarse_dirt 119 94 78 +mcl_core:cobble 114 108 105 +mcl_core:cobweb 203 190 168 +mcl_core:crying_obsidian 26 19 41 +mcl_core:darkleaves 20 69 28 +mcl_core:darksapling 70 98 85 +mcl_core:darktree 87 74 66 +mcl_core:darktree_bark 77 65 58 +mcl_core:darkwood 89 76 63 +mcl_core:deadbush 121 91 70 +mcl_core:diamondblock 98 164 203 +mcl_core:diorite 154 150 148 +mcl_core:diorite_smooth 158 155 153 +mcl_core:dirt 109 84 70 +mcl_core:dirt_with_grass 64 111 26 +mcl_core:dirt_with_grass_snow 221 229 234 +mcl_core:emeraldblock 56 146 49 +mcl_core:frosted_ice_0 141 194 224 +mcl_core:frosted_ice_1 149 199 227 +mcl_core:frosted_ice_2 155 203 229 +mcl_core:frosted_ice_3 168 210 233 +mcl_core:glass 215 224 235 +mcl_core:glass_black 25 25 25 +mcl_core:glass_blue 51 76 178 +mcl_core:glass_brown 102 76 51 +mcl_core:glass_cyan 76 127 153 +mcl_core:glass_gray 76 76 76 +mcl_core:glass_green 102 127 51 +mcl_core:glass_light_blue 102 153 216 +mcl_core:glass_lime 127 204 25 +mcl_core:glass_magenta 178 76 216 +mcl_core:glass_orange 216 127 51 +mcl_core:glass_pink 242 127 165 +mcl_core:glass_purple 127 63 178 +mcl_core:glass_red 153 51 51 +mcl_core:glass_silver 153 153 153 +mcl_core:glass_white 255 255 255 +mcl_core:glass_yellow 229 229 51 +mcl_core:goldblock 196 153 69 +mcl_core:granite 155 122 111 +mcl_core:granite_smooth 151 122 111 +mcl_core:grass_path 148 122 65 +mcl_core:gravel 137 142 140 +mcl_core:ice 146 198 227 +mcl_core:ironblock 164 157 157 +mcl_core:jungleleaves 29 84 30 +mcl_core:junglesapling 66 91 40 +mcl_core:jungletree 132 92 70 +mcl_core:jungletree_bark 90 62 46 +mcl_core:junglewood 114 80 60 +mcl_core:ladder 85 66 51 +mcl_core:lapisblock 58 97 165 +mcl_core:lava_source 255 100 0 +mcl_core:lava_flowing 255 100 0 +mcl_core:leaves 40 80 39 +mcl_core:mossycobble 105 106 97 +mcl_core:mycelium 109 89 118 +mcl_core:mycelium_snow 221 229 234 +mcl_core:obsidian 26 19 41 +mcl_core:packed_ice 166 212 231 +mcl_core:podzol 86 64 43 +mcl_core:podzol_snow 221 229 234 +mcl_core:redsand 225 137 111 +mcl_core:redsandstone 212 126 108 +mcl_core:redsandstonecarved 212 126 108 +mcl_core:redsandstonesmooth 212 126 108 +mcl_core:redsandstonesmooth2 212 126 108 +mcl_core:reeds 107 107 107 +mcl_core:sand 221 171 127 +mcl_core:sandstone 202 155 121 +mcl_core:sandstonecarved 202 155 121 +mcl_core:sandstonesmooth 202 155 121 +mcl_core:sandstonesmooth2 202 155 121 +mcl_core:sapling 66 93 47 +mcl_core:slimeblock 93 157 87 +mcl_core:snow 221 229 234 +mcl_core:snow_2 221 229 234 +mcl_core:snow_3 221 229 234 +mcl_core:snow_4 221 229 234 +mcl_core:snow_5 221 229 234 +mcl_core:snow_6 221 229 234 +mcl_core:snow_7 221 229 234 +mcl_core:snow_8 221 229 234 +mcl_core:snowblock 221 229 234 +mcl_core:spruceleaves 38 75 47 +mcl_core:sprucesapling 59 76 56 +mcl_core:sprucetree 104 75 59 +mcl_core:sprucetree_bark 69 53 45 +mcl_core:sprucewood 82 66 54 +mcl_core:stone 131 123 118 +mcl_core:stone_smooth 128 119 115 +mcl_core:stone_with_coal 114 106 103 +mcl_core:stone_with_diamond 124 128 133 +mcl_core:stone_with_emerald 120 124 108 +mcl_core:stone_with_gold 136 121 107 +mcl_core:stone_with_iron 137 125 119 +mcl_core:stone_with_lapis 116 115 128 +mcl_core:stone_with_redstone 131 101 98 +mcl_core:stone_with_redstone_lit 131 101 98 +mcl_core:stonebrick 122 122 122 +mcl_core:stonebrickcarved 100 92 88 +mcl_core:stonebrickcracked 96 89 85 +mcl_core:stonebrickmossy 86 104 79 +mcl_core:stripped_acacia 157 99 63 +mcl_core:stripped_acacia_bark 151 90 57 +mcl_core:stripped_birch 170 136 108 +mcl_core:stripped_birch_bark 179 144 115 +mcl_core:stripped_dark_oak 92 79 70 +mcl_core:stripped_dark_oak_bark 91 79 70 +mcl_core:stripped_jungle 170 114 84 +mcl_core:stripped_jungle_bark 176 117 86 +mcl_core:stripped_oak 155 117 81 +mcl_core:stripped_oak_bark 162 122 84 +mcl_core:stripped_spruce 109 80 65 +mcl_core:stripped_spruce_bark 109 82 67 +mcl_core:tree 142 108 77 +mcl_core:tree_bark 99 78 59 +mcl_core:vine 21 62 22 +mcl_core:water_source 0 94 184 224 +mcl_core:wood 115 89 68 + +# mcl_crafting_table +mcl_crafting_table:crafting_table 154 123 95 + +# mcl_crimson +mcl_crimson:crimson_door_t_1 119 46 40 +mcl_crimson:crimson_door_t_2 119 46 40 +mcl_crimson:crimson_fence 107 40 48 +mcl_crimson:crimson_fence_gate 107 40 48 +mcl_crimson:crimson_fence_gate_open 107 40 48 +mcl_crimson:crimson_fungus 153 60 41 +mcl_crimson:crimson_hyphae 176 81 69 +mcl_crimson:crimson_hyphae_bark 100 74 62 +mcl_crimson:crimson_hyphae_wood 119 46 40 +mcl_crimson:crimson_nylium 133 31 35 +mcl_crimson:crimson_roots 129 39 39 +mcl_crimson:crimson_trapdoor 91 40 47 +mcl_crimson:crimson_trapdoor_open 119 46 40 +mcl_crimson:nether_sprouts 115 90 156 +mcl_crimson:shroomlight 253 187 125 +mcl_crimson:stripped_crimson_hyphae 177 74 67 +mcl_crimson:stripped_crimson_hyphae_bark 117 40 48 +mcl_crimson:stripped_warped_hyphae 20 94 82 +mcl_crimson:stripped_warped_hyphae_bark 117 40 48 +mcl_crimson:twisting_vines 101 82 133 +mcl_crimson:warped_fungus 128 139 114 +mcl_crimson:warped_hyphae 90 71 121 +mcl_crimson:warped_hyphae_bark 51 44 61 +mcl_crimson:warped_hyphae_wood 78 64 108 +mcl_crimson:warped_nylium 86 72 116 +mcl_crimson:warped_roots 97 79 128 +mcl_crimson:warped_trapdoor 37 60 54 +mcl_crimson:warped_trapdoor_open 78 64 108 +mcl_crimson:warped_wart_block 70 56 97 +mcl_crimson:weeping_vines 145 47 38 + +# mcl_deepslate +mcl_deepslate:deepslate 75 73 73 +mcl_deepslate:deepslate_bricks 64 62 62 +mcl_deepslate:deepslate_bricks_cracked 62 60 60 +mcl_deepslate:deepslate_chiseled 46 45 45 +mcl_deepslate:deepslate_cobbled 80 78 76 +mcl_deepslate:deepslate_polished 69 68 67 +mcl_deepslate:deepslate_tiles 51 50 49 +mcl_deepslate:deepslate_tiles_cracked 49 48 48 +mcl_deepslate:deepslate_with_coal 65 62 61 +mcl_deepslate:deepslate_with_copper 88 72 68 +mcl_deepslate:deepslate_with_diamond 76 105 118 +mcl_deepslate:deepslate_with_emerald 66 88 73 +mcl_deepslate:deepslate_with_gold 98 84 66 +mcl_deepslate:deepslate_with_iron 98 91 86 +mcl_deepslate:deepslate_with_lapis 67 77 100 +mcl_deepslate:deepslate_with_redstone 97 63 62 +mcl_deepslate:deepslate_with_redstone_lit 97 63 62 +mcl_deepslate:deepslatebrickswall 64 62 62 +mcl_deepslate:deepslatebrickswall_0 64 62 62 +mcl_deepslate:deepslatebrickswall_1 64 62 62 +mcl_deepslate:deepslatebrickswall_10 64 62 62 +mcl_deepslate:deepslatebrickswall_11 64 62 62 +mcl_deepslate:deepslatebrickswall_12 64 62 62 +mcl_deepslate:deepslatebrickswall_13 64 62 62 +mcl_deepslate:deepslatebrickswall_14 64 62 62 +mcl_deepslate:deepslatebrickswall_15 64 62 62 +mcl_deepslate:deepslatebrickswall_16 64 62 62 +mcl_deepslate:deepslatebrickswall_2 64 62 62 +mcl_deepslate:deepslatebrickswall_21 64 62 62 +mcl_deepslate:deepslatebrickswall_3 64 62 62 +mcl_deepslate:deepslatebrickswall_4 64 62 62 +mcl_deepslate:deepslatebrickswall_5 64 62 62 +mcl_deepslate:deepslatebrickswall_6 64 62 62 +mcl_deepslate:deepslatebrickswall_7 64 62 62 +mcl_deepslate:deepslatebrickswall_8 64 62 62 +mcl_deepslate:deepslatebrickswall_9 64 62 62 +mcl_deepslate:deepslatecobbledwall 80 78 76 +mcl_deepslate:deepslatecobbledwall_0 80 78 76 +mcl_deepslate:deepslatecobbledwall_1 80 78 76 +mcl_deepslate:deepslatecobbledwall_10 80 78 76 +mcl_deepslate:deepslatecobbledwall_11 80 78 76 +mcl_deepslate:deepslatecobbledwall_12 80 78 76 +mcl_deepslate:deepslatecobbledwall_13 80 78 76 +mcl_deepslate:deepslatecobbledwall_14 80 78 76 +mcl_deepslate:deepslatecobbledwall_15 80 78 76 +mcl_deepslate:deepslatecobbledwall_16 80 78 76 +mcl_deepslate:deepslatecobbledwall_2 80 78 76 +mcl_deepslate:deepslatecobbledwall_21 80 78 76 +mcl_deepslate:deepslatecobbledwall_3 80 78 76 +mcl_deepslate:deepslatecobbledwall_4 80 78 76 +mcl_deepslate:deepslatecobbledwall_5 80 78 76 +mcl_deepslate:deepslatecobbledwall_6 80 78 76 +mcl_deepslate:deepslatecobbledwall_7 80 78 76 +mcl_deepslate:deepslatecobbledwall_8 80 78 76 +mcl_deepslate:deepslatecobbledwall_9 80 78 76 +mcl_deepslate:deepslatepolishedwall 69 68 67 +mcl_deepslate:deepslatepolishedwall_0 69 68 67 +mcl_deepslate:deepslatepolishedwall_1 69 68 67 +mcl_deepslate:deepslatepolishedwall_10 69 68 67 +mcl_deepslate:deepslatepolishedwall_11 69 68 67 +mcl_deepslate:deepslatepolishedwall_12 69 68 67 +mcl_deepslate:deepslatepolishedwall_13 69 68 67 +mcl_deepslate:deepslatepolishedwall_14 69 68 67 +mcl_deepslate:deepslatepolishedwall_15 69 68 67 +mcl_deepslate:deepslatepolishedwall_16 69 68 67 +mcl_deepslate:deepslatepolishedwall_2 69 68 67 +mcl_deepslate:deepslatepolishedwall_21 69 68 67 +mcl_deepslate:deepslatepolishedwall_3 69 68 67 +mcl_deepslate:deepslatepolishedwall_4 69 68 67 +mcl_deepslate:deepslatepolishedwall_5 69 68 67 +mcl_deepslate:deepslatepolishedwall_6 69 68 67 +mcl_deepslate:deepslatepolishedwall_7 69 68 67 +mcl_deepslate:deepslatepolishedwall_8 69 68 67 +mcl_deepslate:deepslatepolishedwall_9 69 68 67 +mcl_deepslate:deepslatetileswall 51 50 49 +mcl_deepslate:deepslatetileswall_0 51 50 49 +mcl_deepslate:deepslatetileswall_1 51 50 49 +mcl_deepslate:deepslatetileswall_10 51 50 49 +mcl_deepslate:deepslatetileswall_11 51 50 49 +mcl_deepslate:deepslatetileswall_12 51 50 49 +mcl_deepslate:deepslatetileswall_13 51 50 49 +mcl_deepslate:deepslatetileswall_14 51 50 49 +mcl_deepslate:deepslatetileswall_15 51 50 49 +mcl_deepslate:deepslatetileswall_16 51 50 49 +mcl_deepslate:deepslatetileswall_2 51 50 49 +mcl_deepslate:deepslatetileswall_21 51 50 49 +mcl_deepslate:deepslatetileswall_3 51 50 49 +mcl_deepslate:deepslatetileswall_4 51 50 49 +mcl_deepslate:deepslatetileswall_5 51 50 49 +mcl_deepslate:deepslatetileswall_6 51 50 49 +mcl_deepslate:deepslatetileswall_7 51 50 49 +mcl_deepslate:deepslatetileswall_8 51 50 49 +mcl_deepslate:deepslatetileswall_9 51 50 49 +mcl_deepslate:infested_deepslate 75 73 73 +mcl_deepslate:tuff 99 82 70 + +# mcl_dispensers +mcl_dispensers:dispenser 149 139 133 +mcl_dispensers:dispenser_down 149 139 133 +mcl_dispensers:dispenser_up 123 113 108 + +# mcl_doors +mcl_doors:acacia_door_t_1 134 81 53 +mcl_doors:acacia_door_t_2 134 81 53 +mcl_doors:acacia_trapdoor 150 100 69 +mcl_doors:acacia_trapdoor_open 156 105 73 +mcl_doors:birch_door_t_1 154 121 94 +mcl_doors:birch_door_t_2 154 121 94 +mcl_doors:birch_trapdoor 180 163 146 +mcl_doors:birch_trapdoor_open 147 116 90 +mcl_doors:dark_oak_door_t_1 103 90 76 +mcl_doors:dark_oak_door_t_2 103 90 76 +mcl_doors:dark_oak_trapdoor 82 70 58 +mcl_doors:dark_oak_trapdoor_open 86 73 61 +mcl_doors:iron_door_t_1 157 151 150 +mcl_doors:iron_door_t_2 157 151 150 +mcl_doors:iron_trapdoor 151 143 143 +mcl_doors:iron_trapdoor_open 151 142 142 +mcl_doors:jungle_door_t_1 110 76 57 +mcl_doors:jungle_door_t_2 110 76 57 +mcl_doors:jungle_trapdoor 106 73 53 +mcl_doors:jungle_trapdoor_open 122 88 63 +mcl_doors:spruce_door_t_1 93 80 69 +mcl_doors:spruce_door_t_2 93 80 69 +mcl_doors:spruce_trapdoor 73 59 48 +mcl_doors:spruce_trapdoor_open 76 60 49 +mcl_doors:trapdoor 100 76 60 +mcl_doors:trapdoor_open 114 86 67 +mcl_doors:wooden_door_t_1 85 65 52 +mcl_doors:wooden_door_t_2 85 65 52 + +# mcl_droppers +mcl_droppers:dropper 149 139 133 +mcl_droppers:dropper_down 149 139 133 +mcl_droppers:dropper_up 126 115 111 + +# mcl_enchanting +mcl_enchanting:table 97 97 96 + +# mcl_end +mcl_end:chorus_flower 96 100 127 +mcl_end:chorus_flower_dead 83 82 119 +mcl_end:chorus_plant 79 74 115 +mcl_end:dragon_egg 56 36 34 +mcl_end:end_bricks 195 189 123 +mcl_end:end_rod 124 77 97 +mcl_end:end_stone 221 214 131 +mcl_end:purpur_block 161 112 175 +mcl_end:purpur_pillar 160 111 173 + +# mcl_farming +mcl_farming:beetroot 84 109 72 +mcl_farming:beetroot_0 56 122 76 +mcl_farming:beetroot_1 55 119 73 +mcl_farming:beetroot_2 56 120 74 +mcl_farming:carrot 105 106 59 +mcl_farming:carrot_1 76 113 62 +mcl_farming:carrot_2 76 113 62 +mcl_farming:carrot_3 74 109 59 +mcl_farming:carrot_4 74 109 59 +mcl_farming:carrot_5 72 108 58 +mcl_farming:carrot_6 72 108 58 +mcl_farming:carrot_7 72 108 58 +mcl_farming:hay_block 156 119 83 +mcl_farming:melon 59 82 34 +mcl_farming:melontige_unconnect 100 100 100 +mcl_farming:potato 86 111 59 +mcl_farming:potato_1 75 120 65 +mcl_farming:potato_2 75 120 65 +mcl_farming:potato_3 71 115 62 +mcl_farming:potato_4 71 115 62 +mcl_farming:potato_5 74 119 64 +mcl_farming:potato_6 74 119 64 +mcl_farming:potato_7 74 119 64 +mcl_farming:pumpkin 174 90 40 +mcl_farming:pumpkin_face 174 90 40 +mcl_farming:pumpkin_face_light 174 90 40 +mcl_farming:pumpkintige_unconnect 100 100 100 +mcl_farming:soil 103 81 69 +mcl_farming:soil_wet 70 56 47 +mcl_farming:sweet_berry_bush_0 0 111 29 +mcl_farming:sweet_berry_bush_1 0 101 25 +mcl_farming:sweet_berry_bush_2 76 95 24 +mcl_farming:sweet_berry_bush_3 107 87 39 +mcl_farming:wheat 167 120 78 +mcl_farming:wheat_1 55 103 48 +mcl_farming:wheat_2 51 99 46 +mcl_farming:wheat_3 51 98 46 +mcl_farming:wheat_4 67 115 53 +mcl_farming:wheat_5 87 130 66 +mcl_farming:wheat_6 104 144 68 +mcl_farming:wheat_7 148 147 71 + +# mcl_fences +mcl_fences:acacia_fence 153 101 70 +mcl_fences:acacia_fence_gate 153 101 70 +mcl_fences:acacia_fence_gate_open 153 101 70 +mcl_fences:birch_fence 152 120 93 +mcl_fences:birch_fence_gate 152 120 93 +mcl_fences:birch_fence_gate_open 152 120 93 +mcl_fences:dark_oak_fence 85 73 60 +mcl_fences:dark_oak_fence_gate 85 73 60 +mcl_fences:dark_oak_fence_gate_open 85 73 60 +mcl_fences:fence 110 84 65 +mcl_fences:fence_gate 110 84 65 +mcl_fences:fence_gate_open 110 84 65 +mcl_fences:jungle_fence 116 82 61 +mcl_fences:jungle_fence_gate 116 82 61 +mcl_fences:jungle_fence_gate_open 116 82 61 +mcl_fences:nether_brick_fence 50 25 26 +mcl_fences:spruce_fence 85 68 55 +mcl_fences:spruce_fence_gate 85 68 55 +mcl_fences:spruce_fence_gate_open 85 68 55 + +# mcl_fire +mcl_fire:eternal_fire 209 112 39 +mcl_fire:fire 209 112 39 + +# mcl_fletching_table +mcl_fletching_table:fletching_table 174 116 83 + +# mcl_flowerpots +mcl_flowerpots:flower_pot 121 57 48 +mcl_flowerpots:flower_pot_cactus 114 92 57 + +# mcl_flowers +mcl_flowers:allium 130 121 159 +mcl_flowers:azure_bluet 118 124 125 +mcl_flowers:blue_orchid 0 118 191 +mcl_flowers:dandelion 136 120 59 +mcl_flowers:double_fern 142 132 114 +mcl_flowers:double_fern_top 150 139 120 +mcl_flowers:double_grass 0 255 0 +mcl_flowers:double_grass_top 0 255 0 +mcl_flowers:fern 144 134 116 +mcl_flowers:lilac 198 161 207 +mcl_flowers:lilac_top 198 161 207 +mcl_flowers:oxeye_daisy 162 158 139 +mcl_flowers:peony 242 172 185 +mcl_flowers:peony_top 242 172 185 +mcl_flowers:poppy 161 0 14 +mcl_flowers:rose_bush 161 0 14 +mcl_flowers:rose_bush_top 161 0 14 +mcl_flowers:sunflower 247 247 73 +mcl_flowers:sunflower_top 247 247 73 +mcl_flowers:tulip_orange 132 87 55 +mcl_flowers:tulip_pink 242 172 185 +mcl_flowers:tulip_red 161 0 14 +mcl_flowers:tulip_white 255 255 255 +mcl_flowers:waterlily 29 83 29 +mcl_flowers:tallgrass 21 71 52 + +# mcl_furnaces +mcl_furnaces:furnace 149 139 133 +mcl_furnaces:furnace_active 149 139 133 + +# mcl_grindstone +mcl_grindstone:grindstone 216 216 216 + +# mcl_heads +mcl_heads:creeper22_5 94 115 69 +mcl_heads:creeper45 94 115 69 +mcl_heads:creeper67_5 94 115 69 +mcl_heads:skeleton22_5 126 126 126 +mcl_heads:skeleton45 126 126 126 +mcl_heads:skeleton67_5 126 126 126 +mcl_heads:steve22_5 123 87 69 +mcl_heads:steve45 123 87 69 +mcl_heads:steve67_5 123 87 69 +mcl_heads:wither_skeleton22_5 50 50 50 +mcl_heads:wither_skeleton45 50 50 50 +mcl_heads:wither_skeleton67_5 50 50 50 +mcl_heads:zombie22_5 67 105 70 +mcl_heads:zombie45 67 105 70 +mcl_heads:zombie67_5 67 105 70 + +# mcl_hoppers +mcl_hoppers:hopper 50 50 50 +mcl_hoppers:hopper_disabled 50 50 50 +mcl_hoppers:hopper_side 50 50 50 +mcl_hoppers:hopper_side_disabled 50 50 50 + +# mcl_itemframes +mcl_itemframes:glow_item_frame 182 132 79 +mcl_itemframes:item_frame 127 94 66 + +# mcl_jukebox +mcl_jukebox:jukebox 77 60 46 + +# mcl_lanterns +mcl_lanterns:chain 41 41 41 +mcl_lanterns:lantern_ceiling 102 73 51 +mcl_lanterns:lantern_floor 102 73 51 +mcl_lanterns:soul_lantern_ceiling 62 91 92 +mcl_lanterns:soul_lantern_floor 62 91 92 + +# mcl_lightning_rods + +# mcl_loom +mcl_loom:loom 130 121 119 + +# mcl_mangrove +mcl_mangrove:hanging_propagule_1 80 100 48 +mcl_mangrove:mangrove_door_t_1 125 61 55 +mcl_mangrove:mangrove_door_t_2 125 61 55 +mcl_mangrove:mangrove_mud_roots 66 61 58 +mcl_mangrove:mangrove_roots 97 75 49 +mcl_mangrove:mangrove_stripped_bark 141 68 57 +mcl_mangrove:mangrove_stripped_trunk 127 62 56 +mcl_mangrove:mangrove_trapdoor 123 60 55 +mcl_mangrove:mangrove_trapdoor_open 125 61 55 +mcl_mangrove:mangrove_tree 125 66 54 +mcl_mangrove:mangrove_tree_bark 88 68 46 +mcl_mangrove:mangrove_wood 125 61 55 +mcl_mangrove:mangrove_wood_fence 125 61 55 +mcl_mangrove:mangrove_wood_fence_gate 125 61 55 +mcl_mangrove:mangrove_wood_fence_gate_open 125 61 55 +mcl_mangrove:mangroveleaves 34 50 14 +mcl_mangrove:propagule 71 114 46 +mcl_mangrove:propagule_clay 124 124 124 +mcl_mangrove:propagule_coarse_dirt 119 94 78 +mcl_mangrove:propagule_dirt 109 84 70 +mcl_mangrove:propagule_mud 66 61 58 +mcl_mangrove:river_water_logged_roots 32 121 138 +mcl_mangrove:water_logged_roots 38 98 129 + +# mcl_maps +mcl_maps:filled_map_character_male 123 77 64 +mcl_maps:filled_map_mcl_skins_base_18D471DFF_female 0 0 0 +mcl_maps:filled_map_mcl_skins_base_18D471DFF_male 0 0 0 +mcl_maps:filled_map_mcl_skins_base_1B47A57FF_female 0 0 0 +mcl_maps:filled_map_mcl_skins_base_1B47A57FF_male 0 0 0 +mcl_maps:filled_map_mcl_skins_base_1EEB592FF_female 0 0 0 +mcl_maps:filled_map_mcl_skins_base_1EEB592FF_male 0 0 0 +mcl_maps:filled_map_mcl_skins_character_1_female 106 100 86 + +# mcl_meshhand +mcl_meshhand:character_male 123 77 64 +mcl_meshhand:mcl_skins_base_18D471DFF_female 0 0 0 +mcl_meshhand:mcl_skins_base_18D471DFF_male 0 0 0 +mcl_meshhand:mcl_skins_base_1B47A57FF_female 0 0 0 +mcl_meshhand:mcl_skins_base_1B47A57FF_male 0 0 0 +mcl_meshhand:mcl_skins_base_1EEB592FF_female 0 0 0 +mcl_meshhand:mcl_skins_base_1EEB592FF_male 0 0 0 +mcl_meshhand:mcl_skins_character_1_female 106 100 86 + +# mcl_minecarts +mcl_minecarts:activator_rail 87 70 59 +mcl_minecarts:activator_rail_on 95 69 59 +mcl_minecarts:detector_rail 94 81 73 +mcl_minecarts:detector_rail_on 96 81 73 +mcl_minecarts:golden_rail 107 88 63 +mcl_minecarts:golden_rail_on 110 88 63 +mcl_minecarts:rail 92 75 63 + +# mcl_mobspawners +mcl_mobspawners:spawner 42 42 42 + +# mcl_monster_eggs +mcl_monster_eggs:monster_egg_cobble 114 108 105 +mcl_monster_eggs:monster_egg_stone 131 123 118 +mcl_monster_eggs:monster_egg_stonebrick 99 91 88 +mcl_monster_eggs:monster_egg_stonebrickcarved 100 92 88 +mcl_monster_eggs:monster_egg_stonebrickcracked 96 89 85 +mcl_monster_eggs:monster_egg_stonebrickmossy 86 104 79 + +# mcl_mud +mcl_mud:mud 66 61 58 +mcl_mud:mud_bricks 109 96 87 +mcl_mud:packed_mud 102 90 83 + +# mcl_mushrooms +mcl_mushrooms:brown_mushroom_block_cap_000000 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_000001 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_000010 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_000011 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_000100 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_000101 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_000110 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_000111 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_001000 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_001001 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_001010 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_001011 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_001100 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_001101 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_001110 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_001111 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_010000 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_010001 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_010010 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_010011 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_010100 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_010101 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_010110 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_010111 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_011000 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_011001 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_011010 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_011011 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_011100 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_011101 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_011110 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_011111 218 176 137 +mcl_mushrooms:brown_mushroom_block_cap_100000 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_100001 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_100010 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_100011 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_100100 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_100101 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_100110 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_100111 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_101000 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_101001 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_101010 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_101011 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_101100 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_101101 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_101110 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_101111 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_110000 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_110001 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_110010 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_110011 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_110100 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_110101 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_110110 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_110111 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_111000 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_111001 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_111010 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_111011 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_111100 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_111101 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_111110 132 87 69 +mcl_mushrooms:brown_mushroom_block_cap_111111 132 87 69 +mcl_mushrooms:brown_mushroom_block_stem 218 176 137 +mcl_mushrooms:brown_mushroom_block_stem_full 205 184 151 +mcl_mushrooms:mushroom_brown 123 84 61 +mcl_mushrooms:mushroom_red 173 71 66 +mcl_mushrooms:red_mushroom_block_cap_000000 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_000001 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_000010 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_000011 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_000100 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_000101 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_000110 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_000111 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_001000 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_001001 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_001010 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_001011 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_001100 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_001101 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_001110 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_001111 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_010000 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_010001 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_010010 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_010011 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_010100 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_010101 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_010110 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_010111 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_011000 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_011001 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_011010 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_011011 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_011100 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_011101 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_011110 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_011111 218 176 137 +mcl_mushrooms:red_mushroom_block_cap_100000 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_100001 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_100010 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_100011 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_100100 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_100101 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_100110 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_100111 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_101000 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_101001 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_101010 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_101011 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_101100 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_101101 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_101110 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_101111 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_110000 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_110001 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_110010 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_110011 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_110100 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_110101 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_110110 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_110111 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_111000 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_111001 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_111010 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_111011 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_111100 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_111101 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_111110 138 40 26 +mcl_mushrooms:red_mushroom_block_cap_111111 138 40 26 +mcl_mushrooms:red_mushroom_block_stem 218 176 137 +mcl_mushrooms:red_mushroom_block_stem_full 205 184 151 + +# mcl_nether +mcl_nether:ancient_debris 63 57 50 +mcl_nether:glowstone 206 160 102 +mcl_nether:magma 99 35 28 +mcl_nether:nether_brick 49 25 26 +mcl_nether:nether_lava_flowing 180 50 19 +mcl_nether:nether_lava_source 183 54 21 +mcl_nether:nether_wart 129 61 57 +mcl_nether:nether_wart_0 59 42 39 +mcl_nether:nether_wart_1 103 59 56 +mcl_nether:nether_wart_2 103 59 56 +mcl_nether:nether_wart_block 179 79 74 +mcl_nether:netheriteblock 36 34 33 +mcl_nether:netherrack 133 52 40 +mcl_nether:quartz_block 198 191 187 +mcl_nether:quartz_chiseled 198 190 187 +mcl_nether:quartz_ore 137 75 67 +mcl_nether:quartz_pillar 196 188 186 +mcl_nether:quartz_smooth 198 191 187 +mcl_nether:red_nether_brick 72 17 6 +mcl_nether:soul_sand 92 71 52 + +# mcl_observers +mcl_observers:observer_down_off 89 82 79 +mcl_observers:observer_down_on 92 82 79 +mcl_observers:observer_off 142 131 126 +mcl_observers:observer_on 142 131 126 +mcl_observers:observer_up_off 111 91 91 +mcl_observers:observer_up_on 111 91 91 + +# mcl_ocean +mcl_ocean:brain_coral 202 85 149 +mcl_ocean:brain_coral_block 202 85 149 +mcl_ocean:brain_coral_fan 202 85 149 +mcl_ocean:bubble_coral 145 76 196 +mcl_ocean:bubble_coral_block 145 76 196 +mcl_ocean:bubble_coral_fan 145 76 196 +mcl_ocean:dead_brain_coral 131 114 124 +mcl_ocean:dead_brain_coral_block 131 114 124 +mcl_ocean:dead_brain_coral_fan 131 114 124 +mcl_ocean:dead_bubble_coral 115 106 123 +mcl_ocean:dead_bubble_coral_block 115 106 123 +mcl_ocean:dead_bubble_coral_fan 115 106 123 +mcl_ocean:dead_fire_coral 129 103 101 +mcl_ocean:dead_fire_coral_block 129 103 101 +mcl_ocean:dead_fire_coral_fan 129 103 101 +mcl_ocean:dead_horn_coral 154 147 127 +mcl_ocean:dead_horn_coral_block 154 147 127 +mcl_ocean:dead_horn_coral_fan 154 147 127 +mcl_ocean:dead_tube_coral 100 106 129 +mcl_ocean:dead_tube_coral_block 100 106 129 +mcl_ocean:dead_tube_coral_fan 100 106 129 +mcl_ocean:dried_kelp_block 56 71 57 +mcl_ocean:fire_coral 201 75 62 +mcl_ocean:fire_coral_block 201 75 62 +mcl_ocean:fire_coral_fan 201 75 62 +mcl_ocean:horn_coral 232 195 70 +mcl_ocean:horn_coral_block 232 195 70 +mcl_ocean:horn_coral_fan 232 195 70 +mcl_ocean:kelp_dirt 109 84 70 +mcl_ocean:kelp_gravel 115 109 103 +mcl_ocean:kelp_redsand 225 137 111 +mcl_ocean:kelp_sand 221 171 127 +mcl_ocean:prismarine 106 127 123 +mcl_ocean:prismarine_brick 107 116 117 +mcl_ocean:prismarine_dark 77 90 97 +mcl_ocean:sea_lantern 141 152 152 +mcl_ocean:sea_pickle_1_dead_brain_coral_block 131 114 124 +mcl_ocean:sea_pickle_1_off_dead_brain_coral_block 131 114 124 +mcl_ocean:sea_pickle_2_dead_brain_coral_block 131 114 124 +mcl_ocean:sea_pickle_2_off_dead_brain_coral_block 131 114 124 +mcl_ocean:sea_pickle_3_dead_brain_coral_block 131 114 124 +mcl_ocean:sea_pickle_3_off_dead_brain_coral_block 131 114 124 +mcl_ocean:sea_pickle_4_dead_brain_coral_block 131 114 124 +mcl_ocean:sea_pickle_4_off_dead_brain_coral_block 131 114 124 +mcl_ocean:seagrass_dirt 109 84 70 +mcl_ocean:seagrass_gravel 115 109 103 +mcl_ocean:seagrass_redsand 225 137 111 +mcl_ocean:seagrass_sand 221 171 127 +mcl_ocean:tube_coral 58 91 211 +mcl_ocean:tube_coral_block 58 91 211 +mcl_ocean:tube_coral_fan 58 91 211 + +# mcl_portals +mcl_portals:end_portal_frame 101 92 80 +mcl_portals:end_portal_frame_eye 101 92 80 +mcl_portals:portal_end 15 15 15 +mcl_portals:portal_gateway 15 15 15 + +# mcl_potions +mcl_potions:fire_resistance_arrow_box 148 132 127 +mcl_potions:fire_resistance_plus_arrow_box 148 132 127 +mcl_potions:harming_2_arrow_box 148 132 127 +mcl_potions:harming_arrow_box 148 132 127 +mcl_potions:healing_2_arrow_box 148 132 127 +mcl_potions:healing_arrow_box 148 132 127 +mcl_potions:invisibility_arrow_box 148 132 127 +mcl_potions:invisibility_plus_arrow_box 148 132 127 +mcl_potions:leaping_2_arrow_box 148 132 127 +mcl_potions:leaping_arrow_box 148 132 127 +mcl_potions:leaping_plus_arrow_box 148 132 127 +mcl_potions:night_vision_arrow_box 148 132 127 +mcl_potions:night_vision_plus_arrow_box 148 132 127 +mcl_potions:poison_2_arrow_box 148 132 127 +mcl_potions:poison_arrow_box 148 132 127 +mcl_potions:poison_plus_arrow_box 148 132 127 +mcl_potions:regeneration_2_arrow_box 148 132 127 +mcl_potions:regeneration_arrow_box 148 132 127 +mcl_potions:regeneration_plus_arrow_box 148 132 127 +mcl_potions:slowness_2_arrow_box 148 132 127 +mcl_potions:slowness_arrow_box 148 132 127 +mcl_potions:slowness_plus_arrow_box 148 132 127 +mcl_potions:swiftness_2_arrow_box 148 132 127 +mcl_potions:swiftness_arrow_box 148 132 127 +mcl_potions:swiftness_plus_arrow_box 148 132 127 +mcl_potions:water_breathing_arrow_box 148 132 127 +mcl_potions:water_breathing_plus_arrow_box 148 132 127 + +# mcl_raw_ores +mcl_raw_ores:raw_gold_block 210 169 85 +mcl_raw_ores:raw_iron_block 195 175 159 + +# mcl_sculk +mcl_sculk:catalyst 5 19 24 +mcl_sculk:sculk 5 19 24 +mcl_sculk:vein 6 17 24 + +# mcl_signs +mcl_signs:standing_sign 119 93 72 +mcl_signs:standing_sign22_5 119 93 72 +mcl_signs:standing_sign22_5_acaciawood 234 116 121 +mcl_signs:standing_sign22_5_birchwood 255 219 167 +mcl_signs:standing_sign22_5_crimson_hyphae_wood 195 95 81 +mcl_signs:standing_sign22_5_darkwood 133 100 67 +mcl_signs:standing_sign22_5_junglewood 134 98 73 +mcl_signs:standing_sign22_5_mangrove_wood 184 105 61 +mcl_signs:standing_sign22_5_sprucewood 85 62 36 +mcl_signs:standing_sign22_5_warped_hyphae_wood 159 125 207 +mcl_signs:standing_sign45 119 93 72 +mcl_signs:standing_sign45_acaciawood 234 116 121 +mcl_signs:standing_sign45_birchwood 255 219 167 +mcl_signs:standing_sign45_crimson_hyphae_wood 195 95 81 +mcl_signs:standing_sign45_darkwood 133 100 67 +mcl_signs:standing_sign45_junglewood 134 98 73 +mcl_signs:standing_sign45_mangrove_wood 134 105 61 +mcl_signs:standing_sign45_sprucewood 85 62 36 +mcl_signs:standing_sign45_warped_hyphae_wood 159 125 207 +mcl_signs:standing_sign67_5 119 93 72 +mcl_signs:standing_sign67_5_acaciawood 234 116 121 +mcl_signs:standing_sign67_5_birchwood 255 219 167 +mcl_signs:standing_sign67_5_crimson_hyphae_wood 195 95 81 +mcl_signs:standing_sign67_5_darkwood 133 100 67 +mcl_signs:standing_sign67_5_junglewood 134 98 73 +mcl_signs:standing_sign67_5_mangrove_wood 184 105 61 +mcl_signs:standing_sign67_5_sprucewood 85 62 36 +mcl_signs:standing_sign67_5_warped_hyphae_wood 159 125 207 +mcl_signs:standing_sign_acaciawood 234 116 121 +mcl_signs:standing_sign_birchwood 255 219 167 +mcl_signs:standing_sign_crimson_hyphae_wood 195 95 81 +mcl_signs:standing_sign_darkwood 133 100 67 +mcl_signs:standing_sign_junglewood 134 98 73 +mcl_signs:standing_sign_mangrove_wood 119 93 72 +mcl_signs:standing_sign_sprucewood 85 62 36 +mcl_signs:standing_sign_warped_hyphae_wood 159 125 207 +mcl_signs:wall_sign 119 93 72 +mcl_signs:wall_sign_acaciawood 234 116 121 +mcl_signs:wall_sign_birchwood 255 219 255 +mcl_signs:wall_sign_crimson_hyphae_wood 195 95 81 +mcl_signs:wall_sign_darkwood 133 100 67 +mcl_signs:wall_sign_junglewood 134 98 73 +mcl_signs:wall_sign_mangrove_wood 184 105 61 +mcl_signs:wall_sign_sprucewood 85 62 36 +mcl_signs:wall_sign_warped_hyphae_wood 159 125 207 + +# mcl_smithing_table +mcl_smithing_table:table 51 48 45 + +# mcl_smoker +mcl_smoker:smoker 121 110 106 +mcl_smoker:smoker_active 121 110 106 + +# mcl_sponges +mcl_sponges:sponge 211 179 120 +mcl_sponges:sponge_wet 157 136 94 +mcl_sponges:sponge_wet_river_water 158 142 105 + +# mcl_stairs +mcl_stairs:slab_acaciatree_bark 107 94 77 +mcl_stairs:slab_acaciatree_bark_double 107 94 77 +mcl_stairs:slab_acaciatree_bark_top 107 94 77 +mcl_stairs:slab_acaciawood 153 103 71 +mcl_stairs:slab_acaciawood_double 153 103 71 +mcl_stairs:slab_acaciawood_top 153 103 71 +mcl_stairs:slab_andesite 105 111 107 +mcl_stairs:slab_andesite_double 105 111 107 +mcl_stairs:slab_andesite_smooth 107 114 110 +mcl_stairs:slab_andesite_smooth_double 107 114 110 +mcl_stairs:slab_andesite_smooth_top 107 114 110 +mcl_stairs:slab_andesite_top 105 111 107 +mcl_stairs:slab_birchtree_bark 199 190 180 +mcl_stairs:slab_birchtree_bark_double 199 190 180 +mcl_stairs:slab_birchtree_bark_top 199 190 180 +mcl_stairs:slab_birchwood 147 116 90 +mcl_stairs:slab_birchwood_double 147 116 90 +mcl_stairs:slab_birchwood_top 147 116 90 +mcl_stairs:slab_blackstone 33 31 35 +mcl_stairs:slab_blackstone_brick_polished 42 39 44 +mcl_stairs:slab_blackstone_brick_polished_double 42 39 44 +mcl_stairs:slab_blackstone_brick_polished_top 42 39 44 +mcl_stairs:slab_blackstone_chiseled_polished 42 39 44 +mcl_stairs:slab_blackstone_chiseled_polished_double 42 39 44 +mcl_stairs:slab_blackstone_chiseled_polished_top 42 39 44 +mcl_stairs:slab_blackstone_double 33 31 35 +mcl_stairs:slab_blackstone_polished 44 42 47 +mcl_stairs:slab_blackstone_polished_double 44 42 47 +mcl_stairs:slab_blackstone_polished_top 44 42 47 +mcl_stairs:slab_blackstone_top 33 31 35 +mcl_stairs:slab_brick_block 140 92 81 +mcl_stairs:slab_brick_block_double 140 92 81 +mcl_stairs:slab_brick_block_top 140 92 81 +mcl_stairs:slab_cobble 114 108 105 +mcl_stairs:slab_cobble_double 114 108 105 +mcl_stairs:slab_cobble_top 114 108 105 +mcl_stairs:slab_concrete_black 8 10 15 +mcl_stairs:slab_concrete_black_double 8 10 15 +mcl_stairs:slab_concrete_black_top 8 10 15 +mcl_stairs:slab_concrete_blue 46 48 147 +mcl_stairs:slab_concrete_blue_double 46 48 147 +mcl_stairs:slab_concrete_blue_top 46 48 147 +mcl_stairs:slab_concrete_brown 98 60 32 +mcl_stairs:slab_concrete_brown_double 98 60 32 +mcl_stairs:slab_concrete_brown_top 98 60 32 +mcl_stairs:slab_concrete_cyan 21 123 140 +mcl_stairs:slab_concrete_cyan_double 21 123 140 +mcl_stairs:slab_concrete_cyan_top 21 123 140 +mcl_stairs:slab_concrete_green 75 94 37 +mcl_stairs:slab_concrete_green_double 75 94 37 +mcl_stairs:slab_concrete_green_top 75 94 37 +mcl_stairs:slab_concrete_grey 56 59 64 +mcl_stairs:slab_concrete_grey_double 56 59 64 +mcl_stairs:slab_concrete_grey_top 56 59 64 +mcl_stairs:slab_concrete_light_blue 37 140 200 +mcl_stairs:slab_concrete_light_blue_double 37 140 200 +mcl_stairs:slab_concrete_light_blue_top 37 140 200 +mcl_stairs:slab_concrete_lime 96 171 25 +mcl_stairs:slab_concrete_lime_double 96 171 25 +mcl_stairs:slab_concrete_lime_top 96 171 25 +mcl_stairs:slab_concrete_magenta 171 49 162 +mcl_stairs:slab_concrete_magenta_double 171 49 162 +mcl_stairs:slab_concrete_magenta_top 171 49 162 +mcl_stairs:slab_concrete_orange 226 101 1 +mcl_stairs:slab_concrete_orange_double 226 101 1 +mcl_stairs:slab_concrete_orange_top 226 101 1 +mcl_stairs:slab_concrete_pink 213 103 144 +mcl_stairs:slab_concrete_pink_double 213 103 144 +mcl_stairs:slab_concrete_pink_top 213 103 144 +mcl_stairs:slab_concrete_purple 103 32 159 +mcl_stairs:slab_concrete_purple_double 103 32 159 +mcl_stairs:slab_concrete_purple_top 103 32 159 +mcl_stairs:slab_concrete_red 146 34 34 +mcl_stairs:slab_concrete_red_double 146 34 34 +mcl_stairs:slab_concrete_red_top 146 34 34 +mcl_stairs:slab_concrete_silver 128 129 118 +mcl_stairs:slab_concrete_silver_double 128 129 118 +mcl_stairs:slab_concrete_silver_top 128 129 118 +mcl_stairs:slab_concrete_white 208 214 215 +mcl_stairs:slab_concrete_white_double 208 214 215 +mcl_stairs:slab_concrete_white_top 208 214 215 +mcl_stairs:slab_concrete_yellow 241 177 21 +mcl_stairs:slab_concrete_yellow_double 241 177 21 +mcl_stairs:slab_concrete_yellow_top 241 177 21 +mcl_stairs:slab_copper_cut 150 78 58 +mcl_stairs:slab_copper_cut_double 150 78 58 +mcl_stairs:slab_copper_cut_top 150 78 58 +mcl_stairs:slab_copper_exposed_cut 132 94 84 +mcl_stairs:slab_copper_exposed_cut_double 132 94 84 +mcl_stairs:slab_copper_exposed_cut_top 132 94 84 +mcl_stairs:slab_copper_oxidized_cut 91 112 112 +mcl_stairs:slab_copper_oxidized_cut_double 91 112 112 +mcl_stairs:slab_copper_oxidized_cut_top 91 112 112 +mcl_stairs:slab_copper_weathered_cut 109 105 102 +mcl_stairs:slab_copper_weathered_cut_double 109 105 102 +mcl_stairs:slab_copper_weathered_cut_top 109 105 102 +mcl_stairs:slab_crimson_hyphae_wood 119 46 40 +mcl_stairs:slab_crimson_hyphae_wood_double 119 46 40 +mcl_stairs:slab_crimson_hyphae_wood_top 119 46 40 +mcl_stairs:slab_darktree_bark 77 65 58 +mcl_stairs:slab_darktree_bark_double 77 65 58 +mcl_stairs:slab_darktree_bark_top 77 65 58 +mcl_stairs:slab_darkwood 89 76 63 +mcl_stairs:slab_darkwood_double 89 76 63 +mcl_stairs:slab_darkwood_top 89 76 63 +mcl_stairs:slab_deepslate_bricks 64 62 62 +mcl_stairs:slab_deepslate_bricks_double 64 62 62 +mcl_stairs:slab_deepslate_bricks_top 64 62 62 +mcl_stairs:slab_deepslate_cobbled 80 78 76 +mcl_stairs:slab_deepslate_cobbled_double 80 78 76 +mcl_stairs:slab_deepslate_cobbled_top 80 78 76 +mcl_stairs:slab_deepslate_polished 69 68 67 +mcl_stairs:slab_deepslate_polished_double 69 68 67 +mcl_stairs:slab_deepslate_polished_top 69 68 67 +mcl_stairs:slab_deepslate_tiles 51 50 49 +mcl_stairs:slab_deepslate_tiles_double 51 50 49 +mcl_stairs:slab_deepslate_tiles_top 51 50 49 +mcl_stairs:slab_diorite 154 150 148 +mcl_stairs:slab_diorite_double 154 150 148 +mcl_stairs:slab_diorite_smooth 158 155 153 +mcl_stairs:slab_diorite_smooth_double 158 155 153 +mcl_stairs:slab_diorite_smooth_top 158 155 153 +mcl_stairs:slab_diorite_top 154 150 148 +mcl_stairs:slab_end_bricks 195 189 123 +mcl_stairs:slab_end_bricks_double 195 189 123 +mcl_stairs:slab_end_bricks_top 195 189 123 +mcl_stairs:slab_goldblock 196 153 69 +mcl_stairs:slab_goldblock_double 196 153 69 +mcl_stairs:slab_goldblock_top 196 153 69 +mcl_stairs:slab_granite 155 122 111 +mcl_stairs:slab_granite_double 155 122 111 +mcl_stairs:slab_granite_smooth 151 122 111 +mcl_stairs:slab_granite_smooth_double 151 122 111 +mcl_stairs:slab_granite_smooth_top 151 122 111 +mcl_stairs:slab_granite_top 155 122 111 +mcl_stairs:slab_ironblock 164 157 157 +mcl_stairs:slab_ironblock_double 164 157 157 +mcl_stairs:slab_ironblock_top 164 157 157 +mcl_stairs:slab_jungletree_bark 90 62 46 +mcl_stairs:slab_jungletree_bark_double 90 62 46 +mcl_stairs:slab_jungletree_bark_top 90 62 46 +mcl_stairs:slab_junglewood 114 80 60 +mcl_stairs:slab_junglewood_double 114 80 60 +mcl_stairs:slab_junglewood_top 114 80 60 +mcl_stairs:slab_lapisblock 58 97 165 +mcl_stairs:slab_lapisblock_double 58 97 165 +mcl_stairs:slab_lapisblock_top 58 97 165 +mcl_stairs:slab_mangrove_wood 125 61 55 +mcl_stairs:slab_mangrove_wood_double 125 61 55 +mcl_stairs:slab_mangrove_wood_top 125 61 55 +mcl_stairs:slab_mossycobble 105 106 97 +mcl_stairs:slab_mossycobble_double 105 106 97 +mcl_stairs:slab_mossycobble_top 105 106 97 +mcl_stairs:slab_mud_brick 109 96 87 +mcl_stairs:slab_mud_brick_double 109 96 87 +mcl_stairs:slab_mud_brick_top 109 96 87 +mcl_stairs:slab_nether_brick 49 25 26 +mcl_stairs:slab_nether_brick_double 49 25 26 +mcl_stairs:slab_nether_brick_top 49 25 26 +mcl_stairs:slab_prismarine 106 127 123 +mcl_stairs:slab_prismarine_brick 107 116 117 +mcl_stairs:slab_prismarine_brick_double 107 116 117 +mcl_stairs:slab_prismarine_brick_top 107 116 117 +mcl_stairs:slab_prismarine_dark 77 90 97 +mcl_stairs:slab_prismarine_dark_double 77 90 97 +mcl_stairs:slab_prismarine_dark_top 77 90 97 +mcl_stairs:slab_prismarine_double 106 127 123 +mcl_stairs:slab_prismarine_top 106 127 123 +mcl_stairs:slab_purpur_block 161 112 175 +mcl_stairs:slab_purpur_block_double 161 112 175 +mcl_stairs:slab_purpur_block_top 161 112 175 +mcl_stairs:slab_quartz_smooth 198 191 187 +mcl_stairs:slab_quartz_smooth_double 198 191 187 +mcl_stairs:slab_quartz_smooth_top 198 191 187 +mcl_stairs:slab_quartzblock 198 191 187 +mcl_stairs:slab_quartzblock_double 198 191 187 +mcl_stairs:slab_quartzblock_top 198 191 187 +mcl_stairs:slab_red_nether_brick 72 17 6 +mcl_stairs:slab_red_nether_brick_double 72 17 6 +mcl_stairs:slab_red_nether_brick_top 72 17 6 +mcl_stairs:slab_redsandstone 212 126 108 +mcl_stairs:slab_redsandstone_double 212 126 108 +mcl_stairs:slab_redsandstone_top 212 126 108 +mcl_stairs:slab_redsandstonesmooth2 212 126 108 +mcl_stairs:slab_redsandstonesmooth2_double 212 126 108 +mcl_stairs:slab_redsandstonesmooth2_top 212 126 108 +mcl_stairs:slab_sandstone 202 155 121 +mcl_stairs:slab_sandstone_double 202 155 121 +mcl_stairs:slab_sandstone_top 202 155 121 +mcl_stairs:slab_sandstonesmooth2 202 155 121 +mcl_stairs:slab_sandstonesmooth2_double 202 155 121 +mcl_stairs:slab_sandstonesmooth2_top 202 155 121 +mcl_stairs:slab_sprucetree_bark 69 53 45 +mcl_stairs:slab_sprucetree_bark_double 69 53 45 +mcl_stairs:slab_sprucetree_bark_top 69 53 45 +mcl_stairs:slab_sprucewood 82 66 54 +mcl_stairs:slab_sprucewood_double 82 66 54 +mcl_stairs:slab_sprucewood_top 82 66 54 +mcl_stairs:slab_stone 128 119 115 +mcl_stairs:slab_stone_double 128 119 115 +mcl_stairs:slab_stone_rough 131 123 118 +mcl_stairs:slab_stone_rough_double 131 123 118 +mcl_stairs:slab_stone_rough_top 131 123 118 +mcl_stairs:slab_stone_top 128 119 115 +mcl_stairs:slab_stonebrick 99 91 88 +mcl_stairs:slab_stonebrick_double 99 91 88 +mcl_stairs:slab_stonebrick_top 99 91 88 +mcl_stairs:slab_stonebrickcracked 96 89 85 +mcl_stairs:slab_stonebrickcracked_double 96 89 85 +mcl_stairs:slab_stonebrickcracked_top 96 89 85 +mcl_stairs:slab_stonebrickmossy 86 104 79 +mcl_stairs:slab_stonebrickmossy_double 86 104 79 +mcl_stairs:slab_stonebrickmossy_top 86 104 79 +mcl_stairs:slab_tree_bark 99 78 59 +mcl_stairs:slab_tree_bark_double 99 78 59 +mcl_stairs:slab_tree_bark_top 99 78 59 +mcl_stairs:slab_warped_hyphae_wood 78 64 108 +mcl_stairs:slab_warped_hyphae_wood_double 78 64 108 +mcl_stairs:slab_warped_hyphae_wood_top 78 64 108 +mcl_stairs:slab_wood 115 89 68 +mcl_stairs:slab_wood_double 115 89 68 +mcl_stairs:slab_wood_top 115 89 68 +mcl_stairs:stair_acaciatree_bark 107 94 77 +mcl_stairs:stair_acaciatree_bark_inner 107 94 77 +mcl_stairs:stair_acaciatree_bark_outer 107 94 77 +mcl_stairs:stair_acaciawood 153 103 71 +mcl_stairs:stair_acaciawood_inner 153 103 71 +mcl_stairs:stair_acaciawood_outer 153 103 71 +mcl_stairs:stair_andesite 105 111 107 +mcl_stairs:stair_andesite_inner 105 111 107 +mcl_stairs:stair_andesite_outer 105 111 107 +mcl_stairs:stair_andesite_smooth 107 114 109 +mcl_stairs:stair_andesite_smooth_inner 107 114 109 +mcl_stairs:stair_andesite_smooth_outer 107 114 109 +mcl_stairs:stair_birchtree_bark 199 190 180 +mcl_stairs:stair_birchtree_bark_inner 199 190 180 +mcl_stairs:stair_birchtree_bark_outer 199 190 180 +mcl_stairs:stair_birchwood 147 116 90 +mcl_stairs:stair_birchwood_inner 147 116 90 +mcl_stairs:stair_birchwood_outer 147 116 90 +mcl_stairs:stair_blackstone 33 31 35 +mcl_stairs:stair_blackstone_brick_polished 42 39 44 +mcl_stairs:stair_blackstone_brick_polished_inner 42 39 44 +mcl_stairs:stair_blackstone_brick_polished_outer 42 39 44 +mcl_stairs:stair_blackstone_chiseled_polished 42 39 44 +mcl_stairs:stair_blackstone_chiseled_polished_inner 42 39 44 +mcl_stairs:stair_blackstone_chiseled_polished_outer 42 39 44 +mcl_stairs:stair_blackstone_inner 33 31 35 +mcl_stairs:stair_blackstone_outer 33 31 35 +mcl_stairs:stair_blackstone_polished 44 42 47 +mcl_stairs:stair_blackstone_polished_inner 44 42 47 +mcl_stairs:stair_blackstone_polished_outer 44 42 47 +mcl_stairs:stair_brick_block 140 92 81 +mcl_stairs:stair_brick_block_inner 140 92 81 +mcl_stairs:stair_brick_block_outer 140 92 81 +mcl_stairs:stair_cobble 114 108 105 +mcl_stairs:stair_cobble_inner 114 108 105 +mcl_stairs:stair_cobble_outer 114 108 105 +mcl_stairs:stair_concrete_black 8 10 15 +mcl_stairs:stair_concrete_black_inner 8 10 15 +mcl_stairs:stair_concrete_black_outer 8 10 15 +mcl_stairs:stair_concrete_blue 46 48 147 +mcl_stairs:stair_concrete_blue_inner 46 48 147 +mcl_stairs:stair_concrete_blue_outer 46 48 147 +mcl_stairs:stair_concrete_brown 98 60 32 +mcl_stairs:stair_concrete_brown_inner 98 60 32 +mcl_stairs:stair_concrete_brown_outer 98 60 32 +mcl_stairs:stair_concrete_cyan 21 123 140 +mcl_stairs:stair_concrete_cyan_inner 21 123 140 +mcl_stairs:stair_concrete_cyan_outer 21 123 140 +mcl_stairs:stair_concrete_green 75 94 37 +mcl_stairs:stair_concrete_green_inner 75 94 37 +mcl_stairs:stair_concrete_green_outer 75 94 37 +mcl_stairs:stair_concrete_grey 56 59 64 +mcl_stairs:stair_concrete_grey_inner 56 59 64 +mcl_stairs:stair_concrete_grey_outer 56 59 64 +mcl_stairs:stair_concrete_light_blue 37 140 200 +mcl_stairs:stair_concrete_light_blue_inner 37 140 200 +mcl_stairs:stair_concrete_light_blue_outer 37 140 200 +mcl_stairs:stair_concrete_lime 96 171 25 +mcl_stairs:stair_concrete_lime_inner 96 171 25 +mcl_stairs:stair_concrete_lime_outer 96 171 25 +mcl_stairs:stair_concrete_magenta 171 49 162 +mcl_stairs:stair_concrete_magenta_inner 171 49 162 +mcl_stairs:stair_concrete_magenta_outer 171 49 162 +mcl_stairs:stair_concrete_orange 226 101 1 +mcl_stairs:stair_concrete_orange_inner 226 101 1 +mcl_stairs:stair_concrete_orange_outer 226 101 1 +mcl_stairs:stair_concrete_pink 213 103 144 +mcl_stairs:stair_concrete_pink_inner 213 103 144 +mcl_stairs:stair_concrete_pink_outer 213 103 144 +mcl_stairs:stair_concrete_purple 103 32 159 +mcl_stairs:stair_concrete_purple_inner 103 32 159 +mcl_stairs:stair_concrete_purple_outer 103 32 159 +mcl_stairs:stair_concrete_red 146 34 34 +mcl_stairs:stair_concrete_red_inner 146 34 34 +mcl_stairs:stair_concrete_red_outer 146 34 34 +mcl_stairs:stair_concrete_silver 128 129 118 +mcl_stairs:stair_concrete_silver_inner 128 129 118 +mcl_stairs:stair_concrete_silver_outer 128 129 118 +mcl_stairs:stair_concrete_white 208 214 215 +mcl_stairs:stair_concrete_white_inner 208 214 215 +mcl_stairs:stair_concrete_white_outer 208 214 215 +mcl_stairs:stair_concrete_yellow 241 177 21 +mcl_stairs:stair_concrete_yellow_inner 241 177 21 +mcl_stairs:stair_concrete_yellow_outer 241 177 21 +mcl_stairs:stair_copper_cut 150 78 58 +mcl_stairs:stair_copper_cut_inner 150 78 58 +mcl_stairs:stair_copper_cut_outer 150 78 58 +mcl_stairs:stair_copper_exposed_cut 132 94 84 +mcl_stairs:stair_copper_exposed_cut_inner 132 94 84 +mcl_stairs:stair_copper_exposed_cut_outer 132 94 84 +mcl_stairs:stair_copper_oxidized_cut 91 112 112 +mcl_stairs:stair_copper_oxidized_cut_inner 91 112 112 +mcl_stairs:stair_copper_oxidized_cut_outer 91 112 112 +mcl_stairs:stair_copper_weathered_cut 109 105 102 +mcl_stairs:stair_copper_weathered_cut_inner 109 105 102 +mcl_stairs:stair_copper_weathered_cut_outer 109 105 102 +mcl_stairs:stair_crimson_hyphae_wood 119 46 40 +mcl_stairs:stair_crimson_hyphae_wood_inner 119 46 40 +mcl_stairs:stair_crimson_hyphae_wood_outer 119 46 40 +mcl_stairs:stair_darktree_bark 77 65 58 +mcl_stairs:stair_darktree_bark_inner 77 65 58 +mcl_stairs:stair_darktree_bark_outer 77 65 58 +mcl_stairs:stair_darkwood 89 76 63 +mcl_stairs:stair_darkwood_inner 89 76 63 +mcl_stairs:stair_darkwood_outer 89 76 63 +mcl_stairs:stair_deepslate_bricks 64 62 62 +mcl_stairs:stair_deepslate_bricks_inner 64 62 62 +mcl_stairs:stair_deepslate_bricks_outer 64 62 62 +mcl_stairs:stair_deepslate_cobbled 80 78 76 +mcl_stairs:stair_deepslate_cobbled_inner 80 78 76 +mcl_stairs:stair_deepslate_cobbled_outer 80 78 76 +mcl_stairs:stair_deepslate_polished 69 68 67 +mcl_stairs:stair_deepslate_polished_inner 69 68 67 +mcl_stairs:stair_deepslate_polished_outer 69 68 67 +mcl_stairs:stair_deepslate_tiles 51 50 49 +mcl_stairs:stair_deepslate_tiles_inner 51 50 49 +mcl_stairs:stair_deepslate_tiles_outer 51 50 49 +mcl_stairs:stair_diorite 154 150 148 +mcl_stairs:stair_diorite_inner 154 150 148 +mcl_stairs:stair_diorite_outer 154 150 148 +mcl_stairs:stair_diorite_smooth 158 155 152 +mcl_stairs:stair_diorite_smooth_inner 158 155 152 +mcl_stairs:stair_diorite_smooth_outer 158 155 152 +mcl_stairs:stair_end_bricks 195 189 123 +mcl_stairs:stair_end_bricks_inner 195 189 123 +mcl_stairs:stair_end_bricks_outer 195 189 123 +mcl_stairs:stair_goldblock 195 152 65 +mcl_stairs:stair_goldblock_inner 195 152 65 +mcl_stairs:stair_goldblock_outer 195 152 65 +mcl_stairs:stair_granite 155 122 111 +mcl_stairs:stair_granite_inner 155 122 111 +mcl_stairs:stair_granite_outer 155 122 111 +mcl_stairs:stair_granite_smooth 152 122 110 +mcl_stairs:stair_granite_smooth_inner 152 122 110 +mcl_stairs:stair_granite_smooth_outer 152 122 110 +mcl_stairs:stair_ironblock 173 167 167 +mcl_stairs:stair_ironblock_inner 173 167 167 +mcl_stairs:stair_ironblock_outer 173 167 167 +mcl_stairs:stair_jungletree_bark 90 62 46 +mcl_stairs:stair_jungletree_bark_inner 90 62 46 +mcl_stairs:stair_jungletree_bark_outer 90 62 46 +mcl_stairs:stair_junglewood 114 80 60 +mcl_stairs:stair_junglewood_inner 114 80 60 +mcl_stairs:stair_junglewood_outer 114 80 60 +mcl_stairs:stair_lapisblock 57 95 161 +mcl_stairs:stair_lapisblock_inner 57 95 161 +mcl_stairs:stair_lapisblock_outer 57 95 161 +mcl_stairs:stair_mangrove_wood 125 61 55 +mcl_stairs:stair_mangrove_wood_inner 125 61 55 +mcl_stairs:stair_mangrove_wood_outer 125 61 55 +mcl_stairs:stair_mossycobble 105 106 97 +mcl_stairs:stair_mossycobble_inner 105 106 97 +mcl_stairs:stair_mossycobble_outer 105 106 97 +mcl_stairs:stair_mud_brick 109 96 87 +mcl_stairs:stair_mud_brick_inner 109 96 87 +mcl_stairs:stair_mud_brick_outer 109 96 87 +mcl_stairs:stair_nether_brick 49 25 26 +mcl_stairs:stair_nether_brick_inner 49 25 26 +mcl_stairs:stair_nether_brick_outer 49 25 26 +mcl_stairs:stair_prismarine 106 127 123 +mcl_stairs:stair_prismarine_brick 107 116 117 +mcl_stairs:stair_prismarine_brick_inner 107 116 117 +mcl_stairs:stair_prismarine_brick_outer 107 116 117 +mcl_stairs:stair_prismarine_dark 77 90 97 +mcl_stairs:stair_prismarine_dark_inner 77 90 97 +mcl_stairs:stair_prismarine_dark_outer 77 90 97 +mcl_stairs:stair_prismarine_inner 106 127 123 +mcl_stairs:stair_prismarine_outer 106 127 123 +mcl_stairs:stair_purpur_block 161 112 175 +mcl_stairs:stair_purpur_block_inner 161 112 175 +mcl_stairs:stair_purpur_block_outer 161 112 175 +mcl_stairs:stair_quartz_smooth 198 191 187 +mcl_stairs:stair_quartz_smooth_inner 198 191 187 +mcl_stairs:stair_quartz_smooth_outer 198 191 187 +mcl_stairs:stair_quartzblock 198 191 187 +mcl_stairs:stair_quartzblock_inner 198 191 187 +mcl_stairs:stair_quartzblock_outer 198 191 187 +mcl_stairs:stair_red_nether_brick 72 17 6 +mcl_stairs:stair_red_nether_brick_inner 72 17 6 +mcl_stairs:stair_red_nether_brick_outer 72 17 6 +mcl_stairs:stair_redsandstone 212 126 108 +mcl_stairs:stair_redsandstone_inner 212 126 108 +mcl_stairs:stair_redsandstone_outer 212 126 108 +mcl_stairs:stair_redsandstonesmooth2 212 126 108 +mcl_stairs:stair_redsandstonesmooth2_inner 212 126 108 +mcl_stairs:stair_redsandstonesmooth2_outer 212 126 108 +mcl_stairs:stair_sandstone 202 155 121 +mcl_stairs:stair_sandstone_inner 202 155 121 +mcl_stairs:stair_sandstone_outer 202 155 121 +mcl_stairs:stair_sandstonesmooth2 202 155 121 +mcl_stairs:stair_sandstonesmooth2_inner 202 155 121 +mcl_stairs:stair_sandstonesmooth2_outer 202 155 121 +mcl_stairs:stair_sprucetree_bark 69 53 45 +mcl_stairs:stair_sprucetree_bark_inner 69 53 45 +mcl_stairs:stair_sprucetree_bark_outer 69 53 45 +mcl_stairs:stair_sprucewood 82 66 54 +mcl_stairs:stair_sprucewood_inner 82 66 54 +mcl_stairs:stair_sprucewood_outer 82 66 54 +mcl_stairs:stair_stone_rough 131 123 118 +mcl_stairs:stair_stone_rough_inner 131 123 118 +mcl_stairs:stair_stone_rough_outer 131 123 118 +mcl_stairs:stair_stonebrick 99 91 88 +mcl_stairs:stair_stonebrick_inner 99 91 88 +mcl_stairs:stair_stonebrick_outer 99 91 88 +mcl_stairs:stair_stonebrickcracked 96 89 85 +mcl_stairs:stair_stonebrickcracked_inner 96 89 85 +mcl_stairs:stair_stonebrickcracked_outer 96 89 85 +mcl_stairs:stair_stonebrickmossy 86 104 79 +mcl_stairs:stair_stonebrickmossy_inner 86 104 79 +mcl_stairs:stair_stonebrickmossy_outer 86 104 79 +mcl_stairs:stair_tree_bark 99 78 59 +mcl_stairs:stair_tree_bark_inner 99 78 59 +mcl_stairs:stair_tree_bark_outer 99 78 59 +mcl_stairs:stair_warped_hyphae_wood 78 64 108 +mcl_stairs:stair_warped_hyphae_wood_inner 78 64 108 +mcl_stairs:stair_warped_hyphae_wood_outer 78 64 108 +mcl_stairs:stair_wood 115 89 68 +mcl_stairs:stair_wood_inner 115 89 68 +mcl_stairs:stair_wood_outer 115 89 68 + +# mcl_stonecutter +mcl_stonecutter:stonecutter 88 82 80 + +# mcl_structures + +# mcl_target +mcl_target:target_off 182 137 112 +mcl_target:target_on 182 137 112 + +# mcl_tnt +mcl_tnt:tnt 134 55 57 + +# mcl_torches +mcl_torches:torch 94 72 58 +mcl_torches:torch_wall 94 72 58 + +# mcl_villages +mcl_villages:stonebrickcarved 100 92 88 + +# mcl_walls +mcl_walls:andesite 105 111 107 +mcl_walls:andesite_0 105 111 107 +mcl_walls:andesite_1 105 111 107 +mcl_walls:andesite_10 105 111 107 +mcl_walls:andesite_11 105 111 107 +mcl_walls:andesite_12 105 111 107 +mcl_walls:andesite_13 105 111 107 +mcl_walls:andesite_14 105 111 107 +mcl_walls:andesite_15 105 111 107 +mcl_walls:andesite_16 105 111 107 +mcl_walls:andesite_2 105 111 107 +mcl_walls:andesite_21 105 111 107 +mcl_walls:andesite_3 105 111 107 +mcl_walls:andesite_4 105 111 107 +mcl_walls:andesite_5 105 111 107 +mcl_walls:andesite_6 105 111 107 +mcl_walls:andesite_7 105 111 107 +mcl_walls:andesite_8 105 111 107 +mcl_walls:andesite_9 105 111 107 +mcl_walls:brick 140 92 81 +mcl_walls:brick_0 140 92 81 +mcl_walls:brick_1 140 92 81 +mcl_walls:brick_10 140 92 81 +mcl_walls:brick_11 140 92 81 +mcl_walls:brick_12 140 92 81 +mcl_walls:brick_13 140 92 81 +mcl_walls:brick_14 140 92 81 +mcl_walls:brick_15 140 92 81 +mcl_walls:brick_16 140 92 81 +mcl_walls:brick_2 140 92 81 +mcl_walls:brick_21 140 92 81 +mcl_walls:brick_3 140 92 81 +mcl_walls:brick_4 140 92 81 +mcl_walls:brick_5 140 92 81 +mcl_walls:brick_6 140 92 81 +mcl_walls:brick_7 140 92 81 +mcl_walls:brick_8 140 92 81 +mcl_walls:brick_9 140 92 81 +mcl_walls:cobble 122 116 113 +mcl_walls:cobble_0 122 116 113 +mcl_walls:cobble_1 122 116 113 +mcl_walls:cobble_10 122 116 113 +mcl_walls:cobble_11 122 116 113 +mcl_walls:cobble_12 122 116 113 +mcl_walls:cobble_13 122 116 113 +mcl_walls:cobble_14 122 116 113 +mcl_walls:cobble_15 122 116 113 +mcl_walls:cobble_16 122 116 113 +mcl_walls:cobble_2 122 116 113 +mcl_walls:cobble_21 122 116 113 +mcl_walls:cobble_3 122 116 113 +mcl_walls:cobble_4 122 116 113 +mcl_walls:cobble_5 122 116 113 +mcl_walls:cobble_6 122 116 113 +mcl_walls:cobble_7 122 116 113 +mcl_walls:cobble_8 122 116 113 +mcl_walls:cobble_9 122 116 113 +mcl_walls:diorite 154 150 148 +mcl_walls:diorite_0 154 150 148 +mcl_walls:diorite_1 154 150 148 +mcl_walls:diorite_10 154 150 148 +mcl_walls:diorite_11 154 150 148 +mcl_walls:diorite_12 154 150 148 +mcl_walls:diorite_13 154 150 148 +mcl_walls:diorite_14 154 150 148 +mcl_walls:diorite_15 154 150 148 +mcl_walls:diorite_16 154 150 148 +mcl_walls:diorite_2 154 150 148 +mcl_walls:diorite_21 154 150 148 +mcl_walls:diorite_3 154 150 148 +mcl_walls:diorite_4 154 150 148 +mcl_walls:diorite_5 154 150 148 +mcl_walls:diorite_6 154 150 148 +mcl_walls:diorite_7 154 150 148 +mcl_walls:diorite_8 154 150 148 +mcl_walls:diorite_9 154 150 148 +mcl_walls:endbricks 195 189 123 +mcl_walls:endbricks_0 195 189 123 +mcl_walls:endbricks_1 195 189 123 +mcl_walls:endbricks_10 195 189 123 +mcl_walls:endbricks_11 195 189 123 +mcl_walls:endbricks_12 195 189 123 +mcl_walls:endbricks_13 195 189 123 +mcl_walls:endbricks_14 195 189 123 +mcl_walls:endbricks_15 195 189 123 +mcl_walls:endbricks_16 195 189 123 +mcl_walls:endbricks_2 195 189 123 +mcl_walls:endbricks_21 195 189 123 +mcl_walls:endbricks_3 195 189 123 +mcl_walls:endbricks_4 195 189 123 +mcl_walls:endbricks_5 195 189 123 +mcl_walls:endbricks_6 195 189 123 +mcl_walls:endbricks_7 195 189 123 +mcl_walls:endbricks_8 195 189 123 +mcl_walls:endbricks_9 195 189 123 +mcl_walls:granite 155 122 111 +mcl_walls:granite_0 155 122 111 +mcl_walls:granite_1 155 122 111 +mcl_walls:granite_10 155 122 111 +mcl_walls:granite_11 155 122 111 +mcl_walls:granite_12 155 122 111 +mcl_walls:granite_13 155 122 111 +mcl_walls:granite_14 155 122 111 +mcl_walls:granite_15 155 122 111 +mcl_walls:granite_16 155 122 111 +mcl_walls:granite_2 155 122 111 +mcl_walls:granite_21 155 122 111 +mcl_walls:granite_3 155 122 111 +mcl_walls:granite_4 155 122 111 +mcl_walls:granite_5 155 122 111 +mcl_walls:granite_6 155 122 111 +mcl_walls:granite_7 155 122 111 +mcl_walls:granite_8 155 122 111 +mcl_walls:granite_9 155 122 111 +mcl_walls:mossycobble 59 98 63 +mcl_walls:mossycobble_0 59 98 63 +mcl_walls:mossycobble_1 59 98 63 +mcl_walls:mossycobble_10 59 98 63 +mcl_walls:mossycobble_11 59 98 63 +mcl_walls:mossycobble_12 59 98 63 +mcl_walls:mossycobble_13 59 98 63 +mcl_walls:mossycobble_14 59 98 63 +mcl_walls:mossycobble_15 59 98 63 +mcl_walls:mossycobble_16 59 98 63 +mcl_walls:mossycobble_2 59 98 63 +mcl_walls:mossycobble_21 59 98 63 +mcl_walls:mossycobble_3 59 98 63 +mcl_walls:mossycobble_4 59 98 63 +mcl_walls:mossycobble_5 59 98 63 +mcl_walls:mossycobble_6 59 98 63 +mcl_walls:mossycobble_7 59 98 63 +mcl_walls:mossycobble_8 59 98 63 +mcl_walls:mossycobble_9 59 98 63 +mcl_walls:mudbrick 109 96 87 +mcl_walls:mudbrick_0 109 96 87 +mcl_walls:mudbrick_1 109 96 87 +mcl_walls:mudbrick_10 109 96 87 +mcl_walls:mudbrick_11 109 96 87 +mcl_walls:mudbrick_12 109 96 87 +mcl_walls:mudbrick_13 109 96 87 +mcl_walls:mudbrick_14 109 96 87 +mcl_walls:mudbrick_15 109 96 87 +mcl_walls:mudbrick_16 109 96 87 +mcl_walls:mudbrick_2 109 96 87 +mcl_walls:mudbrick_21 109 96 87 +mcl_walls:mudbrick_3 109 96 87 +mcl_walls:mudbrick_4 109 96 87 +mcl_walls:mudbrick_5 109 96 87 +mcl_walls:mudbrick_6 109 96 87 +mcl_walls:mudbrick_7 109 96 87 +mcl_walls:mudbrick_8 109 96 87 +mcl_walls:mudbrick_9 109 96 87 +mcl_walls:netherbrick 49 25 26 +mcl_walls:netherbrick_0 49 25 26 +mcl_walls:netherbrick_1 49 25 26 +mcl_walls:netherbrick_10 49 25 26 +mcl_walls:netherbrick_11 49 25 26 +mcl_walls:netherbrick_12 49 25 26 +mcl_walls:netherbrick_13 49 25 26 +mcl_walls:netherbrick_14 49 25 26 +mcl_walls:netherbrick_15 49 25 26 +mcl_walls:netherbrick_16 49 25 26 +mcl_walls:netherbrick_2 49 25 26 +mcl_walls:netherbrick_21 49 25 26 +mcl_walls:netherbrick_3 49 25 26 +mcl_walls:netherbrick_4 49 25 26 +mcl_walls:netherbrick_5 49 25 26 +mcl_walls:netherbrick_6 49 25 26 +mcl_walls:netherbrick_7 49 25 26 +mcl_walls:netherbrick_8 49 25 26 +mcl_walls:netherbrick_9 49 25 26 +mcl_walls:prismarine 106 127 123 +mcl_walls:prismarine_0 106 127 123 +mcl_walls:prismarine_1 106 127 123 +mcl_walls:prismarine_10 106 127 123 +mcl_walls:prismarine_11 106 127 123 +mcl_walls:prismarine_12 106 127 123 +mcl_walls:prismarine_13 106 127 123 +mcl_walls:prismarine_14 106 127 123 +mcl_walls:prismarine_15 106 127 123 +mcl_walls:prismarine_16 106 127 123 +mcl_walls:prismarine_2 106 127 123 +mcl_walls:prismarine_21 106 127 123 +mcl_walls:prismarine_3 106 127 123 +mcl_walls:prismarine_4 106 127 123 +mcl_walls:prismarine_5 106 127 123 +mcl_walls:prismarine_6 106 127 123 +mcl_walls:prismarine_7 106 127 123 +mcl_walls:prismarine_8 106 127 123 +mcl_walls:prismarine_9 106 127 123 +mcl_walls:rednetherbrick 72 17 6 +mcl_walls:rednetherbrick_0 72 17 6 +mcl_walls:rednetherbrick_1 72 17 6 +mcl_walls:rednetherbrick_10 72 17 6 +mcl_walls:rednetherbrick_11 72 17 6 +mcl_walls:rednetherbrick_12 72 17 6 +mcl_walls:rednetherbrick_13 72 17 6 +mcl_walls:rednetherbrick_14 72 17 6 +mcl_walls:rednetherbrick_15 72 17 6 +mcl_walls:rednetherbrick_16 72 17 6 +mcl_walls:rednetherbrick_2 72 17 6 +mcl_walls:rednetherbrick_21 72 17 6 +mcl_walls:rednetherbrick_3 72 17 6 +mcl_walls:rednetherbrick_4 72 17 6 +mcl_walls:rednetherbrick_5 72 17 6 +mcl_walls:rednetherbrick_6 72 17 6 +mcl_walls:rednetherbrick_7 72 17 6 +mcl_walls:rednetherbrick_8 72 17 6 +mcl_walls:rednetherbrick_9 72 17 6 +mcl_walls:redsandstone 212 126 108 +mcl_walls:redsandstone_0 212 126 108 +mcl_walls:redsandstone_1 212 126 108 +mcl_walls:redsandstone_10 212 126 108 +mcl_walls:redsandstone_11 212 126 108 +mcl_walls:redsandstone_12 212 126 108 +mcl_walls:redsandstone_13 212 126 108 +mcl_walls:redsandstone_14 212 126 108 +mcl_walls:redsandstone_15 212 126 108 +mcl_walls:redsandstone_16 212 126 108 +mcl_walls:redsandstone_2 212 126 108 +mcl_walls:redsandstone_21 212 126 108 +mcl_walls:redsandstone_3 212 126 108 +mcl_walls:redsandstone_4 212 126 108 +mcl_walls:redsandstone_5 212 126 108 +mcl_walls:redsandstone_6 212 126 108 +mcl_walls:redsandstone_7 212 126 108 +mcl_walls:redsandstone_8 212 126 108 +mcl_walls:redsandstone_9 212 126 108 +mcl_walls:sandstone 202 155 121 +mcl_walls:sandstone_0 202 155 121 +mcl_walls:sandstone_1 202 155 121 +mcl_walls:sandstone_10 202 155 121 +mcl_walls:sandstone_11 202 155 121 +mcl_walls:sandstone_12 202 155 121 +mcl_walls:sandstone_13 202 155 121 +mcl_walls:sandstone_14 202 155 121 +mcl_walls:sandstone_15 202 155 121 +mcl_walls:sandstone_16 202 155 121 +mcl_walls:sandstone_2 202 155 121 +mcl_walls:sandstone_21 202 155 121 +mcl_walls:sandstone_3 202 155 121 +mcl_walls:sandstone_4 202 155 121 +mcl_walls:sandstone_5 202 155 121 +mcl_walls:sandstone_6 202 155 121 +mcl_walls:sandstone_7 202 155 121 +mcl_walls:sandstone_8 202 155 121 +mcl_walls:sandstone_9 202 155 121 +mcl_walls:stonebrick 99 91 88 +mcl_walls:stonebrick_0 99 91 88 +mcl_walls:stonebrick_1 99 91 88 +mcl_walls:stonebrick_10 99 91 88 +mcl_walls:stonebrick_11 99 91 88 +mcl_walls:stonebrick_12 99 91 88 +mcl_walls:stonebrick_13 99 91 88 +mcl_walls:stonebrick_14 99 91 88 +mcl_walls:stonebrick_15 99 91 88 +mcl_walls:stonebrick_16 99 91 88 +mcl_walls:stonebrick_2 99 91 88 +mcl_walls:stonebrick_21 99 91 88 +mcl_walls:stonebrick_3 99 91 88 +mcl_walls:stonebrick_4 99 91 88 +mcl_walls:stonebrick_5 99 91 88 +mcl_walls:stonebrick_6 99 91 88 +mcl_walls:stonebrick_7 99 91 88 +mcl_walls:stonebrick_8 99 91 88 +mcl_walls:stonebrick_9 99 91 88 +mcl_walls:stonebrickmossy 86 104 79 +mcl_walls:stonebrickmossy_0 86 104 79 +mcl_walls:stonebrickmossy_1 86 104 79 +mcl_walls:stonebrickmossy_10 86 104 79 +mcl_walls:stonebrickmossy_11 86 104 79 +mcl_walls:stonebrickmossy_12 86 104 79 +mcl_walls:stonebrickmossy_13 86 104 79 +mcl_walls:stonebrickmossy_14 86 104 79 +mcl_walls:stonebrickmossy_15 86 104 79 +mcl_walls:stonebrickmossy_16 86 104 79 +mcl_walls:stonebrickmossy_2 86 104 79 +mcl_walls:stonebrickmossy_21 86 104 79 +mcl_walls:stonebrickmossy_3 86 104 79 +mcl_walls:stonebrickmossy_4 86 104 79 +mcl_walls:stonebrickmossy_5 86 104 79 +mcl_walls:stonebrickmossy_6 86 104 79 +mcl_walls:stonebrickmossy_7 86 104 79 +mcl_walls:stonebrickmossy_8 86 104 79 +mcl_walls:stonebrickmossy_9 86 104 79 + +# mcl_wool +mcl_wool:black 46 43 43 +mcl_wool:black_carpet 46 43 43 +mcl_wool:blue 43 75 126 +mcl_wool:blue_carpet 43 75 126 +mcl_wool:brown 87 57 43 +mcl_wool:brown_carpet 87 57 43 +mcl_wool:cyan 30 95 113 +mcl_wool:cyan_carpet 30 95 113 +mcl_wool:green 54 92 51 +mcl_wool:green_carpet 54 92 51 +mcl_wool:grey 97 88 88 +mcl_wool:grey_carpet 97 88 88 +mcl_wool:light_blue 92 132 180 +mcl_wool:light_blue_carpet 92 132 180 +mcl_wool:lime 110 152 77 +mcl_wool:lime_carpet 110 152 77 +mcl_wool:magenta 142 86 126 +mcl_wool:magenta_carpet 142 86 126 +mcl_wool:orange 188 107 46 +mcl_wool:orange_carpet 188 107 46 +mcl_wool:pink 171 92 108 +mcl_wool:pink_carpet 171 92 108 +mcl_wool:purple 79 57 103 +mcl_wool:purple_carpet 79 57 103 +mcl_wool:red 133 42 45 +mcl_wool:red_carpet 133 42 45 +mcl_wool:silver 143 135 135 +mcl_wool:silver_carpet 143 135 135 +mcl_wool:white 212 199 183 +mcl_wool:white_carpet 212 199 183 +mcl_wool:yellow 201 164 70 +mcl_wool:yellow_carpet 201 164 70 + +# mclx_core +mclx_core:river_water_flowing 0 122 139 +mclx_core:river_water_source 32 121 138 + +# mclx_fences +mclx_fences:nether_brick_fence_gate 51 27 27 +mclx_fences:nether_brick_fence_gate_open 51 27 27 +mclx_fences:red_nether_brick_fence 72 18 0 +mclx_fences:red_nether_brick_fence_gate 68 16 0 +mclx_fences:red_nether_brick_fence_gate_open 68 16 0 + +# mesecons +mesecons:wire_00000000_off 171 171 171 +mesecons:wire_00000000_on 171 171 171 +mesecons:wire_00010000_off 171 171 171 +mesecons:wire_00010000_on 171 171 171 +mesecons:wire_00010001_off 171 171 171 +mesecons:wire_00010001_on 171 171 171 +mesecons:wire_00100000_off 171 171 171 +mesecons:wire_00100000_on 171 171 171 +mesecons:wire_00100010_off 171 171 171 +mesecons:wire_00100010_on 171 171 171 +mesecons:wire_00110000_off 171 171 171 +mesecons:wire_00110000_on 171 171 171 +mesecons:wire_00110001_off 171 171 171 +mesecons:wire_00110001_on 171 171 171 +mesecons:wire_00110010_off 171 171 171 +mesecons:wire_00110010_on 171 171 171 +mesecons:wire_00110011_off 171 171 171 +mesecons:wire_00110011_on 171 171 171 +mesecons:wire_01000000_off 171 171 171 +mesecons:wire_01000000_on 171 171 171 +mesecons:wire_01000100_off 171 171 171 +mesecons:wire_01000100_on 171 171 171 +mesecons:wire_01010000_off 171 171 171 +mesecons:wire_01010000_on 171 171 171 +mesecons:wire_01010001_off 171 171 171 +mesecons:wire_01010001_on 171 171 171 +mesecons:wire_01010100_off 171 171 171 +mesecons:wire_01010100_on 171 171 171 +mesecons:wire_01010101_off 171 171 171 +mesecons:wire_01010101_on 171 171 171 +mesecons:wire_01100000_off 171 171 171 +mesecons:wire_01100000_on 171 171 171 +mesecons:wire_01100010_off 171 171 171 +mesecons:wire_01100010_on 171 171 171 +mesecons:wire_01100100_off 171 171 171 +mesecons:wire_01100100_on 171 171 171 +mesecons:wire_01100110_off 171 171 171 +mesecons:wire_01100110_on 171 171 171 +mesecons:wire_01110000_off 171 171 171 +mesecons:wire_01110000_on 171 171 171 +mesecons:wire_01110001_off 171 171 171 +mesecons:wire_01110001_on 171 171 171 +mesecons:wire_01110010_off 171 171 171 +mesecons:wire_01110010_on 171 171 171 +mesecons:wire_01110011_off 171 171 171 +mesecons:wire_01110011_on 171 171 171 +mesecons:wire_01110100_off 171 171 171 +mesecons:wire_01110100_on 171 171 171 +mesecons:wire_01110101_off 171 171 171 +mesecons:wire_01110101_on 171 171 171 +mesecons:wire_01110110_off 171 171 171 +mesecons:wire_01110110_on 171 171 171 +mesecons:wire_01110111_off 171 171 171 +mesecons:wire_01110111_on 171 171 171 +mesecons:wire_10000000_off 171 171 171 +mesecons:wire_10000000_on 171 171 171 +mesecons:wire_10001000_off 171 171 171 +mesecons:wire_10001000_on 171 171 171 +mesecons:wire_10010000_off 171 171 171 +mesecons:wire_10010000_on 171 171 171 +mesecons:wire_10010001_off 171 171 171 +mesecons:wire_10010001_on 171 171 171 +mesecons:wire_10011000_off 171 171 171 +mesecons:wire_10011000_on 171 171 171 +mesecons:wire_10011001_off 171 171 171 +mesecons:wire_10011001_on 171 171 171 +mesecons:wire_10100000_off 171 171 171 +mesecons:wire_10100000_on 171 171 171 +mesecons:wire_10100010_off 171 171 171 +mesecons:wire_10100010_on 171 171 171 +mesecons:wire_10101000_off 171 171 171 +mesecons:wire_10101000_on 171 171 171 +mesecons:wire_10101010_off 171 171 171 +mesecons:wire_10101010_on 171 171 171 +mesecons:wire_10110000_off 171 171 171 +mesecons:wire_10110000_on 171 171 171 +mesecons:wire_10110001_off 171 171 171 +mesecons:wire_10110001_on 171 171 171 +mesecons:wire_10110010_off 171 171 171 +mesecons:wire_10110010_on 171 171 171 +mesecons:wire_10110011_off 171 171 171 +mesecons:wire_10110011_on 171 171 171 +mesecons:wire_10111000_off 171 171 171 +mesecons:wire_10111000_on 171 171 171 +mesecons:wire_10111001_off 171 171 171 +mesecons:wire_10111001_on 171 171 171 +mesecons:wire_10111010_off 171 171 171 +mesecons:wire_10111010_on 171 171 171 +mesecons:wire_10111011_off 171 171 171 +mesecons:wire_10111011_on 171 171 171 +mesecons:wire_11000000_off 171 171 171 +mesecons:wire_11000000_on 171 171 171 +mesecons:wire_11000100_off 171 171 171 +mesecons:wire_11000100_on 171 171 171 +mesecons:wire_11001000_off 171 171 171 +mesecons:wire_11001000_on 171 171 171 +mesecons:wire_11001100_off 171 171 171 +mesecons:wire_11001100_on 171 171 171 +mesecons:wire_11010000_off 171 171 171 +mesecons:wire_11010000_on 171 171 171 +mesecons:wire_11010001_off 171 171 171 +mesecons:wire_11010001_on 171 171 171 +mesecons:wire_11010100_off 171 171 171 +mesecons:wire_11010100_on 171 171 171 +mesecons:wire_11010101_off 171 171 171 +mesecons:wire_11010101_on 171 171 171 +mesecons:wire_11011000_off 171 171 171 +mesecons:wire_11011000_on 171 171 171 +mesecons:wire_11011001_off 171 171 171 +mesecons:wire_11011001_on 171 171 171 +mesecons:wire_11011100_off 171 171 171 +mesecons:wire_11011100_on 171 171 171 +mesecons:wire_11011101_off 171 171 171 +mesecons:wire_11011101_on 171 171 171 +mesecons:wire_11100000_off 171 171 171 +mesecons:wire_11100000_on 171 171 171 +mesecons:wire_11100010_off 171 171 171 +mesecons:wire_11100010_on 171 171 171 +mesecons:wire_11100100_off 171 171 171 +mesecons:wire_11100100_on 171 171 171 +mesecons:wire_11100110_off 171 171 171 +mesecons:wire_11100110_on 171 171 171 +mesecons:wire_11101000_off 171 171 171 +mesecons:wire_11101000_on 171 171 171 +mesecons:wire_11101010_off 171 171 171 +mesecons:wire_11101010_on 171 171 171 +mesecons:wire_11101100_off 171 171 171 +mesecons:wire_11101100_on 171 171 171 +mesecons:wire_11101110_off 171 171 171 +mesecons:wire_11101110_on 171 171 171 +mesecons:wire_11110000_off 171 171 171 +mesecons:wire_11110000_on 171 171 171 +mesecons:wire_11110001_off 171 171 171 +mesecons:wire_11110001_on 171 171 171 +mesecons:wire_11110010_off 171 171 171 +mesecons:wire_11110010_on 171 171 171 +mesecons:wire_11110011_off 171 171 171 +mesecons:wire_11110011_on 171 171 171 +mesecons:wire_11110100_off 171 171 171 +mesecons:wire_11110100_on 171 171 171 +mesecons:wire_11110101_off 171 171 171 +mesecons:wire_11110101_on 171 171 171 +mesecons:wire_11110110_off 171 171 171 +mesecons:wire_11110110_on 171 171 171 +mesecons:wire_11110111_off 171 171 171 +mesecons:wire_11110111_on 171 171 171 +mesecons:wire_11111000_off 171 171 171 +mesecons:wire_11111000_on 171 171 171 +mesecons:wire_11111001_off 171 171 171 +mesecons:wire_11111001_on 171 171 171 +mesecons:wire_11111010_off 171 171 171 +mesecons:wire_11111010_on 171 171 171 +mesecons:wire_11111011_off 171 171 171 +mesecons:wire_11111011_on 171 171 171 +mesecons:wire_11111100_off 171 171 171 +mesecons:wire_11111100_on 171 171 171 +mesecons:wire_11111101_off 171 171 171 +mesecons:wire_11111101_on 171 171 171 +mesecons:wire_11111110_off 171 171 171 +mesecons:wire_11111110_on 171 171 171 +mesecons:wire_11111111_off 171 171 171 +mesecons:wire_11111111_on 171 171 171 + +# mesecons_button +mesecons_button:button_acaciawood_off 153 103 71 +mesecons_button:button_acaciawood_on 153 103 71 +mesecons_button:button_birchwood_off 147 116 90 +mesecons_button:button_birchwood_on 147 116 90 +mesecons_button:button_darkwood_off 89 76 63 +mesecons_button:button_darkwood_on 89 76 63 +mesecons_button:button_junglewood_off 114 80 60 +mesecons_button:button_junglewood_on 114 80 60 +mesecons_button:button_sprucewood_off 82 66 54 +mesecons_button:button_sprucewood_on 82 66 54 +mesecons_button:button_stone_off 131 123 118 +mesecons_button:button_stone_on 131 123 118 +mesecons_button:button_wood_off 115 89 68 +mesecons_button:button_wood_on 115 89 68 + +# mesecons_commandblock +mesecons_commandblock:commandblock_off 128 113 105 +mesecons_commandblock:commandblock_on 128 113 105 + +# mesecons_delayer +mesecons_delayer:delayer_off_1 115 105 101 +mesecons_delayer:delayer_off_2 115 105 101 +mesecons_delayer:delayer_off_3 115 105 101 +mesecons_delayer:delayer_off_4 115 105 101 +mesecons_delayer:delayer_off_locked 113 104 99 +mesecons_delayer:delayer_on_1 118 105 101 +mesecons_delayer:delayer_on_2 118 105 101 +mesecons_delayer:delayer_on_3 118 105 101 +mesecons_delayer:delayer_on_4 118 105 101 +mesecons_delayer:delayer_on_locked 116 104 99 + +# mesecons_lightstone +mesecons_lightstone:lightstone_off 73 52 44 +mesecons_lightstone:lightstone_on 122 65 41 + +# mesecons_noteblock +mesecons_noteblock:noteblock 114 89 69 + +# mesecons_pistons +mesecons_pistons:piston_down_normal_off 117 108 104 +mesecons_pistons:piston_down_normal_on 117 108 104 +mesecons_pistons:piston_down_pusher_normal 110 85 67 +mesecons_pistons:piston_down_pusher_sticky 110 85 67 +mesecons_pistons:piston_down_sticky_off 117 108 104 +mesecons_pistons:piston_down_sticky_on 117 108 104 +mesecons_pistons:piston_normal_off 123 111 103 +mesecons_pistons:piston_normal_on 123 111 103 +mesecons_pistons:piston_pusher_normal 110 85 67 +mesecons_pistons:piston_pusher_sticky 110 85 67 +mesecons_pistons:piston_sticky_off 123 111 103 +mesecons_pistons:piston_sticky_on 123 111 103 +mesecons_pistons:piston_up_normal_off 110 85 67 +mesecons_pistons:piston_up_normal_on 116 107 104 +mesecons_pistons:piston_up_pusher_normal 110 85 67 +mesecons_pistons:piston_up_pusher_sticky 103 84 65 +mesecons_pistons:piston_up_sticky_off 103 84 65 +mesecons_pistons:piston_up_sticky_on 116 107 104 + +# mesecons_pressureplates +mesecons_pressureplates:pressure_plate_acaciawood_off 153 103 71 +mesecons_pressureplates:pressure_plate_acaciawood_on 153 103 71 +mesecons_pressureplates:pressure_plate_birchwood_off 147 116 90 +mesecons_pressureplates:pressure_plate_birchwood_on 147 116 90 +mesecons_pressureplates:pressure_plate_darkwood_off 89 76 63 +mesecons_pressureplates:pressure_plate_darkwood_on 89 76 63 +mesecons_pressureplates:pressure_plate_junglewood_off 114 80 60 +mesecons_pressureplates:pressure_plate_junglewood_on 114 80 60 +mesecons_pressureplates:pressure_plate_sprucewood_off 82 66 54 +mesecons_pressureplates:pressure_plate_sprucewood_on 82 66 54 +mesecons_pressureplates:pressure_plate_stone_off 131 123 118 +mesecons_pressureplates:pressure_plate_stone_on 131 123 118 +mesecons_pressureplates:pressure_plate_wood_off 115 89 68 +mesecons_pressureplates:pressure_plate_wood_on 115 89 68 + +# mesecons_solarpanel +mesecons_solarpanel:solar_panel_inverted_off 118 132 149 +mesecons_solarpanel:solar_panel_inverted_on 118 132 149 +mesecons_solarpanel:solar_panel_off 150 141 130 +mesecons_solarpanel:solar_panel_on 150 141 130 + +# mesecons_torch +mesecons_torch:mesecon_torch_off 93 71 57 +mesecons_torch:mesecon_torch_off_wall 93 71 57 +mesecons_torch:mesecon_torch_on 104 72 58 +mesecons_torch:mesecon_torch_on_wall 104 72 58 +mesecons_torch:mesecon_torch_overheated 93 71 57 +mesecons_torch:mesecon_torch_overheated_wall 93 71 57 +mesecons_torch:redstoneblock 131 12 14 + +# mesecons_walllever +mesecons_walllever:wall_lever_off 110 100 95 +mesecons_walllever:wall_lever_on 110 100 95 + +# xpanes +xpanes:bar 157 148 148 64 16 +xpanes:bar_flat 157 148 148 64 16 +xpanes:pane_black 25 25 25 64 16 +xpanes:pane_black_flat 25 25 25 64 16 +xpanes:pane_blue 51 76 178 64 16 +xpanes:pane_blue_flat 51 76 178 64 16 +xpanes:pane_brown 102 76 51 64 16 +xpanes:pane_brown_flat 102 76 51 64 16 +xpanes:pane_cyan 76 127 153 64 16 +xpanes:pane_cyan_flat 76 127 153 64 16 +xpanes:pane_gray 76 76 76 64 16 +xpanes:pane_gray_flat 76 76 76 64 16 +xpanes:pane_green 102 127 51 64 16 +xpanes:pane_green_flat 102 127 51 64 16 +xpanes:pane_light_blue 102 153 216 64 16 +xpanes:pane_light_blue_flat 102 153 216 64 16 +xpanes:pane_lime 127 204 25 64 16 +xpanes:pane_lime_flat 127 204 25 64 16 +xpanes:pane_magenta 0 0 0 64 16 +xpanes:pane_magenta_flat 0 0 0 64 16 +xpanes:pane_natural 222 222 239 64 16 +xpanes:pane_natural_flat 222 222 239 64 16 +xpanes:pane_orange 216 127 51 64 16 +xpanes:pane_orange_flat 216 127 51 64 16 +xpanes:pane_pink 0 0 0 64 16 +xpanes:pane_pink_flat 0 0 0 64 16 +xpanes:pane_purple 127 63 178 64 16 +xpanes:pane_purple_flat 127 63 178 64 16 +xpanes:pane_red 153 51 51 64 16 +xpanes:pane_red_flat 153 51 51 64 16 +xpanes:pane_silver 153 153 153 64 16 +xpanes:pane_silver_flat 153 153 153 64 16 +xpanes:pane_white 255 255 255 64 16 +xpanes:pane_white_flat 255 255 255 64 16 +xpanes:pane_yellow 229 229 51 64 16 +xpanes:pane_yellow_flat 229 229 51 64 16 + diff --git a/tools/remove_end.py b/tools/remove_end.py deleted file mode 100644 index 3b73e55753..0000000000 --- a/tools/remove_end.py +++ /dev/null @@ -1,46 +0,0 @@ -world_name = "world" -path_to_map_sqlite = "../../../worlds/" + world_name + "/map.sqlite" - -import sqlite3, sys - -try: - conn = sqlite3.connect(path_to_map_sqlite) -except Error as e: - print(e) - sys.exit() - -def unsignedToSigned(i, max_positive): - if i < max_positive: - return i - else: - return i - 2*max_positive - -cursor = conn.cursor() -cursor.execute("SELECT pos FROM blocks") -poses = cursor.fetchall() -end_blocks = [] -for i0 in (poses): - i = int(i0[0]) - blockpos = i - x = unsignedToSigned(i % 4096, 2048) - i = int((i - x) / 4096) - y = unsignedToSigned(i % 4096, 2048) - i = int((i - y) / 4096) - z = unsignedToSigned(i % 4096, 2048) - - node_pos_y = y * 16 - if node_pos_y > -28811 and node_pos_y + 15 < -67: - end_blocks.append(blockpos) - -if len(end_blocks) < 1: - print ("End blocks not found") - sys.exit() - -counter = 0 -for blockpos in end_blocks: - print("Deleting ", blockpos) - cursor.execute("DELETE FROM blocks WHERE pos=" + str(blockpos)) - counter += 1 -conn.commit() - -print(counter, " block(s) deleted")