Jump to content

Recommended Posts

Posted

Hi guys.

 

Is there ANY way I can run Minecraft in Eclipse with MCP/Forge, while running a (zipped) mod from the /mods folder at the same time?

 

I am not interested in decompiling the mod, but it offers functionality that makes my whole testing process speed up like crazy (specifically, it's ExtraBiomes, it lets me disable all the biomes so I can test my own biomes without generating a standard world and searching it for hours).

 

I Googled to figure this out and could get no solutions except for a vague rumor of a script that can load the /mods folder normally. Any truth to this?

(How easily could this be created? It could cut down substantially on time required to hunt down our creations' incompatibilities with other mods.)

 

I asked in #risucraft for extra help and they say it's impossible unless I decompile the mod, which is an inexact science at best and would probably mess up my workspace.

 

Thanks in advance for reading...

Posted

Hi, Gee!

 

Try putting the mod in jars/mods.  I've not tried it, but theoretically that should work.

 

If that doesn't work, you can put some debug code in your mod to disable biomes. Take a look at ModLoader.removeBiome()

 

That last bit is how I test Extrabiomes.

Posted

Unfortunately it doesn't...

 

Startup with no mods in the jars/mods folder works correctly, and my mod is reported as loaded.

 

However, putting the EBXL zip in that folder causes something to give up:

 

 

2 mods loaded
Minecraft Forge 3.3.7.135
FML v2.2.48.135
Forge Mod Loader version 2.2.48.135 for Minecraft 1.2.5
mod_JustSomeBiomes : Loaded (src)
mod_MinecraftForge : Loaded (src)


      Minecraft has crashed!      
      ----------------------      

Minecraft has stopped running because it encountered a problem.




--- BEGIN ERROR REPORT 2f714334 --------
Generated 6/19/12 11:57 AM

Minecraft: Minecraft 1.2.5
OS: Windows 7 (amd64) version 6.1
Java: 1.6.0_32, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: ATI Radeon HD 4800 Series version 4.2.11554 Compatibility Profile Context, ATI Technologies Inc.

cpw.mods.fml.common.LoaderException: cpw.mods.fml.common.LoaderException: java.lang.NoClassDefFoundError: forge/NetworkMod
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.startGame(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.NoClassDefFoundError: forge/NetworkMod
at cpw.mods.fml.common.Loader.loadModClass(Loader.java:527)
at cpw.mods.fml.common.Loader.attemptFileLoad(Loader.java:561)
at cpw.mods.fml.common.Loader.load(Loader.java:419)
... 5 more
Caused by: java.lang.NoClassDefFoundError: forge/NetworkMod
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:295)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
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)
... 7 more
Caused by: java.lang.ClassNotFoundException: forge.NetworkMod
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 23 more
--- END ERROR REPORT cce0e7e3 ----------

 

 

There are differences in the class it doesn't find, though.

 

For example, with the ExtraBiomes 2.2.2 zip, it can't find: forge/NetworkMod

With Thaumcraft 2.16C, it can't find forge/ISaveEventHandler

 

 

Oddly enough, the game seems to load fine with TFC's GemPack 2.9 (which is also a Forge mod that pretty much only adds ores and tools, its simplicity is why it works I suppose! ;)

 

 

Scott: Thanks for the solution to my particular problem, although I'll leave my question up with its original intent (script? possibility of making one?) in case it's useful for anyone else...

Posted

I think it has to do with the way that packages are rearranged during recompilation and reobfuscation...

 

What I mean it that in eclipse, forge is in the net.minecraft.src.forge package. In the compiled game, forge is in the forge package.

 

Try using ModLoader.removeBiome to get rid of the biomes that you don't want to generate...

Posted

This NOT to be given out. But this is something I wrote one night like a week ago for shits and giggles.

https://dl.dropbox.com/u/28221422/MCPModConverter.jar

Drop it in your MCP folder, and run it.

It'll look for jars/mods/*.{zip/jar} and convert them.

It makes it so I can run things like RP, or BC in my eclipse.

But I give no garentees that it won't completely blow up your computer and kill your dog. So use at your own risk.

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

Posted

Wow! Grabbed it, many thanks.

Will use as-is and keep to myself (although I can't promise for Google with a tasty link like that one)

As far as loading mods: looking good, considering you managed to run Buildcraft with it I'm not anticipating any issues :)

 

  • 1 month later...
Posted

Thanks Lex, I just started with Forge yesterday, and this was my first question too. I actually tried to use NEI mod, but it actually doesn't seem to be amenable to this method, however having its sources helped, so I was able to figure NEI specifically out. But your program was very useful for other mods (Redpower and Rei minimap), I really hope it will make it as a part of Forge toolchain eventually.

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

    • Im trying to build my mod using shade since i use the luaj library however i keep getting this error Reason: Task ':reobfJar' uses this output of task ':shadowJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. So i try adding reobfJar.dependsOn shadowJar  Could not get unknown property 'reobfJar' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. my gradle file plugins { id 'eclipse' id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'com.github.johnrengelman.shadow' version '7.1.2' id 'org.spongepowered.mixin' version '0.7.+' } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' apply plugin: 'com.github.johnrengelman.shadow' version = mod_version group = mod_group_id base { archivesName = mod_id } // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) //jarJar.enable() println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { mappings channel: mapping_channel, version: mapping_version copyIdeResources = true runs { configureEach { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' arg "-mixin.config=derp.mixin.json" mods { "${mod_id}" { source sourceSets.main } } } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { workingDirectory project.file('run-data') args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { flatDir { dirs './libs' } maven { url = "https://jitpack.io" } } configurations { shade implementation.extendsFrom shade } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation 'org.luaj:luaj-jse-3.0.2' implementation fg.deobf("com.github.Virtuoel:Pehkui:${pehkui_version}") annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' minecraftLibrary 'luaj:luaj-jse:3.0.2' shade 'luaj:luaj-jse:3.0.2' } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Vendor' : mod_authors, 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "TweakOrder" : 0, "MixinConfigs" : "derp.mixin.json" ]) } rename 'mixin.refmap.json', 'derp.mixin-refmap.json' } shadowJar { archiveClassifier = '' configurations = [project.configurations.shade] finalizedBy 'reobfShadowJar' } assemble.dependsOn shadowJar reobf { re shadowJar {} } publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } }  
    • All versions of Minecraft Forge suddenly black screen even without mods (tried reinstalling original Minecraft, Java, updating drivers doesn't work)
    • When i join minecraft all ok, when i join world all working fine, but when i open indentity menu, i get this The game crashed whilst unexpected error Error: java.lang.NullPointerException: Cannot invoke "top.ribs.scguns.common.Gun$Projectile.getDamage()" because "this.projectile" is null crash report here https://paste.ee/p/0vKaf
  • Topics

×
×
  • Create New...

Important Information

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