Skip to content

Commit 05b1085

Browse files
committed
1.9.5
1 parent d4e1a49 commit 05b1085

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+595
-601
lines changed

src/main/java/xyz/templecheats/templeclient/TempleClient.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
public class TempleClient {
3434
public static final String MODID = "templeclient";
3535
public static final String NAME = "Temple Client";
36-
public static final String VERSION = "1.9.4";
36+
public static final String VERSION = "1.9.5";
3737
public static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
3838
public static String name = NAME + " " + VERSION;
3939
public static AnnotatedEventManager eventBus;

src/main/java/xyz/templecheats/templeclient/config/ConfigManager.java

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ public class ConfigManager {
2424
private final File mainDirectory;
2525
private final File configDirectory;
2626
private final File friendsDirectory;
27-
private final File altsDirectory;
28-
private final File altsFile;
2927
private final File defaultConfigFile;
3028
private final File baseFinderLogDirectory;
3129

@@ -37,7 +35,6 @@ public ConfigManager() {
3735
this.mainDirectory = new File(System.getProperty("user.dir") + File.separator + "Temple Client");
3836
this.configDirectory = new File(this.mainDirectory, "1.12.2" + File.separator + "Config");
3937
this.friendsDirectory = new File(this.mainDirectory, "1.12.2" + File.separator + "Friends");
40-
this.altsDirectory = new File(this.mainDirectory, "1.12.2" + File.separator + "Alts");
4138
this.defaultConfigFile = new File(this.configDirectory, "config.cfg");
4239
this.baseFinderLogDirectory = new File(this.mainDirectory, "1.12.2" + File.separator + "Base Finder");
4340

@@ -49,15 +46,9 @@ public ConfigManager() {
4946
this.friendsDirectory.mkdirs();
5047
}
5148

52-
if (!this.altsDirectory.exists()) {
53-
this.altsDirectory.mkdirs();
54-
}
55-
5649
if (!this.baseFinderLogDirectory.exists()) {
5750
this.baseFinderLogDirectory.mkdirs();
5851
}
59-
60-
this.altsFile = new File(this.altsDirectory, "alt_accounts.json");
6152
}
6253

6354
/****************************************************************
@@ -229,34 +220,6 @@ private void loadFriends() {
229220
}
230221
}
231222

232-
/****************************************************************
233-
* Alt Account Management
234-
****************************************************************/
235-
236-
public List<String> loadAlts() {
237-
if (!altsFile.exists()) return new ArrayList<>();
238-
try (Reader reader = new FileReader(altsFile)) {
239-
return GSON.fromJson(reader, new TypeToken<List<String>>() {
240-
}.getType());
241-
} catch (IOException e) {
242-
e.printStackTrace();
243-
}
244-
return new ArrayList<>();
245-
}
246-
247-
/**
248-
* Saves alt accounts to a file.
249-
*
250-
* @param alts The list of alt accounts to save.
251-
*/
252-
public void saveAlts(List<String> alts) {
253-
try (Writer writer = new FileWriter(altsFile)) {
254-
GSON.toJson(alts, writer);
255-
} catch (IOException e) {
256-
e.printStackTrace();
257-
}
258-
}
259-
260223
/****************************************************************
261224
* Base Finder Logging
262225
****************************************************************/

src/main/java/xyz/templecheats/templeclient/features/command/commands/DeathCoordsCommand.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ public String getName() {
2626

2727
@Override
2828
public void execute(String[] args) {
29-
Minecraft mc = Minecraft.getMinecraft();
30-
3129
if (lastDeathCoords == null) {
3230
sendMessage("No death coordinates recorded yet.", true);
3331
} else {
@@ -49,11 +47,9 @@ protected void sendMessage(String message, boolean isError) {
4947

5048
@SubscribeEvent
5149
public void onPlayerDeath(LivingDeathEvent event) {
52-
if (!event.getEntityLiving().world.isRemote) {
53-
if (event.getEntityLiving() instanceof EntityPlayer && event.getEntityLiving() == Minecraft.getMinecraft().player) {
54-
lastDeathCoords = event.getEntityLiving().getPosition();
55-
sendMessage("Death coordinates logged.", false);
56-
}
50+
if (event.getEntityLiving() instanceof EntityPlayer && event.getEntityLiving() == Minecraft.getMinecraft().player) {
51+
lastDeathCoords = event.getEntityLiving().getPosition();
52+
sendMessage("Death coordinates logged.", false);
5753
}
5854
}
5955
}

src/main/java/xyz/templecheats/templeclient/features/gui/clickgui/basic/panels/items/buttons/Button.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
2929
Color c2 = ClickGUI.INSTANCE.getEndColor();
3030

3131
switch (ClickGUI.INSTANCE.colorMode.value()) {
32-
case Static:
32+
case Animated:
3333
c1 = new Color(ClickGUI.INSTANCE.getClientColor(10, (int) Panel.counter1[0]));
3434
c2 = new Color(ClickGUI.INSTANCE.getClientColor(10, (int) (Panel.counter1[0] + 1)));
3535
break;

src/main/java/xyz/templecheats/templeclient/features/gui/clickgui/basic/panels/items/buttons/ModuleButton.java

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import net.minecraft.client.renderer.GlStateManager;
77
import net.minecraft.init.SoundEvents;
88
import net.minecraft.util.ResourceLocation;
9+
import org.lwjgl.input.Keyboard;
910
import xyz.templecheats.templeclient.TempleClient;
1011
import xyz.templecheats.templeclient.features.gui.clickgui.basic.ClickGuiScreen;
1112
import xyz.templecheats.templeclient.features.gui.clickgui.basic.ClientGuiScreen;
@@ -21,6 +22,7 @@
2122
import java.util.List;
2223

2324
import static xyz.templecheats.templeclient.features.gui.clickgui.basic.panels.Panel.calculateRotation;
25+
import static xyz.templecheats.templeclient.features.gui.font.Fonts.font14;
2426
import static xyz.templecheats.templeclient.features.gui.font.Fonts.font18;
2527

2628
public class ModuleButton extends Button implements IContainer {
@@ -29,12 +31,20 @@ public class ModuleButton extends Button implements IContainer {
2931
private boolean open;
3032
private long timeHovering;
3133
private int progress;
34+
private String bindLabel;
3235

3336
public ModuleButton(Module module) {
3437
super(module.getName());
3538
this.module = module;
3639
this.progress = 0;
3740

41+
int keyCode = module.getKey();
42+
if (keyCode == 0) {
43+
this.bindLabel = "";
44+
} else {
45+
this.bindLabel = " [" + Keyboard.getKeyName(keyCode) + "]";
46+
}
47+
3848
final List<Setting<?>> settings = TempleClient.settingsManager.getSettingsByMod(module);
3949
if (!module.parent) {
4050
this.items.add(new BindButton(module));
@@ -52,6 +62,16 @@ public ModuleButton(Module module) {
5262
@Override
5363
public void drawScreen(int mouseX, int mouseY, float partialTicks) {
5464
super.drawScreen(mouseX, mouseY, partialTicks);
65+
66+
String displayText = this.module.getName();
67+
if (ClickGUI.INSTANCE.showKey.booleanValue() && !this.bindLabel.isEmpty()) {
68+
font18.drawString(displayText, this.x + 2.0F, this.y + 4.0F, -1, false);
69+
float keyBindY = this.y + 4.0F + (font18.getFontHeight() - font14.getFontHeight()) / 2.0F;
70+
font14.drawString(this.bindLabel, this.x + 2.0F + font18.getStringWidth(displayText), keyBindY, -1, false);
71+
} else {
72+
font18.drawString(displayText, this.x + 2.0F, this.y + 4.0F, -1, false);
73+
}
74+
5575
if (!this.items.isEmpty()) {
5676
if (module.submodule) {
5777
font18.drawString(!this.open ? "+" : "-", this.x - 1.0f + (float) getWidth() - 8.0f, this.y + 4.0f, -1, false);
@@ -89,21 +109,23 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) {
89109
}
90110
}
91111

112+
92113
@Override
93114
public void drawScreenPost(int mouseX, int mouseY) {
94-
if (this.isHovering(mouseX, mouseY)) {
115+
if (ClickGUI.INSTANCE.description.booleanValue() && this.isHovering(mouseX, mouseY)) {
95116
final String description = module.getDescription();
96117
final float startX = mouseX + 7;
97118
final float startY = mouseY + 7;
98119
final float width = (float) font18.getStringWidth(description);
99120
final float height = (float) font18.getFontHeight();
100-
int color = ClickGUI.INSTANCE.getEndColor().getRGB();
121+
int color = ClickGUI.INSTANCE.getStartColor().getRGB();
101122
RenderUtil.drawOutlineRect(startX - 1, startY - 1, startX + width, startY + height, color);
102123
RenderUtil.drawRect(startX - 1, startY - 1, startX + width, startY + height, 0x88000000);
103124
font18.drawString(description, startX, startY, -1, false);
104125
}
105126
}
106127

128+
107129
@Override
108130
public void mouseClicked(int mouseX, int mouseY, int mouseButton) {
109131
super.mouseClicked(mouseX, mouseY, mouseButton);
@@ -186,4 +208,3 @@ public void setItems(List<Item> items) {
186208
this.items = items;
187209
}
188210
}
189-

src/main/java/xyz/templecheats/templeclient/features/gui/clickgui/hud/HudElementButton.java

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -109,23 +109,16 @@ private void drag(int mouseX, int mouseY) {
109109

110110
@Override
111111
public void drawScreenPost(int mouseX, int mouseY) {
112-
if (this.isHovering(mouseX, mouseY)) {
113-
if (this.timeHovering == 0) {
114-
this.timeHovering = System.currentTimeMillis();
115-
}
116-
117-
if (System.currentTimeMillis() - this.timeHovering > 500) {
118-
final String description = element.getDescription();
119-
final float startX = mouseX + 7;
120-
final float startY = mouseY + 7;
121-
final float width = (float) font18.getStringWidth(description);
122-
final float height = (float) font18.getFontHeight();
123-
124-
RenderUtil.drawRect(startX - 1, startY - 1, startX + width, startY + height, 0x88000000);
125-
font18.drawString(description, startX, startY, -1, false);
126-
}
127-
} else {
128-
this.timeHovering = 0;
112+
if (ClickGUI.INSTANCE.description.booleanValue() && this.isHovering(mouseX, mouseY)) {
113+
final String description = element.getDescription();
114+
final float startX = mouseX + 7;
115+
final float startY = mouseY + 7;
116+
final float width = (float) font18.getStringWidth(description);
117+
final float height = (float) font18.getFontHeight();
118+
int color = ClickGUI.INSTANCE.getStartColor().getRGB();
119+
RenderUtil.drawOutlineRect(startX - 1, startY - 1, startX + width, startY + height, color);
120+
RenderUtil.drawRect(startX - 1, startY - 1, startX + width, startY + height, 0x88000000);
121+
font18.drawString(description, startX, startY, -1, false);
129122
}
130123
}
131124

0 commit comments

Comments
 (0)