Bucket: Allow buckets to trigger the on_punch of entities and nodes
The purpose of this is to allow mods to be able to interact (e.g. fill up) an empty bucket when it is used to punch a node that's not a liquid source or when punching a custom entity (e.g. milking a cow).
This commit is contained in:
parent
56d6eaed85
commit
5b2a896180
2 changed files with 15 additions and 3 deletions
|
@ -19,7 +19,6 @@ Bucket API
|
|||
|
||||
The bucket API allows registering new types of buckets for non-default liquids.
|
||||
|
||||
|
||||
bucket.register_liquid(
|
||||
"default:lava_source", -- name of the source node
|
||||
"default:lava_flowing", -- name of the flowing node
|
||||
|
@ -32,6 +31,9 @@ The bucket API allows registering new types of buckets for non-default liquids.
|
|||
-- Needed to avoid creating holes in sloping rivers.
|
||||
)
|
||||
|
||||
The filled bucket item is returned to the player that uses an empty bucket pointing to the given liquid source.
|
||||
When punching with an empty bucket pointing to an entity or a non-liquid node, the on_punch of the entity or node will be triggered.
|
||||
|
||||
Beds API
|
||||
--------
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue