Commit Graph

152 Commits

Author SHA1 Message Date
Sumyjkl
86d6445f42 fix crash when items in unloaded chunk 2022-07-28 11:10:56 +10:00
Sumyjkl
70b7655e46 various code style improvements 2022-07-26 20:20:13 +10:00
Sumyjkl
5fc662664f cactus will act as if dug instead of its own hardcoded breaking function 2022-07-24 15:59:00 +10:00
Sumyjkl
6278fa21d3 Removed an entire block of code that was duplicate and didn't do anything 2022-07-23 16:41:41 +10:00
Sumyjkl
fb28177ff1 items will stay put when loaded, items dug by the game will get more initial random velocity, game will no longer apply random velocity twice (?) 2022-07-23 16:10:52 +10:00
Sumyjkl
58d80e5e9c netherite items (except armour) will float in lava and not burn 2022-07-22 23:06:35 +10:00
Sumyjkl
eeace260fe don't disable physics if you've already disabled it 2022-07-22 22:45:22 +10:00
Sumyjkl
65fc5b6f28 droppers and dispensers actually shoot items out, items will merge with eachother even when floating 2022-07-22 22:38:36 +10:00
Sumyjkl
dc6fbeeafd items will go into sleep mode even if there's a block above as long as it's not a liquid 2022-07-22 16:55:42 +10:00
Sumyjkl
70aca4c3ca fix infinite bobbing 2022-07-22 16:19:50 +10:00
Sumyjkl
9daac0aff1 make items float in water sources 2022-07-22 15:34:58 +10:00
MysticTempest
677110e39f Disable the despawn timer catchup for items that were unloaded. 2022-07-03 04:28:43 -05:00
PrairieAstronomer
40a421ddd0 Hidden in the Depths Advancement 2022-07-01 12:41:01 -06:00
PrairieAstronomer
687bc04560 Who is Cutting Onions? Advancement 2022-07-01 12:39:10 -06:00
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