1
0
Fork 0

Remove zombie pigmen and ensure zombie piglin named correctly. Add Piglin description names.

This commit is contained in:
ancientmarinerdev 2023-05-12 00:02:30 +01:00
parent 47e26bbfe6
commit 530c8ec0da
12 changed files with 181 additions and 97 deletions

View File

@ -39,7 +39,7 @@ This mod adds mobs which closely resemble the mobs from the game Minecraft, vers
* Cave Spider * Cave Spider
* Enderman * Enderman
* Zombie Villager * Zombie Villager
* Zombie Pigman * Zombie Piglin
* Wither Skeleton * Wither Skeleton
* Magma Cube * Magma Cube
* Blaze * Blaze

View File

@ -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+stray.lua") -- Mesh by Morn76 Animation by Pavel_S
dofile(path .. "/skeleton_wither.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 .. "/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 .. "/slime+magma_cube.lua") -- Wuzzy
dofile(path .. "/spider.lua") -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture) dofile(path .. "/spider.lua") -- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture)
dofile(path .. "/vex.lua") -- KrupnoPavel dofile(path .. "/vex.lua") -- KrupnoPavel
@ -153,7 +152,7 @@ dofile(path .. "/dolphin.lua")
dofile(path .. "/glow_squid.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 .. "/hoglin+zoglin.lua")
dofile(path .. "/strider.lua") dofile(path .. "/strider.lua")

View File

@ -48,7 +48,7 @@ Wither=Wither
Wolf=Wolf Wolf=Wolf
Husk=Wüstenzombie Husk=Wüstenzombie
Zombie=Zombie Zombie=Zombie
Zombie Pigman=Schweinezombie Zombie Piglin=Schweinezombie
Farmer=Bauer Farmer=Bauer
Fisherman=Fischer Fisherman=Fischer
Fletcher=Pfeilmacher Fletcher=Pfeilmacher

View File

@ -54,8 +54,8 @@ Baby Husk=Bebé Zombi Momificado
Baby Zombie=Bebé Zombi Baby Zombie=Bebé Zombi
Husk=Zombi Momificado Husk=Zombi Momificado
Zombie=Zombi Zombie=Zombi
Baby Zombie Pigman=Bebé Hombrecerdo Zombi Baby Zombie Piglin=Bebé Hombrecerdo Zombi
Zombie Pigman=Hombrecerdo Zombi Zombie Piglin=Hombrecerdo Zombi
Cartographer=Cartógrafo Cartographer=Cartógrafo
Armorer=Escudero Armorer=Escudero
Leatherworker=Peletero Leatherworker=Peletero

View File

@ -49,7 +49,7 @@ Wither=Wither
Wolf=Loup Wolf=Loup
Husk=Zombie Momifié Husk=Zombie Momifié
Zombie=Zombie Zombie=Zombie
Zombie Pigman=Zombie Cochon Zombie Piglin=Zombie Cochon
Farmer=Fermier Farmer=Fermier
Fisherman=Pêcheur Fisherman=Pêcheur
Fletcher=Archer Fletcher=Archer

View File

@ -49,7 +49,7 @@ Wither=ウィザー
Wolf=オオカミ Wolf=オオカミ
Husk=ハスク Husk=ハスク
Zombie=ゾンビ Zombie=ゾンビ
Zombie Pigman=ゾンビピッグマン Zombie Piglin=ゾンビピッグマン
Farmer=農民 Farmer=農民
Fisherman=漁師 Fisherman=漁師
Fletcher=矢師 Fletcher=矢師

View File

@ -49,7 +49,7 @@ Wither=
Wolf= Wolf=
Husk= Husk=
Zombie= Zombie=
Zombie Pigman= Zombie Piglin=
Farmer= Farmer=
Fisherman= Fisherman=
Fletcher= Fletcher=

View File

@ -38,6 +38,7 @@ end
--################### piglin --################### piglin
--################### --###################
local piglin = { local piglin = {
S("Piglin"),
type = "monster", type = "monster",
passive = false, passive = false,
spawn_class = "hostile", spawn_class = "hostile",
@ -181,6 +182,7 @@ mcl_mobs.register_mob("mobs_mc:piglin", piglin)
local sword_piglin = table.copy(piglin) local sword_piglin = table.copy(piglin)
sword_piglin.description = S("Sword Piglin")
sword_piglin.mesh = "extra_mobs_sword_piglin.b3d" sword_piglin.mesh = "extra_mobs_sword_piglin.b3d"
sword_piglin.textures = {"extra_mobs_piglin.png", "default_tool_goldsword.png"} sword_piglin.textures = {"extra_mobs_piglin.png", "default_tool_goldsword.png"}
sword_piglin.on_spawn = function(self) sword_piglin.on_spawn = function(self)
@ -209,43 +211,127 @@ sword_piglin.animation = {
punch_start = 189, punch_start = 189,
punch_end = 198, punch_end = 198,
} }
mcl_mobs.register_mob("mobs_mc:sword_piglin", sword_piglin) mcl_mobs.register_mob("mobs_mc:sword_piglin", sword_piglin)
local zombified_piglin = table.copy(piglin)
zombified_piglin.fire_resistant = 1 -- Zombified Piglin --
zombified_piglin.do_custom = function()
return
end local zombified_piglin = {
zombified_piglin.on_spawn = function() description = S("Zombie Piglin"),
return -- type="animal", passive=false: This combination is needed for a neutral mob which becomes hostile, if attacked
end type = "animal",
zombified_piglin.on_rightclick = function() passive = false,
return spawn_class = "passive",
end hp_min = 20,
zombified_piglin.lava_damage = 0 hp_max = 20,
zombified_piglin.fire_damage = 0 xp_min = 6,
zombified_piglin.attack_animals = true xp_max = 6,
zombified_piglin.mesh = "extra_mobs_sword_piglin.b3d" armor = {undead = 90, fleshy = 90},
zombified_piglin.textures = {"extra_mobs_zombified_piglin.png", "default_tool_goldsword.png", "extra_mobs_trans.png"} attack_type = "dogfight",
zombified_piglin.attack_type = "dogfight" group_attack = {"mobs_mc:zombified_piglin", "mobs_mc:baby_zombified_piglin"},
zombified_piglin.animation = { damage = 9,
stand_speed = 30, reach = 2,
walk_speed = 30, head_swivel = "head.control",
punch_speed = 45, bone_eye_height = 2.4,
run_speed = 30, head_eye_height = 1.4,
stand_start = 0, curiosity = 15,
stand_end = 79, collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3}, -- same
walk_start = 168, visual = "mesh",
walk_end = 187, mesh = "mobs_mc_zombie_pigman.b3d",
run_start = 440, textures = { {
run_end = 459, "blank.png", --baby
punch_start = 189, "default_tool_goldsword.png", --sword
punch_end = 198, "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) 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) local piglin_brute = table.copy(piglin)
piglin_brute.description = S("Piglin Brute")
piglin_brute.xp_min = 20 piglin_brute.xp_min = 20
piglin_brute.xp_max = 20 piglin_brute.xp_max = 20
piglin_brute.hp_min = 50 piglin_brute.hp_min = 50
@ -283,10 +369,11 @@ piglin_brute.animation = {
} }
piglin_brute.can_despawn = false piglin_brute.can_despawn = false
piglin_brute.group_attack = { "mobs_mc:piglin", "mobs_mc:piglin_brute" } piglin_brute.group_attack = { "mobs_mc:piglin", "mobs_mc:piglin_brute" }
mcl_mobs.register_mob("mobs_mc:piglin_brute", 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 -- Regular spawning in the Nether
mcl_mobs:spawn_specific( mcl_mobs:spawn_specific(
"mobs_mc:piglin", "mobs_mc:piglin",
@ -303,15 +390,15 @@ minetest.LIGHT_MAX+1,
3, 3,
mcl_vars.mg_lava_nether_max, mcl_vars.mg_lava_nether_max,
mcl_vars.mg_nether_max) mcl_vars.mg_nether_max)
mcl_mobs:non_spawn_specific("mobs_mc:sword_piglin","overworld",0,7)
mcl_mobs:spawn_specific( mcl_mobs:spawn_specific(
"mobs_mc:sword_piglin", "mobs_mc:sword_piglin",
"nether", "nether",
"ground", "ground",
{ {
"Nether", "Nether",
"CrimsonForest" "CrimsonForest"
}, },
0, 0,
minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1,
30, 30,
@ -319,7 +406,45 @@ minetest.LIGHT_MAX+1,
3, 3,
mcl_vars.mg_lava_nether_max, mcl_vars.mg_lava_nether_max,
mcl_vars.mg_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", S("Piglin"), "#7b4a17","#d5c381", 0)
mcl_mobs.register_egg("mobs_mc:piglin_brute", S("Piglin Brute"), "#562b0c","#ddc89d", 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)

View File

@ -5,13 +5,14 @@
local S = minetest.get_translator("mobs_mc") 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 = { 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: This combination is needed for a neutral mob which becomes hostile, if attacked
type = "animal", type = "animal",
passive = false, passive = false,
@ -93,13 +94,12 @@ local pigman = {
fire_damage_resistant = true, fire_damage_resistant = true,
} }
mcl_mobs.register_mob("mobs_mc:pigman", pigman)
-- Baby pigman. -- Baby pigman.
-- A smaller and more dangerous variant of the pigman -- A smaller and more dangerous variant of the pigman
local baby_pigman = table.copy(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.collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.94, 0.25}
baby_pigman.xp_min = 13 baby_pigman.xp_min = 13
baby_pigman.xp_max = 13 baby_pigman.xp_max = 13
@ -113,44 +113,4 @@ baby_pigman.run_velocity = 2.4
baby_pigman.light_damage = 0 baby_pigman.light_damage = 0
baby_pigman.child = 1 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)

View File

@ -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 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 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 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 zombie piglin.=@1 fue asesinado por un cerdo zombie.
@1 was killed by a baby zombie pigman.=@1 fue asesinado por un bebé cerdo zombie. @1 was killed by a baby zombie piglin.=@1 fue asesinado por un bebé cerdo zombie.

View File

@ -57,5 +57,5 @@ A ghast scared @1 to death.=Гаст напугал @1 до смерти.
@1 was killed by a zombie villager.=@1 был(а) убит(а) зомби-жителем. @1 was killed by a zombie villager.=@1 был(а) убит(а) зомби-жителем.
@1 was killed by a husk.=@1 был(а) убит(а) кадавром. @1 was killed by a husk.=@1 был(а) убит(а) кадавром.
@1 was killed by a baby husk.=@1 был(а) убит(а) машылом-кадавром. @1 was killed by a baby husk.=@1 был(а) убит(а) машылом-кадавром.
@1 was killed by a zombie pigman.=@1 был(а) убит(а) зомби-свиночеловеком. @1 was killed by a zombie piglin.=@1 был(а) убит(а) зомби-свиночеловеком.
@1 was killed by a baby zombie pigman.=@1 был(а) убит(а) малышом-зомби-свиночеловеком. @1 was killed by a baby zombie piglin.=@1 был(а) убит(а) малышом-зомби-свиночеловеком.

View File

@ -118,7 +118,7 @@ local function lay_down(player, pos, bed_pos, state, skip)
-- No sleeping if monsters nearby. -- No sleeping if monsters nearby.
-- The exceptions above apply. -- 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 for _, obj in pairs(minetest.get_objects_inside_radius(bed_pos, 8)) do
if obj and not obj:is_player() then if obj and not obj:is_player() then
local ent = obj:get_luaentity() local ent = obj:get_luaentity()