Jump to content

FML try to load mod out of .minecraft


peyo56

Recommended Posts

Hello, I am creating a tool that permit to user to have multiples version of minecraft

 

My program use a folder ".mcm"  next to ".minecraft", I am currently on linux

in this directory I have two main directory : "content" and "version"

In the content folder, there is a content cache, including mods, texturepack and worlds

In the version folder, there is somes folder that corespond to minecraft version

In each of these, there is a .minecraft folder.

 

My program simply redirect the "home" or "appdata" folder.

When I install FML, it try to loads mods in the content folder and in other versions folders ...

 

This is the current command line for minecraft :

java -Duser.home=/home/user/.mcm/version/test -cp /home/user/.mcm/version/test/.minecraft/bin/minecraft.jar:/home/user/.mcm/version/test/.minecraft/bin/lwjgl.jar:/home/user/.mcm/version/test/.minecraft/bin/lwjgl_util.jar:/home/user/.mcm/version/test/.minecraft/bin/jinput.jar: -Djava.library.path=/home/user/.mcm/version/test/.minecraft/bin/natives net.minecraft.client.Minecraft <username> <sessionID> -Xmx1024M -Xms512M

 

This is the complete log :

27 achievements
182 recipes
LWJGL Version: 2.8.4
27 juin 2012 22:12:21 cpw.mods.fml.common.FMLCommonHandler beginLoading
INFO: Attempting early MinecraftForge initialization
27 juin 2012 22:12:21 cpw.mods.fml.common.FMLCommonHandler beginLoading
INFO: Completed early MinecraftForge initialization
2012-06-27 22:12:21 [iNFO] Forge Mod Loader version 2.2.78.153 for Minecraft 1.2.5 loading
2012-06-27 22:12:21 [WARNING] Failed to load mod class mod_CCGPU.class in /home/utilisateur/.mcm/mods/Stuff/Computercraft/CCGPU
2012-06-27 22:12:21 [sEVERE] File mod_CCGPU.class failed to read properly
2012-06-27 22:12:21 [WARNING] Failed to load mod class mod_CCInput.class in /home/utilisateur/.mcm/mods/Stuff/Computercraft/CCInput_07
2012-06-27 22:12:21 [sEVERE] File mod_CCInput.class failed to read properly
2012-06-27 22:12:21 [WARNING] Failed to load mod class mod_ccSpeaker.class in /home/utilisateur/.mcm/mods/Stuff/Computercraft/ccSpeaker
2012-06-27 22:12:21 [sEVERE] File mod_ccSpeaker.class failed to read properly
2012-06-27 22:12:21 [WARNING] Failed to load mod class mod_CCTurtle.class in /home/utilisateur/.mcm/mods/temp/ComputerCraft
2012-06-27 22:12:21 [sEVERE] File mod_CCTurtle.class failed to read properly
2012-06-27 22:12:21 [WARNING] Failed to load mod class mod_ComputerCraft.class in /home/utilisateur/.mcm/mods/temp/ComputerCraft
2012-06-27 22:12:21 [sEVERE] File mod_ComputerCraft.class failed to read properly
2012-06-27 22:12:21 [WARNING] Failed to load mod class mod_CCAdvancedResourceProcessing.class in /home/utilisateur/.mcm/mods/temp/aip
2012-06-27 22:12:21 [sEVERE] File mod_CCAdvancedResourceProcessing.class failed to read properly
2012-06-27 22:12:22 [WARNING] Failed to load mod class mod_PortalGun.class in /home/utilisateur/.mcm/version/old/.minecraft/mods/portalgun
2012-06-27 22:12:22 [sEVERE] File mod_PortalGun.class failed to read properly
2012-06-27 22:12:22 [iNFO] Loading mods from /home/utilisateur/.mcm/version/test/.minecraft/mods
2012-06-27 22:12:22 [iNFO] Directory WorldEditCUI contained no mods
2012-06-27 22:12:22 [sEVERE] A problem has occured during mod loading. Likely a corrupt jar is located in your mods directory
cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: version/old//minecraft/mods/portalgun/mod_PortalGun
at cpw.mods.fml.common.Loader.load(Loader.java:436)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:592)
at cpw.mods.fml.client.FMLClientHandler.onPreLoad(FMLClientHandler.java:193)
at net.minecraft.client.Minecraft.a(Minecraft.java:383)
at net.minecraft.client.Minecraft.run(Minecraft.java:735)
at java.lang.Thread.run(Thread.java:662)
Caused by: cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: version/old//minecraft/mods/portalgun/mod_PortalGun
at cpw.mods.fml.common.Loader.loadModClass(Loader.java:527)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:474)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:463)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:463)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:463)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:463)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:463)
at cpw.mods.fml.common.Loader.load(Loader.java:385)
... 5 more
Caused by: java.lang.ClassNotFoundException: version/old//minecraft/mods/portalgun/mod_PortalGun
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at cpw.mods.fml.common.Loader.loadModClass(Loader.java:494)
... 12 more
2012-06-27 22:12:22 [sEVERE] A critical error has occurred.
cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: version/old//minecraft/mods/portalgun/mod_PortalGun
at cpw.mods.fml.common.Loader.load(Loader.java:436)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:592)
at cpw.mods.fml.client.FMLClientHandler.onPreLoad(FMLClientHandler.java:193)
at net.minecraft.client.Minecraft.a(Minecraft.java:383)
at net.minecraft.client.Minecraft.run(Minecraft.java:735)
at java.lang.Thread.run(Thread.java:662)
Caused by: cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: version/old//minecraft/mods/portalgun/mod_PortalGun
at cpw.mods.fml.common.Loader.loadModClass(Loader.java:527)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:474)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:463)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:463)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:463)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:463)
at cpw.mods.fml.common.Loader.attemptDirLoad(Loader.java:463)
at cpw.mods.fml.common.Loader.load(Loader.java:385)
... 5 more
Caused by: java.lang.ClassNotFoundException: version/old//minecraft/mods/portalgun/mod_PortalGun
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at cpw.mods.fml.common.Loader.loadModClass(Loader.java:494)
... 12 more
2012-06-27 22:12:22 [sEVERE] 2 mods loaded
Minecraft Forge 3.3.8.153
FML v2.2.78.153
Forge Mod Loader version 2.2.78.153 for Minecraft 1.2.5
mod_MinecraftForge : Loaded (minecraft.jar)
mod_CodeChickenCore : Loaded (minecraft.jar)

 

So there is 2 solutions, I use an incorrect command line or there is a mistake in FML

Link to comment
Share on other sites

FML uses Minecraft.getMCDir to determine the home directory of Minecraft.

So either you're doing it wrong, or MC itself isn't liking how you're doing things.

It is fairly simple to change what this function returns, by setting 1 static field in Minecraft to the new home path.

I suggest you go that route instead of changing the system variables.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

The main problem is that for doing that I need to make a mod, I don't wan't to make any mods for that, simply because if any other mod change my modded class, it will serve nothing ... and because i need to update the mod for all versions, including snapshot versions, custom server launcher and very very old version.

 

Before I installed FML, all mods worked fine, found the mods and files in the good place.

 

The problem must be in FML, or I have forget one option ...

 

( Before I make this version, my program clean and copy the minecraft versions in the .minecraft, waiting between 2 and 5 minutes for starting minecraft is not a very good solution ..., and I have more that 20 versions of minecraft,  )

 

EDIT : If it determine the folder with Minecraft.getMCDir, why it don't looks in my "/home/user/.mcm/version/test/.minecraft" or "/home/user/.minecraft" instead of "/home/user/.mcm" ?

Link to comment
Share on other sites

Thanks for MultiMCLauncher, I think I will use that i my launcher for a long time ...

 

Just for the "end", all mods I have installed before were running right, the right folder, since the Minecraft.getMCDir method is highly based on the user.home folder except for Windows ( which use appdata folder ) why changing it to a right place cause problem

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

    • They were already updated, and just to double check I even did a cleanup and fresh update from that same page. I'm quite sure drivers are not the problem here. 
    • i tried downloading the drivers but it says no AMD graphics hardware has been detected    
    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • 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;     }  
  • Topics

×
×
  • Create New...

Important Information

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