Class LogShardsLootModifierHandler

java.lang.Object
net.neoforged.neoforge.common.loot.LootModifier
tech.anonymoushacker1279.immersiveweapons.world.level.loot.LogShardsLootModifierHandler
All Implemented Interfaces:
net.neoforged.neoforge.common.loot.IGlobalLootModifier

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

    Fields
    Modifier and Type
    Field
    Description
    static final Supplier<com.mojang.serialization.MapCodec<LogShardsLootModifierHandler>>
     

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

    conditions, priority

    Fields inherited from interface net.neoforged.neoforge.common.loot.IGlobalLootModifier

    CONDITIONAL_CODEC, DEFAULT_PRIORITY, DIRECT_CODEC, LOOT_CONDITIONS_CODEC
  • Constructor Summary

    Constructors
    Constructor
    Description
    LogShardsLootModifierHandler(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] itemConditions, int priority, net.minecraft.tags.TagKey<net.minecraft.world.item.Item> tag, int minShards, int maxShards, net.minecraft.world.item.ItemStackTemplate replacement)
    Create a new log shards modifier.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.mojang.serialization.MapCodec<? extends net.neoforged.neoforge.common.loot.IGlobalLootModifier>
     
    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)
    Apply loot table modifications.

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

    apply, codecStart, priority

    Methods inherited from class Object

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

  • Constructor Details

    • LogShardsLootModifierHandler

      public LogShardsLootModifierHandler(net.minecraft.world.level.storage.loot.predicates.LootItemCondition[] itemConditions, int priority, net.minecraft.tags.TagKey<net.minecraft.world.item.Item> tag, int minShards, int maxShards, net.minecraft.world.item.ItemStackTemplate replacement)
      Create a new log shards modifier.
      Parameters:
      itemConditions - the LootItemConditions
      tag - the tag of the item to replace
      minShards - the minimum number of shards to drop
      maxShards - the maximum number of shards to drop
      replacement - the returned item
  • Method Details

    • doApply

      public 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)
      Apply loot table modifications.
      Specified by:
      doApply in class net.neoforged.neoforge.common.loot.LootModifier
      Parameters:
      generatedLoot - the List of generated items
      context - the LootContext instance
      Returns:
      List extending ItemStack
    • codec

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