From b674e743874d3fbe4a40666ae2b1b4c9aa92542e Mon Sep 17 00:00:00 2001 From: bzoss Date: Tue, 9 Jun 2020 20:09:32 -0400 Subject: [PATCH] Correct redstone alias and Add poison and regeneration potions - THESE DON'T CURRENTLY WORK --- mods/ITEMS/mcl_brewing/init.lua | 14 +- .../mcl_brewing/textures/mcl_brewing_side.png | Bin 404 -> 392 bytes mods/ITEMS/mcl_potions/init.lua | 192 ++++++++++++++++-- 3 files changed, 187 insertions(+), 19 deletions(-) diff --git a/mods/ITEMS/mcl_brewing/init.lua b/mods/ITEMS/mcl_brewing/init.lua index 696e0af12..4e93d8792 100755 --- a/mods/ITEMS/mcl_brewing/init.lua +++ b/mods/ITEMS/mcl_brewing/init.lua @@ -341,6 +341,18 @@ local allow_take = function(pos, listname, index, stack, player) end local on_take = function(pos, listname, index, stack, player) local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + local str = "" + for i=1, inv:get_size("stand") do + local stack = inv:get_stack("stand", i) + if not stack:is_empty() then + str = str.."1" + else str = str.."0" + end + end + minetest.swap_node(pos, {name = "mcl_brewing:stand_"..str}) + minetest.get_node_timer(pos):start(1.0) + --some code here to enforce only potions getting placed on stands end minetest.register_node("mcl_brewing:stand_000", { @@ -429,7 +441,7 @@ minetest.register_node("mcl_brewing:stand_000", { on_timer = brewing_stand_timer, on_rotate = on_rotate, }) -minetest.register_alias("mcl_brewing:stand_000", "mcl_brewing:stand") +minetest.register_alias("mcl_brewing:stand", "mcl_brewing:stand_000") minetest.register_node("mcl_brewing:stand_100", { description = S("Brewing Stand"), _doc_items_longdesc = S("The stand allows you to brew potions!"), diff --git a/mods/ITEMS/mcl_brewing/textures/mcl_brewing_side.png b/mods/ITEMS/mcl_brewing/textures/mcl_brewing_side.png index 7793eae65f8c60e3f53bd777393265ccf6fafc7e..057a405e0b90e9fd1a7307bae5fdb548bb8765da 100644 GIT binary patch delta 344 zcmV-e0jK_y1Be5VIe$7yL_t(IjfIlGP69y?#(zhSz=c0H7wCM6djLtSAi35MAK-dT z)W$?RBPRCn0OlGiB2*f9fUBV(7IYXwBZk;GR=c^q3brJQ1Uc|`0D4`0d#Bw_Yxa$#umtD{ zvNX0jc)bhL@461*{fRtH0bn#9r+RfnQ8ve+J?M48^9~!tKgXCTwn)h-6}B}vs%fJR z@OTN9Kd@k+n^D~ES<1|MxWAR-rpt1*Hf~t0zi7G*jjK+H?e5p$>*WgeZu`T=DQSVq qO}9bSDKVda0#K|Jsh2C-K-K@~s;s=D6?bC*0000Lc{kjKW z)Hu?4*L96_jVMkM_&&;aQAK%xQkq0`2*Epa{_S2almmEYy?>P#6=H;f$?!xZ`!|D3 zK^mh8Mz6mr`Nj(R(V8R=qX~vV!148qF${t={kxQ&hbaM^-#&@W>e%T)xbEKVbh4PV zq-3molzP6)$WF%kFFbk=0sz3K1Bo5vVaoArJDF