forked from VoxeLibre/VoxeLibre
Add brown mooshroom
This commit is contained in:
parent
0085122028
commit
31668cdde5
|
@ -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.
|
||||
|
|
|
@ -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()
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.0 KiB |
Binary file not shown.
After Width: | Height: | Size: 374 B |
|
@ -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",
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue