Custom Falling Nodes

Download (40 KB)
For Luanti 5.0 and above

How do I install this?

Description

  • Added new node group {falling_node_hurt} to hurt players or mobs below falling items.

  • Falling nodes with a light source fall with glow active.

  • Huge areas of falling nodes are done in blocks to stop lag/crashes.

  • Added 'falling_step(self, pos, dtime)' custom on_step for falling items.

    • 'self' contains falling object data.
    • 'self.node' is the node currently falling.
    • 'self.meta' is the metadata contained within the falling node.
    • 'pos' holds position of falling item.
    • 'dtime' used for timers.

    return false to skip further checks by falling_item

Reviews

Review

Do you recommend this mod?

  • Adds needed functionality

    Certain falling nodes should cause damage to the player. This mod adds that important functionality. Though it only adds for certain nodes. I ask that it be allowed to be used for adding fall damage to any node other modders would like to add.
    Edit: Based on TenPlus1's comment adding the following code to your mod will allow you to add fall damage to any node: local function add_fall_damage(node, damage)

    local function add_fall_damage(node, damage)
    	if minetest.registered_nodes[node] then
    		local group = minetest.registered_nodes[node].groups
    		group.falling_node_damage = damage
    		minetest.override_item(node, {groups = group})
    	else
    		print (node .. " not found to add falling_node_damage to")
    	end
    end
    
    add_fall_damage("my_mod:my_node", 3)
    
    2 comments

Releases

2026-05-21

Download

Luanti 5.0+

2026-05-21 09:30 UTC

2026-05-21 🔗

Re-based on latest Luanti falling.lua

2023-06-10

Download

2023-06-10 17:11 UTC

2023-06-10 🔗

No release notes

All releases

Information

Provides

falling_item

Dependencies

Required
No required dependencies
Optional
default

Information

Type
Mod
Technical Name
falling_item
Languages
English
License
MIT for code,
CC0-1.0 for media.
Maintenance State
Actively Developed
Added
2019-03-02 09:20 UTC
Maintainers
TenPlus1

Used By