Class CopyComponentsLootFunction

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

public class CopyComponentsLootFunction extends ConditionalLootFunction
Mappings:
Namespace Name
named net/minecraft/loot/function/CopyComponentsLootFunction
intermediary net/minecraft/class_9317
official erk
  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<CopyComponentsLootFunction> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/loot/function/CopyComponentsLootFunction;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_49430 Lnet/minecraft/class_9317;field_49430:Lcom/mojang/serialization/MapCodec;
      official a Lerk;a:Lcom/mojang/serialization/MapCodec;
    • source

      private final CopyComponentsLootFunction.Source source
      Mappings:
      Namespace Name Mixin selector
      named source Lnet/minecraft/loot/function/CopyComponentsLootFunction;source:Lnet/minecraft/loot/function/CopyComponentsLootFunction$Source;
      intermediary field_49431 Lnet/minecraft/class_9317;field_49431:Lnet/minecraft/class_9317$class_9319;
      official b Lerk;b:Lerk$b;
    • include

      private final Optional<List<DataComponentType<?>>> include
      Mappings:
      Namespace Name Mixin selector
      named include Lnet/minecraft/loot/function/CopyComponentsLootFunction;include:Ljava/util/Optional;
      intermediary field_50202 Lnet/minecraft/class_9317;field_50202:Ljava/util/Optional;
      official c Lerk;c:Ljava/util/Optional;
    • exclude

      private final Optional<List<DataComponentType<?>>> exclude
      Mappings:
      Namespace Name Mixin selector
      named exclude Lnet/minecraft/loot/function/CopyComponentsLootFunction;exclude:Ljava/util/Optional;
      intermediary field_50203 Lnet/minecraft/class_9317;field_50203:Ljava/util/Optional;
      official d Lerk;d:Ljava/util/Optional;
    • filter

      private final Predicate<DataComponentType<?>> filter
      Mappings:
      Namespace Name Mixin selector
      named filter Lnet/minecraft/loot/function/CopyComponentsLootFunction;filter:Ljava/util/function/Predicate;
      intermediary field_50204 Lnet/minecraft/class_9317;field_50204:Ljava/util/function/Predicate;
      official e Lerk;e:Ljava/util/function/Predicate;
  • Constructor Details

    • CopyComponentsLootFunction

      CopyComponentsLootFunction(List<LootCondition> conditions, CopyComponentsLootFunction.Source source, Optional<List<DataComponentType<?>>> include, Optional<List<DataComponentType<?>>> exclude)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/loot/function/CopyComponentsLootFunction;<init>(Ljava/util/List;Lnet/minecraft/loot/function/CopyComponentsLootFunction$Source;Ljava/util/Optional;Ljava/util/Optional;)V
      intermediary <init> Lnet/minecraft/class_9317;<init>(Ljava/util/List;Lnet/minecraft/class_9317$class_9319;Ljava/util/Optional;Ljava/util/Optional;)V
      official <init> Lerk;<init>(Ljava/util/List;Lerk$b;Ljava/util/Optional;Ljava/util/Optional;)V
  • Method Details

    • 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;
    • getRequiredParameters

      public Set<LootContextParameter<?>> getRequiredParameters()
      Mappings:
      Namespace Name Mixin selector
      named getRequiredParameters Lnet/minecraft/loot/context/LootContextAware;getRequiredParameters()Ljava/util/Set;
      intermediary method_293 Lnet/minecraft/class_46;method_293()Ljava/util/Set;
      official a Leql;a()Ljava/util/Set;
    • process

      public 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;
    • builder

      Mappings:
      Namespace Name Mixin selector
      named builder Lnet/minecraft/loot/function/CopyComponentsLootFunction;builder(Lnet/minecraft/loot/function/CopyComponentsLootFunction$Source;)Lnet/minecraft/loot/function/CopyComponentsLootFunction$Builder;
      intermediary method_57637 Lnet/minecraft/class_9317;method_57637(Lnet/minecraft/class_9317$class_9319;)Lnet/minecraft/class_9317$class_9318;
      official a Lerk;a(Lerk$b;)Lerk$a;