generated from FabricMC/fabric-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
26 changed files
with
313 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
common/src/main/java/com/minenash/seamless_loading_screen/mixin/LevelLoadingScreenMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...a/com/minenash/seamless_loading_screen/mixin/custom_screenshots/AddServerScreenMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
forge/src/main/java/com/minenash/seamless_loading_screen/forge/PlatformFunctionsImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...in/java/com/minenash/seamless_loading_screen/forge/SeamlessLoadingScreenClientEvents.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../src/main/java/com/minenash/seamless_loading_screen/forge/SeamlessLoadingScreenForge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...main/java/com/minenash/seamless_loading_screen/forge/SeamlessLoadingScreenShaderInit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
forge/src/main/resources/seamless_loading_screen-forge.mixins.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
# Done to increase the memory available to gradle. | ||
org.gradle.jvmargs=-Xmx4G | ||
# Mod Properties | ||
mod_version=2.1.1+1.20.2 | ||
mod_version=2.1.1+1.20.4 | ||
maven_group=com.minenash | ||
archives_base_name=seamless-loading-screen | ||
# Common Properties | ||
minecraft_version=1.20.2 | ||
enabled_platforms=fabric,forge | ||
yarn_mappings=1.20.2+build.4 | ||
yacl_version=3.2.1+1.20.2 | ||
minecraft_version=1.20.4 | ||
enabled_platforms=fabric,neoforge | ||
yarn_mappings=1.20.4+build.3 | ||
yacl_version=3.3.1+1.20.4 | ||
|
||
# Fabric | ||
fabric_loader_version=0.14.23 | ||
fabric_api_version=0.90.0+1.20.2 | ||
modmenu_version=8.0.0 | ||
fabric_loader_version=0.15.3 | ||
fabric_api_version=0.92.0+1.20.4 | ||
|
||
modmenu_version=9.0.0 | ||
bedrockify_version=1.9.1+mc1.20.2 | ||
|
||
# NeoForge | ||
neoforge_version=20.4.46-beta | ||
|
||
# Forge | ||
forge_version=1.20.2-48.0.13 | ||
forge_version=1.20.4-49.0.12 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-8.1-bin.zip | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
zipStorePath=wrapper/dists |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
plugins { | ||
id "com.github.johnrengelman.shadow" version "7.1.2" | ||
} | ||
|
||
repositories { | ||
maven { url = 'https://maven.neoforged.net/releases/' } | ||
} | ||
|
||
architectury { | ||
platformSetupLoomIde() | ||
neoForge() | ||
} | ||
|
||
loom { | ||
accessWidenerPath = project(":common").loom.accessWidenerPath | ||
|
||
neoForge { | ||
// convertAccessWideners = true | ||
// extraAccessWideners.add loom.accessWidenerPath.get().asFile.name | ||
// | ||
// mixinConfig "seamless_loading_screen-common.mixins.json" | ||
// mixinConfig "seamless_loading_screen-neoForge.mixins.json" | ||
} | ||
} | ||
|
||
configurations { | ||
common | ||
shadowCommon // Don't use shadow from the shadow plugin since it *excludes* files. | ||
compileClasspath.extendsFrom common | ||
runtimeClasspath.extendsFrom common | ||
developmentNeoForge.extendsFrom common | ||
} | ||
|
||
dependencies { | ||
neoForge "net.neoforged:neoforge:${rootProject.neoforge_version}" | ||
|
||
//modLocalRuntime ("maven.modrinth:fastload:mc1.20.1-3.4.0") | ||
//modLocalRuntime ("maven.modrinth:rubidium:0.7.0a") | ||
//modCompileOnly ("maven.modrinth:rubidium:0.7.0a") | ||
|
||
modImplementation("dev.isxander.yacl:yet-another-config-lib-neoforge:${rootProject.yacl_version}"){ | ||
transitive = false | ||
} | ||
//include "dev.isxander.yacl:yet-another-config-lib-neoforge:${rootProject.yacl_version}" | ||
|
||
common(project(path: ":common", configuration: "namedElements")) { transitive false } | ||
shadowCommon(project(path: ":common", configuration: "transformProductionNeoForge")) { transitive = false } | ||
} | ||
|
||
processResources { | ||
inputs.property "version", project.version | ||
|
||
filesMatching("META-INF/mods.toml") { | ||
expand "version": project.version | ||
} | ||
} | ||
|
||
shadowJar { | ||
exclude "fabric.mod.json" | ||
exclude "architectury.common.json" | ||
|
||
configurations = [project.configurations.shadowCommon] | ||
archiveClassifier.set "dev-shadow" | ||
} | ||
|
||
remapJar { | ||
input.set shadowJar.archiveFile | ||
dependsOn shadowJar | ||
archiveClassifier.set "neoforge" | ||
|
||
atAccessWideners.add(loom.accessWidenerPath.get().asFile.name)//atAccessWideners.add('my_mod.accesswidener') | ||
} | ||
|
||
jar { | ||
archiveClassifier.set "dev" | ||
} | ||
|
||
sourcesJar { | ||
def commonSources = project(":common").sourcesJar | ||
dependsOn commonSources | ||
from commonSources.archiveFile.map { zipTree(it) } | ||
} | ||
|
||
components.java { | ||
withVariantsFromConfiguration(project.configurations.shadowRuntimeElements) { | ||
skip() | ||
} | ||
} | ||
|
||
publishing { | ||
publications { | ||
mavenForge(MavenPublication) { | ||
artifactId = rootProject.archives_base_name + "-" + project.name | ||
from components.java | ||
} | ||
} | ||
|
||
// 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. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
loom.platform=neoforge |
31 changes: 31 additions & 0 deletions
31
...ge/src/main/java/com/minenash/seamless_loading_screen/neoforge/PlatformFunctionsImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package com.minenash.seamless_loading_screen.neoforge; | ||
|
||
import com.minenash.seamless_loading_screen.PlatformFunctions; | ||
import net.neoforged.fml.loading.FMLLoader; | ||
import net.neoforged.fml.loading.FMLPaths; | ||
|
||
import java.nio.file.Path; | ||
|
||
public class PlatformFunctionsImpl { | ||
|
||
/** | ||
* This is our actual method to {@link PlatformFunctions#getConfigDirectory()}. | ||
*/ | ||
public static Path getConfigDirectory() { | ||
return FMLPaths.CONFIGDIR.get(); | ||
} | ||
|
||
public static boolean isClientEnv() { | ||
return FMLLoader.getDist().isClient(); | ||
} | ||
|
||
//-- | ||
|
||
public static Path getGameDir() { | ||
return FMLLoader.getGamePath(); | ||
} | ||
|
||
public static boolean isDevEnv() { | ||
return !FMLLoader.isProduction(); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
...java/com/minenash/seamless_loading_screen/neoforge/SeamlessLoadingScreenClientEvents.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.minenash.seamless_loading_screen.neoforge; | ||
|
||
import com.minenash.seamless_loading_screen.SeamlessLoadingScreen; | ||
import com.minenash.seamless_loading_screen.config.SeamlessLoadingScreenConfig; | ||
import net.neoforged.api.distmarker.Dist; | ||
import net.neoforged.bus.api.SubscribeEvent; | ||
import net.neoforged.fml.ModList; | ||
import net.neoforged.fml.common.Mod; | ||
import net.neoforged.fml.event.lifecycle.FMLClientSetupEvent; | ||
import net.neoforged.neoforge.client.ConfigScreenHandler; | ||
|
||
@Mod.EventBusSubscriber(modid = SeamlessLoadingScreen.MODID, bus = Mod.EventBusSubscriber.Bus.MOD, value = Dist.CLIENT) | ||
public class SeamlessLoadingScreenClientEvents { | ||
|
||
@SubscribeEvent | ||
public static void onPostInit(FMLClientSetupEvent event) { | ||
ModList.get().getModContainerById(SeamlessLoadingScreen.MODID).ifPresent(modContainer -> { | ||
modContainer.registerExtensionPoint(ConfigScreenHandler.ConfigScreenFactory.class, () -> | ||
new ConfigScreenHandler.ConfigScreenFactory((client, parent) -> SeamlessLoadingScreenConfig.getInstance().generateScreen(parent))); | ||
}); | ||
} | ||
} | ||
|
26 changes: 26 additions & 0 deletions
26
...c/main/java/com/minenash/seamless_loading_screen/neoforge/SeamlessLoadingScreenForge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.minenash.seamless_loading_screen.neoforge; | ||
|
||
import com.minenash.seamless_loading_screen.SeamlessLoadingScreen; | ||
import net.neoforged.api.distmarker.Dist; | ||
import net.neoforged.bus.api.IEventBus; | ||
import net.neoforged.fml.IExtensionPoint; | ||
import net.neoforged.fml.ModLoadingContext; | ||
import net.neoforged.fml.common.Mod; | ||
|
||
|
||
@Mod(SeamlessLoadingScreen.MODID) | ||
public class SeamlessLoadingScreenForge { | ||
|
||
public SeamlessLoadingScreenForge(IEventBus modEventBus, Dist dist) { | ||
//Is this needed? | ||
ModLoadingContext.get() | ||
.registerExtensionPoint( | ||
IExtensionPoint.DisplayTest.class, | ||
() -> new IExtensionPoint.DisplayTest(() -> IExtensionPoint.DisplayTest.IGNORESERVERONLY, (remote, server) -> true) | ||
); | ||
|
||
if(dist.isClient()){ | ||
SeamlessLoadingScreen.onInitializeClient(); | ||
} | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
...n/java/com/minenash/seamless_loading_screen/neoforge/SeamlessLoadingScreenShaderInit.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.minenash.seamless_loading_screen.neoforge; | ||
|
||
import com.minenash.seamless_loading_screen.SeamlessLoadingScreen; | ||
import com.mojang.logging.LogUtils; | ||
import net.minecraft.client.gl.ShaderProgram; | ||
import net.minecraft.client.render.VertexFormats; | ||
import net.minecraft.util.Identifier; | ||
import net.neoforged.api.distmarker.Dist; | ||
import net.neoforged.bus.api.SubscribeEvent; | ||
import net.neoforged.fml.common.Mod; | ||
import net.neoforged.neoforge.client.event.RegisterShadersEvent; | ||
import org.slf4j.Logger; | ||
|
||
import java.io.IOException; | ||
|
||
@Mod.EventBusSubscriber(modid = SeamlessLoadingScreen.MODID, value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD) | ||
public class SeamlessLoadingScreenShaderInit { | ||
|
||
public static Logger LOGGER = LogUtils.getLogger(); | ||
|
||
// public static void init(IEventBus bus){ | ||
// bus.addListener(SeamlessLoadingScreenShaderInit::registerShaders); | ||
// } | ||
|
||
@SubscribeEvent | ||
public static void registerShaders(RegisterShadersEvent event) { | ||
try { | ||
event.registerShader(new ShaderProgram(event.getResourceProvider(), new Identifier(SeamlessLoadingScreen.MODID, "blur"), VertexFormats.POSITION), (shaderProgram) -> { | ||
SeamlessLoadingScreen.BLUR_PROGRAM.load(shaderProgram); | ||
}); | ||
} catch (IOException e) { | ||
LOGGER.error("[SeamlessLoadingScreenShaderInit] An issue with loading the needed shader files has failed, blur will not be working!", e); | ||
} | ||
} | ||
} |
Oops, something went wrong.