Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce duplicate code #18

Merged
merged 38 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
b017398
Reduce duplicate code
AlexProgrammerDE Apr 28, 2024
b88dce4
Fix gradle task name
AlexProgrammerDE Apr 28, 2024
370a561
Revert name changes
AlexProgrammerDE Apr 28, 2024
2b6845f
Revert action name
AlexProgrammerDE Apr 28, 2024
3cae588
Cleanup
AlexProgrammerDE Apr 28, 2024
155de79
Revert to java 17
AlexProgrammerDE Apr 28, 2024
c550a39
Fix generation
AlexProgrammerDE Apr 28, 2024
53630ea
Cleanup
AlexProgrammerDE Apr 28, 2024
2172eca
Simplify code of DGU
AlexProgrammerDE Apr 28, 2024
7528b37
Remove unnecessary annotations
AlexProgrammerDE Apr 28, 2024
6ce8ba7
Remove unused var
AlexProgrammerDE Apr 28, 2024
05a1847
Halt with error on error
AlexProgrammerDE Apr 29, 2024
8f8762e
Remove unused mixins
AlexProgrammerDE Apr 29, 2024
0dda566
Update fabric loader
AlexProgrammerDE Apr 29, 2024
f99669f
Ignore success result
AlexProgrammerDE Apr 29, 2024
3885a7c
Update gradle and use merged jar
AlexProgrammerDE Apr 29, 2024
8cd3e06
Implement new client and server merged environment for running fabric
AlexProgrammerDE May 1, 2024
41d19b8
Set server run dir as asset dir
AlexProgrammerDE May 1, 2024
e186181
More cleanup
AlexProgrammerDE May 1, 2024
97c1668
More cleanup 2
AlexProgrammerDE May 1, 2024
a46cb8f
More improvements
AlexProgrammerDE May 1, 2024
bcd97b1
Remove more duplicate code
AlexProgrammerDE May 2, 2024
17e6314
Use newer java methods
AlexProgrammerDE May 2, 2024
a58d77e
More cleanup
AlexProgrammerDE May 2, 2024
7436a6c
Remove SoundAccessors
AlexProgrammerDE May 2, 2024
e72cea8
More cleanup
AlexProgrammerDE May 2, 2024
8274108
Use java 21 for build
AlexProgrammerDE May 2, 2024
0aaa23a
Initial work on 1.20.5
AlexProgrammerDE May 4, 2024
27cb832
Cleanup a lot of stuff
AlexProgrammerDE May 16, 2024
f77358c
Do not generate mod jars to speed up builds
AlexProgrammerDE May 18, 2024
6b48762
Override merger on now open classes directly
AlexProgrammerDE Jul 3, 2024
1c20be3
Use recommended approach
AlexProgrammerDE Jul 3, 2024
2cc5424
Readd custom merger
AlexProgrammerDE Jul 3, 2024
42657e8
Working materials data generator
AlexProgrammerDE Jul 3, 2024
a35dc9f
Fix inconsistencies
AlexProgrammerDE Jul 3, 2024
39ee8b5
Fix collision order to be random
AlexProgrammerDE Jul 3, 2024
b0bfa3f
Use LinkedHashMap for more reproducibility
AlexProgrammerDE Jul 3, 2024
a0691b4
Fix imports
AlexProgrammerDE Jul 3, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 23 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,26 @@ jobs:
build:
strategy:
matrix:
version: ["1.7", "1.8.9", "1.9.4", "1.10.2", "1.11.2", "1.12.2", "1.13", "1.14", "1.15", "1.16", "1.17", "1.18", "22w19a", "1.19", "1.19.2", "1.20", "1.20.4"]
version: [
"1.7",
"1.8.9",
"1.9.4",
"1.10.2",
"1.11.2",
"1.12.2",
"1.13",
"1.14",
"1.15",
"1.16",
"1.17",
"1.18",
"22w19a",
"1.19",
"1.19.2",
"1.20",
"1.20.4",
"1.20.5"
]

name: Build ${{ matrix.version }}
timeout-minutes: 10
Expand All @@ -25,10 +44,10 @@ jobs:
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '17'
java-version: '21'
distribution: 'temurin'

- name: Generate ${{ matrix.version }}
Expand All @@ -40,5 +59,5 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: data-${{ matrix.version }}
path: ${{ matrix.version }}/run/minecraft-data
path: ${{ matrix.version }}/run/server/minecraft-data
if-no-files-found: error
66 changes: 25 additions & 41 deletions 1.10.2/build.gradle
Original file line number Diff line number Diff line change
@@ -1,47 +1,33 @@
import xyz.wagyourtail.unimined.api.minecraft.task.RemapJarTask
import xyz.wagyourtail.unimined.internal.minecraft.MinecraftProvider

plugins {
id 'fabric-loom'
id 'xyz.wagyourtail.unimined'
}

repositories {
maven {
name = "legacy-fabric"
url = "https://maven.legacyfabric.net"
unimined.minecraft {
version "1.10.2"

mappings {
legacyIntermediary()
legacyYarn(541)

devFallbackNamespace "intermediary"
}
}

loom {
setIntermediaryUrl('https://maven.legacyfabric.net/net/fabricmc/intermediary/%1$s/intermediary-%1$s-v2.jar');
customMinecraftManifest.set("https://meta.legacyfabric.net/v2/manifest/${minecraft_version}")
}
runs.config("server") {
javaVersion = JavaVersion.VERSION_21
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API provides hooks for events, item registration, and more. As most mods will need this, it's included by default.
// If you know for a fact you don't, it's not required and can be safely removed.
// modImplementation ("net.legacyfabric.legacy-fabric-api:legacy-fabric-api:${fabric_version}") {
// exclude module: "legacy-fabric-entity-events-v1"
// }

if (System.getProperty("os.name").toLowerCase().contains("mac")) {
implementation 'org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209'
implementation 'org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209'
implementation 'org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209'
customPatcher(new CustomLegacyFabricMinecraftTransformer(project, delegate as MinecraftProvider)) {
it.loader libs.versions.fabric.loader.get()
}

defaultRemapJar = true
}

if (System.getProperty("os.name").toLowerCase().contains("mac")) {
configurations.configureEach {
resolutionStrategy {
dependencySubstitution {
substitute module('org.lwjgl.lwjgl:lwjgl_util:2.9.2-nightly-201408222') with module('org.lwjgl.lwjgl:lwjgl_util:2.9.4-nightly-20150209')
substitute module('org.lwjgl.lwjgl:lwjgl:2.9.2-nightly-201408222') with module('org.lwjgl.lwjgl:lwjgl:2.9.4-nightly-20150209')
}
force 'org.lwjgl.lwjgl:lwjgl-platform:2.9.4-nightly-20150209'
}
}
dependencies {
implementation project(":common")
}

processResources {
Expand All @@ -52,12 +38,10 @@ processResources {
}
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
tasks.withType(RemapJarTask).configureEach {
onlyIf { false}
}

java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
}
7 changes: 0 additions & 7 deletions 1.10.2/gradle.properties

This file was deleted.

13 changes: 0 additions & 13 deletions 1.10.2/src/main/java/dev/u9g/minecraftdatagenerator/Main.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading