From ce123d4676e5aabf6a878509dc7f933b346a2b22 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 28 Mar 2021 00:02:35 +0100 Subject: [PATCH 01/19] add API documentation to mcl_autogroup --- mods/CORE/mcl_autogroup/API.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 mods/CORE/mcl_autogroup/API.md diff --git a/mods/CORE/mcl_autogroup/API.md b/mods/CORE/mcl_autogroup/API.md new file mode 100644 index 000000000..79b9770b5 --- /dev/null +++ b/mods/CORE/mcl_autogroup/API.md @@ -0,0 +1,27 @@ +# mcl_autogroup +This mod emulate digging times from mc. + +## mcl_autogroup.can_harvest(nodename, toolname) +Return true if can be dig with . +* nodename: string, valid nodename +* toolname: (optional) string, valid toolname + +## mcl_autogroup.get_groupcaps(toolname, efficiency) +This function is used to calculate diggroups for tools. +WARNING: This function can only be called after mod initialization. +* toolname: string, name of the tool being enchanted (like "mcl_tools:diamond_pickaxe") +* efficiency: (optional) integer, the efficiency level the tool is enchanted with (default 0) + +## mcl_autogroup.get_wear(toolname, diggroup) +Return the max wear of with +WARNING: This function can only be called after mod initialization. +* toolname: string, name of the tool used +* diggroup: string, the name of the diggroup the tool is used on + +## mcl_autogroup.register_diggroup(group, def) +* group: string, name of the group to register as a digging group +* def: (optional) table, table with information about the diggroup (defaults to {} if unspecified) + * level: (optional) string, if specified it is an array containing the names of the different digging levels the digging group supports + +## mcl_autogroup.registered_diggroups +List of registered diggroups, indexed by name. \ No newline at end of file From fb50b256ed6c2e0451e950c33114c51507c08618 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 28 Mar 2021 00:12:41 +0100 Subject: [PATCH 02/19] add API documentation to flowlib (part 1) --- mods/CORE/flowlib/API.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 mods/CORE/flowlib/API.md diff --git a/mods/CORE/flowlib/API.md b/mods/CORE/flowlib/API.md new file mode 100644 index 000000000..d9f54e4bd --- /dev/null +++ b/mods/CORE/flowlib/API.md @@ -0,0 +1,35 @@ +# flowlib +Simple flow functions. + +## flowlib.is_touching() + + +## flowlib.is_water(pos) +Return true if node at is water, false overwise. +* pos: position + +## flowlib.node_is_water(node) +Return true if is water, false overwise. +* node: node + +## flowlib.is_lava(pos) +Return true if node at is lava, false overwise. +* pos: position + +## flowlib.node_is_lava(node) +Return true if is lava, false overwise. +* node: node + +## flowlib.is_liquid(pos) +Return true if node at is liquid, false overwise. +* pos: position + +## flowlib.node_is_liquid(node) +Return true if is liquid, false overwise. +* node: node + +## flowlib.quick_flow(pos, node) +* pos: position +* node: node + +## flowlib.move_centre(pos, realpos, node, radius) \ No newline at end of file From 19db2a479f702a9fa1f2fb44e6b4253c5e27a9e7 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 28 Mar 2021 00:18:19 +0100 Subject: [PATCH 03/19] add API documentation to flowlib (part 2) --- mods/CORE/flowlib/API.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/CORE/flowlib/API.md b/mods/CORE/flowlib/API.md index d9f54e4bd..7ebb4cc87 100644 --- a/mods/CORE/flowlib/API.md +++ b/mods/CORE/flowlib/API.md @@ -1,7 +1,11 @@ # flowlib Simple flow functions. -## flowlib.is_touching() +## flowlib.is_touching(realpos, nodepos, radius) +Return true if a sphere of at collide with node at . +* realpos: position +* nodepos: position +* radius: number ## flowlib.is_water(pos) From 2a5dcd1634c8d546636b7725308efd3705f1e0f9 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 28 Mar 2021 00:23:57 +0100 Subject: [PATCH 04/19] add API documentation to flowlib (part 3) --- mods/CORE/flowlib/API.md | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/CORE/flowlib/API.md b/mods/CORE/flowlib/API.md index 7ebb4cc87..0542e4519 100644 --- a/mods/CORE/flowlib/API.md +++ b/mods/CORE/flowlib/API.md @@ -33,6 +33,7 @@ Return true if is liquid, false overwise. * node: node ## flowlib.quick_flow(pos, node) +Return direction where the water is flowing (to be use to push mobs, items...). * pos: position * node: node From 39ac3f208d003f77ad3fcec1a79d6b1c4e4799a3 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 28 Mar 2021 00:25:54 +0100 Subject: [PATCH 05/19] add API documentation to flowlib (part 4) --- mods/CORE/flowlib/API.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/CORE/flowlib/API.md b/mods/CORE/flowlib/API.md index 0542e4519..f3282c975 100644 --- a/mods/CORE/flowlib/API.md +++ b/mods/CORE/flowlib/API.md @@ -37,4 +37,8 @@ Return direction where the water is flowing (to be use to push mobs, items...). * pos: position * node: node -## flowlib.move_centre(pos, realpos, node, radius) \ No newline at end of file +## flowlib.move_centre(pos, realpos, node, radius) +* pos: position +* realpos: position +* node: node +* radius: number \ No newline at end of file From 52939ff6a409e777106b82d87c34d917cb0c9fd4 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 28 Mar 2021 00:32:52 +0100 Subject: [PATCH 06/19] add API documentation to flowlib (part 5) --- mods/CORE/flowlib/API.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/CORE/flowlib/API.md b/mods/CORE/flowlib/API.md index f3282c975..20e85036b 100644 --- a/mods/CORE/flowlib/API.md +++ b/mods/CORE/flowlib/API.md @@ -7,7 +7,6 @@ Return true if a sphere of at collide with node at . * nodepos: position * radius: number - ## flowlib.is_water(pos) Return true if node at is water, false overwise. * pos: position @@ -38,7 +37,9 @@ Return direction where the water is flowing (to be use to push mobs, items...). * node: node ## flowlib.move_centre(pos, realpos, node, radius) +Return the pos of the nearest not water block near from in a sphere of at . +WARNING: This function is never used in mcl2, use at your own risk. The informations described here may be wrong. * pos: position -* realpos: position +* realpos: position, position of the entity * node: node * radius: number \ No newline at end of file From e56d9d2ab805250221ab0d3fed54bac3f8e03444 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 28 Mar 2021 00:44:36 +0100 Subject: [PATCH 07/19] add API documentation to controls --- mods/CORE/controls/API.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 mods/CORE/controls/API.md diff --git a/mods/CORE/controls/API.md b/mods/CORE/controls/API.md new file mode 100644 index 000000000..8d9df6ca5 --- /dev/null +++ b/mods/CORE/controls/API.md @@ -0,0 +1,23 @@ +# controls + +## controls.players +Table containing player controls at runtime. +WARNING: Never use this table in writing + +## controls.register_on_press(func) +Register a function that will be executed with (player, keyname) every time a player press a key. + +## controls.registered_on_press +Table containing functions registered with controls.register_on_press(). + +## controls.register_on_release(func) +Register a function that will be executed with (player, keyname, clock_from_last_press) every time a player release a key. + +## controls.registered_on_release +Table containing functions registered with controls.register_on_release(). + +## controls.register_on_hold(func) +Register a function that will be executed with (player, keyname, clock_from_start_hold) every time a player hold a key. + +## controls.registered_on_hold +Table containing functions registered with controls.register_on_hold(). \ No newline at end of file From 6f9c1856b8bae6b7293ead323ab291aa482a0b81 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 28 Mar 2021 00:48:24 +0100 Subject: [PATCH 08/19] add API documentation to mcl_colors (!) --- mods/CORE/mcl_colors/API.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 mods/CORE/mcl_colors/API.md diff --git a/mods/CORE/mcl_colors/API.md b/mods/CORE/mcl_colors/API.md new file mode 100644 index 000000000..71cad335b --- /dev/null +++ b/mods/CORE/mcl_colors/API.md @@ -0,0 +1,8 @@ +# mcl_colors +Mod providing global table containing legacity minecraft colors to be used in mods. + +## mcl_colors.* +Colors by upper name, in hex value. + +## mcl_colors.background.* +Background colors by upper name, in hex value. From cdb67d96a6cf4a72a94b98ff9f0b5055af0cd977 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 28 Mar 2021 01:00:18 +0100 Subject: [PATCH 09/19] add API documentation to mcl_explosions --- mods/CORE/mcl_explosions/API.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 mods/CORE/mcl_explosions/API.md diff --git a/mods/CORE/mcl_explosions/API.md b/mods/CORE/mcl_explosions/API.md new file mode 100644 index 000000000..cb0e9252d --- /dev/null +++ b/mods/CORE/mcl_explosions/API.md @@ -0,0 +1,15 @@ +# mcl_explosions +This mod provide helper functions to create explosions. + +## mcl_explosions.explode(pos, strength, info, puncher) +* pos: position, initial position of the explosion +* strenght: number, radius of the explosion +* info: table, explosion informations: + * drop_chance: number, if specified becomes the drop chance of all nodes in the explosion (default: 1.0 / strength) + * max_blast_resistance: int, if specified the explosion will treat all non-indestructible nodes as having a blast resistance of no more than this value + * sound: bool, if true, the explosion will play a sound (default: true) + * particles: bool, if true, the explosion will create particles (default: true) + * fire: bool, if true, 1/3 nodes become fire (default: false) + * griefing: bool, if true, the explosion will destroy nodes (default: true) + * grief_protected: bool, if true, the explosion will also destroy nodes which have been protected (default: false) +* puncher: (optional) entity, will be used as source for damage done by the explosion \ No newline at end of file From 890a569b13cf0a9c9925dc545df740e201a6a2fb Mon Sep 17 00:00:00 2001 From: AFCMS Date: Sun, 28 Mar 2021 07:40:36 +0200 Subject: [PATCH 10/19] add API documentation to mcl_worlds --- mods/CORE/mcl_worlds/API.md | 80 +++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 mods/CORE/mcl_worlds/API.md diff --git a/mods/CORE/mcl_worlds/API.md b/mods/CORE/mcl_worlds/API.md new file mode 100644 index 000000000..a5509431c --- /dev/null +++ b/mods/CORE/mcl_worlds/API.md @@ -0,0 +1,80 @@ +# mcl_worlds +This mod provides utility functions about positions and dimensions. + +## mcl_worlds.is_in_void(pos) +This function returns: + +* true, true: if pos is in deep void (deadly) +* true, false: if the pos is in void (non deadly) +* false, false: owerwise + +Params: + +* pos: position + +## mcl_worlds.y_to_layer(y) +This function is used to calculate the minetest y layer and dimension of the given minecraft layer. +Mainly used for ore generation. +Takes an Y coordinate as input and returns: + +* The corresponding Minecraft layer (can be nil if void) +* The corresponding Minecraft dimension ("overworld", "nether" or "end") or "void" if is in the void +If the Y coordinate is not located in any dimension, it will return: nil, "void" + +Params: + +* y: int + +## mcl_worlds.pos_to_dimension(pos) +This function return the Minecraft dimension of ("overworld", "nether" or "end") or "void" if is in the void. + +* pos: position + +## mcl_worlds.layer_to_y(layer, mc_dimension) +Takes a Minecraft layer and a “dimension” name and returns the corresponding Y coordinate for MineClone 2. +mc_dimension can be "overworld", "nether", "end" (default: "overworld"). + +* layer: int +* mc_dimension: string + +## mcl_worlds.has_weather(pos) +Returns true if can have weather, false owerwise. +Weather can be only in the overworld. + +* pos: position + +## mcl_worlds.has_dust(pos) +Returns true if can have nether dust, false owerwise. +Nether dust can be only in the nether. + +* pos: position + +## mcl_worlds.compass_works(pos) +Returns true if compasses are working at , false owerwise. +In mc, you cant use compass in the nether and the end. + +* pos: position + +## mcl_worlds.compass_works(pos) +Returns true if clock are working at , false owerwise. +In mc, you cant use clock in the nether and the end. + +* pos: position + +## mcl_worlds.register_on_dimension_change(function(player, dimension)) +Register a callback function func(player, dimension). +It will be called whenever a player changes between dimensions. +The void counts as dimension. + +* player: player, the player who changed the dimension +* dimension: position, The new dimension of the player ("overworld", "nether", "end", "void"). + + +## mcl_worlds.registered_on_dimension_change +Table containing all function registered with mcl_worlds.register_on_dimension_change() + +## mcl_worlds.dimension_change(player, dimension) +Notify this mod of a dimmension change of to + +* player: player, player who changed the dimension +* dimension: string, new dimension ("overworld", "nether", "end", "void") \ No newline at end of file From 1e3676c391a8588236e4f7871c382a4b28f6f9b3 Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Fri, 2 Apr 2021 05:38:53 +0000 Subject: [PATCH 11/19] Remove debug info from item magnet --- mods/ENTITIES/mcl_item_entity/init.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/mods/ENTITIES/mcl_item_entity/init.lua b/mods/ENTITIES/mcl_item_entity/init.lua index df08291b4..a05bb1ffd 100644 --- a/mods/ENTITIES/mcl_item_entity/init.lua +++ b/mods/ENTITIES/mcl_item_entity/init.lua @@ -81,7 +81,6 @@ minetest.register_globalstep(function(dtime) item_check_ticker = item_check_ticker + dtime if item_check_ticker >= 0.2 then item_check_ticker = 0 - print(dtime) for _,player in pairs(minetest.get_connected_players()) do if player:get_hp() > 0 or not minetest.settings:get_bool("enable_damage") then From 39aaf0f21faac88ba1f249e7324e7e4296861f50 Mon Sep 17 00:00:00 2001 From: NO11 Date: Fri, 2 Apr 2021 11:09:45 +0000 Subject: [PATCH 12/19] Fix #1391 --- mods/ITEMS/mcl_end/end_crystal.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ITEMS/mcl_end/end_crystal.lua b/mods/ITEMS/mcl_end/end_crystal.lua index b6b9fdd6a..d089c3cdf 100644 --- a/mods/ITEMS/mcl_end/end_crystal.lua +++ b/mods/ITEMS/mcl_end/end_crystal.lua @@ -70,7 +70,7 @@ minetest.register_entity("mcl_end:crystal", { collisionbox = {-1, 0.5, -1, 1, 2.5, 1}, mesh = "mcl_end_crystal.b3d", textures = {"mcl_end_crystal.png"}, - collide_with_objects = true, + collide_with_objects = false, }, on_punch = crystal_explode, on_activate = set_crystal_animation, From 695ad9120bf42f4b5ce62027a393fc2d65dd86aa Mon Sep 17 00:00:00 2001 From: AFCMS Date: Fri, 2 Apr 2021 14:12:44 +0200 Subject: [PATCH 13/19] remove backward compatibility for water --- mods/ITEMS/mcl_core/nodes_liquid.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mods/ITEMS/mcl_core/nodes_liquid.lua b/mods/ITEMS/mcl_core/nodes_liquid.lua index 0479c7f72..4696a629a 100644 --- a/mods/ITEMS/mcl_core/nodes_liquid.lua +++ b/mods/ITEMS/mcl_core/nodes_liquid.lua @@ -7,10 +7,10 @@ local WATER_ALPHA = 179 local WATER_VISC = 1 local LAVA_VISC = 7 local LIGHT_LAVA = minetest.LIGHT_MAX -local USE_TEXTURE_ALPHA +local USE_TEXTURE_ALPHA = true + if minetest.features.use_texture_alpha_string_modes then USE_TEXTURE_ALPHA = "blend" - WATER_ALPHA = nil end local lava_death_messages = { @@ -40,7 +40,6 @@ minetest.register_node("mcl_core:water_flowing", { }, sounds = mcl_sounds.node_sound_water_defaults(), is_ground_content = false, - alpha = WATER_ALPHA, use_texture_alpha = USE_TEXTURE_ALPHA, paramtype = "light", paramtype2 = "flowingliquid", @@ -86,7 +85,6 @@ S("• When water is directly below lava, the water turns into stone."), }, sounds = mcl_sounds.node_sound_water_defaults(), is_ground_content = false, - alpha = WATER_ALPHA, use_texture_alpha = USE_TEXTURE_ALPHA, paramtype = "light", walkable = false, From e20e0fab7164fee0a7cd495817d4a5a8dcd60c1a Mon Sep 17 00:00:00 2001 From: AFCMS Date: Fri, 2 Apr 2021 14:16:14 +0200 Subject: [PATCH 14/19] remobe backward compatibility for portals --- mods/ITEMS/mcl_portals/portal_end.lua | 6 ------ mods/ITEMS/mcl_portals/portal_nether.lua | 2 -- 2 files changed, 8 deletions(-) diff --git a/mods/ITEMS/mcl_portals/portal_end.lua b/mods/ITEMS/mcl_portals/portal_end.lua index 0bc0ce57e..ab09c5966 100644 --- a/mods/ITEMS/mcl_portals/portal_end.lua +++ b/mods/ITEMS/mcl_portals/portal_end.lua @@ -4,11 +4,6 @@ local S = minetest.get_translator("mcl_portals") local SPAWN_MIN = mcl_vars.mg_end_min+70 local SPAWN_MAX = mcl_vars.mg_end_min+98 -local PORTAL_ALPHA = 192 -if minetest.features.use_texture_alpha_string_modes then - PORTAL_ALPHA = nil -end - local mg_name = minetest.get_mapgen_setting("mg_name") local destroy_portal = function(pos) @@ -81,7 +76,6 @@ minetest.register_node("mcl_portals:portal_end", { -- This is 15 in MC. light_source = 14, post_effect_color = {a = 192, r = 0, g = 0, b = 0}, - alpha = PORTAL_ALPHA, after_destruct = destroy_portal, -- This prevents “falling through” collision_box = { diff --git a/mods/ITEMS/mcl_portals/portal_nether.lua b/mods/ITEMS/mcl_portals/portal_nether.lua index e842edf81..50a3bde39 100644 --- a/mods/ITEMS/mcl_portals/portal_nether.lua +++ b/mods/ITEMS/mcl_portals/portal_nether.lua @@ -30,7 +30,6 @@ local N_Y_MIN, N_Y_MAX = mcl_vars.mg_bedrock_nether_bottom_min, mcl_vars.mg_be local O_DY, N_DY = O_Y_MAX - O_Y_MIN + 1, N_Y_MAX - N_Y_MIN + 1 -- Alpha and particles -local ALPHA = minetest.features.use_texture_alpha_string_modes and 192 local node_particles_allowed = minetest.settings:get("mcl_node_particles") or "none" local node_particles_levels = { none=0, low=1, medium=2, high=3 } local PARTICLES = node_particles_levels[node_particles_allowed] @@ -263,7 +262,6 @@ minetest.register_node(PORTAL, { drop = "", light_source = 11, post_effect_color = {a = 180, r = 51, g = 7, b = 89}, - alpha = ALPHA, node_box = { type = "fixed", fixed = { From ead33e3520dd923f36f137614464f281b4d0ee43 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Fri, 2 Apr 2021 14:27:35 +0200 Subject: [PATCH 15/19] fix undeacleared vars in mcl_throwing --- mods/ITEMS/mcl_throwing/init.lua | 4 ++-- mods/ITEMS/mcl_throwing/register.lua | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mods/ITEMS/mcl_throwing/init.lua b/mods/ITEMS/mcl_throwing/init.lua index 4d6dcfe5c..09a34c12f 100644 --- a/mods/ITEMS/mcl_throwing/init.lua +++ b/mods/ITEMS/mcl_throwing/init.lua @@ -58,7 +58,7 @@ function mcl_throwing.dispense_function(stack, dispenserpos, droppos, dropnode, end -- Staticdata handling because objects may want to be reloaded -local get_staticdata = function(self) +function mcl_throwing.get_staticdata(self) local thrower -- Only save thrower if it's a player name if type(self._thrower) == "string" then @@ -71,7 +71,7 @@ local get_staticdata = function(self) return minetest.serialize(data) end -local on_activate = function(self, staticdata, dtime_s) +function mcl_throwing.on_activate(self, staticdata, dtime_s) local data = minetest.deserialize(staticdata) if data then self._lastpos = data._lastpos diff --git a/mods/ITEMS/mcl_throwing/register.lua b/mods/ITEMS/mcl_throwing/register.lua index 027ff4e93..8ef1c73bf 100644 --- a/mods/ITEMS/mcl_throwing/register.lua +++ b/mods/ITEMS/mcl_throwing/register.lua @@ -9,8 +9,8 @@ local snowball_ENTITY={ collisionbox = {0,0,0,0,0,0}, pointable = false, - get_staticdata = get_staticdata, - on_activate = on_activate, + get_staticdata = mcl_throwing.get_staticdata, + on_activate = mcl_throwing.on_activate, _thrower = nil, _lastpos={}, @@ -23,8 +23,8 @@ local egg_ENTITY={ collisionbox = {0,0,0,0,0,0}, pointable = false, - get_staticdata = get_staticdata, - on_activate = on_activate, + get_staticdata = mcl_throwing.get_staticdata, + on_activate = mcl_throwing.on_activate, _thrower = nil, _lastpos={}, @@ -38,8 +38,8 @@ local pearl_ENTITY={ collisionbox = {0,0,0,0,0,0}, pointable = false, - get_staticdata = get_staticdata, - on_activate = on_activate, + get_staticdata = mcl_throwing.get_staticdata, + on_activate = mcl_throwing.on_activate, _lastpos={}, _thrower = nil, -- Player ObjectRef of the player who threw the ender pearl From c457c4ce3c833bd564af5d0c4aa6a1fe62cdc653 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Fri, 2 Apr 2021 14:28:43 +0200 Subject: [PATCH 16/19] fix undeacleared vars in mcl_fishing --- mods/ITEMS/mcl_fishing/init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ITEMS/mcl_fishing/init.lua b/mods/ITEMS/mcl_fishing/init.lua index 228d490ea..2bd0ed515 100644 --- a/mods/ITEMS/mcl_fishing/init.lua +++ b/mods/ITEMS/mcl_fishing/init.lua @@ -303,8 +303,8 @@ local flying_bobber_ENTITY={ collisionbox = {0,0,0,0,0,0}, pointable = false, - get_staticdata = get_staticdata, - on_activate = on_activate, + get_staticdata = mcl_throwing.get_staticdata, + on_activate = mcl_throwing.on_activate, _lastpos={}, _thrower = nil, From 59d687c57960c0817e59b35f05b5019b36591d79 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Fri, 2 Apr 2021 14:30:46 +0200 Subject: [PATCH 17/19] fix API.md --- mods/ITEMS/mcl_throwing/API.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/mods/ITEMS/mcl_throwing/API.md b/mods/ITEMS/mcl_throwing/API.md index f2b1c7374..41a47223a 100644 --- a/mods/ITEMS/mcl_throwing/API.md +++ b/mods/ITEMS/mcl_throwing/API.md @@ -33,3 +33,9 @@ Handle creative mode, and throw params. * entity_name: the name of the entity to throw * velocity: (optional) velocity overide (can be nil) + +## mcl_throwing.get_staticdata(self) +Must be used in entity def if you want the entity to be saved after unloading mapblock. + +## mcl_throwing.on_activate(self, staticdata, dtime_s) +Must be used in entity def if you want the entity to be saved after unloading mapblock. From ca01b3641bb332e11afe26a45fa88a5dc6a0e29d Mon Sep 17 00:00:00 2001 From: AFCMS Date: Fri, 2 Apr 2021 15:04:21 +0200 Subject: [PATCH 18/19] make endermen not teleport everytime when hitted --- mods/ENTITIES/mobs_mc/enderman.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/enderman.lua b/mods/ENTITIES/mobs_mc/enderman.lua index efc789344..22599dd9e 100644 --- a/mods/ENTITIES/mobs_mc/enderman.lua +++ b/mods/ENTITIES/mobs_mc/enderman.lua @@ -534,9 +534,11 @@ mobs:register_mob("mobs_mc:enderman", { --if (minetest.get_timeofday() * 24000) > 5001 and (minetest.get_timeofday() * 24000) < 19000 then -- self:teleport(nil) --else + if pr:next(1, 8) == 8 then --FIXME: real mc rate self:teleport(hitter) - self.attack=hitter - self.state="attack" + end + self.attack=hitter + self.state="attack" --end end end, From b68c4b07c135a5e2a46225cf3c90cb8a2ac52252 Mon Sep 17 00:00:00 2001 From: AFCMS Date: Fri, 2 Apr 2021 17:20:19 +0200 Subject: [PATCH 19/19] tweak hudbars --- mods/HUD/hudbars/default_settings.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/HUD/hudbars/default_settings.lua b/mods/HUD/hudbars/default_settings.lua index 0bd267d0e..ce43cc8be 100644 --- a/mods/HUD/hudbars/default_settings.lua +++ b/mods/HUD/hudbars/default_settings.lua @@ -20,9 +20,9 @@ if hb.settings.bar_type == "progress_bar" then hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_offset_right_x", "number", 15) hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_offset_right_y", "number", -86) else - hb.settings.start_offset_left.x = hb.load_setting("hudbars_start_statbar_offset_left_x", "number", -265) + hb.settings.start_offset_left.x = hb.load_setting("hudbars_start_statbar_offset_left_x", "number", -258) hb.settings.start_offset_left.y = hb.load_setting("hudbars_start_statbar_offset_left_y", "number", -90) - hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_statbar_offset_right_x", "number", 25) + hb.settings.start_offset_right.x = hb.load_setting("hudbars_start_statbar_offset_right_x", "number", 16) hb.settings.start_offset_right.y = hb.load_setting("hudbars_start_statbar_offset_right_y", "number", -90) end -- Modified in MCL2!