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

public abstract class AbstractGiveItemsEntityReward extends Object implements IEntityReward
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected 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

    Constructors
    Constructor
    Description
    AbstractGiveItemsEntityReward(List<net.minecraft.world.level.storage.loot.functions.LootItemFunction> functions)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final 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 void
    reward(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, wait

    Methods inherited from interface com.petrolpark.core.data.reward.ITypedReward

    addToDescription, getType, render, translate, translateSimple

    Methods 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,net.minecraft.world.item.ItemStack> compositeFunction
  • 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:
      reward in interface IEntityReward