Class GiveLootEntityReward

java.lang.Object
com.petrolpark.core.data.reward.entity.AbstractGiveItemsEntityReward
com.petrolpark.core.data.reward.entity.GiveLootEntityReward
All Implemented Interfaces:
ILootTableAccessor, IEntityReward, ITypedReward<EntityRewardType>, net.minecraft.world.level.storage.loot.LootContextUser

public class GiveLootEntityReward extends AbstractGiveItemsEntityReward implements ILootTableAccessor

petrolpark:give_loot

Give randomly-generated Item Stacks from a Loot Table to an Entity by putting them into its Inventory or dropping them. Arguments:
  • loot_table - ID of a LootTable or an inline definition
  • Field Details

    • DIE_TEXTURE

      public static final net.minecraft.resources.ResourceLocation DIE_TEXTURE
    • CODEC

      public static final com.mojang.serialization.MapCodec<GiveLootEntityReward> CODEC
    • lootTable

      protected final com.mojang.datafixers.util.Either<net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable>,net.minecraft.world.level.storage.loot.LootTable> lootTable
    • possibleStacks

      protected List<net.minecraft.world.item.ItemStack> possibleStacks
  • Constructor Details

    • GiveLootEntityReward

      public GiveLootEntityReward(com.mojang.datafixers.util.Either<net.minecraft.resources.ResourceKey<net.minecraft.world.level.storage.loot.LootTable>,net.minecraft.world.level.storage.loot.LootTable> lootTable, List<net.minecraft.world.level.storage.loot.functions.LootItemFunction> functions)
  • Method Details