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

18 lines
752 B
Java
Raw Normal View History

2021-11-09 17:29:55 +01:00
package com.minelittlepony.unicopia.container;
import net.fabricmc.fabric.api.screenhandler.v1.ScreenHandlerRegistry;
import net.fabricmc.fabric.api.screenhandler.v1.ScreenHandlerRegistry.SimpleClientHandlerFactory;
import net.minecraft.screen.ScreenHandler;
import net.minecraft.screen.ScreenHandlerType;
import net.minecraft.util.Identifier;
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
static <T extends ScreenHandler> ScreenHandlerType<T> register(String name, SimpleClientHandlerFactory<T> factory) {
return ScreenHandlerRegistry.registerSimple(new Identifier("unicopia", name), factory);
}
static void bootstrap() { }
}