diff --git a/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua b/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua index 08f9a46ad..552cd5fad 100644 --- a/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua +++ b/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua @@ -40,6 +40,16 @@ local hoglin = { makes_footstep_sound = true, walk_velocity = 1, run_velocity = 2.8, + runaway_from = { + "mcl_crimson:warped_fungus", + "mcl_flowerpots:flower_pot_warped_fungus", + "mcl_beds:respawn_anchor", + "mcl_beds:respawn_anchor_charged_1", + "mcl_beds:respawn_anchor_charged_2", + "mcl_beds:respawn_anchor_charged_3", + "mcl_beds:respawn_anchor_charged_4", + }, + follow = {"mcl_crimson:crimson_fungus"}, drops = { {name = "mobs_mcitems:leather", chance = 1, @@ -87,9 +97,26 @@ local hoglin = { attack_animals = true, } -mcl_mobs.register_mob("mobs_mc:hoglin", hoglin) local zoglin = table.copy(hoglin) +hoglin.on_rightclick = function(self, clicker) + -- local item = clicker:get_wielded_item() + if self:feed_tame(clicker, 1, true, false) then return end + -- if mcl_mobs:protect(self, clicker) then return end +end +hoglin.on_breed = function(parent1, parent2) + local pos = parent1.object:get_pos() + local child = mcl_mobs.spawn_child(pos, parent1.name) + if child then + local ent_c = child:get_luaentity() + -- ent_c.tamed = true + ent_c.owner = parent1.owner + return false + end +end, + +mcl_mobs.register_mob("mobs_mc:hoglin", hoglin) + zoglin.description = S("Zoglin") zoglin.fire_resistant = 1 zoglin.textures = {"extra_mobs_zoglin.png"}