From 042ca3fa4e288e01363b2b073b56ce7056f91ff8 Mon Sep 17 00:00:00 2001 From: Jacob Gustafson <7557867+poikilos@users.noreply.github.com> Date: Sun, 23 Feb 2020 09:21:21 -0500 Subject: [PATCH] Revert "Add ExcaliburZero dragon" --- init.lua | 118 +++++------- models/mobs_dragon.x | 448 ------------------------------------------- 2 files changed, 51 insertions(+), 515 deletions(-) delete mode 100644 models/mobs_dragon.x diff --git a/init.lua b/init.lua index 3f5991f..0bf5f26 100644 --- a/init.lua +++ b/init.lua @@ -3,10 +3,11 @@ dofile(minetest.get_modpath("mobs").."/api.lua") mobs:register_mob("mobs:dirt_monster", { type = "monster", hp_max = 5, - collisionbox = {-0.4, -1, -0.4, 0.4, 0.9, 0.4}, - visual = "upright_sprite", - visual_size = {x=1, y=2}, - textures = {"mobs_dirt_monster.png", "mobs_dirt_monster_back.png"}, + 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 = 15, walk_velocity = 1, @@ -25,8 +26,20 @@ mobs:register_mob("mobs:dirt_monster", { light_damage = 2, on_rightclick = nil, attack_type = "dogfight", + animation = { + speed_normal = 15, + speed_run = 15, + stand_start = 0, + stand_end = 14, + walk_start = 15, + walk_end = 38, + run_start = 40, + run_end = 63, + punch_start = 40, + punch_end = 63, + } }) ---mobs:register_spawn("mobs:dirt_monster", {"default:dirt_with_grass"}, 3, -1, 7000, 3, 31000) +mobs:register_spawn("mobs:dirt_monster", {"default:dirt_with_grass"}, 3, -1, 7000, 3, 31000) mobs:register_mob("mobs:stone_monster", { type = "monster", @@ -67,7 +80,7 @@ mobs:register_mob("mobs:stone_monster", { punch_end = 63, } }) ---mobs:register_spawn("mobs:stone_monster", {"default:stone"}, 3, -1, 7000, 3, 0) +mobs:register_spawn("mobs:stone_monster", {"default:stone"}, 3, -1, 7000, 3, 0) mobs:register_mob("mobs:sand_monster", { type = "monster", @@ -108,7 +121,7 @@ mobs:register_mob("mobs:sand_monster", { punch_end = 105, }, }) ---mobs:register_spawn("mobs:sand_monster", {"default:desert_sand"}, 20, -1, 7000, 3, 31000) +mobs:register_spawn("mobs:sand_monster", {"default:desert_sand"}, 20, -1, 7000, 3, 31000) mobs:register_mob("mobs:tree_monster", { type = "monster", @@ -154,7 +167,7 @@ mobs:register_mob("mobs:tree_monster", { punch_end = 62, }, }) ---mobs:register_spawn("mobs:tree_monster", {"default:leaves", "default:jungleleaves"}, 3, -1, 7000, 3, 31000) +mobs:register_spawn("mobs:tree_monster", {"default:leaves", "default:jungleleaves"}, 3, -1, 7000, 3, 31000) mobs:register_mob("mobs:sheep", { type = "animal", @@ -186,12 +199,36 @@ mobs:register_mob("mobs:sheep", { walk_start = 81, walk_end = 100, }, + follow = "farming:wheat", + view_range = 5, on_rightclick = function(self, clicker) - if self.naked then + local item = clicker:get_wielded_item() + if item:get_name() == "farming:wheat" 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 + elseif self.naked then + if not minetest.setting_getbool("creative_mode") 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 = {"mobs_sheep.png"}, + mesh = "mobs_sheep.x", + }) + end + end return end - if clicker:get_inventory() then + if clicker:get_inventory() and not self.naked then self.naked = true if minetest.registered_items["wool:white"] then clicker:get_inventory():add_item("main", ItemStack("wool:white "..math.random(1,3))) @@ -203,7 +240,7 @@ mobs:register_mob("mobs:sheep", { end end, }) ---mobs:register_spawn("mobs:sheep", {"default:dirt_with_grass"}, 20, 8, 9000, 1, 31000) +mobs:register_spawn("mobs:sheep", {"default:dirt_with_grass"}, 20, 8, 9000, 1, 31000) minetest.register_craftitem("mobs:meat_raw", { description = "Raw Meat", @@ -246,7 +283,7 @@ mobs:register_mob("mobs:rat", { end end, }) ---mobs:register_spawn("mobs:rat", {"default:dirt_with_grass", "default:stone"}, 20, -1, 7000, 1, 31000) +mobs:register_spawn("mobs:rat", {"default:dirt_with_grass", "default:stone"}, 20, -1, 7000, 1, 31000) minetest.register_craftitem("mobs:rat", { description = "Rat", @@ -309,7 +346,7 @@ mobs:register_mob("mobs:oerkki", { speed_run = 15, }, }) ---mobs:register_spawn("mobs:oerkki", {"default:stone"}, 2, -1, 7000, 3, -10) +mobs:register_spawn("mobs:oerkki", {"default:stone"}, 2, -1, 7000, 3, -10) mobs:register_mob("mobs:dungeon_master", { type = "monster", @@ -353,7 +390,7 @@ mobs:register_mob("mobs:dungeon_master", { speed_run = 15, }, }) ---mobs:register_spawn("mobs:dungeon_master", {"default:stone"}, 2, -1, 7000, 1, -50) +mobs:register_spawn("mobs:dungeon_master", {"default:stone"}, 2, -1, 7000, 1, -50) mobs:register_arrow("mobs:fireball", { visual = "sprite", @@ -401,59 +438,6 @@ mobs:register_arrow("mobs:fireball", { end }) -------------------- -------------------- -------Dragon------- -------------------- -------------------- -mobs:register_mob("mobs:dragon", { - type = "monster", - hp_max = 8, - collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4}, - visual = "mesh", - mesh = "mobs_dragon.x", - textures = {"mobs_dragon.png"}, - visual_size = {x=5, y=5}, - makes_footstep_sound = false, - view_range = 15, - walk_velocity = 1, - run_velocity = 3, - damage = 4, - drops = {}, - armor = 100, - drawtype = "front", - light_resistant = true, - water_damage = 1, - lava_damage = 1, - light_damage = 0, - attack_type = "dogfight", - animation = { - stand_start = 0, - stand_end = 40, - walk_start = 41, - walk_end = 61, - run_start = 62, - run_end = 103, - punch_start = 104, - punch_end = 113, - speed_normal = 62, - speed_run = 103, - }, -}) - -minetest.register_craftitem("mobs:dragon", { - description = "Dragon", - inventory_image = "test_block.png", - - on_place = function(itemstack, placer, pointed_thing) - if pointed_thing.above then - minetest.env:add_entity(pointed_thing.above, "mobs:dragon") - itemstack:take_item() - end - return itemstack - end, -}) - if minetest.setting_get("log_mods") then minetest.log("action", "mobs loaded") end diff --git a/models/mobs_dragon.x b/models/mobs_dragon.x deleted file mode 100644 index fbbad76..0000000 --- a/models/mobs_dragon.x +++ /dev/null @@ -1,448 +0,0 @@ -xof 0303txt 0032 - -Frame Root { - FrameTransformMatrix { - 1.000000, 0.000000, 0.000000, 0.000000, - 0.000000,-0.000000, 1.000000, 0.000000, - 0.000000, 1.000000, 0.000000, 0.000000, - 0.000000, 0.000000, 0.000000, 1.000000;; - } - Frame Cube_021 { - FrameTransformMatrix { - 0.280765, 0.000000, 0.000000, 0.000000, - 0.000000, 0.280765, 0.000000, 0.000000, - 0.000000, 0.000000, 0.280765, 0.000000, - -2.761383,-0.628748,-1.537830, 1.000000;; - } - Mesh { // Cube_021 mesh - 136; - 4.703656;-1.000000; 1.000000;, - 4.703656; 1.000000; 1.000000;, - 4.703656; 1.000000;-1.000000;, - 4.703656;-1.000000;-1.000000;, - 4.703656; 1.000000; 1.000000;, - 2.703656; 1.000000; 1.000000;, - 2.703656; 1.000000;-1.000000;, - 4.703656; 1.000000;-1.000000;, - 2.703656; 1.000000; 1.000000;, - 2.703656;-1.000000; 1.000000;, - 2.703656;-1.000000;-1.000000;, - 2.703656; 1.000000;-1.000000;, - 2.703656;-1.000000; 1.000000;, - 4.703656;-1.000000; 1.000000;, - 4.703656;-1.000000;-1.000000;, - 2.703656;-1.000000;-1.000000;, - 4.703656;-1.000000;-1.000000;, - 4.703656; 1.000000;-1.000000;, - 2.703656; 1.000000;-1.000000;, - 2.703656;-1.000000;-1.000000;, - 2.703656;-1.000000; 1.000000;, - 2.703656; 1.000000; 1.000000;, - 4.703656; 1.000000; 1.000000;, - 4.703656;-1.000000; 1.000000;, - 4.703656;-4.584907; 1.000000;, - 4.703656;-2.584907; 1.000000;, - 4.703656;-2.584907;-1.000000;, - 4.703656;-4.584907;-1.000000;, - 4.703656;-2.584907; 1.000000;, - 2.703656;-2.584907; 1.000000;, - 2.703656;-2.584907;-1.000000;, - 4.703656;-2.584907;-1.000000;, - 2.703656;-2.584907; 1.000000;, - 2.703656;-4.584907; 1.000000;, - 2.703656;-4.584907;-1.000000;, - 2.703656;-2.584907;-1.000000;, - 2.703656;-4.584907; 1.000000;, - 4.703656;-4.584907; 1.000000;, - 4.703656;-4.584907;-1.000000;, - 2.703656;-4.584907;-1.000000;, - 4.703656;-4.584907;-1.000000;, - 4.703656;-2.584907;-1.000000;, - 2.703656;-2.584907;-1.000000;, - 2.703656;-4.584907;-1.000000;, - 2.703656;-4.584907; 1.000000;, - 2.703656;-2.584907; 1.000000;, - 4.703656;-2.584907; 1.000000;, - 4.703656;-4.584907; 1.000000;, - -1.000000;-4.584907; 1.000000;, - -1.000000;-2.584907; 1.000000;, - -1.000000;-2.584907;-1.000000;, - -1.000000;-4.584907;-1.000000;, - -1.000000;-2.584907; 1.000000;, - 1.000000;-2.584907; 1.000000;, - 1.000000;-2.584907;-1.000000;, - -1.000000;-2.584907;-1.000000;, - 1.000000;-2.584907; 1.000000;, - 1.000000;-4.584907; 1.000000;, - 1.000000;-4.584907;-1.000000;, - 1.000000;-2.584907;-1.000000;, - 1.000000;-4.584907; 1.000000;, - -1.000000;-4.584907; 1.000000;, - -1.000000;-4.584907;-1.000000;, - 1.000000;-4.584907;-1.000000;, - -1.000000;-4.584907;-1.000000;, - -1.000000;-2.584907;-1.000000;, - 1.000000;-2.584907;-1.000000;, - 1.000000;-4.584907;-1.000000;, - 1.000000;-4.584907; 1.000000;, - 1.000000;-2.584907; 1.000000;, - -1.000000;-2.584907; 1.000000;, - -1.000000;-4.584907; 1.000000;, - -1.000000;-1.000000; 1.000000;, - -1.000000; 1.000000; 1.000000;, - -1.000000; 1.000000;-1.000000;, - -1.000000;-1.000000;-1.000000;, - -1.000000; 1.000000; 1.000000;, - 1.000000; 1.000000; 1.000000;, - 1.000000; 1.000000;-1.000000;, - -1.000000; 1.000000;-1.000000;, - 1.000000; 1.000000; 1.000000;, - 1.000000;-1.000000; 1.000000;, - 1.000000;-1.000000;-1.000000;, - 1.000000; 1.000000;-1.000000;, - 1.000000;-1.000000; 1.000000;, - -1.000000;-1.000000; 1.000000;, - -1.000000;-1.000000;-1.000000;, - 1.000000;-1.000000;-1.000000;, - -1.000000;-1.000000;-1.000000;, - -1.000000; 1.000000;-1.000000;, - 1.000000; 1.000000;-1.000000;, - 1.000000;-1.000000;-1.000000;, - 1.000000;-1.000000; 1.000000;, - 1.000000; 1.000000; 1.000000;, - -1.000000; 1.000000; 1.000000;, - -1.000000;-1.000000; 1.000000;, - -0.075579;-3.685682; 3.411312;, - -0.075579; 0.169132; 3.411312;, - -0.075579; 0.169132;-0.443501;, - -0.075579;-3.685682;-0.443501;, - -0.075579; 0.169132; 3.411312;, - 3.779235; 0.169132; 3.411312;, - 3.779235; 0.169132;-0.443502;, - -0.075579; 0.169132;-0.443501;, - 3.779235; 0.169132; 3.411312;, - 3.779235;-3.685682; 3.411312;, - 3.779235;-3.685682;-0.443502;, - 3.779235; 0.169132;-0.443502;, - 3.779235;-3.685682; 3.411312;, - -0.075579;-3.685682; 3.411312;, - -0.075579;-3.685682;-0.443501;, - 3.779235;-3.685682;-0.443502;, - 3.779235;-3.685682;-0.443502;, - -0.075579;-3.685682;-0.443501;, - -0.075579;-3.685682;-0.443501;, - 3.779235;-3.685682;-0.443502;, - 3.779235;-3.685682; 3.411312;, - 3.779235; 0.169132; 3.411312;, - -0.075579; 0.169132; 3.411312;, - -0.075579;-3.685682; 3.411312;, - -0.075579;-3.685682;-0.443501;, - -0.075579; 0.169132;-0.443501;, - 3.779235; 0.169132;-0.443502;, - 3.779235;-3.685682;-0.443502;, - 3.779235; 0.169132;-0.443502;, - 3.779235;-3.685682;-0.443502;, - 3.779235;-3.685682;-0.443502;, - 3.779235; 0.169132;-0.443502;, - -0.075579; 0.169132;-0.443501;, - 3.779235; 0.169132;-0.443502;, - 3.779235; 0.169132;-0.443502;, - -0.075579; 0.169132;-0.443501;, - -0.075579;-3.685682;-0.443501;, - -0.075579; 0.169132;-0.443501;, - -0.075579; 0.169132;-0.443501;, - -0.075579;-3.685682;-0.443501;; - 34; - 4;3,2,1,0;, - 4;7,6,5,4;, - 4;11,10,9,8;, - 4;15,14,13,12;, - 4;19,18,17,16;, - 4;23,22,21,20;, - 4;27,26,25,24;, - 4;31,30,29,28;, - 4;35,34,33,32;, - 4;39,38,37,36;, - 4;43,42,41,40;, - 4;47,46,45,44;, - 4;51,50,49,48;, - 4;55,54,53,52;, - 4;59,58,57,56;, - 4;63,62,61,60;, - 4;67,66,65,64;, - 4;71,70,69,68;, - 4;75,74,73,72;, - 4;79,78,77,76;, - 4;83,82,81,80;, - 4;87,86,85,84;, - 4;91,90,89,88;, - 4;95,94,93,92;, - 4;99,98,97,96;, - 4;103,102,101,100;, - 4;107,106,105,104;, - 4;111,110,109,108;, - 4;115,114,113,112;, - 4;119,118,117,116;, - 4;123,122,121,120;, - 4;127,126,125,124;, - 4;131,130,129,128;, - 4;135,134,133,132;; - MeshNormals { // Cube_021 normals - 34; - -1.000000; 0.000000; 0.000000;, - 0.000000;-1.000000; 0.000000;, - 1.000000; 0.000000;-0.000000;, - 0.000000; 1.000000;-0.000000;, - 0.000000; 0.000000; 1.000000;, - -0.000000; 0.000000;-1.000000;, - -1.000000; 0.000000; 0.000000;, - 0.000000;-1.000000; 0.000000;, - 1.000000; 0.000000;-0.000000;, - 0.000000; 1.000000;-0.000000;, - 0.000000; 0.000000; 1.000000;, - -0.000000; 0.000000;-1.000000;, - -1.000000; 0.000000; 0.000000;, - 0.000000; 1.000000;-0.000000;, - 1.000000; 0.000000;-0.000000;, - 0.000000;-1.000000; 0.000000;, - -0.000000; 0.000000;-1.000000;, - 0.000000; 0.000000; 1.000000;, - -1.000000; 0.000000; 0.000000;, - 0.000000; 1.000000;-0.000000;, - 1.000000; 0.000000;-0.000000;, - 0.000000;-1.000000; 0.000000;, - -0.000000; 0.000000;-1.000000;, - -0.000000; 0.000000; 1.000000;, - -1.000000; 0.000000; 0.000000;, - 0.000000; 1.000000;-0.000000;, - 1.000000; 0.000000;-0.000000;, - 0.000000;-1.000000; 0.000000;, - 0.000000; 0.000000; 0.000000;, - 0.000000; 0.000000; 1.000000;, - -0.000000; 0.000000;-1.000000;, - 0.000000; 0.000000; 0.000000;, - 0.000000; 0.000000; 0.000000;, - 0.000000; 0.000000; 0.000000;; - 34; - 4;0,0,0,0;, - 4;1,1,1,1;, - 4;2,2,2,2;, - 4;3,3,3,3;, - 4;4,4,4,4;, - 4;5,5,5,5;, - 4;6,6,6,6;, - 4;7,7,7,7;, - 4;8,8,8,8;, - 4;9,9,9,9;, - 4;10,10,10,10;, - 4;11,11,11,11;, - 4;12,12,12,12;, - 4;13,13,13,13;, - 4;14,14,14,14;, - 4;15,15,15,15;, - 4;16,16,16,16;, - 4;17,17,17,17;, - 4;18,18,18,18;, - 4;19,19,19,19;, - 4;20,20,20,20;, - 4;21,21,21,21;, - 4;22,22,22,22;, - 4;23,23,23,23;, - 4;24,24,24,24;, - 4;25,25,25,25;, - 4;26,26,26,26;, - 4;27,27,27,27;, - 4;28,28,28,28;, - 4;29,29,29,29;, - 4;30,30,30,30;, - 4;31,31,31,31;, - 4;32,32,32,32;, - 4;33,33,33,33;; - } // End of Cube_021 normals - MeshTextureCoords { // Cube_021 UV coordinates - 136; - 0.571038; 0.204110;, - 0.596358; 0.204110;, - 0.596358; 0.178790;, - 0.571038; 0.178790;, - 0.572876; 0.104296;, - 0.547555; 0.104296;, - 0.547555; 0.129616;, - 0.572876; 0.129616;, - 0.572876; 0.078790;, - 0.547555; 0.078790;, - 0.547555; 0.104110;, - 0.572876; 0.104110;, - 0.447555; 0.104296;, - 0.447555; 0.129616;, - 0.472876; 0.129616;, - 0.472876; 0.104296;, - 0.521864; 0.129616;, - 0.521864; 0.104296;, - 0.496543; 0.104296;, - 0.496543; 0.129616;, - 0.447555; 0.078790;, - 0.447555; 0.104110;, - 0.472876; 0.104110;, - 0.472876; 0.078790;, - 0.547370; 0.053284;, - 0.522049; 0.053284;, - 0.522049; 0.078605;, - 0.547370; 0.078605;, - 0.423887; 0.027778;, - 0.398567; 0.027778;, - 0.398567; 0.053099;, - 0.423887; 0.053099;, - 0.547370; 0.027778;, - 0.522049; 0.027778;, - 0.522049; 0.053099;, - 0.547370; 0.053099;, - 0.571038; 0.153284;, - 0.571038; 0.178605;, - 0.596358; 0.178605;, - 0.596358; 0.153284;, - 0.598382; 0.129616;, - 0.598382; 0.104296;, - 0.573061; 0.104296;, - 0.573061; 0.129616;, - 0.496543; 0.027778;, - 0.496543; 0.053099;, - 0.521864; 0.053099;, - 0.521864; 0.027778;, - 0.572876; 0.053284;, - 0.547555; 0.053284;, - 0.547555; 0.078605;, - 0.572876; 0.078605;, - 0.398567; 0.078790;, - 0.398567; 0.104110;, - 0.423887; 0.104110;, - 0.423887; 0.078790;, - 0.547370; 0.104296;, - 0.522049; 0.104296;, - 0.522049; 0.129616;, - 0.547370; 0.129616;, - 0.498381; 0.053284;, - 0.473061; 0.053284;, - 0.473061; 0.078605;, - 0.498381; 0.078605;, - 0.398567; 0.104296;, - 0.398567; 0.129616;, - 0.423887; 0.129616;, - 0.423887; 0.104296;, - 0.521864; 0.104110;, - 0.521864; 0.078790;, - 0.496543; 0.078790;, - 0.496543; 0.104110;, - 0.447555; 0.053284;, - 0.447555; 0.078605;, - 0.472876; 0.078605;, - 0.472876; 0.053284;, - 0.522049; 0.078790;, - 0.522049; 0.104110;, - 0.547370; 0.104110;, - 0.547370; 0.078790;, - 0.570852; 0.178790;, - 0.545532; 0.178790;, - 0.545532; 0.204110;, - 0.570852; 0.204110;, - 0.570852; 0.153284;, - 0.545532; 0.153284;, - 0.545532; 0.178605;, - 0.570852; 0.178605;, - 0.424073; 0.027778;, - 0.424073; 0.053099;, - 0.449393; 0.053099;, - 0.449393; 0.027778;, - 0.423887; 0.078605;, - 0.423887; 0.053284;, - 0.398567; 0.053284;, - 0.398567; 0.078605;, - 0.398567; 0.178790;, - 0.398567; 0.227593;, - 0.447370; 0.227593;, - 0.447370; 0.178790;, - 0.398567; 0.129802;, - 0.398567; 0.178605;, - 0.447370; 0.178605;, - 0.447370; 0.129802;, - 0.545346; 0.129802;, - 0.496543; 0.129802;, - 0.496543; 0.178605;, - 0.545346; 0.178605;, - 0.496358; 0.178790;, - 0.447555; 0.178790;, - 0.447555; 0.227593;, - 0.496358; 0.227593;, - 0.594199; 0.129802;, - 0.545532; 0.129802;, - 0.545532; 0.130651;, - 0.594199; 0.130651;, - 0.447555; 0.178605;, - 0.496358; 0.178605;, - 0.496358; 0.129802;, - 0.447555; 0.129802;, - 0.496543; 0.227593;, - 0.545346; 0.227593;, - 0.545346; 0.178790;, - 0.496543; 0.178790;, - 0.594199; 0.152249;, - 0.545532; 0.152249;, - 0.545532; 0.153099;, - 0.594199; 0.153099;, - 0.545532; 0.205145;, - 0.594199; 0.205145;, - 0.594199; 0.204296;, - 0.545532; 0.204296;, - 0.545532; 0.227593;, - 0.594199; 0.227593;, - 0.594199; 0.226744;, - 0.545532; 0.226744;; - } // End of Cube_021 UV coordinates - MeshMaterialList { // Cube_021 material list - 1; - 34; - 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 Material_002 { - 0.640000; 0.640000; 0.640000; 1.000000;; - 96.078431; - 0.500000; 0.500000; 0.500000;; - 0.000000; 0.000000; 0.000000;; - TextureFilename {"mobs_dragon.png";} - } - } // End of Cube_021 material list - } // End of Cube_021 mesh - } // End of Cube_021 -} // End of Root