Class GlobalLootModifiersTest.SmeltingEnchantmentModifier

java.lang.Object
net.minecraftforge.common.loot.LootModifier
net.minecraftforge.debug.gameplay.loot.GlobalLootModifiersTest.SmeltingEnchantmentModifier
All Implemented Interfaces:
IGlobalLootModifier
Enclosing class:
GlobalLootModifiersTest

private static class GlobalLootModifiersTest.SmeltingEnchantmentModifier extends LootModifier
The smelting enchantment causes this modifier to be invoked, via the smelting loot_modifier json
  • Field Details

  • Constructor Details

    • SmeltingEnchantmentModifier

      public SmeltingEnchantmentModifier(LootItemCondition[] conditionsIn)
  • 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 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
    • smelt

      private static ItemStack smelt(ItemStack stack, LootContext context)
    • codec

      public com.mojang.serialization.Codec<? extends IGlobalLootModifier> codec()
      Description copied from interface: IGlobalLootModifier
      Returns the registered codec for this modifier