Compare commits
4 commits
ec30bad0a9
...
1fee360e28
Author | SHA1 | Date | |
---|---|---|---|
1fee360e28 | |||
4d079cb724 | |||
a14e5759fd | |||
22392c6e4a |
1 changed files with 8 additions and 4 deletions
|
@ -9,7 +9,7 @@ local S = minetest.get_translator("mobs_mc")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mcl_mobs:register_mob("mobs_mc:creeper", {
|
mcl_mobs.register_mob("mobs_mc:creeper", {
|
||||||
type = "monster",
|
type = "monster",
|
||||||
spawn_class = "hostile",
|
spawn_class = "hostile",
|
||||||
spawn_in_group = 1,
|
spawn_in_group = 1,
|
||||||
|
@ -81,7 +81,7 @@ mcl_mobs:register_mob("mobs_mc:creeper", {
|
||||||
if self._forced_explosion_countdown_timer ~= nil then
|
if self._forced_explosion_countdown_timer ~= nil then
|
||||||
self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime
|
self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime
|
||||||
if self._forced_explosion_countdown_timer <= 0 then
|
if self._forced_explosion_countdown_timer <= 0 then
|
||||||
mcl_mobs:boom(self, mcl_util.get_object_center(self.object), self.explosion_strength)
|
self:boom(mcl_util.get_object_center(self.object), self.explosion_strength)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -133,7 +133,7 @@ mcl_mobs:register_mob("mobs_mc:creeper", {
|
||||||
view_range = 16,
|
view_range = 16,
|
||||||
})
|
})
|
||||||
|
|
||||||
mcl_mobs:register_mob("mobs_mc:creeper_charged", {
|
mcl_mobs.register_mob("mobs_mc:creeper_charged", {
|
||||||
description = S("Creeper"),
|
description = S("Creeper"),
|
||||||
type = "monster",
|
type = "monster",
|
||||||
spawn_class = "hostile",
|
spawn_class = "hostile",
|
||||||
|
@ -203,7 +203,7 @@ mcl_mobs:register_mob("mobs_mc:creeper_charged", {
|
||||||
if self._forced_explosion_countdown_timer ~= nil then
|
if self._forced_explosion_countdown_timer ~= nil then
|
||||||
self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime
|
self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime
|
||||||
if self._forced_explosion_countdown_timer <= 0 then
|
if self._forced_explosion_countdown_timer <= 0 then
|
||||||
mcl_mobs:boom(self, mcl_util.get_object_center(self.object), self.explosion_strength)
|
self:boom(mcl_util.get_object_center(self.object), self.explosion_strength)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -219,6 +219,10 @@ mcl_mobs:register_mob("mobs_mc:creeper_charged", {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
on_lightning_strike = function(self, pos, pos2, objects)
|
||||||
|
mcl_util.replace_mob(self.object, "mobs_mc:creeper_charged")
|
||||||
|
return true
|
||||||
|
end,
|
||||||
maxdrops = 2,
|
maxdrops = 2,
|
||||||
drops = {
|
drops = {
|
||||||
{name = "mcl_mobitems:gunpowder",
|
{name = "mcl_mobitems:gunpowder",
|
||||||
|
|
Loading…
Reference in a new issue