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

Commit bee1b67

Browse files
committed
(1.8.9) fix more custom sky-related bugs
1 parent 753436b commit bee1b67

File tree

5 files changed

+44
-3
lines changed

5 files changed

+44
-3
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright © 2025 moehreag <[email protected]> & Contributors
3+
*
4+
* This file is part of AxolotlClient.
5+
*
6+
* This program is free software; you can redistribute it and/or
7+
* modify it under the terms of the GNU Lesser General Public
8+
* License as published by the Free Software Foundation; either
9+
* version 3 of the License, or (at your option) any later version.
10+
*
11+
* This program is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
* Lesser General Public License for more details.
15+
*
16+
* You should have received a copy of the GNU Lesser General Public License
17+
* along with this program; if not, write to the Free Software Foundation,
18+
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19+
*
20+
* For more information, see the LICENSE file.
21+
*/
22+
23+
package io.github.axolotlclient.mixin;
24+
25+
import java.util.Map;
26+
27+
import net.minecraft.client.render.texture.Texture;
28+
import net.minecraft.client.render.texture.TextureManager;
29+
import net.minecraft.resource.Identifier;
30+
import org.spongepowered.asm.mixin.Mixin;
31+
import org.spongepowered.asm.mixin.gen.Accessor;
32+
33+
@Mixin(TextureManager.class)
34+
public interface TextureManagerAccessor {
35+
36+
@Accessor("textures")
37+
Map<Identifier, Texture> getTextures();
38+
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public class SkyResourceManager extends AbstractModule {
5353

5454
public void reload(ResourceManager resourceManager) {
5555
AxolotlClient.LOGGER.debug("Loading custom skies!");
56-
SkyboxManager.getInstance().clearSkyboxes();
5756
for (Identifier entry : resourceManager
5857
.findResources("fabricskyboxes", "sky", identifier -> identifier.getPath().endsWith(".json"))
5958
.keySet()) {
@@ -140,6 +139,7 @@ private void loadMCPSky(String loader, Identifier id, ResourceManager resourceMa
140139

141140
@Override
142141
public void init() {
142+
ResourceLoaderEvents.START_RESOURCE_RELOAD.register(() -> SkyboxManager.getInstance().clearSkyboxes());
143143
ResourceLoaderEvents.END_RESOURCE_RELOAD.register(() -> reload(Minecraft.getInstance().getResourceManager()));
144144
}
145145
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import com.mojang.blaze3d.vertex.Tessellator;
3333
import com.mojang.blaze3d.vertex.VertexBuffer;
3434
import io.github.axolotlclient.AxolotlClient;
35+
import io.github.axolotlclient.mixin.TextureManagerAccessor;
3536
import io.github.axolotlclient.mixin.WorldRendererAccessor;
3637
import io.github.axolotlclient.util.Util;
3738
import net.minecraft.client.Minecraft;
@@ -341,6 +342,7 @@ public void remove() {
341342
for (Identifier id : textures) {
342343
try {
343344
Minecraft.getInstance().getTextureManager().close(id);
345+
((TextureManagerAccessor)Minecraft.getInstance().getTextureManager()).getTextures().remove(id);
344346
} catch (Exception ignored) {
345347
}
346348
}

1.8.9/src/main/resources/axolotlclient.mixins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
"SoundManagerAccessor",
5656
"SoundSystemAccessor",
5757
"TextRendererMixin",
58+
"TextureManagerAccessor",
5859
"TitleScreenMixin",
5960
"TntEntityRendererMixin",
6061
"VertexBufferMixin",

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ org.gradle.parallel=true
66
axolotlclient.modules.all=true
77

88
# Mod Properties
9-
version=3.1.1-rc.2
9+
version=3.1.1-rc.3
1010

1111
maven_group=io.github.axolotlclient
1212

@@ -31,6 +31,6 @@ fapi_121=0.107.0
3131
fabric_cts8=0.42.0+1.16
3232
osl=0.16.1
3333

34-
legacy_lwgjl3=1.2.1+1.8.9
34+
legacy_lwgjl3=1.2.2+1.8.9
3535

3636
config=3.0.3

0 commit comments

Comments
 (0)