Class GiveItemReward

java.lang.Object
petrolpark.mc.library.core.data.reward.AbstractGiveItemsReward
petrolpark.mc.library.core.data.reward.GiveItemReward
All Implemented Interfaces:
net.minecraft.world.level.storage.loot.LootContextUser, IAbstractReward<IReward.Type>, INamedRewardInfo, IRewardInfo, IReward, ISimpleReward

@ParametersAreNonnullByDefault public class GiveItemReward extends AbstractGiveItemsReward implements ISimpleReward

petrolpark:give_item

Give a single Item Stack to an Entity by putting it into its Inventory or dropping it. Arguments:
  • item - ItemStack to give to the recipient

Note that the late LootItemFunctions are not carried to the client at all.

  • Field Details

    • CODEC

      public static final com.mojang.serialization.MapCodec<GiveItemReward> CODEC
    • STREAM_CODEC

      public static final net.minecraft.network.codec.StreamCodec<net.minecraft.network.RegistryFriendlyByteBuf,GiveItemReward> STREAM_CODEC
  • Constructor Details

    • GiveItemReward

      public GiveItemReward(net.minecraft.world.item.ItemStack stack)
    • GiveItemReward

      public GiveItemReward(net.minecraft.world.item.ItemStack stack, List<net.minecraft.world.level.storage.loot.functions.LootItemFunction> functions)
  • Method Details