Enable enchanting on sheers & allow enchanted shears to shear.
This commit is contained in:
parent
e3bdedb4d5
commit
8c64fdfa5d
|
@ -105,7 +105,7 @@ mooshroom_def.on_rightclick = function(self, clicker)
|
|||
end
|
||||
local item = clicker:get_wielded_item()
|
||||
-- Use shears to get mushrooms and turn mooshroom into cow
|
||||
if item:get_name() == "mcl_tools:shears" then
|
||||
if minetest.get_item_group(item:get_name(), "shears") > 0 then
|
||||
local pos = self.object:get_pos()
|
||||
minetest.sound_play("mcl_tools_shears_cut", {pos = pos}, true)
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ mcl_mobs.register_mob("mobs_mc:sheep", {
|
|||
if self:feed_tame(clicker, 1, true, false) then return end
|
||||
if mcl_mobs:protect(self, clicker) then return end
|
||||
|
||||
if item:get_name() == "mcl_tools:shears" and not self.gotten and not self.child then
|
||||
if minetest.get_item_group(item:get_name(), "shears") > 0 and not self.gotten and not self.child then
|
||||
self.gotten = true
|
||||
local pos = self.object:get_pos()
|
||||
minetest.sound_play("mcl_tools_shears_cut", {pos = pos}, true)
|
||||
|
|
|
@ -114,7 +114,7 @@ mcl_mobs.register_mob("mobs_mc:snowman", {
|
|||
-- Remove pumpkin if using shears
|
||||
on_rightclick = function(self, clicker)
|
||||
local item = clicker:get_wielded_item()
|
||||
if self.gotten ~= true and item:get_name() == "mcl_tools:shears" then
|
||||
if self.gotten ~= true and inetest.get_item_group(item:get_name(), "shears") > 0 then
|
||||
-- Remove pumpkin
|
||||
self.gotten = true
|
||||
self.object:set_properties({
|
||||
|
|
|
@ -8,7 +8,7 @@ local S = minetest.get_translator(minetest.get_current_modname())
|
|||
-- Function to allow harvesting honey and honeycomb from the beehive and bee nest.
|
||||
local honey_harvest = function(pos, node, player, itemstack, pointed_thing)
|
||||
local inv = player:get_inventory()
|
||||
local shears = player:get_wielded_item():get_name() == "mcl_tools:shears"
|
||||
local shears = minetest.get_item_group(player:get_wielded_item():get_name(), "shears") > 0
|
||||
local bottle = player:get_wielded_item():get_name() == "mcl_potions:glass_bottle"
|
||||
local beehive = "mcl_beehives:beehive"
|
||||
local is_creative = minetest.is_creative_enabled(player:get_player_name())
|
||||
|
|
|
@ -661,7 +661,7 @@ minetest.register_tool("mcl_tools:shears", {
|
|||
inventory_image = "default_tool_shears.png",
|
||||
wield_image = "default_tool_shears.png",
|
||||
stack_max = 1,
|
||||
groups = { tool=1, shears=1, dig_speed_class=4, },
|
||||
groups = { tool=1, shears=1, dig_speed_class=4, enchantability=14, },
|
||||
tool_capabilities = {
|
||||
full_punch_interval = 0.5,
|
||||
max_drop_level=1,
|
||||
|
|
Loading…
Reference in New Issue