1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2025-10-25 22:05:25 +02:00

use moveresult for arrows, add drop_item

This commit is contained in:
tenplus1
2025-08-24 12:19:21 +01:00
parent aebd9d03db
commit 4f49aa0e47
2 changed files with 40 additions and 60 deletions

View File

@@ -592,6 +592,7 @@ This function registers a arrow for mobs with the attack type shoot.
'drop' if set to true any arrows hitting a node will drop as item,
if number given then chance (1/num) of item dropping will
be used. arrow "mymob:myarrow" will use item of same name.
'drop_item' name of custom item to drop instead of arrow.
'hit_player' a function that is called when the arrow hits a player;
this function should hurt the player, the parameters are
(self, player)
@@ -617,6 +618,9 @@ This function registers a arrow for mobs with the attack type shoot.
'lifetime' contains float value for how many seconds arrow exists in
world before being removed (default is 4.5 seconds).
Note: When an arrow hits a solid item moveresult is copied into the arrow
self.moveresult for use inside the hit functions.
Spawn Eggs
----------