Merge pull request #87 from Wuzzy2/headbanger

Mob heads: Complete rework
This commit is contained in:
maikerumine 2017-07-05 16:56:10 -04:00 committed by GitHub
commit 0d64509a55
35 changed files with 86 additions and 323 deletions

View File

@ -54,9 +54,12 @@ mobs_mc.items = {
nether_star = "mobs_mc:nether_star",
bone = "mobs_mc:bone",
slimeball = "mobs_mc:slimeball",
arrow = "mobs_mc:arrow",
bow = "mobs_mc:bow_wood",
head_creeper = "mobs_mc:head_creeper",
head_zombie = "mobs_mc:head_zombie",
head_skeleton = "mobs_mc:head_skeleton",
head_wither_skeleton = "mobs_mc:head_wither_skeleton",
-- External items
-- Mobs Redo

58
4_heads.lua Normal file
View File

@ -0,0 +1,58 @@
--MC Heads for minetest
--maikerumine
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
-- Heads system
local sounds
if minetest.get_modpath("default") then
sounds = default.node_sound_defaults({
footstep = {name="default_hard_footstep", gain=0.3}
})
end
local function addhead(mobname, desc, longdesc)
minetest.register_node("mobs_mc:head_"..mobname, {
description = desc,
_doc_items_longdesc = longdesc,
drawtype = "nodebox",
is_ground_content = false,
node_box = {
type = "fixed",
fixed = {
{ -0.25, -0.5, -0.25, 0.25, 0.0, 0.25, },
},
},
groups = { oddly_breakable_by_hand=3, head=1, },
-- The head textures are based off the textures of an actual mob.
-- FIXME: This code assumes 16×16 textures for the mob textures!
tiles = {
-- Note: bottom texture is overlaid over top texture to get rid of possible transparency.
-- This is required for skeleton skull and wither skeleton skull.
"[combine:16x16:-4,4=mobs_mc_"..mobname..".png", -- top
"([combine:16x16:-4,4=mobs_mc_"..mobname..".png)^([combine:16x16:-12,4=mobs_mc_"..mobname..".png)", -- bottom
"[combine:16x16:-12,0=mobs_mc_"..mobname..".png", -- left
"[combine:16x16:4,0=mobs_mc_"..mobname..".png", -- right
"[combine:16x16:-20,0=mobs_mc_"..mobname..".png", -- back
"[combine:16x16:-4,0=mobs_mc_"..mobname..".png", -- front
},
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
walkable = true,
sounds = sounds,
selection_box = {
type = "fixed",
fixed = { -0.25, -0.5, -0.25, 0.25, 0.0, 0.25, },
},
})
end
-- Add heads
addhead("zombie", S("Zombie Head"), S("A zombie head is a small decorative block which resembles the head of a zombie."))
addhead("creeper", S("Creeper Head"), S("A creeper head is a small decorative block which resembles the head of a creeper."))
addhead("skeleton", S("Skeleton Skull"), S("A skeleton skull is a small decorative block which resembles the skull of a skeleton."))
addhead("wither_skeleton", S("Wither Skeleton Skull"), S("A wither skeleton skull is a small decorative block which resembles the skull of a wither skeleton."))

View File

@ -4,7 +4,6 @@
The following media licenses are used:
* **Unknown license :-(**
* [CC0](https://creativecommons.org/choose/zero/)
* [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/)
* [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)
@ -28,7 +27,6 @@ Origin of those models:
* Author: [XSSheep](https://www.planetminecraft.com/member/xssheep/)
* License: CC BY-SA 4.0
* “Spawn egg” textures (`mobs_mc_spawn_icon_*`) by 22i
* Mob head textures: **UNKNOWN!**
* Any other texture not mentioned here are licensed under the MIT License
## Sounds

View File

@ -14,7 +14,7 @@ This mod adds mobs which closely resemble the mobs from the game Minecraft, vers
## Licensing
* Code: GNU General Public License, version 3 (see `LICENSE`)
* Media: **WARNING!** Possibly includes non-free license (we will replace it soon). See `LICENSE_media.md`
* Media: MIT, CC0, CC BY 3.0 CC BY-SA 4.0, LGPLv2.1, GPLv3. See `LICENSE_media.md` for details
## Useful information for developers

View File

@ -89,8 +89,10 @@ mobs:register_mob("mobs_mc:creeper", {
min = 0,
max = 2,},
{name = "mobs_mc:creeper_head",
chance = 200,
-- Head
-- TODO: Only drop if killed by charged creeper
{name = mobs_mc.items.head_creeper,
chance = 200, -- 0.5%
min = 1,
max = 1,},
},

207
heads.lua
View File

@ -1,207 +0,0 @@
--MC Heads for minetest
--maikerumine
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
minetest.register_node( "mobs_mc:creeper_head", {
description = S("Creeper Head (WIP)"),
tiles = {
"mobs_creeper_top.png",
"mobs_creeper_top.png", --was bottom
"mobs_creeper_side.png",
"mobs_creeper_side.png",
"mobs_creeper_side.png", --was rear
"mobs_creeper_front.png"
},
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.00, 0.25},
},
drawtype = "nodebox",
paramtype = "light",
visual_scale = 1.0,
is_ground_content = false,
groups = {cracky=2},
--sounds = default.node_sound_stone_defaults(),
stack_max = 1,
})
minetest.register_node( "mobs_mc:enderman_head", {
description = S("Enderman Head (WIP)"),
tiles = {
"mobs_endermen_top.png",
"mobs_endermen_top.png",
"mobs_endermen_side.png",
"mobs_endermen_side.png",
"mobs_endermen_side.png",
"mobs_endermen_front.png"
},
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.00, 0.25},
},
drawtype = "nodebox",
paramtype = "light",
visual_scale = 1.0,
is_ground_content = true,
groups = {cracky=2},
--sounds = default.node_sound_stone_defaults(),
stack_max = 1,
})
minetest.register_node( "mobs_mc:ghast_head", {
description = S("Ghast Head (WIP)"),
tiles = {
"mobs_mc_ghast_white.png",
"mobs_mc_ghast_white.png",
"mobs_mc_ghast_white.png",
"mobs_mc_ghast_white.png",
"mobs_mc_ghast_white.png",
"mobs_mc_ghast_front.png"
},
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.00, 0.25},
},
drawtype = "nodebox",
paramtype = "light",
visual_scale = 1.0,
is_ground_content = true,
groups = {cracky=2},
--sounds = default.node_sound_stone_defaults(),
stack_max = 1,
})
minetest.register_node( "mobs_mc:skeleton_head", {
description = S("Skeleton Skull (WIP)"),
tiles = {
"mobs_skeleton_top.png",
"mobs_skeleton_top.png",
"mobs_skeleton_side.png",
"mobs_skeleton_side.png",
"mobs_skeleton_side.png",
"mobs_skeleton_front.png"
},
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.00, 0.25},
},
drawtype = "nodebox",
paramtype = "light",
visual_scale = 1.0,
is_ground_content = false,
groups = {cracky=2},
--sounds = default.node_sound_stone_defaults(),
stack_max = 1,
})
minetest.register_node( "mobs_mc:skeleton2_head", {
description = S("Wither Skeleton Skull (WIP)"),
tiles = {
"mobs_skeleton2_top.png",
"mobs_skeleton2_top.png",
"mobs_skeleton2_side.png",
"mobs_skeleton2_side.png",
"mobs_skeleton2_side.png",
"mobs_skeleton2_front.png"
},
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.00, 0.25},
},
drawtype = "nodebox",
paramtype = "light",
visual_scale = 1.0,
is_ground_content = true,
groups = {cracky=2},
--sounds = default.node_sound_stone_defaults(),
stack_max = 1,
})
minetest.register_node( "mobs_mc:spider_head", {
description = S("Spider Head (WIP)"),
tiles = {
"mobs_spider_top.png",
"mobs_spider_top.png",
"mobs_spider_side.png",
"mobs_spider_side.png",
"mobs_spider_side.png",
"mobs_spider_front.png"
},
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.00, 0.25},
},
drawtype = "nodebox",
paramtype = "light",
visual_scale = 1.0,
is_ground_content = true,
groups = {cracky=2},
--sounds = default.node_sound_stone_defaults(),
stack_max = 1,
})
minetest.register_node( "mobs_mc:zombie_head", {
description = S("Zombie Head (WIP)"),
tiles = {
"mobs_zombie_top.png",
"mobs_zombie_top.png",
"mobs_zombie_side.png",
"mobs_zombie_side.png",
"mobs_zombie_side.png",
"mobs_zombie_front.png"
},
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.00, 0.25},
},
drawtype = "nodebox",
paramtype = "light",
visual_scale = 1.0,
is_ground_content = true,
groups = {cracky=2},
--sounds = default.node_sound_stone_defaults(),
stack_max = 1,
})
minetest.register_node( "mobs_mc:zombiepig_head", {
description = S("Zombie Pigman Head (WIP)"),
tiles = {
"mobs_zombiepig_top.png",
"mobs_zombiepig_top.png",
"mobs_zombiepig_side.png",
"mobs_zombiepig_side.png",
"mobs_zombiepig_side.png",
"mobs_zombiepig_front.png"
},
paramtype2 = "facedir",
node_box = {
type = "fixed",
fixed = {-0.25, -0.5, -0.25, 0.25, 0.00, 0.25},
},
drawtype = "nodebox",
paramtype = "light",
visual_scale = 1.0,
is_ground_content = true,
groups = {cracky=2},
--sounds = default.node_sound_stone_defaults(),
stack_max = 1,
})

View File

@ -55,7 +55,7 @@ end
dofile(path .. "/3_shared.lua")
--Mob heads
dofile(path .. "/heads.lua") -- maikerumine
dofile(path .. "/4_heads.lua")
-- Animals
dofile(path .. "/bat.lua") -- Mesh and animation by toby109tt / https://github.com/22i

View File

@ -52,9 +52,12 @@ local skeleton = {
chance = 1,
min = 0,
max = 2,},
{name = "mobs_mc:skeleton_head",
chance = 200,
min = 0,
-- Head
-- TODO: Only drop if killed by charged creeper
{name = mobs_mc.items.head_skeleton,
chance = 200, -- 0.5% chance
min = 1,
max = 1,},
},
animation = {

View File

@ -1,99 +0,0 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
-- intllib
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--dofile(minetest.get_modpath("mobs").."/api.lua")
--###################
--################### STRAY SKELETON
--###################
mobs:register_mob("mobs_mc:stray", {
type = "monster",
hp_min = 20,
hp_max = 20,
pathfinding = 1,
group_attack = true,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.98, 0.3},
visual = "mesh",
mesh = "mobs_mc_stray.b3d",
textures = {
{"mobs_mc_stray.png^mobs_mc_stray_bow.png"},
},
visual_size = {x=3, y=3},
makes_footstep_sound = true,
sounds = {
random = "skeleton1",
death = "skeletondeath",
damage = "skeletonhurt1",
distance = 16,
},
walk_velocity = 1.2,
run_velocity = 2.4,
damage = 2,
drops = {
{name = mobs_mc.items.arrow,
chance = 1,
min = 0,
max = 2,},
{name = mobs_mc.items.bow,
chance = 11,
min = 1,
max = 1,},
{name = mobs_mc.items.bone,
chance = 1,
min = 0,
max = 2,},
{name = "mobs_mc:skeleton_head",
chance = 50,
min = 0,
max = 1,},
},
animation = {
stand_start = 0,
stand_end = 40,
speed_stand = 5,
walk_start = 40,
walk_end = 60,
speed_walk = 50,
shoot_start = 70,
shoot_end = 90,
punch_start = 70,
punch_end = 90,
die_start = 120,
die_end = 130,
speed_die = 5,
hurt_start = 100,
hurt_end = 120,
},
water_damage = 0,
lava_damage = 4,
light_damage = 1,
fear_height = 4,
view_range = 16,
attack_type = "dogshoot",
arrow = "mobs_mc:arrow_entity",
shoot_interval = 2.5,
shoot_offset = 1,
dogshoot_switch = 1,
dogshoot_count_max =3,
blood_amount = 0,
})
--spawn
mobs:spawn_specific("mobs_mc:stray", mobs_mc.spawn.snow, {"air"}, minetest.LIGHT_MAX+1, minetest.LIGHT_MAX+1, 20, 19000, 2, -110, 31000)
-- spawn eggs
mobs:register_egg("mobs_mc:stray", S("Stray"), "mobs_mc_spawn_icon_stray.png", 0)
if minetest.settings:get_bool("log_mods") then
minetest.log("action", "MC Stray Skeleton loaded")
end

View File

@ -48,9 +48,11 @@ mobs:register_mob("mobs_mc:witherskeleton", {
chance = 1,
min = 0,
max = 2,},
{name = "mobs_mc:skeleton_head2",
chance = 200,
min = 0,
-- Head
{name = mobs_mc.items.head_wither_skeleton,
chance = 40, -- 2.5% chance
min = 1,
max = 1,},
},
animation = {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

View File

@ -62,6 +62,13 @@ local zombie = {
chance = 11,
min = 1,
max = 1,},
-- Head
-- TODO: Only drop if killed by charged creeper
{name = mobs_mc.items.head_zombie,
chance = 200, -- 0.5%
min = 1,
max = 1,},
},
animation = {
speed_normal = 25, speed_run = 50,

View File

@ -56,10 +56,6 @@ local pigman = {
chance = 12, -- 8.333%, approximation to 8.5%
min = 1,
max = 1,},
{name = "mobs_mc:zombiepig_head",
chance = 200,
min = 0,
max = 1,},
},
animation = {
stnd_speed = 25, walk_speed = 25, run_speed = 50, punch_speed = 25,