Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
Fix #41
Browse files Browse the repository at this point in the history
  • Loading branch information
KlemenDEV committed Apr 24, 2021
1 parent 3d27de7 commit 03a001d
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 28 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# MCreator generator for Minecraft Forge 1.12.2 mods
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/MCreator/Generator-Forge-1.12.2/blob/master/LICENSE)

## For MCreator 2020.5
## For MCreator 2021.1

This branch is designed to make 1.12.2 generator compatible with 2020.5 version of MCreator. Check branches for specific versions.
This branch is designed to make 1.12.2 generator compatible with 2021.1 version of MCreator. Check branches for specific versions.

This version should load in 2020.5, but will not support all features and might break things.
This version should load in 2021.1, but will not support all features and might break things.

## How to install

Expand Down
5 changes: 3 additions & 2 deletions forge-1.12.2/generator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ name: Minecraft Forge for @minecraft (@buildfileversion)
basefeatures: [~variables, model_json, model_obj, model_java, i18n, structures, textures, sounds]
partial_support: [loottable, recipe, block, achievement, mob, keybind]
status: deprecated
buildfileversion: 14.23.5.2768
buildfileversion: 14.23.5.2855
subversion: 4.0

start_id_map:
dimension: 2

gradle:
setup_task: "setupDecompWorkspace --refresh-dependencies"
setup_task: eclipse
run_client: runClient
run_server: runServer
export_file: "build/libs/modid-1.0.jar"
Expand Down
63 changes: 41 additions & 22 deletions forge-1.12.2/workspacebase/build.gradle
Original file line number Diff line number Diff line change
@@ -1,43 +1,62 @@
buildscript {
repositories {
maven { url = 'https://files.minecraftforge.net/maven' }
jcenter()
maven { url = "http://files.minecraftforge.net/maven" }
mavenCentral()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
classpath 'net.minecraftforge.gradle:ForgeGradle:3.+'
}
}
apply plugin: 'net.minecraftforge.gradle.forge'

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

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

sourceCompatibility = targetCompatibility = '1.8'
compileJava {
sourceCompatibility = targetCompatibility = '1.8'
}
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly.

minecraft {
version = '1.12.2-${generator.getGeneratorBuildFileVersion()}'
runDir = 'run'
mappings = 'snapshot_20171003'
}
mappings channel: 'snapshot', version: '20171003-1.12'

processResources {
inputs.property "version", project.version
inputs.property "mcversion", project.minecraft.version
from(sourceSets.main.resources.srcDirs) {
include 'mcmod.info'
expand 'version': project.version, 'mcversion': project.minecraft.version
}
from(sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
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
}
}
}
}
}

runClient.outputs.upToDateWhen { false }
runServer.outputs.upToDateWhen { false }
sourceSets {
main { output.resourcesDir = output.classesDir }
}

dependencies {
minecraft 'net.minecraftforge:forge:1.12.2-${generator.getGeneratorBuildFileVersion()}'
}

apply from: 'mcreator.gradle'

Binary file modified forge-1.12.2/workspacebase/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip

0 comments on commit 03a001d

Please sign in to comment.