Class AbstractFurnaceMock
java.lang.Object
be.seeseemelk.mockbukkit.block.state.BlockStateMock
be.seeseemelk.mockbukkit.block.state.TileStateMock
be.seeseemelk.mockbukkit.block.state.ContainerMock
be.seeseemelk.mockbukkit.block.state.AbstractFurnaceMock
- All Implemented Interfaces:
LockableTileState
,BlockState
,Container
,Furnace
,Lockable
,TileState
,BlockInventoryHolder
,InventoryHolder
,Metadatable
,Nameable
,PersistentDataHolder
- Direct Known Subclasses:
BlastFurnaceMock
,SmokerMock
Mock implementation of a
Furnace
.- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
AbstractFurnaceMock
(@NotNull AbstractFurnaceMock state) Constructs a newAbstractFurnaceMock
by cloning the data from an existing one.protected
AbstractFurnaceMock
(@NotNull Block block) Constructs a newAbstractFurnaceMock
for the providedBlock
.protected
AbstractFurnaceMock
(@NotNull Material material) Constructs a newAbstractFurnaceMock
for the providedMaterial
. -
Method Summary
Modifier and TypeMethodDescriptionprotected @NotNull FurnaceInventoryMock
short
double
short
int
@NotNull FurnaceInventory
@NotNull Map<CookingRecipe<?>,
Integer> int
getRecipeUsedCount
(@NotNull NamespacedKey furnaceRecipe) @NotNull FurnaceInventory
boolean
hasRecipeUsedCount
(@NotNull NamespacedKey furnaceRecipe) void
setBurnTime
(short burnTime) void
setCookSpeedMultiplier
(double multiplier) void
setCookTime
(short cookTime) void
setCookTimeTotal
(int cookTimeTotal) void
setRecipesUsed
(@NotNull Map<CookingRecipe<?>, Integer> recipesUsed) void
setRecipeUsedCount
(@NotNull CookingRecipe<?> furnaceRecipe, int count) Methods inherited from class be.seeseemelk.mockbukkit.block.state.ContainerMock
customName, customName, getCustomName, getLock, getSnapshot, isLocked, setCustomName, setLock
Methods inherited from class be.seeseemelk.mockbukkit.block.state.TileStateMock
getPersistentDataContainer, isSnapshot
Methods inherited from class be.seeseemelk.mockbukkit.block.state.BlockStateMock
checkType, checkType, checkType, checkType, equals, getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getMetadata, getRawData, getType, getWorld, getX, getY, getZ, hashCode, hasMetadata, isCollidable, isPlaced, mockState, removeMetadata, setBlockData, setData, setMetadata, setRawData, setType, update, update, update
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.bukkit.inventory.BlockInventoryHolder
getBlock
Methods inherited from interface org.bukkit.block.BlockState
getBlock, getBlockData, getChunk, getData, getDrops, getDrops, getDrops, getLightLevel, getLocation, getLocation, getRawData, getType, getWorld, getX, getY, getZ, isCollidable, isPlaced, setBlockData, setData, setRawData, setType, update, update, update
Methods inherited from interface org.bukkit.metadata.Metadatable
getMetadata, hasMetadata, removeMetadata, setMetadata
Methods inherited from interface org.bukkit.Nameable
customName, customName, getCustomName, setCustomName
Methods inherited from interface org.bukkit.block.TileState
getPersistentDataContainer, isSnapshot
-
Constructor Details
-
AbstractFurnaceMock
Constructs a newAbstractFurnaceMock
for the providedMaterial
. Only supportsMaterial.SMOKER
,Material.FURNACE
, andMaterial.BLAST_FURNACE
.- Parameters:
material
- The material this state is for.
-
AbstractFurnaceMock
Constructs a newAbstractFurnaceMock
for the providedBlock
. Only supportsMaterial.SMOKER
,Material.FURNACE
, andMaterial.BLAST_FURNACE
.- Parameters:
block
- The block this state is for.
-
AbstractFurnaceMock
Constructs a newAbstractFurnaceMock
by cloning the data from an existing one.- Parameters:
state
- The state to clone.
-
-
Method Details
-
createInventory
- Specified by:
createInventory
in classContainerMock
- Returns:
- A new inventory, of the correct type for the state.
-
getBurnTime
public short getBurnTime()- Specified by:
getBurnTime
in interfaceFurnace
-
setBurnTime
public void setBurnTime(short burnTime) - Specified by:
setBurnTime
in interfaceFurnace
-
getCookTime
public short getCookTime()- Specified by:
getCookTime
in interfaceFurnace
-
setCookTime
public void setCookTime(short cookTime) - Specified by:
setCookTime
in interfaceFurnace
-
getCookTimeTotal
public int getCookTimeTotal()- Specified by:
getCookTimeTotal
in interfaceFurnace
-
setCookTimeTotal
public void setCookTimeTotal(int cookTimeTotal) - Specified by:
setCookTimeTotal
in interfaceFurnace
-
getRecipesUsed
- Specified by:
getRecipesUsed
in interfaceFurnace
-
getCookSpeedMultiplier
public double getCookSpeedMultiplier()- Specified by:
getCookSpeedMultiplier
in interfaceFurnace
-
setCookSpeedMultiplier
public void setCookSpeedMultiplier(double multiplier) - Specified by:
setCookSpeedMultiplier
in interfaceFurnace
-
getRecipeUsedCount
- Specified by:
getRecipeUsedCount
in interfaceFurnace
-
hasRecipeUsedCount
- Specified by:
hasRecipeUsedCount
in interfaceFurnace
-
setRecipeUsedCount
- Specified by:
setRecipeUsedCount
in interfaceFurnace
-
setRecipesUsed
- Specified by:
setRecipesUsed
in interfaceFurnace
-
getInventory
- Specified by:
getInventory
in interfaceContainer
- Specified by:
getInventory
in interfaceFurnace
- Specified by:
getInventory
in interfaceInventoryHolder
- Overrides:
getInventory
in classContainerMock
-
getSnapshotInventory
- Specified by:
getSnapshotInventory
in interfaceContainer
- Specified by:
getSnapshotInventory
in interfaceFurnace
- Overrides:
getSnapshotInventory
in classContainerMock
-