Skip to content

Commit

Permalink
JEI building, Gradle building
Browse files Browse the repository at this point in the history
- Refactor JEI category building
- Fix placard item requirement not checking NBT
- Use AddPackFindersEvent instead of ShippedResourcePacks
- Remove unused config values
- Provide separate resource and data formats in pack.mcmeta
- Compress all images
- Update to latest Flywheel
- Disable jarJar inclusion of Flywheel
- Use ${file.jarVersion} instead of ${version}
- Add workaround for SpongePowered/MixinGradle#38
  • Loading branch information
PepperCode1 committed Jul 16, 2022
1 parent 4c45333 commit 82be76d
Show file tree
Hide file tree
Showing 836 changed files with 542 additions and 495 deletions.
28 changes: 14 additions & 14 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,20 @@ repositories {
dependencies {
minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}"

jarJar(group: 'com.tterrag.registrate', name: 'Registrate', version: '[MC1.18.2-1.1.3]') {
jarJar(group: 'com.tterrag.registrate', name: 'Registrate', version: '[MC1.18.2-1.1.3,)') {
jarJar.pin(it, project.registrate_version)
}
jarJar(group: 'com.jozufozu.flywheel', name: 'Flywheel-Forge', version: '[1.18-0.6.4,1.18-0.6.5)') {
jarJar.pin(it, project.flywheel_version)
}
// Uncomment once Forge fixes mixins for included jars
//jarJar(group: 'com.jozufozu.flywheel', name: "flywheel-forge-${flywheel_minecraft_version}", version: '[0.6.4,0.6.5)') {
// jarJar.pin(it, project.flywheel_version)
//}

implementation fg.deobf("com.tterrag.registrate:Registrate:${registrate_version}")

if (inWorkspace) {
implementation project(':Flywheel')
} else {
implementation fg.deobf("com.jozufozu.flywheel:Flywheel-Forge:${flywheel_version}")
implementation fg.deobf("com.jozufozu.flywheel:flywheel-forge-${flywheel_minecraft_version}:${flywheel_version}")
}

compileOnly fg.deobf("mezz.jei:jei-${jei_minecraft_version}:${jei_version}:api")
Expand All @@ -169,14 +170,6 @@ dependencies {
}
}

processResources {
inputs.property 'version', mod_version

filesMatching('META-INF/mods.toml') {
expand 'version': mod_version
}
}

sourceSets.main.resources {
srcDir 'src/generated/resources'
exclude '.cache/'
Expand All @@ -186,6 +179,12 @@ mixin {
add sourceSets.main, 'create.refmap.json'
}

// Workaround for SpongePowered/MixinGradle#38
afterEvaluate {
tasks.configureReobfTaskForReobfJar.mustRunAfter(tasks.compileJava)
tasks.configureReobfTaskForReobfJarJar.mustRunAfter(tasks.compileJava)
}

tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
Expand All @@ -201,7 +200,7 @@ jar {
'Specification-Title': 'create',
'Specification-Vendor': 'simibubi',
'Specification-Version': '1',
'Implementation-Title': project.name,
'Implementation-Title': project.jar.baseName,
'Implementation-Version': project.jar.archiveVersion,
'Implementation-Vendor': 'simibubi',
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
Expand Down Expand Up @@ -233,6 +232,7 @@ publishing {
artifactId = archivesBaseName

from components.java
fg.component(it)
jarJar.component(it)
}
}
Expand Down
5 changes: 3 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ parchment_version = 2022.07.10

# dependency versions
registrate_version = MC1.18.2-1.1.3
flywheel_version = 1.18-0.6.4.86
flywheel_minecraft_version = 1.18.2
flywheel_version = 0.6.4-90
jei_minecraft_version = 1.18.2
jei_version = 9.5.3.143
jei_version = 9.7.0.209
curios_minecraft_version = 1.18.2
curios_version = 5.0.7.0

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/simibubi/create/CreateClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import com.simibubi.create.foundation.render.CreateContexts;
import com.simibubi.create.foundation.render.SuperByteBufferCache;
import com.simibubi.create.foundation.utility.ModelSwapper;
import com.simibubi.create.foundation.utility.ShippedResourcePacks;
import com.simibubi.create.foundation.utility.ghost.GhostBlocks;
import com.simibubi.create.foundation.utility.outliner.Outliner;

Expand Down Expand Up @@ -85,8 +84,6 @@ public static void clientInit(final FMLClientSetupEvent event) {
BUFFER_CACHE.registerCompartment(SBBContraptionManager.CONTRAPTION, 20);
BUFFER_CACHE.registerCompartment(WorldSectionElement.DOC_WORLD_SECTION, 20);

ShippedResourcePacks.extractFiles("Copper Legacy Pack");

AllKeys.register();
// AllFluids.assignRenderLayers();
AllBlockPartials.init();
Expand Down
Loading

0 comments on commit 82be76d

Please sign in to comment.