@@ -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 ) {
0 commit comments