Class AbstractGiveItemsReward
java.lang.Object
petrolpark.mc.library.core.data.reward.AbstractGiveItemsReward
- All Implemented Interfaces:
net.minecraft.world.level.storage.loot.LootContextUser,IAbstractReward<IReward.Type>,IReward
- Direct Known Subclasses:
GiveItemReward,GiveLootReward
-
Nested Class Summary
Nested classes/interfaces inherited from interface petrolpark.mc.library.core.data.reward.IReward
IReward.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BiFunction<net.minecraft.world.item.ItemStack, net.minecraft.world.level.storage.loot.LootContext, net.minecraft.world.item.ItemStack> Fields inherited from interface petrolpark.mc.library.core.data.reward.IReward
CODEC, DIRECT_CODEC, SET_CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionAbstractGiveItemsReward(List<net.minecraft.world.level.storage.loot.functions.LootItemFunction> functions) -
Method Summary
Modifier and TypeMethodDescriptionSet<net.minecraft.world.level.storage.loot.parameters.LootContextParam<?>> final List<net.minecraft.world.level.storage.loot.functions.LootItemFunction> protected static <REWARD extends AbstractGiveItemsReward>
com.mojang.datafixers.Products.P1<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<REWARD>, List<net.minecraft.world.level.storage.loot.functions.LootItemFunction>> lateItemFunctionsField(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<REWARD> instance) final booleanreward(net.minecraft.world.level.storage.loot.LootContext context, float multiplier, boolean simulate) abstract Stream<net.minecraft.world.item.ItemStack> streamStacks(net.minecraft.world.level.storage.loot.LootContext context) voidvalidate(net.minecraft.world.level.storage.loot.ValidationContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface petrolpark.mc.library.core.data.reward.IAbstractReward
getType, info
-
Field Details
-
compositeFunction
protected final BiFunction<net.minecraft.world.item.ItemStack,net.minecraft.world.level.storage.loot.LootContext, compositeFunctionnet.minecraft.world.item.ItemStack>
-
-
Constructor Details
-
AbstractGiveItemsReward
public AbstractGiveItemsReward(List<net.minecraft.world.level.storage.loot.functions.LootItemFunction> functions)
-
-
Method Details
-
lateItemFunctionsField
protected static <REWARD extends AbstractGiveItemsReward> com.mojang.datafixers.Products.P1<com.mojang.serialization.codecs.RecordCodecBuilder.Mu<REWARD>,List<net.minecraft.world.level.storage.loot.functions.LootItemFunction>> lateItemFunctionsField(com.mojang.serialization.codecs.RecordCodecBuilder.Instance<REWARD> instance) -
itemFunctions
public final List<net.minecraft.world.level.storage.loot.functions.LootItemFunction> itemFunctions() -
streamStacks
public abstract Stream<net.minecraft.world.item.ItemStack> streamStacks(net.minecraft.world.level.storage.loot.LootContext context) -
reward
public final boolean reward(net.minecraft.world.level.storage.loot.LootContext context, float multiplier, boolean simulate) -
getReferencedContextParams
public Set<net.minecraft.world.level.storage.loot.parameters.LootContextParam<?>> getReferencedContextParams()- Specified by:
getReferencedContextParamsin interfacenet.minecraft.world.level.storage.loot.LootContextUser
-
validate
public void validate(net.minecraft.world.level.storage.loot.ValidationContext context) - Specified by:
validatein interfacenet.minecraft.world.level.storage.loot.LootContextUser
-