1
0
Fork 0

Shulker: align armor value with mc and set it to 0 when opened

mobile_bow_workaround
bakawun 2023-11-16 18:27:54 +01:00 committed by the-real-herowl
parent 789c9a9a6d
commit 686646b86d
1 changed files with 7 additions and 2 deletions

View File

@ -43,7 +43,7 @@ mcl_mobs.register_mob("mobs_mc:shulker", {
hp_max = 30, hp_max = 30,
xp_min = 5, xp_min = 5,
xp_max = 5, xp_max = 5,
armor = 150, armor = 20,
collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.99, 0.5}, collisionbox = {-0.5, -0.01, -0.5, 0.5, 0.99, 0.5},
visual = "mesh", visual = "mesh",
mesh = "mobs_mc_shulker.b3d", mesh = "mobs_mc_shulker.b3d",
@ -77,7 +77,7 @@ mcl_mobs.register_mob("mobs_mc:shulker", {
view_range = 16, view_range = 16,
fear_height = 0, fear_height = 0,
walk_velocity = 0, walk_velocity = 0,
run_velocity = 0, run_velocity = 0,
noyaw = true, noyaw = true,
do_custom = function(self,dtime) do_custom = function(self,dtime)
local pos = self.object:get_pos() local pos = self.object:get_pos()
@ -88,6 +88,11 @@ mcl_mobs.register_mob("mobs_mc:shulker", {
end end
if self.state == "attack" then if self.state == "attack" then
self:set_animation("run") self:set_animation("run")
self:armor = 0
if self.state == "stand" then
self.armor = 20
if self.state == "walk" or self.state == "run" then
self.armor = 0
end end
self.path.way = false self.path.way = false
self.look_at_players = false self.look_at_players = false