Skip to content

Commit

Permalink
1.8.4
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipPanda committed Jan 23, 2024
1 parent 5e91b35 commit 9bd25ed
Show file tree
Hide file tree
Showing 24 changed files with 751 additions and 125 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,14 @@

import xyz.templecheats.templeclient.impl.modules.Module;
import xyz.templecheats.templeclient.impl.modules.chat.GreenText;
import xyz.templecheats.templeclient.impl.modules.chat.Spammer;
import xyz.templecheats.templeclient.impl.modules.client.ClickGUI;
import xyz.templecheats.templeclient.impl.modules.client.Font;
import xyz.templecheats.templeclient.impl.modules.client.HUD;
import xyz.templecheats.templeclient.impl.modules.client.Panic;
import xyz.templecheats.templeclient.impl.modules.combat.*;
import xyz.templecheats.templeclient.impl.modules.combat.Velocity;
import xyz.templecheats.templeclient.impl.modules.misc.Blink;
import xyz.templecheats.templeclient.impl.modules.misc.FakeCreative;
import xyz.templecheats.templeclient.impl.modules.misc.FakePlayer;
import xyz.templecheats.templeclient.impl.modules.misc.Particles;
import xyz.templecheats.templeclient.impl.modules.misc.*;
import xyz.templecheats.templeclient.impl.modules.movement.*;
import xyz.templecheats.templeclient.impl.modules.render.*;
import xyz.templecheats.templeclient.impl.modules.world.BlockReach;
Expand Down Expand Up @@ -48,6 +46,7 @@ public static void initMods() {
addMod(new Blink());
addMod(new FakeCreative());
addMod(new FakePlayer());
addMod(new Hitmarker());
addMod(new Particles());
// Client
addMod(new ClickGUI());
Expand All @@ -71,6 +70,7 @@ public static void initMods() {
addMod(new Sprint());
addMod(new Yaw());
// Render
addMod(new BlockOverlay());
addMod(new Fov());
addMod(new Freecam());
addMod(new FullBright());
Expand All @@ -91,6 +91,7 @@ public static void initMods() {
addMod(new Scaffold());
// Chat
addMod(new GreenText());
addMod(new Spammer());
}


Expand Down
4 changes: 2 additions & 2 deletions src/main/java/xyz/templecheats/templeclient/TempleClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@

@Mod(modid = TempleClient.MODID, name = TempleClient.NAME, version = TempleClient.VERSION)
public class TempleClient {
public static String name = "Temple Client 1.8.2";
public static String name = "Temple Client 1.8.4";

public static final String MODID = "templeclient";
public static final String NAME = "Temple Client";
public static final String VERSION = "1.8.2";
public static final String VERSION = "1.8.4";

public static AnnotatedEventManager eventBus;
public static SettingsManager settingsManager;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,32 +1,31 @@
package xyz.templecheats.templeclient.api.event;

import net.minecraft.client.Minecraft;
import net.minecraftforge.client.event.RenderWorldLastEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import xyz.templecheats.templeclient.ModuleManager;
import xyz.templecheats.templeclient.TempleClient;

/**
* @author XeonLyfe
*/

import xyz.templecheats.templeclient.impl.modules.Module;
public class EventManager {
private boolean playerLoaded;

public EventManager() {
MinecraftForge.EVENT_BUS.register(this);
playerLoaded = false;
}
/*

/*
@SubscribeEvent
public void onPlayerEvent(TickEvent.PlayerTickEvent event) {
if (playerLoaded && Minecraft.getMinecraft().player != null) {
TempleClient.configManager.loadModules();
playerLoaded = false;
}
}
*/
*/

@SubscribeEvent
public void onTickEvent(TickEvent.ClientTickEvent event) {
Expand All @@ -42,4 +41,17 @@ public void onPlayerLoggedIn(PlayerEvent.PlayerLoggedInEvent event) {
public void onPlayerLoggedOut(PlayerEvent.PlayerLoggedOutEvent event) {
TempleClient.configManager.saveModules();
}

@SubscribeEvent
public void onRenderWorldLast(RenderWorldLastEvent event) {
if(Minecraft.getMinecraft().player == null) {
return;
}

for(Module module : ModuleManager.getModules()) {
if(module.isToggled()) {
module.onRenderWorld(event.getPartialTicks());
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,31 @@ public static void trace(Minecraft mc, Entity e, float partialTicks, int mode) {
}
}

public static void blockESP(BlockPos blockPos, boolean fill, boolean outline, float r, float g, float b) {
GL11.glPushMatrix();
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
GL11.glDisable(GL11.GL_TEXTURE_2D);
GL11.glDepthMask(false);

double x = blockPos.getX() - Minecraft.getMinecraft().getRenderManager().viewerPosX;
double y = blockPos.getY() - Minecraft.getMinecraft().getRenderManager().viewerPosY;
double z = blockPos.getZ() - Minecraft.getMinecraft().getRenderManager().viewerPosZ;
final AxisAlignedBB box = new AxisAlignedBB(x, y, z, x + 1.0, y + 1.0, z + 1.0);
if(fill) {
RenderGlobal.renderFilledBox(box, r, g, b, 0.5F);
}
if(outline) {
RenderGlobal.drawSelectionBoundingBox(box, r, g, b, 1);
}

GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_DEPTH_TEST);
GL11.glDepthMask(true);
GL11.glDisable(GL11.GL_BLEND);
GL11.glPopMatrix();
}

public static void FillOnlyLine(Entity entity, AxisAlignedBB box) {
GL11.glBlendFunc(770, 771);
GL11.glEnable(GL11.GL_BLEND);
Expand Down Expand Up @@ -79,7 +104,6 @@ public static void FillOnlyLinePlayerESP(Entity entity, AxisAlignedBB box, float
GL11.glDepthMask(true);
GL11.glDisable(GL11.GL_BLEND);
}

public static void renderEntity(EntityLivingBase entity, int scale, int posX, int posY) {
GlStateManager.enableTexture2D();
GlStateManager.depthMask(true);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package xyz.templecheats.templeclient.impl.command;

import xyz.templecheats.templeclient.impl.command.commands.BindCommand;
import xyz.templecheats.templeclient.impl.command.commands.CoordsCommand;
import xyz.templecheats.templeclient.impl.command.commands.HelpCommand;
import xyz.templecheats.templeclient.impl.command.commands.IpCommand;
Expand All @@ -26,6 +27,7 @@ public boolean executeCommand(String message) {
}

public void commandInit() {
registerCommand(new BindCommand());
registerCommand(new CoordsCommand());
registerCommand(new HelpCommand());
registerCommand(new IpCommand());
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
package xyz.templecheats.templeclient.impl.command.commands;

import net.minecraft.client.Minecraft;
import xyz.templecheats.templeclient.TempleClient;
import xyz.templecheats.templeclient.impl.command.Command;
import xyz.templecheats.templeclient.impl.modules.Module;
import org.lwjgl.input.Keyboard;
import net.minecraft.util.text.TextComponentString;
import net.minecraft.util.text.TextFormatting;

public class BindCommand implements Command {

@Override
public String getName() {
return ".bind";
}

@Override
public void execute(String[] args) {
if (args.length != 3) {
sendMessage("Invalid syntax. Use .bind <module> <key>");
return;
}

String moduleName = args[1];
String keyName = args[2];

Module module = TempleClient.moduleManager.getModuleByName(moduleName);

if (module == null) {
sendMessage("Module " + moduleName + " not found.");
return;
}

int keyCode = Keyboard.getKeyIndex(keyName.toUpperCase());

if (keyCode == Keyboard.KEY_NONE) {
sendMessage("Key " + keyName + " not found.");
return;
}

module.setKey(keyCode);
sendMessage("Bound " + moduleName + " to " + keyName + ".");
}

private void sendMessage(String message) {
String templePrefix = TextFormatting.AQUA + "[Temple] " + TextFormatting.RESET;
Minecraft.getMinecraft().player.sendMessage(
new TextComponentString(templePrefix + message)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public void execute(String[] args) {

Minecraft.getMinecraft().player.sendMessage(new TextComponentString(templePrefix + "Available Commands:"));

Minecraft.getMinecraft().player.sendMessage(new TextComponentString(commandPrefix + ".bind - Binds a module to a key (ex: .bind freecam r)"));

Minecraft.getMinecraft().player.sendMessage(new TextComponentString(commandPrefix + ".coords - Copies your coordinates to your clipboard"));

Minecraft.getMinecraft().player.sendMessage(new TextComponentString(commandPrefix + ".help - Shows this help message"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public class Button extends Component {
public int offset;
private boolean isHovered;
private ArrayList<Component> subcomponents;

private float currentAlpha = 0.0f;
public boolean open;
public int height;
public FontRenderer fr = Minecraft.getMinecraft().fontRenderer;
Expand Down Expand Up @@ -88,8 +90,14 @@ public void renderComponent() {
Gui.drawRect(parent.getX(), this.parent.getY() + this.offset, parent.getX() + parent.getWidth(), this.parent.getY() + this.offset + borderThickness, borderColor);
}

Gui.drawRect(parent.getX() + parent.getWidth() - borderThickness, this.parent.getY() + this.offset, parent.getX() + parent.getWidth(), this.parent.getY() + 12 + this.offset, borderColor);

Gui.drawRect(parent.getX(), this.parent.getY() + this.offset, parent.getX() + borderThickness, this.parent.getY() + 12 + this.offset, borderColor);

if (this.parent.getComponents().indexOf(this) == this.parent.getComponents().size() - 1) {
Gui.drawRect(parent.getX(), this.parent.getY() + this.offset + this.height, parent.getX() + parent.getWidth(), this.parent.getY() + this.offset + this.height + borderThickness, borderColor);
}

GlStateManager.pushMatrix();

GlStateManager.scale(0.7f, 0.7f, 1.0f);
Expand Down Expand Up @@ -133,14 +141,22 @@ public void updateComponent(int mouseX, int mouseY) {

@Override
public void mouseClicked(int mouseX, int mouseY, int button) {
if(isMouseOnButton(mouseX, mouseY) && button == 0) {
if (isMouseOnButton(mouseX, mouseY) && button == 0) {
this.mod.toggle();
}
if(isMouseOnButton(mouseX, mouseY) && button == 1) {
if (isMouseOnButton(mouseX, mouseY) && button == 1) {
for (Component component : this.parent.getComponents()) {
if (component instanceof Button) {
Button otherButton = (Button) component;
if (otherButton != this && otherButton.open) {
otherButton.open = false;
}
}
}
this.open = !this.open;
this.parent.refresh();
}
for(Component comp : this.subcomponents) {
for (Component comp : this.subcomponents) {
comp.mouseClicked(mouseX, mouseY, button);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public void onRender(RenderGameOverlayEvent.Post e) {
GlStateManager.scale(0.7F, 0.7F, 1);

FontUtils.normal.drawString("temple-client" + " | ", 12, 15, -1);
FontUtils.normal.drawString("1.8.3", 12 + FontUtils.normal.getStringWidth("temple-client" + " | "), 15, ClickGUI.RGBColor.getRGB());
FontUtils.normal.drawString(" | " + mc.getSession().getUsername() + " | FPS: " + Minecraft.getDebugFPS(), 12 + FontUtils.normal.getStringWidth("temple-client" + " | " + "1.8.3"), 15, -1);
FontUtils.normal.drawString("1.8.4", 12 + FontUtils.normal.getStringWidth("temple-client" + " | "), 15, ClickGUI.RGBColor.getRGB());
FontUtils.normal.drawString(" | " + mc.getSession().getUsername() + " | FPS: " + Minecraft.getDebugFPS(), 12 + FontUtils.normal.getStringWidth("temple-client" + " | " + "1.8.4"), 15, -1);
GlStateManager.popMatrix();

GlStateManager.pushMatrix();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import net.minecraft.client.Minecraft;
import net.minecraftforge.common.MinecraftForge;
import xyz.templecheats.templeclient.TempleClient;
import xyz.templecheats.templeclient.impl.gui.clickgui.setting.Setting;

public class Module {
public String name;
Expand Down Expand Up @@ -46,6 +47,8 @@ public void onUpdate() {}

public void onUpdateConstant() {}

public void onRenderWorld(float partialTicks) {}

public void onEnable() {}

public void onDisable() {}
Expand Down Expand Up @@ -77,7 +80,6 @@ public void toggle() {
}

public void setToggled(boolean toggled) {
//dont do anything if the toggled state is the same
if(toggled == this.toggled) return;

if(toggled) {
Expand All @@ -87,6 +89,12 @@ public void setToggled(boolean toggled) {
}
}

protected void registerSettings(Setting... settings) {
for(Setting setting : settings) {
TempleClient.settingsManager.rSetting(setting);
}
}

public boolean isToggled() {
return toggled;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package xyz.templecheats.templeclient.impl.modules.chat;

import net.minecraft.client.Minecraft;
import xyz.templecheats.templeclient.impl.gui.clickgui.setting.Setting;
import xyz.templecheats.templeclient.impl.modules.Module;

public class Spammer extends Module {

private Setting delay;
private Thread spammerThread;
private boolean running;

public Spammer() {
super("Spammer", 0, Category.CHAT);
delay = new Setting("Delay", this, 5, 1, 60, true);
}

@Override
public void onEnable() {
running = true;
spammerThread = new Thread(() -> {
while (running) {
Minecraft.getMinecraft().player.sendChatMessage("TempleClient on top ! | https://templecheats.xyz");
try {
Thread.sleep((long) delay.getValDouble() * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
});
spammerThread.start();
}

@Override
public void onDisable() {
running = false;
spammerThread.interrupt();
}
}
Loading

0 comments on commit 9bd25ed

Please sign in to comment.