master #15

Merged
NO11 merged 241 commits from VoxeLibre/VoxeLibre:master into master 2022-03-12 23:42:27 +01:00
Owner
No description provided.
NO11 added 241 commits 2022-03-12 23:42:11 +01:00
9b881df465 Temporarily remove glitchy Elytra crash-damage
If you fly in certain directions with this damage system, you will die. also if you speed up too fast.
a6c5c8a72a Call update_groupcaps from load_enchantments
This avoids the need to call the function from on_enchant for unbreaking
and efficiency.
adf738854a
Fix mob-in-boat crash in Minetest 5.5-dev
In Minetest 5.4.1, calling get_player_control() on a mob returned the
empty string. Minetest commit 5eb45e1ea03c6104f007efec6dd9c351f310193d
changed this, so now calling get_player_control() on a mob returns nil.

As mcl_boats defines boats that can have a player or a mob as a driver,
code like the following crashes with a changed get_player_control() API:

local ctrl = driver:get_player_control()
if ctrl.sneak then
    detach_object(driver, true)
end

Furthermore, once a world has crashed, joining it near a mob that is the
driver of a boat with such control code immediately crashes again.

When I reported this bug to Minetest, several Minetest core developers
stated that they disliked the old API and proposed other return values
for calling a mob's get_player_control() function – all different from
the empty string. Since I have some doubts that this bug will be fixed
in Minetest 5.5.0, boat code must take into account a nil return value.

Minetest issue: https://github.com/minetest/minetest/issues/11989
df8576e77c mcl_composters initial commit
Implements a composter block with crafting recipe, and some more
uncraftable blocks representing various stages of filling.

Adds a list of items that can be used with the composter and the chances
of these items adding a layer to the composter.

Implements methods to add compostable items to the composter, to update
the composter to various levels of compost and to harvest an item of
bone meal when the composter is ready.

Textures were taken from XSSheep/Nova_Wostra Pixel Perfection texture
pack.
4cf88abe4c Fix composter item image.
* Less is more (thanks AFCMS)
64203c38a6 Update documentation.
* Make a mention of the one second delay before composter readies.
1f7697b6f5 Typo fix.
* it's a spruceSapling (thanks NO11)
8d79d16531 Update mod deps.
* Add dpendency on mcl_dye for the bone meal particle spawner
06274518bf Add player object check.
* Handle the case where a mob somehow "clicks" on a composter and we get
  an invalid player object passed.
3257014e00 Add missing melon block.
* Add melon block to the compostabiles list.
64608f50f8 Update mod description and fix comment.
* Make mod description more descriptive.
* Minor comment tweak.
cea821b2fa Comment fixes.
* Improve comments, some typo fixes.
ffc2c94096 Add help alias
* Add help alias for the ready type composter
f22baafaa6 Add player object check.
* Add one more check if player object is an actual player.
51ca60c097 Change custom node attribute name.
* Rename _compost_level to _mcl_compost_level
55009c257e Use new vectors
* Use vector.new instead of xyz table.
f81980da51 Fix hardness and blast resistance.
* Use correct MC values for hardness and blast resistance.
8d18ab8a7a Optimize texture files.
* Texture files were optimized with 'optipng  -o7 -zm9 -strip all' .
c392fd0269 Merge pull request 'mcl_composters initial commit' (#2005) from kabou/MineClone2:composters into master
Reviewed-on: MineClone2/MineClone2#2005
Reviewed-by: cora <cora@noreply.git.minetest.land>
Reviewed-by: NO11 <no11@noreply.git.minetest.land>
Reviewed-by: AFCMS <afcms@noreply.git.minetest.land>
584a75df76 Fix filling cauldrons with water.
When using a bucket of water on a cauldron, this would not fill the
cauldron as expected, but deposit a water source block on top of the
cauldron instead.

Applied patch from mineclone5 #38 (commit #
698c29733f06a7fcb7e755bf26ee46b33b00699b) from mineclone5 that fixes
this problem.
315f251584 Add local to speedup global function access.
The minetest.registered_nodes function is called from multiple places.
Define a local alias registered_nodes and substitute it in all calls.
13baa68b67 Fixed missed alias uses and added set_node alias.
Two instances of add_node and add_item still used the full minetest
call, substitute the alias.
Added a set_node alias for several minetest.set_node calls.
b3aed9d6b8 Use proper get_item_group accessor.
Instead of directly accessing the group table in node definitions, use
the proper minetest.get_item_group accessor to test for "cauldron"
group.
Also adds local alias get_item_group for the global minetest call.
88ce1e3662 Remove redundant logic.
The function on_place_bucket contains the following logic:
  if not a and not b then return x end
  if a then
    foo(a)
  elseif b then
    foo(b)
  else
    return x
  end

The "if not a and not b then .." is removed because the case is handled
by the else case later on.  This will allow some further simplifications.
d2261426c3 Remove redundant variables in on_place_bucket.
The function on_place_bucket defined a couple of variables that were
used only once or in a redundant check.  After removal of the redundant
check in a previous commit, all use-once variables can now be substituted
with their assignment expressions.
639bf936c5 Use alias for minetest.* namespace function call.
* Fix one missed minetest.get_node use in earlier commit.
e54502edd6 Add more local aliases for minetest.* namespace functions
* Add locals for
  - minetest.is_creative_enabled
  - minetest.is_protected
  - minetest.record_protection_violation
af132cc523 Reinstate nil check in on_place_bucket.
* Oops, nil checks on registered_node[name] were erroneously optimized
  away, risking crashes.  Reinstate those checks.
dcfbfd67b8 Merge pull request 'Quick fix: Reinstate nil check in on_place_bucket.' (#2018) from kabou/MineClone2:fix-buckets-cauldrons into master
Reviewed-on: MineClone2/MineClone2#2018
Reviewed-by: AFCMS <afcms@noreply.git.minetest.land>
Reviewed-by: cora <cora@noreply.git.minetest.land>
ceb27b6929
obtimize icons again
`optipng -strip all -o9`
cc87791327 add translates for `mcl_boats`
Co-authored-by: Emojigit <emojigit@noreply.git.minetest.land>
21808390f9 Revert "add translates for `mcl_boats`"
This reverts commit 2ee84f2ad3bd1f067a43c9382d7fc70f30fab9f0.
5431e206b0 Fix hopper breakage in get_item_group return value.
In commit 55009c257e that added vectors to
mcl_composters, mcl_hoppers was accidentally patched with a unrelated
change, updating it to get_item_group().  This mostly works, but in one
particular case the semantics of the return value differs.  Instead of
returning 'nil' it returns '0'.  That altered the evaluation of an if
condition, breaking the abm that sucks in items.

This commit fixes the conditional by explicitly comparing  '~= 0'.
4b89398b3b Merge pull request 'Fix hopper breakage in get_item_group return value. (Fixes: #2022)' (#2023) from kabou/MineClone2:fix-hoppers into master
Reviewed-on: MineClone2/MineClone2#2023
Reviewed-by: AFCMS <afcms@noreply.git.minetest.land>
Reviewed-by: cora <cora@noreply.git.minetest.land>
41550da87b Fix redstone comparator flooding crash
Redstone comparators have two modes, comparison mode & subtraction mode.
Before this patch, the functions to turn comparators on or off attempted
to swap nodes with comparators in the same mode, but failed to determine
the correct replacement node, if the existing node was not a comparator.

When a comparator in an on state (e.g. powered by a filled cauldron) was
flooded, the flooding dropped the comparator and replaced the comparator
node that was to be swapped out with air, which lead to a server crash.

This patch changes the functions that turn comparators on or off so they
only swap existing nodes with comparators in the same mode if the name
of the replacement node can be determined – i.e. if it is not nil.
27842aa2f5 Fix handheld maps not displaying in Minetest 5.5.0
The function dynamic_add_media() was changed in incompatible ways in
several minor versions of Minetest, breaking the display of handheld
maps in Minetest 5.5.0. This patch makes handheld maps display there.

The function was blocking with one argument in Minetest 5.3. It was also
blocking in Minetest 5.4, but took an additional argument for a function
to execute once the media had been received. Calling dynamic_add_media()
with a single argument had been deprecated; a function that did nothing
was provided in mcl_maps to satisfy the changed argument requirements.

In Minetest 5.5, dynamic_add_media() was changed to non-blocking. This
introduced a race condition in mcl_maps, where a client often tried to
display a map before it had received the map texture from the server.

Opening an issue on the Minetest issue tracker led to it being closed in
about 20 minutes: <https://github.com/minetest/minetest/issues/11997>
2bb416765c revert to old mobs ( 32c03dc27e )
This reverts the hierarchies ENTITIES/mcl_mobs, ENTITIES/mobs_mc
and ENTITIES/mobs_mc_gameconfig to the state of commit
32c03dc27e
87e494f42b mapgen/mcl_mapgen_core: move set_node decorations a node callback
During the rewrite in 89e55e9065, a queue system was added to allow
using both VoxelManip-based generation steps, and set_node-based steps,
however some set_node-based steps (underground mushrooms, nether
decorations, and structures) were missed and remained in a VoxelManip
step. The result is that the changes made by the set_node stages were
overwritten after the (now-stale) VoxelManip data was committed later.

(ref. Mineclonia/Mineclonia#26)
66bb209ad1 Fix TGA file writing on Windows
Before this patch, the tga_encoder mod would write corrupted TGA files
on Windows: Bytes that looked like newlines were replaced by a carriage
return and a newline.
56b63463a5 Fix burning entity animation.
The parameters for the flames sprite were incorrect, causing the reverse
side of the sprite to appear as an opaque black rectangle.  Use the
correct incantation.
df5d24104d Make player burning HUD work without csm.
* Add update_hud() function.
* Remove the client channels.
* Unglobalize animation_frames variable.
* Fix bug where player state was not stored on shutdown of singleplayer
  game.
* Remove superfluous sanity_check() function, this code could easily be
  inlined in its only caller.
b17776699e Add comments to "storage" table.
* Document attributes of the "storage" table.
e80006f4ea Do not set fire to objects that are already burning.
Changes to mcl_burning.set_on_fire():
* Add logic that only updates the burn time, but skips adding fire
  entities to objects that are already burning.
* Condense code a little, remove single use variables.
* Add a comment to a questionable piece of code.
* Add comments to the function.
c3e0996902 Fix fire HUD not showing on join while burning.
* Add the fire HUD to a player who joins the server while still burning
  from the previous session.
3c10f0e970 Rewrite portal removal to avoid stack overflow
This solves a problem were nether portal removal would trigger deep
recursion through node callbacks.  For large portals this could result
in stack overflow crashes on LuaJIT.  The issue is solved by rewriting
the portal removal to avoid recursion and removing the portal in one
operation using minetest.bulk_set_node.
b9c2c3bd0a Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
* Reduce redundant `== false` condition check.
4a1b93bbfa Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
95cfa43483 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
962500b189 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
88f7a150c7 Add check for unknown nodes.
* Add check for unknown node in `handle_node_drops()` and return
  immediately if the dug node has no definition table.
818cbb2f48 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
9bac0da01a Fix registered_items oddity and add check for unknown nodes.
* Mobs redo uses `registered_items[]` where clearly the proper table
  accessed should be `registered_nodes[]`.  Perhaps this magically
  works, but it looks nonsensical.  Switch to the use the more
  sensible `registered_nodes[]` table.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
3f4dafc68f Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
f5a8d6d17a Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
* Define local variable to cache multiple accesses to `registered_nodes[]`
  and improve readability.
* Clarify code flow.
6a69f49fa0 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
1326b9e7e7 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.  By application of De Morgan's law, the compound logic
  expression can be rewritten so that the existence of the table is
  checked before all following attribute references.
11ee1d133f Fix cut-n-paste error.
* Swap misplaced lines.
* Concatenate conditional expression.
4da5084daf Make daylight detector ignore artificial light
The daylight detector code used get_node_light(), which detects both
natural and artificial light. This patch improves the code to use
get_natural_light(), which was introduced with Minetest 5.4.0.
77f8ecd6e8 Make daylight detector work in Minetest 5.3.0
This patch contains a function that searches for a path to a node with
light level 15, which is guaranteed to be sunlight.
119b4aa82c Merge pull request 'Update version and credits for release' (#2059) from update_docs_for_073 into master
Reviewed-on: MineClone2/MineClone2#2059
Reviewed-by: AFCMS <afcm.contact@gmail.com>
Reviewed-by: NO11 <no11@noreply.git.minetest.land>
Reviewed-by: kabou <kabou@noreply.git.minetest.land>
17b8eab368 Make carpets walkable.
* Make carpets walkable.  When a carpet is placed on top of a fence or a
  wall, the carpet can be jumped upon, allowing to in effect jump over
  fences and walls.
NO11 merged commit a44846a82c into master 2022-03-12 23:42:27 +01:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: NO11/MineClone2#15
No description provided.