diff options
author | madmaxoft <github@xoft.cz> | 2013-11-22 12:26:39 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-11-22 12:26:39 +0100 |
commit | 07a1de8ebb58f61f2cd37db0e3382f0df9a784f0 (patch) | |
tree | fa867ed04734f7fbe78562a07cb423a65327977f /MCServer/Plugins/Debuggers/Debuggers.lua | |
parent | Changed cRoot:GetFurnaceRecipe() Lua binding signature. (diff) | |
download | cuberite-07a1de8ebb58f61f2cd37db0e3382f0df9a784f0.tar cuberite-07a1de8ebb58f61f2cd37db0e3382f0df9a784f0.tar.gz cuberite-07a1de8ebb58f61f2cd37db0e3382f0df9a784f0.tar.bz2 cuberite-07a1de8ebb58f61f2cd37db0e3382f0df9a784f0.tar.lz cuberite-07a1de8ebb58f61f2cd37db0e3382f0df9a784f0.tar.xz cuberite-07a1de8ebb58f61f2cd37db0e3382f0df9a784f0.tar.zst cuberite-07a1de8ebb58f61f2cd37db0e3382f0df9a784f0.zip |
Diffstat (limited to '')
-rw-r--r-- | MCServer/Plugins/Debuggers/Debuggers.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua index c4811b91a..e4c601da3 100644 --- a/MCServer/Plugins/Debuggers/Debuggers.lua +++ b/MCServer/Plugins/Debuggers/Debuggers.lua @@ -48,6 +48,7 @@ function Initialize(Plugin) PM:BindCommand("/xpa", "debuggers", HandleAddExperience, "- Adds 200 experience to the player"); PM:BindCommand("/xpr", "debuggers", HandleRemoveXp, "- Remove all xp"); PM:BindCommand("/fill", "debuggers", HandleFill, "- Fills all block entities in current chunk with junk"); + PM:BindCommand("/fr", "debuggers", HandleFurnaceRecipe, "- Shows the furnace recipe for the currently held item"); -- Enable the following line for BlockArea / Generator interface testing: -- PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_GENERATED); @@ -903,3 +904,23 @@ end + +function HandleFurnaceRecipe(a_Split, a_Player) + local HeldItem = a_Player:GetEquippedItem(); + local Out, NumTicks, In = cRoot.GetFurnaceRecipe(HeldItem); + if (Out ~= nil) then + a_Player:SendMessage( + "Furnace turns " .. ItemToFullString(In) .. + " to " .. ItemToFullString(Out) .. + " in " .. NumTicks .. " ticks (" .. + tostring(NumTicks / 20) .. " seconds)." + ); + else + a_Player:SendMessage("There is no furnace recipe that would smelt " .. ItemToString(HeldItem)); + end + return true; +end + + + + |