Class SetNameLootFunction

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

public class SetNameLootFunction extends ConditionalLootFunction
Mappings:
Namespace Name
named net/minecraft/loot/function/SetNameLootFunction
intermediary net/minecraft/class_3670
official ess
  • Field Details

    • LOGGER

      private static final Logger LOGGER
      Mappings:
      Namespace Name Mixin selector
      named LOGGER Lnet/minecraft/loot/function/SetNameLootFunction;LOGGER:Lorg/slf4j/Logger;
      intermediary field_16230 Lnet/minecraft/class_3670;field_16230:Lorg/slf4j/Logger;
      official b Less;b:Lorg/slf4j/Logger;
    • CODEC

      public static final com.mojang.serialization.MapCodec<SetNameLootFunction> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/loot/function/SetNameLootFunction;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_45848 Lnet/minecraft/class_3670;field_45848:Lcom/mojang/serialization/MapCodec;
      official a Less;a:Lcom/mojang/serialization/MapCodec;
    • name

      private final Optional<Text> name
      Mappings:
      Namespace Name Mixin selector
      named name Lnet/minecraft/loot/function/SetNameLootFunction;name:Ljava/util/Optional;
      intermediary field_16228 Lnet/minecraft/class_3670;field_16228:Ljava/util/Optional;
      official c Less;c:Ljava/util/Optional;
    • entity

      private final Optional<LootContext.EntityTarget> entity
      Mappings:
      Namespace Name Mixin selector
      named entity Lnet/minecraft/loot/function/SetNameLootFunction;entity:Ljava/util/Optional;
      intermediary field_16229 Lnet/minecraft/class_3670;field_16229:Ljava/util/Optional;
      official d Less;d:Ljava/util/Optional;
    • target

      private final SetNameLootFunction.Target target
      Mappings:
      Namespace Name Mixin selector
      named target Lnet/minecraft/loot/function/SetNameLootFunction;target:Lnet/minecraft/loot/function/SetNameLootFunction$Target;
      intermediary field_50208 Lnet/minecraft/class_3670;field_50208:Lnet/minecraft/class_3670$class_9475;
      official e Less;e:Less$a;
  • Constructor Details

    • SetNameLootFunction

      private SetNameLootFunction(List<LootCondition> conditions, Optional<Text> name, Optional<LootContext.EntityTarget> entity, SetNameLootFunction.Target target)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/loot/function/SetNameLootFunction;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;Lnet/minecraft/loot/function/SetNameLootFunction$Target;)V
      intermediary <init> Lnet/minecraft/class_3670;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;Lnet/minecraft/class_3670$class_9475;)V
      official <init> Less;<init>(Ljava/util/List;Ljava/util/Optional;Ljava/util/Optional;Less$a;)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 Lerw;b()Lerx;
    • 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 Leqk;a()Ljava/util/Set;
    • applySourceEntity

      public static UnaryOperator<Text> applySourceEntity(LootContext context, @Nullable LootContext.EntityTarget sourceEntity)
      Mappings:
      Namespace Name Mixin selector
      named applySourceEntity Lnet/minecraft/loot/function/SetNameLootFunction;applySourceEntity(Lnet/minecraft/loot/context/LootContext;Lnet/minecraft/loot/context/LootContext$EntityTarget;)Ljava/util/function/UnaryOperator;
      intermediary method_16190 Lnet/minecraft/class_3670;method_16190(Lnet/minecraft/class_47;Lnet/minecraft/class_47$class_50;)Ljava/util/function/UnaryOperator;
      official a Less;a(Leqj;Leqj$b;)Ljava/util/function/UnaryOperator;
    • 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 Lerv;a(Lcuq;Leqj;)Lcuq;
    • builder

      public static ConditionalLootFunction.Builder<?> builder(Text name, SetNameLootFunction.Target target)
      Mappings:
      Namespace Name Mixin selector
      named builder Lnet/minecraft/loot/function/SetNameLootFunction;builder(Lnet/minecraft/text/Text;Lnet/minecraft/loot/function/SetNameLootFunction$Target;)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
      intermediary method_35549 Lnet/minecraft/class_3670;method_35549(Lnet/minecraft/class_2561;Lnet/minecraft/class_3670$class_9475;)Lnet/minecraft/class_120$class_121;
      official a Less;a(Lxp;Less$a;)Lerv$a;
    • builder

      Mappings:
      Namespace Name Mixin selector
      named builder Lnet/minecraft/loot/function/SetNameLootFunction;builder(Lnet/minecraft/text/Text;Lnet/minecraft/loot/function/SetNameLootFunction$Target;Lnet/minecraft/loot/context/LootContext$EntityTarget;)Lnet/minecraft/loot/function/ConditionalLootFunction$Builder;
      intermediary method_35550 Lnet/minecraft/class_3670;method_35550(Lnet/minecraft/class_2561;Lnet/minecraft/class_3670$class_9475;Lnet/minecraft/class_47$class_50;)Lnet/minecraft/class_120$class_121;
      official a Less;a(Lxp;Less$a;Leqj$b;)Lerv$a;