diff --git a/api/api.lua b/api/api.lua index f190e49..bf324b4 100644 --- a/api/api.lua +++ b/api/api.lua @@ -497,7 +497,7 @@ function animalia.go_to_pos_lite(self, tpos, speed_factor) if mobkit.is_queue_empty_low(self) then local _, pos2 = mob_core.get_next_waypoint(self, tpos) if pos2 then - mob_core.lq_dumbwalk(self, tpos, speed_factor) + mob_core.lq_dumbwalk(self, pos2, speed_factor) return true else local box = hitbox(self) @@ -592,10 +592,7 @@ local function is_under_solid(pos) end local function vec_center(vec) - for _, v in pairs(vec) do - v = floor(v + 0.5) - end - return vec + return {x = floor(vec.x + 0.5), y = floor(vec.y + 0.5), z = floor(vec.z + 0.5)} end local function do_step(self, moveresult) @@ -607,10 +604,11 @@ local function do_step(self, moveresult) local step_pos = data.node_pos local halfway = vector.add(pos, vector.multiply(vector.direction(pos, step_pos), 0.5)) if step_pos.y + 0.5 > pos.y - and is_movable({x = halfway.x, y = data.node_pos.y + 1, z = halfway.z}, width, self.height) - and not is_under_solid(data.node_pos) - and walkable({x = pos.x, y = pos.y - 1, z = pos.z}) - and not vector.equals(vec_center(pos), vec_center(data.node_pos)) then + and (walkable({x = pos.x, y = pos.y - 1, z = pos.z}) + or self.isinliquid) + and not vector.equals(vec_center(pos), step_pos) + and not is_under_solid(step_pos) + and is_movable({x = halfway.x, y = step_pos.y + 1, z = halfway.z}, width, self.height) then local vel_yaw = self.object:get_yaw() local dir_yaw = minetest.dir_to_yaw(vector.direction(pos, data.node_pos)) if diff(vel_yaw, dir_yaw) < width * 2 then @@ -1101,13 +1099,14 @@ function animalia.hq_sporadic_flee(self, prty) if self.animation["run"] then anim = "run" end - mob_core.lq_dumbwalk(self, random_goal, 1, anim) + animalia.go_to_pos_lite(self, random_goal, 1) else animalia.lq_idle(self, 0.1) end end timer = timer - self.dtime if timer <= 0 then + animalia.lq_idle(self, 0.1, "stand") return true end end diff --git a/mobs/chicken.lua b/mobs/chicken.lua index 0f0f8f6..45685ed 100644 --- a/mobs/chicken.lua +++ b/mobs/chicken.lua @@ -165,14 +165,14 @@ minetest.register_craftitem("animalia:poultry_raw", { description = "Raw Poultry", inventory_image = "animalia_poultry_raw.png", on_use = minetest.item_eat(1), - groups = {flammable = 2, meat = 1}, + groups = {flammable = 2, meat = 1, food_meat = 1}, }) minetest.register_craftitem("animalia:poultry_cooked", { description = "Cooked Poultry", inventory_image = "animalia_poultry_cooked.png", on_use = minetest.item_eat(6), - groups = {flammable = 2, meat = 1}, + groups = {flammable = 2, meat = 1, food_meat = 1}, }) minetest.register_craft({ @@ -274,14 +274,14 @@ minetest.register_craftitem("animalia:chicken_egg", { description = "Chicken Egg", inventory_image = "animalia_egg.png", on_use = mobs_shoot_egg, - groups = {flammable = 2}, + groups = {food_egg = 1, flammable = 2}, }) minetest.register_craftitem("animalia:chicken_egg_fried", { description = "Fried Chicken Egg", inventory_image = "animalia_egg_fried.png", on_use = minetest.item_eat(4), - groups = {flammable = 2}, + groups = {food_egg = 1, flammable = 2}, }) minetest.register_craft({ diff --git a/mobs/cow.lua b/mobs/cow.lua index c0e2cee..4b0dc0b 100644 --- a/mobs/cow.lua +++ b/mobs/cow.lua @@ -227,14 +227,14 @@ minetest.register_craftitem("animalia:beef_raw", { description = "Raw Beef", inventory_image = "animalia_beef_raw.png", on_use = minetest.item_eat(1), - groups = {flammable = 2, meat = 1}, + groups = {flammable = 2, meat = 1, food_meat = 1}, }) minetest.register_craftitem("animalia:beef_cooked", { description = "Steak", inventory_image = "animalia_beef_cooked.png", on_use = minetest.item_eat(8), - groups = {flammable = 2, meat = 1}, + groups = {flammable = 2, meat = 1, food_meat = 1}, }) minetest.register_craft({ diff --git a/mobs/horse.lua b/mobs/horse.lua index 9eb0b7a..be1f5f1 100644 --- a/mobs/horse.lua +++ b/mobs/horse.lua @@ -67,7 +67,7 @@ local function horse_logic(self) local player = mobkit.get_nearby_player(self) local pos = self.object:get_pos() - mob_core.random_sound(self, 14) + mob_core.random_sound(self, 24) mob_core.growth(self) if self.breaking then diff --git a/mobs/pig.lua b/mobs/pig.lua index f522897..69e4b62 100644 --- a/mobs/pig.lua +++ b/mobs/pig.lua @@ -145,14 +145,14 @@ minetest.register_craftitem("animalia:porkchop_raw", { description = "Raw Porkchop", inventory_image = "animalia_porkchop_raw.png", on_use = minetest.item_eat(1), - groups = {flammable = 2, meat = 1}, + groups = {flammable = 2, meat = 1, food_meat = 1}, }) minetest.register_craftitem("animalia:porkchop_cooked", { description = "Cooked Porkchop", inventory_image = "animalia_porkchop_cooked.png", on_use = minetest.item_eat(7), - groups = {flammable = 2, meat = 1}, + groups = {flammable = 2, meat = 1, food_meat = 1}, }) minetest.register_craft({ diff --git a/mobs/sheep.lua b/mobs/sheep.lua index 17b3fd1..7352029 100644 --- a/mobs/sheep.lua +++ b/mobs/sheep.lua @@ -265,14 +265,14 @@ minetest.register_craftitem("animalia:mutton_raw", { description = "Raw Mutton", inventory_image = "animalia_mutton_raw.png", on_use = minetest.item_eat(1), - groups = {flammable = 2, meat = 1}, + groups = {flammable = 2, meat = 1, food_meat = 1}, }) minetest.register_craftitem("animalia:mutton_cooked", { description = "Cooked Mutton", inventory_image = "animalia_mutton_cooked.png", on_use = minetest.item_eat(6), - groups = {flammable = 2, meat = 1}, + groups = {flammable = 2, meat = 1, food_meat = 1}, }) minetest.register_craft({ diff --git a/textures/items/animalia_milk_bucket.png b/textures/items/animalia_milk_bucket.png index 29d8c5e..4dcd3fd 100644 Binary files a/textures/items/animalia_milk_bucket.png and b/textures/items/animalia_milk_bucket.png differ diff --git a/textures/items/animalia_porkchop_cooked.png b/textures/items/animalia_porkchop_cooked.png index 02663e3..8b542bb 100644 Binary files a/textures/items/animalia_porkchop_cooked.png and b/textures/items/animalia_porkchop_cooked.png differ