Record Class ContextLootScoreProvider
java.lang.Object
java.lang.Record
net.minecraft.loot.provider.score.ContextLootScoreProvider
- Record Components:
target-
- All Implemented Interfaces:
LootScoreProvider
public record ContextLootScoreProvider(LootContext.EntityTarget target)
extends Record
implements LootScoreProvider
- Mappings:
Namespace Name official ekvintermediary net/minecraft/class_5664named net/minecraft/loot/provider/score/ContextLootScoreProviderofficial cintermediary comp_1902named target
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<ContextLootScoreProvider>static final com.mojang.serialization.Codec<ContextLootScoreProvider>private final LootContext.EntityTargetThe field for thetargetrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of aContextLootScoreProviderrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic LootScoreProvidercreate(LootContext.EntityTarget target) final booleanIndicates whether some other object is "equal to" this one.getScoreHolder(LootContext context) getType()final inthashCode()Returns a hash code value for this object.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
target
The field for thetargetrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector official aLekv;a:Lcom/mojang/serialization/Codec;intermediary field_45892Lnet/minecraft/class_5664;field_45892:Lcom/mojang/serialization/Codec;named CODECLnet/minecraft/loot/provider/score/ContextLootScoreProvider;CODEC:Lcom/mojang/serialization/Codec;
-
INLINE_CODEC
- Mappings:
Namespace Name Mixin selector official bLekv;b:Lcom/mojang/serialization/Codec;intermediary field_45893Lnet/minecraft/class_5664;field_45893:Lcom/mojang/serialization/Codec;named INLINE_CODECLnet/minecraft/loot/provider/score/ContextLootScoreProvider;INLINE_CODEC:Lcom/mojang/serialization/Codec;
-
-
Constructor Details
-
ContextLootScoreProvider
Creates an instance of aContextLootScoreProviderrecord class.- Parameters:
target- the value for thetargetrecord component
-
-
Method Details
-
create
- Mappings:
Namespace Name Mixin selector official aLekv;a(Legw$b;)Leky;intermediary method_35571Lnet/minecraft/class_5664;method_35571(Lnet/minecraft/class_47$class_50;)Lnet/minecraft/class_5670;named createLnet/minecraft/loot/provider/score/ContextLootScoreProvider;create(Lnet/minecraft/loot/context/LootContext$EntityTarget;)Lnet/minecraft/loot/provider/score/LootScoreProvider;
-
getType
- Specified by:
getTypein interfaceLootScoreProvider- Mappings:
Namespace Name Mixin selector official aLeky;a()Lekx;intermediary method_32475Lnet/minecraft/class_5670;method_32475()Lnet/minecraft/class_5669;named getTypeLnet/minecraft/loot/provider/score/LootScoreProvider;getType()Lnet/minecraft/loot/provider/score/LootScoreProviderType;
-
getScoreHolder
- Specified by:
getScoreHolderin interfaceLootScoreProvider- Mappings:
Namespace Name Mixin selector official aLeky;a(Legw;)Lemw;intermediary method_55379Lnet/minecraft/class_5670;method_55379(Lnet/minecraft/class_47;)Lnet/minecraft/class_9015;named getScoreHolderLnet/minecraft/loot/provider/score/LootScoreProvider;getScoreHolder(Lnet/minecraft/loot/context/LootContext;)Lnet/minecraft/scoreboard/ScoreHolder;
-
getRequiredParameters
- Specified by:
getRequiredParametersin interfaceLootScoreProvider- Mappings:
Namespace Name Mixin selector official bLeky;b()Ljava/util/Set;intermediary method_32477Lnet/minecraft/class_5670;method_32477()Ljava/util/Set;named getRequiredParametersLnet/minecraft/loot/provider/score/LootScoreProvider;getRequiredParameters()Ljava/util/Set;
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-