1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00
Commit graph

447 commits

Author SHA1 Message Date
sfan5
8eceabd812
Make core.get_node_raw a public API (#16265)
Co-authored-by: Erich Schubert <erich.schubert@tu-dortmund.de>
2025-06-25 15:05:22 +02:00
sfan5
893a74f9d7 Support HEAD and PATCH methods in http api 2025-05-01 10:46:24 +02:00
Jürgen Rühle
2f464843cb
Make it more convenient to customize node drops (#15872)
* Provide tool and digger to get_node_drops

This gives games/mods the ability to modify node drops depending on item
and/or player metadata without overriding node_dig or other workarounds.

* Copy wielded item to prevent modification in get_node_drops

* Also pass node pos to get_node_drops

Allowing properties of the node and its surroundings to affect node drops.

* Copy pos to prevent modification in get_node_drops

Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>

* Don't pass empty item stack to get_node_drops if wielded is nil

---------

Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2025-04-20 20:48:48 +02:00
Erich Schubert
78293404c7
Rename perlin noise to value noise (#15858) 2025-04-10 14:39:40 +02:00
sfan5
9d81c02f27 Add/remove/change some log messages for clarity 2025-04-10 14:39:21 +02:00
Lars Müller
7689f1f0fd
Improve some warning messages (#15990) 2025-04-08 22:24:00 +02:00
Lars Müller
2569b50252
Deprecate some legacy item registration logic (#15950) 2025-04-01 19:12:00 +02:00
sfan5
a94c9a73ba Move all registration logic into core.register_item for consistency 2025-03-29 10:21:15 +01:00
sfan5
915446417d Improve warning message for registration table reuse 2025-03-29 10:21:15 +01:00
sfan5
a9a3b05cc3 Prevent registration of certain new content after load time 2025-03-19 22:05:01 +01:00
sfan5
ca047c3e58 Warn on core.override_item() after server startup 2025-03-19 22:05:01 +01:00
sfan5
2540667f04 Warn if metatable passed to itemdef registration function 2025-03-19 22:05:01 +01:00
SmallJoker
23d0fb2d3f
builtin: Return 'obj' from 'core.item_drop' (#15880)
This also includes a minor bugfix where 'itemstack' was cleared
even if the object placement failed.
2025-03-11 20:00:35 +01:00
sfan5
afb15978d9
Clean up and compress some pre-join packets (#15881) 2025-03-11 20:00:07 +01:00
Alex
dadd097f32
Echo DMs sent with /msg (#15887) 2025-03-11 09:59:51 +01:00
sfan5
7d3f0628c4 Use visual = "node" for builtin falling node entity
This greatly simplifies the code at the expense of some
falling nodes not showing up on older clients.
2025-02-22 16:19:04 +01:00
Andrii Nemchenko
e51221d247
Implement metadata-aware version of InvRef:remove_item() (#15771) 2025-02-22 16:18:48 +01:00
ROllerozxa
dd0070a6b8
Expose client version information in non-debug builds (#15708)
Co-authored-by: SmallJoker <SmallJoker@users.noreply.github.com>
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
Co-authored-by: sfan5 <sfan5@live.de>
2025-02-09 18:09:07 +01:00
SFENCE
af3f696423 Code style fixes. 2025-01-21 16:29:12 +01:00
sfan5
c346612468
Fix falling nodes digging nodes they aren't supposed to (#15638) 2025-01-06 19:42:11 +01:00
AFCMS
e545e96d2b
Make string to v3f parsing consistent, replace core.setting_get_pos() by core.settings:get_pos() (#15438)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Lars Müller <34514239+appgurueu@users.noreply.github.com>
2024-12-04 18:19:46 +01:00
Lars Müller
138052adfc
Add particle blend mode "clip" (#15444)
This lets modders avoid alpha blending rendering bugs as well as potential (future) performance issues.
The appropriate blend modes are also used for node dig particles.

---------

Co-authored-by: sfan5 <sfan5@live.de>
2024-11-19 13:30:17 +01:00
Erich Schubert
4c44942a39
Add weights to biomes (#15142) 2024-11-12 10:53:17 +01:00
Wuzzy
ad4b13a0e9
Luanti rename: builtin (#15324) 2024-10-28 19:40:18 +01:00
Erich Schubert
6431ef7324
Trivial improvement to get_item_group (#15260)
One hash table lookup is enough, and this is even easier for the JIT to inline, optimize, etc.
2024-10-14 22:09:01 +02:00
sfence
d08d34d803
ABM without_neighbors (#14116) 2024-09-26 17:32:55 +02:00
grorp
526a2f7b8c
Dehardcode the death formspec (#15155)
Co-authored-by: Paul Ouellette <oue.paul18@gmail.com>
2024-09-24 22:37:44 +02:00
sfan5
811adf5d42 Bulk LBMs (#14954) 2024-09-20 15:05:26 +02:00
1F616EMO~nya
38b4505ad7
Allow requesting reconnect when mods kick player (#14971) 2024-09-12 23:42:46 +02:00
grorp
322a9c2f74
Restore proportional minimap scaling (#15022) 2024-08-31 18:11:56 +02:00
cx384
52376fd87a Add hotbar Lua HUD element and replace hardcoded hotbar 2024-08-31 16:04:14 +02:00
Zemtzov7
b2f6a65bc9
Sort clients in minetest.get_server_status and privs in minetest.privs_to_string (#15023) 2024-08-21 20:25:41 +02:00
Lars Müller
8ed55b3aff
Help modders deal with object invalidation (#14769)
* Skip invalid objects in raycasts
* Add `ObjectRef:is_valid` method
* Add object inside radius / area iterators which skip invalid objects
* Update docs to clarify object invalidation and how to deal with it

---------

Co-authored-by: sfan5 <sfan5@live.de>
2024-07-01 20:50:38 +02:00
Lars Mueller
5009259473 Add unit test and feature flag for override_item 2024-05-21 15:46:33 +02:00
Lars Müller
408faa11a1
Allow removal of item definition fields (#14675) 2024-05-20 20:37:40 +02:00
sfan5
c4703a7f19 Fix wrong collision axis in Lua moveresult
introduced by c24a04d246
2024-05-17 14:32:57 +02:00
grorp
af8cb63292
Add object's own position for each collision to moveresult (#14608) 2024-05-05 13:28:59 +02:00
sfan5
c24a04d246 Optimize pushing collision data for entity on_step
Since this is fixed overhead for every entity, this is important to optimize.
This optimizes one very common case.

before:
  push_collision_move_result [us] _____________ 64512x   3.562

after:
  push_collision_move_result [us] _____________ 72636x   0.831
2024-05-03 16:28:29 +02:00
sfence
72cb4e9bea
Allow nil puncher in object:punch (#14319) 2024-04-28 17:55:04 +02:00
OgelGames
a7bde8e523
Hide internal detached inventory functions (#14594) 2024-04-28 00:07:45 +02:00
LoneWolfHT
c63c05b141
Fix crash when player leaves before breath removal job 2024-04-24 22:32:07 +02:00
cx384
8a5e49c856
Refactor builtin HUD (#14346) 2024-04-10 11:43:15 +02:00
1F616EMO~nya
2d8e4df7bc
Allow optional actor ObjectRef value in node interaction calls (#14505) 2024-04-05 13:00:50 +02:00
cx384
234b01a8c2
Item meta pointing range (#14347) 2024-03-17 15:55:38 +01:00
SmallJoker
61a5733692 Unittest: Add inventory callback tests 2024-03-16 20:14:05 +01:00
cx384
60810c2d37
Add L-system trees as decorations (#14355) 2024-03-12 20:10:28 +01:00
y5nw
fc80f65a6d
Try to preserve metatable when exchanging data with the async env (#14369)
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: Lars Mueller <appgurulars@gmx.de>
2024-03-06 18:04:49 +01:00
DS
d4d4712361
Implement get_node with a get_node_raw (#14384)
Add /bench_bulk_get_node
Considerably improves the execution speed of core.get_node
2024-03-03 15:53:23 +01:00
Gregor Parzefall
84dd812da4 Fix hud_elem_type warning triggered by builtin minimap
Fixes a deprecation warning introduced by adaa4cc2f3.
2024-02-19 19:04:43 +01:00
sfan5
3cac17d23e
Lua on each mapgen thread (#13092) 2024-02-13 22:47:30 +01:00