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
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceFires whenever fuel is consumed to refill the current burn time.static interfacestatic interfaceFires when the cooking is interrupted causing the current cooking time to reset to 0.static interfaceThe first tick of an item cooking.static interfaceThe cooking timer ticking up or down. -
Method Summary
Modifier and TypeMethodDescriptionGets theBlockEntityused for cooking.fuel()Gets the fuel represented as anItemStackSnapshot.recipe()Gets the recipe currently active.
-
Method Details
-
blockEntity
BlockEntity blockEntity()Gets theBlockEntityused 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
-
recipeKey
Optional<ResourceKey> recipeKey()
-