Skip to content

Commit

Permalink
Big Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Crimply committed Sep 29, 2022
1 parent f1138a6 commit 3a905c4
Show file tree
Hide file tree
Showing 15 changed files with 131 additions and 20 deletions.
2 changes: 1 addition & 1 deletion src/main/java/me/crimp/claudius/mod/gui/ClickGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import me.crimp.claudius.mod.Feature;
import me.crimp.claudius.mod.gui.components.Component;
import me.crimp.claudius.mod.gui.components.items.Item;
import me.crimp.claudius.mod.gui.components.items.buttons.ModuleButton;
import me.crimp.claudius.mod.gui.components.items.button.ModuleButton;
import me.crimp.claudius.mod.modules.Module;
import net.minecraft.client.gui.GuiScreen;
import org.lwjgl.input.Mouse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
import me.crimp.claudius.mod.Feature;
import me.crimp.claudius.mod.gui.ClickGui;
import me.crimp.claudius.mod.gui.components.items.Item;
import me.crimp.claudius.mod.gui.components.items.buttons.Button;
import me.crimp.claudius.mod.gui.components.items.button.Button;
import me.crimp.claudius.mod.modules.client.ClickGuiModule;
import me.crimp.claudius.utils.ColorUtil;
import me.crimp.claudius.utils.RenderUtil;
import net.minecraft.client.audio.PositionedSoundRecord;
import net.minecraft.client.gui.Gui;
import net.minecraft.client.renderer.GlStateManager;
import net.minecraft.init.SoundEvents;

Expand All @@ -32,7 +31,7 @@ public Component(String name, int x, int y, boolean open) {
this.x = x;
this.y = y;
this.width = 80;
this.height = 18;
this.height = 16;
this.open = open;
this.setupItems();
}
Expand All @@ -54,7 +53,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
int color = ColorUtil.toARGB(ClickGuiModule.INSTANCE.topRed.getValue(), ClickGuiModule.INSTANCE.topGreen.getValue(), ClickGuiModule.INSTANCE.topBlue.getValue(), 255);
int color2 = ColorUtil.toARGB(ClickGuiModule.INSTANCE.BGRed.getValue(), ClickGuiModule.INSTANCE.BGGreen.getValue(), ClickGuiModule.INSTANCE.BGBlue.getValue(), ClickGuiModule.INSTANCE.BGalpha.getValue());
int color3 = ClickGuiModule.INSTANCE.BGalpha.getValue();
RenderUtil.drawRect(this.x - 1f, (float)this.y - 2.5f, this.x + 1f + this.width, this.y + this.height - 5.0f, ColorUtil.toARGB(255,255,255,255));//0x77FB4242, 0x77FB4242);
RenderUtil.drawRect(this.x - 1f, (float)this.y - 2.5f, this.x + 1f + this.width, this.y + this.height - 5.0f, ColorUtil.toARGB(255,255,255,255));
RenderUtil.drawRect(this.x, (float)this.y - 1f, this.x + this.width, this.y + this.height - 6, color);//0x77FB4242, 0x77FB4242);

if (this.open) {
Expand All @@ -69,8 +68,6 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
//RenderMethods.glColor(new Color(255, 255, 255, 255));
//minecraft.getTextureManager().bindTexture(new ResourceLocation("textures/exeter/arrow.png"));
GlStateManager.translate(getX() + getWidth() - 7, (getY() + 6) - 0.3F, 0.0F);
//GlStateManager.rotate(calculateRotation(angle), 0.0F, 0.0F, 1.0F);
//RenderUtil.drawModalRect(-5, -5, 0.0F, 0.0F, 10, 10, 10, 10, 10.0F, 10.0F);
GlStateManager.disableBlend();
GlStateManager.popMatrix();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.crimp.claudius.mod.gui.components.items.buttons;
package me.crimp.claudius.mod.gui.components.items.button;

import com.mojang.realmsclient.gui.ChatFormatting;
import me.crimp.claudius.Claudius;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.crimp.claudius.mod.gui.components.items.buttons;
package me.crimp.claudius.mod.gui.components.items.button;

import me.crimp.claudius.Claudius;
import me.crimp.claudius.mod.gui.ClickGui;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.crimp.claudius.mod.gui.components.items.buttons;
package me.crimp.claudius.mod.gui.components.items.button;

import me.crimp.claudius.Claudius;
import me.crimp.claudius.mod.gui.ClickGui;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.crimp.claudius.mod.gui.components.items.buttons;
package me.crimp.claudius.mod.gui.components.items.button;

import com.mojang.realmsclient.gui.ChatFormatting;
import me.crimp.claudius.Claudius;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.crimp.claudius.mod.gui.components.items.buttons;
package me.crimp.claudius.mod.gui.components.items.button;

import me.crimp.claudius.mod.gui.ClickGui;
import me.crimp.claudius.mod.gui.components.Component;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.crimp.claudius.mod.gui.components.items.buttons;
package me.crimp.claudius.mod.gui.components.items.button;

import com.mojang.realmsclient.gui.ChatFormatting;
import me.crimp.claudius.Claudius;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.crimp.claudius.mod.gui.components.items.buttons;
package me.crimp.claudius.mod.gui.components.items.button;

import com.mojang.realmsclient.gui.ChatFormatting;
import me.crimp.claudius.Claudius;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
public class CSGOGui extends GuiScreen {
@Override
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
RenderUtil.drawRoundedRectangle(20 , 20 , 200, 200,25, new Color(60, 60, 60, 255).getRGB());
RenderUtil.drawRect(20 , 20 , 200, 200, new Color(60, 60, 60, 255).getRGB());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public FemBoyExploit() {

@Override
public void onEnable() {
String serverName = Minecraft.getMinecraft().currentServerData.serverIP;
if (!mc.isSingleplayer()) {
String serverName = Minecraft.getMinecraft().currentServerData.serverIP;
Command.sendMessage("if ur on " + serverName + " this wont help u");
}
}
Expand Down
68 changes: 68 additions & 0 deletions src/main/java/me/crimp/claudius/mod/modules/pvp/CrystalAura.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
package me.crimp.claudius.mod.modules.pvp;

import me.crimp.claudius.Claudius;
import me.crimp.claudius.event.events.UpdateWalkingPlayerEvent;
import me.crimp.claudius.mod.modules.Module;
import me.crimp.claudius.mod.setting.Setting;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.util.EnumHand;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class CrystalAura extends Module {

public Setting<Boolean> Place = this.register(new Setting<>("Place", true));
public Setting<Boolean> Break = this.register(new Setting<>("Break", true));
public Setting<Boolean> GappPause = this.register(new Setting<>("GappPause", false));
public Setting<Float> PlayerRange = this.register(new Setting<>("PlayerRange", 5f,1f,10f));
public Setting<Float> PlaceDelay = this.register(new Setting<>("PlaceDelay", 0f,0f,20f));
public Setting<Float> BreakSpeed = this.register(new Setting<>("BreakSpeed", 20f,0f,20f));

public CrystalAura() {
super("CrystalAura", "CrystalAura", Category.PVP, true, false, false);
}

private int hitTicks;
private int placeTicks;
private EntityPlayer target;



@SubscribeEvent
public void onWalk (UpdateWalkingPlayerEvent event) {
doCrystal();
hitTicks ++;
placeTicks ++;
}



private void doCrystal() {
if (!fullNullCheck() || this.GappPause.getValue() && mc.player.getHeldItem(EnumHand.MAIN_HAND).getItem().equals(Items.GOLDEN_APPLE)) return;
target = GetPlayer();
if (target == null) return;
if (this.Place.getValue() && placeTicks > this.PlaceDelay.getValue()) {
//placecrystal
}
if (this.Break.getValue() && hitTicks > this.BreakSpeed.getValue()) {
//breakcrystal
}
}

private EntityPlayer GetPlayer() {
EntityPlayer playerTarget = null;
for (EntityPlayer player: mc.world.playerEntities) {
if (Claudius.friendManager.isFriend(player)) continue;
if (player.getName() == mc.player.getName()) continue;
if (player.getDistanceSq(mc.player) > this.PlayerRange.getValue() * this.PlayerRange.getValue()) continue;
if (player.isDead) continue;
if (playerTarget != null) {
if (player.getDistance(player) > player.getDistance(playerTarget)) continue;
}
playerTarget = player;
}
return playerTarget;
}
}

52 changes: 49 additions & 3 deletions src/main/java/me/crimp/claudius/utils/RenderUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,52 @@ public static void blockEsp(BlockPos blockPos, Color c, double length, double le
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
}

/*public static void drawRoundedRect(double x, double y, double width, double height, double radius, int color) {
glPushAttrib(GL_POINTS);
glScaled(0.5, 0.5, 0.5); {
x *= 2;
y *= 2;
width *= 2;
height *= 2;
width += x;
height += y;
glEnable(GL_BLEND);
glDisable(GL_TEXTURE_2D);
//glColor4f(color.getRed() / 255F, color.getGreen() / 255F, color.getBlue() / 255F, color.getAlpha() / 255F);
float alpha = (float) (color >> 24 & 0xFF) / 255.0f;
float red = (float) (color >> 16 & 0xFF) / 255.0f;
float green = (float) (color >> 8 & 0xFF) / 255.0f;
float blue = (float) (color & 0xFF) / 255.0f;
glEnable(GL_LINE_SMOOTH);
glBegin(GL_POLYGON);
int i;
Tessellator tessellator = Tessellator.getInstance();
BufferBuilder bufferbuilder = tessellator.getBuffer();
bufferbuilder.begin(7, DefaultVertexFormats.POSITION_COLOR);
for (i = 0; i <= 90; i++) {
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, y + radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
}
for (i = 90; i <= 180; i++) {
glVertex2d(x + radius + Math.sin(i * Math.PI / 180.0D) * radius * -1.0D, height - radius + Math.cos(i * Math.PI / 180.0D) * radius * -1.0D);
}
for (i = 0; i <= 90; i++) {
glVertex2d(width - radius + Math.sin(i * Math.PI / 180.0D) * radius, height - radius + Math.cos(i * Math.PI / 180.0D) * radius);
}
for (i = 90; i <= 180; i++) {
glVertex2d(width - radius + Math.sin(i * Math.PI / 180.0D) * radius, y + radius + Math.cos(i * Math.PI / 180.0D) * radius);
}
tessellator.draw();
glEnd();
glEnable(GL_TEXTURE_2D);
glDisable(GL_BLEND);
glDisable(GL_LINE_SMOOTH);
glDisable(GL_BLEND);
glEnable(GL_TEXTURE_2D);
}
glScaled(2, 2, 2);
glPopAttrib();
}*/

public static void drawRect(float x, float y, float w, float h, int color) {
float alpha = (float) (color >> 24 & 0xFF) / 255.0f;
float red = (float) (color >> 16 & 0xFF) / 255.0f;
Expand Down Expand Up @@ -780,9 +826,9 @@ public static void drawCircle(float x, float y, float radius, int start, int end
}

public static void drawOutlinedRoundedRectangle(int x, int y, int width, int height, float radius, float dR, float dG, float dB, float dA, float outlineWidth) {
RenderUtil.drawRoundedRectangle(x, y, width, height, radius, new Color(60, 60, 60, 255).getRGB());
RenderUtil.drawRoundedRect(x, y, width, height, radius, new Color(60, 60, 60, 255).getRGB());
GL11.glColor4f(dR, dG, dB, dA);
RenderUtil.drawRoundedRectangle((float) x + outlineWidth, (float) y + outlineWidth, (float) width - outlineWidth * 2.0f, (float) height - outlineWidth * 2.0f, radius, new Color(60, 60, 60, 255).getRGB());
RenderUtil.drawRoundedRect((float) x + outlineWidth, (float) y + outlineWidth, (float) width - outlineWidth * 2.0f, (float) height - outlineWidth * 2.0f, radius, new Color(60, 60, 60, 255).getRGB());
}

public static void drawRectangle(float x, float y, float width, float height) {
Expand Down Expand Up @@ -818,7 +864,7 @@ public static void drawFilledRectangle(float x, float y, float width, float heig
RenderUtil.glEnd();
}

public static void drawRoundedRectangle(float x, float y, float width, float height, float radius, int rgb) {
public static void drawRoundedRect(float x, float y, float width, float height, float radius, int rgb) {
glEnable(3042);
RenderUtil.drawArc(x + width - radius, y + height - radius, radius, 0.0f, 90.0f, 16);
RenderUtil.drawArc(x + radius, y + height - radius, radius, 90.0f, 180.0f, 16);
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/mcmod.info
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Best Util Client",
"version": "1.0",
"mcversion": "1.12.2",
"logoFile": "",
"logoFile": "title.png",
"url": "https://discord.gg/F8kkNfx33K",
"updateUrl": "",
"authorList": [
Expand Down
File renamed without changes

0 comments on commit 3a905c4

Please sign in to comment.