From 85d04bffc9c492186b313c510135eab0329651c9 Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Fri, 26 Apr 2024 21:07:55 +0800 Subject: [PATCH 1/2] Fix Failed to generate "[sheet:4x4:3,4" --- api/api.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.lua b/api/api.lua index daa4235..2e8bd5a 100644 --- a/api/api.lua +++ b/api/api.lua @@ -347,7 +347,7 @@ function animalia.add_food_particle(self, item_name) if def.tiles then image = def.tiles[1].name or def.tiles[1] end - if image then + if image and image ~= "" then local crop = "^[sheet:4x4:" .. random(4) .. "," .. random(4) minetest.add_particlespawner({ pos = head_pos, From 70e011ef8bdabbd4c6d59bb4292e514a7336e251 Mon Sep 17 00:00:00 2001 From: 1F616EMO Date: Wed, 28 Aug 2024 07:43:58 +0800 Subject: [PATCH 2/2] Really fix the problem --- api/api.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/api.lua b/api/api.lua index 2e8bd5a..7f90705 100644 --- a/api/api.lua +++ b/api/api.lua @@ -347,8 +347,8 @@ function animalia.add_food_particle(self, item_name) if def.tiles then image = def.tiles[1].name or def.tiles[1] end - if image and image ~= "" then - local crop = "^[sheet:4x4:" .. random(4) .. "," .. random(4) + if image then + local crop = "^[sheet:4x4:" .. random(0, 3) .. "," .. random(0, 3) minetest.add_particlespawner({ pos = head_pos, time = 0.5,