diff options
author | KingCol13 <kingsleydgs@gmail.com> | 2022-01-02 18:22:15 +0100 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2022-01-13 01:39:12 +0100 |
commit | b7f1bbb8d90dc587752726f1d827634208a722b0 (patch) | |
tree | 86320b1ccc74fc8b1fe8fb2383416660a9563dc7 /src/UI/SlotArea.cpp | |
parent | Fix build on Clang < 12 (diff) | |
download | cuberite-b7f1bbb8d90dc587752726f1d827634208a722b0.tar cuberite-b7f1bbb8d90dc587752726f1d827634208a722b0.tar.gz cuberite-b7f1bbb8d90dc587752726f1d827634208a722b0.tar.bz2 cuberite-b7f1bbb8d90dc587752726f1d827634208a722b0.tar.lz cuberite-b7f1bbb8d90dc587752726f1d827634208a722b0.tar.xz cuberite-b7f1bbb8d90dc587752726f1d827634208a722b0.tar.zst cuberite-b7f1bbb8d90dc587752726f1d827634208a722b0.zip |
Diffstat (limited to '')
-rw-r--r-- | src/UI/SlotArea.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/UI/SlotArea.cpp b/src/UI/SlotArea.cpp index 28f3054ce..23850e3d6 100644 --- a/src/UI/SlotArea.cpp +++ b/src/UI/SlotArea.cpp @@ -2001,6 +2001,17 @@ void cSlotAreaFurnace::Clicked(cPlayer & a_Player, int a_SlotNum, eClickAction a return; } + if (a_SlotNum == 1) + { + cItem & DraggingItem = a_Player.GetDraggingItem(); + cFurnaceRecipe * FurnaceRecipes = cRoot::Get()->GetFurnaceRecipe(); + // Do not allow non-fuels to be placed in the fuel slot: + if (!FurnaceRecipes->IsFuel(DraggingItem)) + { + return; + } + } + Super::Clicked(a_Player, a_SlotNum, a_ClickAction, a_ClickedItem); } |