public class LootConditionManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LootConditionManager.Serializer |
Modifier and Type | Field and Description |
---|---|
private static java.util.Map<java.lang.Class<? extends LootCondition>,LootCondition.Serializer<?>> |
CLASS_TO_SERIALIZER_MAP |
private static java.util.Map<ResourceLocation,LootCondition.Serializer<?>> |
NAME_TO_SERIALIZER_MAP |
Constructor and Description |
---|
LootConditionManager() |
Modifier and Type | Method and Description |
---|---|
static <T extends LootCondition> |
getSerializerFor(T conditionClass) |
static LootCondition.Serializer<?> |
getSerializerForName(ResourceLocation location) |
static <T extends LootCondition> |
registerCondition(LootCondition.Serializer<? extends T> condition) |
static boolean |
testAllConditions(java.lang.Iterable<LootCondition> conditions,
java.util.Random rand,
LootContext context) |
static boolean |
testAllConditions(LootCondition[] conditions,
java.util.Random rand,
LootContext context) |
private static final java.util.Map<ResourceLocation,LootCondition.Serializer<?>> NAME_TO_SERIALIZER_MAP
private static final java.util.Map<java.lang.Class<? extends LootCondition>,LootCondition.Serializer<?>> CLASS_TO_SERIALIZER_MAP
public static <T extends LootCondition> void registerCondition(LootCondition.Serializer<? extends T> condition)
public static boolean testAllConditions(java.lang.Iterable<LootCondition> conditions, java.util.Random rand, LootContext context)
public static boolean testAllConditions(@Nullable LootCondition[] conditions, java.util.Random rand, LootContext context)
public static LootCondition.Serializer<?> getSerializerForName(ResourceLocation location)
public static <T extends LootCondition> LootCondition.Serializer<T> getSerializerFor(T conditionClass)