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;
|
|
|
|
|
2022-09-11 12:22:06 +02:00
|
|
|
import net.fabricmc.fabric.api.screenhandler.v1.ExtendedScreenHandlerType;
|
2021-11-09 17:29:55 +01:00
|
|
|
import net.minecraft.screen.ScreenHandler;
|
|
|
|
import net.minecraft.screen.ScreenHandlerType;
|
2022-12-18 22:07:24 +01:00
|
|
|
import net.minecraft.registry.Registry;
|
|
|
|
import net.minecraft.registry.Registries;
|
2021-11-09 17:29:55 +01:00
|
|
|
|
|
|
|
public interface UScreenHandlers {
|
2022-09-11 12:22:06 +02:00
|
|
|
ScreenHandlerType<SpellbookScreenHandler> SPELL_BOOK = register("spell_book", new ExtendedScreenHandlerType<>(SpellbookScreenHandler::new));
|
2021-11-09 17:29:55 +01:00
|
|
|
|
2022-09-11 12:22:06 +02:00
|
|
|
static <T extends ScreenHandler> ScreenHandlerType<T> register(String name, ScreenHandlerType<T> type) {
|
2022-12-18 22:07:24 +01:00
|
|
|
return Registry.register(Registries.SCREEN_HANDLER, Unicopia.id(name), type);
|
2021-11-09 17:29:55 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static void bootstrap() { }
|
|
|
|
}
|