private static class GlobalLootModifiersTest.WheatSeedsConverterModifier extends LootModifier
| Modifier and Type | Class and Description |
|---|---|
private static class |
GlobalLootModifiersTest.WheatSeedsConverterModifier.Serializer |
| Modifier and Type | Field and Description |
|---|---|
private Item |
itemReward |
private Item |
itemToCheck |
private int |
numSeedsToConvert |
conditions| Constructor and Description |
|---|
WheatSeedsConverterModifier(ILootCondition[] conditionsIn,
int numSeeds,
Item itemCheck,
Item reward) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<ItemStack> |
doApply(java.util.List<ItemStack> generatedLoot,
LootContext context)
Applies the modifier to the generated loot (all loot conditions have already been checked
and have returned true).
|
applyprivate final int numSeedsToConvert
private final Item itemToCheck
private final Item itemReward
public WheatSeedsConverterModifier(ILootCondition[] conditionsIn, int numSeeds, Item itemCheck, Item reward)
@Nonnull public java.util.List<ItemStack> doApply(java.util.List<ItemStack> generatedLoot, LootContext context)
LootModifierdoApply in class LootModifiergeneratedLoot - the list of ItemStacks that will be dropped, generated by loot tablescontext - the LootContext, identical to what is passed to loot tables