From 530c8ec0da3159892c201d0fb719096d9b47d51b Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Fri, 12 May 2023 00:02:30 +0100 Subject: [PATCH 1/5] Remove zombie pigmen and ensure zombie piglin named correctly. Add Piglin description names. --- mods/ENTITIES/mobs_mc/README.md | 2 +- mods/ENTITIES/mobs_mc/init.lua | 3 +- mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr | 2 +- mods/ENTITIES/mobs_mc/locale/mobs_mc.es.tr | 4 +- mods/ENTITIES/mobs_mc/locale/mobs_mc.fr.tr | 2 +- mods/ENTITIES/mobs_mc/locale/mobs_mc.ja.tr | 2 +- mods/ENTITIES/mobs_mc/locale/template.txt | 2 +- mods/ENTITIES/mobs_mc/piglin.lua | 199 ++++++++++++++---- mods/ENTITIES/mobs_mc/zombiepig.lua | 52 +---- .../locale/mcl_death_messages.es.tr | 4 +- .../locale/mcl_death_messages.ru.tr | 4 +- mods/ITEMS/mcl_beds/functions.lua | 2 +- 12 files changed, 181 insertions(+), 97 deletions(-) diff --git a/mods/ENTITIES/mobs_mc/README.md b/mods/ENTITIES/mobs_mc/README.md index 881f56619..bdc561295 100644 --- a/mods/ENTITIES/mobs_mc/README.md +++ b/mods/ENTITIES/mobs_mc/README.md @@ -39,7 +39,7 @@ This mod adds mobs which closely resemble the mobs from the game Minecraft, vers * Cave Spider * Enderman * Zombie Villager -* Zombie Pigman +* Zombie Piglin * Wither Skeleton * Magma Cube * Blaze diff --git a/mods/ENTITIES/mobs_mc/init.lua b/mods/ENTITIES/mobs_mc/init.lua index c2b3d8ed0..483efdcb4 100644 --- a/mods/ENTITIES/mobs_mc/init.lua +++ b/mods/ENTITIES/mobs_mc/init.lua @@ -139,7 +139,6 @@ dofile(path .. "/silverfish.lua") -- maikerumine Mesh and animation by toby109tt dofile(path .. "/skeleton+stray.lua") -- Mesh by Morn76 Animation by Pavel_S dofile(path .. "/skeleton_wither.lua") -- Mesh by Morn76 Animation by Pavel_S dofile(path .. "/zombie.lua") -- Mesh by Morn76 Animation by Pavel_S -dofile(path .. "/zombiepig.lua") -- Mesh by Morn76 Animation by Pavel_S dofile(path .. "/slime+magma_cube.lua") -- Wuzzy dofile(path .. "/spider.lua") -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture) dofile(path .. "/vex.lua") -- KrupnoPavel @@ -153,7 +152,7 @@ dofile(path .. "/dolphin.lua") dofile(path .. "/glow_squid.lua") -dofile(path .. "/piglin.lua") +dofile(path .. "/piglin.lua") -- "mobs_mc_zombie_pigman.b3d" Mesh by Morn76 Animation by Pavel_S dofile(path .. "/hoglin+zoglin.lua") dofile(path .. "/strider.lua") diff --git a/mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr b/mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr index 676415d69..84aade90e 100644 --- a/mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr +++ b/mods/ENTITIES/mobs_mc/locale/mobs_mc.de.tr @@ -48,7 +48,7 @@ Wither=Wither Wolf=Wolf Husk=Wüstenzombie Zombie=Zombie -Zombie Pigman=Schweinezombie +Zombie Piglin=Schweinezombie Farmer=Bauer Fisherman=Fischer Fletcher=Pfeilmacher diff --git a/mods/ENTITIES/mobs_mc/locale/mobs_mc.es.tr b/mods/ENTITIES/mobs_mc/locale/mobs_mc.es.tr index 0d4c94ef3..7f81f0280 100644 --- a/mods/ENTITIES/mobs_mc/locale/mobs_mc.es.tr +++ b/mods/ENTITIES/mobs_mc/locale/mobs_mc.es.tr @@ -54,8 +54,8 @@ Baby Husk=Bebé Zombi Momificado Baby Zombie=Bebé Zombi Husk=Zombi Momificado Zombie=Zombi -Baby Zombie Pigman=Bebé Hombrecerdo Zombi -Zombie Pigman=Hombrecerdo Zombi +Baby Zombie Piglin=Bebé Hombrecerdo Zombi +Zombie Piglin=Hombrecerdo Zombi Cartographer=Cartógrafo Armorer=Escudero Leatherworker=Peletero diff --git a/mods/ENTITIES/mobs_mc/locale/mobs_mc.fr.tr b/mods/ENTITIES/mobs_mc/locale/mobs_mc.fr.tr index c4440a727..81c93a33b 100644 --- a/mods/ENTITIES/mobs_mc/locale/mobs_mc.fr.tr +++ b/mods/ENTITIES/mobs_mc/locale/mobs_mc.fr.tr @@ -49,7 +49,7 @@ Wither=Wither Wolf=Loup Husk=Zombie Momifié Zombie=Zombie -Zombie Pigman=Zombie Cochon +Zombie Piglin=Zombie Cochon Farmer=Fermier Fisherman=Pêcheur Fletcher=Archer diff --git a/mods/ENTITIES/mobs_mc/locale/mobs_mc.ja.tr b/mods/ENTITIES/mobs_mc/locale/mobs_mc.ja.tr index ff6966131..63d73e222 100644 --- a/mods/ENTITIES/mobs_mc/locale/mobs_mc.ja.tr +++ b/mods/ENTITIES/mobs_mc/locale/mobs_mc.ja.tr @@ -49,7 +49,7 @@ Wither=ウィザー Wolf=オオカミ Husk=ハスク Zombie=ゾンビ -Zombie Pigman=ゾンビピッグマン +Zombie Piglin=ゾンビピッグマン Farmer=農民 Fisherman=漁師 Fletcher=矢師 diff --git a/mods/ENTITIES/mobs_mc/locale/template.txt b/mods/ENTITIES/mobs_mc/locale/template.txt index 9c1ee5cd7..4710c713f 100644 --- a/mods/ENTITIES/mobs_mc/locale/template.txt +++ b/mods/ENTITIES/mobs_mc/locale/template.txt @@ -49,7 +49,7 @@ Wither= Wolf= Husk= Zombie= -Zombie Pigman= +Zombie Piglin= Farmer= Fisherman= Fletcher= diff --git a/mods/ENTITIES/mobs_mc/piglin.lua b/mods/ENTITIES/mobs_mc/piglin.lua index f3e2a1f1b..e0247f548 100644 --- a/mods/ENTITIES/mobs_mc/piglin.lua +++ b/mods/ENTITIES/mobs_mc/piglin.lua @@ -38,6 +38,7 @@ end --################### piglin --################### local piglin = { + S("Piglin"), type = "monster", passive = false, spawn_class = "hostile", @@ -181,6 +182,7 @@ mcl_mobs.register_mob("mobs_mc:piglin", piglin) local sword_piglin = table.copy(piglin) +sword_piglin.description = S("Sword Piglin") sword_piglin.mesh = "extra_mobs_sword_piglin.b3d" sword_piglin.textures = {"extra_mobs_piglin.png", "default_tool_goldsword.png"} sword_piglin.on_spawn = function(self) @@ -209,43 +211,127 @@ sword_piglin.animation = { punch_start = 189, punch_end = 198, } + mcl_mobs.register_mob("mobs_mc:sword_piglin", sword_piglin) -local zombified_piglin = table.copy(piglin) -zombified_piglin.fire_resistant = 1 -zombified_piglin.do_custom = function() - return -end -zombified_piglin.on_spawn = function() - return -end -zombified_piglin.on_rightclick = function() - return -end -zombified_piglin.lava_damage = 0 -zombified_piglin.fire_damage = 0 -zombified_piglin.attack_animals = true -zombified_piglin.mesh = "extra_mobs_sword_piglin.b3d" -zombified_piglin.textures = {"extra_mobs_zombified_piglin.png", "default_tool_goldsword.png", "extra_mobs_trans.png"} -zombified_piglin.attack_type = "dogfight" -zombified_piglin.animation = { - stand_speed = 30, - walk_speed = 30, - punch_speed = 45, - run_speed = 30, - stand_start = 0, - stand_end = 79, - walk_start = 168, - walk_end = 187, - run_start = 440, - run_end = 459, - punch_start = 189, - punch_end = 198, + +-- Zombified Piglin -- + + +local zombified_piglin = { + description = S("Zombie Piglin"), + -- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked + type = "animal", + passive = false, + spawn_class = "passive", + hp_min = 20, + hp_max = 20, + xp_min = 6, + xp_max = 6, + armor = {undead = 90, fleshy = 90}, + attack_type = "dogfight", + group_attack = {"mobs_mc:zombified_piglin", "mobs_mc:baby_zombified_piglin"}, + damage = 9, + reach = 2, + head_swivel = "head.control", + bone_eye_height = 2.4, + head_eye_height = 1.4, + curiosity = 15, + collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3}, -- same + visual = "mesh", + mesh = "mobs_mc_zombie_pigman.b3d", + textures = { { + "blank.png", --baby + "default_tool_goldsword.png", --sword + "mobs_mc_zombie_pigman.png", --pigman + } }, + visual_size = {x=3, y=3}, + sounds = { + random = "mobs_mc_zombiepig_random", + war_cry = "mobs_mc_zombiepig_war_cry", + death = "mobs_mc_zombiepig_death", + damage = "mobs_mc_zombiepig_hurt", + distance = 16, + }, + jump = true, + makes_footstep_sound = true, + walk_velocity = .8, + run_velocity = 2.6, + pathfinding = 1, + drops = { + {name = "mcl_mobitems:rotten_flesh", + chance = 1, + min = 1, + max = 1, + looting = "common"}, + {name = "mcl_core:gold_nugget", + chance = 1, + min = 0, + max = 1, + looting = "common"}, + {name = "mcl_core:gold_ingot", + chance = 40, -- 2.5% + min = 1, + max = 1, + looting = "rare"}, + {name = "mcl_tools:sword_gold", + chance = 100 / 8.5, + min = 1, + max = 1, + looting = "rare"}, + }, + animation = { + stand_speed = 25, + walk_speed = 25, + run_speed = 50, + stand_start = 40, + stand_end = 80, + walk_start = 0, + walk_end = 40, + run_start = 0, + run_end = 40, + punch_start = 90, + punch_end = 130, + }, + lava_damage = 0, + fire_damage = 0, + fear_height = 4, + view_range = 16, + harmed_by_heal = true, + fire_damage_resistant = true, } + mcl_mobs.register_mob("mobs_mc:zombified_piglin", zombified_piglin) +local baby_zombified_piglin = table.copy(zombified_piglin) +baby_zombified_piglin.description = S("Baby Zombie Piglin") +baby_zombified_piglin.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25} +baby_zombified_piglin.xp_min = 13 +baby_zombified_piglin.xp_max = 13 +baby_zombified_piglin.textures = { + { + "mobs_mc_zombie_pigman.png", --baby + "default_tool_goldsword.png", --sword + "mobs_mc_zombie_pigman.png", --pigman + } +} +baby_zombified_piglin.walk_velocity = 1.2 +baby_zombified_piglin.run_velocity = 2.4 +baby_zombified_piglin.light_damage = 0 +baby_zombified_piglin.child = 1 + +mcl_mobs.register_mob("mobs_mc:baby_zombified_piglin", baby_zombified_piglin) + +-- Compatibility code. These were removed, and now are called zombie piglins. They don't spawn. +-- This is only to catch old cases. Maybe could be an alias? +mcl_mobs.register_mob("mobs_mc:pigman", zombified_piglin) +mcl_mobs.register_mob("mobs_mc:baby_pigman", baby_zombified_piglin) + + +-- Piglin Brute -- local piglin_brute = table.copy(piglin) +piglin_brute.description = S("Piglin Brute") piglin_brute.xp_min = 20 piglin_brute.xp_max = 20 piglin_brute.hp_min = 50 @@ -283,10 +369,11 @@ piglin_brute.animation = { } piglin_brute.can_despawn = false piglin_brute.group_attack = { "mobs_mc:piglin", "mobs_mc:piglin_brute" } + mcl_mobs.register_mob("mobs_mc:piglin_brute", piglin_brute) -mcl_mobs:non_spawn_specific("mobs_mc:piglin","overworld",0,7) + -- Regular spawning in the Nether mcl_mobs:spawn_specific( "mobs_mc:piglin", @@ -303,15 +390,15 @@ minetest.LIGHT_MAX+1, 3, mcl_vars.mg_lava_nether_max, mcl_vars.mg_nether_max) -mcl_mobs:non_spawn_specific("mobs_mc:sword_piglin","overworld",0,7) + mcl_mobs:spawn_specific( "mobs_mc:sword_piglin", "nether", "ground", { -"Nether", -"CrimsonForest" -}, + "Nether", + "CrimsonForest" + }, 0, minetest.LIGHT_MAX+1, 30, @@ -319,7 +406,45 @@ minetest.LIGHT_MAX+1, 3, mcl_vars.mg_lava_nether_max, mcl_vars.mg_nether_max) --- spawn eggs + +mcl_mobs:spawn_specific( + "mobs_mc:zombified_piglin", + "nether", + "ground", + { + "Nether", + "CrimsonForest", + }, + 0, + minetest.LIGHT_MAX+1, + 30, + 6000, + 3, + mcl_vars.mg_nether_min, + mcl_vars.mg_nether_max) + +-- Baby zombie is 20 times less likely than regular zombies +mcl_mobs:spawn_specific( + "mobs_mc:baby_zombified_piglin", + "nether", + "ground", + { + "Nether", + "CrimsonForest", + }, + 0, + minetest.LIGHT_MAX+1, + 30, + 100000, + 4, + mcl_vars.mg_nether_min, + mcl_vars.mg_nether_max) + +mcl_mobs:non_spawn_specific("mobs_mc:piglin","overworld",0,7) +mcl_mobs:non_spawn_specific("mobs_mc:sword_piglin","overworld",0,7) +mcl_mobs:non_spawn_specific("mobs_mc:piglin_brute","overworld",0,7) +mcl_mobs:non_spawn_specific("mobs_mc:zombified_piglin","overworld",0,minetest.LIGHT_MAX+1) + mcl_mobs.register_egg("mobs_mc:piglin", S("Piglin"), "#7b4a17","#d5c381", 0) mcl_mobs.register_egg("mobs_mc:piglin_brute", S("Piglin Brute"), "#562b0c","#ddc89d", 0) -mcl_mobs:non_spawn_specific("mobs_mc:piglin_brute","overworld",0,7) +mcl_mobs.register_egg("mobs_mc:zombified_piglin", S("Zombie Piglin"), "#ea9393", "#4c7129", 0) \ No newline at end of file diff --git a/mods/ENTITIES/mobs_mc/zombiepig.lua b/mods/ENTITIES/mobs_mc/zombiepig.lua index f753b5f85..a2104027b 100644 --- a/mods/ENTITIES/mobs_mc/zombiepig.lua +++ b/mods/ENTITIES/mobs_mc/zombiepig.lua @@ -5,13 +5,14 @@ local S = minetest.get_translator("mobs_mc") ---################### ---################### ZOMBIE PIGMAN ---################### +-- TODO Alias needs to be created +-- TODO DELETE THIS FILE. No longer needed. +-- Spawning removed +-- Mob copied to piglin.lua local pigman = { - description = S("Zombie Pigman"), + description = S("Zombie Piglin"), -- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked type = "animal", passive = false, @@ -93,13 +94,12 @@ local pigman = { fire_damage_resistant = true, } -mcl_mobs.register_mob("mobs_mc:pigman", pigman) -- Baby pigman. -- A smaller and more dangerous variant of the pigman local baby_pigman = table.copy(pigman) -baby_pigman.description = S("Baby Zombie Pigman") +baby_pigman.description = S("Baby Zombie Piglin") baby_pigman.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25} baby_pigman.xp_min = 13 baby_pigman.xp_max = 13 @@ -113,44 +113,4 @@ baby_pigman.run_velocity = 2.4 baby_pigman.light_damage = 0 baby_pigman.child = 1 -mcl_mobs.register_mob("mobs_mc:baby_pigman", baby_pigman) --- Regular spawning in the Nether -mcl_mobs:spawn_specific( -"mobs_mc:pigman", -"nether", -"ground", -{ -"Nether", -"CrimsonForest", -}, -0, -minetest.LIGHT_MAX+1, -30, -6000, -3, -mcl_vars.mg_nether_min, -mcl_vars.mg_nether_max) --- Baby zombie is 20 times less likely than regular zombies -mcl_mobs:spawn_specific( -"mobs_mc:baby_pigman", -"nether", -"ground", -{ -"Nether", -"CrimsonForest", -}, -0, -minetest.LIGHT_MAX+1, -30, -100000, -4, -mcl_vars.mg_nether_min, -mcl_vars.mg_nether_max) - --- Spawning in Nether portals in the Overworld ---mobs:spawn_specific("mobs_mc:pigman", {"mcl_portals:portal"}, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 500, 4, mcl_vars.mg_overworld_min, mcl_vars.mg_overworld_max) - --- spawn eggs -mcl_mobs.register_egg("mobs_mc:pigman", S("Zombie Pigman"), "#ea9393", "#4c7129", 0) -mcl_mobs:non_spawn_specific("mobs_mc:pigman","overworld",0,minetest.LIGHT_MAX+1) diff --git a/mods/HUD/mcl_death_messages/locale/mcl_death_messages.es.tr b/mods/HUD/mcl_death_messages/locale/mcl_death_messages.es.tr index bbdbb5a9e..8c56ebe9e 100644 --- a/mods/HUD/mcl_death_messages/locale/mcl_death_messages.es.tr +++ b/mods/HUD/mcl_death_messages/locale/mcl_death_messages.es.tr @@ -56,5 +56,5 @@ A ghast scared @1 to death.=Se ha asustado @1 hasta morir. @1 was killed by a zombie villager.=@1 fue asesinado por un aldeano zombie. @1 was killed by a husk.=@1 fue asesinado por un husk. @1 was killed by a baby husk.=@1 fue asesinado por un bebé husk. -@1 was killed by a zombie pigman.=@1 fue asesinado por un cerdo zombie. -@1 was killed by a baby zombie pigman.=@1 fue asesinado por un bebé cerdo zombie. \ No newline at end of file +@1 was killed by a zombie piglin.=@1 fue asesinado por un cerdo zombie. +@1 was killed by a baby zombie piglin.=@1 fue asesinado por un bebé cerdo zombie. \ No newline at end of file diff --git a/mods/HUD/mcl_death_messages/locale/mcl_death_messages.ru.tr b/mods/HUD/mcl_death_messages/locale/mcl_death_messages.ru.tr index 295f19986..816546e5e 100644 --- a/mods/HUD/mcl_death_messages/locale/mcl_death_messages.ru.tr +++ b/mods/HUD/mcl_death_messages/locale/mcl_death_messages.ru.tr @@ -57,5 +57,5 @@ A ghast scared @1 to death.=Гаст напугал @1 до смерти. @1 was killed by a zombie villager.=@1 был(а) убит(а) зомби-жителем. @1 was killed by a husk.=@1 был(а) убит(а) кадавром. @1 was killed by a baby husk.=@1 был(а) убит(а) машылом-кадавром. -@1 was killed by a zombie pigman.=@1 был(а) убит(а) зомби-свиночеловеком. -@1 was killed by a baby zombie pigman.=@1 был(а) убит(а) малышом-зомби-свиночеловеком. +@1 was killed by a zombie piglin.=@1 был(а) убит(а) зомби-свиночеловеком. +@1 was killed by a baby zombie piglin.=@1 был(а) убит(а) малышом-зомби-свиночеловеком. diff --git a/mods/ITEMS/mcl_beds/functions.lua b/mods/ITEMS/mcl_beds/functions.lua index 59eea5f33..07ad1cba5 100644 --- a/mods/ITEMS/mcl_beds/functions.lua +++ b/mods/ITEMS/mcl_beds/functions.lua @@ -118,7 +118,7 @@ local function lay_down(player, pos, bed_pos, state, skip) -- No sleeping if monsters nearby. -- The exceptions above apply. - -- Zombie pigmen only prevent sleep while they are hostle. + -- Zombie piglin only prevent sleep while they are hostle. for _, obj in pairs(minetest.get_objects_inside_radius(bed_pos, 8)) do if obj and not obj:is_player() then local ent = obj:get_luaentity() From 92c0809dbe9a7ce1fd485081d922e6e44e76a4a1 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Fri, 12 May 2023 00:07:33 +0100 Subject: [PATCH 2/5] Remove zombie pigman file as no longer needed --- mods/ENTITIES/mobs_mc/zombiepig.lua | 116 ---------------------------- 1 file changed, 116 deletions(-) delete mode 100644 mods/ENTITIES/mobs_mc/zombiepig.lua diff --git a/mods/ENTITIES/mobs_mc/zombiepig.lua b/mods/ENTITIES/mobs_mc/zombiepig.lua deleted file mode 100644 index a2104027b..000000000 --- a/mods/ENTITIES/mobs_mc/zombiepig.lua +++ /dev/null @@ -1,116 +0,0 @@ ---MCmobs v0.4 ---maikerumine ---made for MC like Survival game ---License for code WTFPL and otherwise stated in readmes - -local S = minetest.get_translator("mobs_mc") - - --- TODO Alias needs to be created --- TODO DELETE THIS FILE. No longer needed. --- Spawning removed --- Mob copied to piglin.lua - -local pigman = { - description = S("Zombie Piglin"), - -- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked - type = "animal", - passive = false, - spawn_class = "passive", - hp_min = 20, - hp_max = 20, - xp_min = 6, - xp_max = 6, - armor = {undead = 90, fleshy = 90}, - attack_type = "dogfight", - group_attack = { "mobs_mc:pigman", "mobs_mc:baby_pigman" }, - damage = 9, - reach = 2, - head_swivel = "head.control", - bone_eye_height = 2.4, - head_eye_height = 1.4, - curiosity = 15, - collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3}, - visual = "mesh", - mesh = "mobs_mc_zombie_pigman.b3d", - textures = { { - "blank.png", --baby - "default_tool_goldsword.png", --sword - "mobs_mc_zombie_pigman.png", --pigman - } }, - visual_size = {x=3, y=3}, - sounds = { - random = "mobs_mc_zombiepig_random", - war_cry = "mobs_mc_zombiepig_war_cry", - death = "mobs_mc_zombiepig_death", - damage = "mobs_mc_zombiepig_hurt", - distance = 16, - }, - jump = true, - makes_footstep_sound = true, - walk_velocity = .8, - run_velocity = 2.6, - pathfinding = 1, - drops = { - {name = "mcl_mobitems:rotten_flesh", - chance = 1, - min = 1, - max = 1, - looting = "common"}, - {name = "mcl_core:gold_nugget", - chance = 1, - min = 0, - max = 1, - looting = "common"}, - {name = "mcl_core:gold_ingot", - chance = 40, -- 2.5% - min = 1, - max = 1, - looting = "rare"}, - {name = "mcl_tools:sword_gold", - chance = 100 / 8.5, - min = 1, - max = 1, - looting = "rare"}, - }, - animation = { - stand_speed = 25, - walk_speed = 25, - run_speed = 50, - stand_start = 40, - stand_end = 80, - walk_start = 0, - walk_end = 40, - run_start = 0, - run_end = 40, - punch_start = 90, - punch_end = 130, - }, - lava_damage = 0, - fire_damage = 0, - fear_height = 4, - view_range = 16, - harmed_by_heal = true, - fire_damage_resistant = true, -} - - --- Baby pigman. --- A smaller and more dangerous variant of the pigman - -local baby_pigman = table.copy(pigman) -baby_pigman.description = S("Baby Zombie Piglin") -baby_pigman.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25} -baby_pigman.xp_min = 13 -baby_pigman.xp_max = 13 -baby_pigman.textures = { { - "mobs_mc_zombie_pigman.png", --baby - "default_tool_goldsword.png", --sword - "mobs_mc_zombie_pigman.png", --pigman -} } -baby_pigman.walk_velocity = 1.2 -baby_pigman.run_velocity = 2.4 -baby_pigman.light_damage = 0 -baby_pigman.child = 1 - - From 2d89440972dbd76ee9f6c84dc38aa0427d6d167f Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Fri, 12 May 2023 00:39:29 +0100 Subject: [PATCH 3/5] Fix Piglin naming and add localisation entries --- mods/ENTITIES/mobs_mc/hoglin+zoglin.lua | 3 +++ mods/ENTITIES/mobs_mc/locale/template.txt | 5 +++++ mods/ENTITIES/mobs_mc/piglin.lua | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua b/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua index 2643467b6..8f8590933 100644 --- a/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua +++ b/mods/ENTITIES/mobs_mc/hoglin+zoglin.lua @@ -10,6 +10,7 @@ local S = minetest.get_translator("mobs_mc") --################### local hoglin = { + description = S("Hoglin"), type = "monster", passive = false, spawn_class = "hostile", @@ -88,6 +89,7 @@ local hoglin = { mcl_mobs.register_mob("mobs_mc:hoglin", hoglin) local zoglin = table.copy(hoglin) +zoglin.description = S("Zoglin") zoglin.fire_resistant = 1 zoglin.textures = {"extra_mobs_zoglin.png"} zoglin.do_custom = function() @@ -101,6 +103,7 @@ mcl_mobs.register_mob("mobs_mc:zoglin", zoglin) -- Baby hoglin. local baby_hoglin = table.copy(hoglin) +baby_hoglin.description = S("Baby hoglin") baby_hoglin.collisionbox = {-.3, -0.01, -.3, .3, 0.94, .3} baby_hoglin.xp_min = 20 baby_hoglin.xp_max = 20 diff --git a/mods/ENTITIES/mobs_mc/locale/template.txt b/mods/ENTITIES/mobs_mc/locale/template.txt index 4710c713f..589a1a3c4 100644 --- a/mods/ENTITIES/mobs_mc/locale/template.txt +++ b/mods/ENTITIES/mobs_mc/locale/template.txt @@ -49,7 +49,12 @@ Wither= Wolf= Husk= Zombie= +Piglin= +Baby Piglin= Zombie Piglin= +Baby Zombie Piglin= +Sword Piglin= +Piglin Brute= Farmer= Fisherman= Fletcher= diff --git a/mods/ENTITIES/mobs_mc/piglin.lua b/mods/ENTITIES/mobs_mc/piglin.lua index e0247f548..2cfe4b26c 100644 --- a/mods/ENTITIES/mobs_mc/piglin.lua +++ b/mods/ENTITIES/mobs_mc/piglin.lua @@ -38,7 +38,7 @@ end --################### piglin --################### local piglin = { - S("Piglin"), + description = S("Piglin"), type = "monster", passive = false, spawn_class = "hostile", From 92a8f23d22d144045d513d51a780659478e7e18e Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Fri, 12 May 2023 00:44:53 +0100 Subject: [PATCH 4/5] Fix creeper name --- mods/ENTITIES/mobs_mc/creeper.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mods/ENTITIES/mobs_mc/creeper.lua b/mods/ENTITIES/mobs_mc/creeper.lua index fa0717e47..f751b1240 100644 --- a/mods/ENTITIES/mobs_mc/creeper.lua +++ b/mods/ENTITIES/mobs_mc/creeper.lua @@ -10,6 +10,7 @@ local S = minetest.get_translator("mobs_mc") mcl_mobs.register_mob("mobs_mc:creeper", { + description = S("Creeper"), type = "monster", spawn_class = "hostile", spawn_in_group = 1, From 53637bbc19780718306c5a12f78c2131aa0fd6e9 Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Fri, 12 May 2023 01:49:09 +0100 Subject: [PATCH 5/5] Group attack configured so that sword piglins and piglins will also respond to aggression on other piglins. --- mods/ENTITIES/mobs_mc/piglin.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mods/ENTITIES/mobs_mc/piglin.lua b/mods/ENTITIES/mobs_mc/piglin.lua index 2cfe4b26c..a4ac2c83f 100644 --- a/mods/ENTITIES/mobs_mc/piglin.lua +++ b/mods/ENTITIES/mobs_mc/piglin.lua @@ -42,6 +42,7 @@ local piglin = { type = "monster", passive = false, spawn_class = "hostile", + group_attack = {"mobs_mc:piglin", "mobs_mc:sword_piglin", "mobs_mc:piglin_brute"}, hp_min = 16, hp_max = 16, xp_min = 9, @@ -368,7 +369,6 @@ piglin_brute.animation = { punch_end = 198, } piglin_brute.can_despawn = false -piglin_brute.group_attack = { "mobs_mc:piglin", "mobs_mc:piglin_brute" } mcl_mobs.register_mob("mobs_mc:piglin_brute", piglin_brute)