Class LootContextArg.ArgCodecBuilder<R>
java.lang.Object
net.minecraft.world.level.storage.loot.LootContextArg.ArgCodecBuilder<R>
- Enclosing interface:
LootContextArg<R>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExtraCodecs.LateBoundIdMapper<String, LootContextArg<R>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanyBlockEntity(Function<? super ContextKey<? extends BlockEntity>, ? extends LootContextArg<R>> function) anyEntity(Function<? super ContextKey<? extends Entity>, ? extends LootContextArg<R>> function) anyItemStack(Function<? super ContextKey<? extends ItemInstance>, ? extends LootContextArg<R>> function) <T extends StringRepresentable & LootContextArg<? extends R>>
LootContextArg.ArgCodecBuilder<R> anyOf(T[] targets) <T extends StringRepresentable>
LootContextArg.ArgCodecBuilder<R> anyOf(T[] targets, Function<T, ? extends LootContextArg<R>> argFactory) anyOf(T[] targets, Function<T, String> nameGetter, Function<T, ? extends LootContextArg<R>> argFactory) private com.mojang.serialization.Codec<LootContextArg<R>> build()
-
Field Details
-
sources
-
-
Constructor Details
-
ArgCodecBuilder
private ArgCodecBuilder()
-
-
Method Details
-
anyOf
public <T> LootContextArg.ArgCodecBuilder<R> anyOf(T[] targets, Function<T, String> nameGetter, Function<T, ? extends LootContextArg<R>> argFactory) -
anyOf
public <T extends StringRepresentable> LootContextArg.ArgCodecBuilder<R> anyOf(T[] targets, Function<T, ? extends LootContextArg<R>> argFactory) -
anyOf
public <T extends StringRepresentable & LootContextArg<? extends R>> LootContextArg.ArgCodecBuilder<R> anyOf(T[] targets) -
anyEntity
public LootContextArg.ArgCodecBuilder<R> anyEntity(Function<? super ContextKey<? extends Entity>, ? extends LootContextArg<R>> function) -
anyBlockEntity
public LootContextArg.ArgCodecBuilder<R> anyBlockEntity(Function<? super ContextKey<? extends BlockEntity>, ? extends LootContextArg<R>> function) -
anyItemStack
public LootContextArg.ArgCodecBuilder<R> anyItemStack(Function<? super ContextKey<? extends ItemInstance>, ? extends LootContextArg<R>> function) -
build
-