Skip to content

Commit 5d3686e

Browse files
committed
Release 2.1
1 parent 7d98a88 commit 5d3686e

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

CHANGELOG.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
- Rebranded to Skyboxify
2-
- Added Skyboxes Debug Screen to view all active skyboxes data/each layer (Accessible via ``/skyboxify debug``)
3-
- Reworked sky loading/handling
4-
- Reworked rendering/mixins code a bit
5-
- Fixed many bugs w/ loading/rendering
1+
- NOTE: Your config will most likely reset as the file name has been changed!
2+
- Fix modmenu issue again
3+
- Fix config not loading/saving
4+
- Rework how MCPatcher/OptiFine skies are handled (respective config settings have been removed as its auto-handled now)
5+
- If both "optifine" and "mcpatcher" folders exist in a pack and both have a sky folder, the "optifine" folder will always take priority and be the only one loaded, otherwise it'll try to load from "mcpatcher" folder instead.
6+
- NOTE: Pack order does not affect any of this.
7+
- Updated debug screen with new scrollbar/knob texture & update cursor type in 1.21.9+

src/main/java/btw/lowercase/skyboxify/skybox/SkyboxResourceHelper.java

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,13 @@ public class SkyboxResourceHelper implements
9898
skyPattern = MCPATCHER_SKY_PATTERN;
9999
}
100100

101-
this.parseSkyboxesInPack(pack, (skyPattern == OPTIFINE_SKY_PATTERN ? optifineSkies : mcpatcherSkies), skyPattern);
101+
final List<ResourceLocation> skies = (skyPattern == OPTIFINE_SKY_PATTERN ? optifineSkies : mcpatcherSkies);
102+
if (!skies.isEmpty()) {
103+
final int count = this.parseSkyboxesInPack(pack, skies, skyPattern);
104+
if (count > 0) {
105+
LOGGER.info("Loaded {} {} from \"{}\"!", count, (count == 1 ? "skies" : "sky"), pack.packId());
106+
}
107+
}
102108
});
103109
}
104110
}).thenCompose(preparationBarrier::wait);
@@ -119,10 +125,9 @@ public ResourceLocation getFabricId() {
119125
}
120126
*///?}
121127

122-
private void parseSkyboxesInPack(final PackResources packResources, final List<ResourceLocation> skies, final Pattern skyPattern) {
123-
if (skies.isEmpty()) return;
124-
128+
private int parseSkyboxesInPack(final PackResources packResources, final List<ResourceLocation> skies, final Pattern skyPattern) {
125129
final Map<String, JsonArray> layers = new HashMap<>();
130+
int count = 0;
126131
skies.forEach(id -> {
127132
final Matcher matcher = skyPattern.matcher(id.getPath());
128133
if (!matcher.find()) {
@@ -177,8 +182,11 @@ private void parseSkyboxesInPack(final PackResources packResources, final List<R
177182
});
178183
skyboxJson.add("layers", skyLayers);
179184
SkyboxManager.INSTANCE.addSkybox(Skybox.CODEC.decode(JsonOps.INSTANCE, skyboxJson).getOrThrow().getFirst());
185+
count++;
180186
}
181187
}
188+
189+
return count;
182190
}
183191

184192
private static Comparator<ResourceLocation> compareLocations(final Pattern pattern) {

0 commit comments

Comments
 (0)