summaryrefslogtreecommitdiffstats
path: root/MCServer
diff options
context:
space:
mode:
Diffstat (limited to 'MCServer')
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua21
1 files changed, 20 insertions, 1 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index e4c601da3..682a54676 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -49,6 +49,7 @@ function Initialize(Plugin)
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");
+ PM:BindCommand("/ff", "debuggers", HandleFurnaceFuel, "- Shows how long the currently held item would burn in a furnace");
-- Enable the following line for BlockArea / Generator interface testing:
-- PluginManager:AddHook(Plugin, cPluginManager.HOOK_CHUNK_GENERATED);
@@ -907,7 +908,7 @@ end
function HandleFurnaceRecipe(a_Split, a_Player)
local HeldItem = a_Player:GetEquippedItem();
- local Out, NumTicks, In = cRoot.GetFurnaceRecipe(HeldItem);
+ local Out, NumTicks, In = cRoot:GetFurnaceRecipe(HeldItem);
if (Out ~= nil) then
a_Player:SendMessage(
"Furnace turns " .. ItemToFullString(In) ..
@@ -924,3 +925,21 @@ end
+
+function HandleFurnaceFuel(a_Split, a_Player)
+ local HeldItem = a_Player:GetEquippedItem();
+ local NumTicks = cRoot:GetFurnaceFuelBurnTime(HeldItem);
+ if (NumTicks > 0) then
+ a_Player:SendMessage(
+ ItemToFullString(HeldItem) .. " would power a furnace for " .. NumTicks ..
+ " ticks (" .. tostring(NumTicks / 20) .. " seconds)."
+ );
+ else
+ a_Player:SendMessage(ItemToString(HeldItem) .. " will not power furnaces.");
+ end
+ return true;
+end
+
+
+
+