|
|
@ -35,12 +35,14 @@ public class MixinBlockRenderer {
|
|
|
|
|
|
|
|
|
|
|
|
public void renderLineBetweenTwoPoints(long x1, long y1, long z1, long x2, long y2, long z2, float red, float green, float blue, float alpha, float width){
|
|
|
|
public void renderLineBetweenTwoPoints(long x1, long y1, long z1, long x2, long y2, long z2, float red, float green, float blue, float alpha, float width){
|
|
|
|
GL11.glPushMatrix();
|
|
|
|
GL11.glPushMatrix();
|
|
|
|
|
|
|
|
GL11.glDisable(GL11.GL_TEXTURE_2D);
|
|
|
|
GL11.glColor4f(red, green, blue, alpha);
|
|
|
|
GL11.glColor4f(red, green, blue, alpha);
|
|
|
|
GL11.glLineWidth(width);
|
|
|
|
GL11.glLineWidth(width);
|
|
|
|
GL11.glBegin(GL11.GL_LINES);
|
|
|
|
GL11.glBegin(GL11.GL_LINE_STRIP);
|
|
|
|
GL11.glVertex3f(Math.floorMod(x1, 16l), Math.floorMod(y1, 16l), Math.floorMod(z1, 16l));
|
|
|
|
GL11.glVertex3f(Math.floorMod(x1, 16l), Math.floorMod(y1, 16l), Math.floorMod(z1, 16l));
|
|
|
|
GL11.glVertex3f(Math.floorMod(x1, 16l) - (x1 - x2), Math.floorMod(y1, 16l) - (y1 - y2), Math.floorMod(z1, 16l) - (z1 - z2));
|
|
|
|
GL11.glVertex3f(Math.floorMod(x1, 16l) - (x1 - x2), Math.floorMod(y1, 16l) - (y1 - y2), Math.floorMod(z1, 16l) - (z1 - z2));
|
|
|
|
GL11.glEnd();
|
|
|
|
GL11.glEnd();
|
|
|
|
|
|
|
|
GL11.glEnable(GL11.GL_TEXTURE_2D);
|
|
|
|
GL11.glPopMatrix();
|
|
|
|
GL11.glPopMatrix();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public void renderLineBetweenTwoPoints(long x1, long y1, long z1, long x2, long y2, long z2, float red, float green, float blue, float alpha){
|
|
|
|
public void renderLineBetweenTwoPoints(long x1, long y1, long z1, long x2, long y2, long z2, float red, float green, float blue, float alpha){
|
|
|
@ -51,6 +53,6 @@ public class MixinBlockRenderer {
|
|
|
|
renderLineBetweenTwoPoints(x1, y1, z1, x2, y2, z2, red, green, blue, 255, 1);
|
|
|
|
renderLineBetweenTwoPoints(x1, y1, z1, x2, y2, z2, red, green, blue, 255, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public void renderLineBetweenTwoPoints(long x1, long y1, long z1, long x2, long y2, long z2){
|
|
|
|
public void renderLineBetweenTwoPoints(long x1, long y1, long z1, long x2, long y2, long z2){
|
|
|
|
renderLineBetweenTwoPoints(x1, y1, z1, x2, y2, z2, 255, 0, 0, 255, 5);
|
|
|
|
renderLineBetweenTwoPoints(x1, y1, z1, x2, y2, z2, 255, 0, 0, 255 / 2, 1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|