mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-28 15:38:00 +01:00
15 lines
567 B
Java
15 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();
|
|
}
|
|
}
|