From 770cb57335c7b18291a8a4727384b7b0e9e1daa5 Mon Sep 17 00:00:00 2001 From: telontelvarost Date: Sat, 16 Mar 2024 19:09:27 -0400 Subject: [PATCH 1/6] UDOC-0 - Disable broken shaders ui; Update readme --- README.md | 67 +++++++------------ gradle.properties | 4 +- .../mixin/gui/VideoSettingsScreenMixin.java | 54 +++++++-------- 3 files changed, 52 insertions(+), 73 deletions(-) diff --git a/README.md b/README.md index 9379142..94f05ae 100644 --- a/README.md +++ b/README.md @@ -1,44 +1,23 @@ -# Fabric Example Mod with BIN Mappings for beta 1.7.3 server + client - -## Setup - -For setup instructions please see the [fabric wiki page](https://fabricmc.net/wiki/tutorial:setup) that relates to the IDE that you are using. - -NOTE: There is no Fabric-API for beta 1.7.3! -There is [StationLoader](com/modificationstation/StationLoader) and [Cursed-Legacy-API](https://github.com/minecraft-cursed-legacy/Cursed-Legacy-API) though. - -Extra steps for better mixin making in IntelliJ: - -1. Go to `File > Settings...` -2. Go to `Plugins > The gear in the top middle > Manage Plugin Repositories...` -3. Press `+` and add one of these: (You can check your version in `Help > About`) - - If using 2019.2: https://raw.githubusercontent.com/Earthcomputer/MinecraftDev/dev_new/updates/updatePlugins-192.xml - - If using 2019.3: https://raw.githubusercontent.com/Earthcomputer/MinecraftDev/dev_new/updates/updatePlugins-193.xml - - If using 2020.1: https://raw.githubusercontent.com/Earthcomputer/MinecraftDev/dev_new/updates/updatePlugins-201.xml -4. Refresh the plugin repo (restarting will do the trick). -5. Go back to plugins and install the `Minecraft Development` plugin. -6. Restart again. -7. Profit! - -## Using a Mod - -You will want to use the [Cursed Fabric MultiMC Instance](https://github.com/calmilamsy/Cursed-Fabric-MultiMC) - -## Common Issues - -**Gradle says something about not being able to resolve Minecraft or another dependency!** -Just go into `C:\users\\.gradle\caches` (`~/.gradle/caches` on other OSes), delete `fabric-loom` and refresh Gradle. - -**My Minecraft run profile is missing from the top right!** -Go into `Run Configurations > Edit...` and click the dropdown for applications. Click on minecraft and press OK. Both client and server run profiles should both in the rop right now. - -**I moved my project and everything broke!** -Go into run configurations and double check your `VM Options` and `Working Directory` parameters. - -**X mixin isnt working!** -Double check your target and method parameters and make sure you have filled out your `@At` parameter if required. -If you are still having issues, join the [ModStation Discord](https://discord.gg/8Qky5XY) and contact someone there. - -## License - -This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects. +# Macula (client-side only mod) + +Mod Version: 1.1 +Requirements: Babric (https://github.com/babric/prism-instance) +Compatibility: +Incompatible with SmoothBeta +Download Links: +Modrinth: https://modrinth.com/mod/macula +GitHub: https://github.com/mineLdiver/Macula +Info: Shaders mod for Minecraft Beta 1.7.3 updated to include more features, like dynamic shadows. +Previously known as just GLSL shaders. + +### Common Error +There is no way to disable the following error: + +``` +########## GL ERROR ########## +@ Post render +1282: Invalid operation +``` + +A future modder will need to turn off OpenGL errors for it to go away. +This is easier said than done. Hence, it hasn't been done yet. diff --git a/gradle.properties b/gradle.properties index 94a3c17..592f1e8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,9 +6,9 @@ org.gradle.parallel=true # check these on https://babric.github.io/develop/ minecraft_version=b1.7.3 yarn_mappings=b1.7.3-build.2 - loader_version=0.14.19-babric.1 + loader_version=0.14.24-babric.1 # Mod Properties - mod_version = 1.1 + mod_version = 1.1-beta-unleashed maven_group = net.mine_diver archives_base_name = Macula diff --git a/src/main/java/net/mine_diver/macula/mixin/gui/VideoSettingsScreenMixin.java b/src/main/java/net/mine_diver/macula/mixin/gui/VideoSettingsScreenMixin.java index 2ad2788..147a725 100644 --- a/src/main/java/net/mine_diver/macula/mixin/gui/VideoSettingsScreenMixin.java +++ b/src/main/java/net/mine_diver/macula/mixin/gui/VideoSettingsScreenMixin.java @@ -13,33 +13,33 @@ @Mixin(VideoSettings.class) public class VideoSettingsScreenMixin extends ScreenBase { - @Unique - private static final int MACULA$SHADERS_BUTTON_ID = "macula:shaders".hashCode(); +// @Unique +// private static final int MACULA$SHADERS_BUTTON_ID = "macula:shaders".hashCode(); - @ModifyVariable( - method = "init", - at = @At( - value = "CONSTANT", - args = "stringValue=gui.done" - ), - index = 2 - ) - private int macula_addShadersButton(int y) { - //noinspection unchecked - buttons.add(new Button(MACULA$SHADERS_BUTTON_ID, width / 2 - 155 + y % 2 * 160, height / 6 + 24 * (y >> 1), 150, 20, "Shaders...")); - return y + 1; - } +// @ModifyVariable( +// method = "init", +// at = @At( +// value = "CONSTANT", +// args = "stringValue=gui.done" +// ), +// index = 2 +// ) +// private int macula_addShadersButton(int y) { +// //noinspection unchecked +// buttons.add(new Button(MACULA$SHADERS_BUTTON_ID, width / 2 - 155 + y % 2 * 160, height / 6 + 24 * (y >> 1), 150, 20, "Shaders...")); +// return y + 1; +// } - @Inject( - method = "buttonClicked", - at = @At("HEAD"), - cancellable = true - ) - private void macula_shadersButtonClicked(Button button, CallbackInfo ci) { - if (button.id == MACULA$SHADERS_BUTTON_ID) { - minecraft.options.saveOptions(); - minecraft.openScreen(new ShadersScreen(this)); - ci.cancel(); - } - } +// @Inject( +// method = "buttonClicked", +// at = @At("HEAD"), +// cancellable = true +// ) +// private void macula_shadersButtonClicked(Button button, CallbackInfo ci) { +// if (button.id == MACULA$SHADERS_BUTTON_ID) { +// minecraft.options.saveOptions(); +// minecraft.openScreen(new ShadersScreen(this)); +// ci.cancel(); +// } +// } } From 6b30f3f1764d09014110beb5856027c048baef34 Mon Sep 17 00:00:00 2001 From: telontelvarost Date: Sat, 16 Mar 2024 19:11:04 -0400 Subject: [PATCH 2/6] UDOC-0 - Update readme --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 94f05ae..e67ef54 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,17 @@ # Macula (client-side only mod) Mod Version: 1.1 + Requirements: Babric (https://github.com/babric/prism-instance) -Compatibility: -Incompatible with SmoothBeta -Download Links: -Modrinth: https://modrinth.com/mod/macula -GitHub: https://github.com/mineLdiver/Macula + +Compatibility: Incompatible with SmoothBeta + +### Download Links: +* Modrinth: https://modrinth.com/mod/macula +* GitHub: https://github.com/mineLdiver/Macula + Info: Shaders mod for Minecraft Beta 1.7.3 updated to include more features, like dynamic shadows. + Previously known as just GLSL shaders. ### Common Error From 56027327851a347aea4f2cd57082f391be0951db Mon Sep 17 00:00:00 2001 From: telontelvarost Date: Sat, 16 Mar 2024 19:11:53 -0400 Subject: [PATCH 3/6] UDOC-0 - Update readme --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index e67ef54..ba66f2e 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,7 @@ Requirements: Babric (https://github.com/babric/prism-instance) Compatibility: Incompatible with SmoothBeta -### Download Links: -* Modrinth: https://modrinth.com/mod/macula -* GitHub: https://github.com/mineLdiver/Macula +Modrinth: https://modrinth.com/mod/macula Info: Shaders mod for Minecraft Beta 1.7.3 updated to include more features, like dynamic shadows. From 56a1dcfb8998e8eb7767a98eef2b6ffa658d2e73 Mon Sep 17 00:00:00 2001 From: telontelvarost Date: Sun, 17 Mar 2024 22:28:15 -0400 Subject: [PATCH 4/6] UDOC-0 - Fix broken ui rather than removing it --- .../java/net/mine_diver/macula/Shaders.java | 6 ++- .../mixin/gui/VideoSettingsScreenMixin.java | 54 +++++++++---------- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/src/main/java/net/mine_diver/macula/Shaders.java b/src/main/java/net/mine_diver/macula/Shaders.java index 9978982..2ec1f88 100644 --- a/src/main/java/net/mine_diver/macula/Shaders.java +++ b/src/main/java/net/mine_diver/macula/Shaders.java @@ -1008,7 +1008,11 @@ public static String getEnumShaderOption(ShaderOption eso) { public static void setShaderPack(String shaderPack) { currentShaderName = shaderPack; shadersConfig.setProperty(ShaderOption.SHADER_PACK.getPropertyKey(), shaderPack); - loadShaderPack(); + if (null != MinecraftInstance.get()) { + if (null != MinecraftInstance.get().player) { + loadShaderPack(); + } + } } public static void loadShaderPack() { diff --git a/src/main/java/net/mine_diver/macula/mixin/gui/VideoSettingsScreenMixin.java b/src/main/java/net/mine_diver/macula/mixin/gui/VideoSettingsScreenMixin.java index 147a725..2ad2788 100644 --- a/src/main/java/net/mine_diver/macula/mixin/gui/VideoSettingsScreenMixin.java +++ b/src/main/java/net/mine_diver/macula/mixin/gui/VideoSettingsScreenMixin.java @@ -13,33 +13,33 @@ @Mixin(VideoSettings.class) public class VideoSettingsScreenMixin extends ScreenBase { -// @Unique -// private static final int MACULA$SHADERS_BUTTON_ID = "macula:shaders".hashCode(); + @Unique + private static final int MACULA$SHADERS_BUTTON_ID = "macula:shaders".hashCode(); -// @ModifyVariable( -// method = "init", -// at = @At( -// value = "CONSTANT", -// args = "stringValue=gui.done" -// ), -// index = 2 -// ) -// private int macula_addShadersButton(int y) { -// //noinspection unchecked -// buttons.add(new Button(MACULA$SHADERS_BUTTON_ID, width / 2 - 155 + y % 2 * 160, height / 6 + 24 * (y >> 1), 150, 20, "Shaders...")); -// return y + 1; -// } + @ModifyVariable( + method = "init", + at = @At( + value = "CONSTANT", + args = "stringValue=gui.done" + ), + index = 2 + ) + private int macula_addShadersButton(int y) { + //noinspection unchecked + buttons.add(new Button(MACULA$SHADERS_BUTTON_ID, width / 2 - 155 + y % 2 * 160, height / 6 + 24 * (y >> 1), 150, 20, "Shaders...")); + return y + 1; + } -// @Inject( -// method = "buttonClicked", -// at = @At("HEAD"), -// cancellable = true -// ) -// private void macula_shadersButtonClicked(Button button, CallbackInfo ci) { -// if (button.id == MACULA$SHADERS_BUTTON_ID) { -// minecraft.options.saveOptions(); -// minecraft.openScreen(new ShadersScreen(this)); -// ci.cancel(); -// } -// } + @Inject( + method = "buttonClicked", + at = @At("HEAD"), + cancellable = true + ) + private void macula_shadersButtonClicked(Button button, CallbackInfo ci) { + if (button.id == MACULA$SHADERS_BUTTON_ID) { + minecraft.options.saveOptions(); + minecraft.openScreen(new ShadersScreen(this)); + ci.cancel(); + } + } } From b2f8827662d07dfc3567442c9b44744da33f3537 Mon Sep 17 00:00:00 2001 From: telontelvarost Date: Sun, 17 Mar 2024 22:28:45 -0400 Subject: [PATCH 5/6] UDOC-0 - Update version number --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index 592f1e8..0c530f7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,6 +9,6 @@ org.gradle.parallel=true loader_version=0.14.24-babric.1 # Mod Properties - mod_version = 1.1-beta-unleashed + mod_version = 1.1.1 maven_group = net.mine_diver archives_base_name = Macula From 1ef36ac0376525fd0e88e9cf8f4beeb904369819 Mon Sep 17 00:00:00 2001 From: telontelvarost Date: Mon, 18 Mar 2024 19:24:55 -0400 Subject: [PATCH 6/6] UDOC-0 - Revert shader when not loaded into a world --- README.md | 2 +- src/main/java/net/mine_diver/macula/Shaders.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index ba66f2e..5af7d3f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Macula (client-side only mod) -Mod Version: 1.1 +Mod Version: 1.1.1 Requirements: Babric (https://github.com/babric/prism-instance) diff --git a/src/main/java/net/mine_diver/macula/Shaders.java b/src/main/java/net/mine_diver/macula/Shaders.java index 2ec1f88..32cc442 100644 --- a/src/main/java/net/mine_diver/macula/Shaders.java +++ b/src/main/java/net/mine_diver/macula/Shaders.java @@ -1006,10 +1006,10 @@ public static String getEnumShaderOption(ShaderOption eso) { } public static void setShaderPack(String shaderPack) { - currentShaderName = shaderPack; - shadersConfig.setProperty(ShaderOption.SHADER_PACK.getPropertyKey(), shaderPack); if (null != MinecraftInstance.get()) { if (null != MinecraftInstance.get().player) { + currentShaderName = shaderPack; + shadersConfig.setProperty(ShaderOption.SHADER_PACK.getPropertyKey(), shaderPack); loadShaderPack(); } }