Class GlobalLootModifiersTest.SilkTouchTestModifier
java.lang.Object
net.minecraftforge.common.loot.LootModifier
net.minecraftforge.debug.gameplay.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 Summary
Modifier and TypeFieldDescriptionstatic final Supplier<com.mojang.serialization.Codec<GlobalLootModifiersTest.SilkTouchTestModifier>>
Fields inherited from class net.minecraftforge.common.loot.LootModifier
conditions
Fields inherited from interface net.minecraftforge.common.loot.IGlobalLootModifier
DIRECT_CODEC, LOOT_CONDITIONS_CODEC
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.Codec<? extends IGlobalLootModifier>
codec()
Returns the registered codec for this modifier@NotNull 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.minecraftforge.common.loot.LootModifier
apply, codecStart
-
Field Details
-
CODEC
public static final Supplier<com.mojang.serialization.Codec<GlobalLootModifiersTest.SilkTouchTestModifier>> CODEC
-
-
Constructor Details
-
SilkTouchTestModifier
-
-
Method Details
-
doApply
@NotNull public @NotNull 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
-