The DeferredRegister for LootItemFunctionType is invalid as provided:
public static final DeferredRegister<LootItemFunctionType> LOOT_FUNCTION_TYPES =
DeferredRegister.create(Registries.LOOT_FUNCTION_TYPE, ExampleMod.MOD_ID);
public static final Supplier<LootItemFunctionType> RANDOM_ENCHANTMENT_WITH_LEVEL =
LOOT_FUNCTION_TYPES.register("random_enchantment_with_level", () -> new LootItemFunctionType(RandomEnchantmentWithLevelFunction.CODEC));
public static final DeferredRegister<LootItemFunctionType<?>> LOOT_FUNCTION_TYPES =
DeferredRegister.create(Registries.LOOT_FUNCTION_TYPE, ExampleMod.MOD_ID);
public static final Supplier<LootItemFunctionType<? extends LootItemConditionalFunction>> RANDOM_ENCHANTMENT_WITH_LEVEL =
LOOT_FUNCTION_TYPES.register("random_enchantment_with_level", () -> new LootItemFunctionType(RandomEnchantmentWithLevelFunction.CODEC));
The DeferredRegister for LootItemFunctionType is invalid as provided:
Required type:
DeferredRegister<LootItemFunctionType>
Provided:DeferredRegister<LootItemFunctionType<?>>
Incompatible equality constraint:LootItemFunctionType
andLootItemFunctionType<?>
The example should instead be: