Class GlobalLootModifiersTest.DungeonLootEnhancerModifier
java.lang.Object
net.neoforged.neoforge.common.loot.LootModifier
net.neoforged.neoforge.debug.loot.GlobalLootModifiersTest.DungeonLootEnhancerModifier
- All Implemented Interfaces:
IGlobalLootModifier
- Enclosing class:
GlobalLootModifiersTest
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Supplier
<com.mojang.serialization.MapCodec<GlobalLootModifiersTest.DungeonLootEnhancerModifier>> private final int
Fields inherited from class net.neoforged.neoforge.common.loot.LootModifier
conditions
Fields inherited from interface net.neoforged.neoforge.common.loot.IGlobalLootModifier
CONDITIONAL_CODEC, DIRECT_CODEC, LOOT_CONDITIONS_CODEC
-
Constructor Summary
ConstructorDescriptionDungeonLootEnhancerModifier
(LootItemCondition[] conditionsIn, int multiplicationFactor) -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec
<? extends IGlobalLootModifier> codec()
Returns the registered codec for this modifierprotected it.unimi.dsi.fastutil.objects.ObjectArrayList
<ItemStack> doApply
(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Applies the modifier to the generated loot (all loot conditions have already been checked and have returned true).Methods inherited from class net.neoforged.neoforge.common.loot.LootModifier
apply, codecStart
-
Field Details
-
CODEC
public static final Supplier<com.mojang.serialization.MapCodec<GlobalLootModifiersTest.DungeonLootEnhancerModifier>> CODEC -
multiplicationFactor
private final int multiplicationFactor
-
-
Constructor Details
-
DungeonLootEnhancerModifier
-
-
Method Details
-
doApply
protected it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> doApply(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) 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
-
codec
Description copied from interface:IGlobalLootModifier
Returns the registered codec for this modifier
-