From 8d7592f2df00da98bb17933c593147702f1e57a3 Mon Sep 17 00:00:00 2001 From: Maik Marschner Date: Sun, 25 Aug 2024 20:40:43 +0200 Subject: [PATCH 1/2] Fix ejecting and unlocking vault textures. Fixes #1744 --- chunky/src/java/se/llbit/chunky/resources/Texture.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chunky/src/java/se/llbit/chunky/resources/Texture.java b/chunky/src/java/se/llbit/chunky/resources/Texture.java index 35935029f..72809051b 100644 --- a/chunky/src/java/se/llbit/chunky/resources/Texture.java +++ b/chunky/src/java/se/llbit/chunky/resources/Texture.java @@ -1463,7 +1463,7 @@ public class Texture { public static final Texture vaultFrontEjecting = new Texture(); @TexturePath("assets/minecraft/textures/block/vault_side_off") public static final Texture vaultSideOff = new Texture(); - @TexturePath("assets/minecraft/textures/block/vault_front_ejecting") + @TexturePath("assets/minecraft/textures/block/vault_side_on") public static final Texture vaultSideOn = new Texture(); @TexturePath("assets/minecraft/textures/entity/decorated_pot/flow_pottery_pattern") public static final Texture decoratedPotPatternFlow = new Texture(); From 03430e2b5c1bd67ff104d56b183faeaf43b3e32b Mon Sep 17 00:00:00 2001 From: Maik Marschner Date: Sun, 25 Aug 2024 20:49:13 +0200 Subject: [PATCH 2/2] Add a warning when trying to add multiple textures with the same name so this doesn't happen again. --- .../java/se/llbit/chunky/resources/TexturePackLoader.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/chunky/src/java/se/llbit/chunky/resources/TexturePackLoader.java b/chunky/src/java/se/llbit/chunky/resources/TexturePackLoader.java index f772e33ca..5d9001149 100644 --- a/chunky/src/java/se/llbit/chunky/resources/TexturePackLoader.java +++ b/chunky/src/java/se/llbit/chunky/resources/TexturePackLoader.java @@ -19,6 +19,7 @@ import se.llbit.chunky.renderer.scene.PlayerModel; import se.llbit.chunky.renderer.scene.sky.Sun; import se.llbit.chunky.resources.texturepack.*; +import se.llbit.log.Log; import java.lang.reflect.Field; import java.util.*; @@ -3663,6 +3664,10 @@ private static void addSimpleTexture(String file, Texture texture) { } private static void addSimpleTexture(String name, String file, Texture texture) { + if (ALL_TEXTURES.containsKey(name)) { + Log.warnf("Duplicate texture %s (path %s). This is probably a bug, please report it at https://github.com/chunky-dev/chunky/issues", name, file); + addSimpleTexture(name + "_duplicate", file, texture); + } ALL_TEXTURES.put(name, new SimpleTexture(file, texture)); } }