Interface CookingEvent
-
- All Superinterfaces:
Event
- All Known Subinterfaces:
CookingEvent.ConsumeFuel
,CookingEvent.Finish
,CookingEvent.Interrupt
,CookingEvent.Start
,CookingEvent.Tick
public interface CookingEvent extends Event
Events for cooking items in aFurnaceBlockEntity
orCampfire
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
CookingEvent.ConsumeFuel
Fires whenever fuel is consumed to refill the current burn time.static interface
CookingEvent.Finish
static interface
CookingEvent.Interrupt
Fires when the cooking is interrupted causing the current cooking time to reset to 0.static interface
CookingEvent.Start
The first tick of an item cooking.static interface
CookingEvent.Tick
The cooking timer ticking up or down.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockEntity
blockEntity()
Gets theBlockEntity
used for cooking.Optional<ItemStackSnapshot>
fuel()
Gets the fuel represented as anItemStackSnapshot
.Optional<CookingRecipe>
recipe()
Gets the recipe currently active.
-
-
-
Method Detail
-
blockEntity
BlockEntity blockEntity()
Gets theBlockEntity
used for cooking.- Returns:
- The furnace
-
fuel
Optional<ItemStackSnapshot> fuel()
Gets the fuel represented as anItemStackSnapshot
.- Returns:
- The ingredient
-
recipe
Optional<CookingRecipe> recipe()
Gets the recipe currently active.Always
Optional.empty()
forCookingEvent.Interrupt
- Returns:
- The recipe
-
-