From 8d34ff2a9a222338624c3f61f563786e9ee000d3 Mon Sep 17 00:00:00 2001 From: Bakawun Date: Mon, 13 Nov 2023 15:13:52 +0000 Subject: [PATCH] Shulker: Make shulker peek periodically Adjust walk and animation settings so the shulker peeks out randomly. --- mods/ENTITIES/mobs_mc/shulker.lua | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/shulker.lua b/mods/ENTITIES/mobs_mc/shulker.lua index 62be949f3..b468be175 100644 --- a/mods/ENTITIES/mobs_mc/shulker.lua +++ b/mods/ENTITIES/mobs_mc/shulker.lua @@ -51,7 +51,7 @@ mcl_mobs.register_mob("mobs_mc:shulker", { -- TODO: sounds -- TODO: Make shulker dye-able visual_size = {x=3, y=3}, - walk_chance = 0, + walk_chance = 10, knock_back = false, jump = false, can_despawn = false, @@ -65,15 +65,17 @@ mcl_mobs.register_mob("mobs_mc:shulker", { looting_factor = 0.0625}, }, animation = { - stand_speed = 25, walk_speed = 0, run_speed = 50, punch_speed = 25, + stand_speed = 25, walk_speed = 25, run_speed = 50, punch_speed = 25, speed_normal = 25, speed_run = 50, stand_start = 0, stand_end = 25, - walk_start = 25, walk_end = 45, - run_start = 45, run_end = 85, + walk_start = 65, walk_end = 65, + run_start = 65, run_end = 85, punch_start = 80, punch_end = 100, }, view_range = 16, fear_height = 0, + walk_velocity = 0, + run_velocity = 0, noyaw = true, do_custom = function(self,dtime) local pos = self.object:get_pos() @@ -81,10 +83,6 @@ mcl_mobs.register_mob("mobs_mc:shulker", { self.object:set_yaw(0) mcl_mobs:yaw(self, 0, 0, dtime) end - if self.state == "walk" or self.state == "stand" then - self.state = "stand" - self:set_animation("stand") - end if self.state == "attack" then self:set_animation("punch") end