Compare commits

..

1 Commits

Author SHA1 Message Date
epCode f89c8e3ce2 fix fox spawns 2021-03-26 15:24:00 -07:00
38 changed files with 15 additions and 903 deletions

108
cod.lua
View File

@ -1,108 +0,0 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local pi = math.pi
local atann = math.atan
local atan = function(x)
if not x or x ~= x then
return 0
else
return atann(x)
end
end
local dir_to_pitch = function(dir)
local dir2 = vector.normalize(dir)
local xz = math.abs(dir.x) + math.abs(dir.z)
return -math.atan2(-dir.y, xz)
end
local function degrees(rad)
return rad * 180.0 / math.pi
end
local S = minetest.get_translator("extra_mobs")
--###################
--################### cod
--###################
local cod = {
type = "animal",
spawn_class = "water",
can_despawn = true,
passive = true,
hp_min = 3,
hp_max = 3,
xp_min = 1,
xp_max = 3,
armor = 100,
collisionbox = {-0.3, 0.0, -0.3, 0.3, 0.79, 0.3},
visual = "mesh",
mesh = "extra_mobs_cod.b3d",
textures = {
{"extra_mobs_cod.png"}
},
sounds = {
},
animation = {
stand_start = 1,
stand_end = 20,
walk_start = 1,
walk_end = 20,
run_start = 1,
run_end = 20,
},
drops = {
{name = "mcl_fishing:fish_raw",
chance = 1,
min = 1,
max = 1,},
{name = "mcl_dye:white",
chance = 20,
min = 1,
max = 1,},
},
visual_size = {x=3, y=3},
makes_footstep_sound = false,
fly = true,
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
breathes_in_water = true,
jump = false,
view_range = 16,
runaway = true,
fear_height = 4,
do_custom = function(self)
self.object:set_bone_position("body", vector.new(0,1,0), vector.new(degrees(dir_to_pitch(self.object:get_velocity())) * -1 + 90,0,0))
if minetest.get_item_group(self.standing_in, "water") ~= 0 then
if self.object:get_velocity().y < 2.5 then
self.object:add_velocity({ x = 0 , y = math.random(-.002, .002) , z = 0 })
end
end
for _,object in pairs(minetest.get_objects_inside_radius(self.object:get_pos(), 10)) do
local lp = object:get_pos()
local s = self.object:get_pos()
local vec = {
x = lp.x - s.x,
y = lp.y - s.y,
z = lp.z - s.z
}
if not object:is_player() and object:get_luaentity().name == "extra_mobs:cod" then
self.state = "runaway"
self.object:set_rotation({x=0,y=(atan(vec.z / vec.x) + 3 * pi / 2) - self.rotate,z=0})
end
end
end
}
mobs:register_mob("extra_mobs:cod", cod)
--spawning TODO: in schools
local water = mobs_mc.spawn_height.water
mobs:spawn_specific("extra_mobs:cod", mobs_mc.spawn.water, {mobs_mc.items.water_source}, 0, minetest.LIGHT_MAX+1, 30, 4000, 3, water-16, water)
--spawn egg
mobs:register_egg("extra_mobs:cod", S("Cod"), "extra_mobs_spawn_icon_cod.png", 0)

View File

@ -1,97 +0,0 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local pi = math.pi
local atann = math.atan
local atan = function(x)
if not x or x ~= x then
return 0
else
return atann(x)
end
end
local dir_to_pitch = function(dir)
local dir2 = vector.normalize(dir)
local xz = math.abs(dir.x) + math.abs(dir.z)
return -math.atan2(-dir.y, xz)
end
local function degrees(rad)
return rad * 180.0 / math.pi
end
local S = minetest.get_translator("extra_mobs")
--###################
--################### dolphin
--###################
local dolphin = {
type = "monster",
spawn_class = "water",
can_despawn = true,
passive = true,
hp_min = 10,
hp_max = 10,
xp_min = 1,
xp_max = 3,
armor = 100,
walk_chance = 100,
breath_max = 120,
collisionbox = {-0.3, 0.0, -0.3, 0.3, 0.79, 0.3},
visual = "mesh",
mesh = "extra_mobs_dolphin.b3d",
textures = {
{"extra_mobs_dolphin.png"}
},
sounds = {
},
animation = {
stand_start = 20,
stand_end = 20,
walk_start = 0,
walk_end = 15,
run_start = 30,
run_end = 45,
},
drops = {
{name = "mcl_fishing:fish_raw",
chance = 1,
min = 0,
max = 1,},
},
visual_size = {x=3, y=3},
makes_footstep_sound = false,
fly = true,
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
breathes_in_water = true,
jump = false,
view_range = 16,
fear_height = 4,
walk_velocity = 3,
run_velocity = 6,
reach = 2,
damage = 2.5,
attack_type = "dogfight",
do_custom = function(self)
self.object:set_bone_position("body", vector.new(0,1,0), vector.new(degrees(dir_to_pitch(self.object:get_velocity())) * -1 + 90,0,0))
if minetest.get_item_group(self.standing_in, "water") ~= 0 then
if self.object:get_velocity().y < 5 then
self.object:add_velocity({ x = 0 , y = math.random(-.007, .007), z = 0 })
end
end
end,
}
mobs:register_mob("extra_mobs:dolphin", dolphin)
--spawning TODO: in schools
local water = mobs_mc.spawn_height.water
mobs:spawn_specific("extra_mobs:dolphin", mobs_mc.spawn.water, {mobs_mc.items.water_source}, 0, minetest.LIGHT_MAX+1, 30, 4000, 3, water-16, water)
--spawn egg
mobs:register_egg("extra_mobs:dolphin", S("dolphin"), "extra_mobs_spawn_icon_dolphin.png", 0)

16
fox.lua
View File

@ -18,13 +18,6 @@ local S = minetest.get_translator("extra_mobs")
--################### fox
--###################
local followitem = ""
if minetest.get_modpath("mc_sweet_berry") then
followitem = "mc_sweet_berry:sweet_berry"
else
followitem = nil
end
local fox = {
type = "monster",
passive = false,
@ -37,7 +30,7 @@ local fox = {
attack_type = "dogfight",
damage = 2,
reach = 1.5,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3},
collisionbox = {-.6, -0.01, -.6, .6, 1.4, .6},
visual = "mesh",
mesh = "extra_mobs_fox.b3d",
textures = { {
@ -115,19 +108,18 @@ local fox = {
do_punch = function(self)
self.state = "runaway"
end,
follow = followitem,
fear_height = 4,
view_range = 16,
specific_attack = { "mobs_mc:chicken", "extra_mobs:cod", "extra_mobs:salmon" },
specific_attack = { "mobs_mc:cow", "mobs_mc:sheep", "mobs_mc:chicken" },
}
mobs:register_mob("extra_mobs:fox", fox)
-- spawning
-- Regular spawning in the Nether
mobs:spawn_specific("extra_mobs:fox", {"mcl_core:dirt_with_grass"}, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 6000, 3, 0, 500)
mobs:spawn_specific("extra_mobs:fox", {"mcl_core:dirt_with_grass_snow"}, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 6000, 3, 0, 500)
mobs:spawn_specific("extra_mobs:artic_fox", {"mcl_core:snow"}, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 6000, 3, 0, 500)
mobs:spawn_specific("extra_mobs:fox", {"mcl_core:snow"}, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 6000, 3, 0, 500)
-- spawn eggs
mobs:register_egg("extra_mobs:fox", S("Fox"), "extra_mobs_spawn_icon_fox.png", 0)

View File

@ -1,65 +0,0 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local S = minetest.get_translator("extra_mobs")
mobs:register_mob("extra_mobs:glow_squid",{
type = "animal",
spawn_class = "water",
can_despawn = true,
passive = true,
hp_min = 10,
hp_max = 10,
xp_min = 1,
xp_max = 3,
armor = 100,
-- FIXME: If the qlow squid is near the floor, it turns black
collisionbox = {-0.4, 0.0, -0.4, 0.4, 0.9, 0.4},
visual = "mesh",
mesh = "extra_mobs_glow_squid.b3d",
textures = {
{"extra_mobs_glow_squid.png"}
},
sounds = {
damage = {name="mobs_mc_squid_hurt", gain=0.3},
death = {name="mobs_mc_squid_death", gain=0.4},
flop = "mobs_mc_squid_flop",
distance = 16,
},
animation = {
stand_start = 1,
stand_end = 60,
walk_start = 1,
walk_end = 60,
run_start = 1,
run_end = 60,
},
drops = {
{name = "extra_mobs:glow_ink_sac",
chance = 1,
min = 1,
max = 3,
looting = "common",},
},
visual_size = {x=3, y=3},
makes_footstep_sound = false,
fly = true,
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
breathes_in_water = true,
jump = false,
view_range = 16,
runaway = true,
fear_height = 4,
glow = minetest.LIGHT_MAX,
})
-- spawning
local water = mobs_mc.spawn_height.water
mobs:spawn_specific("extra_mobs:glow_squid", mobs_mc.spawn.water, {mobs_mc.items.water_source}, 0, minetest.LIGHT_MAX+1, 30, 10000, 3, water-16, water)
-- spawn egg
mobs:register_egg("extra_mobs:glow_squid", S("Glow Squid"), "extra_mobs_spawn_icon_glow_squid.png", 0)

View File

@ -1,328 +0,0 @@
local S = minetest.get_translator("extra_mobs")
minetest.register_craftitem("extra_mobs:glow_ink_sac", {
description = S("Glow Ink Sac"),
_doc_items_longdesc = S("Use it to craft the Glow Item Frame."),
_doc_items_usagehelp = S("Use the Glow Ink Sac and the normal Item Frame to craft the Glow Item Frame."),
inventory_image = "extra_mobs_glow_ink_sac.png",
groups = { craftitem = 1 },
})
--------------------
--[[This mod is originally by Zeg9, but heavily modified for MineClone 2.
Model created by 22i, licensed under the
GNU GPLv3 <https://www.gnu.org/licenses/gpl-3.0.html>.
Source: <https://github.com/22i/amc>
]]
local VISUAL_SIZE = 0.3
minetest.register_entity("extra_mobs:glow_item_frame_item",{
hp_max = 1,
visual = "wielditem",
visual_size = {x=VISUAL_SIZE, y=VISUAL_SIZE},
physical = false,
pointable = false,
textures = { "blank.png" },
_texture = "blank.png",
_scale = 1,
on_activate = function(self, staticdata)
if staticdata ~= nil and staticdata ~= "" then
local data = staticdata:split(';')
if data and data[1] and data[2] then
self._nodename = data[1]
self._texture = data[2]
if data[3] then
self._scale = data[3]
else
self._scale = 1
end
end
end
if self._texture ~= nil then
self.object:set_properties({
textures={self._texture},
visual_size={x=VISUAL_SIZE/self._scale, y=VISUAL_SIZE/self._scale},
})
end
end,
get_staticdata = function(self)
if self._nodename ~= nil and self._texture ~= nil then
local ret = self._nodename .. ';' .. self._texture
if self._scale ~= nil then
ret = ret .. ';' .. self._scale
end
return ret
end
return ""
end,
_update_texture = function(self)
if self._texture ~= nil then
self.object:set_properties({
textures={self._texture},
visual_size={x=VISUAL_SIZE/self._scale, y=VISUAL_SIZE/self._scale},
})
end
end,
})
local facedir = {}
facedir[0] = {x=0,y=0,z=1}
facedir[1] = {x=1,y=0,z=0}
facedir[2] = {x=0,y=0,z=-1}
facedir[3] = {x=-1,y=0,z=0}
local remove_item_entity = function(pos, node)
local objs = nil
if node.name == "extra_mobs:glow_item_frame" then
objs = minetest.get_objects_inside_radius(pos, .5)
end
if objs then
for _, obj in ipairs(objs) do
if obj and obj:get_luaentity() and obj:get_luaentity().name == "extra_mobs:glow_item_frame_item" then
obj:remove()
end
end
end
end
local update_item_entity = function(pos, node, param2)
remove_item_entity(pos, node)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local item = inv:get_stack("main", 1)
if not item:is_empty() then
if not param2 then
param2 = node.param2
end
if node.name == "extra_mobs:glow_item_frame" then
local posad = facedir[param2]
pos.x = pos.x + posad.x*6.5/16
pos.y = pos.y + posad.y*6.5/16
pos.z = pos.z + posad.z*6.5/16
end
local e = minetest.add_entity(pos, "extra_mobs:glow_item_frame_item")
local lua = e:get_luaentity()
lua._nodename = node.name
local itemname = item:get_name()
if itemname == "" or itemname == nil then
lua._texture = "blank.png"
lua._scale = 1
else
lua._texture = itemname
local def = minetest.registered_items[itemname]
if def and def.wield_scale then
lua._scale = def.wield_scale.x
else
lua._scale = 1
end
end
lua:_update_texture()
if node.name == "extra_mobs:glow_item_frame" then
local yaw = math.pi*2 - param2 * math.pi/2
e:set_yaw(yaw)
end
end
end
local drop_item = function(pos, node, meta, clicker)
local cname = ""
if clicker and clicker:is_player() then
cname = clicker:get_player_name()
end
if node.name == "extra_mobs:glow_item_frame" and not minetest.is_creative_enabled(cname) then
local inv = meta:get_inventory()
local item = inv:get_stack("main", 1)
if not item:is_empty() then
minetest.add_item(pos, item)
end
end
meta:set_string("infotext", "")
remove_item_entity(pos, node)
end
minetest.register_node("extra_mobs:glow_item_frame",{
description = S("Glow Item Frame"),
_tt_help = S("Can hold an item and glows"),
_doc_items_longdesc = S("Glow Item frames are decorative blocks in which items can be placed."),
_doc_items_usagehelp = S("Just place any item on the item frame. Use the item frame again to retrieve the item."),
drawtype = "mesh",
is_ground_content = false,
mesh = "extra_mobs_glow_item_frame.obj",
selection_box = { type = "fixed", fixed = {-6/16, -6/16, 7/16, 6/16, 6/16, 0.5} },
collision_box = { type = "fixed", fixed = {-6/16, -6/16, 7/16, 6/16, 6/16, 0.5} },
tiles = {"extra_mobs_glow_item_frame_border.png", "extra_mobs_glow_item_frame_border.png", "extra_mobs_glow_item_frame_border.png", "extra_mobs_glow_item_frame_border.png", "extra_mobs_glow_item_frame_border.png", "extra_mobs_glow_item_frame_border.png"},
inventory_image = "extra_mobs_glow_item_frame_item.png",
wield_image = "extra_mobs_glow_item_frame.png",
paramtype = "light",
paramtype2 = "facedir",
--FIXME: should only be glowing, no light source. How is that possible with a node?
light_source = minetest.LIGHT_MAX,
sunlight_propagates = true,
groups = { dig_immediate=3,deco_block=1,dig_by_piston=1,container=7,attached_node_facedir=1 },
sounds = mcl_sounds.node_sound_defaults(),
node_placement_prediction = "",
on_place = function(itemstack, placer, pointed_thing)
if pointed_thing.type ~= "node" then
return itemstack
end
-- Use pointed node's on_rightclick function first, if present
local node = minetest.get_node(pointed_thing.under)
if placer and not placer:get_player_control().sneak then
if minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then
return minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) or itemstack
end
end
return minetest.item_place(itemstack, placer, pointed_thing, minetest.dir_to_facedir(vector.direction(pointed_thing.above, pointed_thing.under)))
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("main", 1)
end,
on_rightclick = function(pos, node, clicker, itemstack)
if not itemstack then
return
end
local pname = clicker:get_player_name()
if minetest.is_protected(pos, pname) then
minetest.record_protection_violation(pos, pname)
return
end
local meta = minetest.get_meta(pos)
drop_item(pos, node, meta, clicker)
local inv = meta:get_inventory()
if itemstack:is_empty() then
remove_item_entity(pos, node)
meta:set_string("infotext", "")
inv:set_stack("main", 1, "")
return itemstack
end
local put_itemstack = ItemStack(itemstack)
put_itemstack:set_count(1)
inv:set_stack("main", 1, put_itemstack)
update_item_entity(pos, node)
-- Add node infotext when item has been named
local imeta = itemstack:get_meta()
local iname = imeta:get_string("name")
if iname then
meta:set_string("infotext", iname)
end
if not minetest.is_creative_enabled(clicker:get_player_name()) then
itemstack:take_item()
end
return itemstack
end,
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
else
return count
end
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
else
return stack:get_count()
end
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local name = player:get_player_name()
if minetest.is_protected(pos, name) then
minetest.record_protection_violation(pos, name)
return 0
else
return stack:get_count()
end
end,
on_destruct = function(pos)
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
drop_item(pos, node, meta)
end,
on_rotate = function(pos, node, user, mode, param2)
if mode == screwdriver.ROTATE_FACE then
-- Rotate face
local meta = minetest.get_meta(pos)
local node = minetest.get_node(pos)
local objs = nil
if node.name == "extra_mobs:glow_item_frame" then
objs = minetest.get_objects_inside_radius(pos, .5)
end
if objs then
for _, obj in ipairs(objs) do
if obj and obj:get_luaentity() and obj:get_luaentity().name == "extra_mobs:glow_item_frame_item" then
update_item_entity(pos, node, (node.param2+1) % 4)
break
end
end
end
return
elseif mode == screwdriver.ROTATE_AXIS then
return false
end
end,
})
minetest.register_craft({
type = "shapeless",
output = 'extra_mobs:glow_item_frame',
recipe = {'mcl_itemframes:item_frame', 'extra_mobs:glow_ink_sac'},
})
minetest.register_lbm({
label = "Update legacy item frames",
name = "extra_mobs:update_legacy_glow_item_frames",
nodenames = {"extra_mobs:glow_frame"},
action = function(pos, node)
-- Swap legacy node, then respawn entity
node.name = "extra_mobs:glow_item_frame"
local meta = minetest.get_meta(pos)
local item = meta:get_string("item")
minetest.swap_node(pos, node)
if item ~= "" then
local itemstack = ItemStack(minetest.deserialize(meta:get_string("itemdata")))
local inv = meta:get_inventory()
inv:set_size("main", 1)
if not itemstack:is_empty() then
inv:set_stack("main", 1, itemstack)
end
end
update_item_entity(pos, node)
end,
})
-- FIXME: Item entities can get destroyed by /clearobjects
minetest.register_lbm({
label = "Respawn item frame item entities",
name = "extra_mobs:respawn_entities",
nodenames = {"extra_mobs:glow_item_frame"},
run_at_every_load = true,
action = function(pos, node)
update_item_entity(pos, node)
end,
})
minetest.register_alias("extra_mobs:glow_frame", "extra_mobs:glow_item_frame")
--------------------

View File

@ -17,12 +17,3 @@ dofile(path .. "/piglin.lua")
--Animals
dofile(path .. "/strider.lua")
dofile(path .. "/fox.lua")
dofile(path .. "/cod.lua")
dofile(path .. "/salmon.lua")
dofile(path .. "/dolphin.lua")
dofile(path .. "/glow_squid.lua")
--Items
dofile(path .. "/glow_squid_items.lua")

View File

@ -1,3 +1,3 @@
name = extra_mobs
depends = mcl_mobs, mobs_mc
optional_depends = mc_warped_fungus_stick, mc_sweet_berry
depends = mcl_mobs
optional_depends = mc

Binary file not shown.

Binary file not shown.

View File

@ -1,156 +0,0 @@
# Blender v2.76 (sub 0) OBJ File: 'itemframe1facedir.blend'
# www.blender.org
mtllib itemframe1facedir.mtl
o right.frame_Cube.005
v -0.313413 -0.313413 0.435326
v -0.313413 0.313413 0.435326
v -0.313413 -0.313413 0.498008
v -0.313413 0.313413 0.498008
v -0.376095 -0.313413 0.435326
v -0.376095 0.313413 0.435326
v -0.376095 -0.313413 0.498008
v -0.376095 0.313413 0.498008
vt 0.875000 0.812500
vt 0.812500 0.812500
vt 0.812500 0.187500
vt 0.875000 0.187500
vt 1.000000 0.812500
vt 0.937500 0.812500
vt 0.937500 0.187500
vt 1.000000 0.187500
vt -0.000000 0.937500
vt 0.062500 0.937500
vt 0.062500 1.000000
vt -0.000000 1.000000
vn 1.000000 0.000000 -0.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn -0.000000 0.000000 -1.000000
vn 0.000000 -1.000000 -0.000000
vn 0.000000 1.000000 0.000000
usemtl None
s off
f 2/1/1 4/2/1 3/3/1 1/4/1
f 4/1/2 8/2/2 7/3/2 3/4/2
f 8/5/3 6/6/3 5/7/3 7/8/3
f 6/1/4 2/2/4 1/3/4 5/4/4
f 1/9/5 3/10/5 7/11/5 5/12/5
f 6/9/6 8/10/6 4/11/6 2/12/6
o left.frame_Cube.004
v 0.376095 -0.313413 0.435326
v 0.376095 0.313413 0.435326
v 0.376095 -0.313413 0.498008
v 0.376095 0.313413 0.498008
v 0.313413 -0.313413 0.435326
v 0.313413 0.313413 0.435326
v 0.313413 -0.313413 0.498008
v 0.313413 0.313413 0.498008
vt 0.875000 0.812500
vt 0.812500 0.812500
vt 0.812500 0.187500
vt 0.875000 0.187500
vt 1.000000 0.812500
vt 0.937500 0.812500
vt 0.937500 0.187500
vt 1.000000 0.187500
vt -0.000000 0.937500
vt 0.062500 0.937500
vt 0.062500 1.000000
vt -0.000000 1.000000
vn 1.000000 0.000000 -0.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn 0.000000 0.000000 -1.000000
vn 0.000000 -1.000000 -0.000000
vn 0.000000 1.000000 0.000000
usemtl None
s off
f 10/13/7 12/14/7 11/15/7 9/16/7
f 12/13/8 16/14/8 15/15/8 11/16/8
f 16/17/9 14/18/9 13/19/9 15/20/9
f 14/13/10 10/14/10 9/15/10 13/16/10
f 9/21/11 11/22/11 15/23/11 13/24/11
f 14/21/12 16/22/12 12/23/12 10/24/12
o lower.frame_Cube.003
v 0.376095 -0.376095 0.435326
v 0.376095 -0.313413 0.435326
v 0.376095 -0.376095 0.498008
v 0.376095 -0.313413 0.498008
v -0.376095 -0.376095 0.435326
v -0.376095 -0.313413 0.435326
v -0.376095 -0.376095 0.498008
v -0.376095 -0.313413 0.498008
vt 0.187500 0.187500
vt 0.125000 0.187500
vt 0.125000 0.125000
vt 0.187500 0.125000
vt 0.875000 0.187500
vt 0.875000 0.125000
vt 0.812500 0.187500
vt 0.812500 0.125000
vt 0.875000 0.937500
vt 0.875000 1.000000
vt 0.125000 1.000000
vt 0.125000 0.937500
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn -0.000000 0.000000 -1.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
usemtl None
s off
f 18/25/13 20/26/13 19/27/13 17/28/13
f 20/29/14 24/26/14 23/27/14 19/30/14
f 24/29/15 22/31/15 21/32/15 23/30/15
f 22/29/16 18/26/16 17/27/16 21/30/16
f 17/33/17 19/34/17 23/35/17 21/36/17
f 22/30/18 24/29/18 20/26/18 18/27/18
o upper.frame_Cube.002
v 0.376095 0.313413 0.435326
v 0.376095 0.376095 0.435326
v 0.376095 0.313413 0.498008
v 0.376095 0.376095 0.498008
v -0.376095 0.313413 0.435326
v -0.376095 0.376095 0.435326
v -0.376095 0.313413 0.498008
v -0.376095 0.376095 0.498008
vt 0.187500 0.875000
vt 0.125000 0.875000
vt 0.125000 0.812500
vt 0.187500 0.812500
vt 0.875000 0.875000
vt 0.875000 0.812500
vt 0.812500 0.875000
vt 0.812500 0.812500
vt 0.875000 0.937500
vt 0.875000 1.000000
vt 0.125000 1.000000
vt 0.125000 0.937500
vn 1.000000 0.000000 0.000000
vn 0.000000 0.000000 1.000000
vn -1.000000 0.000000 0.000000
vn -0.000000 0.000000 -1.000000
vn 0.000000 -1.000000 0.000000
vn 0.000000 1.000000 0.000000
usemtl None
s off
f 26/37/19 28/38/19 27/39/19 25/40/19
f 28/41/20 32/38/20 31/39/20 27/42/20
f 32/41/21 30/43/21 29/44/21 31/42/21
f 30/41/22 26/38/22 25/39/22 29/42/22
f 25/45/23 27/46/23 31/47/23 29/48/23
f 30/48/24 32/38/24 28/41/24 26/45/24
o background_Plane
v 0.313413 -0.313413 0.466667
v -0.313413 -0.313413 0.466667
v 0.313413 0.313413 0.466667
v -0.313413 0.313413 0.466667
vt 0.187500 0.187500
vt 0.812500 0.187500
vt 0.812500 0.812500
vt 0.187500 0.812500
vn -0.000000 0.000000 -1.000000
usemtl None
s off
f 33/49/25 34/50/25 36/51/25 35/52/25

Binary file not shown.

View File

@ -35,12 +35,12 @@ local piglin = {
armor = {fleshy = 90},
damage = 4,
reach = 3,
collisionbox = {-0.3, -0.01, -0.3, 0.3, 1.94, 0.3},
collisionbox = {-.6, -0.01, -.6, .6, 1.4, .6},
visual = "mesh",
mesh = "extra_mobs_piglin.b3d",
textures = { {
"extra_mobs_piglin.png",
"mcl_bows_bow_2.png",
"mcl_bows_crossbow_2.png",
} },
visual_size = {x=1, y=1},
sounds = {
@ -72,15 +72,10 @@ local piglin = {
fear_height = 4,
view_range = 16,
on_spawn = function(self)
self.weapon = self.base_texture[2]
self.gold_items = 0
self.weapon = self.base_texture[2]
end,
do_custom = function(self)
if self.object:get_pos().y > -100 then
--local zog = minetest.add_entity(self.object:get_pos(), "extra_mobs:zombified_piglin")
--zog:set_rotation(self.object:get_rotation())
--self.object:remove()
end
if self.trading == true then
self.state = "trading"
self.object:set_bone_position("Arm_Right_Pitch_Control", vector.new(-3,5.785,0), vector.new(20,-20,18))
@ -88,7 +83,7 @@ local piglin = {
self.base_texture[2] = "default_gold_ingot.png"
self.object:set_properties({textures = self.base_texture})
else
self.object:set_bone_position("Wield_Item", vector.new(.5,4.5,-1.6), vector.new(90,0,20))
self.object:set_bone_position("Wield_Item", vector.new(-1.5,7,1.5), vector.new(170,90,90))
self.base_texture[2] = self.weapon
self.object:set_properties({textures = self.base_texture})
self.object:set_bone_position("Head", vector.new(0,6.3,0), vector.new(0,0,0))
@ -193,17 +188,15 @@ zombified_piglin.fire_resistant = 1
zombified_piglin.do_custom = function()
return
end
zombified_piglin.on_spawn = function()
return
end
zombified_piglin.on_rightclick = function()
return
end
zombified_piglin.attacks_monsters = true
zombified_piglin.lava_damage = 0
zombified_piglin.fire_damage = 0
zombified_piglin.attack_animals = true
zombified_piglin.mesh = "extra_mobs_sword_piglin.b3d"
zombified_piglin.textures = {"extra_mobs_zombified_piglin.png", "default_tool_goldsword.png", "extra_mobs_trans.png"}
zombified_piglin.on_spawn = function()
return
end
zombified_piglin.attack_type = "dogfight"
zombified_piglin.animation = {
stand_speed = 30,
@ -222,50 +215,7 @@ zombified_piglin.animation = {
mobs:register_mob("extra_mobs:zombified_piglin", zombified_piglin)
local piglin_brute = table.copy(piglin)
piglin_brute.xp_min = 20
piglin_brute.xp_max = 20
piglin_brute.hp_min = 50
piglin_brute.hp_max = 50
piglin_brute.fire_resistant = 1
piglin_brute.do_custom = function()
return
end
piglin_brute.on_spawn = function()
return
end
piglin_brute.on_rightclick = function()
return
end
piglin_brute.attacks_monsters = true
piglin_brute.lava_damage = 0
piglin_brute.fire_damage = 0
piglin_brute.attack_animals = true
piglin_brute.mesh = "extra_mobs_sword_piglin.b3d"
piglin_brute.textures = {"extra_mobs_piglin_brute.png", "default_tool_goldaxe.png", "extra_mobs_trans.png"}
piglin_brute.attack_type = "dogfight"
piglin_brute.animation = {
stand_speed = 30,
walk_speed = 30,
punch_speed = 45,
run_speed = 30,
stand_start = 0,
stand_end = 79,
walk_start = 168,
walk_end = 187,
run_start = 440,
run_end = 459,
punch_start = 189,
punch_end = 198,
}
piglin_brute.can_despawn = false
piglin_brute.group_attack = { "extra_mobs:piglin", "extra_mobs:piglin_brute" }
mobs:register_mob("extra_mobs:piglin_brute", piglin_brute)
-- Regular spawning in the Nether
mobs:spawn_specific("extra_mobs:piglin", {"mcl_nether:netherrack"}, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 6000, 3, mcl_vars.mg_nether_min, mcl_vars.mg_nether_max)
mobs:spawn_specific("extra_mobs:sword_piglin", {"mcl_nether:netherrack"}, {"air"}, 0, minetest.LIGHT_MAX+1, 30, 6000, 3, mcl_vars.mg_nether_min, mcl_vars.mg_nether_max)
-- spawn eggs
mobs:register_egg("extra_mobs:piglin", S("piglin"), "extra_mobs_spawn_icon_piglin.png", 0)
mobs:register_egg("extra_mobs:piglin_brute", S("piglin Brute"), "extra_mobs_spawn_icon_piglin.png", 0)

View File

@ -1,67 +0,0 @@
--MCmobs v0.4
--maikerumine
--made for MC like Survival game
--License for code WTFPL and otherwise stated in readmes
local S = minetest.get_translator("extra_mobs")
--###################
--################### salmon
--###################
local salmon = {
type = "animal",
spawn_class = "water",
can_despawn = true,
passive = true,
hp_min = 3,
hp_max = 3,
xp_min = 1,
xp_max = 3,
armor = 100,
collisionbox = {-0.4, 0.0, -0.4, 0.4, 0.79, 0.4},
visual = "mesh",
mesh = "extra_mobs_salmon.b3d",
textures = {
{"extra_mobs_salmon.png"}
},
sounds = {
},
animation = {
stand_start = 1,
stand_end = 20,
walk_start = 1,
walk_end = 20,
run_start = 1,
run_end = 20,
},
drops = {
{name = "mcl_fishing:salmon_raw",
chance = 1,
min = 1,
max = 1,},
{name = "mcl_dye:white",
chance = 20,
min = 1,
max = 1,},
},
visual_size = {x=3, y=3},
makes_footstep_sound = false,
fly = true,
fly_in = { mobs_mc.items.water_source, mobs_mc.items.river_water_source },
breathes_in_water = true,
jump = false,
view_range = 16,
runaway = true,
fear_height = 4,
}
mobs:register_mob("extra_mobs:salmon", salmon)
--spawning TODO: in schools
local water = mobs_mc.spawn_height.water
mobs:spawn_specific("extra_mobs:salmon", mobs_mc.spawn.water, {mobs_mc.items.water_source}, 0, minetest.LIGHT_MAX+1, 30, 4000, 3, water-16, water)
--spawn egg
mobs:register_egg("extra_mobs:salmon", S("Salmon"), "extra_mobs_spawn_icon_salmon.png", 0)

View File

@ -117,7 +117,7 @@ local strider = {
local controlitem = ""
if minetest.get_modpath("mc") then
controlitem = "mc_warped_fungus_stick:warped_fungus_stick"
controlitem = "mc:warped_fungus_stick"
else
controlitem = mobs_mc.items.carrot_on_a_stick
end

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 984 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 830 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB