Skip to content

Commit

Permalink
Add 1.20
Browse files Browse the repository at this point in the history
  • Loading branch information
PieKing1215 committed Mar 17, 2024
1 parent a215ab4 commit bbf9d26
Show file tree
Hide file tree
Showing 46 changed files with 1,038 additions and 79 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ classes/

publish_all.sh
publish_curseforge_version.sh
publish_modrinth_version.sh
publish_modrinth_version.sh

deps_*.txt
3 changes: 2 additions & 1 deletion buildAllJars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
# Once it succeeds this script copies the jars into the root build/
# (trying to do all of this through gradle was using an absurd amount of memory)

versions=("1.16" "1.18" "1.19")
versions=("1.16" "1.18" "1.19" "1.20")
versions=("1.20")

start=$(date +%s)
end=$(date +%s)
Expand Down
5 changes: 5 additions & 0 deletions cleanJars.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

rm mc1.16/build/*.jar
rm mc1.18/build/*.jar
rm mc1.19/build/*.jar
rm mc1.20/build/*.jar
22 changes: 11 additions & 11 deletions crossversion/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
plugins {
id "dev.architectury.loom" version "1.0-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.1-SNAPSHOT" apply false
}

apply plugin: 'java'
Expand All @@ -10,16 +10,16 @@ java {
}

subprojects {
apply plugin: "dev.architectury.loom"

loom {
silentMojangMappingsLicense()
}

dependencies {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.officialMojangMappings()
}
// apply plugin: "dev.architectury.loom"
//
// loom {
// silentMojangMappingsLicense()
// }
//
// dependencies {
// minecraft "com.mojang:minecraft:${minecraft_version}"
// mappings loom.officialMojangMappings()
// }
}

allprojects {
Expand Down
26 changes: 13 additions & 13 deletions crossversion/common/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

dependencies {
modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
//dependencies {
// modImplementation "net.fabricmc:fabric-loader:${fabric_loader_version}"
//
// modCompileOnly("me.pieking1215.invmove.16:InvMove-fabric:${rootProject.invmove_version}") {
// exclude(group: "me.pieking1215.invmove.crossversion")
// exclude(group: "me.pieking1215.invmove.16")
// exclude(group: "net.fabricmc")
// exclude(group: "net.fabricmc.fabric-api")
// }
//}

modCompileOnly("me.pieking1215.invmove.16:InvMove-fabric:${rootProject.invmove_version}") {
exclude(group: "me.pieking1215.invmove.crossversion")
exclude(group: "me.pieking1215.invmove.16")
exclude(group: "net.fabricmc")
exclude(group: "net.fabricmc.fabric-api")
}
}

loom {
accessWidenerPath = file("src/main/resources/invmovecompats.accesswidener")
}
//loom {
// accessWidenerPath = file("src/main/resources/invmovecompats.accesswidener")
//}

publishing {
publications {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public static void init() {
}

public static void register(Supplier<Module> moduleSup, String... modid) {
System.out.println("[InvMoveCompats] Checking for modids: " + Arrays.toString(modid));
if(Arrays.stream(modid).anyMatch(s -> InvMove.instance().hasMod(s))) {
InvMove.registerModule(moduleSup.get());
}
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ org.gradle.jvmargs=-Xmx4096M
org.gradle.parallel=true

archives_base_name=InvMoveCompats
mod_version=0.3.0
mod_version=0.3.1
maven_artifact_id=InvMoveCompats

mod_description=Mod compatibilities for InvMove.
mod_repo=https://github.com/PieKing1215/InvMoveCompats

invmove_version=0.8.2
invmove_version=0.8.5
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
4 changes: 2 additions & 2 deletions mc1.16/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.0-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.1-SNAPSHOT" apply false
}

architectury {
Expand All @@ -18,7 +18,7 @@ subprojects {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.officialMojangMappings()

implementation project(path: ":crossversion:common", configuration: "namedElements")
// implementation project(path: ":crossversion:common", configuration: "namedElements")
}
}

Expand Down
5 changes: 5 additions & 0 deletions mc1.16/common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ dependencies {

processResources {
from project(":crossversion:common").sourceSets.main.resources
duplicatesStrategy 'exclude'
}

sourcesJar {
duplicatesStrategy 'exclude'
}

architectury {
Expand Down
8 changes: 5 additions & 3 deletions mc1.16/fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,26 @@ processResources {
}

from project("${parent.path}:common").sourceSets.main.resources

duplicatesStrategy 'exclude'
}

shadowJar {
exclude "architectury.common.json"

configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
archiveClassifier.set "dev-shadow"
}

remapJar {
injectAccessWidener = true
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
archiveClassifier.set null
}

jar {
classifier "dev"
archiveClassifier.set "dev"
}

sourcesJar {
Expand Down
8 changes: 5 additions & 3 deletions mc1.16/forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -77,24 +77,26 @@ processResources {
}

from project("${parent.path}:common").sourceSets.main.resources

duplicatesStrategy 'exclude'
}

shadowJar {
exclude "fabric.mod.json"
exclude "architectury.common.json"

configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
archiveClassifier.set "dev-shadow"
}

remapJar {
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
archiveClassifier.set null
}

jar {
classifier "dev"
archiveClassifier.set "dev"
}

sourcesJar {
Expand Down
4 changes: 2 additions & 2 deletions mc1.18/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.0-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.1-SNAPSHOT" apply false
}

architectury {
Expand All @@ -19,7 +19,7 @@ subprojects {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.officialMojangMappings()

implementation project(path: ":crossversion:common", configuration: "namedElements")
// implementation project(path: ":crossversion:common", configuration: "namedElements")
}
}

Expand Down
6 changes: 3 additions & 3 deletions mc1.18/fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,18 +65,18 @@ shadowJar {
exclude "architectury.common.json"

configurations = [project.configurations.shadowCommon]
classifier "dev-shadow"
archiveClassifier.set "dev-shadow"
}

remapJar {
injectAccessWidener = true
input.set shadowJar.archiveFile
dependsOn shadowJar
classifier null
archiveClassifier.set null
}

jar {
classifier "dev"
archiveClassifier.set "dev"
}

sourcesJar {
Expand Down
4 changes: 2 additions & 2 deletions mc1.19/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id "architectury-plugin" version "3.4-SNAPSHOT"
id "dev.architectury.loom" version "1.0-SNAPSHOT" apply false
id "dev.architectury.loom" version "1.1-SNAPSHOT" apply false
}

architectury {
Expand All @@ -19,7 +19,7 @@ subprojects {
minecraft "com.mojang:minecraft:${minecraft_version}"
mappings loom.officialMojangMappings()

implementation project(path: ":crossversion:common", configuration: "namedElements")
// implementation project(path: ":crossversion:common", configuration: "namedElements")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import me.shedaniel.rei.api.client.gui.widgets.TextField;
import net.minecraft.client.gui.screens.Screen;

import java.lang.reflect.Method;

public class REIModule19 extends ModuleImpl {
@Override
public String getId() {
Expand All @@ -22,11 +24,24 @@ public CVComponent getTitle() {
@Override
public Movement shouldAllowMovement(Screen screen) {
TextField sb = REIRuntime.getInstance().getSearchTextField();
if (InvMoveConfig.MOVEMENT.TEXT_FIELD_DISABLES.get()
&& sb != null
&& sb.isFocused()) {
return Movement.SUGGEST_DISABLE;
}
// System.out.println(sb);
// if (sb != null) {
// for (Method declaredMethod : sb.getClass().getDeclaredMethods()) {
// System.out.println(declaredMethod.getName());
// }
// System.out.println("=== TextField " + TextField.class.getSuperclass());
// for (Method declaredMethod : TextField.class.getDeclaredMethods()) {
// System.out.println(declaredMethod.getName());
// }
// }
// calling isFocused results in NoSuchMethodError at runtime on forge
// my guess is it doesn't remap because TextField is the name of a vanilla class
// System.out.println(sb.isFocused());
// if (InvMoveConfig.MOVEMENT.TEXT_FIELD_DISABLES.get()
// && sb != null
// && sb.isFocused()) {
// return Movement.SUGGEST_DISABLE;
// }

return super.shouldAllowMovement(screen);
}
Expand Down
3 changes: 2 additions & 1 deletion mc1.19/fabric-like/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ dependencies {

//

modApi "dev.emi:emi:${emi_version}"
// TODO: EMI 1.0+ is available on forge
modApi "dev.emi:emi-fabric:${emi_version}"

modCompileOnly "me.shedaniel:RoughlyEnoughItems-api-fabric:${rei_version}"
modCompileOnly "me.shedaniel:RoughlyEnoughItems-default-plugin-fabric:${rei_version}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ public class InvMoveCompatsFabricLike implements InvMoveInitializer {
public void init() {
InvMoveCompats.init();
InvMoveCompats19.init();
InvMoveCompats.register(EMIModule19::new, "emi");
InvMoveCompats.register(() -> new EMIModule19(), "emi");
}
}
3 changes: 2 additions & 1 deletion mc1.19/fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ dependencies {

//

modRuntimeOnly "dev.emi:emi:${emi_version}"
// TODO: EMI 1.0+ is available on forge
modRuntimeOnly "dev.emi:emi-fabric:${emi_version}"

modRuntimeOnly "me.shedaniel:RoughlyEnoughItems-fabric:${rei_version}"

Expand Down
16 changes: 8 additions & 8 deletions mc1.19/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

minecraft_version=1.19.3
minecraft_version=1.19.4
enabled_platforms=quilt,fabric,forge

maven_group=me.pieking1215.invmovecompats.19
Expand All @@ -8,17 +8,17 @@ architectury_version=6.2.46
cloth_version=9.0.94
modmenu_version=5.0.2

fabric_loader_version=0.14.12
fabric_api_version=0.72.0+1.19.3
fabric_loader_version=0.14.17
fabric_api_version=0.75.3+1.19.4

forge_version=1.19.3-44.1.5
forge_version=1.19.4-45.0.4

quilt_loader_version=0.17.5-beta.3
quilt_fabric_api_version=5.0.0-alpha.9+0.72.0-1.19.3

# target mods

emi_version=0.6.0+1.19.3
rei_version=10.0.581
jei_minecraft_version=1.19.2
jei_version=11.5.0.297
emi_version=1.0.2+1.19.4
rei_version=11.0.621
jei_minecraft_version=1.19.4
jei_version=13.1.0.11
Loading

0 comments on commit bbf9d26

Please sign in to comment.