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 aFurnaceBlockEntityorCampfire.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCookingEvent.ConsumeFuelFires whenever fuel is consumed to refill the current burn time.static interfaceCookingEvent.Finishstatic interfaceCookingEvent.InterruptFires when the cooking is interrupted causing the current cooking time to reset to 0.static interfaceCookingEvent.StartThe first tick of an item cooking.static interfaceCookingEvent.TickThe cooking timer ticking up or down.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockEntityblockEntity()Gets theBlockEntityused for cooking.java.util.Optional<ItemStackSnapshot>fuel()Gets the fuel represented as anItemStackSnapshot.java.util.Optional<CookingRecipe>recipe()Gets the recipe currently active.
-
-
-
Method Detail
-
blockEntity
BlockEntity blockEntity()
Gets theBlockEntityused for cooking.- Returns:
- The furnace
-
fuel
java.util.Optional<ItemStackSnapshot> fuel()
Gets the fuel represented as anItemStackSnapshot.- Returns:
- The ingredient
-
recipe
java.util.Optional<CookingRecipe> recipe()
Gets the recipe currently active.Always
Optional.empty()forCookingEvent.Interrupt- Returns:
- The recipe
-
-