diff --git a/Changelog.md b/Changelog.md index 29a27d8..c0a82e4 100644 --- a/Changelog.md +++ b/Changelog.md @@ -75,6 +75,7 @@ Now weather will follow the current weather, it will rain heavier when a thunder ### Internal - Revamped GUI's they are now extremely easy to use and create, and the pages components are now independent of each others +- FBP now use Red Core - GUI's text colors now never uses decimal colors directly and should use when possible hexadecimal colors when possible - Added documentation for Vector2D, Vector3D, and FBPRenderer - Switched to [Raven] amazing [RetroFuturaGradle] @@ -87,14 +88,7 @@ Now weather will follow the current weather, it will rain heavier when a thunder - Renamed most of the variables from unreadable names to readable names - Finished removing useless `@SideOnly` - Removed useless `isRemote` checks - -#### Vectors Redesign - -In 0.7 and before FBP was using Minecraft `Vec2f` and `Vec3d` but they have a few problems, by example `Vec3d` lack features like `set`, `copy` or even `scale` plus some of its features are written in a complex and slow manner. -Also, they have a `ZERO` variable which is useless and takes resource's for nothing this is even worst for `Vec2f` since it has tons of useless variables. -And having control over them is really nice, so we need to make our own. - -Introducing `Vector2D` and `Vector3D` the brand-new vectors for FBP, which are faster easier to work with and come with great documentation! +- Renamed the plugin from `FMLPlugin` to `FBPPlugin` #### Changes in exception handling diff --git a/build.gradle b/build.gradle index a784c73..facea52 100644 --- a/build.gradle +++ b/build.gradle @@ -32,7 +32,7 @@ minecraft { username = 'Desoroxxx' - extraRunJvmArguments.addAll('-Xmx6G', '-Xms4G', '-Dforge.logging.console.level=debug', '-Dmixin.hotSwap=true', '-Dmixin.checks.interfaces=true', '-Dmixin.debug.export=true') + extraRunJvmArguments.addAll('-Xmx6G', '-Xms4G', '-Dforge.logging.console.level=debug', '-Dmixin.hotSwap=true', '-Dmixin.checks.interfaces=true', '-Dmixin.debug.export=true', "-Dfml.coreMods.load=io.redstudioragnarok.${project.id}.asm.FBPPlugin") injectedTags.put('ID', project.id) injectedTags.put('VERSION', project.version) @@ -84,13 +84,13 @@ repositories { } dependencies { - implementation 'Red-Studio-Ragnarok:Red-Core:0.2' - sources 'Red-Studio-Ragnarok:Red-Core:0.2:sources@jar' + implementation 'Red-Studio-Ragnarok:Red-Core:0.4-Dev-1' + sources 'Red-Studio-Ragnarok:Red-Core:0.4-Dev-1:sources@jar' implementation 'meldexun:MatrixUtil:1.2.2@jar' embed 'meldexun:MatrixUtil:1.2.2@jar' - String mixin = modUtils.enableMixins('zone.rong:mixinbooter:8.2', "mixins.${project.id}.refmap.json") + String mixin = modUtils.enableMixins('zone.rong:mixinbooter:8.3', "mixins.${project.id}.refmap.json") api (mixin) { transitive = false } annotationProcessor 'org.ow2.asm:asm-debug-all:5.2' annotationProcessor 'com.google.guava:guava:24.1.1-jre' @@ -120,7 +120,7 @@ jar { manifest.attributes([ 'ModSide': 'CLIENT', 'FMLAT': "${project.id}_at.cfg", - 'FMLCorePlugin': "io.redstudioragnarok.${project.id}.asm.FMLPlugin", + 'FMLCorePlugin': "io.redstudioragnarok.${project.id}.asm.FBPPlugin", 'FMLCorePluginContainsFMLMod': 'true', 'ForceLoadAsMod': 'true' ]) diff --git a/src/main/java/io/redstudioragnarok/fbp/FBP.java b/src/main/java/io/redstudioragnarok/fbp/FBP.java index a39ee56..fb5c61c 100644 --- a/src/main/java/io/redstudioragnarok/fbp/FBP.java +++ b/src/main/java/io/redstudioragnarok/fbp/FBP.java @@ -32,7 +32,7 @@ // | $$ /$$__ $$| $$ | $$| $$ | $$| $$_____/| $$ | $$ \ $$| $$| $$ | $$| $$ | $$_ $$ | $$ /$$__ $$| $$ | $$ /$$| $$| $$ | $$| $$_____/ \____ $$ // | $$ | $$$$$$$| $$ | $$| $$$$$$$| $$| $$$$$$$| $$ | $$$$$$$/| $$| $$$$$$/| $$$$$$$| $$ \ $$ | $$ | $$$$$$$| $$ | $$$$/| $$| $$$$$$$| $$| $$$$$$$ /$$$$$$$/ // |__/ \_______/|__/ |__/ \_______/|__/ \_______/|__/ |_______/ |__/ \______/ \_______/|__/ \__/ |__/ \_______/|__/ \___/ |__/ \_______/|__/ \_______/|_______/ -@Mod(clientSideOnly = true, modid = ModReference.ID, name = ModReference.NAME, version = ModReference.VERSION, guiFactory = "io.redstudioragnarok.fbp.config.FBPConfigGuiFactory", updateJSON = "https://raw.githubusercontent.com/Red-Studio-Ragnarok/Fancier-Block-Particles/main/update.json") +@Mod(clientSideOnly = true, modid = ModReference.ID, name = ModReference.NAME, version = ModReference.VERSION, dependencies = "required-after:redcore@[0.4-Dev-1,)", guiFactory = "io.redstudioragnarok.fbp.config.FBPConfigGuiFactory", updateJSON = "https://raw.githubusercontent.com/Red-Studio-Ragnarok/Fancier-Block-Particles/main/update.json") public class FBP { public static final Minecraft mc = Minecraft.getMinecraft(); diff --git a/src/main/java/io/redstudioragnarok/fbp/asm/FMLPlugin.java b/src/main/java/io/redstudioragnarok/fbp/asm/FBPPlugin.java similarity index 82% rename from src/main/java/io/redstudioragnarok/fbp/asm/FMLPlugin.java rename to src/main/java/io/redstudioragnarok/fbp/asm/FBPPlugin.java index 3527ef7..1b1f74c 100644 --- a/src/main/java/io/redstudioragnarok/fbp/asm/FMLPlugin.java +++ b/src/main/java/io/redstudioragnarok/fbp/asm/FBPPlugin.java @@ -4,11 +4,12 @@ import zone.rong.mixinbooter.IEarlyMixinLoader; import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Map; @IFMLLoadingPlugin.TransformerExclusions("io.redstudioragnarok.fbp.asm") -public class FMLPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader { +public class FBPPlugin implements IFMLLoadingPlugin, IEarlyMixinLoader { @Override public String[] getASMTransformerClass() { @@ -37,7 +38,7 @@ public String getAccessTransformerClass() { @Override public List getMixinConfigs() { - return Arrays.asList("mixins.fbp.json"); + return Collections.singletonList("mixins.fbp.json"); } } diff --git a/src/main/java/io/redstudioragnarok/fbp/gui/BasePage.java b/src/main/java/io/redstudioragnarok/fbp/gui/BasePage.java index 8adfc92..837e288 100644 --- a/src/main/java/io/redstudioragnarok/fbp/gui/BasePage.java +++ b/src/main/java/io/redstudioragnarok/fbp/gui/BasePage.java @@ -16,6 +16,7 @@ import java.awt.Desktop; import java.io.IOException; +import java.net.URI; import java.util.Arrays; import static io.redstudioragnarok.fbp.gui.GuiConfirmation.Action.DefaultConfig; @@ -91,7 +92,7 @@ protected void actionPerformed(final GuiButton button) { break; case -4: try { - Desktop.getDesktop().browse(ModReference.newIssueLink); + Desktop.getDesktop().browse(new URI("https://linkify.cz/FancierBugReport")); } catch (Exception exception) { // Todo: (Debug Mode) This should count to the problem counter and should output a stack trace } diff --git a/src/main/java/io/redstudioragnarok/fbp/gui/GuiUtils.java b/src/main/java/io/redstudioragnarok/fbp/gui/GuiUtils.java index 351ebc3..f5f1234 100644 --- a/src/main/java/io/redstudioragnarok/fbp/gui/GuiUtils.java +++ b/src/main/java/io/redstudioragnarok/fbp/gui/GuiUtils.java @@ -7,7 +7,7 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.util.Color; -import static io.redstudioragnarok.fbp.utils.ModReference.redLog; +import static io.redstudioragnarok.fbp.utils.ModReference.RED_LOG; public class GuiUtils { @@ -67,7 +67,7 @@ public static int hexToDecimalColor(final String hexColor) { } catch (NumberFormatException numberFormatException) { // Todo: (Debug Mode) This should count to the problem counter - redLog.printFramedError("GUI Rendering", "Hexadecimal to decimal color conversion failed", "Non critical exception falling back to white", numberFormatException.getMessage(), "At:" + numberFormatException.getStackTrace()[3].toString()); + RED_LOG.printFramedError("GUI Rendering", "Hexadecimal to decimal color conversion failed", "Non critical exception falling back to white", numberFormatException.getMessage(), "At:" + numberFormatException.getStackTrace()[3].toString()); // Return the decimal value for white return 16777215; diff --git a/src/main/java/io/redstudioragnarok/fbp/utils/ModReference.java b/src/main/java/io/redstudioragnarok/fbp/utils/ModReference.java index 8c4006c..c371379 100644 --- a/src/main/java/io/redstudioragnarok/fbp/utils/ModReference.java +++ b/src/main/java/io/redstudioragnarok/fbp/utils/ModReference.java @@ -5,9 +5,6 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import java.net.URI; -import java.net.URISyntaxException; - /** * This class defines constants for FBP. *

@@ -19,19 +16,5 @@ public class ModReference { public static final String NAME = "Fancier Block Particles"; public static final String VERSION = Tags.VERSION; public static final Logger LOG = LogManager.getLogger(ID); - - public static URI newIssueLink; - public static RedLogger redLog; - - static { - try { - newIssueLink = new URI("https://linkify.cz/FancierBugReport"); - - redLog = new RedLogger(NAME, new URI("https://linkify.cz/ValkyrieBugReport"), LOG, - "Hang in there, just a minor bump on the road to particle greatness!" - ); - } catch (URISyntaxException e) { - // Todo: (Debug Mode) This should count to the problem counter and should output a stack trace - } - } + public static final RedLogger RED_LOG = new RedLogger(NAME, "https://linkify.cz/ValkyrieBugReport", LOG, "Hang in there, just a minor bump on the road to particle greatness!"); }