From 9686d62bde4311ad9b0fd974dbeaf57135e311cc Mon Sep 17 00:00:00 2001 From: PepperCode1 <44146161+PepperCode1@users.noreply.github.com> Date: Tue, 7 Jun 2022 21:03:18 -0700 Subject: [PATCH] Finalize 2.0.0 - Remove unnecessary local capture in SpriteAtlasTextureMixin - Remove unused Maven repository - Remove unnecessary TODO - Fix French translation file - Update mod description and README --- README.md | 6 +++--- build.gradle | 3 --- .../continuity/client/mixin/SpriteAtlasTextureMixin.java | 3 +-- .../pepperbell/continuity/client/model/CTMBakedModel.java | 1 - .../continuity/client/resource/CustomBlockLayers.java | 1 + .../continuity/client/resource/EmissiveSuffixLoader.java | 1 + src/main/resources/assets/continuity/lang/fr_fr.json | 4 ++-- src/main/resources/fabric.mod.json | 2 +- 8 files changed, 9 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a3aa8321..f5192786 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,15 @@ # Continuity -Continuity is a Fabric mod built around modern APIs to allow for the most efficient connected textures experience possible. It is designed to provide full Optifine parity for all resource packs that use the Optifine/MCPatcher CTM format. +Continuity is a Fabric mod built around modern APIs to allow for the most efficient connected textures experience possible. It is designed to provide full Optifine parity for all resource packs that use the Optifine CTM format. Continuity also supports Optifine-format emissive textures for block and item models. Continuity depends on the Fabric API and is client-side only. It includes two built-in resource packs - one provides default connected textures, similar to Optifine, and the other provides a fix for glass pane culling. ## Forge Version -Forge version of Continuity will not be made for the following reasons. +A Forge version of Continuity will not be made for the following reasons. - Forge's model API: It is vastly different from Fabric's model API (FRAPI), which is readily utilized by Continuity, and switching to it would not only require an incredible amount of effort, but also result in the mod being extremely inefficient. -- Optifine: Optifine has native support for Forge and provides the same features as Continuity. +- Optifine: It has native support for Forge and provides the same features as Continuity. ### Links diff --git a/build.gradle b/build.gradle index ab4a86c4..9992faf9 100644 --- a/build.gradle +++ b/build.gradle @@ -26,9 +26,6 @@ repositories { name 'Shedaniel' url 'https://maven.shedaniel.me' } - maven { - url 'https://server.bbkr.space/artifactory/libs-release' - } } dependencies { diff --git a/src/main/java/me/pepperbell/continuity/client/mixin/SpriteAtlasTextureMixin.java b/src/main/java/me/pepperbell/continuity/client/mixin/SpriteAtlasTextureMixin.java index 87e6fffa..a2f82f14 100644 --- a/src/main/java/me/pepperbell/continuity/client/mixin/SpriteAtlasTextureMixin.java +++ b/src/main/java/me/pepperbell/continuity/client/mixin/SpriteAtlasTextureMixin.java @@ -13,7 +13,6 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import org.spongepowered.asm.mixin.injection.callback.LocalCapture; import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; @@ -47,7 +46,7 @@ private Identifier getTexturePath(Identifier id) { return null; } - @Inject(method = "loadSprites(Lnet/minecraft/resource/ResourceManager;Ljava/util/Set;)Ljava/util/Collection;", at = @At("TAIL"), locals = LocalCapture.CAPTURE_FAILHARD) + @Inject(method = "loadSprites(Lnet/minecraft/resource/ResourceManager;Ljava/util/Set;)Ljava/util/Collection;", at = @At("TAIL")) private void onTailLoadSprites(ResourceManager resourceManager, Set ids, CallbackInfoReturnable> cir) { if (!loadingEmissiveSprites) { loadingEmissiveSprites = true; diff --git a/src/main/java/me/pepperbell/continuity/client/model/CTMBakedModel.java b/src/main/java/me/pepperbell/continuity/client/model/CTMBakedModel.java index 6b05fa98..4b232190 100644 --- a/src/main/java/me/pepperbell/continuity/client/model/CTMBakedModel.java +++ b/src/main/java/me/pepperbell/continuity/client/model/CTMBakedModel.java @@ -22,7 +22,6 @@ public class CTMBakedModel extends ForwardingBakedModel { public static final int MULTIPASS_LIMIT = 3; - // maybe TODO: convert to arrays protected final List processors; @Nullable protected final List multipassProcessors; diff --git a/src/main/java/me/pepperbell/continuity/client/resource/CustomBlockLayers.java b/src/main/java/me/pepperbell/continuity/client/resource/CustomBlockLayers.java index ddff9e28..ccf2f6ac 100644 --- a/src/main/java/me/pepperbell/continuity/client/resource/CustomBlockLayers.java +++ b/src/main/java/me/pepperbell/continuity/client/resource/CustomBlockLayers.java @@ -43,6 +43,7 @@ public static RenderLayer getLayer(BlockState state) { private static void reload(ResourceManager manager) { System.arraycopy(EMPTY_LAYER_PREDICATES, 0, LAYER_PREDICATES, 0, EMPTY_LAYER_PREDICATES.length); + try (Resource resource = manager.getResource(LOCATION)) { Properties properties = new Properties(); properties.load(resource.getInputStream()); diff --git a/src/main/java/me/pepperbell/continuity/client/resource/EmissiveSuffixLoader.java b/src/main/java/me/pepperbell/continuity/client/resource/EmissiveSuffixLoader.java index 6b9eb531..d82f03f4 100644 --- a/src/main/java/me/pepperbell/continuity/client/resource/EmissiveSuffixLoader.java +++ b/src/main/java/me/pepperbell/continuity/client/resource/EmissiveSuffixLoader.java @@ -24,6 +24,7 @@ public static String getEmissiveSuffix() { @ApiStatus.Internal public static void load(ResourceManager manager) { emissiveSuffix = null; + try (Resource resource = manager.getResource(LOCATION)) { Properties properties = new Properties(); properties.load(resource.getInputStream()); diff --git a/src/main/resources/assets/continuity/lang/fr_fr.json b/src/main/resources/assets/continuity/lang/fr_fr.json index 6986f4ed..52539d26 100644 --- a/src/main/resources/assets/continuity/lang/fr_fr.json +++ b/src/main/resources/assets/continuity/lang/fr_fr.json @@ -5,5 +5,5 @@ "options.continuity.emissive_textures": "Textures Émissives", "options.continuity.emissive_textures.tooltip": "Active ou désactive les textures émissives des modèles de blocs et d'objets.", "options.continuity.custom_block_layers": "Couches Personnalisées", - "options.continuity.custom_block_layers.tooltip": "Active ou désactive les couches de blocs personnalisées", -} \ No newline at end of file + "options.continuity.custom_block_layers.tooltip": "Active ou désactive les couches de blocs personnalisées" +} diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index d28a1da1..54d94b47 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -4,7 +4,7 @@ "version": "${version}", "name": "Continuity", - "description": "Continuity is a Fabric mod built around modern APIs to allow for the most efficient connected textures experience possible. It is designed to provide full Optifine parity for all resource packs that use the Optifine/MCPatcher CTM format.", + "description": "Continuity is a Fabric mod built around modern APIs to allow for the most efficient connected textures experience possible. It is designed to provide full Optifine parity for all resource packs that use the Optifine CTM format. Continuity also supports Optifine-format emissive textures for block and item models.", "authors": [ "Pepper_Bell" ],