Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit a0a4691

Browse files
committed
actually load the blend modes
1 parent b72ecc5 commit a0a4691

File tree

6 files changed

+42
-330
lines changed

6 files changed

+42
-330
lines changed

src/main/java/io/github/axolotlclient/modules/sky/FSBSkyboxInstance.java

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,20 @@ public class FSBSkyboxInstance extends SkyboxInstance{
2323

2424
public FSBSkyboxInstance(JsonObject json){
2525
super(json);
26-
JsonObject props = json.get("properties").getAsJsonObject();
27-
JsonObject textures = json.get("textures").getAsJsonObject();
28-
this.textures[0] = new Identifier(textures.get("bottom").getAsString());
29-
this.textures[1] = new Identifier(textures.get("north").getAsString());
30-
this.textures[2] = new Identifier(textures.get("south").getAsString());
31-
this.textures[3] = new Identifier(textures.get("top").getAsString());
32-
this.textures[4] = new Identifier(textures.get("east").getAsString());
33-
this.textures[5] = new Identifier(textures.get("west").getAsString());
34-
this.fade[0] = props.get("fade").getAsJsonObject().get("startFadeIn").getAsInt();
35-
this.fade[1] = props.get("fade").getAsJsonObject().get("endFadeIn").getAsInt();
36-
this.fade[2] = props.get("fade").getAsJsonObject().get("startFadeOut").getAsInt();
37-
this.fade[3] = props.get("fade").getAsJsonObject().get("endFadeOut").getAsInt();
26+
JsonObject props = json.get("properties").getAsJsonObject();
27+
JsonObject textures = json.get("textures").getAsJsonObject();
28+
this.textures[0] = new Identifier(textures.get("bottom").getAsString());
29+
this.textures[1] = new Identifier(textures.get("north").getAsString());
30+
this.textures[2] = new Identifier(textures.get("south").getAsString());
31+
this.textures[3] = new Identifier(textures.get("top").getAsString());
32+
this.textures[4] = new Identifier(textures.get("east").getAsString());
33+
this.textures[5] = new Identifier(textures.get("west").getAsString());
34+
this.fade[0] = props.get("fade").getAsJsonObject().get("startFadeIn").getAsInt();
35+
this.fade[1] = props.get("fade").getAsJsonObject().get("endFadeIn").getAsInt();
36+
this.fade[2] = props.get("fade").getAsJsonObject().get("startFadeOut").getAsInt();
37+
this.fade[3] = props.get("fade").getAsJsonObject().get("endFadeOut").getAsInt();
38+
39+
this.blendMode = parseBlend(props.get("blend").getAsJsonObject().get("type").getAsString());
3840
}
3941

4042
@Override

src/main/java/io/github/axolotlclient/modules/sky/MCPSkyboxInstance.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public MCPSkyboxInstance(JsonObject json){
2121
this.fade[1] = json.get("endFadeIn").getAsInt();
2222
this.fade[2] = json.get("startFadeOut").getAsInt();
2323
this.fade[3] = json.get("endFadeOut").getAsInt();
24+
this.blendMode=parseBlend(json.get("blend").getAsString());
2425
}
2526

2627
@Override

src/main/java/io/github/axolotlclient/modules/sky/SkyLoadingScreen.java

Lines changed: 0 additions & 295 deletions
This file was deleted.

src/main/java/io/github/axolotlclient/modules/sky/SkyResourceManager.java

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -72,29 +72,32 @@ public static void loadMCPSky(ResourcePack pack, String loader){
7272
int endFadeIn = 0;
7373
int startFadeOut= 0;
7474
int endFadeOut = 0;
75+
String blend="alpha";
7576
InputStream stream = pack.open(ResourceType.CLIENT_RESOURCES, new Identifier("minecraft", loader + "/sky/world0/sky" + i + ".properties"));
7677

7778
BufferedReader reader = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8));
7879
String string;
79-
while((string = reader.readLine()) != null ){
80-
try{
81-
String[] option = string.split("=");
82-
if(option[0].equals("source"))source= loader+"/sky/world0/"+option[1].split("/")[1];
83-
if(option[0].equals("startFadeIn"))startFadeIn= Integer.parseInt(option[1].split(":")[0]+option[1].split(":")[1]);
84-
if(option[0].equals("endFadeIn"))endFadeIn= Integer.parseInt(option[1].split(":")[0]+option[1].split(":")[1]);
85-
if(option[0].equals("startFadeOut"))startFadeOut= Integer.parseInt(option[1].split(":")[0]+option[1].split(":")[1]);
86-
if(option[0].equals("endFadeOut"))endFadeOut= Integer.parseInt(option[1].split(":")[0]+option[1].split(":")[1]);
80+
while((string = reader.readLine()) != null ){
81+
try{
82+
String[] option = string.split("=");
83+
if(option[0].equals("source"))source= loader+"/sky/world0/"+option[1].split("/")[1];
84+
if(option[0].equals("startFadeIn"))startFadeIn= Integer.parseInt(option[1].split(":")[0]+option[1].split(":")[1]);
85+
if(option[0].equals("endFadeIn"))endFadeIn= Integer.parseInt(option[1].split(":")[0]+option[1].split(":")[1]);
86+
if(option[0].equals("startFadeOut"))startFadeOut= Integer.parseInt(option[1].split(":")[0]+option[1].split(":")[1]);
87+
if(option[0].equals("endFadeOut"))endFadeOut= Integer.parseInt(option[1].split(":")[0]+option[1].split(":")[1]);
88+
if(option[0].equals("blend")) blend=option[1];
8789

8890

89-
} catch (Exception ignored){}
90-
}
91-
String text = "{" +
92-
"\"source\":\"" +source+ "\", " +
93-
"\"startFadeIn\":"+startFadeIn/2+", " +
94-
"\"endFadeIn\":"+endFadeIn/2+", " +
95-
"\"startFadeOut\":"+startFadeOut/2+", " +
96-
"\"endFadeOut\":"+endFadeOut/2+
97-
"}";
91+
} catch (Exception ignored){}
92+
}
93+
String text = "{" +
94+
"\"source\":\"" +source+ "\", " +
95+
"\"startFadeIn\":"+startFadeIn/2+", " +
96+
"\"endFadeIn\":"+endFadeIn/2+", " +
97+
"\"startFadeOut\":"+startFadeOut/2+", " +
98+
"\"endFadeOut\":"+endFadeOut/2+", " +
99+
"\"blend\":\""+blend+ "\""+
100+
"}";
98101
JsonObject object = gson.fromJson(text, JsonObject.class);
99102
if(!source.contains("sunflare")) SkyboxManager.getInstance().addSkybox(new MCPSkyboxInstance(object));
100103
} catch (IOException e) {

src/main/java/io/github/axolotlclient/modules/sky/SkyboxInstance.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ protected void setupBlend(float brightness){
169169
}
170170

171171
protected void clearBlend(float brightness){
172-
//RenderSystem.disableAlphaTest();
173172
RenderSystem.enableBlend();
174173
RenderSystem.blendFunc(770, 1);
175174
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, brightness);

0 commit comments

Comments
 (0)