Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 52 additions & 45 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,70 +1,77 @@
plugins {
id 'fabric-loom' version '0.12-SNAPSHOT'
id 'maven-publish'
id "dev.architectury.loom" version "0.12.0-SNAPSHOT"
id "maven-publish"
}

sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories.
loom {
forge {
mixinConfigs = [
"fastload.mixins.json"
]
}

launches {
data {
arg "--existing", file("src/main/resources").absolutePath
}
}
}

dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
repositories {}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
forge "net.minecraftforge:forge:${project.forge_version}"
}

processResources {
inputs.property "version", project.version

filesMatching("fabric.mod.json") {
expand "version": project.version
}
inputs.property "version", project.version
filesMatching("META-INF/mods.toml") {
expand "version": project.version
}
}

tasks.withType(JavaCompile).configureEach {
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
options.release = 17
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
}
//java {
//withSourcesJar()
//}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
manifest {
attributes([
"Specification-Title" : project.mod_id,
"Specification-Vendor" : project.mod_author,
"Specification-Version" : "1",
"Implementation-Title" : project.name,
"Implementation-Version" : version,
"Implementation-Vendor" : project.mod_author,
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}

// configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
publications {
mavenJava(MavenPublication) {
artifact(remapJar) {
builtBy remapJar
}
//artifact(sourcesJar) {
// builtBy remapSourcesJar
//}
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
repositories {}
}
19 changes: 10 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx1G
loom.platform=forge

# Fabric Properties
minecraft_version=1.19
yarn_mappings=1.19+build.2
loader_version=0.14.7
minecraft_version=1.18.2
forge_version=1.18.2-40.1.31
yarn_mappings=1.18.2+build.3

# Mod Properties
mod_version = 1.0.6+1.19
maven_group = io.github.bumblesoftware.fastload
archives_base_name = Fastload

mod_version=1.0.6+1.18.2
maven_group=com.abdelaziz333.fastload
archives_base_name=Fastload-Reforged
mod_id=fastload
mod_author=AbdElAziz333
10 changes: 5 additions & 5 deletions gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

178 changes: 89 additions & 89 deletions gradlew.bat

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 3 additions & 5 deletions settings.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
pluginManagement {
repositories {
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
mavenCentral()
maven { url "https://maven.fabricmc.net/" }
maven { url "https://maven.architectury.dev/" }
maven { url "https://files.minecraftforge.net/maven/" }
gradlePluginPortal()
}
}
10 changes: 10 additions & 0 deletions src/main/java/com/abdelaziz333/fastload/FastLoad.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.abdelaziz333.fastload;

import net.minecraftforge.fml.common.Mod;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Mod("fastload")
public class FastLoad {
public static final Logger LOGGER = LoggerFactory.getLogger("Fastload");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.abdelaziz333.fastload.mixin;

import net.minecraft.client.gui.screen.DownloadingTerrainScreen;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;


@Mixin(DownloadingTerrainScreen.class)
public class DownloadingTerrainScreenMixin {

//Code is from 'kennytv'. All credits are to this person. This is not our code.
//Permission granted to do so from MIT License of 'forcecloseloadingscreen'.

@Shadow private boolean closeOnNextTick;

@Inject(at = @At("HEAD"), method = "setReady")
public void tick(final CallbackInfo ci) {
this.closeOnNextTick = true;
}
}
Loading