1
0
Fork 0
Commit Graph

6951 Commits (a108d5c11f0b06d0381e7b129cfee3b88a46336f)

Author SHA1 Message Date
cora 50e99f470e fix certain mobs not spawning in certain biomes 2022-03-22 15:16:48 +01:00
NO411 aeff7cf1a4 Remove offhand item on death 2022-03-22 12:48:41 +01:00
kabou 46ee5aaa59 Fix undefined luaentity crash.
* Add nil check to get_luaentity() access.
* Cache get_luaentity() call in local var.
2022-03-21 01:39:02 +00:00
NO411 019dd45381 Check for damager 2022-03-19 16:50:19 +01:00
NO411 d481f7b720 Fix showing shield hud at the wrong side for half a second 2022-03-19 15:59:59 +01:00
NO411 c94964d10a Remove debug line 2022-03-19 15:26:41 +01:00
kabou a9a3f01a0e Tiny comment fix. 2022-03-19 03:16:15 +01:00
kabou ae6bea73fd Make carpets `supported_node`.
* Change carpet from `group:attached_node` to `group:supported_node`,
  allowing carpets to be placed on top of torches, water source blocks
  and other non-walkable nodes, like in MC.
2022-03-19 02:32:46 +01:00
kabou 8518ce2c19 Add support for `group:supported_node`
* Add support for `group:supported_node` to CORE/mcl_attached.
  Supported nodes are nodes that can be placed on any node that does not
  have the `drawtype = "airlike"` attribute.
* Copy the `drop_attached_node()` function from minetest/builtin, so
  that the override function provides the same behavior when nodes drop.
* Add comments to CORE/mcl_attached and to the functions defined in it.
* Add more local aliases for global minetest.* functions.
* If the original function returns true, it is not necessary anymore
  to perform more tests and the override function can simply return true
  immediately.
2022-03-19 02:32:13 +01:00
NO411 6158e4e50d Don't always update shield texture using set_properties 2022-03-18 23:23:01 +01:00
NO411 7c0a48bebf Remove some code ... 2022-03-18 23:08:50 +01:00
NO411 5bdf83cbfc Revert weird changes 2022-03-18 23:07:25 +01:00
NO411 976cfba53a Make it possible to xraft a banner on an enchanted shield 2022-03-18 23:02:51 +01:00
NO411 fc9e83c059 Make it possible to craft a banner on an enchanted shield 2022-03-18 23:02:25 +01:00
NO411 60d877b718 Fix enchanting shield on enchanting table possible 2022-03-18 22:45:12 +01:00
kabou 9eba0e4860 Remove unused code.
* Remove unused code that was commented out.  The code tried to find
  fire luaentities in the same spot as the newly created fire luaentity.
  It may have been intended to optimize getting set on fire multiple
  times, but it makes no sense as it does not discriminate between fire
  luaentities attached to the object set on fire and those attached to
  other objects.  The function that this code was in also has a better
  way to prevent adding multiple fire luaentities in the first place.
2022-03-18 11:39:11 +01:00
kabou 90311da514 Preempt possible crash on nil in on_joinplayer.
* In mineclone5 a crash was reported to occur when deserialization of
  storage returned nil in on_joinplayer.    https://git.minetest.land/
  MineClone5/MineClone5/commit/96c4fb60d8641b4181edb902ed24dbf173828d09
  This commit uses a different, but equally effective fix.
2022-03-18 11:36:33 +01:00
kabou e9ff2ba32a Minor changes to mcl_burning.
* Remove animation_frame from fire entity state, it is now kept in the
  storage table of the parent entity.
* Rename animation_timer in fire entity table to _mcl_animation_timer,
  in line with mineclone2 policy on adding custom members to minetest
  tables.
* Comment out code that does nothing sensible.  Scheduled for deletion
  at a later time.
2022-03-18 11:36:23 +01:00
NO411 0f8f5a41d2 Fix dependencies 2022-03-15 16:30:03 +01:00
NO411 db68c0e26b Add shield 2022-03-15 15:58:27 +01:00
kabou 3f787f8305 Remove stray work notes files.
* These temp files accidentally got added during the unregistered nodes
  fixes.
2022-03-15 07:42:11 +01:00
epCode 4483f4b6b6 fix #2068 2022-03-15 02:18:02 +00:00
AFCMS 47b1eeda74
fix frost walker enchant not protecting from magma block damage 2022-03-13 19:11:28 +01:00
GNU Hacker f430aec0cd
item pickup sound gain more MC like 2022-03-13 14:58:01 +01:00
kabou 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.
2022-03-12 13:35:12 +00:00
MysticTempest de3cdee09e Make composters & barrels fuel for furnaces with the same burntime as chests. 2022-03-10 00:47:54 -06:00
Nils Dagsson Moskopp 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.
2022-03-09 22:33:08 +00:00
Nils Dagsson Moskopp 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.
2022-03-09 22:33:08 +00:00
kabou deed231f28 Fix typos. 2022-03-09 18:50:41 +01:00
kabou 11ee1d133f Fix cut-n-paste error.
* Swap misplaced lines.
* Concatenate conditional expression.
2022-03-09 18:26:51 +01:00
kabou 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.
2022-03-09 15:14:22 +01:00
kabou 6a69f49fa0 Add check for unknown nodes.
* Check if node has a definition table before attempting to evaluate its
  attributes.
2022-03-09 14:59:49 +01:00
kabou 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.
2022-03-09 14:40:37 +01:00
kabou 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.
2022-03-09 14:14:45 +01:00
kabou 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.
2022-03-09 13:11:53 +01:00
kabou 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.
2022-03-09 12:11:59 +01:00
kabou 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.
2022-03-09 04:00:48 +01:00
kabou 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.
2022-03-09 02:23:18 +01:00
kabou 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.
2022-03-09 02:15:33 +01:00
kabou 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.
2022-03-09 02:05:38 +01:00
kabou 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.
2022-03-09 00:01:23 +01:00
Dieter44 f8c60b5f75 ITEMS/mcl_anvils: fix renaming items w/o desc… 2022-03-05 15:35:39 +00:00
MysticTempest 7a53ea8b70 Rename a few textures to help support texture packs. 2022-03-02 20:13:24 -06:00
Elias Åström 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.
2022-03-03 01:42:49 +00:00
kabou 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.
2022-03-02 17:15:05 +01:00
kabou d424d4f10e Add comments to mcl_burning.update_hud(). 2022-03-02 16:39:27 +01:00
kabou 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.
2022-03-02 16:25:40 +01:00
kabou b17776699e Add comments to "storage" table.
* Document attributes of the "storage" table.
2022-03-02 15:40:29 +01:00
kabou 86a4ece7d2 Add local copy of minetest.find_nodes_in_area. 2022-03-02 15:25:03 +01:00
kabou 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.
2022-03-02 15:21:55 +01:00
kabou 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.
2022-03-02 10:47:46 +01:00
Nils Dagsson Moskopp 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.
2022-02-28 16:58:59 +00:00
AFCMS 5a7b1cc382
make all arrow types activate target (+ depends and code fixes) 2022-02-26 23:52:03 +01:00
AFCMS 210a0d8ee1
make lingering potions activate target (+ indentation fix) 2022-02-26 22:44:50 +01:00
AFCMS eae8effd57
make splash potions activate target 2022-02-26 22:42:27 +01:00
AFCMS b51e322304
make fire charges activate target (+ fix possible crash) 2022-02-26 22:38:34 +01:00
AFCMS 096d46152e
make bottle o enchanting activate target 2022-02-26 22:20:05 +01:00
AFCMS d89687984b
make ender pearls activate target 2022-02-26 22:16:10 +01:00
AFCMS c6f72c473f
make eggs activate target 2022-02-26 22:12:26 +01:00
AFCMS 540b72f1d6
add target help text 2022-02-26 19:12:02 +01:00
AFCMS 7449725a56
add target crafting receipe 2022-02-26 19:12:01 +01:00
AFCMS 9e7a525a0a
make snowballs activate target 2022-02-26 19:12:01 +01:00
AFCMS 4bd91750bc
add target with API 2022-02-26 19:12:01 +01:00
E 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)
2022-02-25 18:38:50 +01:00
cora 3feca330c9 fix the other 2 throw_xp occurences 2022-02-25 00:40:26 +00:00
cora caacb378de fix api change in enchanting 2022-02-25 00:40:26 +00:00
cora 379972ea11 fix crash when blaze attacks logged off player 2022-02-25 00:40:26 +00:00
cora 414e2e7725 fix crash on opening villager formspec 2022-02-25 00:40:26 +00:00
cora 435b5d756d throw_experience->throw_xp (api change) 2022-02-25 00:40:26 +00:00
cora 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
2022-02-25 00:40:26 +00:00
cora 86ca401e4e do not randomseed twice 2022-02-25 00:08:26 +00:00
cora 378b5b30c9 fix beds dropping when burning up 2022-02-25 00:08:26 +00:00
cora 840b705a22 make fire use abms instead of laggy node timers 2022-02-25 00:08:26 +00:00
Nils Dagsson Moskopp 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>
2022-02-24 22:43:45 +00:00
Nils Dagsson Moskopp 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.
2022-02-24 15:52:01 +01:00
AFCMS cbfc71705d
remove blender backup file 2022-02-24 10:16:47 +01:00
kabou 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'.
2022-02-24 03:18:25 +01:00
Emojigit 06deb92dd6 mcl_tools 2022-02-23 23:58:05 +01:00
Emojigit 7685b4758f mcl_flowers 2022-02-23 23:58:05 +01:00
Emojigit 9944abb328 mcl_books 2022-02-23 23:58:05 +01:00
Emojigit 5ce1852c1d mcl_dye 2022-02-23 23:58:05 +01:00
Emojigit 56a70025b8 mcl_flowerpots 2022-02-23 23:58:05 +01:00
Emojigit 9fe3bbd2fa mcl_mushrooms 2022-02-23 23:58:05 +01:00
Emojigit fb1d189d40 mcl_doors 2022-02-23 23:58:05 +01:00
Emojigit 9cd24f4af5 mcl_commands 2022-02-23 23:58:05 +01:00
Emojigit a64c3f87bc xpanes 2022-02-23 23:58:05 +01:00
Emojigit 5075f2ca56 mcl_armor 2022-02-23 23:58:05 +01:00
Emojigit 249dfac319 mcl_inventory 2022-02-23 23:58:05 +01:00
Emojigit 2b5a0242db mcl_fire 2022-02-23 23:58:05 +01:00
Emojigit 790ccf0812 mcl_fishing 2022-02-23 23:58:05 +01:00
Emojigit 8d639794f3 mcl_fences 2022-02-23 23:58:05 +01:00
Emojigit af8681c143 mcl_buckets 2022-02-23 23:58:05 +01:00
Emojigit 1ef58f7250 mcl_walls 2022-02-23 23:58:05 +01:00
Emojigit 15747220f2 mcl_hoppers 2022-02-23 23:58:05 +01:00
Emojigit 925dad7f5e mcl_anvils 2022-02-23 23:58:05 +01:00
Emojigit 729f653c85 mcl_portals 2022-02-23 23:58:05 +01:00
Emojigit d1e328e57a mcl_bows 2022-02-23 23:58:05 +01:00
Emojigit 615a968fbb mcl_skins 2022-02-23 23:58:05 +01:00
Emojigit 7e5a9bd8b6 mcl_throwing 2022-02-23 23:58:05 +01:00
Emojigit d018bee00a mcl_cake 2022-02-23 23:58:05 +01:00
Emojigit 1365d0b257 mcl_jukebox 2022-02-23 23:58:05 +01:00
Emojigit a289a00427 mcl_heads 2022-02-23 23:58:05 +01:00
Emojigit a238aabbb0 mcl_cauldrons 2022-02-23 23:58:05 +01:00
Emojigit b02f7cd974 mcl_mobs 2022-02-23 23:58:05 +01:00
Emojigit e19113d4e0 findbiome 2022-02-23 23:58:05 +01:00
Emojigit 4deac632e6 mcl_sponges 2022-02-23 23:58:05 +01:00
Emojigit c480e6891d mcl_maps 2022-02-23 23:58:05 +01:00
Emojigit 844eb3fb7c mcl_brewing 2022-02-23 23:58:05 +01:00
Emojigit fc768cb1ad mcl_signs 2022-02-23 23:58:05 +01:00
Emojigit 1f9a919459 mcl_monster_eggs 2022-02-23 23:58:05 +01:00
Emojigit 70007e3453 mcl_furnaces 2022-02-23 23:58:05 +01:00
Emojigit 3aff1f8981 mcl_hunger 2022-02-23 23:58:05 +01:00
Emojigit c86a506672 mcl_tnt 2022-02-23 23:58:05 +01:00
Emojigit f348223da2 mcl_crafting_table 2022-02-23 23:58:05 +01:00
Emojigit ca6469b959 mcl_weather 2022-02-23 23:58:05 +01:00
Emojigit c52e09ddcd mcl_structures 2022-02-23 23:58:05 +01:00
Emojigit bb55120adc mcl_experience 2022-02-23 23:58:05 +01:00
Emojigit 77339afbe2 mcl_cocoas 2022-02-23 23:58:05 +01:00
Emojigit 9b15599bee hudbars 2022-02-23 23:58:05 +01:00
Emojigit a685c3bc83 mclx_core 2022-02-23 23:58:05 +01:00
Emojigit b01d4eba88 mcl_paintings 2022-02-23 23:58:05 +01:00
Emojigit 952747d4da mcl_mobspawners 2022-02-23 23:58:05 +01:00
Emojigit 430f5b05ab mcl_itemframes 2022-02-23 23:58:05 +01:00
Emojigit e4a311e28a mcl_clock 2022-02-23 23:58:05 +01:00
Emojigit 6a115a68ef mcl_armor_stand 2022-02-23 23:58:05 +01:00
Emojigit f3d0ec845c mcl_spawn 2022-02-23 23:58:05 +01:00
Emojigit 563daeed8a mcl_wip 2022-02-23 23:58:05 +01:00
Emojigit a6c3cab791 mclx_fences 2022-02-23 23:58:05 +01:00
Emojigit bb4ddee570 mcl_compass 2022-02-23 23:58:05 +01:00
Emojigit fe3e80bc0e lightning 2022-02-23 23:58:05 +01:00
Emojigit 59fe078fd7 mcl_playerplus 2022-02-23 23:58:05 +01:00
Emojigit dba08ddc1f mcl_torches 2022-02-23 23:58:05 +01:00
Emojigit 551bf917e2 mcl_void_damage 2022-02-23 23:58:05 +01:00
Emojigit 26dadb1846 mcl_falling_nodes 2022-02-23 23:58:05 +01:00
Emojigit 33a353e20d mcl_privs 2022-02-23 23:58:05 +01:00
Emojigit f02f3c9f40 screwdriver 2022-02-23 23:58:05 +01:00
Emojigit 410c1ecd1f mcl_hbarmor 2022-02-23 23:58:05 +01:00
Emojigit ba172f0847 mcl_explosions 2022-02-23 23:58:05 +01:00
Emojigit ad42c3588b mcl_farming 2022-02-23 23:58:05 +01:00
Emojigit 9734c74c56 (WIP) mcl_farming 2022-02-23 23:58:05 +01:00
Emojigit c3dd5e6c2c MORE MESS SORRY XD 2022-02-23 23:58:05 +01:00
Emojigit 21808390f9 Revert "add translates for `mcl_boats`"
This reverts commit 2ee84f2ad3.
2022-02-23 23:58:05 +01:00
Emojigit cc87791327 add translates for `mcl_boats`
Co-authored-by: Emojigit <emojigit@noreply.git.minetest.land>
2022-02-23 23:58:04 +01:00
Emojigit a8aabb2329 add translate for `doc_identifier` 2022-02-23 23:58:04 +01:00
Emojigit 4f00b62a18 add zh_TW translate to `mcl_beds` and `mcl_core` 2022-02-23 23:58:04 +01:00
AFCMS 360a1604ba
Revert "move barrels to mcl_chests"
This reverts commit a272322cb5.
2022-02-22 20:20:21 +01:00
AFCMS 61f4c5b885
apply @kay27 fix to `mcl_util.drop_items_from_meta_container` 2022-02-22 18:08:26 +01:00
AFCMS a272322cb5
move barrels to mcl_chests 2022-02-22 18:08:25 +01:00
AFCMS 9112915ddd
fix barrel top texture rotation 2022-02-22 18:08:25 +01:00
AFCMS 397c243e89
cleanup barrel TODO list 2022-02-22 18:08:25 +01:00