From da7b4eeb519df8c7f8fc4f23819df1b1ce5a716e Mon Sep 17 00:00:00 2001 From: cora Date: Fri, 21 Oct 2022 14:02:18 +0200 Subject: [PATCH] Add puffer fish --- mods/ENTITIES/mobs_mc/init.lua | 1 + .../mobs_mc/models/mobs_mc_puffer_fish.b3d | Bin 0 -> 51719 bytes mods/ENTITIES/mobs_mc/puffer_fish.lua | 102 ++++++++++++++++++ .../mobs_mc/textures/mobs_mc_puffer_fish.png | Bin 0 -> 853 bytes 4 files changed, 103 insertions(+) create mode 100644 mods/ENTITIES/mobs_mc/models/mobs_mc_puffer_fish.b3d create mode 100644 mods/ENTITIES/mobs_mc/puffer_fish.lua create mode 100755 mods/ENTITIES/mobs_mc/textures/mobs_mc_puffer_fish.png diff --git a/mods/ENTITIES/mobs_mc/init.lua b/mods/ENTITIES/mobs_mc/init.lua index 37c2df167..5f0f7dcd5 100644 --- a/mods/ENTITIES/mobs_mc/init.lua +++ b/mods/ENTITIES/mobs_mc/init.lua @@ -165,3 +165,4 @@ dofile(path .. "/fox.lua") dofile(path .. "/phantom.lua") dofile(path .. "/drowned.lua") dofile(path .. "/panda.lua") +dofile(path .. "/puffer_fish.lua") diff --git a/mods/ENTITIES/mobs_mc/models/mobs_mc_puffer_fish.b3d b/mods/ENTITIES/mobs_mc/models/mobs_mc_puffer_fish.b3d new file mode 100644 index 0000000000000000000000000000000000000000..45a5af1f1595aed4665d59e560f628da4759fc27 GIT binary patch literal 51719 zcmeHQeUMefl|L{dPlCfBYS1W-Vss!#Mm~0Dk-7aOuo+>11pL5kvW|g4hPXN+Zj}7N zT@6L5TsIo1nAycD{HWC!gKjjM#O2+ITdU&2*2-FyRMucBVK?Kli<)H-SKw{^`t*JG z+`irKy%GEf+^(AHd*^rVxu^S{?q7G`+vm-iHFb7*8_^IVnziVP#goY#ue#;t6_ZzZh$ws#B_X2V zX9l1D)UwEd)1EaOOSpb+2Jdf&albbBFEjcz9xQpj9Gw22kE{Ofz96lC2`aMva)VFV zw8OFw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!25$0(J^N2hV)-K|D$RqL`orpZ(>m!NC zlk;^RktgTtV~elrjZlL5wNKVHzm~Fc?NPkI&LaZx3+y~15dQ{PH1nm#2tR4!^BwWU lS=7I2RD_>2k+O0vT6}R9ZC%tDonpyKpA_riADM_i{|{zW$nXFF literal 0 HcmV?d00001 diff --git a/mods/ENTITIES/mobs_mc/puffer_fish.lua b/mods/ENTITIES/mobs_mc/puffer_fish.lua new file mode 100644 index 000000000..1fcf02afa --- /dev/null +++ b/mods/ENTITIES/mobs_mc/puffer_fish.lua @@ -0,0 +1,102 @@ +-- PUFFER FISH +-- cora +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 S = minetest.get_translator("mobs_mc") + +local pfish = { + type = "animal", + passive = false, + spawn_class = "passive", + skittish = false, + runaway = true, + hp_min = 10, + hp_max = 10, + xp_min = 1, + xp_max = 2, + armor = {fleshy = 90}, + attack_type = "dogfight", + damage = 2, + reach = 1.5, + jump = false, + makes_footstep_sound = true, + fly = true, + fly_in = {"mcl_core:water_source","mcl_core:water_flowing"}, + breath_max = -1, + walk_velocity = 1, + run_velocity = 2, + follow_velocity = 2, + follow = followitem, + pathfinding = 1, + fear_height = 4, + view_range = 16, + collisionbox = {-0.3, -0.01, -0.3, 0.3, 0.84, 0.3}, + visual = "mesh", + mesh = "mobs_mc_puffer_fish.b3d", + textures = { { + "mobs_mc_puffer_fish.png", + } }, + visual_size = {x=3, y=3}, + rotate = 0, + sounds = { + }, + drops = { + }, + animation = { + stand_speed = 7, + walk_speed = 7, + run_speed = 15, + stand_start = 11, + stand_end = 11, + walk_start = 0, + walk_end = 10, + run_start = 0, + run_end = 10, + pounce_start = 11, + pounce_end = 31, + lay_start = 34, + lay_end = 34, + }, +} + +mcl_mobs:register_mob("mobs_mc:puffer_fish", pfish) + +-- spawning +mcl_mobs:spawn_setup({ + name = "mobs_mc:puffer_fish", + biomes = { + "StoneBeach_ocean", + "MesaPlateauFM_sandlevel", + "MesaPlateauF_sandlevel", + "MesaBryce_sandlevel", + "Mesa_sandlevel", + "FlowerForest_beach", + "Forest_beach", + "StoneBeach", + "ColdTaiga_beach_water", + "Taiga_beach", + "Savanna_beach", + "Plains_beach", + "ExtremeHills_beach", + "ColdTaiga_beach", + "Swampland_shore", + "MushroomIslandShore", + "JungleM_shore", + "Jungle_shore", + "MangroveSwamp_shore", + }, + interval = 30, + chance = 6000, + min_height = 1, +}) + +-- spawn eggs +mcl_mobs:register_egg("mobs_mc:puffer_fish", S("Puffer Fish"), "#FFFF00", "#FFaa99", 0) diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_puffer_fish.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_puffer_fish.png new file mode 100755 index 0000000000000000000000000000000000000000..2e3cda64b90496453fd6bf40edc885dfd070c2b5 GIT binary patch literal 853 zcmV-b1FHOqP)004R= z004l4008;_004mL004C`008P>0026e000+nl3&F}00009a7bBm000XT000XT0n*)m z`~Uy|8FWQhbW?9;ba!ELWdLwtX>N2bZe?^JG%heMGBNQWX_Wu~0=7v+K~z{ry_T_x z6hRP%H#E>hj7~(Oi%fh2F%bkG!RPQIBYgrjx>WGMTu|>Y76U;LjLb}ZfK?dxYxW!d zsp;LpZ-1;`nzZ5W>!DWo(-G7)t{fI%~n1>y*|MAmj@G!e|`0EFV=bS?(^{E zqZs0hS=Va}S@YiU`@Vn=Zw>~jli-eNo)}j=*2WpD z^(x~LL!AV7tO%`fPf+U^0eM;3J(odWCQc6<_F&FNwJ|

mY#3pf3}r2iMwW!>3E# z6W9eJYQ0J~nAnJ>2ml2!=gxOoYTS8ncerxxDzuvE&l*-}k|MG>&}1Jpx^er^hBJS1 zlVvk3$M56T%ggz?K5Jy`+wljult3n(zzt7J#`qr~Hwg+?F ze?I?{_QMU4!RjA9zBOzZ{W@npV{Bc&k8ZF+!CeBDP|UW*C{{a3lIqj^yaJYJKOWsK zw#vJ6+<01V$c!)1e(H`{ykYd~{6*3Y(mVz1gG+-z$QO-|BBv6}*0-O!i^!$e}S`OIZAxV`Dc4O#ny10vl4q#^7-Y1yY1XU61YMm`4sMq