From 6033dbf52a06b96abe65cf87a9187003cc55a271 Mon Sep 17 00:00:00 2001 From: Jordan Irwin Date: Mon, 19 Jul 2021 21:29:56 -0700 Subject: [PATCH] Fix tnt drop --- entity.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/entity.lua b/entity.lua index 6db70b3..c80995d 100644 --- a/entity.lua +++ b/entity.lua @@ -92,6 +92,11 @@ for _, node_name in ipairs(spawn_nodes) do end end +local item_drops = {} +if core.registered_items["tnt:gunpowder"] then + table.insert(item_drops, {"tnt:gunpowder", {min=1, max=2}, chance=0.66}) +end + local def = { name = "sneeker:sneeker", nametag = "Sneeker", @@ -213,11 +218,6 @@ local function explode(self, pos) core.sound_play("sneeker_explode", {object=self.object, gain=sneeker.boom_gain, max_hear_distance=2*64}) end -local item_drops = {} -if core.registered_items["tnt:gunpowder"] then - table.insert(item_drops, {"tnt:gunpowder", {min=1, max=2}, chance=0.66}) -end - def.on_step = function(self, staticdata, dtime_s) --[[ -- update lifetime timer