Jump to content

Need help with the mods.toml file


ChromaKey81

Recommended Posts

Novice modder here. I can't figure out how to get my mods.toml to work; when I run client it fails to build.

Latest log:
 

[26Jun2020 12:25:19.671] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--gameDir, ., --launchTarget, fmluserdevclient, --fml.mcpVersion, 20200515.085601, --fml.mcVersion, 1.15.2, --fml.forgeGroup, net.minecraftforge, --fml.forgeVersion, 31.2.0, --version, MOD_DEV, --assetIndex, 1.15, --assetsDir, C:\Users\willi\.gradle\caches\forge_gradle\assets, --username, Dev, --accessToken, ????????, --userProperties, {}]
[26Jun2020 12:25:19.683] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 5.1.0+69+master.79f13f7 starting: java version 14.0.1 by AdoptOpenJDK
[26Jun2020 12:25:20.423] [main/INFO] [net.minecraftforge.fml.loading.FixSSL/CORE]: Added Lets Encrypt root certificates as additional trust
[26Jun2020 12:25:22.391] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: java.lang.RuntimeException: java.net.MalformedURLException: no protocol: minecraftforge.net/versions.json
[26Jun2020 12:25:22.392] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at net.minecraftforge.fml.loading.StringUtils.toURL(StringUtils.java:51)
[26Jun2020 12:25:22.394] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.Optional.map(Optional.java:258)
[26Jun2020 12:25:22.394] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at net.minecraftforge.fml.loading.moddiscovery.ModInfo.<init>(ModInfo.java:90)
[26Jun2020 12:25:22.396] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at net.minecraftforge.fml.loading.moddiscovery.ModFileInfo.lambda$new$2(ModFileInfo.java:70)
[26Jun2020 12:25:22.398] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
[26Jun2020 12:25:22.399] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1624)
[26Jun2020 12:25:22.400] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
[26Jun2020 12:25:22.400] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
[26Jun2020 12:25:22.401] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
[26Jun2020 12:25:22.402] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[26Jun2020 12:25:22.403] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
[26Jun2020 12:25:22.403] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at net.minecraftforge.fml.loading.moddiscovery.ModFileInfo.<init>(ModFileInfo.java:70)
[26Jun2020 12:25:22.404] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at net.minecraftforge.fml.loading.moddiscovery.ModFileParser.loadModFile(ModFileParser.java:59)
[26Jun2020 12:25:22.405] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at net.minecraftforge.fml.loading.moddiscovery.ModFileParser.readModList(ModFileParser.java:51)
[26Jun2020 12:25:22.405] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at net.minecraftforge.fml.loading.moddiscovery.ModFile.identifyMods(ModFile.java:132)
[26Jun2020 12:25:22.406] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at net.minecraftforge.fml.loading.moddiscovery.ModDiscoverer.discoverMods(ModDiscoverer.java:116)
[26Jun2020 12:25:22.407] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at net.minecraftforge.fml.loading.FMLLoader.beginModScan(FMLLoader.java:211)
[26Jun2020 12:25:22.408] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at net.minecraftforge.fml.loading.FMLServiceProvider.runScan(FMLServiceProvider.java:105)
[26Jun2020 12:25:22.408] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at cpw.mods.modlauncher.TransformationServiceDecorator.runScan(TransformationServiceDecorator.java:111)
[26Jun2020 12:25:22.409] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at cpw.mods.modlauncher.TransformationServicesHandler.lambda$runScanningTransformationServices$8(TransformationServicesHandler.java:115)
[26Jun2020 12:25:22.411] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:271)
[26Jun2020 12:25:22.412] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.HashMap$ValueSpliterator.forEachRemaining(HashMap.java:1766)
[26Jun2020 12:25:22.413] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
[26Jun2020 12:25:22.414] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
[26Jun2020 12:25:22.415] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
[26Jun2020 12:25:22.415] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
[26Jun2020 12:25:22.416] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
[26Jun2020 12:25:22.416] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at cpw.mods.modlauncher.TransformationServicesHandler.runScanningTransformationServices(TransformationServicesHandler.java:116)
[26Jun2020 12:25:22.418] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at cpw.mods.modlauncher.TransformationServicesHandler.initializeTransformationServices(TransformationServicesHandler.java:63)
[26Jun2020 12:25:22.418] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at cpw.mods.modlauncher.Launcher.run(Launcher.java:75)
[26Jun2020 12:25:22.419] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at cpw.mods.modlauncher.Launcher.main(Launcher.java:65)
[26Jun2020 12:25:22.419] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1048]: 	at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:102)
[26Jun2020 12:25:22.420] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1057]: Caused by: java.net.MalformedURLException: no protocol: minecraftforge.net/versions.json
[26Jun2020 12:25:22.420] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1057]: 	at java.base/java.net.URL.<init>(URL.java:672)
[26Jun2020 12:25:22.421] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1057]: 	at java.base/java.net.URL.<init>(URL.java:568)
[26Jun2020 12:25:22.421] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1057]: 	at java.base/java.net.URL.<init>(URL.java:515)
[26Jun2020 12:25:22.422] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1057]: 	at net.minecraftforge.fml.loading.StringUtils.toURL(StringUtils.java:47)
[26Jun2020 12:25:22.423] [main/INFO] [STDERR/]: [java.lang.ThreadGroup:uncaughtException:1057]: 	... 31 more

 

Here's my mods.toml file:

# This is an example mods.toml file. It contains the data relating to the loading mods.
# There are several mandatory fields (#mandatory), and many more that are optional (#optional).
# The overall format is standard TOML format, v0.5.0.
# Note that there are a couple of TOML lists in this file.
# Find more information on toml format here:  https://github.com/toml-lang/toml
# The name of the mod loader type to load - for regular FML @Mod mods it should be javafml
modLoader="javafml" #mandatory
# A version range to match for said mod loader - for regular FML @Mod it will be the forge version
loaderVersion="[31,)" #mandatory This is typically bumped every Minecraft version by Forge. See our download page for lists of versions.
# A URL to refer people to when problems occur with this mod
issueTrackerURL="http://my.issue.tracker/" #optional
# A list of mods - how many allowed here is determined by the individual mod loader
[[mods]] #mandatory
# The modid of the mod
modId="devsdream" #mandatory
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
version="${file.jarVersion}" #mandatory
 # A display name for the mod
displayName="Developer's Dream" #mandatory
# A URL to query for updates for this mod. See the JSON update specification <here>
updateJSONURL="http://myurl.me/" #optional
# A URL for the "homepage" for this mod, displayed in the mod UI
displayURL="http://example.com/" #optional
# A file name (in the root of the mod JAR) containing a logo for display
logoFile="examplemod.png" #optional
# A text field displayed in the mod UI
credits="Thanks for this example mod goes to Java" #optional
# A text field displayed in the mod UI
authors="Love, Cheese and small house plants" #optional
# The description text for the mod (multi line!) (#mandatory)
description='''
This is a long form description of the mod. You can write whatever you want here

Have some lorem ipsum.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis lacinia magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed sagittis luctus odio eu tempus. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque volutpat ligula eget lacus auctor sagittis. In hac habitasse platea dictumst. Nunc gravida elit vitae sem vehicula efficitur. Donec mattis ipsum et arcu lobortis, eleifend sagittis sem rutrum. Cras pharetra quam eget posuere fermentum. Sed id tincidunt justo. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
'''
# A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional.
[[dependencies.devsdream]] #optional
    # the modid of the dependency
    modId="forge" #mandatory
    # Does this dependency have to exist - if not, ordering below must be specified
    mandatory=true #mandatory
    # The version range of the dependency
    versionRange="[31,)" #mandatory
    # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory
    ordering="NONE"
    # Side this dependency is applied on - BOTH, CLIENT or SERVER
    side="BOTH"
# Here's another dependency
[[dependencies.devsdream]]
    modId="minecraft"
    mandatory=true
    versionRange="[1.15.2]"
    ordering="NONE"
    side="BOTH"

My mod id is "devsdream"

Edited by ChromaKey81
updated code
Link to comment
Share on other sites

Remove the following:

updateJSONURL="minecraftforge.net/versions.json"
displayURL="minecraftforge.net"

I recommend removing any property which you will not use. (logoFile, *URL)

BTW, might I suggest lengthen your modid from 'devd'? Try 'devsdream', or whatever you please.

Link to comment
Share on other sites

2 minutes ago, sciwhiz12 said:

Remove the following:


updateJSONURL="minecraftforge.net/versions.json"
displayURL="minecraftforge.net"

I recommend removing any property which you will not use. (logoFile, *URL)

BTW, might I suggest lengthen your modid from 'devd'? Try 'devsdream', or whatever you please.

Done, but I'm still getting the same errors. The log still says minecraftforge.net/versions.json despite that URL never being used in the file, so I have no idea what's happening.

Link to comment
Share on other sites

I can't see anything out of place with your mods.toml, which leads me to believe that your run dirs, somewhere, has another mods.toml.

 

Please download a fresh copy of the Forge MDK, configure it until it runs to the client and the example mod is loaded. Then, delete everything from the example mod's src and resources, copy over your src & resources. Then try running.

 

If that doesn't work, please post the folder containing your build.gradle and mod code. I am mystified as how this is occuring (unless you are running the wrong run configuration)

Link to comment
Share on other sites

25 minutes ago, sciwhiz12 said:

I can't see anything out of place with your mods.toml, which leads me to believe that your run dirs, somewhere, has another mods.toml.

 

Please download a fresh copy of the Forge MDK, configure it until it runs to the client and the example mod is loaded. Then, delete everything from the example mod's src and resources, copy over your src & resources. Then try running.

 

If that doesn't work, please post the folder containing your build.gradle and mod code. I am mystified as how this is occuring (unless you are running the wrong run configuration)

I updated my stuff with fresh files, and now I have a new error: java.lang.RuntimeException: java.net.MalformedURLException: no protocol: github.com/MinecraftForge/MinecraftForge/issues

I'm still confused because I deleted this line in the mods.toml.

 

I uploaded everything to the github repo so there's more info available.

Link to comment
Share on other sites

8 minutes ago, sciwhiz12 said:

Aha! Remove the file 'modid-1.0.jar' from the 'run/mods' folder.

If you placed it there, remember that you are running the dev client; any code in src/main should automagically be found.

Also, please change the defaults in your build.gradle.

Thank you very much for the help (although now my game is crashing altogether. check repo for crash report) Could you briefly explain what I need to change in the build.gradle (or direct me to some documentation)?

 

By the way, do I need to compile all of my .java files to .class? How would I do that in VSCode?

Edited by ChromaKey81
Link to comment
Share on other sites

It doesn't seem possible for a user to delete posts.

 

However, getting VSCode to work properly with Java, especially compiling and debugging, is a pain in the proverbial for most people, so i reccommend you stick to one of IntelliJ or Eclipse until you get the hang of it.

Link to comment
Share on other sites

4 minutes ago, Curle said:

It doesn't seem possible for a user to delete posts.

 

However, getting VSCode to work properly with Java, especially compiling and debugging, is a pain in the proverbial for most people, so i reccommend you stick to one of IntelliJ or Eclipse until you get the hang of it.

I just need the forge library and I'll be set. Where can I download that? Nvm I found it

Edited by ChromaKey81
Link to comment
Share on other sites

The most recent crash report is a recurring issue in Forge currently. (revelant issue) Try running it again.

10 minutes ago, ChromaKey81 said:

Could you briefly explain what I need to change in the build.gradle (or direct me to some documentation)?

The 'archiveBaseName', 'group', and replacing 'examplemod' and 'examplemodareus' with respective modid and your author name.

12 minutes ago, ChromaKey81 said:

By the way, do I need to compile all of my .java files to .class? How would I do that in VSCode?

I am not familliar with java coding with VSCode. Although VSCode has an associated task built for it (genVSCodeRuns), as said above, you are better off using IntelliJ IDEA or Eclipse. (unless you wish to stick to VSCode, in which case I wish you good luck and fun)

Link to comment
Share on other sites

10 minutes ago, Curle said:

The "Forge Library" is generated by one of the IDEs during the gradle setup and first sync. If you can't find it from there, you probably shouldn't be using VSCode.

I can't find it from there in IntelliJ IDEA either. Do you know what the usual directory is?

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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
    • It is an issue with quark - update it to this build: https://www.curseforge.com/minecraft/mc-mods/quark/files/3642325
    • Remove Instant Massive Structures Mod from your server     Add new crash-reports with sites like https://paste.ee/  
    • Update your drivers: https://www.amd.com/en/support/graphics/amd-radeon-r9-series/amd-radeon-r9-200-series/amd-radeon-r9-280x
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.