Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.15.2] How to get my mod config's directory ?


uiytt
 Share

Recommended Posts

If you have registered your configuration file, it should be in run/config/whatyounamedit.toml The default name would be modid-side.toml If you do not know where your run folder is, it should be in the same directory as your src folder that you are currently working on. Note you do have to run the game once to generate the configuration file.

Link to comment
Share on other sites

1 hour ago, ChampionAsh5357 said:

If you have registered your configuration file, it should be in run/config/whatyounamedit.toml The default name would be modid-side.toml If you do not know where your run folder is, it should be in the same directory as your src folder that you are currently working on. Note you do have to run the game once to generate the configuration file.

Oh wait, I don't know how the config file work after 1.11, can you link me to any tuto there is on this subject (I didn't found any)

Link to comment
Share on other sites

I would recommend going into net.minecraftforge.common.ForgeModConfig and the net.minecraftforge.fml.config package in the source and looking at how they setup and register it. Then all you need to do is register the config in your main mod file's constructor using ModLoadingContext#registerConfig. The best I can do for a visual example is my classes for the Config and Main Mod File.

  • Like 1
Link to comment
Share on other sites

1 hour ago, ChampionAsh5357 said:

I would recommend going into net.minecraftforge.common.ForgeModConfig and the net.minecraftforge.fml.config package in the source and looking at how they setup and register it. Then all you need to do is register the config in your main mod file's constructor using ModLoadingContext#registerConfig. The best I can do for a visual example is my classes for the Config and Main Mod File.

Thanks, I have another question. If I didn't register a config,

How can I get in my Init event the config folder (where every config are store in).

I would like to use another storage system way more enjoyable to use and thus I need to know where is the folder where it's supposed to go ^^

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • WorldGen you ask? I'd have examples for Decorations, BiomeHandlers, and Features as well. You can refer to post 3 in this thread for some input.
    • When i keep playing for a while the game begins to act strangely, similarly of when the tick speed is too high, later the game crashes. i tried already to identify the mod that causes this, but i can't. If someone can help me, it would be great. Crash report: ---- Minecraft Crash Report ---- // Oops. Time: 16/10/21 09:55 Description: Ticking entity java.lang.NullPointerException: Ticking entity A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Server thread Stacktrace:     at net.minecraft.world.level.Level.m_46653_(Level.java:491) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B} -- Entity being ticked -- Details:     Entity Type: minecraft:player (net.minecraft.server.level.ServerPlayer)     Entity ID: 9029     Entity Name: Darth_Bicho     Entity's Exact location: 1203.79, 50.00, 94.06     Entity's Block location: World: (1203,50,94), Section: (at 3,2,14 in 75,3,5; chunk contains blocks 1200,0,80 to 1215,255,95), Region: (2,0; contains chunks 64,0 to 95,31, blocks 1024,0,0 to 1535,255,511)     Entity's Momentum: 0.00, -0.08, 0.00     Entity's Passengers: []     Entity's Vehicle: null Stacktrace:     at net.minecraft.world.level.Level.m_46653_(Level.java:491) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B,re:mixin,pl:accesstransformer:B}     at net.minecraft.server.level.ServerLevel.m_143264_(ServerLevel.java:384) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.world.level.entity.EntityTickList.m_156910_(SourceFile:54) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading}     at net.minecraft.server.level.ServerLevel.m_8793_(ServerLevel.java:365) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:882) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:818) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.client.server.IntegratedServer.m_5705_(IntegratedServer.java:118) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,xf:OptiFine:default}     at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:683) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:258) ~[client-1.17.1-20210706.113038-srg.jar%23134!:?] {re:classloading,pl:accesstransformer:B}     at java.lang.Thread.run(Thread.java:831) [?:?] {} -- Affected level -- Details:     All players: 1 total; [ServerPlayer['Darth_Bicho'/9029, l='ServerLevel[New World]', x=1203.79, y=50.00, z=94.06]]     Chunk stats: 17083     Level dimension: minecraft:overworld     Level spawn location: World: (193,63,88), Section: (at 1,15,8 in 12,3,5; chunk contains blocks 192,0,80 to 207,255,95), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)     Level time: 72768 game time, 92058 day time     Level name: New World     Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false     Level weather: Rain time: 1 (now: false), thunder time: 1 (now: false)     Known server brands: forge     Level was modded: true     Level storage version: 0x04ABD - Anvil -- System Details -- Details:     Minecraft Version: 1.17.1     Minecraft Version ID: 1.17.1     Operating System: Windows 8.1 (amd64) version 6.3     Java Version: 16.0.1, Microsoft     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft     Memory: 1451870312 bytes (1384 MiB) / 3120562176 bytes (2976 MiB) up to 3120562176 bytes (2976 MiB)     CPUs: 2     Processor Vendor: GenuineIntel     Processor Name: Intel(R) Celeron(R) CPU  N2840  @ 2.16GHz     Identifier: Intel64 Family 6 Model 55 Stepping 8     Microarchitecture: Silvermont     Frequency (GHz): 2,17     Number of physical packages: 1     Number of physical CPUs: 2     Number of logical CPUs: 2     Graphics card #0 name: Intel(R) HD Graphics     Graphics card #0 vendor: Intel Corporation (0x8086)     Graphics card #0 VRAM (MB): 2054,68     Graphics card #0 deviceId: 0x0f31     Graphics card #0 versionInfo: DriverVersion=10.18.10.4276     Memory slot #0 capacity (MB): 4096,00     Memory slot #0 clockSpeed (GHz): 1,33     Memory slot #0 type: Unknown     Virtual memory max (MB): 9101,36     Virtual memory used (MB): 6108,28     Swap memory total (MB): 5120,00     Swap memory used (MB): 1750,16     JVM Flags: 10 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmn128M -Xmx2957M -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     Player Count: 1 / 8; [ServerPlayer['Darth_Bicho'/9029, l='ServerLevel[New World]', x=1203.79, y=50.00, z=94.06]]     Data Packs: vanilla, mod:extraarmor (incompatible), mod:dungeonsmod, mod:jei (incompatible), mod:prefab (incompatible), mod:doggytalents (incompatible), mod:mcwwindows (incompatible), mod:wonderful_enchantments (incompatible), mod:reap (incompatible), mod:jrftl (incompatible), mod:journeymap (incompatible), mod:comforts, mod:travelersbackpack (incompatible), mod:naturescompass (incompatible), mod:libx, mod:dungeoncrawl (incompatible), mod:toolleveling (incompatible), mod:guardvillagers (incompatible), mod:mcwdoors (incompatible), mod:copperequipment (incompatible), mod:simpleores, mod:dash (incompatible), mod:ironchest (incompatible), mod:dicemcta (incompatible), mod:silentlib, mod:morevanillalib, mod:enchantedgoldenapplecrafting (incompatible), mod:jade, mod:forge, mod:ironfurnaces (incompatible), mod:simplecorelib, mod:mcwtrpdoors (incompatible), mod:xercamod (incompatible), mod:majrusz_library (incompatible), mod:golems (incompatible), mod:easy_villagers (incompatible), mod:dimdungeons (incompatible), mod:curios, mod:gravestone (incompatible), mod:collective, mod:randomdecorativethings, mod:villagertools (incompatible), mod:vanillahammers, mod:elevatorid (incompatible), mod:inventoryhud (incompatible), mod:structurize (incompatible), mod:buildersaddition (incompatible), mod:worldedit (incompatible), mod:starterkit, mod:constructionwand (incompatible), mod:hunterillager (incompatible), mod:appleskin (incompatible), mod:aquaculture, mod:fallingtree (incompatible), mod:enchantwithmob (incompatible), mod:smallernetherportals, mod:scalinghealth (incompatible), mod:expanded_combat, mod:chiselsandbits (incompatible), mod:lootbagmod (incompatible), mod:snowballsfreezemobs     Type: Integrated Server (map_client.txt)     Is Modded: Definitely; Client brand changed to 'forge'     OptiFine Version: OptiFine_1.17.1_HD_U_H1_pre6     OptiFine Build: 20211008-115759     Render Distance Chunks: 2     Mipmaps: 4     Anisotropic Filtering: 1     Antialiasing: 0     Multitexture: false     Shaders: null     OpenGlVersion: 3.2.0 - Build 10.18.10.4276     OpenGlRenderer: Intel(R) HD Graphics     OpenGlVendor: Intel     CpuCount: 2     ModLauncher: 9.0.7+91+master.8569cdf     ModLauncher launch target: forgeclient     ModLauncher naming: srg     ModLauncher services:           mixin PLUGINSERVICE           eventbus PLUGINSERVICE           object_holder_definalize PLUGINSERVICE           runtime_enum_extender PLUGINSERVICE           capability_token_subclass PLUGINSERVICE           capability_inject_definalize PLUGINSERVICE           accesstransformer PLUGINSERVICE           runtimedistcleaner PLUGINSERVICE           mixin TRANSFORMATIONSERVICE           OptiFine TRANSFORMATIONSERVICE           fml TRANSFORMATIONSERVICE      FML Language Providers:          minecraft@1.0         javafml@null     Mod List:          ExtraArmor-1.17.1-1.13.1.jar                      |Extra Armor                   |extraarmor                    |1.17.1-1.13.1       |DONE      |Manifest: NOSIGNATURE         DungeonsMod-1.17.1-1.4.53.jar                     |Dungeons Mod                  |dungeonsmod                   |1.17.1-1.4.53       |DONE      |Manifest: NOSIGNATURE         jei-1.17.1-8.0.0.12.jar                           |Just Enough Items             |jei                           |8.0.0.12            |DONE      |Manifest: NOSIGNATURE         Prefab-Mod-1.17.1.jar                             |Prefab                        |prefab                        |1.7.1.1             |DONE      |Manifest: NOSIGNATURE         DoggyTalents-1.17.1-2.1.0.1.jar                   |Doggy Talents 2               |doggytalents                  |2.1.0.1             |DONE      |Manifest: NOSIGNATURE         mcw-windows-2.0.0-mc1.17.1.jar                    |Macaw's Windows               |mcwwindows                    |2.0.0               |DONE      |Manifest: NOSIGNATURE         wonderful-enchantments-1.17.1-1.5.2.jar           |Wonderful Enchantments        |wonderful_enchantments        |1.5.2               |DONE      |Manifest: NOSIGNATURE         reap-1.17.1-1.0.0.jar                             |Reap Mod                      |reap                          |1.17.1-1.0.0        |DONE      |Manifest: NOSIGNATURE         JRFTL+[1.17.1]-1.2.jar                            |JRFTL                         |jrftl                         |1.2                 |DONE      |Manifest: NOSIGNATURE         journeymap-1.17.1-5.7.3rc3.jar                    |Journeymap                    |journeymap                    |5.7.3rc3            |DONE      |Manifest: NOSIGNATURE         comforts-forge-1.17.1-5.0.0.1.jar                 |Comforts                      |comforts                      |1.17.1-5.0.0.1      |DONE      |Manifest: NOSIGNATURE         TravelersBackpack-1.17.1-6.0.3.jar                |Traveler's Backpack           |travelersbackpack             |6.0.3               |DONE      |Manifest: NOSIGNATURE         NaturesCompass-1.17.1-1.9.2-forge.jar             |Nature's Compass              |naturescompass                |1.17.1-1.9.2-forge  |DONE      |Manifest: NOSIGNATURE         LibX-1.17.1-2.0.10.jar                            |LibX                          |libx                          |1.17.1-2.0.10       |DONE      |Manifest: NOSIGNATURE         DungeonCrawl-1.17.1-2.3.2.jar                     |Dungeon Crawl                 |dungeoncrawl                  |2.3.2               |DONE      |Manifest: NOSIGNATURE         toolleveling-1.17.1-1.2.8.jar                     |Tool Leveling                 |toolleveling                  |1.17.1 - 1.2.8      |DONE      |Manifest: NOSIGNATURE         guardvillagers-1.17.1.1.3.3 (1).jar               |Guard Villagers               |guardvillagers                |1.3.3               |DONE      |Manifest: NOSIGNATURE         mcw-doors-1.0.3-mc1.17.1.jar                      |Macaw's Doors                 |mcwdoors                      |1.0.3               |DONE      |Manifest: NOSIGNATURE         CopperEquipment-Forge1.17.1-0.1.jar               |Copper Equipment              |copperequipment               |0.1                 |DONE      |Manifest: NOSIGNATURE         SimpleOres2-1.17.1-3.0.1.4.jar                    |Simple Ores                   |simpleores                    |1.17.1-3.0.1.4      |DONE      |Manifest: NOSIGNATURE         dash-1.17.1-1.0.1.jar                             |Dash                          |dash                          |1.0.1               |DONE      |Manifest: NOSIGNATURE         ironchest-1.17.1-12.0.2.jar                       |Iron Chests                   |ironchest                     |1.17.1-12.0.2       |DONE      |Manifest: NOSIGNATURE         DiceMC-TieredArmor-1.17.1-1.1a.jar                |DiceMC Tiered Armor           |dicemcta                      |1.17.1-1.1a         |DONE      |Manifest: NOSIGNATURE         client-1.17.1-20210706.113038-srg.jar             |Minecraft                     |minecraft                     |1.17.1              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f         silent-lib-1.17.1-5.0.0.jar                       |Silent Lib                    |silentlib                     |5.0.0               |DONE      |Manifest: NOSIGNATURE         MoreVanillaLib-1.17.1-2.0.5.jar                   |MoreVanillaLib                |morevanillalib                |1.17.1-2.0.5        |DONE      |Manifest: NOSIGNATURE         1.17.1-enchantedgoldenapplecrafting-1.0.jar       |Enchanted Golden Apple Craftin|enchantedgoldenapplecrafting  |1.0                 |DONE      |Manifest: NOSIGNATURE         Jade-1.17.1-3.3.1.jar                             |Jade                          |jade                          |3.3.1               |DONE      |Manifest: NOSIGNATURE         forge-1.17.1-37.0.84-universal.jar                |Forge                         |forge                         |37.0.84             |DONE      |Manifest: 22:af:21:d8:19:82:7f:93:94:fe:2b:ac:b7:e4:41:57:68:39:87:b1:a7:5c:c6:44:f9:25:74:21:14:f5:0d:90         ironfurnaces-1.17.1-2.8.4.jar                     |Iron Furnaces                 |ironfurnaces                  |2.8.4               |DONE      |Manifest: NOSIGNATURE         SimpleCoreLib-1.17.1-3.0.4.0.jar                  |SimpleCoreLib                 |simplecorelib                 |1.17.1-3.0.4.0      |DONE      |Manifest: NOSIGNATURE         mcw-trapdoors-1.0.3-mc1.17.1.jar                  |Macaw's Trapdoors             |mcwtrpdoors                   |1.0.3               |DONE      |Manifest: NOSIGNATURE         xercamod-1.17.1-1.1.jar                           |Xerca Mod                     |xercamod                      |1.17.1-1.1          |DONE      |Manifest: NOSIGNATURE         majrusz-library-1.17.1-2.6.0.jar                  |Majrusz Library               |majrusz_library               |2.6.0               |DONE      |Manifest: NOSIGNATURE         extragolems-17.1.1.jar                            |Extra Golems                  |golems                        |17.1.1              |DONE      |Manifest: NOSIGNATURE         easy_villagers-1.17.1-1.0.5.jar                   |Easy Villagers                |easy_villagers                |1.17.1-1.0.4        |DONE      |Manifest: NOSIGNATURE         dimdungeons-1.13.1-forge-1.17.1.jar               |Dimensional Dungeons          |dimdungeons                   |1.13.1              |DONE      |Manifest: NOSIGNATURE         curios-forge-1.17.1-5.0.1.0.jar                   |Curios API                    |curios                        |1.17.1-5.0.1.0      |DONE      |Manifest: NOSIGNATURE         gravestone-1.17.1-1.0.4.jar                       |Gravestone Mod                |gravestone                    |1.17.1-1.0.4        |DONE      |Manifest: NOSIGNATURE         collective-1.17.1-2.64.jar                        |Collective                    |collective                    |2.64                |DONE      |Manifest: NOSIGNATURE         RandomDecorativeThings-1.17.1-0.1.2.jar           |Random Decorative Things      |randomdecorativethings        |0.1.2               |DONE      |Manifest: NOSIGNATURE         villagertools-1.17.1-1.0.1.jar                    |villagertools                 |villagertools                 |1.17.1-1.0.1        |DONE      |Manifest: 1f:47:ac:b1:61:82:96:b8:47:19:16:d2:61:81:11:60:3a:06:4b:61:31:56:7d:44:31:1e:0c:6f:22:5b:4c:ed         VanillaHammers-1.17.1-3.0.2.jar                   |Vanilla Hammers               |vanillahammers                |1.17.1-3.0.2        |DONE      |Manifest: NOSIGNATURE         elevatorid-1.17.1-1.8.1.jar                       |Elevator Mod                  |elevatorid                    |1.17.1-1.8.1        |DONE      |Manifest: NOSIGNATURE         InventoryHud_[1.17.1].forge-3.3.3.jar             |Inventory HUD+(Forge edition) |inventoryhud                  |3.3.3               |DONE      |Manifest: NOSIGNATURE         structurize-1.17.1-0.13.239-ALPHA.jar             |Structurize                   |structurize                   |1.17.1-0.13.239-ALPH|DONE      |Manifest: NOSIGNATURE         buildersaddition-1.17.1-20210810a.jar             |Builders Crafts & Addition    |buildersaddition              |1.17.1-20210810a    |DONE      |Manifest: NOSIGNATURE         worldedit-mod-7.2.6.jar                           |WorldEdit                     |worldedit                     |7.2.6+4b2d1e7       |DONE      |Manifest: NOSIGNATURE         starterkit_1.17.1-2.6.jar                         |Starter Kit                   |starterkit                    |2.6                 |DONE      |Manifest: NOSIGNATURE         constructionwand-1.17.1-2.3.jar                   |Construction Wand             |constructionwand              |1.17.1-2.3          |DONE      |Manifest: NOSIGNATURE         HunterIllager-1.17.1-2.4.0.jar                    |Hunter Illager                |hunterillager                 |1.17.1-2.4.0        |DONE      |Manifest: NOSIGNATURE         appleskin-forge-mc1.17.1-2.1.0.jar                |AppleSkin                     |appleskin                     |2.1.0               |DONE      |Manifest: NOSIGNATURE         Aquaculture-1.17.1-2.2.2.jar                      |Aquaculture 2                 |aquaculture                   |1.17.1-2.2.2        |DONE      |Manifest: NOSIGNATURE         Falling-Tree-Mod-Fabric-1.17.1.jar                |FallingTree                   |fallingtree                   |2.14.0              |DONE      |Manifest: 3c:8e:df:6c:df:a6:2a:9f:af:64:ea:04:9a:cf:65:92:3b:54:93:0e:96:50:b4:52:e1:13:42:18:2b:ae:40:29         enchantwithmob-1.17.1-2.5.1.jar                   |Enchant With Mob              |enchantwithmob                |1.17.1-2.5.1        |DONE      |Manifest: NOSIGNATURE         smallernetherportals_1.17.1-1.8.jar               |Smaller Nether Portals        |smallernetherportals          |1.8                 |DONE      |Manifest: NOSIGNATURE         ScalingHealth-1.17.1-5.0.4+4.jar                  |Scaling Health                |scalinghealth                 |5.0.4+4             |DONE      |Manifest: NOSIGNATURE         expanded_combat-2.3.0-1.17.1.jar                  |Expanded Combat               |expanded_combat               |2.3.0               |DONE      |Manifest: NOSIGNATURE         chiselsandbits-1.1.6-RELEASE-universal.jar        |Chisels & bits                |chiselsandbits                |1.1.6-RELEASE       |DONE      |Manifest: NOSIGNATURE         lootbagmod-1.17-3.0.0.jar                         |Loot Bag Mod                  |lootbagmod                    |1.17-3.0.0          |DONE      |Manifest: NOSIGNATURE         snowballsfreezemobs_1.17.1-1.5.jar                |Snowballs Freeze Mobs         |snowballsfreezemobs           |1.5                 |DONE      |Manifest: NOSIGNATURE     Crash Report UUID: 2c67d6ad-3d8a-4ade-8adf-3048ef40531b     FML: 37.0     Forge: net.minecraftforge:37.0.84
    • Good evening, a bit more progress and inherited info. I finally managed to understand why I couldn't perfectly connect my registry's to the object.class. You guys were right all the way. It was all about basic understanding of Java, and to correctly use fields, constants, properties etc. It's just one of 6 code languages I'm script kiddying, so bare with me. It also made sense to understand, that my Fluid.class(not FluidBlock.class) was, from its logic, actually a "register".class just as my main register .class, and I could basically just have used all my fluid.class code inside the general registry as well. So it seems important you also give perfect label/naming/package structure to your mod, though I know from scripting with Papyrus, it isn't the worst thing to multithread. However, the FluidRegistry.class has the FluidBlock.class registered like that now:
    • Use the OF website to check if it's compatible with your Forge version. It's a compatibility issue that OF needs to fix, nothing to do with Forge.
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.