Class AbstractGiveItemsEntityReward
java.lang.Object
com.petrolpark.core.data.reward.entity.AbstractGiveItemsEntityReward
- All Implemented Interfaces:
IEntityReward,ITypedReward<EntityRewardType>,net.minecraft.world.level.storage.loot.LootContextUser
- Direct Known Subclasses:
GiveItemEntityReward,GiveLootEntityReward
-
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 com.petrolpark.core.data.reward.entity.IEntityReward
CODEC, TYPED_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionAbstractGiveItemsEntityReward(List<net.minecraft.world.level.storage.loot.functions.LootItemFunction> functions) -
Method Summary
Modifier and TypeMethodDescriptionfinal List<net.minecraft.world.level.storage.loot.functions.LootItemFunction> protected static <REWARD extends AbstractGiveItemsEntityReward>
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 voidreward(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.storage.loot.LootContext context, float multiplier) abstract Stream<net.minecraft.world.item.ItemStack> streamStacks(net.minecraft.world.entity.Entity recipient, net.minecraft.world.level.storage.loot.LootContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.petrolpark.core.data.reward.ITypedReward
addToDescription, getType, render, translate, translateSimpleMethods inherited from interface net.minecraft.world.level.storage.loot.LootContextUser
getReferencedContextParams, validate
-
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
-
AbstractGiveItemsEntityReward
public AbstractGiveItemsEntityReward(List<net.minecraft.world.level.storage.loot.functions.LootItemFunction> functions)
-
-
Method Details
-
lateItemFunctionsField
protected static <REWARD extends AbstractGiveItemsEntityReward> 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) -
getItemFunctions
public final List<net.minecraft.world.level.storage.loot.functions.LootItemFunction> getItemFunctions() -
streamStacks
public abstract Stream<net.minecraft.world.item.ItemStack> streamStacks(net.minecraft.world.entity.Entity recipient, net.minecraft.world.level.storage.loot.LootContext context) -
reward
public final void reward(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.storage.loot.LootContext context, float multiplier) - Specified by:
rewardin interfaceIEntityReward
-