Merge pull request 'rebase_mobs_mc' (#6) from rebase_mobs_mc into main
Reviewed-on: Minetest/MineClone2_Override#6 Reviewed-by: NilsG <nilsg@noreply.git.fusselkater.org>
This commit is contained in:
commit
1fee360e28
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",
|
||||
spawn_class = "hostile",
|
||||
spawn_in_group = 1,
|
||||
|
@ -81,7 +81,7 @@ mcl_mobs:register_mob("mobs_mc:creeper", {
|
|||
if self._forced_explosion_countdown_timer ~= nil then
|
||||
self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime
|
||||
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,
|
||||
|
@ -133,7 +133,7 @@ mcl_mobs:register_mob("mobs_mc:creeper", {
|
|||
view_range = 16,
|
||||
})
|
||||
|
||||
mcl_mobs:register_mob("mobs_mc:creeper_charged", {
|
||||
mcl_mobs.register_mob("mobs_mc:creeper_charged", {
|
||||
description = S("Creeper"),
|
||||
type = "monster",
|
||||
spawn_class = "hostile",
|
||||
|
@ -203,7 +203,7 @@ mcl_mobs:register_mob("mobs_mc:creeper_charged", {
|
|||
if self._forced_explosion_countdown_timer ~= nil then
|
||||
self._forced_explosion_countdown_timer = self._forced_explosion_countdown_timer - dtime
|
||||
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,
|
||||
|
@ -219,6 +219,10 @@ mcl_mobs:register_mob("mobs_mc:creeper_charged", {
|
|||
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,
|
||||
drops = {
|
||||
{name = "mcl_mobitems:gunpowder",
|
||||
|
|
Loading…
Reference in a new issue