Skip to content

Commit

Permalink
improved
Browse files Browse the repository at this point in the history
  • Loading branch information
valekatoz committed Feb 14, 2024
1 parent 715d33a commit ddd2927
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 40 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod_name = Kore
mod_id = kore
version = 2.3.3
version_number = 23301
version_number = 23302
licensed = true
archiveBaseName = KoreClient
loom.platform=forge
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class StaffAnalyser extends Module
private int lastBans;

public StaffAnalyser() {
super("Staff Analyser", Category.MISC);
super("Staff Analyser", Category.PROTECTIONS);
this.delay = new NumberSetting("Check Delay (Seconds)", 5.0, 5.0, 60.0, 1.0);
this.timer = new MilliTimer();
this.lastBans = -1;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/kore/modules/skyblock/EndESP.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public void onRenderWorld(RenderWorldLastEvent event) {
for (BlockPosition blockPosition : enderNodes.keySet()) {
RenderUtils.renderEspBox(blockPosition.toBlockPos(), event.partialTicks, Kore.themeManager.getSecondaryColor().getRGB());
if(this.nodesTracer.isEnabled()) {
RenderUtils.drawLine(Kore.mc.thePlayer.getPositionEyes(event.partialTicks), new Vec3(blockPosition.x + 0.5, blockPosition.y + 0.5, blockPosition.z + 0.5), 1, event.partialTicks);
RenderUtils.tracerLine(blockPosition.x + 0.5, blockPosition.y + 0.5, blockPosition.z + 0.5, Kore.themeManager.getSecondaryColor());
}
}
}
Expand Down
38 changes: 1 addition & 37 deletions src/main/java/net/kore/utils/render/RenderUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1228,7 +1228,7 @@ public static void tracerLine(double x, double y, double z, final Color color) {
z -= Minecraft.getMinecraft().getRenderManager().viewerPosZ;
GL11.glBlendFunc(770, 771);
GL11.glEnable(3042);
GL11.glLineWidth(2.5f);
GL11.glLineWidth(1.0f);
GL11.glEnable(2848);
GL11.glHint(3154, 4354);
GL11.glDisable(3553);
Expand Down Expand Up @@ -1267,42 +1267,6 @@ public static void drawLine(final Vec3 pos1, final Vec3 pos2, final Color color)
GL11.glPopMatrix();
}

public static void drawLine(Vec3 from, Vec3 to, final float thickness, final float partialTicks) {
final Entity render = Minecraft.getMinecraft().getRenderViewEntity();
Tessellator tessellator = Tessellator.getInstance();
WorldRenderer bufferBuilder = tessellator.getWorldRenderer();
final double realX = render.lastTickPosX + (render.posX - render.lastTickPosX) * partialTicks;
final double realY = render.lastTickPosY + (render.posY - render.lastTickPosY) * partialTicks;
final double realZ = render.lastTickPosZ + (render.posZ - render.lastTickPosZ) * partialTicks;
GlStateManager.pushMatrix();
GlStateManager.translate(-realX, -realY, -realZ);
GlStateManager.disableTexture2D();
GlStateManager.disableLighting();
GL11.glDisable(3553);
GlStateManager.enableBlend();
GlStateManager.disableAlpha();
GL11.glLineWidth(thickness);
GlStateManager.disableDepth();
GlStateManager.depthMask(false);
GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
bufferBuilder.begin(3, DefaultVertexFormats.POSITION_COLOR);

final int i = Kore.themeManager.getSecondaryColor().getRGB();
bufferBuilder.pos(from.xCoord, from.yCoord, from.zCoord).color((i >> 16 & 0xFF) / 255.0f, (i >> 8 & 0xFF) / 255.0f, (i & 0xFF) / 255.0f, (i >> 24 & 0xFF) / 255.0f).endVertex();
bufferBuilder.pos(to.xCoord, to.yCoord, to.zCoord).color((i >> 16 & 0xFF) / 255.0f, (i >> 8 & 0xFF) / 255.0f, (i & 0xFF) / 255.0f, (i >> 24 & 0xFF) / 255.0f).endVertex();

Tessellator.getInstance().draw();
GlStateManager.translate(realX, realY, realZ);
GlStateManager.disableBlend();
GlStateManager.enableAlpha();
GlStateManager.enableTexture2D();
GlStateManager.enableDepth();
GlStateManager.depthMask(true);
GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
GlStateManager.popMatrix();
}

public static void setColor(final Color c) {
GL11.glColor4f(c.getRed() / 255.0f, c.getGreen() / 255.0f, c.getBlue() / 255.0f, c.getAlpha() / 255.0f);
}
Expand Down

0 comments on commit ddd2927

Please sign in to comment.