Class LootModifierInjectItem

java.lang.Object
net.neoforged.neoforge.common.loot.LootModifier
org.cyclops.cyclopscore.loot.modifier.LootModifierInjectItem
All Implemented Interfaces:
net.neoforged.neoforge.common.loot.IGlobalLootModifier

public class LootModifierInjectItem extends net.neoforged.neoforge.common.loot.LootModifier
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Supplier<com.mojang.serialization.Codec<LootModifierInjectItem>>
     

    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

    Constructors
    Constructor
    Description
    LootModifierInjectItem(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] conditionsIn, net.minecraft.world.item.ItemStack itemStack, List<String> lootTables, int maxStackSize)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.serialization.Codec<? extends net.neoforged.neoforge.common.loot.IGlobalLootModifier>
     
    protected @NotNull it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.world.item.ItemStack>
    doApply(it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.world.item.ItemStack> generatedLoot, net.minecraft.world.level.storage.loot.LootContext context)
     
    net.minecraft.world.item.ItemStack
     
     
    int
     

    Methods inherited from class net.neoforged.neoforge.common.loot.LootModifier

    apply, codecStart

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • LootModifierInjectItem

      public LootModifierInjectItem(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] conditionsIn, net.minecraft.world.item.ItemStack itemStack, List<String> lootTables, int maxStackSize)
  • Method Details

    • getItemStack

      public net.minecraft.world.item.ItemStack getItemStack()
    • getLootTables

      public List<String> getLootTables()
    • getMaxStackSize

      public int getMaxStackSize()
    • doApply

      @NotNull protected @NotNull it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.world.item.ItemStack> doApply(it.unimi.dsi.fastutil.objects.ObjectArrayList<net.minecraft.world.item.ItemStack> generatedLoot, net.minecraft.world.level.storage.loot.LootContext context)
      Specified by:
      doApply in class net.neoforged.neoforge.common.loot.LootModifier
    • codec

      public com.mojang.serialization.Codec<? extends net.neoforged.neoforge.common.loot.IGlobalLootModifier> codec()