From 3819bf7b94f6f4be3a25abb167c0457dd96f461a Mon Sep 17 00:00:00 2001
From: C1ffisme <c1ff@alandmoore.com>
Date: Tue, 12 Apr 2016 09:38:18 -0500
Subject: [PATCH] Make the watering can not lose water in creative

---
 tools.lua | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools.lua b/tools.lua
index 5605254..f06c24a 100644
--- a/tools.lua
+++ b/tools.lua
@@ -65,7 +65,9 @@ minetest.register_tool("crops:watering_can", {
 		water = math.min(water + crops.settings.watercan, crops.settings.watercan_max)
 		meta:set_int("crops_water", water)
 
-		itemstack:set_wear(math.min(65534, wear + (65535 / crops.settings.watercan_uses)))
+		if not minetest.setting_getbool("creative_mode") then
+			itemstack:set_wear(math.min(65534, wear + (65535 / crops.settings.watercan_uses)))
+		end
 		return itemstack
 	end,
 })