Unicopia/src/main/java/com/minelittlepony/unicopia/container/UScreenHandlers.java

18 lines
651 B
Java
Raw Normal View History

2021-11-09 17:29:55 +01:00
package com.minelittlepony.unicopia.container;
import com.minelittlepony.unicopia.Unicopia;
2021-11-09 17:29:55 +01:00
import net.minecraft.screen.ScreenHandler;
import net.minecraft.screen.ScreenHandlerType;
2022-06-25 00:19:55 +02:00
import net.minecraft.util.registry.Registry;
2021-11-09 17:29:55 +01:00
public interface UScreenHandlers {
2021-11-10 18:26:25 +01:00
ScreenHandlerType<SpellbookScreenHandler> SPELL_BOOK = register("spell_book", SpellbookScreenHandler::new);
2021-11-09 17:29:55 +01:00
2022-06-25 00:19:55 +02:00
static <T extends ScreenHandler> ScreenHandlerType<T> register(String name, ScreenHandlerType.Factory<T> factory) {
return Registry.register(Registry.SCREEN_HANDLER, Unicopia.id(name), new ScreenHandlerType<>(factory));
2021-11-09 17:29:55 +01:00
}
static void bootstrap() { }
}