Package org.bukkit.inventory.view
Interface FurnaceView
- All Superinterfaces:
InventoryView
An instance of
InventoryView
which provides extra methods related to
furnace view data.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.bukkit.inventory.InventoryView
InventoryView.Property
-
Field Summary
Fields inherited from interface org.bukkit.inventory.InventoryView
OUTSIDE
-
Method Summary
Modifier and TypeMethodDescriptionfloat
The total burn time for this view.float
The cook time for this view.Get the upper inventory involved in this transaction.boolean
Checks whether or not the furnace is burningvoid
setBurnTime
(int burnProgress, int burnDuration) Sets the burn timevoid
setCookTime
(int cookProgress, int cookDuration) Sets the cook timeMethods inherited from interface org.bukkit.inventory.InventoryView
close, convertSlot, countSlots, getBottomInventory, getCursor, getInventory, getItem, getOriginalTitle, getPlayer, getSlotType, getTitle, getType, setCursor, setItem, setProperty, setTitle
-
Method Details
-
getTopInventory
Description copied from interface:InventoryView
Get the upper inventory involved in this transaction.- Specified by:
getTopInventory
in interfaceInventoryView
- Returns:
- the inventory
-
getCookTime
float getCookTime()The cook time for this view.See
Furnace.getCookTime()
for more information.- Returns:
- a number between 0 and 1
-
getBurnTime
float getBurnTime()The total burn time for this view.See
Furnace.getBurnTime()
for more information.- Returns:
- a number between 0 and 1
-
isBurning
boolean isBurning()Checks whether or not the furnace is burning- Returns:
- true given that the furnace is burning
-
setCookTime
void setCookTime(int cookProgress, int cookDuration) Sets the cook timeSetting cook time requires manipulation of both cookProgress and cookDuration. This method does a simple division to get total progress within the furnaces visual duration bar. For a clear visual effect (cookProgress / cookDuration) should return a number between 0 and 1 inclusively.
- Parameters:
cookProgress
- the current of the cookingcookDuration
- the total cook time
-
setBurnTime
void setBurnTime(int burnProgress, int burnDuration) Sets the burn timeSetting burn time requires manipulation of both burnProgress and burnDuration. This method does a simple division to get total progress within the furnaces visual burning bar. For a clear visual effect (burnProgress / burnDuration) should return a number between 0 and 1 inclusively.
- Parameters:
burnProgress
- the progress towards the burnDurationburnDuration
- the total duration the view should be lit
-