2021-11-09 17:29:55 +01:00
|
|
|
package com.minelittlepony.unicopia.container;
|
|
|
|
|
2022-08-27 15:14:00 +02:00
|
|
|
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) {
|
2022-08-27 15:14:00 +02:00
|
|
|
return Registry.register(Registry.SCREEN_HANDLER, Unicopia.id(name), new ScreenHandlerType<>(factory));
|
2021-11-09 17:29:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static void bootstrap() { }
|
|
|
|
}
|