Class LootHelpers

java.lang.Object
org.cyclops.cyclopscore.helper.LootHelpers

public class LootHelpers extends Object
Helpers related to loot stuff.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.level.storage.loot.predicates.LootItemConditionType
    registerCondition(net.minecraft.resources.ResourceLocation id, net.minecraft.world.level.storage.loot.Serializer<? extends net.minecraft.world.level.storage.loot.predicates.LootItemCondition> serializer)
    Register a new loot condition.
    static net.minecraft.world.level.storage.loot.functions.LootItemFunctionType
    registerFunction(net.minecraft.resources.ResourceLocation id, net.minecraft.world.level.storage.loot.Serializer<? extends net.minecraft.world.level.storage.loot.functions.LootItemFunction> serializer)
    Register a new loot function.

    Methods inherited from class java.lang.Object

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

    • LootHelpers

      public LootHelpers()
  • Method Details

    • registerFunction

      public static net.minecraft.world.level.storage.loot.functions.LootItemFunctionType registerFunction(net.minecraft.resources.ResourceLocation id, net.minecraft.world.level.storage.loot.Serializer<? extends net.minecraft.world.level.storage.loot.functions.LootItemFunction> serializer)
      Register a new loot function.
      Parameters:
      id - The loot function id.
      serializer - The loot function serializer.
      Returns:
      The created loot function type
    • registerCondition

      public static net.minecraft.world.level.storage.loot.predicates.LootItemConditionType registerCondition(net.minecraft.resources.ResourceLocation id, net.minecraft.world.level.storage.loot.Serializer<? extends net.minecraft.world.level.storage.loot.predicates.LootItemCondition> serializer)
      Register a new loot condition.
      Parameters:
      id - The loot condition id.
      serializer - The loot condition serializer.
      Returns:
      The created loot condition type