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();
}
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);
}
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();
}
Aggregations