From da6563a5b39b30502635e331c3c7bbfb9b22de4b Mon Sep 17 00:00:00 2001 From: cora Date: Thu, 26 May 2022 02:24:56 +0200 Subject: [PATCH] Spawn witch and black cat on witchhut generation --- .../mobs_mc/textures/mobs_mc_cat_black.png | Bin 606 -> 7117 bytes mods/MAPGEN/mcl_structures/init.lua | 19 ++++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_cat_black.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_cat_black.png index d6e54c7a15637a4925a492b852e27071896479d3..a839a6ef37d345362f80c340f500ad42f999b393 100644 GIT binary patch literal 7117 zcmeHLcTf{+*I$}Q6G0Ibl^6jjZn7Z>B)NnlLE#F>RYVXAo6QCSq>u!NqEtl?1rfU- zf`A2SVgYG3t|*{_*nn$6X;M{Cn($3Pz22GceP^8Sd*8o2GnvWmIp_DB-|snRpG{(2 zoL8zT&sPQjK+VCPu?7GDYXAT+@^SzGxD+B+0bqL3HdlA?8aNmu5c1g^e-tC$DnK!) zgu?~^Nn_?wzo558YP%*xS{{)@fDLZ<1JT8(WmdX|hnjFD-dRcKuVfsspLx5iD7-Oe zVl1R2?7dR4-Vw&CT@_TlcyL zW3er+{7VnL+A@T#4Wi3aQk}}KNOI>s^|*N$H{+@4T$JKUX}bCW%-?3cYwN!3j|{$_9^*j;Aw0xfBN|g!S@zN^V zPu`}$&~uNgY!iRhrZK#JjABQX_3Q2Jr=AYa#W0qEls8MJhaXR9DXbvL51zE11Nas# zVk$3`FSS2PnYTtSj&#s#718d?y!m>9rT|@noKh^+_*ugbUX(Urqg3`#FcO z>o&ww(YsVXvp@Xjlc`#@=QmvPH7Urz>T83U4fVcfHR=u?&wjGTkGqeob6BTPM{Yw` z+MScvicXe%s`ul|jqD|{-lm=2OKVgmIu9Ui=L&0RO&?T@b1t!3GqW#TYmD~&?OMu} z?$W>`n}SEJdm;v#KC8QYRQG+2LFESJ$i3&w9VJP#2sOa6qPI31)nunHR4v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vXXu0mjfW9J&t diff --git a/mods/MAPGEN/mcl_structures/init.lua b/mods/MAPGEN/mcl_structures/init.lua index 9a1a73281..2b791aa91 100644 --- a/mods/MAPGEN/mcl_structures/init.lua +++ b/mods/MAPGEN/mcl_structures/init.lua @@ -280,6 +280,24 @@ function mcl_structures.generate_boulder(pos, rotation, pr) return minetest.place_schematic(newpos, path, rotation) -- don't serialize schematics for registered biome decorations, for MT 5.4.0, https://github.com/minetest/minetest/issues/10995 end +local function spawn_witch(p1,p2) + local c = minetest.find_node_near(p1,15,{"mcl_cauldrons:cauldron"}) + local nn = minetest.find_nodes_in_area(p1,p2,{"mcl_core:sprucewood"}) + if c then + for _,v in pairs(nn) do + local ap = vector.offset(v,0,1,0) + local an = minetest.get_node(ap) + if ap.y == c.y and an.name == "air" then + minetest.add_entity(ap,"mobs_mc:witch"):get_luaentity()._home = c + local cat = minetest.add_entity(ap,"mobs_mc:cat") + cat:set_properties({textures = {"mobs_mc_cat_black.png"}}) + cat:get_luaentity().owner = "witch" --so it's not claimable by players (unless they're named witch hehe) + return + end + end + end +end + local function hut_placement_callback(p1, p2, size, orientation, pr) if not p1 or not p2 then return end local legs = minetest.find_nodes_in_area(p1, p2, "mcl_core:tree") @@ -289,6 +307,7 @@ local function hut_placement_callback(p1, p2, size, orientation, pr) minetest.swap_node(legs[i], {name = "mcl_core:tree", param2 = 2}) end end + spawn_witch(p1,p2) end function mcl_structures.generate_witch_hut(pos, rotation, pr)