Class SetFireworksLootFunction

java.lang.Object
net.minecraft.loot.function.ConditionalLootFunction
net.minecraft.loot.function.SetFireworksLootFunction
All Implemented Interfaces:
BiFunction<ItemStack,LootContext,ItemStack>, LootContextAware, LootFunction

public class SetFireworksLootFunction extends ConditionalLootFunction
Mappings:
Namespace Name
named net/minecraft/loot/function/SetFireworksLootFunction
intermediary net/minecraft/class_9376
official esn
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<SetFireworksLootFunction> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/loot/function/SetFireworksLootFunction;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_49881 Lnet/minecraft/class_9376;field_49881:Lcom/mojang/serialization/MapCodec;
      official a Lesn;a:Lcom/mojang/serialization/MapCodec;
    • DEFAULT_FIREWORKS

      public static final FireworksComponent DEFAULT_FIREWORKS
      Mappings:
      Namespace Name Mixin selector
      named DEFAULT_FIREWORKS Lnet/minecraft/loot/function/SetFireworksLootFunction;DEFAULT_FIREWORKS:Lnet/minecraft/component/type/FireworksComponent;
      intermediary field_49882 Lnet/minecraft/class_9376;field_49882:Lnet/minecraft/class_9284;
      official b Lesn;b:Lcxl;
    • explosions

      Mappings:
      Namespace Name Mixin selector
      named explosions Lnet/minecraft/loot/function/SetFireworksLootFunction;explosions:Ljava/util/Optional;
      intermediary field_49883 Lnet/minecraft/class_9376;field_49883:Ljava/util/Optional;
      official c Lesn;c:Ljava/util/Optional;
    • flightDuration

      private final Optional<Integer> flightDuration
      Mappings:
      Namespace Name Mixin selector
      named flightDuration Lnet/minecraft/loot/function/SetFireworksLootFunction;flightDuration:Ljava/util/Optional;
      intermediary field_49885 Lnet/minecraft/class_9376;field_49885:Ljava/util/Optional;
      official d Lesn;d:Ljava/util/Optional;
  • Constructor Details

    • SetFireworksLootFunction

      protected SetFireworksLootFunction(List<LootCondition> conditions, Optional<ListOperation.Values<FireworkExplosionComponent>> explosions, Optional<Integer> flightDuration)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/loot/function/SetFireworksLootFunction;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_9376;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)V
      official <init> Lesn;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;)V
  • Method Details

    • process

      protected ItemStack process(ItemStack stack, LootContext context)
      Specified by:
      process in class ConditionalLootFunction
      Mappings:
      Namespace Name Mixin selector
      named process Lnet/minecraft/loot/function/ConditionalLootFunction;process(Lnet/minecraft/item/ItemStack;Lnet/minecraft/loot/context/LootContext;)Lnet/minecraft/item/ItemStack;
      intermediary method_522 Lnet/minecraft/class_120;method_522(Lnet/minecraft/class_1799;Lnet/minecraft/class_47;)Lnet/minecraft/class_1799;
      official a Lerw;a(Lcur;Leqk;)Lcur;
    • apply

      private FireworksComponent apply(FireworksComponent fireworksComponent)
      Mappings:
      Namespace Name Mixin selector
      named apply Lnet/minecraft/loot/function/SetFireworksLootFunction;apply(Lnet/minecraft/component/type/FireworksComponent;)Lnet/minecraft/component/type/FireworksComponent;
      intermediary method_58212 Lnet/minecraft/class_9376;method_58212(Lnet/minecraft/class_9284;)Lnet/minecraft/class_9284;
      official a Lesn;a(Lcxl;)Lcxl;
    • getType

      Specified by:
      getType in interface LootFunction
      Specified by:
      getType in class ConditionalLootFunction
      Mappings:
      Namespace Name Mixin selector
      named getType Lnet/minecraft/loot/function/LootFunction;getType()Lnet/minecraft/loot/function/LootFunctionType;
      intermediary method_29321 Lnet/minecraft/class_117;method_29321()Lnet/minecraft/class_5339;
      official b Lerx;b()Lery;