mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-10-30 14:20:49 +01:00
Make ActuallyContainers consistent
It now matches the rest of the registration related classes
This commit is contained in:
parent
84c7b0d61a
commit
deadb3fd70
2 changed files with 8 additions and 3 deletions
|
@ -104,14 +104,14 @@ public class ActuallyAdditions {
|
||||||
ActuallyPOITypes.init(eventBus);
|
ActuallyPOITypes.init(eventBus);
|
||||||
ActuallyComponents.init(eventBus);
|
ActuallyComponents.init(eventBus);
|
||||||
ActuallyLootModifiers.init(eventBus);
|
ActuallyLootModifiers.init(eventBus);
|
||||||
ActuallyContainers.CONTAINERS.register(eventBus);
|
ActuallyContainers.init(eventBus);
|
||||||
ArmorMaterials.init(eventBus);
|
ArmorMaterials.init(eventBus);
|
||||||
InitEntities.init(eventBus);
|
InitEntities.init(eventBus);
|
||||||
InitFluids.init(eventBus);
|
InitFluids.init(eventBus);
|
||||||
ActuallyBiomeModifiers.init(eventBus);
|
ActuallyBiomeModifiers.init(eventBus);
|
||||||
eventBus.addListener(this::onConfigReload);
|
|
||||||
ActuallyParticles.init(eventBus);
|
ActuallyParticles.init(eventBus);
|
||||||
ActuallyTags.init();
|
ActuallyTags.init();
|
||||||
|
eventBus.addListener(this::onConfigReload);
|
||||||
|
|
||||||
NeoForge.EVENT_BUS.addListener(this::serverStarted);
|
NeoForge.EVENT_BUS.addListener(this::serverStarted);
|
||||||
NeoForge.EVENT_BUS.addListener(this::serverStopped);
|
NeoForge.EVENT_BUS.addListener(this::serverStopped);
|
||||||
|
|
|
@ -3,13 +3,14 @@ package de.ellpeck.actuallyadditions.mod.inventory;
|
||||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||||
import net.minecraft.core.registries.BuiltInRegistries;
|
import net.minecraft.core.registries.BuiltInRegistries;
|
||||||
import net.minecraft.world.inventory.MenuType;
|
import net.minecraft.world.inventory.MenuType;
|
||||||
|
import net.neoforged.bus.api.IEventBus;
|
||||||
import net.neoforged.neoforge.common.extensions.IMenuTypeExtension;
|
import net.neoforged.neoforge.common.extensions.IMenuTypeExtension;
|
||||||
import net.neoforged.neoforge.registries.DeferredRegister;
|
import net.neoforged.neoforge.registries.DeferredRegister;
|
||||||
|
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
|
||||||
public class ActuallyContainers {
|
public class ActuallyContainers {
|
||||||
public static final DeferredRegister<MenuType<?>> CONTAINERS = DeferredRegister.create(BuiltInRegistries.MENU, ActuallyAdditions.MODID);
|
private static final DeferredRegister<MenuType<?>> CONTAINERS = DeferredRegister.create(BuiltInRegistries.MENU, ActuallyAdditions.MODID);
|
||||||
|
|
||||||
public static final Supplier<MenuType<SackContainer>> SACK_CONTAINER = CONTAINERS.register("sack_container", () -> IMenuTypeExtension.create(SackContainer::fromNetwork));
|
public static final Supplier<MenuType<SackContainer>> SACK_CONTAINER = CONTAINERS.register("sack_container", () -> IMenuTypeExtension.create(SackContainer::fromNetwork));
|
||||||
public static final Supplier<MenuType<VoidSackContainer>> VOID_SACK_CONTAINER = CONTAINERS.register("void_sack_container", () -> IMenuTypeExtension.create(VoidSackContainer::new));
|
public static final Supplier<MenuType<VoidSackContainer>> VOID_SACK_CONTAINER = CONTAINERS.register("void_sack_container", () -> IMenuTypeExtension.create(VoidSackContainer::new));
|
||||||
|
@ -39,5 +40,9 @@ public class ActuallyContainers {
|
||||||
public static final Supplier<MenuType<ContainerRangedCollector>> RANGED_COLLECTOR_CONTAINER = CONTAINERS.register("ranged_collector_container", () -> IMenuTypeExtension.create(ContainerRangedCollector::fromNetwork));
|
public static final Supplier<MenuType<ContainerRangedCollector>> RANGED_COLLECTOR_CONTAINER = CONTAINERS.register("ranged_collector_container", () -> IMenuTypeExtension.create(ContainerRangedCollector::fromNetwork));
|
||||||
public static final Supplier<MenuType<ContainerXPSolidifier>> XPSOLIDIFIER_CONTAINER = CONTAINERS.register("xpsolidifier_container", () -> IMenuTypeExtension.create(ContainerXPSolidifier::fromNetwork));
|
public static final Supplier<MenuType<ContainerXPSolidifier>> XPSOLIDIFIER_CONTAINER = CONTAINERS.register("xpsolidifier_container", () -> IMenuTypeExtension.create(ContainerXPSolidifier::fromNetwork));
|
||||||
public static final Supplier<MenuType<ItemTagContainer>> ITEM_TAG_CONTAINER = CONTAINERS.register("item_tag_container", () -> IMenuTypeExtension.create(ItemTagContainer::fromNetwork));
|
public static final Supplier<MenuType<ItemTagContainer>> ITEM_TAG_CONTAINER = CONTAINERS.register("item_tag_container", () -> IMenuTypeExtension.create(ItemTagContainer::fromNetwork));
|
||||||
|
|
||||||
|
public static void init(IEventBus evt) {
|
||||||
|
CONTAINERS.register(evt);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue