Search in sources :

Example 1 with GsonConfigSerializer

use of me.shedaniel.autoconfig.serializer.GsonConfigSerializer in project MCDoom by AzureDoom.

the class DoomMod method onInitialize.

@Override
public void onInitialize() {
    DataTrackers.MEATHOOK_TRACKER.getId();
    AutoConfig.register(DoomConfig.class, GsonConfigSerializer::new);
    config = AutoConfig.getConfigHolder(DoomConfig.class).getConfig();
    DoomBlocks.init();
    ITEMS = new DoomItems();
    SOUNDS = new ModSoundEvents();
    MOBS = new ModEntityTypes();
    PROJECTILES = new ProjectilesEntityRegister();
    FuelRegistry.INSTANCE.add(DoomItems.ARGENT_ENERGY, 32767);
    ICON = Registry.register(Registry.BLOCK_ENTITY_TYPE, MODID + ":icon", FabricBlockEntityTypeBuilder.create(IconBlockEntity::new, DoomBlocks.ICON_WALL1).build(null));
    TOTEM = Registry.register(Registry.BLOCK_ENTITY_TYPE, MODID + ":totem", FabricBlockEntityTypeBuilder.create(TotemEntity::new, DoomBlocks.TOTEM).build(null));
    GUN_TABLE_ENTITY = Registry.register(Registry.BLOCK_ENTITY_TYPE, MODID + ":guntable", FabricBlockEntityTypeBuilder.create(GunBlockEntity::new, DoomBlocks.GUN_TABLE).build(null));
    TICKING_LIGHT_ENTITY = Registry.register(Registry.BLOCK_ENTITY_TYPE, MODID + ":lightblock", FabricBlockEntityTypeBuilder.create(TickingLightEntity::new, DoomBlocks.TICKING_LIGHT_BLOCK).build(null));
    MobSpawn.addSpawnEntries();
    if (config.misc.enable_all_villager_trades) {
        ServerLifecycleEvents.SERVER_STARTED.register(minecraftServer -> DoomVillagerTrades.addTrades());
    }
    MobAttributes.init();
    GeckoLib.initialize();
    PacketHandler.registerMessages();
    DoomStructures.setupAndRegisterStructureFeatures();
}
Also used : ProjectilesEntityRegister(mod.azure.doom.util.registry.ProjectilesEntityRegister) ModEntityTypes(mod.azure.doom.util.registry.ModEntityTypes) GsonConfigSerializer(me.shedaniel.autoconfig.serializer.GsonConfigSerializer) DoomItems(mod.azure.doom.util.registry.DoomItems) ModSoundEvents(mod.azure.doom.util.registry.ModSoundEvents)

Example 2 with GsonConfigSerializer

use of me.shedaniel.autoconfig.serializer.GsonConfigSerializer in project Numeral-Ping by TheKodeToad.

the class NumeralPingMod method onInitializeClient.

@Override
public void onInitializeClient() {
    INSTANCE = this;
    AutoConfig.register(NumeralConfig.class, GsonConfigSerializer::new);
    config = AutoConfig.getConfigHolder(NumeralConfig.class).getConfig();
    ModContainer container = FabricLoader.getInstance().getModContainer(MOD_ID).get();
    ResourceManagerHelper.registerBuiltinResourcePack(new Identifier(MOD_ID, "font_fix"), container, ResourcePackActivationType.NORMAL);
    ResourceManagerHelper.registerBuiltinResourcePack(new Identifier(MOD_ID, "font_fix_high_res"), container, ResourcePackActivationType.NORMAL);
}
Also used : Identifier(net.minecraft.util.Identifier) ModContainer(net.fabricmc.loader.api.ModContainer) GsonConfigSerializer(me.shedaniel.autoconfig.serializer.GsonConfigSerializer)

Example 3 with GsonConfigSerializer

use of me.shedaniel.autoconfig.serializer.GsonConfigSerializer in project CraftGR by KabanFriends.

the class CraftGR method init.

public static void init(Platform platform) {
    AutoConfig.register(GRConfig.class, GsonConfigSerializer::new);
    CraftGR.platform = platform;
    CraftGR.httpClient = new OkHttpClient.Builder().connectTimeout(20, TimeUnit.SECONDS).writeTimeout(40, TimeUnit.SECONDS).readTimeout(20, TimeUnit.SECONDS).build();
    OverlayHandler.addOverlay(new SongInfoOverlay());
    SongHandler.getInstance().initialize();
}
Also used : SongInfoOverlay(io.github.kabanfriends.craftgr.render.impl.SongInfoOverlay) OkHttpClient(okhttp3.OkHttpClient) GsonConfigSerializer(me.shedaniel.autoconfig.serializer.GsonConfigSerializer)

Aggregations

GsonConfigSerializer (me.shedaniel.autoconfig.serializer.GsonConfigSerializer)3 SongInfoOverlay (io.github.kabanfriends.craftgr.render.impl.SongInfoOverlay)1 DoomItems (mod.azure.doom.util.registry.DoomItems)1 ModEntityTypes (mod.azure.doom.util.registry.ModEntityTypes)1 ModSoundEvents (mod.azure.doom.util.registry.ModSoundEvents)1 ProjectilesEntityRegister (mod.azure.doom.util.registry.ProjectilesEntityRegister)1 ModContainer (net.fabricmc.loader.api.ModContainer)1 Identifier (net.minecraft.util.Identifier)1 OkHttpClient (okhttp3.OkHttpClient)1