Commit graph

107 commits

Author SHA1 Message Date
Nils Dagsson Moskopp
ce6d6c26cc
Add debug command to acquire a written book
The “getwrittenbook” command gives a player that has the “debug” privilege a book
with a configurable amount of characters. This was added as a debug aid, to help
reproducing situations in which items with lots of metadata trigger issues like
heavy lag or server crashes.
2021-07-30 17:22:33 +02:00
Nils Dagsson Moskopp
a0c9f11af6
Log warning for non-serializable item entity fix 2021-07-30 17:15:13 +02:00
sfan5
62d5b547a0
Fix non-serializable item entity unload crash
Some items, like shulkers or books, can have so much metadata that the
corresponding item entity can not be serialized by the Minetest engine.

Without this patch, dropping such an item and then moving away crashes
Minetest, as it can not serialize the entity with serializeString16()
when unloading a map block.

The patch resets the overlong metadata of non-serializable item entities.
This avoids a crash and makes it possible to retrieve a “sanitized” item
without metadata when the mapblock containing the item entity is reloaded.

Originally sfan5 guessed the maximum possible item entity serialization size
that would not lead to a crash as 65530 bytes, but anon5 calculated it to be
actually 65487 bytes. This has been experimentally verified by erlehmann.
2021-07-30 17:13:26 +02:00
Elias Åström
2df6ee32be Remove unnecessary code in mcl_item_entity 2021-04-16 22:45:22 +02:00
Elias Åström
9bb39dfba6 Rename _mcl_autogroup_groupcaps to _mcl_diggroups 2021-04-16 22:34:26 +02:00
Elias Åström
b50addac55 Make changes to the mcl_autogroup API
Group levels are now specified as a list of names when registering a
digging group.  Digging groups which do not have specified levels will
support tools having two levels, 0 and 1 where 0 means the tool can dig
but not harvest the node and 1 means it can also harvest the node.  If
more levels are required one has to specifiy them when registering the
digging group.
2021-04-16 22:33:55 +02:00
Elias Åström
012e150b59 Rewrite mcl_autogroup
These changes are primarly made to make mcl_autogroup more efficient.
Previously enchanted tools required storing around 21 kB of metadata due
to the way the previous version of the mod was implemented.  This caused
a lot of lag and a huge amount of network traffic.  With the changes
enchanted tools won't require more than 1 kB of metadata.

The mod is also rewritten to use an API to register digging groups and
compute the groupcaps for tools.  This will make it easier for modders
to register custom digging groups.

The mod is now split up into two parts.  One part called "mcl_autogroup"
to implement the API for registering custom digging groups, and the
other part called "_mcl_autogroup" which contains most of the code which
has to be loaded after most mods.
2021-04-16 22:31:42 +02:00
Elias Fleckenstein
a9bdb7b509 Fix #969 2021-01-08 14:55:02 +01:00
Elias Fleckenstein
8b92d795d2 Fix #960 2021-01-05 18:05:20 +01:00
Elias Fleckenstein
e7721b91a0 Fix #959 2021-01-05 17:35:06 +01:00
Elias Fleckenstein
8ef14dd81f Fix #872 2021-01-05 17:23:24 +01:00
Elias Fleckenstein
c36dc16527 Fix #948 2021-01-04 10:15:28 +01:00
Elias Fleckenstein
84708c3870 Merge branch 'master' of https://git.minetest.land/Wuzzy/MineClone2 2021-01-02 10:58:02 +01:00
MysticTempest
b56ae38939 Make lava/fire wait 2 seconds before destroying items to allow chance for pickup, fix dogs following when sitting, and add some rotation so mobs don't idle at cliffs. 2020-12-22 08:29:24 -06:00
Elias Fleckenstein
977489de04 Fixed efficiency drops 2020-12-18 17:33:02 +01:00
Elias Fleckenstein
86b2cd70f9 Fortune 2020-11-06 13:46:52 +01:00
Elias Fleckenstein
7c28bf8507 Silk Touch 2020-11-02 19:09:23 +01:00
kay27
30d9e54803 Implement leftovers of https://git.minetest.land/Wuzzy/MineClone2/issues/841#issuecomment-11440 2020-10-24 02:46:45 +04:00
kay27
a127136c60 Add Enchanting from Crafter-minetest by Oil_boi 2020-10-19 16:38:21 +04:00
Wuzzy
e361b35724 Fix crash delete item entity with empty itemstring 2020-08-29 10:57:33 +02:00
Wuzzy
c106a62979 Use minetest.is_creative_enabled 2020-07-10 16:45:40 +02:00
Wuzzy
a2785041dd Remove mod startup debug messages 2020-04-11 02:56:46 +02:00
Wuzzy
71c9d20fff Use larger wield scale for tools 2020-04-08 04:07:16 +02:00
Wuzzy
c5e4ec5e27 Use ephemeral sounds 2020-04-07 00:55:45 +02:00
Wuzzy
f2b7392a30 Use "minetest" instead of "core" table 2020-01-06 13:02:30 +01:00
Wuzzy
2e9efe51e8 Tweak drop behavior of ocean plants 2019-12-18 03:10:49 +01:00
Wuzzy
7f70acc8a4 Make dropped items glow if light source node 2019-12-14 17:40:24 +01:00
Wuzzy
1cbee9de18 Fix item entity force-out bias to positive dir 2019-08-27 13:08:54 +02:00
Wuzzy
2203d0df53 Revert "Make item entities a bit more efficient"
This reverts commit ba97dfd02f because it broke item entities.
2019-04-01 10:59:36 +02:00
Oil_boi
ba97dfd02f Make item entities a bit more efficient 2019-03-26 10:23:52 +01:00
Wuzzy
6188d7b528 Fix other boolean settings default fails 2019-03-25 12:42:37 +01:00
Wuzzy
66c6b373a5 Make many entities non-pointable 2019-03-07 03:53:06 +01:00
Wuzzy
2f74aea6f5 Replace deprecated functions 2019-03-06 04:38:57 +01:00
Wuzzy
a711c7bdb7 handle_node_drops no longer destroys metadata 2019-03-01 17:30:21 +01:00
Wuzzy
0586c0ea18 Destroy items in fire 2019-02-01 08:31:17 +01:00
Wuzzy
e789801662 Replace getpos() with get_pos() 2019-02-01 06:33:07 +01:00
Wuzzy
a88f644001 Update deprecated settings syntax 2018-06-20 19:02:52 +02:00
Wuzzy
f022b747b0 Harden a number of minetest.after player checks 2018-06-03 16:44:37 +02:00
Wuzzy
d5729b8a32 Fix load-crash if _magnet_timer of item entity is uninizialized 2018-05-31 14:34:19 +02:00
Wuzzy
1fa141d972 Custom node drops now ignore Creative Mode 2018-03-05 13:35:14 +01:00
Bu-Gee
3ae8119498 Fix crash when pushing pumpkin by piston 2018-03-05 12:53:16 +01:00
Wuzzy
312652552e Delete un-initialized item entities on first step
Due to data corruption, item entities in a world may be loaded with
empty staticdata. These items are now deleted on their first on_step.
This commit also should fix all dropped hand bugs.
2017-12-01 18:50:15 +01:00
Wuzzy
559e3d68bc Simplify item merge code 2017-09-05 19:17:40 +02:00
Wuzzy
861174dc32 (Hopefully) fix hand rarely dropping as item 2017-09-05 17:25:15 +02:00
Wuzzy
f95bf371d2 Refine hand error logging 2017-09-02 19:00:04 +02:00
Wuzzy
ae74eb3b33 Print error message when player picked up hand
This is __builtin:item with itemstring == "" and should never happen
2017-09-02 18:57:37 +02:00
Wuzzy
e5a34367c9 Use new Minetest settings API syntax for most mods 2017-08-09 16:17:00 +02:00
Wuzzy
54fb702c8f Shears selfdrop dead bush, tall grass, fern, vine, leaves 2017-08-03 02:27:55 +02:00
Wuzzy
627d103b20 Don't drop when node dug by too weak tool 2017-08-03 01:01:44 +02:00
Wuzzy
7b16b74903 Fix bad mcl_ default settings 2017-06-13 17:08:45 +02:00