forked from Mineclonia/Mineclonia
Update mobs_mc
This commit is contained in:
parent
a24f34f1b5
commit
519ee63a57
|
@ -114,7 +114,6 @@ local throwing_shoot_arrow = function(itemstack, player)
|
|||
player:get_inventory():remove_item("main", arrow[1])
|
||||
end
|
||||
local playerpos = player:getpos()
|
||||
--local obj = minetest.env:add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, arrow[2]) --current
|
||||
local obj = minetest.add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, arrow[2]) --mc
|
||||
local dir = player:get_look_dir()
|
||||
obj:setvelocity({x=dir.x*22, y=dir.y*22, z=dir.z*22})
|
||||
|
|
|
@ -23,7 +23,7 @@ Origin of those models:
|
|||
|
||||
## Textures
|
||||
|
||||
* Most mob and item textures from [Pixel Perfection](https://www.planetminecraft.com/texture_pack/131pixel-perfection/), a texture pack for Minecraft.
|
||||
* Mob and item textures from [Pixel Perfection](https://www.planetminecraft.com/texture_pack/131pixel-perfection/), a texture pack for Minecraft.
|
||||
* Author: [XSSheep](https://www.planetminecraft.com/member/xssheep/)
|
||||
* License: CC BY-SA 4.0
|
||||
* “Spawn egg” textures (`mobs_mc_spawn_icon_*`) by 22i
|
||||
|
|
|
@ -99,7 +99,7 @@ mooshroom_def.on_rightclick = function(self, clicker)
|
|||
local cow = minetest.add_entity(pos, "mobs_mc:cow")
|
||||
cow:setyaw(oldyaw)
|
||||
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
item:add_wear(mobs_mc.misc.shears_wear)
|
||||
clicker:get_inventory():set_stack("main", clicker:get_wield_index(), item)
|
||||
end
|
||||
|
@ -145,6 +145,6 @@ mobs:alias_mob("mobs_animal:cow", "mobs_mc:cow")
|
|||
mobs:register_egg("mobs_mc:cow", S("Cow"), "mobs_mc_spawn_icon_cow.png", 0)
|
||||
mobs:register_egg("mobs_mc:mooshroom", S("Mooshroom"), "mobs_mc_spawn_icon_mooshroom.png", 0)
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
if minetest.settings:get_bool("log_mods") then
|
||||
minetest.log("action", "MC Cow loaded")
|
||||
end
|
||||
|
|
|
@ -40,7 +40,7 @@ mobs:register_mob("mobs_mc:creeper", {
|
|||
attack_type = "explode",
|
||||
|
||||
explosion_radius = 3,
|
||||
-- TODO: Disable Mobs Redo fire
|
||||
explosion_fire = false,
|
||||
|
||||
-- Force-ignite creeper with flint and steel and explode after 1.5 seconds.
|
||||
-- TODO: Make creeper flash after doing this as well.
|
||||
|
|
|
@ -108,7 +108,7 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon2", {
|
|||
|
||||
local pos = self.object:getpos()
|
||||
|
||||
local n = minetest.env:get_node(pos).name
|
||||
local n = minetest.get_node(pos).name
|
||||
|
||||
if self.timer == 0 then
|
||||
self.timer = os.time()
|
||||
|
@ -118,7 +118,7 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon2", {
|
|||
self.object:remove()
|
||||
end
|
||||
|
||||
local objects = minetest.env:get_objects_inside_radius(pos, 1)
|
||||
local objects = minetest.get_objects_inside_radius(pos, 1)
|
||||
for _,obj in ipairs(objects) do
|
||||
local name = obj:get_entity_name()
|
||||
if name~="mobs_mc:roar_of_the_dragon2" and name ~= "mobs_mc:enderdragon" then
|
||||
|
@ -131,13 +131,13 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon2", {
|
|||
end
|
||||
end
|
||||
|
||||
minetest.env:set_node(pos, {name="air"})
|
||||
minetest.set_node(pos, {name="air"})
|
||||
if math.random(1,2)==1 then
|
||||
dx = math.random(-1,1)
|
||||
dy = math.random(-1,1)
|
||||
dz = math.random(-1,1)
|
||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||
minetest.env:set_node(p, {name="air"})
|
||||
minetest.set_node(p, {name="air"})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
@ -146,7 +146,7 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon2", {
|
|||
mobs:register_arrow(":mobs_mc:fireball2", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1.5, y = 1.5},
|
||||
textures = {"fire_basic_flame.png"},
|
||||
textures = {"mobs_mc_dragon_fireball.png"},
|
||||
--textures = {"mobs_skeleton2_front.png^[makealpha:255,255,255 "},
|
||||
velocity = 6,
|
||||
|
||||
|
@ -171,7 +171,7 @@ mobs:register_arrow(":mobs_mc:fireball2", {
|
|||
|
||||
-- node hit, bursts into flame
|
||||
hit_node = function(self, pos, node)
|
||||
mobs:explosion(pos, 3, 1, 1)
|
||||
mobs:explosion(pos, 3, 0, 1)
|
||||
--from tnt
|
||||
minetest.sound_play("tnt_explode", {pos = pos, gain = 1.5, max_hear_distance = 2*64})
|
||||
|
||||
|
@ -179,4 +179,3 @@ mobs:register_arrow(":mobs_mc:fireball2", {
|
|||
})
|
||||
|
||||
mobs:register_egg("mobs_mc:enderdragon", S("Ender Dragon"), "mobs_mc_spawn_icon_dragon.png", 0)
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ local place_frequency = 10
|
|||
mobs:register_mob("mobs_mc:enderman", {
|
||||
type = "monster",
|
||||
runaway = true,
|
||||
pathfinding = 2,
|
||||
pathfinding = 1,
|
||||
stepheight = 1.2,
|
||||
hp_min = 40,
|
||||
hp_max = 40,
|
||||
|
|
|
@ -113,5 +113,6 @@ COLISIONBOX in minetest press f5 to see where you are looking at then put these
|
|||
--
|
||||
--
|
||||
|
||||
|
||||
print ("[MOD] Mobs Redo 'MC' loaded")
|
||||
if minetest.settings:get_bool("log_mods") then
|
||||
minetest.log("action", "[MOD] Mobs Redo 'MC' loaded")
|
||||
end
|
||||
|
|
|
@ -138,6 +138,9 @@ mobs:register_mob("mobs_mc:llama", {
|
|||
|
||||
})
|
||||
|
||||
--spawn
|
||||
--mobs:register_spawn("mobs_mc:llama", mobs_mc.spawn.savanna, minetest.LIGHT_MAX+1, 0, 15000, 1, 40)
|
||||
|
||||
-- spawn eggs
|
||||
mobs:register_egg("mobs_mc:llama", S("Llama"), "mobs_mc_spawn_icon_llama.png", 0)
|
||||
|
||||
|
|
|
@ -88,6 +88,8 @@ mobs:register_mob("mobs_mc:parrot", {
|
|||
|
||||
|
||||
--spawn
|
||||
-- TODO: Increase spawn chance if polished
|
||||
--mobs:spawn_specific("mobs_mc:parrot", mobs_mc.spawn.jungle, {"air"}, 0, minetest.LIGHT_MAX+1, 20, 20000, 2, 15, 20)
|
||||
|
||||
-- spawn eggs
|
||||
mobs:register_egg("mobs_mc:parrot", S("Parrot"), "mobs_mc_spawn_icon_parrot.png", 0)
|
||||
|
|
|
@ -177,9 +177,6 @@ mobs:alias_mob("mobs:pig", "mobs_mc:pig")
|
|||
mobs:register_egg("mobs_mc:pig", S("Pig"), "mobs_mc_spawn_icon_pig.png", 0)
|
||||
|
||||
|
||||
if minetest.settings:get("log_mods") then
|
||||
|
||||
|
||||
|
||||
if minetest.settings:get_bool("log_mods") then
|
||||
minetest.log("action", "MC Pig loaded")
|
||||
end
|
||||
|
|
|
@ -169,6 +169,6 @@ mobs:register_egg("mobs_mc:killer_bunny", S("Killer Bunny"), "mobs_mc_spawn_icon
|
|||
-- compatibility
|
||||
mobs:alias_mob("mobs:bunny", "mobs_mc:rabbit")
|
||||
|
||||
if minetest.setting_get("log_mods") then
|
||||
if minetest.settings:get_bool("log_mods") then
|
||||
minetest.log("action", "MC Bunny loaded")
|
||||
end
|
||||
|
|
|
@ -85,10 +85,10 @@ mobs:register_mob("mobs_mc:sheep", {
|
|||
replace_what = mobs_mc.replace.sheep,
|
||||
-- Properly regrow wool after eating grass
|
||||
on_replace = function(self, pos, oldnode, newnode)
|
||||
self.gotten = false
|
||||
if not self.color or not colors[self.color] then
|
||||
self.color = "unicolor_white"
|
||||
end
|
||||
self.gotten = false
|
||||
self.drops = {
|
||||
{name = mobs_mc.items.mutton_raw,
|
||||
chance = 1,
|
||||
|
|
|
@ -49,7 +49,7 @@ mobs:register_egg("mobs_mc:silverfish", S("Silverfish"), "mobs_mc_spawn_icon_sil
|
|||
-- Monster egg blocks (Minetest Game)
|
||||
if minetest.get_modpath("default") and mobs_mc.create_monster_egg_nodes then
|
||||
local spawn_silverfish = function(pos, oldnode, oldmetadata, digger)
|
||||
if not minetest.setting_getbool("creative_mode") then
|
||||
if not minetest.settings:get_bool("creative_mode") then
|
||||
minetest.add_entity(pos, "mobs_mc:silverfish")
|
||||
end
|
||||
end
|
||||
|
|
|
@ -60,7 +60,7 @@ mobs:register_mob("mobs_mc:squid", {
|
|||
|
||||
-- Spawn near the water surface
|
||||
|
||||
local water = tonumber(minetest.setting_get("water_level")) or 0
|
||||
local water = tonumber(minetest.settings:get("water_level")) or 0
|
||||
--name, nodes, neighbours, minlight, maxlight, interval, chance, active_object_count, min_height, max_height
|
||||
mobs:spawn_specific("mobs_mc:squid", mobs_mc.spawn.water, {mobs_mc.items.water_source}, 0, minetest.LIGHT_MAX+1, 30, 5500, 3, water-16, water)
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ mobs:register_mob("mobs_mc:witch", {
|
|||
damage = 2,
|
||||
walk_velocity = 1.2,
|
||||
run_velocity = 2.4,
|
||||
pathfinding = 2,
|
||||
pathfinding = 1,
|
||||
group_attack = true,
|
||||
attack_type = "dogshoot",
|
||||
arrow = "mobs:potion_arrow",
|
||||
|
|
|
@ -58,7 +58,7 @@ mobs:register_mob("mobs_mc:wither", {
|
|||
light_damage = 0,
|
||||
attack_type = "dogshoot",
|
||||
explosion_radius = 3,
|
||||
explosion_fire = 0,
|
||||
explosion_fire = false,
|
||||
dogshoot_stop = true,
|
||||
arrow = "mobs_mc:fireball",
|
||||
reach = 5,
|
||||
|
@ -83,7 +83,7 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon", {
|
|||
|
||||
local pos = self.object:getpos()
|
||||
|
||||
local n = minetest.env:get_node(pos).name
|
||||
local n = minetest.get_node(pos).name
|
||||
|
||||
if self.timer == 0 then
|
||||
self.timer = os.time()
|
||||
|
@ -93,7 +93,7 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon", {
|
|||
self.object:remove()
|
||||
end
|
||||
|
||||
local objects = minetest.env:get_objects_inside_radius(pos, 1)
|
||||
local objects = minetest.get_objects_inside_radius(pos, 1)
|
||||
for _,obj in ipairs(objects) do
|
||||
local name = obj:get_entity_name()
|
||||
if name~="mobs_mc:roar_of_the_dragon" and name ~= "mobs_mc:wither" then
|
||||
|
@ -106,13 +106,13 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon", {
|
|||
end
|
||||
end
|
||||
|
||||
minetest.env:set_node(pos, {name="air"})
|
||||
minetest.set_node(pos, {name="air"})
|
||||
if math.random(1,2)==1 then
|
||||
dx = math.random(-1,1)
|
||||
dy = math.random(-1,1)
|
||||
dz = math.random(-1,1)
|
||||
local p = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||
minetest.env:set_node(p, {name="air"})
|
||||
minetest.set_node(p, {name="air"})
|
||||
end
|
||||
end
|
||||
})
|
||||
|
@ -120,8 +120,9 @@ mobs:register_arrow("mobs_mc:roar_of_the_dragon", {
|
|||
-- fireball (weapon)
|
||||
mobs:register_arrow(":mobs_mc:fireball", {
|
||||
visual = "sprite",
|
||||
visual_size = {x = 1.5, y = 1.5},
|
||||
textures = {"mobs_skeleton2_front.png^[makealpha:255,255,255 "},
|
||||
visual_size = {x = 0.75, y = 0.75},
|
||||
-- TODO: 3D projectile, replace tetxture
|
||||
textures = {"mobs_mc_TEMP_wither_projectile.png"},
|
||||
velocity = 6,
|
||||
|
||||
-- direct hit, no fire... just plenty of pain
|
||||
|
|
Loading…
Reference in New Issue