mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
Add min_y and max_y checks for Active Block Modifiers (ABM) (#11333)
This check can be used by ABM to reduce CPU usage.
This commit is contained in:
parent
1805775f3d
commit
b10091be9b
6 changed files with 41 additions and 3 deletions
|
@ -67,6 +67,10 @@ public:
|
|||
virtual u32 getTriggerChance() = 0;
|
||||
// Whether to modify chance to simulate time lost by an unnattended block
|
||||
virtual bool getSimpleCatchUp() = 0;
|
||||
// get min Y for apply abm
|
||||
virtual s16 getMinY() = 0;
|
||||
// get max Y for apply abm
|
||||
virtual s16 getMaxY() = 0;
|
||||
// This is called usually at interval for 1/chance of the nodes
|
||||
virtual void trigger(ServerEnvironment *env, v3s16 p, MapNode n){};
|
||||
virtual void trigger(ServerEnvironment *env, v3s16 p, MapNode n,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue