diff --git a/mods/ENTITIES/mobs_mc/LICENSE-media.md b/mods/ENTITIES/mobs_mc/LICENSE-media.md index fe5c41e7ef..7cad2241cb 100644 --- a/mods/ENTITIES/mobs_mc/LICENSE-media.md +++ b/mods/ENTITIES/mobs_mc/LICENSE-media.md @@ -70,6 +70,9 @@ Origin of those models: * `mobs_mc_wither.png` * `mobs_mc_wither_skeleton.png` * `mobs_mc_TEMP_wither_projectile.png` + * Gerold55 + * `mobs_mc_mooshroom_brown.png` (CC0) + * `mobs_mc_mushroom_brown.png` (CC0) * “Spawn egg” textures (`mobs_mc_spawn_icon_*`) by 22i * Any other texture not mentioned here are licensed under the MIT License @@ -183,4 +186,4 @@ Origin of those models: Note: Many of these sounds have been more or less modified to fit the game. -Sounds not mentioned here are licensed under CC0. +Sounds not mentioned hre are licensed under CC0. diff --git a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua index bf1f9c1d6f..48a6aac7a3 100644 --- a/mods/ENTITIES/mobs_mc/cow+mooshroom.lua +++ b/mods/ENTITIES/mobs_mc/cow+mooshroom.lua @@ -80,7 +80,7 @@ mobs:register_mob("mobs_mc:cow", cow_def) local mooshroom_def = table.copy(cow_def) mooshroom_def.mesh = "mobs_mc_cow.b3d" -mooshroom_def.textures = { {"mobs_mc_mooshroom.png", "mobs_mc_mushroom_red.png"}, } +mooshroom_def.textures = { {"mobs_mc_mooshroom.png", "mobs_mc_mushroom_red.png"}, {"mobs_mc_mooshroom_brown.png", "mobs_mc_mushroom_brown.png" } } mooshroom_def.on_rightclick = function(self, clicker) if mobs:feed_tame(self, clicker, 1, true, true) then return end if mobs:protect(self, clicker) then return end @@ -93,7 +93,12 @@ mooshroom_def.on_rightclick = function(self, clicker) if item:get_name() == mobs_mc.items.shears then local pos = self.object:get_pos() minetest.sound_play("shears", {pos = pos}) - minetest.add_item({x=pos.x, y=pos.y+1.4, z=pos.z}, mobs_mc.items.mushroom_red .. " 5") + + if self.base_texture[1] == "mobs_mc_mooshroom_brown.png" then + minetest.add_item({x=pos.x, y=pos.y+1.4, z=pos.z}, mobs_mc.items.mushroom_brown .. " 5") + else + minetest.add_item({x=pos.x, y=pos.y+1.4, z=pos.z}, mobs_mc.items.mushroom_red .. " 5") + end local oldyaw = self.object:getyaw() self.object:remove() diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_mooshroom_brown.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_mooshroom_brown.png new file mode 100644 index 0000000000..115416a53c Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_mooshroom_brown.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_mushroom_brown.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_mushroom_brown.png new file mode 100644 index 0000000000..fac0f56ef0 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_mushroom_brown.png differ diff --git a/mods/ENTITIES/mobs_mc_gameconfig/init.lua b/mods/ENTITIES/mobs_mc_gameconfig/init.lua index ff02ccfd83..f24952e913 100644 --- a/mods/ENTITIES/mobs_mc_gameconfig/init.lua +++ b/mods/ENTITIES/mobs_mc_gameconfig/init.lua @@ -44,6 +44,7 @@ mobs_mc.override.items = { shears = "mcl_tools:shears", mushroom_red = "mcl_mushrooms:mushroom_red", + mushroom_brown = "mcl_mushrooms:mushroom_brown", bucket = "mcl_buckets:bucket_empty", grass_block = "mcl_core:dirt_with_grass", string = "mcl_mobitems:string", diff --git a/mods/ENVIRONMENT/lightning/init.lua b/mods/ENVIRONMENT/lightning/init.lua index dfcfe0149a..207c4d1ae2 100644 --- a/mods/ENVIRONMENT/lightning/init.lua +++ b/mods/ENVIRONMENT/lightning/init.lua @@ -189,6 +189,14 @@ lightning.strike = function(pos) obj:remove() obj = minetest.add_entity(pos2, "mobs_mc:pigman") obj:set_yaw(rot) + -- mooshroom: toggle color red/brown + elseif lua.name == "mobs_mc:mooshroom" then + if lua.base_texture[1] == "mobs_mc_mooshroom.png" then + lua.base_texture = { "mobs_mc_mooshroom_brown.png", "mobs_mc_mushroom_brown.png" } + else + lua.base_texture = { "mobs_mc_mooshroom.png", "mobs_mc_mushroom_red.png" } + end + obj:set_properties({textures = lua.base_texture}) -- villager → witch elseif lua.name == "mobs_mc:villager" then -- Witches are incomplete, this code is unused