diff --git a/mods/ENTITIES/mobs_mc/LICENSE-media.md b/mods/ENTITIES/mobs_mc/LICENSE-media.md index dad31abb85..4e3de49f10 100644 --- a/mods/ENTITIES/mobs_mc/LICENSE-media.md +++ b/mods/ENTITIES/mobs_mc/LICENSE-media.md @@ -75,6 +75,7 @@ Origin of those models: * `mobs_mc_mushroom_brown.png` (CC0) * “Spawn egg” textures (`mobs_mc_spawn_icon_*`) by 22i +* Llama decor (carpet) textures (`mobs_mc_llama_decor_*`) by erlehmann and rudzik8 * Any other texture not mentioned here are licensed under the MIT License ## Sounds diff --git a/mods/ENTITIES/mobs_mc/llama.lua b/mods/ENTITIES/mobs_mc/llama.lua index b6566059a9..4147878cc2 100644 --- a/mods/ENTITIES/mobs_mc/llama.lua +++ b/mods/ENTITIES/mobs_mc/llama.lua @@ -42,7 +42,6 @@ mobs:register_mob("mobs_mc:llama", { {"blank.png", "blank.png", "mobs_mc_llama_gray.png"}, {"blank.png", "blank.png", "mobs_mc_llama_white.png"}, {"blank.png", "blank.png", "mobs_mc_llama.png"}, - -- TODO: Add llama carpet textures (Pixel Perfection seems to use verbatim copy from Minecraft :-( ) }, visual_size = {x=3, y=3}, makes_footstep_sound = true, @@ -139,50 +138,48 @@ mobs:register_mob("mobs_mc:llama", { -- Make sure tamed llama is mature and being clicked by owner only if self.tamed and not self.child and self.owner == clicker:get_player_name() then - -- Place carpet - --[[ TODO: Re-enable this code when carpet textures arrived. - if minetest.get_item_group(item:get_name(), "carpet") == 1 and not self.carpet then - for group, carpetdata in pairs(carpets) do - if minetest.get_item_group(item:get_name(), group) == 1 then - if not minetest.is_creative_enabled(clicker:get_player_name()) then - item:take_item() - clicker:set_wielded_item(item) - end - local substr = carpetdata[2] - local tex_carpet = "mobs_mc_llama_decor_"..substr..".png" - self.base_texture = table.copy(self.base_texture) - self.base_texture[2] = tex_carpet - self.object:set_properties({ - textures = self.base_texture, - }) - self.carpet = item:get_name() - self.drops = { - {name = mobs_mc.items.leather, - chance = 1, - min = 0, - max = 2,}, - {name = item:get_name(), - chance = 1, - min = 1, - max = 1,}, - } - return + -- Place carpet + if minetest.get_item_group(item:get_name(), "carpet") == 1 and not self.carpet then + for group, carpetdata in pairs(carpets) do + if minetest.get_item_group(item:get_name(), group) == 1 then + if not minetest.is_creative_enabled(clicker:get_player_name()) then + item:take_item() + clicker:set_wielded_item(item) end + local substr = carpetdata[2] + local tex_carpet = "mobs_mc_llama_decor_"..substr..".png" + self.base_texture = table.copy(self.base_texture) + self.base_texture[2] = tex_carpet + self.object:set_properties({ + textures = self.base_texture, + }) + self.carpet = item:get_name() + self.drops = { + {name = mobs_mc.items.leather, + chance = 1, + min = 0, + max = 2,}, + {name = item:get_name(), + chance = 1, + min = 1, + max = 1,}, + } + return end end - ]] + end - -- detatch player already riding llama - if self.driver and clicker == self.driver then + -- detatch player already riding llama + if self.driver and clicker == self.driver then - mobs.detach(clicker, {x = 1, y = 0, z = 1}) + mobs.detach(clicker, {x = 1, y = 0, z = 1}) - -- attach player to llama - elseif not self.driver then + -- attach player to llama + elseif not self.driver then - self.object:set_properties({stepheight = 1.1}) - mobs.attach(self, clicker) - end + self.object:set_properties({stepheight = 1.1}) + mobs.attach(self, clicker) + end -- Used to capture llama elseif not self.driver and clicker:get_wielded_item():get_name() ~= "" then @@ -190,8 +187,6 @@ mobs:register_mob("mobs_mc:llama", { end end, - --[[ - TODO: Enable this code when carpet textures arrived. on_breed = function(parent1, parent2) -- When breeding, make sure the child has no carpet local pos = parent1.object:get_pos() @@ -213,7 +208,6 @@ mobs:register_mob("mobs_mc:llama", { return false end end, - ]] }) diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_black.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_black.png new file mode 100644 index 0000000000..9a06b58718 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_black.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_blue.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_blue.png new file mode 100644 index 0000000000..74db6eb32f Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_blue.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_brown.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_brown.png new file mode 100644 index 0000000000..3ed90ca0d2 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_brown.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_cyan.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_cyan.png new file mode 100644 index 0000000000..b66df45715 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_cyan.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_gray.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_gray.png new file mode 100644 index 0000000000..b74dd86af8 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_gray.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_green.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_green.png new file mode 100644 index 0000000000..e956a30238 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_green.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_light_blue.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_light_blue.png new file mode 100644 index 0000000000..6c3b2a7953 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_light_blue.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_light_gray.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_light_gray.png new file mode 100644 index 0000000000..33b9376dd3 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_light_gray.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_lime.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_lime.png new file mode 100644 index 0000000000..f201bc4fab Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_lime.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_magenta.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_magenta.png new file mode 100644 index 0000000000..d05057fbb5 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_magenta.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_orange.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_orange.png new file mode 100644 index 0000000000..a261eada23 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_orange.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_pink.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_pink.png new file mode 100644 index 0000000000..108aab1553 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_pink.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_purple.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_purple.png new file mode 100644 index 0000000000..3b3e472ce9 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_purple.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_red.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_red.png new file mode 100644 index 0000000000..18b9fbcff9 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_red.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_white.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_white.png new file mode 100644 index 0000000000..b70b554190 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_white.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_yellow.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_yellow.png new file mode 100644 index 0000000000..50962e99d7 Binary files /dev/null and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_decor_yellow.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_gray.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_gray.png index b0830e0871..9e43edfe25 100644 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_gray.png and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_gray.png differ diff --git a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_white.png b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_white.png index 85c291d7eb..6306f32527 100644 Binary files a/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_white.png and b/mods/ENTITIES/mobs_mc/textures/mobs_mc_llama_white.png differ