]> git.lizzy.rs Git - Crafter.git/commitdiff
Make players set mobs on fire
authoroilboi <47129783+oilboi@users.noreply.github.com>
Tue, 9 Jun 2020 15:16:16 +0000 (11:16 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Tue, 9 Jun 2020 15:16:16 +0000 (11:16 -0400)
mods/mob/api/interaction.lua

index dfe54ece2eaf29bf77772db51096d9f09e3d5c0c..4a27b1bed85bd5f845501762355e1da0d3c8ac44 100644 (file)
@@ -96,6 +96,11 @@ mobs.create_interaction_functions = function(def,mob_register)
                                                object:add_player_velocity(vel2)
                                                if self.on_fire then
                                                        start_fire(object)
+                                               else
+                                                       local meta = object:get_meta()
+                                                       if meta:get_int("on_fire") > 0 then
+                                                               start_fire(self.object)
+                                                       end
                                                end
                                        else
                                                object:add_velocity(vel2)