Jump to content

PirateCody

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by PirateCody

  1. I'm trying to run various gradlew commands. Right now, I'm trying to run "gradlew setupDecompWorkspace eclipse" in order to try forcing a redownload of the forge libraries, but it gives me this error:

    Spoiler

    Picked up _JAVA_OPTIONS: -Xmx3g
    Error occurred during initialization of VM
    Could not reserve enough space for 3145728KB object heap

    1

    I have the environment variable _JAVA_OPTIONS set to -Xmx3g which should be enough. There's no stacktrace available. Funny enough, when I set the JAVA OPTIONS to -Xmx512m, the process starts to work and then fails around :decompileMC.

    I'me running Java 8 64 bit

    Spoiler

    Picked up _JAVA_OPTIONS: -Xmx3g
    java version "1.8.0_201"
    Java(TM) SE Runtime Environment (build 1.8.0_201-b09)
    Java HotSpot(TM) 64-Bit Server VM (build 25.201-b09, mixed mode)

     

    I am at a complete loss and dont know where to go from here. 

  2. 1 hour ago, Keksuccino said:

    As already mentioned here, there are some problems with mod building at the moment. It seems like it fails to check for existing versions and throws this error:

     

    
    FAILURE: Build failed with an exception.
    
    * Where:
    Build file 'F:\Coding\Workspaces\Eclipse\forge-1.12.2-14.23.5.2768-mdk\build.gradle' line: 25
    
    * What went wrong:
    A problem occurred evaluating root project 'forge-1.12.2-14.23.5.2768-mdk'.
    > No such version exists!
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 3.957 secs

     

    Are there any workarounds for it? :o
     

     

     

    41 minutes ago, Keksuccino said:

    hope it get's fixed soon ^^  

     

    This thread may be able to help. 

     

    • Like 1
  3. I got a fairly bizarre error today after exporting my mod. I launched eclipse after loading my mod and my forge project was broken. I did nothing to the forge project or my mod project. I didn't mess with eclipse either. The only thing I did was edit the ForgeVersion.json in the gradle cache because otherwise building a mod with gradlew is impossible. The specific errors I get are:

     

    Spoiler
    
    
    Project 'forge-1.12.2-14.23.5.2811-mdk' is missing required library: 'C:\Users\Cody\.gradle\caches\minecraft\net\minecraftforge\forge\1.12.2-14.23.5.2811\snapshot\20171003\forgeSrc-1.12.2-14.23.5.2811.jar'
    
    Project 'forge-1.12.2-14.23.5.2811-mdk' is missing required library: 'C:\Users\Cody\.gradle\caches\minecraft\net\minecraftforge\forge\1.12.2-14.23.5.2811\start'
    

     

     

    I'm not really sure where to go from here. Would running setupDecompWorkspace again do anything?

  4. I'm trying to export my mod, but when I run "gradlew build" it ends up crashing with an exception.

     

    build.gradle:

    Spoiler
    
    buildscript {
        repositories {
            jcenter()
            maven { url = "https://files.minecraftforge.net/maven" }
        }
        dependencies {
            classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
        }
    }
    apply plugin: 'net.minecraftforge.gradle.forge'
    //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup.
    
    
    version = "1.12.2-1.1.0"
    group = "com.piratecody.sandstorm" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
    archivesBaseName = "sandstorm"
    
    sourceCompatibility = targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.
    compileJava {
        sourceCompatibility = targetCompatibility = '1.8'
    }
    
    minecraft {
        version = "1.12.2-14.23.5.2811"
        runDir = "run"
        
        // the mappings can be changed at any time, and must be in the following format.
        // snapshot_YYYYMMDD   snapshot are built nightly.
        // stable_#            stables are built at the discretion of the MCP team.
        // Use non-default mappings at your own risk. they may not always work.
        // simply re-run your setup task after changing the mappings to update your workspace.
        mappings = "snapshot_20171003"
        // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable.
    }
    
    dependencies {
        // you may put jars on which you depend on in ./libs
        // or you may define them like so..
        //compile "some.group:artifact:version:classifier"
        //compile "some.group:artifact:version"
          
        // real examples
        //compile 'com.mod-buildcraft:buildcraft:6.0.8:dev'  // adds buildcraft to the dev env
        //compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env
    
        // the 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime.
        //provided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
    
        // the deobf configurations:  'deobfCompile' and 'deobfProvided' are the same as the normal compile and provided,
        // except that these dependencies get remapped to your current MCP mappings
        //deobfCompile 'com.mod-buildcraft:buildcraft:6.0.8:dev'
        //deobfProvided 'com.mod-buildcraft:buildcraft:6.0.8:dev'
    
        // for more info...
        // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
        // http://www.gradle.org/docs/current/userguide/dependency_management.html
    
    }
    
    processResources {
        // this will ensure that this task is redone when the versions change.
        inputs.property "version", project.version
        inputs.property "mcversion", project.minecraft.version
    
        // replace stuff in mcmod.info, nothing else
        from(sourceSets.main.resources.srcDirs) {
            include 'mcmod.info'
                    
            // replace version and mcversion
            expand 'version':project.version, 'mcversion':project.minecraft.version
        }
            
        // copy everything else except the mcmod.info
        from(sourceSets.main.resources.srcDirs) {
            exclude 'mcmod.info'
        }
    }
    

     

     

     

    error stack trace:

     

    Spoiler
    
    Q:\Users\Cody\Programming\Eclipse Workspace\Sandstorm>gradlew build --stacktrace
    Picked up _JAVA_OPTIONS: -Xmx512m
    
    FAILURE: Build failed with an exception.
    
    * Where:
    Build file 'Q:\Users\Cody\Programming\Eclipse Workspace\Sandstorm\build.gradle' line: 24
    
    * What went wrong:
    A problem occurred evaluating root project 'Sandstorm'.
    > No such version exists!
    
    * Try:
    Run with --info or --debug option to get more log output.
    
    * Exception is:
    org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'Sandstorm'.
            at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:93)
            at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl$2.run(DefaultScriptPluginFactory.java:177)
            at org.gradle.configuration.ProjectScriptTarget.addConfiguration(ProjectScriptTarget.java:77)
            at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:182)
            at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:38)
            at org.gradle.configuration.project.BuildScriptProcessor.execute(BuildScriptProcessor.java:25)
            at org.gradle.configuration.project.ConfigureActionsProjectEvaluator.evaluate(ConfigureActionsProjectEvaluator.java:34)
            at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:55)
            at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:540)
            at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:93)
            at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:42)
            at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)
            at org.gradle.initialization.DefaultGradleLauncher$2.run(DefaultGradleLauncher.java:124)
            at org.gradle.internal.Factories$1.create(Factories.java:22)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
            at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:121)
            at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
            at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
            at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
            at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
            at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
            at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
            at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
            at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
            at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
            at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
            at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
            at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
            at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
            at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
            at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
            at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239)
            at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212)
            at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
            at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
            at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
            at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
            at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)
            at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
            at org.gradle.launcher.Main.doAction(Main.java:33)
            at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
            at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
            at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
            at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
            at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
            at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
            at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
    Caused by: net.minecraftforge.gradle.util.GradleConfigurationException: No such version exists!
            at net.minecraftforge.gradle.user.patcherUser.forge.ForgeExtension.checkAndSetVersion(ForgeExtension.java:204)
            at net.minecraftforge.gradle.user.patcherUser.forge.ForgeExtension.setVersion(ForgeExtension.java:83)
            at net.minecraftforge.gradle.user.patcherUser.forge.ForgeExtension_Decorated.setVersion(Unknown Source)
            at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.setProperty(BeanDynamicObject.java:297)
            at org.gradle.internal.metaobject.BeanDynamicObject.setProperty(BeanDynamicObject.java:154)
            at org.gradle.internal.metaobject.CompositeDynamicObject.setProperty(CompositeDynamicObject.java:65)
            at org.gradle.internal.metaobject.AbstractDynamicObject.setProperty(AbstractDynamicObject.java:75)
            at net.minecraftforge.gradle.user.patcherUser.forge.ForgeExtension_Decorated.setProperty(Unknown Source)
            at build_5dvv94rr8lhx0iw6gzpvh6nt7$_run_closure2.doCall(Q:\Users\Cody\Programming\Eclipse Workspace\Sandstorm\build.gradle:24)
            at org.gradle.api.internal.ClosureBackedAction.execute(ClosureBackedAction.java:67)
            at org.gradle.api.internal.plugins.ExtensionsStorage$ExtensionHolder.configure(ExtensionsStorage.java:145)
            at org.gradle.api.internal.plugins.ExtensionsStorage.configureExtension(ExtensionsStorage.java:69)
            at org.gradle.api.internal.plugins.DefaultConvention$ExtensionsDynamicObject.invokeMethod(DefaultConvention.java:215)
            at org.gradle.internal.metaobject.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:96)
            at org.gradle.internal.metaobject.MixInClosurePropertiesAsMethodsDynamicObject.invokeMethod(MixInClosurePropertiesAsMethodsDynamicObject.java:30)
            at org.gradle.internal.metaobject.AbstractDynamicObject.invokeMethod(AbstractDynamicObject.java:163)
            at org.gradle.groovy.scripts.BasicScript.methodMissing(BasicScript.java:79)
            at build_5dvv94rr8lhx0iw6gzpvh6nt7.run(Q:\Users\Cody\Programming\Eclipse Workspace\Sandstorm\build.gradle:23)
            at org.gradle.groovy.scripts.internal.DefaultScriptRunnerFactory$ScriptRunnerImpl.run(DefaultScriptRunnerFactory.java:91)
            ... 50 more
    
    
    BUILD FAILED
    
    Total time: 4.138 secs

    ive already tried deleting the .gradle folders in my project and my windows user folder.

    1

     

  5. 30 minutes ago, diesieben07 said:

    The SoundEvent registry event fires after the Item registry event.

    Thanks, that seemed to have helped with another problem I found in my trial and error. Another thing I did was declare the sound event in SandstormSounds like so:

     

    public static SoundEvent music_sandstorm = new SoundEvent(new ResourceLocation(Sandstorm.MODID, "music_sandstorm")).setRegistryName("music_sandstorm");

     

    and then registered it like this:

    @SubscribeEvent
    	public static void registerSounds(RegistryEvent.Register<SoundEvent> event){
    		final SoundEvent[] soundEvents = {
    			SandstormSounds.music_sandstorm	
    		};
    		event.getRegistry().registerAll(soundEvents);
    	}

     

    I'm mainly leaving this information here just in case someone stumbles upon this post with the same issue.

    Thanks for your help. 

  6. 12 hours ago, diesieben07 said:

    You most likely used the wrong SoundEvent. You need net.minecraft.util.SoundEvent.

    Thanks, that seemed to fix the registration issue. 

     

    Now a more obscure problem that I also ran into in 1.7 is that my sound event won't play. For context, I'm making a music disc. I don't see anything obviously wrong with my sounds.json or other music disc code, but I'm gonna post it here regardless. 

     

    sounds.json

    {
      "music_sandstorm": {
    		"category": "record",
    		"sounds": [
    			{
    				"name": "sandstorm:music/music_sandstorm",
    				"stream": true
    			}
    		]
    	}
    }

     

    RegistryHandler.java

    @EventBusSubscriber
    public class RegistryHandler {
    
    	//blocks
    	
    	@SubscribeEvent
    	public static void registerSounds(RegistryEvent.Register<SoundEvent> event){
    		final SoundEvent[] soundEvents = {
    			new SoundEvent(new ResourceLocation(Sandstorm.MODID, "music_sandstorm")).setRegistryName("music_sandstorm")	
    		};
    		event.getRegistry().registerAll(soundEvents);
    	}
          
          @SubscribeEvent
    	public static void registerItems(Register<Item> event){
    		final Item[] items = {
    				new ItemSandstormRecord("recordSandstorm", SandstormSounds.music_sandstorm, "recordsandstorm")
    		};
    		
    		event.getRegistry().registerAll(items);
    	}
          
    }

     

    ItemSandstormRecord.java

    public class ItemSandstormRecord extends ItemRecord{
    
    	public ItemSandstormRecord(String unlocalizedName, SoundEvent soundIn, String registryName) {
    		super(unlocalizedName, soundIn);
    		setUnlocalizedName(Sandstorm.MODID + "." + unlocalizedName);
    		setRegistryName(registryName);
    		setCreativeTab(CreativeTabs.MISC);
    		
    	}
    
    }

     

     

    Much appreciate any help

  7. I'm pretty new to Forge modding in 1.12 after developing for awhile in 1.7.10. I'm trying to create a music disc, but I can't figure out the proper way to register my SoundEvents. From what I could gather, the proper way is something along the lines of 

    public static void registerSounds(RegistryEvent.Register<SoundEvent> event)){
    		//Resource Location and SoundEvent stuff
    	}

     However, Eclipse tells me "Bound mismatch: The type SoundEvent is not a valid substitute for the bounded parameter <T extends IForgeRegistryEntry<T>> of the type RegistryEvent<T>.Register<T>". Being new to the post-1.7 registry system I don't really know where to go from here. 

    Thanks

×
×
  • Create New...

Important Information

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