Merge pull request 'Title panorama on 1.21.6+, and Fabric Loader 0.19.5 everywhere' (#34) from panorama-1.21.6 into master
Reviewed-on: #34
This commit was merged in pull request #34.
This commit is contained in:
@@ -14,6 +14,12 @@ import net.minecraft.client.gui.CubeMapRenderer;
|
|||||||
import net.minecraft.client.gui.DrawContext;
|
import net.minecraft.client.gui.DrawContext;
|
||||||
import net.minecraft.client.gui.RotatingCubeMapRenderer;
|
import net.minecraft.client.gui.RotatingCubeMapRenderer;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
import net.minecraft.client.gui.screen.Screen;
|
||||||
|
//? if >=1.21.6 {
|
||||||
|
import net.minecraft.client.texture.CubemapTexture;
|
||||||
|
//?} else {
|
||||||
|
/*import net.minecraft.client.texture.ResourceTexture;
|
||||||
|
import net.minecraft.client.texture.TextureManager;
|
||||||
|
*///?}
|
||||||
//? if >=1.21.9
|
//? if >=1.21.9
|
||||||
import net.minecraft.client.input.KeyInput;
|
import net.minecraft.client.input.KeyInput;
|
||||||
//? if <1.21.6 {
|
//? if <1.21.6 {
|
||||||
@@ -21,8 +27,6 @@ import net.minecraft.client.input.KeyInput;
|
|||||||
import net.minecraft.client.render.DefaultFramebufferSet;
|
import net.minecraft.client.render.DefaultFramebufferSet;
|
||||||
import net.minecraft.client.util.Pool;
|
import net.minecraft.client.util.Pool;
|
||||||
*///?}
|
*///?}
|
||||||
import net.minecraft.client.texture.ResourceTexture;
|
|
||||||
import net.minecraft.client.texture.TextureManager;
|
|
||||||
import net.minecraft.text.Text;
|
import net.minecraft.text.Text;
|
||||||
import net.minecraft.util.Identifier;
|
import net.minecraft.util.Identifier;
|
||||||
|
|
||||||
@@ -41,14 +45,25 @@ public class SaturnScreenFabric extends Screen implements ScreenProvider {
|
|||||||
//private final Pool pool = new Pool(3);
|
//private final Pool pool = new Pool(3);
|
||||||
public final SaturnScreen screen;
|
public final SaturnScreen screen;
|
||||||
|
|
||||||
|
/** Whether the panorama's textures are loaded; it isn't drawn before (e.g. under the splash). */
|
||||||
|
private static volatile boolean panoramaReady = false;
|
||||||
|
|
||||||
public static void preload(MinecraftClient client) {
|
public static void preload(MinecraftClient client) {
|
||||||
TextureManager textureManager = client.getTextureManager();
|
//? if >=1.21.6 {
|
||||||
|
// From 1.21.6 CubeMapRenderer draws from one cube map texture made of panorama_0..5.png.
|
||||||
|
// CubeMapRenderer.registerTextures only stores it for the next resource reload, which has
|
||||||
|
// already happened by now, so register it through the overload that loads it right away.
|
||||||
|
client.getTextureManager().registerTexture(PANORAMA, new CubemapTexture(PANORAMA));
|
||||||
|
//?} else {
|
||||||
|
/*TextureManager textureManager = client.getTextureManager();
|
||||||
for (int i = 0; i < 6; i++) {
|
for (int i = 0; i < 6; i++) {
|
||||||
String var10001 = PANORAMA.getPath();
|
String var10001 = PANORAMA.getPath();
|
||||||
Identifier tex = PANORAMA.withPath(var10001 + "_" + i + ".png");
|
Identifier tex = PANORAMA.withPath(var10001 + "_" + i + ".png");
|
||||||
ResourceTexture resourceTexture = new ResourceTexture(tex);
|
ResourceTexture resourceTexture = new ResourceTexture(tex);
|
||||||
textureManager.registerTexture(tex, resourceTexture);
|
textureManager.registerTexture(tex, resourceTexture);
|
||||||
}
|
}
|
||||||
|
*///?}
|
||||||
|
panoramaReady = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public SaturnScreenFabric(SaturnScreen screen) {
|
public SaturnScreenFabric(SaturnScreen screen) {
|
||||||
@@ -74,13 +89,18 @@ public class SaturnScreenFabric extends Screen implements ScreenProvider {
|
|||||||
mouseX *= 2;
|
mouseX *= 2;
|
||||||
mouseY *= 2;
|
mouseY *= 2;
|
||||||
|
|
||||||
// TODO: the panorama and the background blur (screen.backgroundBlur) are only drawn before
|
// From 1.21.6 the panorama renderer has no opacity (and takes no delta), so it's drawn fully
|
||||||
// 1.21.6 so far. See also issue #23.
|
// opaque there.
|
||||||
if (client.world == null && client.getCurrentServerEntry() == null) {
|
if (panoramaReady && client.world == null && client.getCurrentServerEntry() == null) {
|
||||||
//? if <1.21.6
|
//? if >=1.21.6 {
|
||||||
|
ROTATING_PANORAMA_RENDERER.render(context, this.width, this.height, true);
|
||||||
|
//?} else
|
||||||
//ROTATING_PANORAMA_RENDERER.render(context, this.width, this.height, screen.backgroundOpacity, delta);
|
//ROTATING_PANORAMA_RENDERER.render(context, this.width, this.height, screen.backgroundOpacity, delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: the background blur (screen.backgroundBlur) is only drawn before 1.21.6 so far. See
|
||||||
|
// also issue #23.
|
||||||
|
|
||||||
//? if <1.21.6 {
|
//? if <1.21.6 {
|
||||||
/*PostEffectProcessor postEffectProcessor = this.client.getShaderLoader().loadPostEffect(
|
/*PostEffectProcessor postEffectProcessor = this.client.getShaderLoader().loadPostEffect(
|
||||||
Identifier.ofVanilla("blur"),
|
Identifier.ofVanilla("blur"),
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ org.gradle.configuration-cache=false
|
|||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.21.10
|
minecraft_version=1.21.10
|
||||||
yarn_mappings=1.21.10+build.3
|
yarn_mappings=1.21.10+build.3
|
||||||
loader_version=0.19.0
|
loader_version=0.19.5
|
||||||
|
|
||||||
fabric_api_version=0.138.4+1.21.10
|
fabric_api_version=0.138.4+1.21.10
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ org.gradle.configuration-cache=false
|
|||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.21.11
|
minecraft_version=1.21.11
|
||||||
yarn_mappings=1.21.11+build.4
|
yarn_mappings=1.21.11+build.4
|
||||||
loader_version=0.19.0
|
loader_version=0.19.5
|
||||||
|
|
||||||
fabric_api_version=0.141.3+1.21.11
|
fabric_api_version=0.141.3+1.21.11
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ org.gradle.configuration-cache=false
|
|||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.21.4
|
minecraft_version=1.21.4
|
||||||
yarn_mappings=1.21.4+build.8
|
yarn_mappings=1.21.4+build.8
|
||||||
loader_version=0.18.4
|
loader_version=0.19.5
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
maven_group=org.saturnclient
|
maven_group=org.saturnclient
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ org.gradle.configuration-cache=false
|
|||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.21.5
|
minecraft_version=1.21.5
|
||||||
yarn_mappings=1.21.5+build.1
|
yarn_mappings=1.21.5+build.1
|
||||||
loader_version=0.18.4
|
loader_version=0.19.5
|
||||||
|
|
||||||
fabric_api_version=0.128.2+1.21.5
|
fabric_api_version=0.128.2+1.21.5
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ org.gradle.configuration-cache=false
|
|||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.21.6
|
minecraft_version=1.21.6
|
||||||
yarn_mappings=1.21.6+build.1
|
yarn_mappings=1.21.6+build.1
|
||||||
loader_version=0.18.5
|
loader_version=0.19.5
|
||||||
|
|
||||||
fabric_api_version=0.128.2+1.21.6
|
fabric_api_version=0.128.2+1.21.6
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ org.gradle.configuration-cache=false
|
|||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.21.7
|
minecraft_version=1.21.7
|
||||||
yarn_mappings=1.21.7+build.8
|
yarn_mappings=1.21.7+build.8
|
||||||
loader_version=0.19.0
|
loader_version=0.19.5
|
||||||
|
|
||||||
fabric_api_version=0.129.0+1.21.7
|
fabric_api_version=0.129.0+1.21.7
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ org.gradle.configuration-cache=false
|
|||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.21.8
|
minecraft_version=1.21.8
|
||||||
yarn_mappings=1.21.8+build.1
|
yarn_mappings=1.21.8+build.1
|
||||||
loader_version=0.19.0
|
loader_version=0.19.5
|
||||||
|
|
||||||
fabric_api_version=0.136.1+1.21.8
|
fabric_api_version=0.136.1+1.21.8
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ org.gradle.configuration-cache=false
|
|||||||
# check these on https://fabricmc.net/develop
|
# check these on https://fabricmc.net/develop
|
||||||
minecraft_version=1.21.9
|
minecraft_version=1.21.9
|
||||||
yarn_mappings=1.21.9+build.1
|
yarn_mappings=1.21.9+build.1
|
||||||
loader_version=0.19.0
|
loader_version=0.19.5
|
||||||
|
|
||||||
fabric_api_version=0.134.1+1.21.9
|
fabric_api_version=0.134.1+1.21.9
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user