Fixes typos and float instead of double
All checks were successful
KnarCraft/KnarLib/pipeline/head This commit looks good

This commit is contained in:
Kristian Knarvik 2024-04-30 02:46:19 +02:00
parent e9efb7cd34
commit 75d4f84884
2 changed files with 8 additions and 8 deletions

View File

@ -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 <p>The message to get the translation of</p>
* @return <p>The raw translation</p>
*/
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 <p>The message to get the colored translation of</p>
* @return <p>The colored raw translation</p>
*/
public @NotNull String getUnformattedColoredMessage(@NotNull TranslatableMessage translatableMessage) {
public @NotNull String getUnFormattedColoredMessage(@NotNull TranslatableMessage translatableMessage) {
return ColorHelper.translateColorCodes(this.translator.getTranslatedMessage(translatableMessage),
this.colorConversion);
}

View File

@ -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);