mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-24 22:07:59 +01:00
16 lines
567 B
Java
16 lines
567 B
Java
|
package com.minelittlepony.unicopia.util;
|
||
|
|
||
|
import com.mojang.serialization.Lifecycle;
|
||
|
|
||
|
import net.fabricmc.fabric.api.event.registry.FabricRegistryBuilder;
|
||
|
import net.minecraft.util.Identifier;
|
||
|
import net.minecraft.util.registry.Registry;
|
||
|
import net.minecraft.util.registry.RegistryKey;
|
||
|
import net.minecraft.util.registry.SimpleRegistry;
|
||
|
|
||
|
public interface Registries {
|
||
|
static <T> Registry<T> createSimple(Identifier id) {
|
||
|
return FabricRegistryBuilder.from(new SimpleRegistry<T>(RegistryKey.ofRegistry(id), Lifecycle.stable())).buildAndRegister();
|
||
|
}
|
||
|
}
|