Package net.minecraftforge.event.furnace
Class FurnaceFuelBurnTimeEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.furnace.FurnaceFuelBurnTimeEvent
-
public class FurnaceFuelBurnTimeEvent extends net.minecraftforge.eventbus.api.EventFurnaceFuelBurnTimeEventis fired when determining the fuel value for an ItemStack.
To set the burn time of your own item, useIForgeItem.getBurnTime(ItemStack)instead.
This event is fired fromForgeEventFactory#getItemBurnTime(ItemStack).
This event isCancelableto prevent later handlers from changing the value.
This event does not have a result.Event.HasResult
This event is fired on theMinecraftForge.EVENT_BUS.
-
-
Field Summary
Fields Modifier and Type Field Description private intburnTimeprivate ItemStackitemStackprivate IRecipeType<?>recipeType
-
Constructor Summary
Constructors Constructor Description FurnaceFuelBurnTimeEvent(ItemStack itemStack, int burnTime)Deprecated.FurnaceFuelBurnTimeEvent(ItemStack itemStack, int burnTime, IRecipeType<?> recipeType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetBurnTime()The resulting value of this event, the burn time for the ItemStack.ItemStackgetItemStack()Get the ItemStack "fuel" in question.IRecipeType<?>getRecipeType()Get the recipe type for which to obtain the burn time, if known.voidsetBurnTime(int burnTime)Set the burn time for the given ItemStack.
-
-
-
Field Detail
-
itemStack
@Nonnull private final ItemStack itemStack
-
recipeType
@Nullable private final IRecipeType<?> recipeType
-
burnTime
private int burnTime
-
-
Constructor Detail
-
FurnaceFuelBurnTimeEvent
@Deprecated public FurnaceFuelBurnTimeEvent(@Nonnull ItemStack itemStack, int burnTime)Deprecated.
-
FurnaceFuelBurnTimeEvent
public FurnaceFuelBurnTimeEvent(@Nonnull ItemStack itemStack, int burnTime, @Nullable IRecipeType<?> recipeType)
-
-
Method Detail
-
getItemStack
@Nonnull public ItemStack getItemStack()
Get the ItemStack "fuel" in question.
-
getRecipeType
@Nullable public IRecipeType<?> getRecipeType()
Get the recipe type for which to obtain the burn time, if known.
-
setBurnTime
public void setBurnTime(int burnTime)
Set the burn time for the given ItemStack. Setting it to 0 will prevent the item from being used as fuel, overriding vanilla's decision.
-
getBurnTime
public int getBurnTime()
The resulting value of this event, the burn time for the ItemStack. A value of 0 will prevent the item from being used as fuel, overriding vanilla's decision.
-
-