Create

Create

86M Downloads

Dependency Implementation Not Working

celsiusqc opened this issue ยท 1 comments

commented

Describe the Bug

Error:

Executing Gradle task: runClient
Build info: MCreator 2023.1.10610, forge-1.19.2, 64-bit, 32689 MB, Windows 11, JVM 17.0.5, JAVA_HOME: C:\Program Files\Pylo\MCreator\jdk, started on: 2023-04-24-21:34:59

FAILURE: Build failed with an exception.

  • Where:
    Build file 'C:\Users\Administrator\MCreatorWorkspaces\CreateAddon\build.gradle' line: 14
  • What went wrong:
    A problem occurred evaluating root project 'CreateAddon'.

Could not get unknown property 'fg' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED
Task completed in less than a second

build.gradle:
buildscript {
repositories {
maven { url = 'https://maven.minecraftforge.net' }
mavenCentral()
}
repositories {
maven {
name = 'tterrag maven'
url = 'https://maven.tterrag.com/'
}
}
dependencies {
classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true
implementation fg.deobf("com.simibubi.create:create-${create_minecraft_version}:${create_version}:slim") { transitive = false }
implementation fg.deobf("com.jozufozu.flywheel:flywheel-forge-${flywheel_minecraft_version}:${flywheel_version}")
implementation fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}")
}

}
apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'

version = '1.0'
group = 'com.yourname.modid'
archivesBaseName = 'modid'

java.toolchain.languageVersion = JavaLanguageVersion.of(17)

minecraft {
mappings channel: 'official', version: '1.19.2'

accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')

runs {
    client {
        workingDirectory project.file('run')

        property 'forge.logging.markers', 'REGISTRIES'
        property 'forge.logging.console.level', 'debug'

        mods {
            examplemod {
                source sourceSets.main
            }
        }
    }

    server {
        workingDirectory project.file('run')

        property 'forge.logging.markers', 'REGISTRIES'
        property 'forge.logging.console.level', 'debug'

        mods {
            examplemod {
                source sourceSets.main
            }
        }
    }
}

}

dependencies {
minecraft 'net.minecraftforge:forge:1.19.2-43.1.7'
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}

apply from: 'mcreator.gradle'

Reproduction Steps

follow wiki for adding dependency

Expected Result

not crash on boot

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

Windows 11

Mod Version

0.5.0j

Minecraft Version

1.19.2

Forge Version

43.2.3

Other Mods

No response

Additional Context

No response

commented

Adding create to mc creator is not officially supported, try with a normal forge project with a IDE like IntelliJ