Interface CookingEvent
- All Superinterfaces:
Event
- All Known Subinterfaces:
CookingEvent.ConsumeFuel
,CookingEvent.Finish
,CookingEvent.Interrupt
,CookingEvent.Start
,CookingEvent.Tick
Events for cooking items in a
FurnaceBlockEntity
or Campfire
.-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Fires whenever fuel is consumed to refill the current burn time.static interface
static interface
Fires when the cooking is interrupted causing the current cooking time to reset to 0.static interface
The first tick of an item cooking.static interface
The cooking timer ticking up or down. -
Method Summary
Modifier and TypeMethodDescriptionGets theBlockEntity
used for cooking.fuel()
Gets the fuel represented as anItemStackSnapshot
.recipe()
Gets the recipe currently active.
-
Method Details
-
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
-