BlockMen
e113e3d1dd
Add support for different drowning damage and allow drowning in other nodetypes
2022-05-21 16:10:58 +02:00
hdastwb
05ee748813
added (optional) support for 6d facedir in dir_to_facedir and added facedir_to_dir
2022-05-21 16:10:54 +02:00
PilzAdam
3cb4de50b5
Remove unnecessary debug output in node_dig()
2022-05-21 16:10:36 +02:00
Lord James
e4f0c69a53
Infinite tools in creative mode
2022-05-21 16:10:36 +02:00
sapier
85ae766dcb
Move scriptapi to separate folder (by sapier)
...
On the lua side, notably minetest.env:<function>(<args>) should now
be replaced by minetest.<function>(<args>).
The old way is and will stay supported for a long time.
Also:
Update and clean up lua_api.txt (by celeron55)
Move EnvRef to lua and remove add_rat and add_firefly (by kahrl)
Add separate src/util/CMakeLists.txt, other minor fixes (by kahrl)
2022-05-21 16:10:34 +02:00
PilzAdam
b3bbf4a068
Return an ItemStack in minetest.item_place() if nodes' on rightclick doesnt return it
2022-05-21 16:10:29 +02:00
0gb.us
1c5c5dde8e
Fix node replacement in not-quite-loaded chunks
...
When first entering an area, sometimes placing nodes replaces other nodes that are not buildable_to. This seems to be caused by the fact that nodes in unloaded map blocks are treated as ignore, a node that is buildable_to. This fixes that, by using get_node_or_nil() instead of the previously-used get_node(), then checking to see if the nodes were actually loaded before replacing.
2022-05-21 16:10:29 +02:00
PilzAdam
21830e51a8
Drop nodes as items when dugged and no room in inventory and dont remove dropped items when no room in inventory
2022-05-21 16:10:26 +02:00
PilzAdam
5b6085743e
Dont drop tools on rightclick
2022-05-21 16:10:26 +02:00
PilzAdam
b611857ef5
Fix minetest.item_place_node() and minetest.item_drop() to always return an ItemStack
2022-05-21 16:10:25 +02:00
RealBadAngel
eb7274214f
Fix to on_rightclick not able to change wielded_item
2022-05-21 16:10:24 +02:00
PilzAdam
049b8638c1
Dont call on_rightclick() if sneak is pressed
2022-05-21 16:10:24 +02:00
PilzAdam
42e67c79c1
Add on_rightclick(pos, node, clicker) callback for nodes
2022-05-21 16:10:23 +02:00
PilzAdam
f264cf9833
Add ability to change the itemstack in placenode callbacks
2022-05-21 16:10:23 +02:00
Ilya Zhuravlev
f834e7cbad
Fix minetest.get_node_drops(). It should always return list of item names, not ItemStack(s).
2022-05-21 16:10:21 +02:00
PilzAdam
ee0d38b5a6
Only check attachment for nodes with group attached_node
2022-05-21 16:10:21 +02:00
PilzAdam
fd6ec68aab
Add the group attached_node Nodes in this group will be dropped as items if the node under them or the node in the wallmounted direction is not walkable.
2022-05-21 16:10:21 +02:00
Perttu Ahola
38506bfbe6
Add overridable function for handling dropped items from nodes
2022-05-21 16:07:51 +02:00
Perttu Ahola
fb96b0f99e
Fix github issue #213 : Dropping unknown items crashes the game
...
The items will now just disappear when dropped.
2022-05-21 16:07:50 +02:00
Matthew I
3b4219b79f
Allow digging of unknown nodes
...
This allows the removal of nodes with unknown types.
get_item_callback() (C++) would fail if a node has an unknown type. Now it
will try using the callback from minetest.nodedef_default in this case.
Also, minetest.node_dig() (Lua) was altered to always allow digging when
the node definition is empty (i.e. unknown node).
2022-05-21 16:07:50 +02:00
Perttu Ahola
e6ec4258db
Remove special handling of creative mode
2022-05-21 16:07:47 +02:00
Perttu Ahola
a87451a0fe
Detached inventory callbacks and reworked node metadata callbacks
2022-05-21 16:07:47 +02:00
Perttu Ahola
47a9ab6fb0
builtin/item.lua: callbacks with copies of positions and nodes rather than recycle the same ones, which callbacks can modify
2022-05-21 16:07:46 +02:00
Perttu Ahola
eb9b1ffc15
Add oldnode parameter to minetest.register_on_placenode callback
2022-05-21 16:07:46 +02:00
Perttu Ahola
ea97707ef2
Fix building on top of (pointable && buildable_to) nodes
2022-05-21 16:07:45 +02:00
Perttu Ahola
db3d37aaa8
Actually fix facedir-rotated nodes placed using minetest.env:place_node()
2022-05-21 16:07:42 +02:00
darkrose
af6f80ba63
Handle nil placer as it might occur when using minetest.env:place_node. (Uberi)
2022-05-21 16:07:41 +02:00
Perttu Ahola
a8b475d195
Remove tiles and special_tiles from node definition prototype because otherwise the old names can't be used
2022-05-21 16:07:40 +02:00
Perttu Ahola
7f37a08eba
Update field names to non-deprecated ones in node definition prototype
2022-05-21 16:07:40 +02:00
Perttu Ahola
15213d8768
Node placement client-side prediction
2022-05-21 16:07:39 +02:00
Perttu Ahola
3519373773
place_node, dig_node and punch_node; an in-game tester tool; remove old code
2022-05-21 16:07:38 +02:00
darkrose
28d4194f24
Add can_dig callback
2022-05-21 16:07:38 +02:00
Perttu Ahola
157b198e0f
Implement locked chest; add after_place_node and after_dig_node node callbacks
2022-05-21 16:07:37 +02:00
Perttu Ahola
c8727f8c5a
on_metadata_inventory_{move,offer,take}
2022-05-21 16:07:36 +02:00
Perttu Ahola
1656cbdaa2
Random node metadata things
2022-05-21 16:07:36 +02:00
Perttu Ahola
1bd4c6b208
Attempt to begin to implement chests and furnace in Lua (with problems)
2022-05-21 16:07:35 +02:00
Perttu Ahola
596cd078dd
Allow redefining minetest.item_place and the like
2022-05-21 16:07:32 +02:00
Perttu Ahola
3b5d2c97d5
Implement dropped items as LuaEntities; leave the old ones as is for compatibility
2022-05-21 16:07:29 +02:00
Perttu Ahola
397bd5fc83
Split builtin.lua to multiple files
2022-05-21 16:07:28 +02:00