Commit graph

138 commits

Author SHA1 Message Date
MysticTempest
b4c5805afe Make items flowing in water use acceleration for movement. 2022-06-03 05:46:27 -05:00
MysticTempest
5dde594c19 Item movement fixes:
This PR fixes items at flowing_water edges not falling down holes.
As well as fixing items not sliding on slippery nodes like ice.

And, allows for movement starting at the source block of a
flowing water node. While ensuring regular water_source blocks
do not bug out.
2022-06-02 09:44:04 +00:00
kabou
baf8e0b79c Update item entity for lodestone compass.
* Added another special case to the item entity registration for
  lodestone compasses, without this a dropped lodestone compass would
  turn into a regular compass on being dropped.
* Update the compass and lodestone compass frame number to be the
  stereotype frame.
2022-05-12 21:08:52 +02:00
GNU Hacker
f430aec0cd
item pickup sound gain more MC like 2022-03-13 14:58:01 +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
Elias Fleckenstein
a4e73886d5
Rework XP API 2021-11-03 19:36:57 +01:00
Nils Dagsson Moskopp
256de2bc36 Log warning for non-serializable item entity fix 2021-09-15 18:10:40 +02:00
sfan5
693a5317ef 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-09-15 18:10:32 +02:00
NO11
dc8436fdf9 Destroy objects near cactus faster (make it possible to throw items at a cactus) 2021-09-06 14:34:25 +00:00
AFCMS
cd33d406b2 fix many codestyle issues (functions, strings, modpaths) 2021-05-29 16:12:33 +02:00
AFCMS
3bedc81068 fix some code style issues in lightning 2021-05-28 00:07:06 +02:00
AFCMS
9e074af07f unify code style [1] 2021-05-25 12:52:25 +02:00
AFCMS
fddaacdeae [mcl_item_entity] fix warnings 2021-05-25 00:43:42 +02:00
Elias Fleckenstein
75d9450002 Make compasses point upwards when dropped as an item 2021-05-04 10:24:08 +02:00
Elias Fleckenstein
3b3d67a99c Make clocks work when dropped 2021-05-04 09:16:42 +02:00
jordan4ibanez
90fd65ac66 Fix locationless playing 2021-04-03 21:09:43 -04:00
jordan4ibanez
1b511936f5 Fix local name memory leak 2021-04-03 21:05:31 -04:00
jordan4ibanez
a807ee6372 Adjust the volume even more to perfectly match the gameplay 2021-04-03 20:55:46 -04:00
jordan4ibanez
0641f09915 Adjust volume of item collection sound 2021-04-03 20:53:34 -04:00
jordan4ibanez
c572db92aa Add sound buffer and different item collection sound 2021-04-03 20:39:08 -04:00
jordan4ibanez
844db8aa7b Revert to previous style of interpolated move_to with tweaks 2021-04-02 22:02:19 -04:00
jordan4ibanez
0840ad98a2 Adjust the item collection magnet even more 2021-04-02 21:57:38 -04:00
jordan4ibanez
1cbd3a998d Use manual move_to to account for move_to interpolation issues 2021-04-02 21:50:47 -04:00
jordan4ibanez
61e812e40a Add in manual interpolation into the item magnet 2021-04-02 21:40:04 -04:00
jordan4ibanez
18d7be4a4f More fixes to item collection on laggy servers 2021-04-03 00:42:20 -04:00
jordan4ibanez
1e3676c391 Remove debug info from item magnet 2021-04-02 05:38:53 +00:00
jordan4ibanez
2f272b3dff Fix item drop on laggy servers 2021-04-01 23:48:00 -04:00
AFCMS
c7389dc0a4 add basic API to mcl_item_entity 2021-03-28 08:13:24 +02:00
Elias Åström
1873080046 Remove unnecessary code in mcl_item_entity 2021-03-20 14:21:50 +01:00
Elias Åström
bfe51316ee Merge branch 'mcl_autogroups' 2021-03-18 13:43:58 +01:00
Elias Åström
cff0130506 Rename _mcl_autogroup_groupcaps to _mcl_diggroups 2021-03-18 11:35:40 +01:00
Elias Åström
e77473e800 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-03-18 11:35:40 +01:00
Elias Åström
fb6f5eae7a 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-03-18 11:32:18 +01:00
AFCMS
6645c4cb30 Really 2021-03-16 17:43:32 +01:00
AFCMS
5d17a6b699 fix SO MANY pairs/ipairs 2021-03-16 17:35:46 +01:00
Elias Fleckenstein
d57db0444f Use mod.conf in all mods, part 1 2021-03-04 15:22:14 +01: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