Skip to content

Commit

Permalink
v2.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
valekatoz committed Feb 4, 2024
1 parent 2089fdc commit e01dfc9
Show file tree
Hide file tree
Showing 13 changed files with 2,252 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Kore (v2.2.3)
# Kore (v2.2.4)

[![Discord](https://img.shields.io/discord/1196891678284460053?style=for-the-badge&logo=discord&label=discord&color=9089DA)](https://discord.gg/H4x6eFp9KR)
[![GitHub Repo stars](https://img.shields.io/github/stars/valekatoz/Kore?style=for-the-badge&label=stargazers&logo=esea&logoColor=FFA500&color=FFFF66)](https://github.com/valekatoz/Kore)
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod_name = Kore
mod_id = kore
version = 2.2.3
version_number = 22301
version = 2.2.4
version_number = 22401
licensed = true
archiveBaseName = KoreClient
loom.platform=forge
Expand Down
50 changes: 34 additions & 16 deletions src/main/java/net/kore/Kore.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.kore.modules.Module;
import net.kore.modules.combat.*;
import net.kore.modules.misc.*;
import net.kore.modules.movement.InvMove;
import net.kore.modules.skyblock.*;
import net.kore.modules.player.*;
import net.kore.modules.protection.*;
Expand Down Expand Up @@ -43,35 +44,52 @@ public class Kore {
public static Minecraft mc;
public static char fancy = (char) 167;

// (Important) Modules
// Modules

// System
public static Gui clickGui;
public static ClientSettings clientSettings;

// Modules
public static PopupAnimation popupAnimation;
public static Interfaces interfaces;
public static InventoryDisplay inventoryDisplay;
// Render
public static Animations animations;
public static Giants giants;
public static ChinaHat chinaHat;
public static PlayerEsp playerEsp;
public static PurseSpoofer purseSpoofer;
public static Giants giants;
public static Interfaces interfaces;
public static InventoryDisplay inventoryDisplay;
public static Nametags nametags;
public static ModHider modHider;
public static NickHider nickHider;
public static StaffAnalyser staffAnalyser;
public static Proxy proxy;
public static PlayerEsp playerEsp;
public static PopupAnimation popupAnimation;
public static Trail trail;

// Combat
public static AntiBot antiBot;
public static AimAssist aimAssist;

// Player
public static FreeCam freeCam;
public static FastPlace fastPlace;
public static FastBreak fastBreak;
public static GuiMove guiMove;
public static GhostBlocks ghostBlock;

// Movement
public static InvMove invMove;


// Skyblock
public static AutoExperiments autoExperiments;
public static AutoHarp autoHarp;
public static GhostBlocks ghostBlock;
public static PurseSpoofer purseSpoofer;

// Misc
public static MurderFinder murderFinder;
public static ServerBeamer serverBeamer;
public static AntiBot antiBot;
public static AimAssist aimAssist;
public static BuildGuesser buildGuesser;

// Protections
public static ModHider modHider;
public static NickHider nickHider;
public static StaffAnalyser staffAnalyser;
public static Proxy proxy;

public static void start()
{
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/net/kore/modules/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ public enum Category
RENDER("Render"),
COMBAT("Combat"),
PLAYER("Player"),
MISC("Misc"),
MOVEMENT("Movement"),
SKYBLOCK("Skyblock"),
MISC("Misc"),
PROTECTIONS("Protections"),
SETTINGS("Settings");

Expand Down
209 changes: 209 additions & 0 deletions src/main/java/net/kore/modules/misc/BuildGuesser.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
package net.kore.modules.misc;

import java.io.BufferedReader;
import java.io.InputStreamReader;

import net.kore.Kore;
import net.kore.events.GuiChatEvent;
import net.kore.modules.Module;
import net.kore.settings.BooleanSetting;
import net.kore.settings.ModeSetting;
import net.kore.settings.NumberSetting;
import net.kore.ui.hud.DraggableComponent;
import net.kore.ui.hud.impl.GuesserHud;
import net.kore.utils.Notification;
import net.minecraft.scoreboard.ScoreObjective;
import net.minecraftforge.client.event.RenderGameOverlayEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import com.mojang.realmsclient.gui.ChatFormatting;
import net.minecraft.client.Minecraft;
import net.minecraftforge.client.event.ClientChatReceivedEvent;
import java.util.ArrayList;

public class BuildGuesser extends Module
{
public static ModeSetting defaultPosition;
public NumberSetting x;
public NumberSetting y;
public NumberSetting displayedGuesses;
public ModeSetting blurStrength;
public BooleanSetting autoGuess;
public BooleanSetting autoJoin;

private ArrayList<String> wordList;
private int tips;
private String tip;
private ArrayList<String> matchingWords;
private Thread guesses;
private int period;
private long lastGuess;

public BuildGuesser() {
super("Build Guesser", 0, Category.MISC);
defaultPosition = new ModeSetting("Default Position", "Middle Left", new String[] { "Middle Left", "Custom"});
this.x = new NumberSetting("guesserX", 0.0, -100000.0, 100000.0, 1.0E-5, a -> true);
this.y = new NumberSetting("guesserY", 0.0, -100000.0, 100000.0, 1.0E-5, a -> true);
this.blurStrength = new ModeSetting("Blur Strength", "Low", new String[] { "None", "Low", "High" });
this.displayedGuesses = new NumberSetting("Displayed guesses", 10.0, 5, 50.0, 1.0);
this.autoGuess = new BooleanSetting("Auto Guess", true);
this.autoJoin = new BooleanSetting("Auto Join", true);
this.addSettings(defaultPosition, this.x, this.y, this.blurStrength, this.displayedGuesses, this.autoGuess, this.autoJoin);

this.wordList = new ArrayList<String>();
this.tips = 0;
this.guesses = null;
this.period = 3200;
this.lastGuess = 0L;
}

@Override
public void assign()
{
Kore.buildGuesser = this;
}

@SubscribeEvent
public void onChat(final ClientChatReceivedEvent event) {
if (!this.isToggled()) {
return;
}
if(autoJoin.isEnabled()) {
try {
final ScoreObjective o = Minecraft.getMinecraft().thePlayer.getWorldScoreboard().getObjectiveInDisplaySlot(0);
if (ChatFormatting.stripFormatting(((o == null) ? Minecraft.getMinecraft().thePlayer.getWorldScoreboard().getObjectiveInDisplaySlot(1) : o).getDisplayName()).contains("GUESS THE BUILD") && ChatFormatting.stripFormatting(event.message.getFormattedText()).startsWith("This game has been recorded")) {
Minecraft.getMinecraft().thePlayer.sendChatMessage("/play build_battle_guess_the_build");
}
}
catch (Exception ex) {}
}
if (event.message.getFormattedText().startsWith("§eThe theme was") && this.guesses != null) {
this.guesses.stop();
this.guesses = null;
}
if (ChatFormatting.stripFormatting(event.message.getFormattedText()).startsWith(Minecraft.getMinecraft().thePlayer.getName() + " correctly guessed the theme!") && this.guesses != null) {
this.guesses.stop();
this.guesses = null;
}
if (event.type == 2) {
if (event.message.getFormattedText().contains("The theme is") && event.message.getFormattedText().contains("_")) {
if (this.wordList.isEmpty()) {
this.loadWords();
}
final int newTips = this.getTips(event.message.getFormattedText());
if (newTips != this.tips) {
this.tips = newTips;
tip = ChatFormatting.stripFormatting(event.message.getFormattedText()).replaceFirst("The theme is ", "");
matchingWords = this.getMatchingWords();
if (matchingWords.size() == 1) {
Kore.notificationManager.showNotification("Found 1 matching word! Sending: §f" + matchingWords.get(0), 2000, Notification.NotificationType.INFO);
if (this.guesses != null) {
this.guesses.stop();
this.guesses = null;
final ArrayList<String> list = new ArrayList<>();
new Thread(() -> {
try {
Thread.sleep(this.period - (System.currentTimeMillis() - this.lastGuess));
}
catch (Exception e) {
e.printStackTrace();
}
if(autoGuess.isEnabled()) {
Minecraft.getMinecraft().thePlayer.sendChatMessage("/ac " + list.get(0).toLowerCase());
}
}).start();
return;
}
if(autoGuess.isEnabled()) {
Minecraft.getMinecraft().thePlayer.sendChatMessage("/ac " + matchingWords.get(0).toLowerCase());
}
}
else {
Kore.notificationManager.showNotification(String.format("Found %s matching words!", matchingWords.size()), 1500, Notification.NotificationType.INFO);
}
}
}
else {
this.tips = 0;
}
}
}

@SubscribeEvent
public void onChatEvent(final GuiChatEvent event) {
if (!this.isToggled()) {
return;
}

final DraggableComponent component = GuesserHud.guesserHud;

if (event instanceof GuiChatEvent.MouseClicked) {
if (component.isHovered(event.mouseX, event.mouseY)) {
defaultPosition.setSelected("Custom");
component.startDragging();
}
}
else if (event instanceof GuiChatEvent.MouseReleased) {
component.stopDragging();
}
else if (event instanceof GuiChatEvent.Closed) {
component.stopDragging();
}
else if (event instanceof GuiChatEvent.DrawChatEvent) {

}
}

@SubscribeEvent
public void onRender(final RenderGameOverlayEvent.Post event) {
if (Minecraft.getMinecraft().theWorld != null && Minecraft.getMinecraft().thePlayer != null && this.isToggled() && event.type == RenderGameOverlayEvent.ElementType.ALL) {
GuesserHud.guesserHud.drawScreen(matchingWords);
}
}

private int getTips(final String text) {
return text.replaceAll(" ", "").replaceAll("_", "").length();
}

private void loadWords() {
try {
final BufferedReader br = new BufferedReader(new InputStreamReader(Kore.class.getClassLoader().getResourceAsStream("assets/GTBWords.txt")));
String line;
while ((line = br.readLine()) != null) {
this.wordList.add(line);
}
br.close();
}
catch (Exception e) {
e.printStackTrace();
Kore.sendMessageWithPrefix("Couldn't load word list!");
}
}

public ArrayList<String> getMatchingWords() {
final ArrayList<String> list = new ArrayList<String>();
for (final String word : this.wordList) {
if (word.length() == tip.length()) {
boolean matching = true;
for (int i = 0; i < word.length(); ++i) {
if (tip.charAt(i) == '_') {
if (word.charAt(i) != ' ') {
continue;
}
matching = false;
}
if (tip.charAt(i) != word.charAt(i)) {
matching = false;
}
if (!matching) {
break;
}
}
if (!matching) {
continue;
}
list.add(word);
}
}
return list;
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.kore.modules.player;
package net.kore.modules.movement;

import net.kore.Kore;
import net.kore.events.PostGuiOpenEvent;
Expand All @@ -16,15 +16,15 @@
import org.lwjgl.input.Mouse;
import org.lwjgl.opengl.Display;

public class GuiMove extends Module
public class InvMove extends Module
{
private BooleanSetting rotate;
private BooleanSetting drag;
private NumberSetting sensivity;
public static KeyBinding[] binds;

public GuiMove() {
super("InvMove", Category.PLAYER);
public InvMove() {
super("InvMove", Category.MOVEMENT);
this.rotate = new BooleanSetting("Rotate", false);
this.drag = new BooleanSetting("Alt drag", true) {
@Override
Expand All @@ -40,7 +40,7 @@ public boolean isHidden() {
@Override
public void assign()
{
Kore.guiMove = this;
Kore.invMove = this;
}

@Override
Expand All @@ -51,7 +51,7 @@ public boolean isToggled() {
@Override
public void onDisable() {
if (Kore.mc.currentScreen != null) {
for (final KeyBinding bind : GuiMove.binds) {
for (final KeyBinding bind : InvMove.binds) {
KeyBinding.setKeyBindState(bind.getKeyCode(), false);
}
}
Expand All @@ -66,7 +66,7 @@ private void updateBinds()
public void onGui(final PostGuiOpenEvent event) {
if (binds == null) updateBinds();
if (!(event.gui instanceof GuiChat) && this.isToggled()) {
for (final KeyBinding bind : GuiMove.binds) {
for (final KeyBinding bind : InvMove.binds) {
KeyBinding.setKeyBindState(bind.getKeyCode(), GameSettings.isKeyDown(bind));
}
}
Expand All @@ -76,7 +76,7 @@ public void onGui(final PostGuiOpenEvent event) {
public void onRender(final RenderWorldLastEvent event) {
if (Kore.mc.currentScreen != null && !(Kore.mc.currentScreen instanceof GuiChat) && this.isToggled()) {
if (binds == null) updateBinds();
for (final KeyBinding bind : GuiMove.binds) {
for (final KeyBinding bind : InvMove.binds) {
KeyBinding.setKeyBindState(bind.getKeyCode(), GameSettings.isKeyDown(bind));
}
if ((Kore.mc.currentScreen instanceof GuiContainer || Kore.mc.currentScreen instanceof ICrafting) && this.rotate.isEnabled()) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/kore/modules/render/Interfaces.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public boolean isHidden() {
return !Interfaces.this.customScoreboard.isEnabled();
}
};
this.hideLobby = new BooleanSetting("Hide lobby", true) {
this.hideLobby = new BooleanSetting("Hide Lobby", false) {
@Override
public boolean isHidden() {
return !Interfaces.this.customScoreboard.isEnabled();
Expand Down
Loading

0 comments on commit e01dfc9

Please sign in to comment.