类 FurnaceFuelBurnTimeEvent

java.lang.Object
net.minecraftforge.eventbus.api.Event
net.minecraftforge.event.furnace.FurnaceFuelBurnTimeEvent

public class FurnaceFuelBurnTimeEvent extends net.minecraftforge.eventbus.api.Event
FurnaceFuelBurnTimeEvent is fired when determining the fuel value for an ItemStack.

To set the burn time of your own item, use IForgeItem.getBurnTime(ItemStack, RecipeType) instead.

This event is fired from ForgeEventFactory.getItemBurnTime(ItemStack, int, RecipeType).

This event is Cancelable to prevent later handlers from changing the value.

This event does not have a result. Event.HasResult

This event is fired on the MinecraftForge.EVENT_BUS.
  • 嵌套类概要

    从类继承的嵌套类/接口 net.minecraftforge.eventbus.api.Event

    net.minecraftforge.eventbus.api.Event.HasResult, net.minecraftforge.eventbus.api.Event.Result
  • 字段概要

    字段
    修饰符和类型
    字段
    说明
    private int
     
    private final @NotNull ItemStack
     
    private final @Nullable RecipeType<?>
     
  • 构造器概要

    构造器
    构造器
    说明
    FurnaceFuelBurnTimeEvent(@NotNull ItemStack itemStack, int burnTime, @Nullable RecipeType<?> recipeType)
     
  • 方法概要

    修饰符和类型
    方法
    说明
    int
    The resulting value of this event, the burn time for the ItemStack.
    @NotNull ItemStack
    Get the ItemStack "fuel" in question.
    @Nullable RecipeType<?>
    Get the recipe type for which to obtain the burn time, if known.
    void
    setBurnTime(int burnTime)
    Set the burn time for the given ItemStack.

    从类继承的方法 net.minecraftforge.eventbus.api.Event

    getListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult

    从类继承的方法 java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 字段详细资料

    • itemStack

      @NotNull private final @NotNull ItemStack itemStack
    • recipeType

      @Nullable private final @Nullable RecipeType<?> recipeType
    • burnTime

      private int burnTime
  • 构造器详细资料

    • FurnaceFuelBurnTimeEvent

      public FurnaceFuelBurnTimeEvent(@NotNull @NotNull ItemStack itemStack, int burnTime, @Nullable @Nullable RecipeType<?> recipeType)
  • 方法详细资料

    • getItemStack

      @NotNull public @NotNull ItemStack getItemStack()
      Get the ItemStack "fuel" in question.
    • getRecipeType

      @Nullable public @Nullable RecipeType<?> 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.