From 75d4f84884d01b473893f8a6cb80043d60d98353 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Tue, 30 Apr 2024 02:46:19 +0200 Subject: [PATCH] Fixes typos and float instead of double --- .../net/knarcraft/knarlib/formatting/StringFormatter.java | 8 ++++---- .../java/net/knarcraft/knarlib/util/ParticleHelper.java | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/net/knarcraft/knarlib/formatting/StringFormatter.java b/src/main/java/net/knarcraft/knarlib/formatting/StringFormatter.java index 89eec2d..3462196 100644 --- a/src/main/java/net/knarcraft/knarlib/formatting/StringFormatter.java +++ b/src/main/java/net/knarcraft/knarlib/formatting/StringFormatter.java @@ -149,22 +149,22 @@ public final class StringFormatter { } /** - * Gets the raw, unformatted translation of the given translatable message + * Gets the raw, un-formatted translation of the given translatable message * * @param translatableMessage

The message to get the translation of

* @return

The raw translation

*/ - public @NotNull String getUnformattedMessage(@NotNull TranslatableMessage translatableMessage) { + public @NotNull String getUnFormattedMessage(@NotNull TranslatableMessage translatableMessage) { return this.translator.getTranslatedMessage(translatableMessage); } /** - * Gets the unformatted translation of the given translatable message, with translated color codes + * Gets the un-formatted translation of the given translatable message, with translated color codes * * @param translatableMessage

The message to get the colored translation of

* @return

The colored raw translation

*/ - public @NotNull String getUnformattedColoredMessage(@NotNull TranslatableMessage translatableMessage) { + public @NotNull String getUnFormattedColoredMessage(@NotNull TranslatableMessage translatableMessage) { return ColorHelper.translateColorCodes(this.translator.getTranslatedMessage(translatableMessage), this.colorConversion); } diff --git a/src/main/java/net/knarcraft/knarlib/util/ParticleHelper.java b/src/main/java/net/knarcraft/knarlib/util/ParticleHelper.java index 3763060..f2af114 100644 --- a/src/main/java/net/knarcraft/knarlib/util/ParticleHelper.java +++ b/src/main/java/net/knarcraft/knarlib/util/ParticleHelper.java @@ -55,7 +55,7 @@ public final class ParticleHelper { drawSquare(world, location, particleConfig, blockHeight); drawSquare(world, location.clone().add(0, 1, 0), particleConfig, blockHeight); - for (float y = 0; y <= 1; y += particleConfig.getParticleDensity()) { + for (double y = 0; y <= 1; y += particleConfig.getParticleDensity()) { double height = particleConfig.getHeightOffset() + y; spawnParticle(world, location.clone().add(0, height, 0), particleConfig, blockHeight); spawnParticle(world, location.clone().add(0, height, 1), particleConfig, blockHeight); @@ -86,7 +86,7 @@ public final class ParticleHelper { Double[][] coordinates = new Double[length * 3][]; double height = particleConfig.getHeightOffset() + 0.5; int i = 0; - for (float x = 0; x < 180; x += density) { + for (double x = 0; x < 180; x += density) { if (i >= coordinates.length) { continue; } @@ -171,7 +171,7 @@ public final class ParticleHelper { if (circleCoordinates.get(storedCalculationsId) == null) { Double[][] coordinates = new Double[(int) Math.ceil((180 / density))][]; int i = 0; - for (float x = 0; x < 180; x += density) { + for (double x = 0; x < 180; x += density) { if (i >= coordinates.length) { continue; } @@ -199,7 +199,7 @@ public final class ParticleHelper { */ public static void drawSquare(@NotNull World world, @NotNull Location location, @NotNull ParticleConfig particleConfig, double blockHeight) { - for (float x = 0; x <= 1; x += particleConfig.getParticleDensity()) { + for (double x = 0; x <= 1; x += particleConfig.getParticleDensity()) { spawnParticle(world, location.clone().add(x, particleConfig.getHeightOffset(), 0), particleConfig, blockHeight); spawnParticle(world, location.clone().add(x, particleConfig.getHeightOffset(), 1), particleConfig, blockHeight); spawnParticle(world, location.clone().add(0, particleConfig.getHeightOffset(), x), particleConfig, blockHeight);