mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-23 16:39:33 +01:00
Fix #534.3 (Dyeing a sheep did not remove the dye from inventory.)
This commit is contained in:
parent
d4facaf503
commit
839d74329c
1 changed files with 4 additions and 0 deletions
|
@ -185,6 +185,10 @@ mobs:register_mob("mobs_mc:sheep", {
|
||||||
minetest.log("verbose", "[mobs_mc] " ..item:get_name() .. " " .. minetest.get_item_group(item:get_name(), "dye"))
|
minetest.log("verbose", "[mobs_mc] " ..item:get_name() .. " " .. minetest.get_item_group(item:get_name(), "dye"))
|
||||||
for group, colordata in pairs(colors) do
|
for group, colordata in pairs(colors) do
|
||||||
if minetest.get_item_group(item:get_name(), group) == 1 then
|
if minetest.get_item_group(item:get_name(), group) == 1 then
|
||||||
|
if not minetest.settings:get_bool("creative_mode") then
|
||||||
|
item:take_item()
|
||||||
|
clicker:set_wielded_item(item)
|
||||||
|
end
|
||||||
self.base_texture = sheep_texture(group)
|
self.base_texture = sheep_texture(group)
|
||||||
self.object:set_properties({
|
self.object:set_properties({
|
||||||
textures = self.base_texture,
|
textures = self.base_texture,
|
||||||
|
|
Loading…
Reference in a new issue