Skip to content

Commit 95df884

Browse files
authored
Merge pull request #83 from litetex-oss/dev
Release
2 parents bb5eb75 + 7bcaf1c commit 95df884

19 files changed

+82
-215
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 2.1.0
2+
* Fixed mod configuration button not being displayed correctly in Skin Customization Screen when resizing #79
3+
* Fully utilize fabric-api. fabric-api is now required #78
4+
* Now targeting 1.21.7
5+
16
# 2.0.1
27
* Use built-in warning icon instead of bringing a custom one #66
38
* Also publish to CurseForge #62

build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ plugins {
99
}
1010

1111
ext {
12-
checkstyleVersion = '10.25.1'
12+
checkstyleVersion = '10.26.1'
1313

14-
pmdVersion = '7.14.0'
14+
pmdVersion = '7.15.0'
1515

1616
// Derive version from yarn
1717
minecraft_version = project.yarn_mappings.split("\\+")[0]
@@ -85,15 +85,15 @@ dependencies {
8585
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
8686
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
8787
// Required when translations and icons should be loaded correctly
88-
modImplementation "net.fabricmc.fabric-api:fabric-api:0.127.1+1.21.6"
88+
modImplementation "net.fabricmc.fabric-api:fabric-api:0.128.2+1.21.7"
8989

9090
modCompileOnly "com.terraformersmc:modmenu:${project.modmenu_version}"
9191

9292
// Only needed during development
9393
modLocalRuntime "com.terraformersmc:modmenu:${project.modmenu_version}"
94-
modLocalRuntime "net.fabricmc.fabric-api:fabric-api:0.127.1+1.21.6"
94+
modLocalRuntime "net.fabricmc.fabric-api:fabric-api:0.128.2+1.21.7"
9595
modLocalRuntime "me.djtheredstoner:DevAuth-fabric:1.2.1"
96-
// modLocalRuntime "maven.modrinth:no-chat-reports:Fabric-1.21.4-v2.11.0"
96+
modLocalRuntime "maven.modrinth:no-chat-reports:Fabric-1.21.7-v2.14.0"
9797
}
9898

9999
processResources {
@@ -201,7 +201,7 @@ modrinth {
201201
syncBodyFrom = rootProject.file("README.md").text
202202
changelog = System.getenv("MODRINTH_CHANGELOG_TEXT")
203203
dependencies {
204-
optional.project 'fabric-api'
204+
required.project 'fabric-api'
205205
optional.project 'modmenu'
206206
incompatible.project 'capes'
207207
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Done to increase the memory available to gradle.
22
org.gradle.jvmargs=-Xmx2G
33
# Fabric Properties
4-
yarn_mappings=1.21.6+build.1
4+
yarn_mappings=1.21.7+build.6
55
loader_version=0.16.14
66
# Mod Properties
7-
mod_version=2.0.2-SNAPSHOT
7+
mod_version=2.1.0-SNAPSHOT
88
maven_group=net.litetex.mcm
99
archives_base_name=cape-provider
1010
mod_name=Cape Provider

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

src/main/java/net/litetex/capes/CapesMixinPlugin.java

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

src/main/java/net/litetex/capes/fabric/FabricCapes.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@
1212
import com.google.gson.GsonBuilder;
1313

1414
import net.fabricmc.api.ClientModInitializer;
15+
import net.fabricmc.fabric.api.client.rendering.v1.SpecialGuiElementRegistry;
1516
import net.fabricmc.loader.api.FabricLoader;
1617
import net.litetex.capes.Capes;
1718
import net.litetex.capes.config.Config;
19+
import net.litetex.capes.menu.preview.render.PlayerDisplayGuiElementRenderer;
1820
import net.litetex.capes.provider.CapeProviders;
1921

2022

@@ -27,7 +29,7 @@ public class FabricCapes implements ClientModInitializer
2729
@Override
2830
public void onInitializeClient()
2931
{
30-
FabricCapesCompatibilityInit.init();
32+
SpecialGuiElementRegistry.register(ctx -> new PlayerDisplayGuiElementRenderer(ctx.vertexConsumers()));
3133

3234
final Config config = this.loadConfig();
3335
Capes.setInstance(new Capes(

src/main/java/net/litetex/capes/fabric/FabricCapesCompatibilityInit.java

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

src/main/java/net/litetex/capes/fabric/compat/FabricRenderingApiInitializer.java

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

src/main/java/net/litetex/capes/handler/PlayerCapeHandler.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,11 +260,15 @@ private Optional<IdentifierProvider> registerTexturesAndGetProvider(
260260
final TextureManager textureManager = MinecraftClient.getInstance().getTextureManager();
261261
// Do texturing work NOT on Render thread
262262
CompletableFuture.runAsync(
263-
() -> texturesToRegister.forEach((id, texture) ->
264-
textureManager.registerTexture(
265-
id,
266-
new NativeImageBackedTexture(id::toString, texture))),
267-
MinecraftClient.getInstance());
263+
() -> texturesToRegister.forEach((id, texture) ->
264+
textureManager.registerTexture(
265+
id,
266+
new NativeImageBackedTexture(id::toString, texture))),
267+
MinecraftClient.getInstance())
268+
.exceptionally(ex -> {
269+
LOG.warn("Failed to register textures", ex);
270+
return null;
271+
});
268272

269273
return Optional.of(texturesToRegister.size() == 1
270274
? new DefaultIdentifierProvider(texturesToRegister.keySet().iterator().next())

src/main/java/net/litetex/capes/handler/PlayerCapeHandlerManager.java

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import net.litetex.capes.Capes;
2121
import net.litetex.capes.provider.CapeProvider;
2222
import net.litetex.capes.util.GameProfileUtil;
23+
import net.minecraft.util.logging.UncaughtExceptionHandler;
2324

2425

2526
@SuppressWarnings({"checkstyle:MagicNumber", "PMD.GodClass"})
@@ -51,6 +52,7 @@ public Thread newThread(@NotNull final Runnable r)
5152
final Thread thread = new Thread(r);
5253
thread.setName("Cape-" + COUNTER.getAndIncrement());
5354
thread.setDaemon(true);
55+
thread.setUncaughtExceptionHandler(new UncaughtExceptionHandler(LOG));
5456
return thread;
5557
}
5658
});
@@ -91,8 +93,16 @@ public void onLoadTexture(
9193
{
9294
LOG.debug("onLoadTexture: {}/{} validate={}", profile.getName(), profile.getId(), validateProfile);
9395
}
94-
this.loadExecutors.submit(() ->
95-
this.onLoadTextureInternalAsync(profile, validateProfile, capeProviders, onAfterLoaded));
96+
this.loadExecutors.submit(() -> {
97+
try
98+
{
99+
this.onLoadTextureInternalAsync(profile, validateProfile, capeProviders, onAfterLoaded);
100+
}
101+
catch(final Exception ex)
102+
{
103+
LOG.warn("Failed to async load texture for {}/{}", profile.getName(), profile.getId(), ex);
104+
}
105+
});
96106
}
97107

98108
private void onLoadTextureInternalAsync(

0 commit comments

Comments
 (0)