Skip to content

Commit

Permalink
1.9.3 | Release
Browse files Browse the repository at this point in the history
Small Release
  • Loading branch information
PhilipPanda committed May 23, 2024
1 parent 88bfd5d commit f055578
Show file tree
Hide file tree
Showing 64 changed files with 1,320 additions and 894 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
mod_id=templeclient
mod_name=TempleClient
mod_group=xyz.templecheats.templeclient
mod_version=1.9.2
mod_version=1.9.3
mod_author=["PhilipPanda"]
mod_description=a 1.12.2 Minecraft utility mod
minecraft_version=1.12.2
Expand Down
56 changes: 32 additions & 24 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
@if "%DEBUG%" == "" @echo off
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
Expand All @@ -9,19 +25,23 @@
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Expand All @@ -35,7 +55,7 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init
if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
Expand All @@ -45,38 +65,26 @@ echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
if %ERRORLEVEL% equ 0 goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%

:mainEnd
if "%OS%"=="Windows_NT" endlocal
Expand Down
37 changes: 15 additions & 22 deletions src/main/java/xyz/templecheats/templeclient/TempleClient.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/************************************************************************************************
* Temple Client *
* Temple Client *
* (c) 2023-2024 Temple Client Development Team. All rights reserved. *
************************************************************************************************/

Expand All @@ -21,7 +21,6 @@
import xyz.templecheats.templeclient.event.ForgeEventManager;
import xyz.templecheats.templeclient.features.gui.font.FontUtils;
import xyz.templecheats.templeclient.features.gui.menu.GuiEventsListener;
import xyz.templecheats.templeclient.features.gui.menu.alt.AltManager;
import xyz.templecheats.templeclient.manager.*;
import xyz.templecheats.templeclient.util.friend.FriendManager;
import xyz.templecheats.templeclient.util.keys.KeyUtil;
Expand All @@ -34,19 +33,18 @@
public class TempleClient {
public static final String MODID = "templeclient";
public static final String NAME = "Temple Client";
public static final String VERSION = "1.9.2";
public static final String VERSION = "1.9.3";
public static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
public static String name = NAME + " " + VERSION;
public static AnnotatedEventManager eventBus;
public static AltManager altManager;
public static SettingsManager settingsManager;
public static ModuleManager moduleManager;
public static ForgeEventManager clientForgeEventManager;
public static CommandManager commandManager;
public static ConfigManager configManager;
public static CapeManager capeManager;
public static FriendManager friendManager;
public static AltManager altManager;
public static SongManager SONG_MANAGER;
public static HoleManager holeManager = new HoleManager();
public static InventoryManager inventoryManager = new InventoryManager();
public static RotationManager rotationManager = new RotationManager();
Expand All @@ -67,22 +65,23 @@ public void init(FMLInitializationEvent event) {
eventBus = new AnnotatedEventManager();
clientForgeEventManager = new ForgeEventManager();
MinecraftForge.EVENT_BUS.register(clientForgeEventManager);
configManager = new ConfigManager();
logger.info("Initialized Config!");

altManager = new AltManager();

settingsManager = new SettingsManager();

TempleClient.moduleManager = new ModuleManager();
moduleManager = new ModuleManager();
logger.info("Module Manager Loaded.");

TempleClient.commandManager = new CommandManager();
commandManager = new CommandManager();
logger.info("Commands Loaded.");

capeManager = new CapeManager();

friendManager = new FriendManager();

altManager = new AltManager();

SONG_MANAGER = new SongManager();
threadManager = new ThreadManager();

MinecraftForge.EVENT_BUS.register(clientForgeEventManager);
Expand All @@ -100,37 +99,31 @@ public void init(FMLInitializationEvent event) {

configManager.loadAll();

Runtime.getRuntime().addShutdownHook(new Thread(TempleClient.configManager::saveAll));
Runtime.getRuntime().addShutdownHook(new Thread(configManager::saveAll));
}

@SubscribeEvent
public void onChat(ClientChatEvent event) {

if (event.getMessage().startsWith("."))
if (TempleClient.commandManager.executeCommand(event.getMessage()))
if (commandManager.executeCommand(event.getMessage()))
event.setCanceled(true);
}

public static void setSession(Session s) {
Class < ? extends Minecraft > mc = Minecraft.getMinecraft().getClass();

Class<? extends Minecraft> mc = Minecraft.getMinecraft().getClass();
try {
Field session = null;

for (Field f: mc.getDeclaredFields()) {
for (Field f : mc.getDeclaredFields()) {
if (f.getType().isInstance(s)) {
session = f;
}
}

if (session == null) {
throw new IllegalStateException("Session Null");
}

session.setAccessible(true);
session.set(Minecraft.getMinecraft(), s);
session.setAccessible(false);

name = "TempleClient 1.12.2 | User: " + Minecraft.getMinecraft().getSession().getUsername();
Display.setTitle(name);
} catch (Exception e) {
Expand All @@ -139,6 +132,6 @@ public static void setSession(Session s) {
}

public static ModuleManager getModuleManager() {
return TempleClient.moduleManager;
return moduleManager;
}
}
}
Loading

0 comments on commit f055578

Please sign in to comment.