version 0.21
42
mods/mobs/README.txt
Normal file
|
@ -0,0 +1,42 @@
|
|||
=== MOBS-MOD for MINETEST-C55 ===
|
||||
by PilzAdam
|
||||
|
||||
Inroduction:
|
||||
This mod adds some basic hostile and friendly mobs to the game.
|
||||
|
||||
How to install:
|
||||
Unzip the archive an place it in minetest-base-directory/mods/minetest/
|
||||
if you have a windows client or a linux run-in-place client. If you have
|
||||
a linux system-wide instalation place it in ~/.minetest/mods/minetest/.
|
||||
If you want to install this mod only in one world create the folder
|
||||
worldmods/ in your worlddirectory.
|
||||
For further information or help see:
|
||||
http://wiki.minetest.com/wiki/Installing_Mods
|
||||
|
||||
How to use the mod:
|
||||
See https://github.com/PilzAdam/mobs/wiki
|
||||
|
||||
For developers:
|
||||
The API documentation is moved to https://github.com/PilzAdam/mobs/wiki/API
|
||||
|
||||
License:
|
||||
Sourcecode: WTFPL (see below)
|
||||
Grahpics: WTFPL (see below)
|
||||
Models: WTFPL (by Pavel_S, see below)
|
||||
|
||||
See also:
|
||||
http://minetest.net/
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
1050
mods/mobs/api.lua
Normal file
559
mods/mobs/copie.old
Normal file
|
@ -0,0 +1,559 @@
|
|||
dofile(minetest.get_modpath("mobs").."/api.lua")
|
||||
|
||||
-- Mouton
|
||||
dofile(minetest.get_modpath("mobs").."/sheep.lua")
|
||||
|
||||
|
||||
mobs:register_mob("mobs:dirt_monster", {
|
||||
type = "monster",
|
||||
hp_max = 25,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_stone_monster.x",
|
||||
textures = {"mobs_dirt_monster.png"},
|
||||
visual_size = {x = 3, y = 2.6},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 12,
|
||||
walk_velocity = 1.1,
|
||||
run_velocity = 2.6,
|
||||
on_rightclick = nil,
|
||||
damage = 4,
|
||||
drops = {
|
||||
name = "default:dirt",
|
||||
chance = 1,
|
||||
min = 4,
|
||||
max = 4,
|
||||
-- {name = "maptools:silver_coin",
|
||||
-- chance = 1,
|
||||
-- min = 2,
|
||||
-- max = 2,},
|
||||
},
|
||||
armor = 100,
|
||||
drawtype = "front",
|
||||
lava_damage = 8,
|
||||
light_damage = 1,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
speed_normal = 18,
|
||||
speed_run = 50,
|
||||
stand_start = 0,
|
||||
stand_end = 14,
|
||||
walk_start = 15,
|
||||
walk_end = 38,
|
||||
run_start = 40,
|
||||
run_end = 63,
|
||||
punch_start = 40,
|
||||
punch_end = 63,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:dirt_monster", {
|
||||
description = "Dirt Monster",
|
||||
inventory_image = "mobs_dirt_monster.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:dirt_monster")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a dirt monster at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:register_mob("mobs:stone_monster", {
|
||||
type = "monster",
|
||||
hp_max = 30,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_stone_monster.x",
|
||||
textures = {"mobs_stone_monster.png"},
|
||||
visual_size = {x = 3, y = 2.6},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 16,
|
||||
walk_velocity = 0.4,
|
||||
run_velocity = 1.8,
|
||||
damage = 6,
|
||||
drops = {
|
||||
{name = "default:stone",
|
||||
chance = 1,
|
||||
min = 4,
|
||||
max = 4,},
|
||||
-- {name = "maptools:silver_coin",
|
||||
-- chance = 1,
|
||||
-- min = 3,
|
||||
-- max = 3,},
|
||||
},
|
||||
armor = 80,
|
||||
drawtype = "front",
|
||||
light_damage = 1,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
speed_normal = 8,
|
||||
speed_run = 40,
|
||||
stand_start = 0,
|
||||
stand_end = 14,
|
||||
walk_start = 15,
|
||||
walk_end = 38,
|
||||
run_start = 40,
|
||||
run_end = 63,
|
||||
punch_start = 40,
|
||||
punch_end = 63,
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:stone_monster", {
|
||||
description = "Stone Monster",
|
||||
inventory_image = "mobs_stone_monster.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:stone_monster")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a stone monster at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:register_mob("mobs:sand_monster", {
|
||||
type = "monster",
|
||||
hp_max = 15,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_sand_monster.x",
|
||||
textures = {"mobs_sand_monster.png"},
|
||||
visual_size = {x =8,y =8},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 20,
|
||||
walk_velocity = 1.8,
|
||||
run_velocity = 3.6,
|
||||
damage = 2,
|
||||
drops = {
|
||||
{name = "default:sand",
|
||||
chance = 1,
|
||||
min = 4,
|
||||
max = 4,},
|
||||
-- {name = "maptools:silver_coin",
|
||||
-- chance = 1,
|
||||
-- min = 3,
|
||||
-- max = 3,},
|
||||
},
|
||||
armor = 100,
|
||||
drawtype = "front",
|
||||
lava_damage = 8,
|
||||
light_damage = 1,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
speed_normal = 35,
|
||||
speed_run = 45,
|
||||
stand_start = 0,
|
||||
stand_end = 39,
|
||||
walk_start = 41,
|
||||
walk_end = 72,
|
||||
run_start = 74,
|
||||
run_end = 105,
|
||||
punch_start = 74,
|
||||
punch_end = 105,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:sand_monster", {
|
||||
description = "Sand Monster",
|
||||
inventory_image = "mobs_sand_monster.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:sand_monster")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a sand monster at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:register_mob("mobs:rat", {
|
||||
type = "animal",
|
||||
hp_max = 1,
|
||||
collisionbox = {-0.25, -0.01, -0.25, 0.25, 0.35, 0.25},
|
||||
collide_with_objects = false,
|
||||
visual = "mesh",
|
||||
mesh = "mobs_rat.x",
|
||||
textures = {"mobs_rat.png"},
|
||||
makes_footstep_sound = false,
|
||||
walk_velocity = 0.8,
|
||||
armor = 200,
|
||||
drops = {
|
||||
{name = "mobs:rat",
|
||||
chance = 1,
|
||||
min = 1,
|
||||
max = 1,},
|
||||
},
|
||||
drawtype = "front",
|
||||
water_damage = 1,
|
||||
lava_damage = 8,
|
||||
follow = "default:scorched_stuff",
|
||||
view_range = 4,
|
||||
})
|
||||
|
||||
mobs:register_mob("mobs:oerkki", {
|
||||
type = "monster",
|
||||
hp_max = 45,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_oerkki.x",
|
||||
textures = {"mobs_oerkki.png"},
|
||||
visual_size = {x =5, y =5},
|
||||
makes_footstep_sound = false,
|
||||
view_range = 16,
|
||||
walk_velocity = 0.5,
|
||||
run_velocity = 3,
|
||||
damage = 5,
|
||||
drops = {
|
||||
{name = "default:obsidian",
|
||||
chance = 1,
|
||||
min = 4,
|
||||
max = 4,},
|
||||
-- {name = "maptools:silver_coin",
|
||||
-- chance = 1,
|
||||
-- min = 5,
|
||||
-- max = 5,},
|
||||
},
|
||||
armor = 100,
|
||||
drawtype = "front",
|
||||
lava_damage = 8,
|
||||
light_damage = 1,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
stand_start = 0,
|
||||
stand_end = 23,
|
||||
walk_start = 24,
|
||||
walk_end = 36,
|
||||
run_start = 37,
|
||||
run_end = 49,
|
||||
punch_start = 37,
|
||||
punch_end = 49,
|
||||
speed_normal = 10,
|
||||
speed_run = 18,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:oerkki", {
|
||||
description = "Oerkki",
|
||||
inventory_image = "mobs_oerkki.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:oerkki")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed an oerkki at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:register_mob("mobs:tree_monster", {
|
||||
type = "monster",
|
||||
hp_max = 60,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_tree_monster.x",
|
||||
textures = {"mobs_tree_monster.png"},
|
||||
visual_size = {x = 4.5,y = 4.5},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 32,
|
||||
walk_velocity = 0,
|
||||
run_velocity = 1.6,
|
||||
damage = 6,
|
||||
drops = {
|
||||
{name = "default:sapling",
|
||||
chance = 1,
|
||||
min = 4,
|
||||
max = 4,},
|
||||
{name = "default:junglesapling",
|
||||
chance = 1,
|
||||
min = 4,
|
||||
max = 4,},
|
||||
-- {name = "maptools:silver_coin",
|
||||
-- chance = 1,
|
||||
-- min = 6,
|
||||
-- max = 6,},
|
||||
},
|
||||
armor = 80,
|
||||
drawtype = "front",
|
||||
lava_damage = 8,
|
||||
light_damage = 1,
|
||||
disable_fall_damage = true,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
speed_normal = 8,
|
||||
speed_run = 20,
|
||||
stand_start = 0,
|
||||
stand_end = 24,
|
||||
walk_start = 25,
|
||||
walk_end = 47,
|
||||
run_start = 48,
|
||||
run_end = 62,
|
||||
punch_start = 48,
|
||||
punch_end = 62,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:tree_monster", {
|
||||
description = "Tree Monster",
|
||||
inventory_image = "mobs_tree_monster.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:tree_monster")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a tree monster at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:register_mob("mobs:dungeon_master", {
|
||||
type = "monster",
|
||||
hp_max = 50,
|
||||
collisionbox = {-0.7, -0.01, -0.7, 0.7, 2.6, 0.7},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_dungeon_master.x",
|
||||
textures = {"mobs_dungeon_master.png"},
|
||||
visual_size = {x =8, y =8},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 12,
|
||||
walk_velocity = 0.4,
|
||||
run_velocity = 2,
|
||||
damage = 10,
|
||||
drops = {
|
||||
{name = "default:mese_crystal",
|
||||
chance = 1,
|
||||
min = 1,
|
||||
max = 1,},
|
||||
-- {name = "maptools:silver_coin",
|
||||
-- chance = 1,
|
||||
-- min = 8,
|
||||
-- max = 8,},
|
||||
},
|
||||
armor = 60,
|
||||
drawtype = "front",
|
||||
lava_damage = 8,
|
||||
light_damage = 200,
|
||||
on_rightclick = nil,
|
||||
attack_type = "shoot",
|
||||
arrow = "mobs:fireball",
|
||||
shoot_interval = 2.5,
|
||||
sounds = {
|
||||
attack = "mobs_fireball",
|
||||
},
|
||||
animation = {
|
||||
stand_start = 0,
|
||||
stand_end = 19,
|
||||
walk_start = 20,
|
||||
walk_end = 35,
|
||||
punch_start = 36,
|
||||
punch_end = 48,
|
||||
speed_normal = 8,
|
||||
speed_run = 5,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:dungeon_master", {
|
||||
description = "Dungeon Master",
|
||||
inventory_image = "mobs_dungeon_master.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:dungeon_master")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a dungeon master at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:register_arrow("mobs:fireball", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1, y = 1},
|
||||
textures = {"mobs_fireball.png"},
|
||||
velocity = 9,
|
||||
hit_player = function(self, player)
|
||||
local s = self.object:getpos()
|
||||
local p = player:getpos()
|
||||
local vec = {x = s.x - p.x, y = s.y - p.y, z = s.z - p.z}
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval = 1.0,
|
||||
damage_groups = {fleshy = 10},
|
||||
}, vec)
|
||||
local pos = self.object:getpos()
|
||||
for dx = -1, 1 do
|
||||
for dy = -1, 1 do
|
||||
for dz = -1, 1 do
|
||||
local p = {x = pos.x + dx, y = pos.y + dy, z = pos.z + dz}
|
||||
local n = minetest.get_node(pos).name
|
||||
if n ~= "bedrock:bedrock"
|
||||
and n ~= "default:chest_locked"
|
||||
and n ~= "bones:bones"
|
||||
and n ~= "default:chest"
|
||||
and n ~= "default:furnace" then
|
||||
minetest.dig_node(p)
|
||||
end
|
||||
minetest.sound_play("mobs_fireball_explode", {
|
||||
pos = s,
|
||||
gain = 0.1,
|
||||
max_hear_distance = 48})
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
hit_node = function(self, pos, node)
|
||||
for dx = -1, 1 do
|
||||
for dy = -2, 1 do
|
||||
for dz = -1, 1 do
|
||||
local p = {x = pos.x + dx, y = pos.y + dy, z = pos.z + dz}
|
||||
local n = minetest.get_node(pos).name
|
||||
if n ~= "bedrock:bedrock"
|
||||
and n ~= "default:chest_locked"
|
||||
and n ~= "bones:bones"
|
||||
and n ~= "default:chest"
|
||||
and n ~= "default:furnace" then
|
||||
minetest.dig_node(p)
|
||||
end
|
||||
minetest.sound_play("mobs_fireball_explode", {
|
||||
pos = s,
|
||||
gain = 0.1,
|
||||
max_hear_distance = 48})
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
mobs:register_mob("mobs:rhino", {
|
||||
type = "monster",
|
||||
hp_max = 25,
|
||||
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "mobs_sand_monster.x",
|
||||
textures = {"mobs_rhino.png"},
|
||||
visual_size = {x = 8, y = 8},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 10,
|
||||
walk_velocity = 1.2,
|
||||
run_velocity = 2.4,
|
||||
damage = 2,
|
||||
drops = {
|
||||
{name = "default:steel_ingot",
|
||||
chance = 1,
|
||||
min = 10,
|
||||
max = 10,},
|
||||
-- {name = "maptools:silver_coin",
|
||||
-- chance = 1,
|
||||
-- min = 12,
|
||||
-- max = 12,},
|
||||
},
|
||||
armor = 60,
|
||||
drawtype = "front",
|
||||
lava_damage = 8,
|
||||
light_damage = 1,
|
||||
on_rightclick = nil,
|
||||
attack_type = "shoot",
|
||||
arrow = "mobs:bullet",
|
||||
shoot_interval = 0.5,
|
||||
sounds = {
|
||||
attack = "mobs_bullet",
|
||||
},
|
||||
animation = {
|
||||
speed_normal = 25,
|
||||
speed_run = 45,
|
||||
stand_start = 0,
|
||||
stand_end = 39,
|
||||
walk_start = 41,
|
||||
walk_end = 72,
|
||||
run_start = 74,
|
||||
run_end = 105,
|
||||
punch_start = 74,
|
||||
punch_end = 105,
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:rhino", {
|
||||
description = "Rhino",
|
||||
inventory_image = "mobs_rhino.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {not_in_creative_inventory = 1},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:rhino")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a rhino at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
mobs:register_arrow("mobs:bullet", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 0.75, y = 0.75},
|
||||
textures = {"mobs_bullet.png"},
|
||||
velocity = 18,
|
||||
hit_player = function(self, player)
|
||||
local s = self.object:getpos()
|
||||
local p = player:getpos()
|
||||
local vec = {x =s.x-p.x, y =s.y-p.y, z =s.z-p.z}
|
||||
player:punch(self.object, 1.0, {
|
||||
full_punch_interval= 1.0,
|
||||
damage_groups = {fleshy = 2},
|
||||
}, vec)
|
||||
local pos = self.object:getpos()
|
||||
for dx = -1, 1 do
|
||||
for dy = -1, 1 do
|
||||
for dz = -1, 1 do
|
||||
local p = {x = pos.x + dx, y = pos.y + dy, z = pos.z + dz}
|
||||
local n = minetest.get_node(pos).name
|
||||
end
|
||||
end
|
||||
end
|
||||
end,
|
||||
hit_node = function(self, pos, node)
|
||||
for dx = -1, 1 do
|
||||
for dy = -2, 1 do
|
||||
for dz = -1, 1 do
|
||||
local p = {x = pos.x + dx, y = pos.y + dy, z = pos.z + dz}
|
||||
local n = minetest.get_node(pos).name
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
})
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if minetest.setting_getbool("spawn_friendly_mobs") ~= false then -- “If not defined or set to true then”
|
||||
mobs:register_spawn("mobs:sheep", "a sheep", {"default:dirt_with_grass"}, 16, 8, 20000, 2, 100)
|
||||
end
|
||||
if minetest.setting_getbool("spawn_hostile_mobs") ~= false then -- “If not defined or set to true then”
|
||||
mobs:register_spawn("mobs:dirt_monster", "a dirt monster", {"default:stone", "default:desert_stone"}, 1, -1, 15000, 6, 0)
|
||||
mobs:register_spawn("mobs:stone_monster", "a stone monster", {"default:stone", "default:desert_stone"}, 1, -1, 15000, 4, 0)
|
||||
mobs:register_spawn("mobs:sand_monster", "a sand monster", {"default:stone", "default:desert_stone"}, 1, -1, 15000, 4, 0)
|
||||
mobs:register_spawn("mobs:oerkki", "an oerkki", {"default:stone", "default:desert_stone"}, 1, -1, 20000, 4, 0)
|
||||
mobs:register_spawn("mobs:tree_monster", "a tree monster", {"default:stone", "default:desert_stone"}, 1, -1, 25000, 2, 0)
|
||||
mobs:register_spawn("mobs:dungeon_master", "a dungeon master", {"default:stone", "default:desert_stone"}, 1, -1, 25000, 2, -50)
|
||||
mobs:register_spawn("mobs:rhino", "a rhino", {"default:stone", "default:desert_stone"}, 1, -1, 25000, 2, 0)
|
||||
end
|
||||
end
|
||||
|
||||
print('[OK] Mobs loaded!')
|
29
mods/mobs/creeper.lua
Normal file
|
@ -0,0 +1,29 @@
|
|||
mobs:register_mob("mobs:creeper", {
|
||||
type = "monster",
|
||||
hp_max = 10,
|
||||
collisionbox = {-0.2, 0, -0.2, 0.2, 1.4, 0.2},
|
||||
visual = "mesh",
|
||||
mesh = "creatures_creeper.x",
|
||||
textures = {"mobs_creeper.png"},
|
||||
--visual_size = {x = 1.1, y = 1.1},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 15,
|
||||
walk_velocity = 1.3,
|
||||
randomsound= "creeper_random",
|
||||
run_velocity = 1.1,
|
||||
on_rightclick = nil,
|
||||
jump = 0,
|
||||
damage = 0,
|
||||
drops = {
|
||||
{name = "default:gunpowder",
|
||||
chance = 1,
|
||||
min = 1,
|
||||
max = 3,},
|
||||
},
|
||||
armor = 70,
|
||||
drawtype = "front",
|
||||
lava_damage = 15,
|
||||
light_damage = 0,
|
||||
attack_type = "kamicaze",
|
||||
})
|
||||
|
1
mods/mobs/depends.txt
Normal file
|
@ -0,0 +1 @@
|
|||
default
|
37
mods/mobs/herobrine.lua
Normal file
|
@ -0,0 +1,37 @@
|
|||
mobs:register_mob("mobs:herobrine", {
|
||||
type = "monster",
|
||||
hp_max = 120,
|
||||
collisionbox = {-0.4, -1.3, -0.4, 0.4, 1, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "creatures_herobrine.x",
|
||||
textures = {"mobs_herobrine.png"},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 10,
|
||||
walk_velocity = 4.8,
|
||||
run_velocity = 5.1,
|
||||
on_rightclick = nil,
|
||||
drops = {
|
||||
{name = "mobs:rotten_flesh",
|
||||
chance = 1,
|
||||
min = 1,
|
||||
max = 3,},
|
||||
},
|
||||
jump = 0,
|
||||
damage = 9999,
|
||||
armor = 100,
|
||||
drawtype = "front",
|
||||
lava_damage = 0,
|
||||
light_damage = 0,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
speed_normal = 10,
|
||||
speed_run = 30,
|
||||
stand_start = 0,
|
||||
stand_end = 79,
|
||||
walk_start = 168,
|
||||
walk_end = 187,
|
||||
die_start = 162,
|
||||
die_end = 166,
|
||||
},
|
||||
})
|
||||
|
44
mods/mobs/init.lua
Normal file
|
@ -0,0 +1,44 @@
|
|||
dofile(minetest.get_modpath("mobs").."/api.lua")
|
||||
|
||||
-- Items
|
||||
dofile(minetest.get_modpath("mobs").."/item.lua")
|
||||
|
||||
-- Mouton
|
||||
dofile(minetest.get_modpath("mobs").."/sheep.lua")
|
||||
|
||||
-- Zombie
|
||||
dofile(minetest.get_modpath("mobs").."/zombie.lua")
|
||||
|
||||
-- Slime
|
||||
dofile(minetest.get_modpath("mobs").."/slime.lua")
|
||||
|
||||
-- Creeper
|
||||
dofile(minetest.get_modpath("mobs").."/creeper.lua")
|
||||
|
||||
-- Spider
|
||||
dofile(minetest.get_modpath("mobs").."/spider.lua")
|
||||
|
||||
-- Herobrine
|
||||
dofile(minetest.get_modpath("mobs").."/herobrine.lua")
|
||||
|
||||
|
||||
---mobs:register_spawn(name, description, nodes, max_light, min_light, chance, active_object_count, max_height, spawn_func)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if minetest.setting_getbool("spawn_friendly_mobs") ~= false then -- “If not defined or set to true then”
|
||||
mobs:register_spawn("mobs:sheep", "Sheep", {"default:dirt_with_grass"},16, 8, 2, 250, 100)
|
||||
end
|
||||
if minetest.setting_getbool("spawn_hostile_mobs") ~= false then -- “If not defined or set to true then”
|
||||
mobs:register_spawn("mobs:slime", "Slime", { "default:dirt_with_grass"}, 20, 1, 11, 80, 0)
|
||||
mobs:register_spawn("mobs:herobrine", "Herobrine", {"head:herobine"}, 20, -1, 100, 1, 0)
|
||||
mobs:register_spawn("mobs:zombie", "Zombie", {"default:stone", "default:dirt", "default:dirt_with_grass", "default:sand"}, 1, -1, 7, 80, 0)
|
||||
mobs:register_spawn("mobs:spider", "Spider", {"default:stone", "default:dirt", "default:dirt_with_grass", "default:sand"}, 1, -1, 7, 40, 0)
|
||||
-- mobs:register_spawn("mobs:stone_monster", "a stone monster", {"default:stone", "default:desert_stone"}, 1, -1, 15000, 4, 0)
|
||||
-- mobs:register_spawn("mobs:sand_monster", "a sand monster", {"default:stone", "default:desert_stone"}, 1, -1, 15000, 4, 0)
|
||||
-- mobs:register_spawn("mobs:oerkki", "an oerkki", {"default:stone", "default:desert_stone"}, 1, -1, 20000, 4, 0)
|
||||
-- mobs:register_spawn("mobs:tree_monster", "a tree monster", {"default:stone", "default:desert_stone"}, 1, -1, 25000, 2, 0)
|
||||
-- mobs:register_spawn("mobs:dungeon_master", "a dungeon master", {"default:stone", "default:desert_stone"}, 1, -1, 25000, 2, -50)
|
||||
-- mobs:register_spawn("mobs:rhino", "a rhino", {"default:stone", "default:desert_stone"}, 1, -1, 25000, 2, 0)
|
||||
end
|
||||
end
|
||||
|
||||
print('[OK] Mobs loaded!')
|
135
mods/mobs/item.lua
Normal file
|
@ -0,0 +1,135 @@
|
|||
-------------------
|
||||
-- Oeuf de spawn --
|
||||
-------------------
|
||||
minetest.register_craftitem("mobs:sheep", {
|
||||
description = "Sheep",
|
||||
inventory_image = "spawn_sheep.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:sheep")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a sheep at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:slime", {
|
||||
description = "slime",
|
||||
inventory_image = "spawn_slime.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:slime")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a slime at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:zombie", {
|
||||
description = "Zombie",
|
||||
inventory_image = "spawn_zombie.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:zombie")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a zombie at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craftitem("mobs:spider", {
|
||||
description = "Spider",
|
||||
inventory_image = "spawn_spider.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:spider")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a spider at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
|
||||
minetest.register_craftitem("mobs:creeper", {
|
||||
description = "Creeper",
|
||||
inventory_image = "spawn_creeper.png",
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
groups = {},
|
||||
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:creeper")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a creeper at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:herobrine", {
|
||||
description = "herobrine",
|
||||
inventory_image = "spawn_herobrine.png",
|
||||
groups = {not_in_creative_inventory=1},
|
||||
wield_scale = {x = 1.25, y = 1.25, z = 2.5},
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
if pointed_thing.above then
|
||||
minetest.add_entity(pointed_thing.above, "mobs:herobrine")
|
||||
if not minetest.setting_getbool("creative_mode") then itemstack:take_item() end
|
||||
minetest.log("action", placer:get_player_name() .. " placed a herobrine at " .. minetest.pos_to_string(pointed_thing.above) .. ".")
|
||||
end
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
---------------------
|
||||
-- Drop de monstre --
|
||||
---------------------
|
||||
|
||||
minetest.register_craftitem("mobs:rotten_flesh", {
|
||||
description = "rotten flesh",
|
||||
inventory_image = "rotten_flesh.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:meat_raw_sheep", {
|
||||
description = "Raw Mutton",
|
||||
inventory_image = "mutton_raw.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:meat_cooked_sheep", {
|
||||
description = "Cooked Mutton",
|
||||
inventory_image = "mutton_cooked.png",
|
||||
on_use = minetest.item_eat(4),
|
||||
})
|
||||
|
||||
minetest.register_craftitem("mobs:spider_eye", {
|
||||
description = "Spider Eye",
|
||||
inventory_image = "spider_eye.png",
|
||||
on_use = minetest.item_eat(2),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "mobs:meat_cooked_sheep",
|
||||
recipe = "mobs:meat_raw_sheep",
|
||||
cooktime = 25,
|
||||
})
|
||||
|
441
mods/mobs/models/creatures_creeper.x
Normal file
|
@ -0,0 +1,441 @@
|
|||
xof 0302txt 0064
|
||||
// File created by CINEMA 4D
|
||||
|
||||
|
||||
template Vector {
|
||||
<3D82AB5E-62DA-11cf-AB39-0020AF71E433>
|
||||
FLOAT x;
|
||||
FLOAT y;
|
||||
FLOAT z;
|
||||
}
|
||||
|
||||
template Coords2d {
|
||||
<F6F23F44-7686-11cf-8F52-0040333594A3>
|
||||
FLOAT u;
|
||||
FLOAT v;
|
||||
}
|
||||
|
||||
template Matrix4x4 {
|
||||
<F6F23F45-7686-11cf-8F52-0040333594A3>
|
||||
array FLOAT matrix[16];
|
||||
}
|
||||
|
||||
template ColorRGBA {
|
||||
<35FF44E0-6C7C-11cf-8F52-0040333594A3>
|
||||
FLOAT red;
|
||||
FLOAT green;
|
||||
FLOAT blue;
|
||||
FLOAT alpha;
|
||||
}
|
||||
|
||||
template ColorRGB {
|
||||
<D3E16E81-7835-11cf-8F52-0040333594A3>
|
||||
FLOAT red;
|
||||
FLOAT green;
|
||||
FLOAT blue;
|
||||
}
|
||||
|
||||
template IndexedColor {
|
||||
<1630B820-7842-11cf-8F52-0040333594A3>
|
||||
DWORD index;
|
||||
ColorRGBA indexColor;
|
||||
}
|
||||
|
||||
template Boolean {
|
||||
<4885AE61-78E8-11cf-8F52-0040333594A3>
|
||||
SWORD truefalse;
|
||||
}
|
||||
|
||||
template Boolean2d {
|
||||
<4885AE63-78E8-11cf-8F52-0040333594A3>
|
||||
Boolean u;
|
||||
Boolean v;
|
||||
}
|
||||
|
||||
template MaterialWrap {
|
||||
<4885AE60-78E8-11cf-8F52-0040333594A3>
|
||||
Boolean u;
|
||||
Boolean v;
|
||||
}
|
||||
|
||||
template TextureFilename {
|
||||
<A42790E1-7810-11cf-8F52-0040333594A3>
|
||||
STRING filename;
|
||||
}
|
||||
|
||||
template Material {
|
||||
<3D82AB4D-62DA-11cf-AB39-0020AF71E433>
|
||||
ColorRGBA faceColor;
|
||||
FLOAT power;
|
||||
ColorRGB specularColor;
|
||||
ColorRGB emissiveColor;
|
||||
[...]
|
||||
}
|
||||
|
||||
template MeshFace {
|
||||
<3D82AB5F-62DA-11cf-AB39-0020AF71E433>
|
||||
DWORD nFaceVertexIndices;
|
||||
array DWORD faceVertexIndices[nFaceVertexIndices];
|
||||
}
|
||||
|
||||
template MeshFaceWraps {
|
||||
<4885AE62-78E8-11cf-8F52-0040333594A3>
|
||||
DWORD nFaceWrapValues;
|
||||
Boolean2d faceWrapValues;
|
||||
}
|
||||
|
||||
template MeshTextureCoords {
|
||||
<F6F23F40-7686-11cf-8F52-0040333594A3>
|
||||
DWORD nTextureCoords;
|
||||
array Coords2d textureCoords[nTextureCoords];
|
||||
}
|
||||
|
||||
template MeshMaterialList {
|
||||
<F6F23F42-7686-11cf-8F52-0040333594A3>
|
||||
DWORD nMaterials;
|
||||
DWORD nFaceIndexes;
|
||||
array DWORD faceIndexes[nFaceIndexes];
|
||||
[Material]
|
||||
}
|
||||
|
||||
template MeshNormals {
|
||||
<F6F23F43-7686-11cf-8F52-0040333594A3>
|
||||
DWORD nNormals;
|
||||
array Vector normals[nNormals];
|
||||
DWORD nFaceNormals;
|
||||
array MeshFace faceNormals[nFaceNormals];
|
||||
}
|
||||
|
||||
template MeshVertexColors {
|
||||
<1630B821-7842-11cf-8F52-0040333594A3>
|
||||
DWORD nVertexColors;
|
||||
array IndexedColor vertexColors[nVertexColors];
|
||||
}
|
||||
|
||||
template Mesh {
|
||||
<3D82AB44-62DA-11cf-AB39-0020AF71E433>
|
||||
DWORD nVertices;
|
||||
array Vector vertices[nVertices];
|
||||
DWORD nFaces;
|
||||
array MeshFace faces[nFaces];
|
||||
[...]
|
||||
}
|
||||
|
||||
template FrameTransformMatrix {
|
||||
<F6F23F41-7686-11cf-8F52-0040333594A3>
|
||||
Matrix4x4 frameMatrix;
|
||||
}
|
||||
|
||||
template Frame {
|
||||
<3D82AB46-62DA-11cf-AB39-0020AF71E433>
|
||||
[...]
|
||||
}
|
||||
|
||||
Mesh CINEMA4D_Mesh {
|
||||
48;
|
||||
// Head
|
||||
-2.149;9.488;-4.004;,
|
||||
-2.152;13.894;-4.005;,
|
||||
1.98;9.491;-4.036;,
|
||||
1.978;13.897;-4.038;,
|
||||
2.012;9.492;0.093;,
|
||||
2.01;13.898;0.092;,
|
||||
-2.117;9.489;0.125;,
|
||||
-2.119;13.896;0.124;,
|
||||
// Body
|
||||
-2.133;2.881;-2.988;,
|
||||
-2.133;9.49;-2.988;,
|
||||
1.996;2.881;-2.988;,
|
||||
1.996;9.49;-2.988;,
|
||||
1.996;2.881;-0.923;,
|
||||
1.996;9.49;-0.923;,
|
||||
-2.133;2.881;-0.923;,
|
||||
-2.133;9.49;-0.923;,
|
||||
// Right_Foot_Front
|
||||
-2.133;0.528;-5.985;,
|
||||
-2.133;3.634;-4.926;,
|
||||
-0.068;0.528;-5.985;,
|
||||
-0.068;3.634;-4.926;,
|
||||
-0.068;-0.225;-4.045;,
|
||||
-0.068;2.88;-2.986;,
|
||||
-2.133;-0.225;-4.045;,
|
||||
-2.133;2.88;-2.986;,
|
||||
// Right_Foot_Back
|
||||
-2.133;-0.225;0.134;,
|
||||
-2.133;2.88;-0.925;,
|
||||
-0.068;-0.225;0.134;,
|
||||
-0.068;2.88;-0.925;,
|
||||
-0.068;0.528;2.074;,
|
||||
-0.068;3.634;1.015;,
|
||||
-2.133;0.528;2.074;,
|
||||
-2.133;3.634;1.015;,
|
||||
// Left_Foot_Front
|
||||
-0.068;-0.479;-5.081;,
|
||||
-0.068;2.802;-5.068;,
|
||||
1.996;-0.479;-5.081;,
|
||||
1.996;2.802;-5.068;,
|
||||
1.996;-0.4;-3.001;,
|
||||
1.996;2.881;-2.988;,
|
||||
-0.068;-0.4;-3.001;,
|
||||
-0.068;2.881;-2.988;,
|
||||
// Left_Foot_Back
|
||||
-0.068;-0.225;-1.98;,
|
||||
-0.068;2.88;-0.921;,
|
||||
1.996;-0.225;-1.98;,
|
||||
1.996;2.88;-0.921;,
|
||||
1.996;-0.979;-0.04;,
|
||||
1.996;2.127;1.02;,
|
||||
-0.068;-0.979;-0.04;,
|
||||
-0.068;2.127;1.02;;
|
||||
|
||||
36;
|
||||
// Head
|
||||
4;0,1,3,2;,
|
||||
4;2,3,5,4;,
|
||||
4;4,5,7,6;,
|
||||
4;6,7,1,0;,
|
||||
4;1,7,5,3;,
|
||||
4;6,0,2,4;,
|
||||
// Body
|
||||
4;8,9,11,10;,
|
||||
4;10,11,13,12;,
|
||||
4;12,13,15,14;,
|
||||
4;14,15,9,8;,
|
||||
4;9,15,13,11;,
|
||||
4;14,8,10,12;,
|
||||
// Right_Foot_Front
|
||||
4;16,17,19,18;,
|
||||
4;18,19,21,20;,
|
||||
4;20,21,23,22;,
|
||||
4;22,23,17,16;,
|
||||
4;17,23,21,19;,
|
||||
4;22,16,18,20;,
|
||||
// Right_Foot_Back
|
||||
4;24,25,27,26;,
|
||||
4;26,27,29,28;,
|
||||
4;28,29,31,30;,
|
||||
4;30,31,25,24;,
|
||||
4;25,31,29,27;,
|
||||
4;30,24,26,28;,
|
||||
// Left_Foot_Front
|
||||
4;32,33,35,34;,
|
||||
4;34,35,37,36;,
|
||||
4;36,37,39,38;,
|
||||
4;38,39,33,32;,
|
||||
4;33,39,37,35;,
|
||||
4;38,32,34,36;,
|
||||
// Left_Foot_Back
|
||||
4;40,41,43,42;,
|
||||
4;42,43,45,44;,
|
||||
4;44,45,47,46;,
|
||||
4;46,47,41,40;,
|
||||
4;41,47,45,43;,
|
||||
4;46,40,42,44;;
|
||||
|
||||
MeshNormals {
|
||||
48;
|
||||
// Head
|
||||
-0.582;-0.578;-0.573;,
|
||||
-0.582;0.577;-0.573;,
|
||||
0.573;-0.577;-0.582;,
|
||||
0.572;0.578;-0.582;,
|
||||
0.582;-0.577;0.573;,
|
||||
0.582;0.578;0.573;,
|
||||
-0.572;-0.578;0.582;,
|
||||
-0.573;0.577;0.582;,
|
||||
// Body
|
||||
-0.333;-0.667;-0.667;,
|
||||
-0.333;0.667;-0.667;,
|
||||
0.333;-0.667;-0.667;,
|
||||
0.333;0.667;-0.667;,
|
||||
0.333;-0.667;0.667;,
|
||||
0.333;0.667;0.667;,
|
||||
-0.333;-0.667;0.667;,
|
||||
-0.333;0.667;0.667;,
|
||||
// Right_Foot_Front
|
||||
-0.572;-0.346;-0.743;,
|
||||
-0.588;0.733;-0.341;,
|
||||
0.572;-0.346;-0.743;,
|
||||
0.588;0.733;-0.341;,
|
||||
0.588;-0.733;0.341;,
|
||||
0.572;0.346;0.743;,
|
||||
-0.588;-0.733;0.341;,
|
||||
-0.572;0.346;0.743;,
|
||||
// Right_Foot_Back
|
||||
-0.588;-0.733;-0.341;,
|
||||
-0.572;0.346;-0.743;,
|
||||
0.588;-0.733;-0.341;,
|
||||
0.572;0.346;-0.743;,
|
||||
0.572;-0.346;0.743;,
|
||||
0.588;0.733;0.341;,
|
||||
-0.572;-0.346;0.743;,
|
||||
-0.588;0.733;0.341;,
|
||||
// Left_Foot_Front
|
||||
-0.588;-0.581;-0.562;,
|
||||
-0.572;0.57;-0.59;,
|
||||
0.588;-0.581;-0.562;,
|
||||
0.572;0.57;-0.59;,
|
||||
0.572;-0.57;0.59;,
|
||||
0.588;0.581;0.562;,
|
||||
-0.572;-0.57;0.59;,
|
||||
-0.588;0.581;0.562;,
|
||||
// Left_Foot_Back
|
||||
-0.572;-0.346;-0.743;,
|
||||
-0.588;0.733;-0.341;,
|
||||
0.572;-0.346;-0.743;,
|
||||
0.588;0.733;-0.341;,
|
||||
0.588;-0.733;0.341;,
|
||||
0.572;0.346;0.743;,
|
||||
-0.588;-0.733;0.341;,
|
||||
-0.572;0.346;0.743;;
|
||||
|
||||
36;
|
||||
// Head
|
||||
4;0,1,3,2;,
|
||||
4;2,3,5,4;,
|
||||
4;4,5,7,6;,
|
||||
4;6,7,1,0;,
|
||||
4;1,7,5,3;,
|
||||
4;6,0,2,4;,
|
||||
// Body
|
||||
4;8,9,11,10;,
|
||||
4;10,11,13,12;,
|
||||
4;12,13,15,14;,
|
||||
4;14,15,9,8;,
|
||||
4;9,15,13,11;,
|
||||
4;14,8,10,12;,
|
||||
// Right_Foot_Front
|
||||
4;16,17,19,18;,
|
||||
4;18,19,21,20;,
|
||||
4;20,21,23,22;,
|
||||
4;22,23,17,16;,
|
||||
4;17,23,21,19;,
|
||||
4;22,16,18,20;,
|
||||
// Right_Foot_Back
|
||||
4;24,25,27,26;,
|
||||
4;26,27,29,28;,
|
||||
4;28,29,31,30;,
|
||||
4;30,31,25,24;,
|
||||
4;25,31,29,27;,
|
||||
4;30,24,26,28;,
|
||||
// Left_Foot_Front
|
||||
4;32,33,35,34;,
|
||||
4;34,35,37,36;,
|
||||
4;36,37,39,38;,
|
||||
4;38,39,33,32;,
|
||||
4;33,39,37,35;,
|
||||
4;38,32,34,36;,
|
||||
// Left_Foot_Back
|
||||
4;40,41,43,42;,
|
||||
4;42,43,45,44;,
|
||||
4;44,45,47,46;,
|
||||
4;46,47,41,40;,
|
||||
4;41,47,45,43;,
|
||||
4;46,40,42,44;;
|
||||
|
||||
}
|
||||
MeshTextureCoords {
|
||||
48;
|
||||
// Head
|
||||
0.25;0.0;,
|
||||
0.125;0.25;,
|
||||
0.375;0.0;,
|
||||
0.25;0.25;,
|
||||
0.375;0.25;,
|
||||
0.25;0.0;,
|
||||
0.25;0.25;,
|
||||
0.125;0.0;,
|
||||
// Body
|
||||
0.438;0.5;,
|
||||
0.313;0.625;,
|
||||
0.562;0.501;,
|
||||
0.438;0.625;,
|
||||
0.562;0.625;,
|
||||
0.438;0.5;,
|
||||
0.438;0.625;,
|
||||
0.313;0.5;,
|
||||
// Right_Foot_Front
|
||||
0.125;0.5;,
|
||||
0.063;0.625;,
|
||||
0.188;0.5;,
|
||||
0.125;0.625;,
|
||||
0.188;0.626;,
|
||||
0.125;0.5;,
|
||||
0.125;0.625;,
|
||||
0.063;0.5;,
|
||||
// Right_Foot_Back
|
||||
0.125;0.5;,
|
||||
0.063;0.625;,
|
||||
0.188;0.5;,
|
||||
0.125;0.625;,
|
||||
0.188;0.626;,
|
||||
0.125;0.5;,
|
||||
0.125;0.625;,
|
||||
0.063;0.5;,
|
||||
// Left_Foot_Front
|
||||
0.125;0.5;,
|
||||
0.063;0.625;,
|
||||
0.188;0.5;,
|
||||
0.125;0.625;,
|
||||
0.188;0.626;,
|
||||
0.125;0.5;,
|
||||
0.125;0.625;,
|
||||
0.063;0.5;,
|
||||
// Left_Foot_Back
|
||||
0.125;0.5;,
|
||||
0.063;0.625;,
|
||||
0.188;0.5;,
|
||||
0.125;0.625;,
|
||||
0.188;0.626;,
|
||||
0.125;0.5;,
|
||||
0.125;0.625;,
|
||||
0.063;0.5;;
|
||||
}
|
||||
MeshMaterialList {
|
||||
1;
|
||||
36;
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0;
|
||||
|
||||
Material C4DMAT_NONE {
|
||||
1.0;1.0;1.0;1.0;;
|
||||
1.0;
|
||||
0.0;0.0;0.0;;
|
||||
0.0;0.0;0.0;;
|
||||
}
|
||||
}
|
||||
}
|
5524
mods/mobs/models/creatures_herobrine.x
Normal file
BIN
mods/mobs/models/creatures_sheep.png
Normal file
After Width: | Height: | Size: 3.1 KiB |
6751
mods/mobs/models/creatures_sheep.x
Normal file
BIN
mods/mobs/models/creatures_sheep_shaved.png
Normal file
After Width: | Height: | Size: 4 KiB |
6104
mods/mobs/models/creatures_spider.x
Normal file
5524
mods/mobs/models/creatures_zombie.x
Normal file
BIN
mods/mobs/models/mobs_cavespider.png
Normal file
After Width: | Height: | Size: 7.4 KiB |
BIN
mods/mobs/models/mobs_creeper.png
Normal file
After Width: | Height: | Size: 13 KiB |
BIN
mods/mobs/models/mobs_herobrine.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
mods/mobs/models/mobs_pigman.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
mods/mobs/models/mobs_spider.png
Normal file
After Width: | Height: | Size: 6.8 KiB |
BIN
mods/mobs/models/mobs_zombie.png
Normal file
After Width: | Height: | Size: 7.2 KiB |
BIN
mods/mobs/models/sheep.png
Normal file
After Width: | Height: | Size: 15 KiB |
74
mods/mobs/sheep.lua
Normal file
|
@ -0,0 +1,74 @@
|
|||
|
||||
mobs:register_mob("mobs:sheep", {
|
||||
type = "animal",
|
||||
hp_max = 8,
|
||||
collisionbox = {-0.5, -0.01, -0.5, 0.5, 1, 0.5},
|
||||
textures = {"creatures_sheep.png"},
|
||||
visual = "mesh",
|
||||
mesh = "creatures_sheep.x",
|
||||
makes_footstep_sound = true,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 3,
|
||||
armor = 100,
|
||||
drops = {
|
||||
{name = "mobs:meat_raw_sheep",
|
||||
chance = 2,
|
||||
min = 1,
|
||||
max = 2,},
|
||||
},
|
||||
drawtype = "front",
|
||||
water_damage = 0,
|
||||
lava_damage = 8,
|
||||
animation = {
|
||||
speed_normal = 17,
|
||||
speed_run = 25,
|
||||
stand_start = 0,
|
||||
stand_end = 80,
|
||||
walk_start = 81,
|
||||
walk_end = 100,
|
||||
},
|
||||
follow = "farming:wheat_harvested",
|
||||
view_range = 6,
|
||||
on_rightclick = function(self, clicker)
|
||||
local item = clicker:get_wielded_item()
|
||||
if item:get_name() == "farming:wheat_harvested" then
|
||||
if not self.tamed then
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
self.tamed = true
|
||||
self.object:set_hp(self.object:get_hp() + 3)
|
||||
if self.object:get_hp() > 15 then self.object:set_hp(15) end
|
||||
else
|
||||
if not minetest.setting_getbool("creative_mode") and self.naked then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
self.food = (self.food or 0) + 1
|
||||
if self.food >= 8 then
|
||||
self.food = 0
|
||||
self.naked = false
|
||||
self.object:set_properties({
|
||||
textures = {"creatures_sheep.png"},
|
||||
})
|
||||
end
|
||||
self.object:set_hp(self.object:get_hp() + 3)
|
||||
if self.object:get_hp() > 15 then self.object:set_hp(15) return end
|
||||
if not self.naked then
|
||||
item:take_item()
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
end
|
||||
return
|
||||
end
|
||||
if item:get_name() == "default:shears" and not self.naked then
|
||||
self.naked = true
|
||||
clicker:get_inventory():add_item("main", ItemStack("wool:white "..math.random(1,3)))
|
||||
minetest.sound_play("default_snow_footstep", {object = self.object, gain = 0.5,})
|
||||
self.object:set_properties({
|
||||
textures = {"creatures_sheep_shaved.png"},
|
||||
})
|
||||
end
|
||||
end,
|
||||
})
|
40
mods/mobs/slime.lua
Normal file
|
@ -0,0 +1,40 @@
|
|||
SLIME_SIZE = 1
|
||||
SLIME_BOX = math.sqrt(2*math.pow(SLIME_SIZE, 2))/2
|
||||
GRAVITY = 9.8
|
||||
|
||||
|
||||
mobs:register_mob("mobs:slime", {
|
||||
type = "monster",
|
||||
hp_max = 8,
|
||||
--collisionbox = {-0.4, -1.0, -0.4, 0.4, 0.8, 0.4},
|
||||
collisionbox = {-SLIME_BOX, -SLIME_SIZE/2, -SLIME_BOX, SLIME_BOX, SLIME_SIZE/2, SLIME_BOX},
|
||||
visual = "cube",
|
||||
textures = {
|
||||
"slime_top.png",
|
||||
"slime_bottom.png",
|
||||
"slime_front.png",
|
||||
"slime_sides.png",
|
||||
"slime_sides.png",
|
||||
"slime_sides.png",
|
||||
},
|
||||
--visual_size = {x = 1.1, y = 1.1},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 20,
|
||||
walk_velocity = 0.2,
|
||||
randomsound= "slime_random",
|
||||
run_velocity = 0.2,
|
||||
on_rightclick = nil,
|
||||
jump = 1,
|
||||
damage = 1,
|
||||
drops = {
|
||||
{name = "mesecons_materials:glue",
|
||||
chance = 1,
|
||||
min = 1,
|
||||
max = 4,},
|
||||
},
|
||||
armor = 100,
|
||||
drawtype = "front",
|
||||
lava_damage = 15,
|
||||
light_damage = 0,
|
||||
attack_type = "dogfight",
|
||||
})
|
BIN
mods/mobs/sounds/hit.ogg
Normal file
BIN
mods/mobs/sounds/hit_death.ogg
Normal file
BIN
mods/mobs/sounds/mobs_bullet.ogg
Normal file
BIN
mods/mobs/sounds/mobs_fireball.ogg
Normal file
BIN
mods/mobs/sounds/mobs_fireball_explode.ogg
Normal file
BIN
mods/mobs/sounds/mobs_punch.ogg
Normal file
BIN
mods/mobs/sounds/monster_damage.1.ogg
Normal file
BIN
mods/mobs/sounds/monster_damage.2.ogg
Normal file
BIN
mods/mobs/sounds/monster_death.ogg
Normal file
BIN
mods/mobs/sounds/player_falling_damage.1.ogg
Normal file
BIN
mods/mobs/sounds/player_falling_damage.2.ogg
Normal file
BIN
mods/mobs/sounds/player_falling_damage.3.ogg
Normal file
BIN
mods/mobs/sounds/player_falling_damage.4.ogg
Normal file
BIN
mods/mobs/sounds/zombie_random.ogg
Normal file
BIN
mods/mobs/sounds/zombie_sun_damage.ogg
Normal file
49
mods/mobs/spider.lua
Normal file
|
@ -0,0 +1,49 @@
|
|||
mobs:register_mob("mobs:spider", {
|
||||
type = "monster",
|
||||
hp_max = 16,
|
||||
--collisionbox = {-0.4, -1.0, -0.4, 0.4, 0.8, 0.4},
|
||||
collisionbox = {-0.9, -0.01, -0.7, 0.7, 0.6, 0.7},
|
||||
visual_size = {x=7,y=7},
|
||||
visual = "mesh",
|
||||
mesh = "creatures_spider.x",
|
||||
textures = {"mobs_spider.png"},
|
||||
--visual_size = {x = 1.1, y = 1.1},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 20,
|
||||
walk_velocity = 1,
|
||||
run_velocity = 4,
|
||||
hostile_type = 2,
|
||||
on_rightclick = nil,
|
||||
jump = false,
|
||||
damage = 2,
|
||||
drops = {
|
||||
{name = "farming:string",
|
||||
chance = 2,
|
||||
min = 1,
|
||||
max = 3,},
|
||||
{name = "mobs:spider_eye",
|
||||
chance = 30,
|
||||
min = 1,
|
||||
max = 1,},
|
||||
},
|
||||
armor = 200,
|
||||
light_resistant = true,
|
||||
drawtype = "front",
|
||||
water_damage = 0,
|
||||
lava_damage = 15,
|
||||
light_damage = 0,
|
||||
step = 1,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
speed_normal = 15,
|
||||
speed_run = 15,
|
||||
stand_start = 1,
|
||||
stand_end = 1,
|
||||
walk_start = 20,
|
||||
walk_end = 40,
|
||||
run_start = 20,
|
||||
run_end = 40,
|
||||
punch_start = 50,
|
||||
punch_end = 90,
|
||||
},
|
||||
})
|
BIN
mods/mobs/textures/mobs_bullet.png
Normal file
After Width: | Height: | Size: 159 B |
BIN
mods/mobs/textures/mobs_fireball.png
Normal file
After Width: | Height: | Size: 609 B |
BIN
mods/mobs/textures/mutton_cooked.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
mods/mobs/textures/mutton_raw.png
Normal file
After Width: | Height: | Size: 3.4 KiB |
BIN
mods/mobs/textures/rotten_flesh.png
Normal file
After Width: | Height: | Size: 746 B |
BIN
mods/mobs/textures/slime.png
Normal file
After Width: | Height: | Size: 262 B |
BIN
mods/mobs/textures/slime_bottom.png
Normal file
After Width: | Height: | Size: 499 B |
BIN
mods/mobs/textures/slime_front.png
Normal file
After Width: | Height: | Size: 530 B |
BIN
mods/mobs/textures/slime_sides.png
Normal file
After Width: | Height: | Size: 470 B |
BIN
mods/mobs/textures/slime_top.png
Normal file
After Width: | Height: | Size: 482 B |
BIN
mods/mobs/textures/spawn_creeper.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/mobs/textures/spawn_herobrine.png
Normal file
After Width: | Height: | Size: 925 B |
BIN
mods/mobs/textures/spawn_sheep.png
Normal file
After Width: | Height: | Size: 644 B |
BIN
mods/mobs/textures/spawn_slime.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
mods/mobs/textures/spawn_spider.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
mods/mobs/textures/spawn_zombie.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
mods/mobs/textures/spider_eye.png
Normal file
After Width: | Height: | Size: 274 B |
58
mods/mobs/zombie.lua
Normal file
|
@ -0,0 +1,58 @@
|
|||
mobs:register_mob("mobs:zombie", {
|
||||
type = "monster",
|
||||
hp_max = 20,
|
||||
--collisionbox = {-0.4, -1.0, -0.4, 0.4, 0.8, 0.4},
|
||||
collisionbox = {-0.4, -1.3, -0.4, 0.4, 1, 0.4},
|
||||
visual = "mesh",
|
||||
mesh = "creatures_zombie.x",
|
||||
textures = {"mobs_zombie.png"},
|
||||
--visual_size = {x = 1.1, y = 1.1},
|
||||
makes_footstep_sound = true,
|
||||
view_range = 15,
|
||||
walk_velocity = 0.8,
|
||||
randomsound= "zombie_random",
|
||||
run_velocity = 1.1,
|
||||
on_rightclick = nil,
|
||||
damage = 1,
|
||||
drops = {
|
||||
{name = "mobs:rotten_flesh",
|
||||
chance = 2,
|
||||
min = 1,
|
||||
max = 2,},
|
||||
{name = "default:sword_steel",
|
||||
chance = 15,
|
||||
min = 0,
|
||||
max = 1,},
|
||||
{name = "default:shovel_gold",
|
||||
chance = 18,
|
||||
min = 0,
|
||||
max = 1,},
|
||||
{name = "default:steel_ingot",
|
||||
chance = 24,
|
||||
min = 1,
|
||||
max = 5,},
|
||||
{name = "farming:carrot_item",
|
||||
chance = 10,
|
||||
min = 0,
|
||||
max = 1,},
|
||||
{name = "farming:potato_item",
|
||||
chance = 25,
|
||||
min = 0,
|
||||
max = 1,},
|
||||
},
|
||||
armor = 100,
|
||||
drawtype = "front",
|
||||
lava_damage = 15,
|
||||
light_damage = 5,
|
||||
attack_type = "dogfight",
|
||||
animation = {
|
||||
speed_normal = 10,
|
||||
speed_run = 30,
|
||||
stand_start = 0,
|
||||
stand_end = 79,
|
||||
walk_start = 168,
|
||||
walk_end = 187,
|
||||
die_start = 162,
|
||||
die_end = 166,
|
||||
},
|
||||
})
|