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

21 lines
740 B
Java
Raw Normal View History

2020-04-15 19:06:45 +02:00
package com.minelittlepony.unicopia.container;
2020-04-25 13:32:33 +02:00
import net.fabricmc.fabric.api.container.ContainerFactory;
import net.fabricmc.fabric.api.container.ContainerProviderRegistry;
2020-04-25 13:32:33 +02:00
import net.minecraft.container.Container;
import net.minecraft.util.Identifier;
2020-04-15 12:37:14 +02:00
public interface UContainers {
2020-04-25 13:32:33 +02:00
Identifier BAG_OF_HOLDING = register("bag_of_holding", BagOfHoldingContainer::new);
Identifier SPELL_BOOK = register("spell_book", SpellBookContainer::new);
2020-04-25 13:32:33 +02:00
static Identifier register(String name, ContainerFactory<Container> factory) {
Identifier id = new Identifier("unicopia", name);
ContainerProviderRegistry.INSTANCE.registerFactory(BAG_OF_HOLDING, factory);
return id;
}
2020-04-25 13:32:33 +02:00
static void bootstrap() { }
}