Class GlobalLootModifiersTest.WheatSeedsConverterModifier
java.lang.Object
net.minecraftforge.common.loot.LootModifier
net.minecraftforge.debug.gameplay.loot.GlobalLootModifiersTest.WheatSeedsConverterModifier
- All Implemented Interfaces:
IGlobalLootModifier
- Enclosing class:
- GlobalLootModifiersTest
When harvesting wheat with shears, this modifier is invoked via the wheat_harvest loot_modifier json
This modifier checks how many seeds were harvested and turns X seeds into Y wheat (3:1)
This modifier checks how many seeds were harvested and turns X seeds into Y wheat (3:1)
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
-
Field Summary
Fields inherited from class net.minecraftforge.common.loot.LootModifier
conditions
-
Constructor Summary
ConstructorDescriptionWheatSeedsConverterModifier
(LootItemCondition[] conditionsIn, int numSeeds, Item itemCheck, Item reward) -
Method Summary
Methods inherited from class net.minecraftforge.common.loot.LootModifier
apply
-
Field Details
-
numSeedsToConvert
private final int numSeedsToConvert -
itemToCheck
-
itemReward
-
-
Constructor Details
-
WheatSeedsConverterModifier
public WheatSeedsConverterModifier(LootItemCondition[] conditionsIn, int numSeeds, Item itemCheck, Item reward)
-
-
Method Details
-
doApply
Description copied from class:LootModifier
Applies the modifier to the generated loot (all loot conditions have already been checked and have returned true).- Specified by:
doApply
in classLootModifier
- Parameters:
generatedLoot
- the list of ItemStacks that will be dropped, generated by loot tablescontext
- the LootContext, identical to what is passed to loot tables- Returns:
- modified loot drops
-