From 00a7f5a55073623e3ddecba3a3c8cbcdf2f44b32 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 7f605fb..7a81c92 100644 --- a/entity.lua +++ b/entity.lua @@ -95,6 +95,11 @@ if #spawn_nodes == 0 then sneeker.log("warning", "no spawning nodes set, cannot spawn") 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", @@ -247,11 +252,6 @@ local function h_collides(pos, collision_info, touching_ground) 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, dtime, moveresult) --[[ -- update lifetime timer