Registered Registers

This commit is contained in:
Rabbitminers 2023-03-24 23:44:03 +00:00
parent 6d862290d7
commit c7d899369a
2 changed files with 12 additions and 4 deletions

View File

@ -119,6 +119,7 @@ public class Create {
AllEntityDataSerializers.register(modEventBus); AllEntityDataSerializers.register(modEventBus);
AllOreFeatureConfigEntries.init(); AllOreFeatureConfigEntries.init();
AllFeatures.register(modEventBus); AllFeatures.register(modEventBus);
AllBogeyStyles.register();
AllPlacementModifiers.register(modEventBus); AllPlacementModifiers.register(modEventBus);
BuiltinRegistration.register(modEventBus); BuiltinRegistration.register(modEventBus);
@ -143,6 +144,8 @@ public class Create {
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.onCtorClient(modEventBus, forgeEventBus)); DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> CreateClient.onCtorClient(modEventBus, forgeEventBus));
Mods.CURIOS.executeIfInstalled(() -> () -> Curios.init(modEventBus, forgeEventBus)); Mods.CURIOS.executeIfInstalled(() -> () -> Curios.init(modEventBus, forgeEventBus));
System.out.println(AllRegistries.BOGEY_STYLES.get().getValues());
} }
public static void init(final FMLCommonSetupEvent event) { public static void init(final FMLCommonSetupEvent event) {

View File

@ -1,6 +1,7 @@
package com.simibubi.create.events; package com.simibubi.create.events;
import com.simibubi.create.AllFluids; import com.simibubi.create.AllFluids;
import com.simibubi.create.AllRegistries;
import com.simibubi.create.Create; import com.simibubi.create.Create;
import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionHandler; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionHandler;
import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.ControlsServerHandler; import com.simibubi.create.content.contraptions.components.structureMovement.interaction.controls.ControlsServerHandler;
@ -62,9 +63,11 @@ import net.minecraftforge.eventbus.api.EventPriority;
import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.LogicalSide; import net.minecraftforge.fml.LogicalSide;
import net.minecraftforge.fml.ModList; import net.minecraftforge.fml.ModList;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.forgespi.language.IModFileInfo; import net.minecraftforge.forgespi.language.IModFileInfo;
import net.minecraftforge.forgespi.locating.IModFile; import net.minecraftforge.forgespi.locating.IModFile;
import net.minecraftforge.registries.NewRegistryEvent;
@EventBusSubscriber @EventBusSubscriber
public class CommonEvents { public class CommonEvents {
@ -228,6 +231,10 @@ public class CommonEvents {
@EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD) @EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD)
public static class ModBusEvents { public static class ModBusEvents {
@SubscribeEvent
public static void registerRegistries(final NewRegistryEvent event) {
AllRegistries.register(event);
}
@SubscribeEvent @SubscribeEvent
public static void registerCapabilities(RegisterCapabilitiesEvent event) { public static void registerCapabilities(RegisterCapabilitiesEvent event) {
@ -248,7 +255,5 @@ public class CommonEvents {
}); });
} }
} }
} }
} }