diff --git a/common/CHANGELOG.md b/common/CHANGELOG.md index e42a8d41..72ccbd52 100644 --- a/common/CHANGELOG.md +++ b/common/CHANGELOG.md @@ -1,5 +1,20 @@ [**ETF Changelog:**] +[beta 2] +- fixed skull block emissives +- fixed render context desync *(mobs textures defaulting depending on where you are looking last beta)* +- fixed elytra emissives +- removed the ETF cape skin feature, it was fun working with putting a cape inside the skin texture, but it added quite a lot +of overhead, when the minecraftcapes.net mod is just more effective. With this removed I plan to add support for +player skin feature emissives in whatever cape texture is being used at a future time. Which will be more freeing than +only applying skin feature emissives to etf loaded capes +- Added a new config screen category `Debug settings`. the debug right click option is now here. the log texture creation setting is now here. +- added a new debug button in the debug settings screen that will print **ALL** currently cached ETF texture data to the log, details of every known texture and every variant, +as well as telling you which textures can and cannot be varied. for example elytra.png shows up in the list of textures that can be varied with random entity rules ;) + + +[beta 1] + ETF 5.0 is a massive rework of the code, ETF is now almost an entirely different mod in its application from what v4.5 was. It should now universally affect every entity and entity render feature. - the `blocks` property now again additionally checks the block below block entities differing from OptiFine's behaviour diff --git a/common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenDebugSettings.java b/common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenDebugSettings.java new file mode 100644 index 00000000..79fc0454 --- /dev/null +++ b/common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenDebugSettings.java @@ -0,0 +1,77 @@ +package traben.entity_texture_features.config.screens; + +import net.minecraft.client.gui.screen.Screen; +import net.minecraft.screen.ScreenTexts; +import net.minecraft.text.Text; +import traben.entity_texture_features.ETFClientCommon; +import traben.entity_texture_features.ETFVersionDifferenceHandler; +import traben.entity_texture_features.config.ETFConfig; +import traben.entity_texture_features.features.ETFManager; + +import java.util.Objects; + +//inspired by puzzles custom gui code +public class ETFConfigScreenDebugSettings extends ETFConfigScreen { + protected ETFConfigScreenDebugSettings(Screen parent) { + super(ETFVersionDifferenceHandler.getTextFromTranslation("config.entity_texture_features.debug_screen.title"), parent); + + } + + + @Override + protected void init() { + super.init(); + this.addDrawableChild(getETFButton((int) (this.width * 0.55), (int) (this.height * 0.9), (int) (this.width * 0.2), 20, + ScreenTexts.BACK, + (button) -> Objects.requireNonNull(client).setScreen(parent))); + this.addDrawableChild(getETFButton((int) (this.width * 0.25), (int) (this.height * 0.9), (int) (this.width * 0.22), 20, + ETFVersionDifferenceHandler.getTextFromTranslation("dataPack.validation.reset"), + (button) -> { + //temporaryETFConfig = new ETFConfig(); + ETFConfigScreenMain.temporaryETFConfig.debugLoggingMode = ETFConfig.DebugLogMode.None; + ETFConfigScreenMain.temporaryETFConfig.illegalPathSupportMode = ETFConfig.IllegalPathMode.None; + this.clearAndInit(); + //Objects.requireNonNull(client).setScreen(parent); + })); + + + this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.2), (int) (this.width * 0.6), 20, + Text.of(ETFVersionDifferenceHandler.getTextFromTranslation( + "config." + ETFClientCommon.MOD_ID + ".debug_logging_mode.title" + ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.debugLoggingMode)), + (button) -> { + ETFConfigScreenMain.temporaryETFConfig.debugLoggingMode = ETFConfigScreenMain.temporaryETFConfig.debugLoggingMode.next(); + button.setMessage(Text.of(ETFVersionDifferenceHandler.getTextFromTranslation( + "config." + ETFClientCommon.MOD_ID + ".debug_logging_mode.title" + ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.debugLoggingMode))); + }, + ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".debug_logging_mode.tooltip") + )); + this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.3), (int) (this.width * 0.6), 20, + Text.of(ETFVersionDifferenceHandler.getTextFromTranslation( + "config." + ETFClientCommon.MOD_ID + ".log_creation" + ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.logTextureDataInitialization ? ScreenTexts.ON : ScreenTexts.OFF).getString()), + (button) -> { + ETFConfigScreenMain.temporaryETFConfig.logTextureDataInitialization = !ETFConfigScreenMain.temporaryETFConfig.logTextureDataInitialization; + button.setMessage(Text.of(ETFVersionDifferenceHandler.getTextFromTranslation( + "config." + ETFClientCommon.MOD_ID + ".log_creation" + ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.logTextureDataInitialization ? ScreenTexts.ON : ScreenTexts.OFF).getString())); + }, + ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".log_creation.tooltip") + )); + + + this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.6), (int) (this.width * 0.6), 20, + ETFVersionDifferenceHandler.getTextFromTranslation("config.entity_texture_features.debug_screen.mass_log"), + (button) -> { + ETFManager.getInstance().doTheBigBoyPrintoutKronk(); + button.setMessage(ETFVersionDifferenceHandler.getTextFromTranslation("config.entity_texture_features.debug_screen.mass_log.done")); + button.active = false; + }, + ETFVersionDifferenceHandler.getTextFromTranslation("config.entity_texture_features.debug_screen.mass_log.tooltip") + )); + + } + + +} diff --git a/common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenGeneralSettings.java b/common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenGeneralSettings.java index 9616e414..8db44f1c 100644 --- a/common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenGeneralSettings.java +++ b/common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenGeneralSettings.java @@ -27,40 +27,17 @@ protected void init() { ETFVersionDifferenceHandler.getTextFromTranslation("dataPack.validation.reset"), (button) -> { //temporaryETFConfig = new ETFConfig(); - ETFConfigScreenMain.temporaryETFConfig.debugLoggingMode = ETFConfig.DebugLogMode.None; ETFConfigScreenMain.temporaryETFConfig.illegalPathSupportMode = ETFConfig.IllegalPathMode.None; ETFConfigScreenMain.temporaryETFConfig.hideConfigButton = false; - ETFConfigScreenMain.temporaryETFConfig.logTextureDataInitialization = false; + ETFConfigScreenMain.temporaryETFConfig.enableFullBodyWardenTextures = true; this.clearAndInit(); //Objects.requireNonNull(client).setScreen(parent); })); + + this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.2), (int) (this.width * 0.6), 20, - Text.of(ETFVersionDifferenceHandler.getTextFromTranslation( - "config." + ETFClientCommon.MOD_ID + ".debug_logging_mode.title" - ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.debugLoggingMode)), - (button) -> { - ETFConfigScreenMain.temporaryETFConfig.debugLoggingMode = ETFConfigScreenMain.temporaryETFConfig.debugLoggingMode.next(); - button.setMessage(Text.of(ETFVersionDifferenceHandler.getTextFromTranslation( - "config." + ETFClientCommon.MOD_ID + ".debug_logging_mode.title" - ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.debugLoggingMode))); - }, - ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".debug_logging_mode.tooltip") - )); - this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.3), (int) (this.width * 0.6), 20, - Text.of(ETFVersionDifferenceHandler.getTextFromTranslation( - "config." + ETFClientCommon.MOD_ID + ".log_creation" - ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.logTextureDataInitialization ? ScreenTexts.ON : ScreenTexts.OFF).getString()), - (button) -> { - ETFConfigScreenMain.temporaryETFConfig.logTextureDataInitialization = !ETFConfigScreenMain.temporaryETFConfig.logTextureDataInitialization; - button.setMessage(Text.of(ETFVersionDifferenceHandler.getTextFromTranslation( - "config." + ETFClientCommon.MOD_ID + ".log_creation" - ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.logTextureDataInitialization ? ScreenTexts.ON : ScreenTexts.OFF).getString())); - }, - ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".log_creation.tooltip") - )); - this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.4), (int) (this.width * 0.6), 20, Text.of(ETFVersionDifferenceHandler.getTextFromTranslation( "config." + ETFClientCommon.MOD_ID + ".allow_illegal_texture_paths.title" ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.illegalPathSupportMode)), @@ -72,7 +49,7 @@ protected void init() { }, ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".allow_illegal_texture_paths.tooltip") )); - this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.5), (int) (this.width * 0.6), 20, + this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.3), (int) (this.width * 0.6), 20, Text.of(ETFVersionDifferenceHandler.getTextFromTranslation( "config." + ETFClientCommon.MOD_ID + ".hide_button" ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.hideConfigButton ? ScreenTexts.ON : ScreenTexts.OFF).getString()), @@ -84,7 +61,7 @@ protected void init() { }, ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".hide_button.tooltip") )); - this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.6), (int) (this.width * 0.6), 20, + this.addDrawableChild(getETFButton((int) (this.width * 0.2), (int) (this.height * 0.4), (int) (this.width * 0.6), 20, Text.of(ETFVersionDifferenceHandler.getTextFromTranslation( "config." + ETFClientCommon.MOD_ID + ".warden.title" ).getString() + ": " + (ETFConfigScreenMain.temporaryETFConfig.enableFullBodyWardenTextures ? ScreenTexts.ON : ScreenTexts.OFF).getString()), @@ -97,6 +74,7 @@ protected void init() { ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".warden.tooltip") )); + } diff --git a/common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenMain.java b/common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenMain.java index 11a7b494..ee73ba6c 100644 --- a/common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenMain.java +++ b/common/src/main/java/traben/entity_texture_features/config/screens/ETFConfigScreenMain.java @@ -32,6 +32,7 @@ public class ETFConfigScreenMain extends ETFConfigScreen { final ETFConfigScreenRandomSettings randomSettingsScreen = new ETFConfigScreenRandomSettings(this); final ETFConfigScreenEmissiveSettings emissiveSettingsScreen = new ETFConfigScreenEmissiveSettings(this); final ETFConfigScreenBlinkSettings blinkSettingsScreen = new ETFConfigScreenBlinkSettings(this); + final ETFConfigScreenDebugSettings debugSettingsScreen = new ETFConfigScreenDebugSettings(this); final ETFConfigScreenGeneralSettings generalSettingsScreen = new ETFConfigScreenGeneralSettings(this); boolean shownWarning = false; int warningCount = 0; @@ -105,30 +106,39 @@ protected void init() { }).dimensions((int) (this.width * 0.1), (int) (this.height * 0.9), (int) (this.width * 0.2), 20).build()); - this.addDrawableChild(ButtonWidget.builder( - ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".blinking_mob_settings_sub.title"), - (button) -> Objects.requireNonNull(client).setScreen(blinkSettingsScreen)) - .dimensions((int) (this.width * 0.3) + 75, (int) (this.height * 0.5) + 17, 165, 20).build()); - this.addDrawableChild(ButtonWidget.builder( - ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_settings.title"), - (button) -> Objects.requireNonNull(client).setScreen(playerSkinSettingsScreen)) - .dimensions((int) (this.width * 0.3) + 75, (int) (this.height * 0.5) - 10, 165, 20).build()); this.addDrawableChild(ButtonWidget.builder( ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".random_settings.title"), (button) -> Objects.requireNonNull(client).setScreen(randomSettingsScreen)) - .dimensions((int) (this.width * 0.3) + 75, (int) (this.height * 0.5) - 64, 165, 20).build()); + .dimensions((int) (this.width * 0.3) + 75, (int) (this.height * 0.5) - 73, 165, 20).build()); this.addDrawableChild(ButtonWidget.builder( ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".emissive_settings.title"), (button) -> Objects.requireNonNull(client).setScreen(emissiveSettingsScreen)) - .dimensions((int) (this.width * 0.3) + 75, (int) (this.height * 0.5) - 37, 165, 20).build()); + .dimensions((int) (this.width * 0.3) + 75, (int) (this.height * 0.5) - 48, 165, 20).build()); + + this.addDrawableChild(ButtonWidget.builder( + ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_settings.title"), + (button) -> Objects.requireNonNull(client).setScreen(playerSkinSettingsScreen)) + .dimensions((int) (this.width * 0.3) + 75, (int) (this.height * 0.5) - 23, 165, 20).build()); + + this.addDrawableChild(ButtonWidget.builder( + ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".blinking_mob_settings_sub.title"), + (button) -> Objects.requireNonNull(client).setScreen(blinkSettingsScreen)) + .dimensions((int) (this.width * 0.3) + 75, (int) (this.height * 0.5) + 3, 165, 20).build()); + + this.addDrawableChild(ButtonWidget.builder( + ETFVersionDifferenceHandler.getTextFromTranslation("config.entity_texture_features.debug_screen.title"), + (button) -> Objects.requireNonNull(client).setScreen(debugSettingsScreen)) + .dimensions((int) (this.width * 0.3) + 75, (int) (this.height * 0.5) + 28, 165, 20).build()); this.addDrawableChild(ButtonWidget.builder( ETFVersionDifferenceHandler.getTextFromTranslation("config." + ETFClientCommon.MOD_ID + ".general_settings.title"), (button) -> Objects.requireNonNull(client).setScreen(generalSettingsScreen)) - .dimensions((int) (this.width * 0.3) + 75, (int) (this.height * 0.5) + 44, 165, 20).build()); + .dimensions((int) (this.width * 0.3) + 75, (int) (this.height * 0.5) + 53, 165, 20).build()); + + } diff --git a/common/src/main/java/traben/entity_texture_features/config/screens/skin/ETFConfigScreenSkinTool.java b/common/src/main/java/traben/entity_texture_features/config/screens/skin/ETFConfigScreenSkinTool.java index 2486576e..3fb690d7 100644 --- a/common/src/main/java/traben/entity_texture_features/config/screens/skin/ETFConfigScreenSkinTool.java +++ b/common/src/main/java/traben/entity_texture_features/config/screens/skin/ETFConfigScreenSkinTool.java @@ -45,7 +45,7 @@ public class ETFConfigScreenSkinTool extends ETFConfigScreen { ButtonWidget emissiveSelectButton = null; ButtonWidget enchantButton = null; ButtonWidget enchantSelectButton = null; - ButtonWidget capeButton = null; +// ButtonWidget capeButton = null; ButtonWidget transparencyButton = null; protected ETFConfigScreenSkinTool(Screen parent) { @@ -183,21 +183,21 @@ protected void init() { thisETFPlayerTexture.noseType.getButtonText().getString())); }, ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.nose.tooltip")); - capeButton = getETFButton((int) (this.width * 0.47), (int) (this.height * 0.7), (int) (this.width * 0.2), 20, - Text.of(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.button").getString() + - thisETFPlayerTexture.capeType.getButtonText().getString()), - (button) -> { - CapeType cape = thisETFPlayerTexture.capeType.next(); - - button.setMessage(Text.of(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.button").getString() + - cape.getButtonText().getString())); - - currentEditorSkin.setColor(53, 16, cape.getCapePixelColour()); - - thisETFPlayerTexture.changeSkinToThisForTool(currentEditorSkin); - updateButtons(); - }, ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.tooltip") - ); +// capeButton = getETFButton((int) (this.width * 0.47), (int) (this.height * 0.7), (int) (this.width * 0.2), 20, +// Text.of(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.button").getString() + +// thisETFPlayerTexture.capeType.getButtonText().getString()), +// (button) -> { +// CapeType cape = thisETFPlayerTexture.capeType.next(); +// +// button.setMessage(Text.of(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.button").getString() + +// cape.getButtonText().getString())); +// +// currentEditorSkin.setColor(53, 16, cape.getCapePixelColour()); +// +// thisETFPlayerTexture.changeSkinToThisForTool(currentEditorSkin); +// updateButtons(); +// }, ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.tooltip") +// ); transparencyButton = getETFButton((int) (this.width * 0.695), (int) (this.height * 0.7), (int) (this.width * 0.275), 20, Text.of(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.transparency.button").getString() + @@ -346,7 +346,7 @@ protected void init() { this.addDrawableChild(emissiveSelectButton); this.addDrawableChild(enchantButton); this.addDrawableChild(enchantSelectButton); - this.addDrawableChild(capeButton); +// this.addDrawableChild(capeButton); this.addDrawableChild(transparencyButton); @@ -400,11 +400,11 @@ private void updateButtons() { enchantSelectButton.active = activeFeatures && currentEditorSkin.getColor(1, 18) == getPixelColour(2); } - if (capeButton != null) { - capeButton.active = activeFeatures; - capeButton.setMessage(Text.of(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.button").getString() + - thisETFPlayerTexture.capeType.getButtonText().getString())); - } +// if (capeButton != null) { +// capeButton.active = activeFeatures; +// capeButton.setMessage(Text.of(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.button").getString() + +// thisETFPlayerTexture.capeType.getButtonText().getString())); +// } if (transparencyButton != null) { transparencyButton.active = activeFeatures; transparencyButton.setMessage(Text.of(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.transparency.button").getString() + @@ -553,56 +553,56 @@ public void drawEntity(int x, int y, int size, float mouseX, float mouseY, Livin DiffuseLighting.enableGuiDepthLighting(); } - @SuppressWarnings("EnhancedSwitchMigration") - public enum CapeType { - OPTIFINE(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.optifine")), - MINECRAFT_CAPES_NET(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.minecraftcapes")), - ETF(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.etf")), - CUSTOM(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.custom")), - NONE(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.none")); - - private final Text buttonText; - - - CapeType(Text buttonText) { - this.buttonText = buttonText; - } - - public Text getButtonText() { - return buttonText; - } - - public CapeType next() { - switch (this) { - case NONE: - return ETF; - case ETF: - return CUSTOM; - case CUSTOM: - return MINECRAFT_CAPES_NET; - case MINECRAFT_CAPES_NET: - return OPTIFINE; - default: - return NONE; - } - } - - public int getCapePixelColour() { - switch (this) { - case CUSTOM: - return getPixelColour(1); - case OPTIFINE: - return getPixelColour(3); - case MINECRAFT_CAPES_NET: - return getPixelColour(2); - case ETF: - return getPixelColour(4); - default: - return 0; - - } - } - } +// @SuppressWarnings("EnhancedSwitchMigration") +// public enum CapeType { +// OPTIFINE(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.optifine")), +// MINECRAFT_CAPES_NET(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.minecraftcapes")), +// ETF(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.etf")), +// CUSTOM(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.custom")), +// NONE(ETFVersionDifferenceHandler.getTextFromTranslation("config." + MOD_ID + ".player_skin_editor.cape.none")); +// +// private final Text buttonText; +// +// +// CapeType(Text buttonText) { +// this.buttonText = buttonText; +// } +// +// public Text getButtonText() { +// return buttonText; +// } +// +// public CapeType next() { +// switch (this) { +// case NONE: +// return ETF; +// case ETF: +// return CUSTOM; +// case CUSTOM: +// return MINECRAFT_CAPES_NET; +// case MINECRAFT_CAPES_NET: +// return OPTIFINE; +// default: +// return NONE; +// } +// } +// +// public int getCapePixelColour() { +// switch (this) { +// case CUSTOM: +// return getPixelColour(1); +// case OPTIFINE: +// return getPixelColour(3); +// case MINECRAFT_CAPES_NET: +// return getPixelColour(2); +// case ETF: +// return getPixelColour(4); +// default: +// return 0; +// +// } +// } +// } @SuppressWarnings("EnhancedSwitchMigration") public enum NoseType { diff --git a/common/src/main/java/traben/entity_texture_features/features/ETFManager.java b/common/src/main/java/traben/entity_texture_features/features/ETFManager.java index 1ebb26c6..cf65202e 100644 --- a/common/src/main/java/traben/entity_texture_features/features/ETFManager.java +++ b/common/src/main/java/traben/entity_texture_features/features/ETFManager.java @@ -144,6 +144,61 @@ public String getGeneralPrintout() { ; } + public void doTheBigBoyPrintoutKronk(){ + StringBuilder out = new StringBuilder(); + + out.append("\n||||||||||||||-ETF EVERYTHING LOG START-|||||||||||||||") + .append("\n----------------------------------------") + .append("\n-----------General stats-------------") + .append("\n----------------------------------------") + .append("\n known emissive suffixes: \n - ").append(EMISSIVE_SUFFIX_LIST) + .append("\n player textures: \n - ").append(PLAYER_TEXTURE_MAP.size()) + .append("\n image files read: \n - ").append(KNOWN_NATIVE_IMAGES.size()) +// .append("\n - known resource-pack order: §r\n ").append(KNOWN_RESOURCEPACK_ORDER.size()) + .append("\n----------------------------------------") + .append("\n----------Texture totals----------------") + .append("\n----------------------------------------") + .append("\n amount of textures that have or can variate: \n - ").append(VARIATOR_MAP.size()) + .append("\n amount of textures seen by ETF total (not including emissives): \n - ").append(ETF_TEXTURE_CACHE.size()); + + StringBuilder textureLoopVariates = new StringBuilder(); + StringBuilder textureLoopNormal = new StringBuilder(); + int totalEmissive = 0; + int totalEnchant = 0; + for (ETFTexture texture: + ETF_TEXTURE_CACHE.values()) { + if(texture != null) { + if (texture.isEmissive()) totalEmissive++; + if (texture.isEnchanted()) totalEnchant++; + if(VARIATOR_MAP.containsKey(texture.thisIdentifier)){ + textureLoopVariates.append("\n - ").append( + VARIATOR_MAP.get(texture.thisIdentifier).getPrintout().replaceAll("\n","\n ")); + } + textureLoopNormal.append("\n - ").append(texture); + + } + } + out.append("\n total emissives: \n - ").append(totalEmissive) + .append("\n total enchanted: \n - ").append(totalEnchant) + .append("\n----------------------------------------") + .append("\n----------ALL texture groups-------------") + .append("\n----------------------------------------") + .append("\n (Note: all of these can be varied via random entity rules)") + .append(textureLoopVariates.toString().replaceAll("§.","")) + .append("\n----------------------------------------") + .append("\n----------ALL Textures Seen-------------") + .append("\n----------------------------------------") + .append("\n (Note: these are not all variable by random entity rules, but can usually be emissive)") + .append(textureLoopNormal) + .append("\n----------------------------------------"); + + + out.append("\n----------------------------------------") + .append("\n||||||||||||||-ETF EVERYTHING LOG END-|||||||||||||||"); + + ETFUtils2.logMessage(out.toString()); + } + public void grabSpecialProperties(Properties props, ETFEntity entity) { if (entity == null) return; diff --git a/common/src/main/java/traben/entity_texture_features/features/ETFRenderContext.java b/common/src/main/java/traben/entity_texture_features/features/ETFRenderContext.java index 21008fd7..84f2b991 100644 --- a/common/src/main/java/traben/entity_texture_features/features/ETFRenderContext.java +++ b/common/src/main/java/traben/entity_texture_features/features/ETFRenderContext.java @@ -23,6 +23,7 @@ public class ETFRenderContext { private static ETFEntity currentEntity = null; private static int currentModelPartDepth = 0; + private static boolean isInSpecialRenderOverlayPhase = false; public static boolean isRenderingFeatures() { @@ -59,16 +60,19 @@ public static void setCurrentETFTexture(ETFTexture currentETFTexture) { } public static VertexConsumer processVertexConsumer(VertexConsumerProvider provider, RenderLayer renderLayer) { + currentETFTexture = null; ETFRenderContext.currentRenderLayer = renderLayer; //sprites will give the atlas id if not handled separately, and the only hook in seems to be the consumer - if (currentRenderLayer instanceof RenderLayer.MultiPhase multiPhase) {// + if (renderLayer instanceof RenderLayer.MultiPhase multiPhase) {// + // RenderLayer.MultiPhaseParameters params = multiPhase.phases; // RenderPhase.TextureBase base = params.texture; Optional possibleId = multiPhase.phases.texture.getId(); // ETFManager.getInstance().getETFTexture(texture,ETFRenderContext.getCurrentEntity(), ETFManager.TextureSource.ENTITY,false); possibleId.ifPresent(identifier -> currentETFTexture = ETFManager.getInstance().getETFTextureNoVariation(identifier)); + //modify render layer if needed if (!multiPhase.isOutline() && getCurrentEntity() != null && ETFManager.getInstance().ENTITY_TYPE_RENDER_LAYER.containsKey(getCurrentEntity().etf$getType())) { preventRenderLayerTextureModify(); diff --git a/common/src/main/java/traben/entity_texture_features/features/player/ETFPlayerTexture.java b/common/src/main/java/traben/entity_texture_features/features/player/ETFPlayerTexture.java index 3f97640b..7c555c55 100644 --- a/common/src/main/java/traben/entity_texture_features/features/player/ETFPlayerTexture.java +++ b/common/src/main/java/traben/entity_texture_features/features/player/ETFPlayerTexture.java @@ -2,22 +2,14 @@ import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.AbstractClientPlayerEntity; -import net.minecraft.client.render.OverlayTexture; -import net.minecraft.client.render.RenderLayer; -import net.minecraft.client.render.VertexConsumer; -import net.minecraft.client.render.VertexConsumerProvider; -import net.minecraft.client.render.entity.model.PlayerEntityModel; -import net.minecraft.client.render.item.ItemRenderer; import net.minecraft.client.texture.NativeImage; import net.minecraft.client.texture.PlayerSkinTexture; -import net.minecraft.client.util.math.MatrixStack; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.util.Identifier; import net.minecraft.util.Util; import net.minecraft.util.math.ColorHelper; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import traben.entity_texture_features.ETFClientCommon; import traben.entity_texture_features.config.screens.skin.ETFConfigScreenSkinTool; import traben.entity_texture_features.features.ETFManager; import traben.entity_texture_features.features.texture_handlers.ETFTexture; @@ -52,7 +44,7 @@ public class ETFPlayerTexture { public Identifier baseEnchantIdentifier = null; public Identifier baseEnchantBlinkIdentifier = null; public Identifier baseEnchantBlink2Identifier = null; - public Identifier etfCapeIdentifier = null; +// public Identifier etfCapeIdentifier = null; public Identifier texturedNoseIdentifier = null; public Identifier texturedNoseIdentifierEmissive = null; public Identifier texturedNoseIdentifierEnchanted = null; @@ -63,12 +55,14 @@ public class ETFPlayerTexture { public int blinkType = 0; public int blinkHeight = 1; //public boolean THIS_SKIN_IS_IN_EDITOR = false; + +// public ETFTexture etfCape = null; public boolean hasEmissives = false; public boolean hasEnchant = false; //provides emissive patching and blinking functionality //all ETFPlayerTexture needs to do is build those textures and register them before this ETFTexture is made, and it will auto locate and apply them public ETFTexture etfTextureOfFinalBaseSkin; - public ETFConfigScreenSkinTool.CapeType capeType = ETFConfigScreenSkinTool.CapeType.NONE; +// public ETFConfigScreenSkinTool.CapeType capeType = ETFConfigScreenSkinTool.CapeType.NONE; public ETFConfigScreenSkinTool.NoseType noseType = ETFConfigScreenSkinTool.NoseType.NONE; public ETFPlayerEntity player; public boolean wasForcedSolid = false; @@ -83,8 +77,8 @@ public class ETFPlayerTexture { private NativeImage originalCape; private int[] enchantCapeBounds = null; private int[] emissiveCapeBounds = null; - private Identifier etfCapeEmissiveIdentifier = null; - private Identifier etfCapeEnchantedIdentifier = null; +// private Identifier etfCapeEmissiveIdentifier = null; +// private Identifier etfCapeEnchantedIdentifier = null; private Identifier normalVanillaSkinIdentifier = null; @@ -453,9 +447,9 @@ public boolean isCorrectObjectForThisSkin(Identifier check) { return check.equals(normalVanillaSkinIdentifier); } - public boolean hasCustomCape() { - return etfCapeIdentifier != null; - } +// public boolean hasCustomCape() { +// return etfCape != null; +// } @Nullable public Identifier getBaseTextureIdentifierOrNullForVanilla(PlayerEntity player) { @@ -512,24 +506,24 @@ public Identifier getBaseTextureEnchantIdentifierOrNullForNone() { return null; } - public void renderFeatures(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int light, PlayerEntityModel model) { - if (canUseFeaturesForThisPlayer()) { - if (etfCapeIdentifier != null) { - // VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(RenderLayer.getEntityTranslucent(etfCapeIdentifier)); - // model.renderCape(matrixStack, vertexConsumer, light, OverlayTexture.DEFAULT_UV); - - if (etfCapeEmissiveIdentifier != null) { - VertexConsumer emissiveVert = vertexConsumerProvider.getBuffer(RenderLayer.getEntityTranslucent(etfCapeEmissiveIdentifier)); - model.renderCape(matrixStack, emissiveVert, ETFClientCommon.EMISSIVE_FEATURE_LIGHT_VALUE, OverlayTexture.DEFAULT_UV); - } - if (etfCapeEnchantedIdentifier != null) { - VertexConsumer enchantVert = ItemRenderer.getArmorGlintConsumer(vertexConsumerProvider, RenderLayer.getArmorCutoutNoCull(etfCapeEnchantedIdentifier), false, true); - model.renderCape(matrixStack, enchantVert, light, OverlayTexture.DEFAULT_UV); - } - - } - } - } +// public void renderFeatures(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int light, PlayerEntityModel model) { +// if (canUseFeaturesForThisPlayer()) { +// if (etfCapeIdentifier != null) { +// // VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(RenderLayer.getEntityTranslucent(etfCapeIdentifier)); +// // model.renderCape(matrixStack, vertexConsumer, light, OverlayTexture.DEFAULT_UV); +// +// if (etfCapeEmissiveIdentifier != null) { +// VertexConsumer emissiveVert = vertexConsumerProvider.getBuffer(RenderLayer.getEntityTranslucent(etfCapeEmissiveIdentifier)); +// model.renderCape(matrixStack, emissiveVert, ETFClientCommon.EMISSIVE_FEATURE_LIGHT_VALUE, OverlayTexture.DEFAULT_UV); +// } +// if (etfCapeEnchantedIdentifier != null) { +// VertexConsumer enchantVert = ItemRenderer.getArmorGlintConsumer(vertexConsumerProvider, RenderLayer.getArmorCutoutNoCull(etfCapeEnchantedIdentifier), false, true); +// model.renderCape(matrixStack, enchantVert, light, OverlayTexture.DEFAULT_UV); +// } +// +// } +// } +// } public boolean canUseFeaturesForThisPlayer() { return isTextureReady @@ -603,8 +597,10 @@ public void receiveThirdPartyCape(@NotNull NativeImage capeImage) { } } - private void checkThirdPartyCapeFeaturesAndFinalize(NativeImage capeImage, Identifier newCapeId) { + private void checkThirdPartyCapeFeaturesAndFinalize(NativeImage capeImage, Identifier etfCapeIdentifier) { + Identifier etfCapeEmissiveIdentifier = null; + Identifier etfCapeEnchantedIdentifier = null; NativeImage checkCapeEmissive = returnMatchPixels(originalSkin, emissiveCapeBounds, capeImage); //UUID_PLAYER_HAS_EMISSIVE_CAPE.put(id, checkCape != null); @@ -612,8 +608,6 @@ private void checkThirdPartyCapeFeaturesAndFinalize(NativeImage capeImage, Ident Identifier newCapeEmissive = new Identifier(SKIN_NAMESPACE, player.etf$getUuid() + "_cape_third_party_e.png"); ETFUtils2.registerNativeImageToIdentifier(checkCapeEmissive, newCapeEmissive); etfCapeEmissiveIdentifier = newCapeEmissive; - } else { - etfCapeEmissiveIdentifier = null; } NativeImage checkCapeEnchant = returnMatchPixels(originalSkin, enchantCapeBounds, capeImage); //UUID_PLAYER_HAS_EMISSIVE_CAPE.put(id, checkCape != null); @@ -621,11 +615,12 @@ private void checkThirdPartyCapeFeaturesAndFinalize(NativeImage capeImage, Ident Identifier newCapeEnchanted = new Identifier(SKIN_NAMESPACE, player.etf$getUuid() + "_cape_third_party_enchant.png"); ETFUtils2.registerNativeImageToIdentifier(checkCapeEnchant, newCapeEnchanted); etfCapeEnchantedIdentifier = newCapeEnchanted; - } else { - etfCapeEnchantedIdentifier = null; } - ETFUtils2.registerNativeImageToIdentifier(capeImage, newCapeId); - etfCapeIdentifier = newCapeId; + ETFUtils2.registerNativeImageToIdentifier(capeImage, etfCapeIdentifier); +// etfCape = new ETFTexture(etfCapeIdentifier,null,null, +// etfCapeEmissiveIdentifier,null,null, +// etfCapeEnchantedIdentifier,null,null, +// null,null,null); } private void skinFailed() { @@ -711,7 +706,7 @@ public void checkTexture(boolean skipSkinLoad) { hasFeatures = true; - ETFUtils2.logMessage("Found Player {" + player.etf$getName().getString() + "} with texture features in skin.", false); + ETFUtils2.logMessage("Found Player {" + player.etf$getName().getString() + "} with ETF texture features in skin.", false); //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //locate and convert choices to ints int[] choiceBoxChoices = { @@ -914,51 +909,56 @@ public void checkTexture(boolean skipSkinLoad) { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - //check for cape recolor - int capeChoice1 = choiceBoxChoices[4]; - // custom cape data experiment - // https://drive.google.com/uc?export=download&id=1rn1swLadqdMiLirz9Nrae0_VHFrTaJQe - //downloadImageFromUrl(player, "https://drive.google.com/uc?export=download&id=1rn1swLadqdMiLirz9Nrae0_VHFrTaJQe", "etf$CAPE",null,true); - if ((capeChoice1 >= 1 && capeChoice1 <= 4)) { - switch (capeChoice1) { - case 1 -> { //custom in skin - capeType = ETFConfigScreenSkinTool.CapeType.CUSTOM; - modifiedCape.copyFrom(returnCustomTexturedCape(originalSkin)); - } - case 2 -> { - capeType = ETFConfigScreenSkinTool.CapeType.MINECRAFT_CAPES_NET; - modifiedCape = null; - // minecraft capes mod - //https://minecraftcapes.net/profile/fd22e573178c415a94fee476b328abfd/cape/ - initiateThirdPartyCapeDownload("https://api.minecraftcapes.net/profile/" + player.etf$getUuidAsString().replace("-", "") + "/cape/"); - - } - case 3 -> { - capeType = ETFConfigScreenSkinTool.CapeType.OPTIFINE; - modifiedCape = null; - // https://optifine.net/capes/Benjamin.png - initiateThirdPartyCapeDownload("https://optifine.net/capes/" + player.etf$getName().getString() + ".png"); - - } - case 4 -> { - capeType = ETFConfigScreenSkinTool.CapeType.ETF; - NativeImage cape = ETFUtils2.getNativeImageElseNull(new Identifier(MOD_ID, "textures/capes/etf.png")); - if (cape != null && !ETFUtils2.isNativeImageEmpty(modifiedCape)) { - modifiedCape.copyFrom(cape); - } - } - default -> { - // cape = getNativeImageFromID(new Identifier("etf:capes/blank.png")); - } - } - } - if (modifiedCape != null && !ETFUtils2.isNativeImageEmpty(modifiedCape)) { - //if ((capeChoice1 >= 1 && capeChoice1 <= 4) || capeChoice1 == 666) {//custom chosen - etfCapeIdentifier = new Identifier(SKIN_NAMESPACE, id.toString().replaceAll("/[^a-z]/g", "") + "_cape.png"); - ETFUtils2.registerNativeImageToIdentifier(modifiedCape, etfCapeIdentifier); - //UUID_PLAYER_HAS_CUSTOM_CAPE.put(id, true); - // } - } +// Identifier etfCapeIdentifier = null; +// Identifier etfCapeEmissiveIdentifier = null; +// Identifier etfCapeEnchantedIdentifier = null; +// +// //check for cape recolor +// int capeChoice1 = choiceBoxChoices[4]; +// // custom cape data experiment +// // https://drive.google.com/uc?export=download&id=1rn1swLadqdMiLirz9Nrae0_VHFrTaJQe +// //downloadImageFromUrl(player, "https://drive.google.com/uc?export=download&id=1rn1swLadqdMiLirz9Nrae0_VHFrTaJQe", "etf$CAPE",null,true); +// if ((capeChoice1 >= 1 && capeChoice1 <= 4)) { +// switch (capeChoice1) { +// case 1 -> { //custom in skin +// capeType = ETFConfigScreenSkinTool.CapeType.CUSTOM; +// modifiedCape.copyFrom(returnCustomTexturedCape(originalSkin)); +// } +// case 2 -> { +// capeType = ETFConfigScreenSkinTool.CapeType.MINECRAFT_CAPES_NET; +// modifiedCape = null; +// // minecraft capes mod +// //https://minecraftcapes.net/profile/fd22e573178c415a94fee476b328abfd/cape/ +// initiateThirdPartyCapeDownload("https://api.minecraftcapes.net/profile/" + player.etf$getUuidAsString().replace("-", "") + "/cape/"); +// +// } +// case 3 -> { +// capeType = ETFConfigScreenSkinTool.CapeType.OPTIFINE; +// modifiedCape = null; +// // https://optifine.net/capes/Benjamin.png +// initiateThirdPartyCapeDownload("https://optifine.net/capes/" + player.etf$getName().getString() + ".png"); +// +// } +// case 4 -> { +// capeType = ETFConfigScreenSkinTool.CapeType.ETF; +// NativeImage cape = ETFUtils2.getNativeImageElseNull(new Identifier(MOD_ID, "textures/capes/etf.png")); +// if (cape != null && !ETFUtils2.isNativeImageEmpty(modifiedCape)) { +// modifiedCape.copyFrom(cape); +// } +// } +// default -> { +// // cape = getNativeImageFromID(new Identifier("etf:capes/blank.png")); +// } +// } +// } +// if (modifiedCape != null && !ETFUtils2.isNativeImageEmpty(modifiedCape)) { +// //if ((capeChoice1 >= 1 && capeChoice1 <= 4) || capeChoice1 == 666) {//custom chosen +// etfCapeIdentifier = new Identifier(SKIN_NAMESPACE, id.toString().replaceAll("/[^a-z]/g", "") + "_cape.png"); +// ETFUtils2.registerNativeImageToIdentifier(modifiedCape, etfCapeIdentifier); +// +// //UUID_PLAYER_HAS_CUSTOM_CAPE.put(id, true); +// // } +// } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //check for marker choices // 1 = Emissives, 2 = Enchanted @@ -974,6 +974,7 @@ public void checkTexture(boolean skipSkinLoad) { Identifier emissiveIdentifier = null; Identifier blinkEmissiveIdentifier = null;//new Identifier( SKIN_NAMESPACE , id + "_blink_e.png"); Identifier blink2EmissiveIdentifier = null;//new Identifier( SKIN_NAMESPACE , id + "_blink2_e.png"); +// NativeImage emissiveCape = null; hasEmissives = markerChoices.contains(1); if (hasEmissives) { int[] boxChosenBounds = getSkinPixelBounds("marker" + (markerChoices.indexOf(1) + 1)); @@ -1008,15 +1009,15 @@ public void checkTexture(boolean skipSkinLoad) { ETFUtils2.registerNativeImageToIdentifier(checkCoat, coatEmissiveIdentifier); } } - if (modifiedCape != null) { - - NativeImage checkCape = returnMatchPixels(modifiedSkin, boxChosenBounds, modifiedCape); - //UUID_PLAYER_HAS_EMISSIVE_CAPE.put(id, checkCape != null); - if (checkCape != null) { - etfCapeEmissiveIdentifier = new Identifier(SKIN_NAMESPACE, id + "_cape_e.png"); - ETFUtils2.registerNativeImageToIdentifier(checkCape, etfCapeEmissiveIdentifier); - } - } +// if (modifiedCape != null) { +// +// emissiveCape = returnMatchPixels(modifiedSkin, boxChosenBounds, modifiedCape); +// //UUID_PLAYER_HAS_EMISSIVE_CAPE.put(id, checkCape != null); +// if (emissiveCape != null) { +// etfCapeEmissiveIdentifier = new Identifier(SKIN_NAMESPACE, id + "_cape_e.png"); +// ETFUtils2.registerNativeImageToIdentifier(emissiveCape, etfCapeEmissiveIdentifier); +// } +// } if (noseTexture != null) { NativeImage checkNose = returnMatchPixels(modifiedSkin, boxChosenBounds, noseTexture); //UUID_PLAYER_HAS_EMISSIVE_CAPE.put(id, checkCape != null); @@ -1029,9 +1030,9 @@ public void checkTexture(boolean skipSkinLoad) { hasEmissives = false; } } - if (capeType == ETFConfigScreenSkinTool.CapeType.ETF) { - etfCapeEmissiveIdentifier = new Identifier(MOD_ID, "textures/capes/etf_e.png"); - } +// if (capeType == ETFConfigScreenSkinTool.CapeType.ETF) { +// etfCapeEmissiveIdentifier = new Identifier(MOD_ID, "textures/capes/etf_e.png"); +// } //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //enchant hasEnchant = markerChoices.contains(2); @@ -1067,16 +1068,16 @@ public void checkTexture(boolean skipSkinLoad) { ETFUtils2.registerNativeImageToIdentifier(checkCoat, coatEnchantedIdentifier); } } - if (modifiedCape != null) { - - NativeImage checkCape = returnMatchPixels(modifiedSkin, boxChosenBounds, modifiedCape); - //UUID_PLAYER_HAS_EMISSIVE_CAPE.put(id, checkCape != null); - if (checkCape != null) { - - etfCapeEnchantedIdentifier = new Identifier(SKIN_NAMESPACE, id + "_cape_enchant.png"); - ETFUtils2.registerNativeImageToIdentifier(checkCape, etfCapeEnchantedIdentifier); - } - } +// if (modifiedCape != null) { +// +// NativeImage checkCape = returnMatchPixels(modifiedSkin, boxChosenBounds, modifiedCape); +// //UUID_PLAYER_HAS_EMISSIVE_CAPE.put(id, checkCape != null); +// if (checkCape != null) { +// +// etfCapeEnchantedIdentifier = new Identifier(SKIN_NAMESPACE, id + "_cape_enchant.png"); +// ETFUtils2.registerNativeImageToIdentifier(checkCape, etfCapeEnchantedIdentifier); +// } +// } if (noseTexture != null) { NativeImage checkNose = returnMatchPixels(modifiedSkin, boxChosenBounds, noseTexture); //UUID_PLAYER_HAS_EMISSIVE_CAPE.put(id, checkCape != null); @@ -1096,6 +1097,8 @@ public void checkTexture(boolean skipSkinLoad) { Identifier modifiedSkinBlinkPatchedIdentifier = null; Identifier modifiedSkinPatchedIdentifier = null; Identifier modifiedSkinBlink2PatchedIdentifier = null; + +// Identifier modifiedCapePatchedIdentifier = etfCapeIdentifier; if (hasEmissives) { if (emissiveImage != null) { modifiedSkinPatchedIdentifier = new Identifier(SKIN_NAMESPACE, id + "_e_patched.png"); @@ -1113,6 +1116,11 @@ public void checkTexture(boolean skipSkinLoad) { ETFUtils2.registerNativeImageToIdentifier(blinkSkinFile2, modifiedSkinBlink2PatchedIdentifier); } } +// if (emissiveCape != null) { +// modifiedCapePatchedIdentifier = new Identifier(SKIN_NAMESPACE, id + "_cape_e_patched.png"); +// ETFTexture.patchTextureToRemoveZFightingWithOtherTexture(modifiedCape, emissiveCape); +// ETFUtils2.registerNativeImageToIdentifier(modifiedCape, modifiedCapePatchedIdentifier); +// } } @@ -1137,18 +1145,23 @@ public void checkTexture(boolean skipSkinLoad) { //if vanilla cape and there is no enchant or emissive //then just clear it from etf to defer to cape mods - if (capeType == ETFConfigScreenSkinTool.CapeType.NONE - && etfCapeIdentifier != null - && etfCapeEnchantedIdentifier == null - && etfCapeEmissiveIdentifier == null) { - etfCapeIdentifier = null; - } +// if (capeType == ETFConfigScreenSkinTool.CapeType.NONE +// && modifiedCapePatchedIdentifier != null +// && etfCapeEnchantedIdentifier == null +// && etfCapeEmissiveIdentifier == null) { +// etfCape = null; +// }else{ +// etfCape = new ETFTexture(modifiedCapePatchedIdentifier,null,null, +// etfCapeEmissiveIdentifier,null,null, +// etfCapeEnchantedIdentifier,null,null, +// null,null,null); +// } - if (modifiedCape != null) { - modifiedCape.close(); - } - modifiedSkin.close(); +// if (modifiedCape != null) { +// modifiedCape.close(); +// } +// modifiedSkin.close(); } else { //check if they want to try load transparent skin anyway @@ -1174,10 +1187,8 @@ public void checkTexture(boolean skipSkinLoad) { public void changeSkinToThisForTool(NativeImage image) { - this.etfCapeEmissiveIdentifier = null; - this.etfCapeIdentifier = null; +// this.etfCape = null; this.baseEnchantBlinkIdentifier = null; - this.etfCapeEnchantedIdentifier = null; this.baseEnchantIdentifier = null; this.coatEmissiveIdentifier = null; this.coatEnchantedIdentifier = null; @@ -1196,7 +1207,7 @@ public void changeSkinToThisForTool(NativeImage image) { this.coatLength = 1; this.blinkHeight = 1; this.blinkType = 0; - this.capeType = ETFConfigScreenSkinTool.CapeType.NONE; +// this.capeType = ETFConfigScreenSkinTool.CapeType.NONE; this.texturedNoseIdentifier = null; this.texturedNoseIdentifierEmissive = null; this.texturedNoseIdentifierEnchanted = null; diff --git a/common/src/main/java/traben/entity_texture_features/features/texture_handlers/ETFTexture.java b/common/src/main/java/traben/entity_texture_features/features/texture_handlers/ETFTexture.java index 569b1961..2b9422d0 100644 --- a/common/src/main/java/traben/entity_texture_features/features/texture_handlers/ETFTexture.java +++ b/common/src/main/java/traben/entity_texture_features/features/texture_handlers/ETFTexture.java @@ -418,7 +418,7 @@ private void setupEnchants() { */ public void reRegisterBaseTexture() { if (hasBeenReRegistered) return; - + hasPatched = true; hasBeenReRegistered = true; NativeImage newBaseTexture = ETFUtils2.getNativeImageElseNull(thisIdentifier); thisIdentifier_Patched = new Identifier(PATCH_NAMESPACE_PREFIX + thisIdentifier.getNamespace(), thisIdentifier.getPath()); @@ -488,6 +488,9 @@ public void setGUIBlink(){ public boolean isEmissive() { return this.emissiveIdentifier != null; } + public boolean isEnchanted() { + return this.enchantIdentifier != null; + } public boolean canPatch() { return ETFRenderContext.isAllowedToPatch() && this.thisIdentifier_Patched != null; diff --git a/common/src/main/java/traben/entity_texture_features/features/texture_handlers/ETFTextureVariator.java b/common/src/main/java/traben/entity_texture_features/features/texture_handlers/ETFTextureVariator.java index f78d9c51..96c810ca 100644 --- a/common/src/main/java/traben/entity_texture_features/features/texture_handlers/ETFTextureVariator.java +++ b/common/src/main/java/traben/entity_texture_features/features/texture_handlers/ETFTextureVariator.java @@ -13,6 +13,7 @@ import traben.entity_texture_features.utils.ETFUtils2; import traben.entity_texture_features.utils.EntityIntLRU; +import java.util.Objects; import java.util.UUID; import static traben.entity_texture_features.ETFClientCommon.ETFConfigData; @@ -44,13 +45,15 @@ public ETFTexture getVariantOf(@NotNull ETFEntity entity) { ETFTexture output = getVariantOfInternal(entity); ETFUtils2.logMessage( - "\n§cETF Printout:§r" + + "\n§e-----------ETF Debug Printout-------------§r" + "\n" + ETFManager.getInstance().getGeneralPrintout() + - "\n§eCurrent Entity:§r" + + "\n§eEntity:§r" + "\n§6 - type:§r " + entity.etf$getType().getTranslationKey() + "\n§6 - texture:§r " + output + + "\n§6 - can_update_variant:§r "+ (this instanceof ETFTextureMultiple multi && multi.suffixProvider.entityCanUpdate(entity.etf$getUuid()))+ "\n§6 - last matching rule:§r " + ETFManager.getInstance().LAST_MET_RULE_INDEX.getInt(entity.etf$getUuid()) + - "\n" + getPrintout() + "\n" + getPrintout() + + "\n§e----------------------------------------§r" , inChat); ETFManager.getInstance().ENTITY_DEBUG = null; @@ -61,7 +64,7 @@ public ETFTexture getVariantOf(@NotNull ETFEntity entity) { - protected abstract String getPrintout(); + public abstract String getPrintout(); protected abstract @NotNull ETFTexture getVariantOfInternal(@NotNull ETFEntity entity); @@ -78,9 +81,6 @@ public ETFTextureSingleton(Identifier singletonId) { } } - public ETFTextureSingleton(ETFTexture singleton) { - self = singleton; - } @Override protected @NotNull ETFTexture getVariantOfInternal(@NotNull ETFEntity entity) { @@ -88,9 +88,9 @@ public ETFTextureSingleton(ETFTexture singleton) { } public String getPrintout() { - return "§bCurrent texture: §r"+ + return "§bTexture: §r"+ "\n§3 - base texture:§r " + self.toString() + - "\n§3 - variates:§r NO" + "\n§3 - variates:§r no" ; } } @@ -99,7 +99,7 @@ private static class ETFTextureMultiple extends ETFTextureVariator { public final @NotNull EntityIntLRU entitySuffixMap = new EntityIntLRU(500); private final @NotNull Int2ObjectArrayMap variantMap = new Int2ObjectArrayMap<>(); - private final @NotNull ETFApi.ETFVariantSuffixProvider suffixProvider; + final @NotNull ETFApi.ETFVariantSuffixProvider suffixProvider; private final @NotNull Identifier vanillaId; ETFTextureMultiple(@NotNull Identifier vanillaId, @NotNull ETFApi.ETFVariantSuffixProvider suffixProvider) { @@ -137,10 +137,23 @@ private static class ETFTextureMultiple extends ETFTextureVariator { } } + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + ETFTextureMultiple that = (ETFTextureMultiple) o; + return vanillaId.equals(that.vanillaId); + } + + @Override + public int hashCode() { + return Objects.hash(vanillaId); + } + public String getPrintout() { - return "§bCurrent texture: §r" + + return "§bTexture: §r" + "\n§3 - base texture:§r " + vanillaId + - "\n§3 - variates:§r YES" + + "\n§3 - variates:§r yes" + "\n§3 - set by properties:§r " + (suffixProvider instanceof PropertiesRandomProvider) + "\n§3 - variant count:§r " + variantMap.size() + "\n§3 - all suffixes:§r " + variantMap.keySet() diff --git a/common/src/main/java/traben/entity_texture_features/mixin/MixinModelPart.java b/common/src/main/java/traben/entity_texture_features/mixin/MixinModelPart.java index af7822e2..5c01e499 100644 --- a/common/src/main/java/traben/entity_texture_features/mixin/MixinModelPart.java +++ b/common/src/main/java/traben/entity_texture_features/mixin/MixinModelPart.java @@ -38,7 +38,7 @@ public abstract class MixinModelPart { //attempt special renders as eager OR checks if (etf$renderEmissive(matrices, overlay, red, green, blue, alpha) | etf$renderEnchanted(matrices, light, overlay, red, green, blue, alpha)) { - //reset render layer stuff behind the scenes if special renders occurred + //reset render layer stuff behind the scenes if special renders occurred ETFRenderContext.getCurrentProvider().getBuffer(ETFRenderContext.getCurrentRenderLayer()); } } diff --git a/common/src/main/java/traben/entity_texture_features/mixin/entity/misc/MixinAbstractClientPlayerEntity.java b/common/src/main/java/traben/entity_texture_features/mixin/entity/misc/MixinAbstractClientPlayerEntity.java deleted file mode 100644 index 501d4ea1..00000000 --- a/common/src/main/java/traben/entity_texture_features/mixin/entity/misc/MixinAbstractClientPlayerEntity.java +++ /dev/null @@ -1,71 +0,0 @@ -package traben.entity_texture_features.mixin.entity.misc; - -import com.mojang.authlib.GameProfile; -import net.minecraft.client.network.AbstractClientPlayerEntity; -import net.minecraft.client.util.SkinTextures; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.Identifier; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; -import traben.entity_texture_features.features.ETFManager; -import traben.entity_texture_features.features.player.ETFPlayerTexture; - -import static traben.entity_texture_features.ETFClientCommon.MOD_ID; - - -@Mixin(AbstractClientPlayerEntity.class) -public abstract class MixinAbstractClientPlayerEntity extends PlayerEntity { - - - @Unique - private final static Identifier etf$etf = new Identifier(MOD_ID, "textures/capes/etf.png"); - @Unique - private final static Identifier etf$wife = new Identifier(MOD_ID, "textures/capes/wife.png"); - - @SuppressWarnings("unused") - public MixinAbstractClientPlayerEntity(World world, BlockPos pos, float yaw, GameProfile gameProfile) { - super(world, pos, yaw, gameProfile); - } - - @Inject(method = "getSkinTextures", - at = @At("RETURN"), cancellable = true) - private void changeCapeReturnsToNotNull(CallbackInfoReturnable cir) { - //requires a non-null return for elytras and for enabling cape rendering which is itself overridden by etf - - Identifier cape = cir.getReturnValue().capeTexture(); - if (cape != null) { - //catches cit elytras makes them override ETF cape returns - if (cape.toString().contains("/cit/")) { - return; - } - } - Identifier newCape; - ETFPlayerTexture textureData = ETFManager.getInstance().getPlayerTexture(this, cir.getReturnValue().texture()); - if (textureData != null && textureData.hasCustomCape()) { - newCape = textureData.etfCapeIdentifier; - //cir.setReturnValue(textureData.etfCapeIdentifier); - } else if (getUuid().equals(ETFPlayerTexture.Dev)) { - newCape = etf$etf; - } else if (getUuid().equals(ETFPlayerTexture.Wife)) { - newCape = etf$wife; - } else { - newCape = null; - } - if (newCape != null) { - SkinTextures old = cir.getReturnValue(); - cir.setReturnValue(new SkinTextures( - old.texture(), - old.textureUrl(), - newCape, - old.elytraTexture(), - old.model(), - old.secure() - )); - } - } -} \ No newline at end of file diff --git a/common/src/main/java/traben/entity_texture_features/mixin/entity/renderer/feature/MixinCapeFeatureRenderer.java b/common/src/main/java/traben/entity_texture_features/mixin/entity/renderer/feature/MixinCapeFeatureRenderer.java deleted file mode 100644 index 92f36dc9..00000000 --- a/common/src/main/java/traben/entity_texture_features/mixin/entity/renderer/feature/MixinCapeFeatureRenderer.java +++ /dev/null @@ -1,88 +0,0 @@ -package traben.entity_texture_features.mixin.entity.renderer.feature; - -import net.minecraft.client.network.AbstractClientPlayerEntity; -import net.minecraft.client.render.OverlayTexture; -import net.minecraft.client.render.RenderLayer; -import net.minecraft.client.render.VertexConsumer; -import net.minecraft.client.render.VertexConsumerProvider; -import net.minecraft.client.render.entity.feature.CapeFeatureRenderer; -import net.minecraft.client.render.entity.feature.FeatureRenderer; -import net.minecraft.client.render.entity.feature.FeatureRendererContext; -import net.minecraft.client.render.entity.model.PlayerEntityModel; -import net.minecraft.client.util.math.MatrixStack; -import net.minecraft.util.Identifier; -import org.spongepowered.asm.mixin.Mixin; -import org.spongepowered.asm.mixin.Unique; -import org.spongepowered.asm.mixin.injection.At; -import org.spongepowered.asm.mixin.injection.Inject; -import org.spongepowered.asm.mixin.injection.ModifyArg; -import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; -import traben.entity_texture_features.ETFClientCommon; -import traben.entity_texture_features.ETFVersionDifferenceHandler; -import traben.entity_texture_features.config.screens.skin.ETFConfigScreenSkinTool; -import traben.entity_texture_features.features.ETFManager; -import traben.entity_texture_features.features.ETFRenderContext; -import traben.entity_texture_features.features.player.ETFPlayerTexture; - -import static traben.entity_texture_features.ETFClientCommon.MOD_ID; - -@Mixin(CapeFeatureRenderer.class) -public abstract class MixinCapeFeatureRenderer extends FeatureRenderer> { - //private static final Identifier dev_cape = new Identifier(MOD_ID, "textures/capes/etf.png"); - @Unique - private static final Identifier dev_cape_e = new Identifier(MOD_ID, "textures/capes/etf_e.png"); - //private static final Identifier wife_cape = new Identifier(MOD_ID, "textures/capes/wife.png"); - @Unique - AbstractClientPlayerEntity etf$player = null; - - @SuppressWarnings("unused") - public MixinCapeFeatureRenderer(FeatureRendererContext> context) { - super(context); - } - - @Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/network/AbstractClientPlayerEntity;FFFFFF)V", - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/entity/model/PlayerEntityModel;renderCape(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumer;II)V", - shift = At.Shift.AFTER)) - private void etf$injected(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, AbstractClientPlayerEntity abstractClientPlayerEntity, float f, float g, float h, float j, float k, float l, CallbackInfo ci) { - //custom rendering required as ETF uses a different render layer to allow transparent capes - // the return of getCapeTexture() from abstract client is ignored here, but it was required for enabling capes to render for those players and also for elytras - ETFPlayerTexture playerTexture = ETFManager.getInstance().getPlayerTexture(abstractClientPlayerEntity, abstractClientPlayerEntity.getSkinTextures().texture()); - //can load these textures - if (ETFVersionDifferenceHandler.isFabric() == ETFVersionDifferenceHandler.isThisModLoaded("fabric")) { - if (playerTexture != null && playerTexture.capeType != ETFConfigScreenSkinTool.CapeType.NONE) { - playerTexture.renderFeatures(matrixStack, vertexConsumerProvider, i, this.getContextModel()); - } else if (abstractClientPlayerEntity.getUuid().equals(ETFPlayerTexture.Dev)) { - ETFRenderContext.preventRenderLayerTextureModify(); - VertexConsumer emissiveVert = vertexConsumerProvider.getBuffer(RenderLayer.getEntityTranslucent(dev_cape_e)); - ETFRenderContext.allowRenderLayerTextureModify(); - ETFRenderContext.startSpecialRenderOverlayPhase(); - (this.getContextModel()).renderCape(matrixStack, emissiveVert, ETFClientCommon.EMISSIVE_FEATURE_LIGHT_VALUE, OverlayTexture.DEFAULT_UV); - ETFRenderContext.endSpecialRenderOverlayPhase(); - } - } - } - - @Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/network/AbstractClientPlayerEntity;FFFFFF)V", - at = @At("HEAD")) - private void injected(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, AbstractClientPlayerEntity abstractClientPlayerEntity, float f, float g, float h, float j, float k, float l, CallbackInfo ci) { - etf$player = abstractClientPlayerEntity; - } - - @ModifyArg( - method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/client/network/AbstractClientPlayerEntity;FFFFFF)V", - at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/VertexConsumerProvider;getBuffer(Lnet/minecraft/client/render/RenderLayer;)Lnet/minecraft/client/render/VertexConsumer;"), - index = 0 - ) - private RenderLayer mixin(RenderLayer layer) { - if (etf$player != null) { - ETFRenderContext.preventRenderLayerTextureModify(); - RenderLayer layer2 = RenderLayer.getEntityTranslucent(etf$player.getSkinTextures().capeTexture()); - ETFRenderContext.allowRenderLayerTextureModify(); - return layer2; - } - return layer; - } - -} - - diff --git a/common/src/main/java/traben/entity_texture_features/mixin/entity/renderer/feature/MixinElytraFeatureRenderer.java b/common/src/main/java/traben/entity_texture_features/mixin/entity/renderer/feature/MixinElytraFeatureRenderer.java new file mode 100644 index 00000000..0835df28 --- /dev/null +++ b/common/src/main/java/traben/entity_texture_features/mixin/entity/renderer/feature/MixinElytraFeatureRenderer.java @@ -0,0 +1,29 @@ +package traben.entity_texture_features.mixin.entity.renderer.feature; + +import net.minecraft.client.render.VertexConsumerProvider; +import net.minecraft.client.render.entity.feature.ElytraFeatureRenderer; +import net.minecraft.client.util.math.MatrixStack; +import net.minecraft.entity.LivingEntity; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import traben.entity_texture_features.features.ETFRenderContext; + +@Mixin(ElytraFeatureRenderer.class) +public abstract class MixinElytraFeatureRenderer { + + + @Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/entity/LivingEntity;FFFFFF)V", + at = @At(value = "HEAD")) + private void etf$markPatchable(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, T livingEntity, float f, float g, float h, float j, float k, float l, CallbackInfo ci) { + ETFRenderContext.allowTexturePatching(); + } + @Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/entity/LivingEntity;FFFFFF)V", + at = @At(value = "RETURN")) + private void etf$markPatchableEnd(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, T livingEntity, float f, float g, float h, float j, float k, float l, CallbackInfo ci) { + ETFRenderContext.preventTexturePatching(); + } +} + + diff --git a/common/src/main/resources/assets/entity_texture_features/lang/en_us.json b/common/src/main/resources/assets/entity_texture_features/lang/en_us.json index ff955b12..b8bca6d8 100644 --- a/common/src/main/resources/assets/entity_texture_features/lang/en_us.json +++ b/common/src/main/resources/assets/entity_texture_features/lang/en_us.json @@ -203,5 +203,9 @@ "config.entity_texture_features.player_skin_editor.reason_4": "-ETF has not yet had the chance to parse the client players skin,\n try open a world and open third person or your inventory\n to see yourself for a few seconds first.", "config.entity_texture_features.button_tooltip": "Opens the Entity Texture Features config screen.", "config.entity_texture_features.log_creation": "Log texture initialization", - "config.entity_texture_features.log_creation.tooltip": "Logs details about a texture when it is first initialized.\nE.G. what variants are found if any, what has emissives, etc" + "config.entity_texture_features.log_creation.tooltip": "Logs details about a texture when it is first initialized.\nE.G. what variants are found if any, what has emissives, etc", + "config.entity_texture_features.debug_screen.title": "Debug settings", + "config.entity_texture_features.debug_screen.mass_log": "Send ALL! ETF data to the log", + "config.entity_texture_features.debug_screen.mass_log.done": "Send ALL! ETF data to the log", + "config.entity_texture_features.debug_screen.mass_log.tooltip": "This setting will print out all of ETF's current texture data to the log.\n including all textures, all texture variation groups\n anything registered to ETF" } diff --git a/common/src/main/resources/assets/entity_texture_features/textures/capes/default_elytra.png b/common/src/main/resources/assets/entity_texture_features/textures/capes/default_elytra.png deleted file mode 100644 index d1229faf..00000000 Binary files a/common/src/main/resources/assets/entity_texture_features/textures/capes/default_elytra.png and /dev/null differ diff --git a/common/src/main/resources/assets/entity_texture_features/textures/capes/etf.png b/common/src/main/resources/assets/entity_texture_features/textures/capes/etf.png deleted file mode 100644 index 5cb19a44..00000000 Binary files a/common/src/main/resources/assets/entity_texture_features/textures/capes/etf.png and /dev/null differ diff --git a/common/src/main/resources/assets/entity_texture_features/textures/capes/etf_e.png b/common/src/main/resources/assets/entity_texture_features/textures/capes/etf_e.png deleted file mode 100644 index 5aab7968..00000000 Binary files a/common/src/main/resources/assets/entity_texture_features/textures/capes/etf_e.png and /dev/null differ diff --git a/common/src/main/resources/assets/entity_texture_features/textures/capes/wife.png b/common/src/main/resources/assets/entity_texture_features/textures/capes/wife.png deleted file mode 100644 index 53a2abc2..00000000 Binary files a/common/src/main/resources/assets/entity_texture_features/textures/capes/wife.png and /dev/null differ diff --git a/common/src/main/resources/entity_texture_features-common.mixins.json b/common/src/main/resources/entity_texture_features-common.mixins.json index 8dc4f710..80ef9bcb 100644 --- a/common/src/main/resources/entity_texture_features-common.mixins.json +++ b/common/src/main/resources/entity_texture_features-common.mixins.json @@ -15,7 +15,6 @@ "accessor.TooltipAccessor", "entity.block.MixinMobSpawnerBlockEntityRenderer", "entity.block.MixinSkullBlockEntityRenderer", - "entity.misc.MixinAbstractClientPlayerEntity", "entity.misc.MixinBlazeEntity", "entity.misc.MixinBlockEntity", "entity.misc.MixinBlockEntityRenderDispatcher", @@ -29,12 +28,12 @@ "entity.renderer.MixinLivingEntityRenderer", "entity.renderer.MixinPaintingEntityRenderer", "entity.renderer.MixinPlayerEntityRenderer", - "entity.renderer.feature.MixinCapeFeatureRenderer", "entity.renderer.feature.MixinMooshroomMushroomFeatureRenderer", "entity.renderer.feature.MixinShoulderParrotFeatureRenderer", "entity.renderer.feature.MixinWardenFeatureRenderer", "reloading.MixinMinecraftClient", - "reloading.MixinResourceReload" + "reloading.MixinResourceReload", + "entity.renderer.feature.MixinElytraFeatureRenderer" ], "mixins": [ ], diff --git a/fabric/src/main/java/traben/entity_texture_features/fabric/mixin/MixinArmorFeatureRenderer.java b/fabric/src/main/java/traben/entity_texture_features/fabric/mixin/MixinArmorFeatureRenderer.java index cb38629f..494bafdd 100644 --- a/fabric/src/main/java/traben/entity_texture_features/fabric/mixin/MixinArmorFeatureRenderer.java +++ b/fabric/src/main/java/traben/entity_texture_features/fabric/mixin/MixinArmorFeatureRenderer.java @@ -44,7 +44,7 @@ public MixinArmorFeatureRenderer(FeatureRendererContext context) { at = @At(value = "HEAD")) private void etf$markNotToChange(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, T livingEntity, float f, float g, float h, float j, float k, float l, CallbackInfo ci) { ETFRenderContext.preventRenderLayerTextureModify(); - ETFRenderContext.allowTexturePatching(); +// ETFRenderContext.allowTexturePatching(); } @Inject(method = "render(Lnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;ILnet/minecraft/entity/LivingEntity;FFFFFF)V",