Re-add zombies, ghosts and sheep
@ -1,5 +1,5 @@
|
||||
Creatures MOB-Engine
|
||||
====================
|
||||
Mod/Modpack Creatures
|
||||
=====================
|
||||
Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
|
||||
Version: 2.0 Beta
|
||||
@ -23,7 +23,7 @@ see each MOB-Module for detailed informations.
|
||||
|
||||
Github:
|
||||
~~~~~~~
|
||||
https://github.com/BlockMen/creatures_mob_engine
|
||||
https://github.com/BlockMen/cme
|
||||
|
||||
|
||||
Forum:
|
||||
|
14
bower.json
@ -1,21 +1,25 @@
|
||||
{
|
||||
"name": "creatures",
|
||||
"description": "This mod adds several creatures to Minetest, including zombies, ghosts, and sheep.\n",
|
||||
"name": "Creatures MOB-Engine",
|
||||
"description": "A Mod(pack) for Minetest that provides a MOB-Engine and adds several creatures to the game.\n",
|
||||
"keywords": [
|
||||
"creatures",
|
||||
"mobs",
|
||||
"MOB",
|
||||
"MOB-Engine",
|
||||
"Creatures MOB-Engine",
|
||||
"cme",
|
||||
"zombies",
|
||||
"sheep",
|
||||
"ghost",
|
||||
"monsters",
|
||||
"hostile"
|
||||
],
|
||||
"homepage": "https://github.com/BlockMen/creatures",
|
||||
"homepage": "https://github.com/BlockMen/cme",
|
||||
"forum": "http://forum.minetest.net/viewtopic.php?f=11&t=8638",
|
||||
"screenshots": [
|
||||
"https://raw.githubusercontent.com/BlockMen/creatures/master/screenshot.png"
|
||||
"https://raw.githubusercontent.com/BlockMen/cme/master/screenshot.png"
|
||||
],
|
||||
"authors": [
|
||||
"BlockMen"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -1,121 +1,26 @@
|
||||
Minetest mod "Creatures"
|
||||
=======================
|
||||
by BlockMen (c) 2014 - 2015
|
||||
Creatures MOB-Engine
|
||||
====================
|
||||
Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
|
||||
Version: 1.1.5 Beta
|
||||
|
||||
About
|
||||
~~~~~
|
||||
This mod adds 2 hostile and 1 friendly mob to Minetest, so far zombies, ghosts and sheeps.
|
||||
|
||||
Zombies can spawn to every day-time in the world as long there is not to much light.
|
||||
So you will find some in caves, dark forests and ofc a lot at night. If they notice you they will attack.
|
||||
Zombies have 20 HP (like players) and drop rotten flesh randomly.
|
||||
|
||||
Ghosts only spawn at night-time. Also they don't spawn underground and are a bit more rare than zombies.
|
||||
They are flying in the world and attack you aswell if they notice you.
|
||||
Ghosts have 12 HP and don't drop any items atm (might be changed if i have an idea what they could drop).
|
||||
|
||||
Sheeps spawn only at day-time and are friendly mobs. They remain around 5 minutes in the world unless there
|
||||
are other sheeps around, then there is no fixed limit. If there is grass (dirt with grass) they eat the grass
|
||||
and get new wool that way. They will follow you if you have Wheat in your hand.
|
||||
Sheeps have 8 HP and drop 1-2 wool when punched or 2 wool when using shears. They need to eat grass until they can produce new wool.
|
||||
|
||||
They can't harm you in your house (in case there is no door open). If it becomes day both mobs will take damage
|
||||
by the sunlight, so they will die after a while.
|
||||
Version: 2.0 Beta
|
||||
|
||||
|
||||
Notice: Weapons and tools get damaged when hitting a zombie or ghost. The wearout is calculated on the damage amout
|
||||
of the tools/weapons. The more damage they can do that longer they can be used.
|
||||
|
||||
Example:
|
||||
- Diamond Sword: 1500 uses
|
||||
- Wooden Sword: 30 uses
|
||||
|
||||
Crafting Shears:
|
||||
----------- steel ingot
|
||||
steel ingot stick
|
||||
This mod provides an engine, that handles the base function for MOB in Minetest.
|
||||
It offers an easy way to register MOB and allows to custom handling for the needs
|
||||
of each mob. This engine aims to be a solid base, that has a good balance between
|
||||
performance and functionality.
|
||||
See API.txt for more informations on how to use this engine for mobs.
|
||||
|
||||
|
||||
|
||||
License of source code:
|
||||
-----------------------
|
||||
(c) Copyright BlockMen (2014-2015), modified zlib-License
|
||||
|
||||
License:
|
||||
~~~~~~~~
|
||||
Code:
|
||||
(c) Copyright 2015 BlockMen; modified zlib-License
|
||||
see "LICENSE.txt" for details.
|
||||
|
||||
Media(textures and other media):
|
||||
(c) Copyright (2014-2015) BlockMen; CC-BY-SA 3.0
|
||||
|
||||
|
||||
Licenses of sounds
|
||||
------------------
|
||||
following sounds are created by Under7dude (freesound.org)
|
||||
- creatures_zombie.1.ogg, CC0
|
||||
- creatures_zombie.2.ogg, CC0
|
||||
- creatures_zombie.3.ogg, CC0
|
||||
- creatures_zombie_death.ogg, CC0
|
||||
|
||||
following sounds are created by confusion_music (freesound.org)
|
||||
- creatures_sheep.1.ogg, CC-BY 3.0
|
||||
- creatures_sheep.2.ogg, CC-BY 3.0
|
||||
|
||||
following sound is created by Yuval (freesound.org)
|
||||
- creatures_sheep.3.ogg, CC-BY 3.0
|
||||
|
||||
following sound is created by SmartWentCody (freesound.org)
|
||||
- creatures_shears.ogg, CC-BY 3.0
|
||||
|
||||
|
||||
License of all other Media (textures, meshes/models, sounds):
|
||||
-------------------------------------------------------------
|
||||
(c) Copyright BlockMen (2014-2015), CC BY-SA 3.0
|
||||
|
||||
|
||||
|
||||
Changelog:
|
||||
----------
|
||||
# 1.0.1
|
||||
- fixed incompatibility with pyramids mod
|
||||
|
||||
# 1.1
|
||||
- new mob: sheep
|
||||
- fixed crash caused by unknown node
|
||||
- fixed spawning, added spawn limit
|
||||
- fixed weapon & tool damage
|
||||
- tweaked and restructured code
|
||||
- ghosts only spawn on grass and desert-sand blocks
|
||||
- ghosts have now 12 HP (instead 15 HP)
|
||||
- zombies don't jump over fences anymore
|
||||
|
||||
# 1.1.1
|
||||
- Zombies have also a maximum lifetime now
|
||||
- Use line_of_sight() befor attacking
|
||||
- Fix different crashes
|
||||
- Experimental spawning control
|
||||
|
||||
# 1.1.2
|
||||
- Sheeps follow you when holding wheat
|
||||
- Added Shears (rightclick)
|
||||
- Items are only droped (without player action) with builtin_mod
|
||||
|
||||
# 1.1.3
|
||||
- Fixed crash caused by spawning control
|
||||
- Prevent the mobs flood once and for all
|
||||
- Drop items aswell when settings define max lifetime
|
||||
|
||||
# 1.1.4
|
||||
- Fixed mobs flood (yes, really!)
|
||||
- Sheep drop raw flesh on death
|
||||
- Sheep are not stuck that often in valleys; spawning less
|
||||
- Improved jumping of zombies and sheep
|
||||
|
||||
# 1.1.5
|
||||
- Fixed global variable (by vitaminx)
|
||||
- Added description.txt and screenshot (by ExcaliburZero)
|
||||
- Fixed sounds (zombie and sheep)
|
||||
- Using [colorize modifier instead of texture overlays
|
||||
|
||||
This program is free software. It comes without any warranty, to
|
||||
the extent permitted by applicable law. You can redistribute it
|
||||
and/or modify it under the terms of the Do What The Fuck You Want
|
||||
To Public License, Version 2, as published by Sam Hocevar. See
|
||||
http://sam.zoy.org/wtfpl/COPYING for more details.
|
||||
Github:
|
||||
~~~~~~~
|
||||
https://github.com/BlockMen/cme/creatures
|
||||
|
Before Width: | Height: | Size: 246 KiB |
20
ghost/LICENSE.txt
Normal file
@ -0,0 +1,20 @@
|
||||
Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty. In no
|
||||
event will the authors be held liable for any damages arising from the use of
|
||||
this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including
|
||||
commercial applications, and to alter it and redistribute it freely, subject to the
|
||||
following restrictions:
|
||||
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software in a
|
||||
product, an acknowledgment in the product documentation is required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
26
ghost/README.txt
Normal file
@ -0,0 +1,26 @@
|
||||
Ghost for Creatures MOB-Engine
|
||||
==============================
|
||||
Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
|
||||
Version: 2.0 Beta
|
||||
|
||||
|
||||
Adds ghosts to Minetest (requires Creatures MOB-Engine).
|
||||
Ghosts only spawn at night-time and not underground.
|
||||
They are flying in the world and attack you players if they notice them.
|
||||
Ghosts have 12 HP and don't drop any items atm.
|
||||
|
||||
|
||||
License:
|
||||
~~~~~~~~
|
||||
Code:
|
||||
(c) Copyright 2015 BlockMen; modified zlib-License
|
||||
see "LICENSE.txt" for details.
|
||||
|
||||
Media(sounds, textures and meshes/models):
|
||||
(c) Copyright (2014-2015) BlockMen; CC-BY-SA 3.0
|
||||
|
||||
|
||||
Github:
|
||||
~~~~~~~
|
||||
https://github.com/BlockMen/cme/ghost
|
2
ghost/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
creatures
|
||||
default
|
110
ghost/init.lua
Normal file
@ -0,0 +1,110 @@
|
||||
--= Ghost for Creatures MOB-Engine (cme) =--
|
||||
-- Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
--
|
||||
-- init.lua
|
||||
--
|
||||
-- This software is provided 'as-is', without any express or implied warranty. In no
|
||||
-- event will the authors be held liable for any damages arising from the use of
|
||||
-- this software.
|
||||
--
|
||||
-- Permission is granted to anyone to use this software for any purpose, including
|
||||
-- commercial applications, and to alter it and redistribute it freely, subject to the
|
||||
-- following restrictions:
|
||||
--
|
||||
-- 1. The origin of this software must not be misrepresented; you must not
|
||||
-- claim that you wrote the original software. If you use this software in a
|
||||
-- product, an acknowledgment in the product documentation is required.
|
||||
-- 2. Altered source versions must be plainly marked as such, and must not
|
||||
-- be misrepresented as being the original software.
|
||||
-- 3. This notice may not be removed or altered from any source distribution.
|
||||
--
|
||||
|
||||
|
||||
local def = {
|
||||
-- general
|
||||
name = "creatures:ghost",
|
||||
stats = {
|
||||
hp = 20,
|
||||
lifetime = 300, -- 5 Minutes
|
||||
can_burn = true,
|
||||
can_fly = true,
|
||||
has_falldamage = false,
|
||||
has_kockback = true,
|
||||
light = {min = 0, max = 8},
|
||||
hostile = true,
|
||||
},
|
||||
|
||||
modes = {
|
||||
idle = {chance = 0.65, duration = 3, update_yaw = 6},--dur = 8 is gut
|
||||
fly = {chance = 0.25, duration = 2.5, moving_speed = 2, max_height = 25, target_offset = 2.1},
|
||||
fly_2 = {chance = 0.1, duration = 4, moving_speed = 1.6, update_yaw = 3, max_height = 25, target_offset = 2.5},
|
||||
-- special modes
|
||||
attack = {chance = 0, moving_speed = 2.6},
|
||||
},
|
||||
|
||||
model = {
|
||||
mesh = "ghost.b3d",
|
||||
textures = {"creatures_ghost.png"},
|
||||
collisionbox = {-0.25, 0.2, -0.3, 0.25, 1.4, 0.3},
|
||||
rotation = -90.0,
|
||||
animations = {
|
||||
idle = {start = 0, stop = 80, speed = 15},
|
||||
fly = {start = 168, stop = 188, speed = 12},
|
||||
fly_2 = {start = 168, stop = 188, speed = 10},
|
||||
attack = {start = 168, stop = 188, speed = 25},
|
||||
-- death
|
||||
},
|
||||
},
|
||||
|
||||
sounds = {
|
||||
on_damage = {name = "creatures_ghost_hit", gain = 0.4, distance = 10},
|
||||
on_death = {name = "creatures_ghost_death", gain = 0.7, distance = 10},
|
||||
random = {
|
||||
idle = {name = "creatures_ghost", gain = 0.5, distance = 10, time_min = 23},
|
||||
},
|
||||
},
|
||||
|
||||
combat = {
|
||||
attack_damage = 2, -- in hp
|
||||
attack_speed = 1.1, -- time in seconds between hits
|
||||
attack_radius = 0.9, -- radius of hit range
|
||||
|
||||
search_enemy = true,
|
||||
search_timer = 2,
|
||||
search_radius = 12, --in nodes
|
||||
search_type = "player", --types = {all, hostile, nonhostile, player, mates}
|
||||
--search_xray = false, -- can see through walls?
|
||||
},
|
||||
|
||||
spawning = {
|
||||
abm_nodes = {
|
||||
spawn_on = {"default:gravel", "default:dirt_with_grass", "default:dirt",
|
||||
"group:leaves", "group:sand"},
|
||||
},
|
||||
abm_interval = 40,
|
||||
abm_chance = 7300,
|
||||
max_number = 1, -- per mapblock
|
||||
number = 1,
|
||||
time_range = {min = 18500, max = 4000}, -- 0-24000
|
||||
light = {min = 0, max = 8},
|
||||
height_limit = {min = 0, max = 80},
|
||||
|
||||
spawn_egg = {
|
||||
description = "Ghost Spawn-Egg",
|
||||
texture = "creatures_spawn_egg.png^[colorize:#27ca",
|
||||
},
|
||||
|
||||
spawner = {
|
||||
range = 8, -- defines area withing mobs are spawned
|
||||
number = 6, -- maxmimum number of mobs spawned in area defined via range
|
||||
light = {min = 0, max = 8}, -- additional light check
|
||||
}
|
||||
},
|
||||
|
||||
--drops = {
|
||||
-- {"creatures:rotten_flesh", {min = 1, max = 2}, chance = 0.7},
|
||||
--},
|
||||
|
||||
}
|
||||
|
||||
creatures.register_mob(def)
|
BIN
ghost/models/ghost.b3d
Normal file
BIN
ghost/sounds/creatures_ghost.1.ogg
Normal file
BIN
ghost/sounds/creatures_ghost.2.ogg
Normal file
BIN
ghost/sounds/creatures_ghost_death.ogg
Normal file
BIN
ghost/sounds/creatures_ghost_hit.ogg
Normal file
BIN
ghost/textures/creatures_ghost.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
screenshot.png
Normal file
After Width: | Height: | Size: 562 KiB |
20
sheep/LICENSE.txt
Normal file
@ -0,0 +1,20 @@
|
||||
Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty. In no
|
||||
event will the authors be held liable for any damages arising from the use of
|
||||
this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including
|
||||
commercial applications, and to alter it and redistribute it freely, subject to the
|
||||
following restrictions:
|
||||
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software in a
|
||||
product, an acknowledgment in the product documentation is required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
38
sheep/README.txt
Normal file
@ -0,0 +1,38 @@
|
||||
Sheep for Creatures MOB-Engine
|
||||
==============================
|
||||
Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
|
||||
Version: 2.0 Beta
|
||||
|
||||
|
||||
Adds sheep to Minetest (requires Creatures MOB-Engine).
|
||||
Sheep spawn only at day-time and are friendly and remain around 5 minutes in the world.
|
||||
You can tame them by feading them with wheat. If there is grass they eat the grass
|
||||
and regrow wool that way. They will follow you if you have Wheat in your hand.
|
||||
Sheep have 8 HP and drop 1-2 wool when punched or 1-3 wool when using shears.
|
||||
|
||||
Sheers are crafted by using 2 steel ingots and one stick in following shape:
|
||||
|
||||
- ingot
|
||||
ingot stick
|
||||
|
||||
|
||||
License:
|
||||
~~~~~~~~
|
||||
Code:
|
||||
(c) Copyright 2015 BlockMen; modified zlib-License
|
||||
see "LICENSE.txt" for details.
|
||||
|
||||
Media(textures and meshes/models):
|
||||
(c) Copyright (2014-2015) BlockMen; CC-BY-SA 3.0
|
||||
|
||||
Sounds:
|
||||
- creatures_sheep.1.ogg, confusion_music(https://freesound.org/people/confusion_music) CC-BY 3.0
|
||||
- creatures_sheep.2.ogg, confusion_music(https://freesound.org/people/confusion_music) CC-BY 3.0
|
||||
- creatures_sheep.3.ogg, Yuval(https://freesound.org/people/Yuval) CC-BY 3.0
|
||||
- creatures_shears.ogg, SmartWentCody(https://freesound.org/people/SmartWentCody) CC-BY 3.0
|
||||
|
||||
|
||||
Github:
|
||||
~~~~~~~
|
||||
https://github.com/BlockMen/cme/sheep
|
4
sheep/depends.txt
Normal file
@ -0,0 +1,4 @@
|
||||
creatures
|
||||
default
|
||||
farming?
|
||||
wool?
|
188
sheep/init.lua
Normal file
@ -0,0 +1,188 @@
|
||||
--= Sheep for Creatures MOB-Engine (cme) =--
|
||||
-- Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
--
|
||||
-- init.lua
|
||||
--
|
||||
-- This software is provided 'as-is', without any express or implied warranty. In no
|
||||
-- event will the authors be held liable for any damages arising from the use of
|
||||
-- this software.
|
||||
--
|
||||
-- Permission is granted to anyone to use this software for any purpose, including
|
||||
-- commercial applications, and to alter it and redistribute it freely, subject to the
|
||||
-- following restrictions:
|
||||
--
|
||||
-- 1. The origin of this software must not be misrepresented; you must not
|
||||
-- claim that you wrote the original software. If you use this software in a
|
||||
-- product, an acknowledgment in the product documentation is required.
|
||||
-- 2. Altered source versions must be plainly marked as such, and must not
|
||||
-- be misrepresented as being the original software.
|
||||
-- 3. This notice may not be removed or altered from any source distribution.
|
||||
--
|
||||
|
||||
|
||||
-- shears
|
||||
core.register_tool(":creatures:shears", {
|
||||
description = "Shears",
|
||||
inventory_image = "creatures_shears.png",
|
||||
})
|
||||
|
||||
core.register_craft({
|
||||
output = 'creatures:shears',
|
||||
recipe = {
|
||||
{'', 'default:steel_ingot'},
|
||||
{'default:steel_ingot', 'default:stick'},
|
||||
}
|
||||
})
|
||||
|
||||
local function shear(self, drop_count, sound)
|
||||
if self.has_wool == true then
|
||||
self.has_wool = false
|
||||
local pos = self.object:getpos()
|
||||
|
||||
if sound then
|
||||
core.sound_play("creatures_shears", {pos = pos, gain = 1, max_hear_distance = 10})
|
||||
end
|
||||
self.object:set_properties({textures = {"creatures_sheep_shaved.png"}})
|
||||
creatures.dropItems(pos, {{"wool:white", drop_count}})
|
||||
end
|
||||
end
|
||||
|
||||
local def = {
|
||||
name = "creatures:sheep",
|
||||
stats = {
|
||||
hp = 8,
|
||||
lifetime = 450, -- 7,5 Minutes
|
||||
can_jump = 1,
|
||||
can_swim = true,
|
||||
can_burn = true,
|
||||
can_panic = true,
|
||||
has_falldamage = true,
|
||||
has_kockback = true,
|
||||
},
|
||||
|
||||
model = {
|
||||
mesh = "creatures_sheep.x",
|
||||
textures = {"creatures_sheep.png"},
|
||||
collisionbox = {-0.5, -0.01, -0.55, 0.5, 1.1, 0.55},
|
||||
rotation = -90.0,
|
||||
animations = {
|
||||
idle = {start = 0, stop = 80, speed = 15},
|
||||
walk = {start = 81, stop = 100, speed = 18},
|
||||
walk_long = {start = 81, stop = 100, speed = 18},
|
||||
eat = {start = 107, stop = 185, speed = 12, loop = false},
|
||||
follow = {start = 81, stop = 100, speed = 15},
|
||||
--death = {start = 0, stop = 80, speed = 15, loop = false, duration = 1},
|
||||
},
|
||||
},
|
||||
|
||||
sounds = {
|
||||
on_damage = {name = "creatures_sheep", gain = 1.0, distance = 10},
|
||||
on_death = {},
|
||||
swim = {name = "creatures_splash", gain = 1.0, distance = 10,}, -- played whenever moving in(to) water
|
||||
random = {
|
||||
idle = {name = "creatures_sheep", gain = 0.6, distance = 10, time_min = 23},
|
||||
},
|
||||
},
|
||||
|
||||
modes = {
|
||||
idle = {chance = 0.5, duration = 10, update_yaw = 8},
|
||||
walk = {chance = 0.14, duration = 4.5, moving_speed = 1.3},
|
||||
walk_long = {chance = 0.11, duration = 8, moving_speed = 1.3, update_yaw = 5},
|
||||
-- special modes
|
||||
follow = {chance = 0, duration = 20, radius = 4, timer = 5, moving_speed = 1, items = {"farming:wheat"}},
|
||||
eat = {chance = 0.25,
|
||||
duration = 4,
|
||||
nodes = {
|
||||
"default:grass_1", "default:grass_2", "default:grass_3",
|
||||
"default:grass_4", "default:grass_5", "default:dirt_with_grass"
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
drops = function(self)
|
||||
local items = {{"creatures:flesh"}}
|
||||
if self.has_wool then
|
||||
table.insert(items, {"wool:white", {min = 1, max = 2}})
|
||||
end
|
||||
creatures.dropItems(self.object:getpos(), items)
|
||||
end,
|
||||
|
||||
spawning = {
|
||||
abm_nodes = {
|
||||
spawn_on = {"default:dirt_with_grass"},
|
||||
},
|
||||
abm_interval = 55,
|
||||
abm_chance = 7800,
|
||||
max_number = 1, -- per mapblock(16x16x16)
|
||||
number = {min = 1, max = 3},
|
||||
time_range = {min = 5100, max = 18300}, -- 0-24000
|
||||
light = {min = 10, max = 15},
|
||||
height_limit = {min = 0, max = 25},
|
||||
|
||||
spawn_egg = {
|
||||
description = "Sheep Spawn-Egg",
|
||||
texture = "creatures_egg_sheep.png",
|
||||
},
|
||||
|
||||
spawner = {
|
||||
range = 8, -- defines area withing mobs are spawned
|
||||
player_range = 20, -- defines at what distance spawner gets activated
|
||||
number = 6, -- maxmimum number of mobs spawned in area defined via range
|
||||
light = {min = 2, max = 15}, -- additional light check
|
||||
}
|
||||
},
|
||||
|
||||
on_punch = function(self, puncher)
|
||||
shear(self)
|
||||
end,
|
||||
|
||||
get_staticdata = function(self)
|
||||
return {
|
||||
has_wool = self.has_wool
|
||||
}
|
||||
end,
|
||||
|
||||
on_activate = function(self, staticdata)
|
||||
if self.has_wool == false then
|
||||
self.object:set_properties({textures = {"creatures_sheep_shaved.png"}})
|
||||
end
|
||||
end,
|
||||
|
||||
on_rightclick = function(self, clicker)
|
||||
local item = clicker:get_wielded_item()
|
||||
if item then
|
||||
local name = item:get_name()
|
||||
if name == "farming:wheat" then
|
||||
self.target = clicker
|
||||
self.mode = "follow"
|
||||
self.modetimer = 0
|
||||
-- play eat sound?
|
||||
item:take_item()
|
||||
elseif name == "creatures:shears" and self.has_wool then
|
||||
shear(self, math.random(2, 3), true)
|
||||
item:add_wear(65535/100)
|
||||
end
|
||||
if not core.setting_getbool("creative_mode") then
|
||||
clicker:set_wielded_item(item)
|
||||
end
|
||||
end
|
||||
|
||||
return true
|
||||
end,
|
||||
|
||||
on_step = function(self, dtime)
|
||||
if self.has_wool == nil then
|
||||
self.has_wool = true
|
||||
end
|
||||
if self.mode == "eat" and self.eat_node then
|
||||
self.regrow_wool = true
|
||||
end
|
||||
if self.last_mode == "eat" and self.modetimer == 0 and self.regrow_wool then
|
||||
self.has_wool = true
|
||||
self.regrow_wool = nil
|
||||
self.object:set_properties({textures = {"creatures_sheep.png"}})
|
||||
end
|
||||
end
|
||||
}
|
||||
|
||||
creatures.register_mob(def)
|
6751
sheep/models/creatures_sheep.x
Normal file
BIN
sheep/sounds/creatures_shears.ogg
Normal file
BIN
sheep/sounds/creatures_sheep.1.ogg
Normal file
BIN
sheep/sounds/creatures_sheep.2.ogg
Normal file
BIN
sheep/sounds/creatures_sheep.3.ogg
Normal file
BIN
sheep/textures/creatures_egg_sheep.png
Normal file
After Width: | Height: | Size: 675 B |
BIN
sheep/textures/creatures_shears.png
Normal file
After Width: | Height: | Size: 282 B |
BIN
sheep/textures/creatures_sheep.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
sheep/textures/creatures_sheep_shaved.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
20
zombie/LICENSE.txt
Normal file
@ -0,0 +1,20 @@
|
||||
Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
|
||||
|
||||
This software is provided 'as-is', without any express or implied warranty. In no
|
||||
event will the authors be held liable for any damages arising from the use of
|
||||
this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose, including
|
||||
commercial applications, and to alter it and redistribute it freely, subject to the
|
||||
following restrictions:
|
||||
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software in a
|
||||
product, an acknowledgment in the product documentation is required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source distribution.
|
32
zombie/README.txt
Normal file
@ -0,0 +1,32 @@
|
||||
Zombie for Creatures MOB-Engine
|
||||
===============================
|
||||
Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
|
||||
Version: 2.0 Beta
|
||||
|
||||
|
||||
Adds zombies to Minetest (requires Creatures MOB-Engine).
|
||||
Zombies can spawn to every day-time in the world as long there it is dark enough.
|
||||
You will find some in caves, dark forests and ofc a lot at night.
|
||||
If they notice any player near they will attack.
|
||||
Zombies have 20 HP (like players) and drop rotten flesh randomly.
|
||||
|
||||
|
||||
License:
|
||||
~~~~~~~~
|
||||
Code:
|
||||
(c) Copyright 2015 BlockMen; modified zlib-License
|
||||
see "LICENSE.txt" for details.
|
||||
|
||||
Media(textures and meshes/models):
|
||||
(c) Copyright (2014-2015) BlockMen; CC-BY-SA 3.0
|
||||
|
||||
Sounds:
|
||||
- creatures_zombie.1.ogg, Under7dude(https://freesound.org/people/Under7dude) CC0
|
||||
- creatures_zombie.2.ogg, Under7dude(https://freesound.org/people/Under7dude) CC0
|
||||
- creatures_zombie.3.ogg, Under7dude(https://freesound.org/people/Under7dude) CC0
|
||||
- creatures_zombie_death.ogg, Under7dude(https://freesound.org/people/Under7dude) CC0
|
||||
|
||||
Github:
|
||||
~~~~~~~
|
||||
https://github.com/BlockMen/cme/zombie
|
2
zombie/depends.txt
Normal file
@ -0,0 +1,2 @@
|
||||
creatures
|
||||
default
|
115
zombie/init.lua
Normal file
@ -0,0 +1,115 @@
|
||||
--= Zombie for Creatures MOB-Engine (cme) =--
|
||||
-- Copyright (c) 2015 BlockMen <blockmen2015@gmail.com>
|
||||
--
|
||||
-- init.lua
|
||||
--
|
||||
-- This software is provided 'as-is', without any express or implied warranty. In no
|
||||
-- event will the authors be held liable for any damages arising from the use of
|
||||
-- this software.
|
||||
--
|
||||
-- Permission is granted to anyone to use this software for any purpose, including
|
||||
-- commercial applications, and to alter it and redistribute it freely, subject to the
|
||||
-- following restrictions:
|
||||
--
|
||||
-- 1. The origin of this software must not be misrepresented; you must not
|
||||
-- claim that you wrote the original software. If you use this software in a
|
||||
-- product, an acknowledgment in the product documentation is required.
|
||||
-- 2. Altered source versions must be plainly marked as such, and must not
|
||||
-- be misrepresented as being the original software.
|
||||
-- 3. This notice may not be removed or altered from any source distribution.
|
||||
--
|
||||
|
||||
|
||||
core.register_craftitem(":creatures:rotten_flesh", {
|
||||
description = "Rotten Flesh",
|
||||
inventory_image = "creatures_rotten_flesh.png",
|
||||
on_use = core.item_eat(1),
|
||||
})
|
||||
|
||||
local def = {
|
||||
-- general
|
||||
name = "creatures:zombie",
|
||||
stats = {
|
||||
hp = 20,
|
||||
lifetime = 300, -- 5 Minutes
|
||||
can_jump = 1,
|
||||
can_swim = true,
|
||||
can_burn = true,
|
||||
has_falldamage = true,
|
||||
has_kockback = true,
|
||||
light = {min = 0, max = 8},
|
||||
hostile = true,
|
||||
},
|
||||
|
||||
modes = {
|
||||
idle = {chance = 0.7, duration = 3, update_yaw = 6},--dur = 8 is gut
|
||||
walk = {chance = 0.3, duration = 5.5, moving_speed = 1.5},
|
||||
-- special modes
|
||||
attack = {chance = 0, moving_speed = 2.5},
|
||||
},
|
||||
|
||||
model = {
|
||||
mesh = "zombie.b3d",
|
||||
textures = {"creatures_zombie.png"},
|
||||
collisionbox = {-0.25, -0.01, -0.3, 0.25, 1.75, 0.3},
|
||||
rotation = -90.0,
|
||||
animations = {
|
||||
idle = {start = 0, stop = 80, speed = 15},
|
||||
walk = {start = 168, stop = 188, speed = 15.5},
|
||||
attack = {start = 168, stop = 188, speed = 25},
|
||||
-- death
|
||||
},
|
||||
},
|
||||
|
||||
sounds = {
|
||||
on_damage = {name = "creatures_zombie_hit", gain = 0.4, distance = 10},
|
||||
on_death = {name = "creatures_zombie_death", gain = 0.7, distance = 10},
|
||||
swim = {name = "creatures_splash", gain = 1.0, distance = 10},
|
||||
random = {
|
||||
idle = {name = "creatures_zombie", gain = 0.7, distance = 12},
|
||||
},
|
||||
},
|
||||
|
||||
combat = {
|
||||
attack_damage = 1, -- in hp
|
||||
attack_speed = 0.6, -- time in seconds between hits
|
||||
attack_radius = 1.1, -- radius of hit range
|
||||
|
||||
search_enemy = true,
|
||||
search_timer = 2,
|
||||
search_radius = 12, --in nodes
|
||||
search_type = "player", --types = {all, hostile, nonhostile, player, mates}
|
||||
--search_xray = false, -- can see through walls?
|
||||
},
|
||||
|
||||
spawning = {
|
||||
abm_nodes = {
|
||||
spawn_on = {"default:stone", "default:dirt_with_grass", "default:dirt",
|
||||
"default:cobblestone", "default:mossycobble", "group:sand"},
|
||||
},
|
||||
abm_interval = 36,
|
||||
abm_chance = 7600,
|
||||
max_number = 1, -- per mapblock
|
||||
number = 2,
|
||||
--time_range = {min = 18500, max = 4000}, -- 0-24000
|
||||
light = {min = 0, max = 8},
|
||||
height_limit = {min = -200, max = 50},
|
||||
|
||||
spawn_egg = {
|
||||
description = "Zombie Spawn-Egg",
|
||||
texture = "creatures_spawn_egg.png^[colorize:#2c9a",
|
||||
},
|
||||
|
||||
spawner = {
|
||||
range = 8, -- defines area withing mobs are spawned
|
||||
number = 6, -- maxmimum number of mobs spawned in area defined via range
|
||||
light = {min = 0, max = 8}, -- additional light check
|
||||
}
|
||||
},
|
||||
|
||||
drops = {
|
||||
{"creatures:rotten_flesh", {min = 1, max = 2}, chance = 0.7},
|
||||
}
|
||||
}
|
||||
|
||||
creatures.register_mob(def)
|
BIN
zombie/models/zombie.b3d
Normal file
BIN
zombie/sounds/creatures_zombie.1.ogg
Normal file
BIN
zombie/sounds/creatures_zombie.2.ogg
Normal file
BIN
zombie/sounds/creatures_zombie.3.ogg
Normal file
BIN
zombie/sounds/creatures_zombie_death.ogg
Normal file
BIN
zombie/sounds/creatures_zombie_hit.ogg
Normal file
BIN
zombie/textures/creatures_egg_zombie.png
Normal file
After Width: | Height: | Size: 714 B |
BIN
zombie/textures/creatures_rotten_flesh.png
Normal file
After Width: | Height: | Size: 511 B |
BIN
zombie/textures/creatures_zombie.png
Normal file
After Width: | Height: | Size: 3.1 KiB |