Skip to content

Commit

Permalink
feat(utils): drawParticleLine overload methods
Browse files Browse the repository at this point in the history
  • Loading branch information
WakelessSloth56 committed Aug 10, 2022
1 parent 3e7e4dd commit 144bf83
Showing 1 changed file with 13 additions and 3 deletions.
@@ -1,6 +1,7 @@
package org.auioc.mcmod.arnicalib.utils.game;

import net.minecraft.client.Minecraft;
import net.minecraft.core.Vec3i;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.util.Mth;
import net.minecraft.world.phys.Vec3;
Expand All @@ -9,9 +10,8 @@ public class ParticleUtils {

private static final Minecraft MC = Minecraft.getInstance();

public static void drawLine(Vec3 startPoint, Vec3 endPoint, double stepLength) {
drawLine(startPoint.x, startPoint.y, startPoint.z, endPoint.x, endPoint.y, endPoint.z, stepLength);
}
/*================================================================================================================*/
// #region drawLine

public static void drawLine(double x1, double y1, double z1, double x2, double y2, double z2, double stepLength) {
double diffX = (x2 - x1);
Expand All @@ -34,4 +34,14 @@ public static void drawLine(double x1, double y1, double z1, double x2, double y
}
}

public static void drawLine(Vec3 startPoint, Vec3 endPoint, double stepLength) {
drawLine(startPoint.x, startPoint.y, startPoint.z, endPoint.x, endPoint.y, endPoint.z, stepLength);
}

public static void drawLine(Vec3i startPoint, Vec3i endPoint, double stepLength) {
drawLine(startPoint.getX(), startPoint.getY(), startPoint.getZ(), endPoint.getX(), endPoint.getY(), endPoint.getZ(), stepLength);
}

// #endregion drawLine

}

0 comments on commit 144bf83

Please sign in to comment.