Class GlobalLootModifiersTest.SilkTouchTestModifier
java.lang.Object
net.neoforged.neoforge.common.loot.LootModifier
net.neoforged.neoforge.debug.loot.GlobalLootModifiersTest.SilkTouchTestModifier
- All Implemented Interfaces:
- IGlobalLootModifier
- Enclosing class:
- GlobalLootModifiersTest
When harvesting blocks with bamboo, this modifier is invoked, via the silk_touch_bamboo loot_modifier json
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final Supplier<com.mojang.serialization.Codec<GlobalLootModifiersTest.SilkTouchTestModifier>>Fields inherited from class net.neoforged.neoforge.common.loot.LootModifierconditionsFields inherited from interface net.neoforged.neoforge.common.loot.IGlobalLootModifierCONDITIONAL_CODEC, DIRECT_CODEC, LOOT_CONDITIONS_CODEC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioncom.mojang.serialization.Codec<? extends IGlobalLootModifier>codec()Returns the registered codec for this modifierit.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.LootModifierapply, codecStart
- 
Field Details- 
CODECpublic static final Supplier<com.mojang.serialization.Codec<GlobalLootModifiersTest.SilkTouchTestModifier>> CODEC
 
- 
- 
Constructor Details- 
SilkTouchTestModifier
 
- 
- 
Method Details- 
doApplypublic it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> doApply(it.unimi.dsi.fastutil.objects.ObjectArrayList<ItemStack> generatedLoot, LootContext context) Description copied from class:LootModifierApplies the modifier to the generated loot (all loot conditions have already been checked and have returned true).- Specified by:
- doApplyin class- LootModifier
- Parameters:
- generatedLoot- the list of ItemStacks that will be dropped, generated by loot tables
- context- the LootContext, identical to what is passed to loot tables
- Returns:
- modified loot drops
 
- 
codecDescription copied from interface:IGlobalLootModifierReturns the registered codec for this modifier
 
-