Skip to content

Commit

Permalink
v2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
valekatoz committed Jan 13, 2024
1 parent bd558b9 commit 56c83df
Show file tree
Hide file tree
Showing 28 changed files with 134 additions and 175 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ if this code is not in compliance with some licenses or something let me know op
- Giant Models
- Chinese Hat
- Animations
- **Purse Spoofer**
- **Essential Cosmetics Unlocker**
- Protections
- Anti Nicker (WIP)
- Mod Hider
Expand All @@ -32,15 +30,19 @@ if this code is not in compliance with some licenses or something let me know op
- Fast Place
- FreeCam
- Inventory Move
- Ghost Blocks
- Combat
- AimAssist
- AntiBot
- Misc
- Skyblock
- **Purse Spoofer**
- Auto Experiments
- Auto Harp
- Misc
- Ghost Blocks
- Murder Finder
- Dev
- Client
- **License system** (soon)
- **Essential Cosmetics Unlocker**
- Debug


Expand Down
1 change: 1 addition & 0 deletions server/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(these are just example files you might wanna have on your server to handle stuff correctly)
14 changes: 14 additions & 0 deletions server/home.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Latest update:
(01/01/1970) - v6.9
- Bug fixes and improvements
- Bug fixes and improvements
- Bug fixes and improvements
- Bug fixes and improvements

Informations:
- Github: github.com/valekatoz/Kore
- Discord: valekatoz

Developers:
- valekatoz
- Kyrotechnic
57 changes: 38 additions & 19 deletions src/main/java/net/kore/Kore.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
package net.kore;

import net.kore.events.JoinGameEvent;
import net.kore.managers.*;
import net.kore.modules.ClientSettings;
import net.kore.modules.Module;
import net.kore.modules.combat.AimAssist;
import net.kore.modules.combat.AntiBot;
import net.kore.modules.misc.GhostBlocks;
import net.kore.modules.misc.MurderFinder;
import net.kore.modules.misc.PurseSpoofer;
import net.kore.modules.skyblock.PurseSpoofer;
import net.kore.modules.player.*;
import net.kore.modules.protection.*;
import net.kore.modules.render.*;
import net.kore.modules.misc.AutoExperiments;
import net.kore.modules.misc.AutoHarp;
import net.kore.modules.skyblock.AutoExperiments;
import net.kore.modules.skyblock.AutoHarp;
import net.kore.utils.Notification;
import net.kore.utils.font.Fonts;
import net.kore.utils.render.BlurUtils;
Expand All @@ -24,9 +26,16 @@
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import com.google.common.collect.Lists;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.network.FMLNetworkEvent;

import java.io.*;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

@Mod(modid = Kore.MOD_ID, name = Kore.MOD_NAME, version = Kore.VERSION)
public class Kore {
Expand All @@ -42,7 +51,7 @@ public class Kore {

// Variables
public static Minecraft mc;
public static List<String> changelog;
public static List<String> changelog = new ArrayList<>();
public static char fancy = (char) 167;

// (Important) Modules
Expand All @@ -61,7 +70,6 @@ public class Kore {
public static Nametags nametags;
public static ModHider modHider;
public static NickHider nickHider;
public static AntiNicker antiNicker;
public static StaffAnalyser staffAnalyser;
public static Proxy proxy;
public static FreeCam freeCam;
Expand Down Expand Up @@ -116,27 +124,40 @@ public static void handleKey(int key)

public static void loadChangelog()
{
changelog = Lists.newArrayList("This is a development build of Kore", "Use it and be aware we are not liable", "if you get banned.","");

URL url2 = null;
BufferedReader reader = null;

// Tries fetching the home from server
try {
reader = new BufferedReader(new InputStreamReader(Minecraft.getMinecraft().getResourceManager().getResource(new ResourceLocation("Kore", "changelog.txt")).getInputStream()));
String line = null;
url2 = new URL("https://kore.valekatoz.com/home.txt");

HttpURLConnection connection = (HttpURLConnection) url2.openConnection();
connection.setRequestProperty("User-Agent", "Kore/"+Kore.VERSION); // custom UserAgent to skip cloudflare managed challenge

reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));

String line;
while ((line = reader.readLine()) != null) {
changelog.add(line);
}
} catch (IOException e) {
throw new RuntimeException(e);
} finally {
if (reader != null) {
try {
reader.close();
} catch (IOException e) {
throw new RuntimeException(e);
if(Kore.clientSettings.debug.isEnabled()) {
e.printStackTrace();
}

// If fetching the home from server failed we fetch it from local file
try {
reader = new BufferedReader(new InputStreamReader(Minecraft.getMinecraft().getResourceManager().getResource(new ResourceLocation("Kore", "home.txt")).getInputStream()));
String line = null;
while ((line = reader.readLine()) != null) {
changelog.add(line);
}

reader.close();
} catch (IOException exception) {
throw new RuntimeException(exception);
}
}

}

@Mod.EventHandler
Expand All @@ -148,9 +169,7 @@ public void startForge(FMLPreInitializationEvent pre)
@Mod.EventHandler
public void startLate(FMLInitializationEvent event)
{
Fonts.bootstrap();

start();
}

public static void sendMessage(Object object) {
Expand Down
4 changes: 3 additions & 1 deletion src/main/java/net/kore/events/JoinGameEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@

import net.minecraftforge.fml.common.eventhandler.Event;

public class JoinGameEvent extends Event {}
public class JoinGameEvent extends Event {

}
10 changes: 6 additions & 4 deletions src/main/java/net/kore/mixins/MixinMinecraft.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package net.kore.mixins;

import net.kore.Kore;
import net.kore.utils.font.Fonts;
import net.minecraft.block.material.Material;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.Entity;
Expand All @@ -16,15 +17,16 @@

@Mixin(Minecraft.class)
public class MixinMinecraft {
@Shadow private int rightClickDelayTimer;
@Shadow private Entity renderViewEntity;

@Inject(method = "startGame", at = @At("TAIL"), cancellable = false)
public void startGame(CallbackInfo ci)
{
Kore.mc = Minecraft.getMinecraft();
Fonts.bootstrap();
Kore.start();
}

@Shadow private int rightClickDelayTimer;
@Shadow private Entity renderViewEntity;

@Inject(method = { "runTick" }, at = { @At(value = "INVOKE", target = "Lnet/minecraft/client/Minecraft;dispatchKeypresses()V") })
public void keyPresses(final CallbackInfo ci) {
final int k = (Keyboard.getEventKey() == 0) ? (Keyboard.getEventCharacter() + '\u0100') : Keyboard.getEventKey();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public abstract class MixinCosmeticsManager {
*/
@Overwrite
public @NotNull State<Set<String>> getUnlockedCosmetics() {
if(Kore.themeManager != null && Kore.clientSettings.cosmeticsUnlocker != null && Kore.clientSettings.cosmeticsUnlocker.isEnabled()) {
if(Kore.themeManager != null && Kore.clientSettings.unlockCosmetics != null && Kore.clientSettings.unlockCosmetics.isEnabled()) {
return StateKt.stateOf(getCosmeticsData().getCosmetics().get().stream().map(Cosmetic::getId).collect(Collectors.toSet()));
} else {
return unlockedCosmetics;
Expand All @@ -59,7 +59,7 @@ public abstract class MixinCosmeticsManager {

@Inject(method = "<init>", at = @At("TAIL"))
public void CosmeticManager(ConnectionManager connectionManager, File baseDir, CallbackInfo ci) {
if(Kore.clientSettings != null && Kore.clientSettings.cosmeticsUnlocker != null && Kore.clientSettings.cosmeticsUnlocker.isEnabled()) {
if(Kore.clientSettings != null && Kore.clientSettings.unlockCosmetics != null && Kore.clientSettings.unlockCosmetics.isEnabled()) {
//load config
try {
System.out.println("[Kore] Loading config");
Expand All @@ -81,14 +81,14 @@ public void CosmeticManager(ConnectionManager connectionManager, File baseDir, C

@Inject(method = "resetState", at = @At("TAIL"))
public void resetState(CallbackInfo ci) {
if(Kore.clientSettings != null && Kore.clientSettings.cosmeticsUnlocker != null && Kore.clientSettings.cosmeticsUnlocker.isEnabled()) {
if(Kore.clientSettings != null && Kore.clientSettings.unlockCosmetics != null && Kore.clientSettings.unlockCosmetics.isEnabled()) {
setEquippedCosmetics(UUIDUtil.getClientUUID(), map);
}
}

@Inject(method = "toggleOwnCosmeticVisibility", at = @At("HEAD"))
public void toggleOwnCosmeticVisibility(boolean notification, CallbackInfo ci) {
if(Kore.clientSettings != null && Kore.clientSettings.cosmeticsUnlocker != null && Kore.clientSettings.cosmeticsUnlocker.isEnabled()) {
if(Kore.clientSettings != null && Kore.clientSettings.unlockCosmetics != null && Kore.clientSettings.unlockCosmetics.isEnabled()) {
if (ownCosmeticsVisible) return;
Notifications.INSTANCE.push("Kore", "Loaded cosmetics from config.");
setEquippedCosmetics(UUIDUtil.getClientUUID(), map);
Expand All @@ -101,7 +101,7 @@ public void toggleOwnCosmeticVisibility(boolean notification, CallbackInfo ci) {
*/
@Overwrite
public @NotNull ImmutableMap<CosmeticSlot, String> getEquippedCosmetics() {
if(Kore.clientSettings != null && Kore.clientSettings != null && Kore.clientSettings.cosmeticsUnlocker != null && Kore.clientSettings.cosmeticsUnlocker.isEnabled()) {
if(Kore.clientSettings != null && Kore.clientSettings != null && Kore.clientSettings.unlockCosmetics != null && Kore.clientSettings.unlockCosmetics.isEnabled()) {
ImmutableMap<CosmeticSlot, String> result = ImmutableMap.copyOf(map);
return result != null ? result : ImmutableMap.of();
} else {
Expand All @@ -112,7 +112,7 @@ public void toggleOwnCosmeticVisibility(boolean notification, CallbackInfo ci) {

@Inject(method = "updateEquippedCosmetic(Lgg/essential/mod/cosmetics/CosmeticSlot;Ljava/lang/String;)V", at = @At("HEAD"))
public void updateEquippedCosmetic(CosmeticSlot slot, String cosmeticId, CallbackInfo ci) {
if(Kore.clientSettings != null && Kore.clientSettings.cosmeticsUnlocker != null && Kore.clientSettings.cosmeticsUnlocker.isEnabled()) {
if(Kore.clientSettings != null && Kore.clientSettings.unlockCosmetics != null && Kore.clientSettings.unlockCosmetics.isEnabled()) {
if (cosmeticId != null) map.put(slot, cosmeticId);
else map.remove(slot);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
public class MixinServerCosmeticsPopulatePacketHandler {
@Inject(method = "onHandle(Lgg/essential/network/connectionmanager/ConnectionManager;Lgg/essential/connectionmanager/common/packet/cosmetic/ServerCosmeticsPopulatePacket;)V", at = @At("HEAD"))
public void onHandle(ConnectionManager connectionManager, ServerCosmeticsPopulatePacket packet, CallbackInfo ci) {
if(Kore.clientSettings != null && Kore.clientSettings.cosmeticsUnlocker != null && Kore.clientSettings.cosmeticsUnlocker.isEnabled()) {
if(Kore.clientSettings != null && Kore.clientSettings.unlockCosmetics != null && Kore.clientSettings.unlockCosmetics.isEnabled()) {
try {
Gson gson = new Gson();
List<Cosmetic> cosmetics = new ArrayList<>();
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/net/kore/modules/ClientSettings.java
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package net.kore.modules;

import net.kore.Kore;
import net.kore.modules.Module;
import net.kore.settings.BooleanSetting;

public class ClientSettings extends Module {
public BooleanSetting cosmeticsUnlocker = new BooleanSetting("Unlock Cosmetics", false);
public BooleanSetting debug = new BooleanSetting("Developer Mode", false);
public BooleanSetting unlockCosmetics;
public BooleanSetting debug;

public ClientSettings()
{
super("Client Settings", Category.SETTINGS);
this.addSettings(cosmeticsUnlocker, debug);
this.unlockCosmetics = new BooleanSetting("Unlock Cosmetics", false);
this.debug = new BooleanSetting("Developer Mode", false);
this.addSettings(unlockCosmetics, debug);
}

@Override
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/net/kore/modules/Module.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import net.kore.settings.Setting;
import net.kore.utils.MilliTimer;
import net.kore.utils.Notification;
import net.minecraft.util.ChatComponentText;
import org.lwjgl.input.Keyboard;

import java.util.ArrayList;
Expand Down Expand Up @@ -76,7 +75,7 @@ public void onEnable() {
}

public void riskWarning() {
if(this.flagType == FlagType.RISKY) {
if(this.flagType == FlagType.DETECTED) {
Kore.notificationManager.showNotification("This module is detected, use it carefully", 2500, Notification.NotificationType.WARNING);
}
}
Expand Down Expand Up @@ -172,6 +171,7 @@ public enum Category
COMBAT("Combat"),
PLAYER("Player"),
MISC("Misc"),
SKYBLOCK("Skyblock"),
PROTECTIONS("Protections"),
SETTINGS("Settings");

Expand All @@ -185,6 +185,6 @@ private Category(final String name) {
public enum FlagType
{
SAFE,
RISKY
DETECTED
}
}
2 changes: 1 addition & 1 deletion src/main/java/net/kore/modules/combat/AimAssist.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void setValue(final double value) {
this.invisibles = new BooleanSetting("Invisibles", false);
this.teams = new BooleanSetting("Teams", true);
this.addSettings(this.fov, this.range, this.minSpeed, this.speed, this.players, this.mobs, this.teams, this.invisibles, this.vertical);
this.setFlagType(FlagType.RISKY);
this.setFlagType(FlagType.DETECTED);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.kore.modules.player;
package net.kore.modules.misc;

import com.mojang.authlib.properties.Property;
import net.kore.Kore;
Expand Down Expand Up @@ -37,7 +37,7 @@ public class GhostBlocks extends Module {
private int ticks;

public GhostBlocks() {
super("Ghost Blocks", 0, Category.PLAYER);
super("Ghost Blocks", 0, Category.MISC);
this.range = new NumberSetting("Range", 10.0, 1.0, 100.0, 1.0);
this.delay = new NumberSetting("Delay (Seconds)", 3.0, 1.0, 15.0, 1.0);
this.mode = new ModeSetting("Speed", "Fast", new String[]{"Slow", "Fast"});
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/kore/modules/player/FastBreak.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public FastBreak() {
this.mineSpeed = new NumberSetting("Mining speed", 1.4, 1.0, 1.6, 0.1);
this.maxBlocks = new NumberSetting("Additional blocks", 0.0, 0.0, 4.0, 1.0);
this.addSettings(this.maxBlocks, this.mineSpeed);
this.setFlagType(FlagType.RISKY);
this.setFlagType(FlagType.DETECTED);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/kore/modules/player/FastPlace.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public FastPlace()
{
super("Fast Place", Category.PLAYER);
this.addSettings(this.placeDelay = new NumberSetting("Place delay", 2.0, 0.0, 4.0, 1.0));
this.setFlagType(FlagType.RISKY);
this.setFlagType(FlagType.DETECTED);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/kore/modules/player/FreeCam.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public FreeCam() {
this.speed = new NumberSetting("Speed", 3.0, 0.1, 5.0, 0.1);
this.tracer = new BooleanSetting("Show tracer", false);
this.addSettings(this.speed, this.tracer);
this.setFlagType(FlagType.RISKY);
this.setFlagType(FlagType.DETECTED);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/kore/modules/player/GuiMove.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public boolean isHidden() {
};
this.sensivity = new NumberSetting("Sensivity", 1.5, 0.1, 3.0, 0.01, aBoolean -> !this.rotate.isEnabled());
this.addSettings(this.rotate, this.sensivity, this.drag);
this.setFlagType(FlagType.RISKY);
this.setFlagType(FlagType.DETECTED);
}

@Override
Expand Down
Loading

0 comments on commit 56c83df

Please sign in to comment.