Skip to content

Commit 3652944

Browse files
1.12.2
1 parent 3767b61 commit 3652944

23 files changed

Lines changed: 214 additions & 342 deletions

File tree

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,6 @@ eclipse
2222
run
2323
runs
2424
run-data
25+
.jdks
2526

26-
repo
27+
repo

build.gradle

Lines changed: 61 additions & 159 deletions
Original file line numberDiff line numberDiff line change
@@ -2,194 +2,96 @@ buildscript {
22
repositories {
33
maven { url = 'https://maven.minecraftforge.net/' }
44
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
5+
mavenCentral()
56
}
67
dependencies {
7-
classpath 'org.spongepowered:mixingradle:0.7-SNAPSHOT'
8+
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
89
}
910
}
1011

11-
plugins {
12-
id 'eclipse'
13-
id 'idea'
14-
id 'maven-publish'
15-
id 'net.minecraftforge.gradle' version '5.1.+'
16-
}
12+
apply plugin: 'net.minecraftforge.gradle.forge'
13+
apply plugin: 'eclipse'
14+
apply plugin: 'idea'
15+
apply plugin: 'maven-publish'
1716

1817
version = mod_version
1918
group = mod_group_id
19+
archivesBaseName = mod_id
2020

21-
base {
22-
archivesName = mod_id
23-
}
24-
25-
sourceCompatibility = targetCompatibility = '1.8'
21+
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8'
2622

2723
println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}"
28-
minecraft {
29-
// The mappings can be changed at any time and must be in the following format.
30-
// Channel: Version:
31-
// official MCVersion Official field/method names from Mojang mapping files
32-
// parchment YYYY.MM.DD-MCVersion Open community-sourced parameter names and javadocs layered on top of official
33-
//
34-
// You must be aware of the Mojang license when using the 'official' or 'parchment' mappings.
35-
// See more information here: https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md
36-
//
37-
// Parchment is an unofficial project maintained by ParchmentMC, separate from MinecraftForge
38-
// Additional setup is needed to use their mappings: https://parchmentmc.org/docs/getting-started
39-
//
40-
// Use non-default mappings at your own risk. They may not always work.
41-
// Simply re-run your setup task after changing the mappings to update your workspace.
42-
mappings channel: mapping_channel, version: mapping_version
43-
44-
// When true, this property will have all Eclipse/IntelliJ IDEA run configurations run the "prepareX" task for the given run configuration before launching the game.
45-
// In most cases, it is not necessary to enable.
46-
// enableEclipsePrepareRuns = true
47-
// enableIdeaPrepareRuns = true
48-
49-
// When true, this property will add the folder name of all declared run configurations to generated IDE run configurations.
50-
// The folder name can be set on a run configuration using the "folderName" property.
51-
// By default, the folder name of a run configuration is the name of the Gradle project containing it.
52-
// generateRunFolders = true
53-
54-
// This property enables access transformers for use in development.
55-
// They will be applied to the Minecraft artifact.
56-
// The access transformer file can be anywhere in the project.
57-
// However, it must be at "META-INF/accesstransformer.cfg" in the final mod jar to be loaded by Forge.
58-
// This default location is a best practice to automatically put the file in the right place in the final jar.
59-
// See https://docs.minecraftforge.net/en/latest/advanced/accesstransformers/ for more information.
60-
// accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg')
61-
62-
// Default run configurations.
63-
// These can be tweaked, removed, or duplicated as needed.
64-
runs {
65-
// applies to all the run configs below
66-
configureEach {
67-
workingDirectory project.file('run')
68-
69-
// Recommended logging data for a userdev environment
70-
// The markers can be added/remove as needed separated by commas.
71-
// "SCAN": For mods scan.
72-
// "REGISTRIES": For firing of registry events.
73-
// "REGISTRYDUMP": For getting the contents of all registries.
74-
property 'forge.logging.markers', 'REGISTRIES'
7524

76-
// Recommended logging level for the console
77-
// You can set various levels here.
78-
// Please read: https://stackoverflow.com/questions/2031163/when-to-use-the-different-log-levels
79-
property 'forge.logging.console.level', 'debug'
80-
mods {
81-
"${mod_id}" {
82-
source sourceSets.main
83-
}
84-
}
85-
}
86-
87-
client {
88-
}
89-
90-
server {
91-
args '--nogui'
92-
}
93-
94-
data {
95-
// example of overriding the workingDirectory set in configureEach above
96-
workingDirectory project.file('run-data')
97-
98-
// Specify the modid for data generation, where to output the resulting resource, and where to look for existing resources.
99-
args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/')
100-
}
101-
}
25+
minecraft {
26+
version = "${minecraft_version}-${forge_version}"
27+
mappings = "${mapping_channel}_${mapping_version.tokenize('-')[0]}"
28+
runDir = 'run'
29+
useDepAts = true
30+
clientJvmArgs += ['-Dfml.coreMods.load=com.neofastftl.infinitypattern.mixins.IFPATMixinPlugin']
31+
serverJvmArgs += ['-Dfml.coreMods.load=com.neofastftl.infinitypattern.mixins.IFPATMixinPlugin']
10232
}
10333

104-
// Include resources generated by data generators.
105-
sourceSets.main.resources { srcDir 'src/generated/resources' }
106-
10734
repositories {
108-
maven {
109-
url "https://cursemaven.com"
110-
}
35+
maven { url = 'https://repo.spongepowered.org/repository/maven-public/' }
36+
maven { url = 'https://www.cursemaven.com' }
11137
}
112-
dependencies {
113-
// Specify the version of Minecraft to use.
114-
// Any artifact can be supplied so long as it has a "userdev" classifier artifact and is a compatible patcher artifact.
115-
// The "userdev" classifier will be requested and setup by ForgeGradle.
116-
// If the group id is "net.minecraft" and the artifact id is one of ["client", "server", "joined"],
117-
// then special handling is done to allow a setup of a vanilla dependency without the use of an external repository.
118-
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"
119-
120-
runtimeOnly fg.deobf("curse.maven:jei-238222:5846870")
121-
implementation fg.deobf("curse.maven:applied-energistics-2-223794:3571836")
122-
// Example mod dependency with JEI - using fg.deobf() ensures the dependency is remapped to your development mappings
123-
// The JEI API is declared for compile time use, while the full JEI artifact is used at runtime
124-
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-common-api:${jei_version}")
125-
// compileOnly fg.deobf("mezz.jei:jei-${mc_version}-forge-api:${jei_version}")
126-
// runtimeOnly fg.deobf("mezz.jei:jei-${mc_version}-forge:${jei_version}")
12738

128-
// Example mod dependency using a mod jar from ./libs with a flat dir repository
129-
// This maps to ./libs/coolmod-${mc_version}-${coolmod_version}.jar
130-
// The group id is ignored when searching -- in this case, it is "blank"
131-
// implementation fg.deobf("blank:coolmod-${mc_version}:${coolmod_version}")
132-
133-
// For more info:
134-
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
135-
// http://www.gradle.org/docs/current/userguide/dependency_management.html
39+
dependencies {
40+
deobfCompile 'curse.maven:applied-energistics-2-223794:2747063'
41+
deobfCompile 'curse.maven:jei-238222:5846804'
42+
compile('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
43+
exclude group: 'com.google.code.gson', module: 'gson'
44+
exclude group: 'com.google.guava', module: 'guava'
45+
}
46+
runtime 'com.google.code.gson:gson:2.8.9'
13647
}
13748

138-
// This block of code expands all declared replace properties in the specified resource targets.
139-
// A missing property will result in an error. Properties are expanded using ${} Groovy notation.
140-
// When "copyIdeResources" is enabled, this will also run before the game launches in IDE environments.
141-
// See https://docs.gradle.org/current/dsl/org.gradle.language.jvm.tasks.ProcessResources.html
142-
tasks.named('processResources', ProcessResources).configure {
143-
var replaceProperties = [
144-
minecraft_version: minecraft_version, minecraft_version_range: minecraft_version_range,
145-
forge_version: forge_version, forge_version_range: forge_version_range,
146-
loader_version_range: loader_version_range,
147-
mod_id: mod_id, mod_name: mod_name, mod_license: mod_license, mod_version: mod_version,
148-
mod_authors: mod_authors, mod_description: mod_description,
149-
]
150-
inputs.properties replaceProperties
49+
processResources {
50+
inputs.property 'mod_id', mod_id
51+
inputs.property 'mod_name', mod_name
52+
inputs.property 'mod_version', mod_version
53+
inputs.property 'mod_authors', mod_authors
54+
inputs.property 'mod_description', mod_description
55+
inputs.property 'minecraft_version', minecraft_version
56+
57+
from(sourceSets.main.resources.srcDirs) {
58+
include 'mcmod.info'
59+
expand(
60+
mod_id: mod_id,
61+
mod_name: mod_name,
62+
mod_version: mod_version,
63+
mod_authors: mod_authors,
64+
mod_description: mod_description,
65+
minecraft_version: minecraft_version
66+
)
67+
}
15168

152-
filesMatching(['META-INF/mods.toml', 'pack.mcmeta']) {
153-
expand replaceProperties + [project: project]
69+
from(sourceSets.main.resources.srcDirs) {
70+
exclude 'mcmod.info'
15471
}
15572
}
15673

157-
// Example for how to get properties into the manifest for reading at runtime.
158-
tasks.named('jar', Jar).configure {
74+
jar {
15975
manifest {
16076
attributes([
161-
'Specification-Title' : mod_id,
162-
'Specification-Vendor' : mod_authors,
163-
'Specification-Version' : '1', // We are version 1 of ourselves
164-
'Implementation-Title' : project.name,
165-
'Implementation-Version' : project.jar.archiveVersion,
166-
'Implementation-Vendor' : mod_authors,
167-
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
168-
'MixinConfigs' : 'mixins.ifpat.json'
77+
'Specification-Title' : mod_id,
78+
'Specification-Vendor' : mod_authors,
79+
'Specification-Version' : '1',
80+
'Implementation-Title' : project.name,
81+
'Implementation-Version' : version,
82+
'Implementation-Vendor' : mod_authors,
83+
'Implementation-Timestamp' : new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
84+
'MixinConfigs' : 'mixins.ifpat.json',
85+
'FMLCorePlugin' : 'com.neofastftl.infinitypattern.mixins.IFPATMixinPlugin',
86+
'FMLCorePluginContainsFMLMod' : 'true',
87+
'ForceLoadAsMod' : 'true'
16988
])
17089
}
171-
172-
// This is the preferred method to reobfuscate your jar file
173-
finalizedBy 'reobfJar'
174-
}
175-
176-
177-
apply plugin: 'org.spongepowered.mixin'
178-
179-
mixin {
180-
add sourceSets.main, "mixins.infinitypattern.refmap.json"
181-
config "mixins.ifpat.json"
18290
}
18391

184-
// However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing:
185-
// tasks.named('publish').configure {
186-
// dependsOn 'reobfJar'
187-
// }
188-
189-
// Example configuration to allow publishing using the maven-publish plugin
19092
publishing {
19193
publications {
192-
register('mavenJava', MavenPublication) {
94+
mavenJava(MavenPublication) {
19395
artifact jar
19496
}
19597
}
@@ -200,6 +102,6 @@ publishing {
200102
}
201103
}
202104

203-
tasks.withType(JavaCompile).configureEach {
204-
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
105+
tasks.withType(JavaCompile) {
106+
options.encoding = 'UTF-8'
205107
}

gradle.properties

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
# Sets default memory used for gradle commands. Can be overridden by user or command line properties.
2-
org.gradle.jvmargs=-Xmx1G
3-
org.gradle.java.home=C:\\Program Files\\Java\\jdk-17
2+
org.gradle.jvmargs=-Xmx3G
3+
org.gradle.java.home=C:\\Users\\stefa\\IdeaProjects\\AE2-InfinityPatternAddon\\.jdks\\jdk8u482-b08
44
org.gradle.daemon=true
55
org.gradle.parallel=true
66
org.gradle.caching=true
77
org.gradle.configuration-cache=false
88

99
# Environment Properties
10-
minecraft_version=1.16.5
10+
minecraft_version=1.12.2
1111
# The Minecraft version range can use any release version of Minecraft as bounds.
1212
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
1313
# as they do not follow standard versioning conventions.
14-
minecraft_version_range=[1.16.5, 1.17)
15-
forge_version=36.2.39
16-
forge_version_range=[36,)
17-
# The loader version range can only use the major version of FML as bounds
18-
loader_version_range=[36,)
19-
mapping_channel=official
14+
minecraft_version_range=[1.12.2]
15+
forge_version=14.23.5.2847
16+
forge_version_range=[14.23.5.2847,)
17+
loader_version_range=[0,)
18+
mapping_channel=snapshot
2019
# The mapping version to query from the mapping channel.
2120
# This must match the format required by the mapping channel.
22-
mapping_version=1.16.5
21+
mapping_version=20171003-1.12
2322

2423
## Mod Properties
2524

@@ -31,7 +30,7 @@ mod_name=Applied Infinity Pattern
3130
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3231
mod_license=All Rights Reserved
3332
# The mod version. See https://semver.org/
34-
mod_version=1.0-Forge-1.16.5
33+
mod_version=1.0-Forge-1.12.2
3534
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
3635
# This should match the base package used for the mod sources.
3736
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
#Wed Mar 04 18:50:46 CET 2026
21
distributionBase=GRADLE_USER_HOME
32
distributionPath=wrapper/dists
4-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-bin.zip
54
zipStoreBase=GRADLE_USER_HOME
65
zipStorePath=wrapper/dists

settings.gradle

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
pluginManagement {
2-
repositories {
3-
mavenLocal()
4-
gradlePluginPortal()
5-
maven { url = 'https://maven.minecraftforge.net' }
6-
}
7-
}
1+
rootProject.name = 'AE2-InfinityPatternAddon'
Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
package com.neofastftl.infinitypattern;
22

3-
import com.neofastftl.infinitypattern.registries.ModItems;
4-
import net.minecraftforge.eventbus.api.IEventBus;
53
import net.minecraftforge.fml.common.Mod;
6-
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
74

8-
@Mod(InfinityPattern.MODID)
5+
@Mod(modid = InfinityPattern.MODID, name = InfinityPattern.NAME, version = InfinityPattern.VERSION, acceptedMinecraftVersions = "[1.12.2]")
96
public class InfinityPattern {
107
public static final String MODID = "infinitypattern";
11-
12-
public InfinityPattern() {
13-
IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();
14-
ModItems.ITEMS.register(modEventBus);
15-
}
8+
public static final String NAME = "Applied Infinity Pattern";
9+
public static final String VERSION = "1.0-Forge-1.12.2";
1610
}

0 commit comments

Comments
 (0)