Record Class StorageLootNbtProvider

java.lang.Object
java.lang.Record
net.minecraft.loot.provider.nbt.StorageLootNbtProvider
Record Components:
source -
All Implemented Interfaces:
LootNbtProvider

public record StorageLootNbtProvider(Identifier source) extends Record implements LootNbtProvider
Mappings:
Namespace Name
official ekl
intermediary net/minecraft/class_5653
named net/minecraft/loot/provider/nbt/StorageLootNbtProvider
official b
intermediary comp_1892
named source
  • Field Details

    • source

      private final Identifier source
      The field for the source record component.
    • CODEC

      public static final com.mojang.serialization.Codec<StorageLootNbtProvider> CODEC
      Mappings:
      Namespace Name Mixin selector
      official a Lekl;a:Lcom/mojang/serialization/Codec;
      intermediary field_45884 Lnet/minecraft/class_5653;field_45884:Lcom/mojang/serialization/Codec;
      named CODEC Lnet/minecraft/loot/provider/nbt/StorageLootNbtProvider;CODEC:Lcom/mojang/serialization/Codec;
  • Constructor Details

    • StorageLootNbtProvider

      public StorageLootNbtProvider(Identifier source)
      Creates an instance of a StorageLootNbtProvider record class.
      Parameters:
      source - the value for the source record component
  • Method Details

    • getType

      public LootNbtProviderType getType()
      Specified by:
      getType in interface LootNbtProvider
      Mappings:
      Namespace Name Mixin selector
      official a Lekj;a()Leki;
      intermediary method_32439 Lnet/minecraft/class_5651;method_32439()Lnet/minecraft/class_5650;
      named getType Lnet/minecraft/loot/provider/nbt/LootNbtProvider;getType()Lnet/minecraft/loot/provider/nbt/LootNbtProviderType;
    • getNbt

      @Nullable public @Nullable NbtElement getNbt(LootContext context)
      Specified by:
      getNbt in interface LootNbtProvider
      Mappings:
      Namespace Name Mixin selector
      official a Lekj;a(Legw;)Ltk;
      intermediary method_32440 Lnet/minecraft/class_5651;method_32440(Lnet/minecraft/class_47;)Lnet/minecraft/class_2520;
      named getNbt Lnet/minecraft/loot/provider/nbt/LootNbtProvider;getNbt(Lnet/minecraft/loot/context/LootContext;)Lnet/minecraft/nbt/NbtElement;
    • getRequiredParameters

      public Set<LootContextParameter<?>> getRequiredParameters()
      Specified by:
      getRequiredParameters in interface LootNbtProvider
      Mappings:
      Namespace Name Mixin selector
      official b Lekj;b()Ljava/util/Set;
      intermediary method_32441 Lnet/minecraft/class_5651;method_32441()Ljava/util/Set;
      named getRequiredParameters Lnet/minecraft/loot/provider/nbt/LootNbtProvider;getRequiredParameters()Ljava/util/Set;
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • source

      public Identifier source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component