├── .gitignore ├── ChangeLog.txt ├── LICENSE.md ├── README.md ├── build.gradle ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── src └── main ├── java ├── de │ └── Hero │ │ └── clickgui │ │ ├── ClickGUI.java │ │ ├── Panel.java │ │ ├── elements │ │ ├── Element.java │ │ ├── ModuleButton.java │ │ └── menu │ │ │ ├── ElementCheckBox.java │ │ │ ├── ElementColorPicker.java │ │ │ ├── ElementComboBox.java │ │ │ └── ElementSlider.java │ │ └── util │ │ ├── ColorUtil.java │ │ └── FontUtil.java └── me │ └── finz0 │ └── osiris │ ├── BitcoinMiner.java │ ├── OsirisMod.java │ ├── OsirisRPC.java │ ├── ShutDownHookerino.java │ ├── command │ ├── Command.java │ ├── CommandManager.java │ └── commands │ │ ├── AutoGgCommand.java │ │ ├── BindCommand.java │ │ ├── ClientMsgsCommand.java │ │ ├── ClientnameCommand.java │ │ ├── CmdsCommand.java │ │ ├── ConfigCommand.java │ │ ├── DrawnCommand.java │ │ ├── EnemyCommand.java │ │ ├── FontCommand.java │ │ ├── FriendCommand.java │ │ ├── LoadAnnouncerCommand.java │ │ ├── LoadSpammerCommand.java │ │ ├── MacroCommand.java │ │ ├── MiddleXCommand.java │ │ ├── ModsCommand.java │ │ ├── OpenFolderCommand.java │ │ ├── PrefixCommand.java │ │ ├── RainbowSpeedCommand.java │ │ ├── SetCommand.java │ │ ├── ToggleCommand.java │ │ └── WaypointCommand.java │ ├── enemy │ ├── Enemies.java │ └── Enemy.java │ ├── event │ ├── EventProcessor.java │ ├── OsirisEvent.java │ └── events │ │ ├── DestroyBlockEvent.java │ │ ├── GuiScreenDisplayedEvent.java │ │ ├── PacketEvent.java │ │ ├── PlayerJoinEvent.java │ │ ├── PlayerJumpEvent.java │ │ ├── PlayerLeaveEvent.java │ │ ├── PlayerMoveEvent.java │ │ └── RenderEvent.java │ ├── friends │ ├── Friend.java │ └── Friends.java │ ├── gui │ ├── csgui │ │ ├── CategoryButton.java │ │ ├── CsClickGUI.java │ │ └── ModuleButton.java │ └── hud │ │ ├── HudComponentManager.java │ │ └── components │ │ ├── ArmorComponent.java │ │ ├── BpsComponent.java │ │ ├── CoordsComponent.java │ │ ├── CrystalsComponent.java │ │ ├── DirectionComponent.java │ │ ├── ExpComponent.java │ │ ├── FpsComponent.java │ │ ├── GappsComponent.java │ │ ├── HoleComponent.java │ │ ├── InventoryComponent.java │ │ ├── PingComponent.java │ │ ├── PlayerComponent.java │ │ ├── PvpinfoComponent.java │ │ ├── TimeComponent.java │ │ ├── TotemsComponent.java │ │ ├── TpsComponent.java │ │ ├── WatermarkComponent.java │ │ └── WelcomerComponent.java │ ├── macro │ ├── Macro.java │ └── MacroManager.java │ ├── mixin │ ├── OsirisMixinLoader.java │ └── mixins │ │ ├── MixinAbstractClientPlayer.java │ │ ├── MixinBlock.java │ │ ├── MixinBlockSoulSand.java │ │ ├── MixinEntity.java │ │ ├── MixinEntityPlayer.java │ │ ├── MixinEntityPlayerSP.java │ │ ├── MixinEntityRenderer.java │ │ ├── MixinGuiContainer.java │ │ ├── MixinGuiMainMenu.java │ │ ├── MixinGuiNewChat.java │ │ ├── MixinGuiPlayerTabOverlay.java │ │ ├── MixinGuiScreen.java │ │ ├── MixinLayerBipedArmor.java │ │ ├── MixinMinecraft.java │ │ ├── MixinMovementInputFromOptions.java │ │ ├── MixinNetHandlerPlayClient.java │ │ ├── MixinNetworkManager.java │ │ └── MixinPlayerControllerMP.java │ ├── module │ ├── Module.java │ ├── ModuleManager.java │ └── modules │ │ ├── chat │ │ ├── Announcer.java │ │ ├── AutoGG.java │ │ ├── AutoReply.java │ │ ├── BetterChat.java │ │ ├── ChatSuffix.java │ │ ├── ChatTimeStamps.java │ │ ├── ColorChat.java │ │ ├── DotGodSpammer.java │ │ ├── KettuLinuxDupe.java │ │ ├── Spammer.java │ │ ├── ToggleMsgs.java │ │ ├── UwuChat.java │ │ ├── VisualRange.java │ │ └── Welcomer.java │ │ ├── combat │ │ ├── AntiChainPop.java │ │ ├── AutoCrystal.java │ │ ├── AutoOffhand.java │ │ ├── AutoTrap.java │ │ ├── BedAura.java │ │ ├── Criticals.java │ │ ├── HoleFill.java │ │ ├── KillAura.java │ │ ├── SmartOffhand.java │ │ └── Surround.java │ │ ├── gui │ │ ├── ArmorHUD.java │ │ ├── Bps.java │ │ ├── ClickGuiModule.java │ │ ├── Coords.java │ │ ├── Crystals.java │ │ ├── CsClickGuiModule.java │ │ ├── CurrentHole.java │ │ ├── Direction.java │ │ ├── Exp.java │ │ ├── Fps.java │ │ ├── Gapples.java │ │ ├── ModList.java │ │ ├── NotificationsHud.java │ │ ├── Ping.java │ │ ├── Players.java │ │ ├── PotionEffects.java │ │ ├── PvpInfo.java │ │ ├── Time.java │ │ ├── Totems.java │ │ ├── Tps.java │ │ ├── Watermark.java │ │ └── WelcomerGui.java │ │ ├── misc │ │ ├── AutoBackdoor.java │ │ ├── AutoNomadHut.java │ │ ├── AutoRespawn.java │ │ ├── BreakTweaks.java │ │ ├── ClinetTimer.java │ │ ├── CropNuker.java │ │ ├── DeathWaypoint.java │ │ ├── LogoutSpots.java │ │ ├── MiddleClickFriends.java │ │ ├── NoEntityTrace.java │ │ ├── Notifications.java │ │ ├── RpcModule.java │ │ ├── SnakeModule.java │ │ ├── Timer.java │ │ ├── TotemPopCounter.java │ │ └── XCarry.java │ │ ├── movement │ │ ├── ElytraFly.java │ │ ├── GuiMove.java │ │ ├── Jesus.java │ │ ├── NoPush.java │ │ ├── NoSlow.java │ │ ├── Speed.java │ │ ├── Sprint.java │ │ └── Velocity.java │ │ ├── player │ │ ├── Blink.java │ │ ├── FastUse.java │ │ ├── Freecam.java │ │ ├── NoInteract.java │ │ ├── NoSwing.java │ │ ├── PortalGodMode.java │ │ └── SpeedMine.java │ │ └── render │ │ ├── BlockHighlight.java │ │ ├── BoxESP.java │ │ ├── Brightness.java │ │ ├── CameraClip.java │ │ ├── CapesModule.java │ │ ├── CsgoESP.java │ │ ├── FovModule.java │ │ ├── GlowESP.java │ │ ├── HitboxESP.java │ │ ├── HoleESP.java │ │ ├── LowHands.java │ │ ├── NoRender.java │ │ ├── ShulkerPreview.java │ │ ├── StorageESP.java │ │ ├── TabGui.java │ │ └── Tracers.java │ ├── settings │ ├── Setting.java │ └── SettingsManager.java │ ├── util │ ├── BlockUtils.java │ ├── CapeUtils.java │ ├── ConfigUtils.java │ ├── FontUtils.java │ ├── GeometryMasks.java │ ├── OsirisTessellator.java │ ├── Rainbow.java │ ├── TpsUtils.java │ ├── font │ │ ├── CFont.java │ │ └── CFontRenderer.java │ └── snake │ │ └── Board.java │ └── waypoint │ ├── Waypoint.java │ └── WaypointManager.java └── resources ├── assets └── osiris │ └── textures │ ├── cape.png │ └── colorpicker.png ├── darwin └── libdiscord-rpc.dylib ├── linux-x86-64 └── libdiscord-rpc.so ├── mcmod.info ├── mixins.osiris.json ├── osiris_at.cfg ├── win32-x86-64 └── discord-rpc.dll └── win32-x86 └── discord-rpc.dll /ChangeLog.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chell-dev/Osiris/828e0f8be134f0ac8622f148a3fd8b000ef2b8a4/ChangeLog.txt -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Osiris 2 | Join [the discord](https://discord.gg/YeMpphF) for latest releases until I set up the github properly 3 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Sets default memory used for gradle commands. Can be overridden by user or command line properties. 2 | # This is required to provide enough memory for the Minecraft decompilation process. 3 | org.gradle.jvmargs=-Xmx3G 4 | modGroup=me.finz0 5 | modVersion=1.6 6 | modBaseName=osiris 7 | forgeVersion=1.12.2-14.23.5.2768 8 | # 1.12.2-14.23.0.2531 9 | #mcpVersion=snapshot_20170605 10 | mcpVersion=snapshot_20180814 -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chell-dev/Osiris/828e0f8be134f0ac8622f148a3fd8b000ef2b8a4/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Feb 21 11:05:58 CET 2020 2 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.8.1-all.zip 3 | distributionBase=GRADLE_USER_HOME 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @if "%DEBUG%" == "" @echo off 2 | @rem ########################################################################## 3 | @rem 4 | @rem Gradle startup script for Windows 5 | @rem 6 | @rem ########################################################################## 7 | 8 | @rem Set local scope for the variables with windows NT shell 9 | if "%OS%"=="Windows_NT" setlocal 10 | 11 | set DIRNAME=%~dp0 12 | if "%DIRNAME%" == "" set DIRNAME=. 13 | set APP_BASE_NAME=%~n0 14 | set APP_HOME=%DIRNAME% 15 | 16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 17 | set DEFAULT_JVM_OPTS= 18 | 19 | @rem Find java.exe 20 | if defined JAVA_HOME goto findJavaFromJavaHome 21 | 22 | set JAVA_EXE=java.exe 23 | %JAVA_EXE% -version >NUL 2>&1 24 | if "%ERRORLEVEL%" == "0" goto init 25 | 26 | echo. 27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 28 | echo. 29 | echo Please set the JAVA_HOME variable in your environment to match the 30 | echo location of your Java installation. 31 | 32 | goto fail 33 | 34 | :findJavaFromJavaHome 35 | set JAVA_HOME=%JAVA_HOME:"=% 36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 37 | 38 | if exist "%JAVA_EXE%" goto init 39 | 40 | echo. 41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 42 | echo. 43 | echo Please set the JAVA_HOME variable in your environment to match the 44 | echo location of your Java installation. 45 | 46 | goto fail 47 | 48 | :init 49 | @rem Get command-line arguments, handling Windows variants 50 | 51 | if not "%OS%" == "Windows_NT" goto win9xME_args 52 | 53 | :win9xME_args 54 | @rem Slurp the command line arguments. 55 | set CMD_LINE_ARGS= 56 | set _SKIP=2 57 | 58 | :win9xME_args_slurp 59 | if "x%~1" == "x" goto execute 60 | 61 | set CMD_LINE_ARGS=%* 62 | 63 | :execute 64 | @rem Setup the command line 65 | 66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 67 | 68 | @rem Execute Gradle 69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% 70 | 71 | :end 72 | @rem End local scope for the variables with windows NT shell 73 | if "%ERRORLEVEL%"=="0" goto mainEnd 74 | 75 | :fail 76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 77 | rem the _cmd.exe /c_ return code! 78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 79 | exit /b 1 80 | 81 | :mainEnd 82 | if "%OS%"=="Windows_NT" endlocal 83 | 84 | :omega 85 | -------------------------------------------------------------------------------- /src/main/java/de/Hero/clickgui/elements/menu/ElementCheckBox.java: -------------------------------------------------------------------------------- 1 | package de.Hero.clickgui.elements.menu; 2 | 3 | import java.awt.Color; 4 | 5 | import net.minecraft.client.gui.Gui; 6 | import de.Hero.clickgui.elements.Element; 7 | import de.Hero.clickgui.elements.ModuleButton; 8 | import de.Hero.clickgui.util.ColorUtil; 9 | import de.Hero.clickgui.util.FontUtil; 10 | import me.finz0.osiris.settings.Setting; 11 | 12 | /** 13 | * Made by HeroCode 14 | * it's free to use 15 | * but you have to credit me 16 | * 17 | * @author HeroCode 18 | */ 19 | public class ElementCheckBox extends Element { 20 | /* 21 | * Konstrukor 22 | */ 23 | public ElementCheckBox(ModuleButton iparent, Setting iset) { 24 | parent = iparent; 25 | set = iset; 26 | super.setup(); 27 | } 28 | 29 | /* 30 | * Rendern des Elements 31 | */ 32 | public void drawScreen(int mouseX, int mouseY, float partialTicks) { 33 | Color temp = ColorUtil.getClickGUIColor(); 34 | int color = new Color(temp.getRed(), temp.getGreen(), temp.getBlue(), 200).getRGB(); 35 | 36 | /* 37 | * Die Box und Umrandung rendern 38 | */ 39 | Gui.drawRect((int)x, (int)y, (int)x + (int)width, (int)y + (int)height, 0xff1a1a1a); 40 | 41 | /* 42 | * Titel und Checkbox rendern. 43 | */ 44 | FontUtil.drawString(setstrg, x + width - FontUtil.getStringWidth(setstrg), y + FontUtil.getFontHeight() / 2f - 0.5, 0xffffffff); 45 | Gui.drawRect((int)x + 1, (int)y + 2, (int)x + 12, (int)y + 13, set.getValBoolean() ? color : 0xff000000); 46 | if (isCheckHovered(mouseX, mouseY)) 47 | Gui.drawRect((int)x + 1, (int)y + 2, (int)x + 12, (int)y + 13, 0x55111111); 48 | } 49 | 50 | /* 51 | * 'true' oder 'false' bedeutet hat der Nutzer damit interagiert und 52 | * sollen alle anderen Versuche der Interaktion abgebrochen werden? 53 | */ 54 | public boolean mouseClicked(int mouseX, int mouseY, int mouseButton) { 55 | if (mouseButton == 0 && isCheckHovered(mouseX, mouseY)) { 56 | set.setValBoolean(!set.getValBoolean()); 57 | return true; 58 | } 59 | 60 | return super.mouseClicked(mouseX, mouseY, mouseButton); 61 | } 62 | 63 | /* 64 | * Einfacher HoverCheck, bentigt damit die Value gendert werden kann 65 | */ 66 | public boolean isCheckHovered(int mouseX, int mouseY) { 67 | return mouseX >= x + 1 && mouseX <= x + 12 && mouseY >= y + 2 && mouseY <= y + 13; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/de/Hero/clickgui/util/ColorUtil.java: -------------------------------------------------------------------------------- 1 | package de.Hero.clickgui.util; 2 | 3 | import java.awt.Color; 4 | 5 | import me.finz0.osiris.OsirisMod; 6 | import me.finz0.osiris.util.Rainbow; 7 | 8 | /** 9 | * Made by HeroCode 10 | * it's free to use 11 | * but you have to credit me 12 | * 13 | * @author HeroCode 14 | */ 15 | public class ColorUtil { 16 | 17 | public static Color getClickGUIColor(){ 18 | if(OsirisMod.getInstance().settingsManager.getSettingByID("ClickGuiRainbow").getValBoolean()) 19 | return Rainbow.getColor(); 20 | else 21 | return new Color((int) OsirisMod.getInstance().settingsManager.getSettingByID("ClickGuiRed").getValDouble(), (int) OsirisMod.getInstance().settingsManager.getSettingByID("ClickGuiGreen").getValDouble(), (int)OsirisMod.getInstance().settingsManager.getSettingByID("ClickGuiBlue").getValDouble()); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/de/Hero/clickgui/util/FontUtil.java: -------------------------------------------------------------------------------- 1 | package de.Hero.clickgui.util; 2 | 3 | import net.minecraft.client.Minecraft; 4 | import net.minecraft.client.gui.FontRenderer; 5 | import net.minecraft.util.StringUtils; 6 | 7 | /** 8 | * Made by HeroCode 9 | * it's free to use 10 | * but you have to credit me 11 | * 12 | * @author HeroCode 13 | */ 14 | public class FontUtil { 15 | private static FontRenderer fontRenderer; 16 | 17 | 18 | public static void setupFontUtils() { 19 | fontRenderer = Minecraft.getMinecraft().fontRenderer; 20 | } 21 | 22 | public static int getStringWidth(String text) { 23 | return fontRenderer.getStringWidth(StringUtils.stripControlCodes(text)); 24 | } 25 | 26 | public static int getFontHeight() { 27 | return fontRenderer.FONT_HEIGHT; 28 | } 29 | 30 | public static void drawString(String text, double x, double y, int color) { 31 | fontRenderer.drawString(text, (int)x, (int)y, color); 32 | } 33 | 34 | public static void drawStringWithShadow(String text, double x, double y, int color) { 35 | fontRenderer.drawStringWithShadow(text, (float) x, (float) y, color); 36 | } 37 | 38 | public static void drawCenteredString(String text, double x, double y, int color) { 39 | drawString(text, x - fontRenderer.getStringWidth(text) / 2f, y, color); 40 | } 41 | 42 | public static void drawCenteredStringWithShadow(String text, double x, double y, int color) { 43 | drawStringWithShadow(text, x - fontRenderer.getStringWidth(text) / 2f, y, color); 44 | } 45 | 46 | public static void drawTotalCenteredString(String text, double x, double y, int color) { 47 | drawString(text, x - fontRenderer.getStringWidth(text) / 2f, y - fontRenderer.FONT_HEIGHT / 2f, color); 48 | } 49 | 50 | public static void drawTotalCenteredStringWithShadow(String text, double x, double y, int color) { 51 | drawStringWithShadow(text, x - fontRenderer.getStringWidth(text) / 2f, y - fontRenderer.FONT_HEIGHT / 2F, color); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/BitcoinMiner.java: -------------------------------------------------------------------------------- 1 | //Never gonna give you up 2 | package me.finz0.osiris; 3 | //Never gonna let you down 4 | public class BitcoinMiner { 5 | //Never gonna run around 6 | } 7 | //and desert you -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/OsirisRPC.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris; 2 | 3 | import club.minnced.discord.rpc.DiscordEventHandlers; 4 | import club.minnced.discord.rpc.DiscordRPC; 5 | import club.minnced.discord.rpc.DiscordRichPresence; 6 | import net.minecraft.client.Minecraft; 7 | 8 | public class OsirisRPC { 9 | private static final String ClientId = "663095007246417923"; 10 | private static final Minecraft mc = Minecraft.getMinecraft(); 11 | private static final DiscordRPC rpc = DiscordRPC.INSTANCE; 12 | public static DiscordRichPresence presence = new DiscordRichPresence(); 13 | private static String details; 14 | private static String state; 15 | 16 | public static void init(){ 17 | final DiscordEventHandlers handlers = new DiscordEventHandlers(); 18 | handlers.disconnected = ((var1, var2) -> System.out.println("Discord RPC disconnected, var1: " + String.valueOf(var1) + ", var2: " + var2)); 19 | rpc.Discord_Initialize(ClientId, handlers, true, ""); 20 | presence.startTimestamp = System.currentTimeMillis() / 1000L; 21 | presence.details = "Version " + OsirisMod.MODVER; 22 | presence.state = "Main Menu"; 23 | presence.largeImageKey = "gradient"; 24 | presence.largeImageText = "finz0 on top"; 25 | 26 | rpc.Discord_UpdatePresence(presence); 27 | new Thread(() -> { 28 | while (!Thread.currentThread().isInterrupted()) { 29 | try { 30 | rpc.Discord_RunCallbacks(); 31 | details = "Version " + OsirisMod.MODVER; 32 | state = ""; 33 | if (mc.isIntegratedServerRunning()) { 34 | state = "Playing Singleplayer"; 35 | } 36 | else if (mc.getCurrentServerData() != null) { 37 | if (!mc.getCurrentServerData().serverIP.equals("")) { 38 | state = "Playing " + mc.getCurrentServerData().serverIP; 39 | } 40 | 41 | } else { 42 | state = "Main Menu"; 43 | } 44 | if (!details.equals(presence.details) || !state.equals(presence.state)) { 45 | presence.startTimestamp = System.currentTimeMillis() / 1000L; 46 | } 47 | presence.details = details; 48 | presence.state = state; 49 | rpc.Discord_UpdatePresence(presence); 50 | } catch(Exception e2){ 51 | e2.printStackTrace(); 52 | } 53 | try { 54 | Thread.sleep(5000L); 55 | } catch(InterruptedException e3){ 56 | e3.printStackTrace(); 57 | } 58 | } 59 | return; 60 | }, "Discord-RPC-Callback-Handler").start(); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/ShutDownHookerino.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris; 2 | 3 | public class ShutDownHookerino extends Thread { 4 | @Override 5 | public void run(){ 6 | saveConfig(); 7 | } 8 | 9 | public static void saveConfig(){ 10 | OsirisMod.getInstance().configUtils.saveMods(); 11 | OsirisMod.getInstance().configUtils.saveSettingsList(); 12 | OsirisMod.getInstance().configUtils.saveBinds(); 13 | OsirisMod.getInstance().configUtils.saveDrawn(); 14 | OsirisMod.getInstance().configUtils.saveFriends(); 15 | OsirisMod.getInstance().configUtils.saveGui(); 16 | OsirisMod.getInstance().configUtils.savePrefix(); 17 | OsirisMod.getInstance().configUtils.saveRainbow(); 18 | OsirisMod.getInstance().configUtils.saveMacros(); 19 | OsirisMod.getInstance().configUtils.saveMsgs(); 20 | OsirisMod.getInstance().configUtils.saveAutoGG(); 21 | OsirisMod.getInstance().configUtils.saveSpammer(); 22 | OsirisMod.getInstance().configUtils.saveAnnouncer(); 23 | OsirisMod.getInstance().configUtils.saveWaypoints(); 24 | OsirisMod.getInstance().configUtils.saveHudComponents(); 25 | OsirisMod.getInstance().configUtils.saveFont(); 26 | OsirisMod.getInstance().configUtils.saveEnemies(); 27 | OsirisMod.getInstance().configUtils.saveClientname(); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/Command.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.module.modules.gui.NotificationsHud; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.util.text.TextComponentString; 7 | 8 | import java.awt.*; 9 | 10 | public abstract class Command { 11 | static Minecraft mc = Minecraft.getMinecraft(); 12 | public static String prefix = "-"; 13 | public abstract String[] getAlias(); 14 | public abstract String getSyntax(); 15 | public abstract void onCommand(String command, String[] args) throws Exception; 16 | 17 | public static boolean MsgWaterMark = true; 18 | public static ChatFormatting cf = ChatFormatting.GRAY; 19 | 20 | public static void sendClientMessage(String message){ 21 | NotificationsHud.addMessage(new TextComponentString(cf + message)); 22 | if(MsgWaterMark) 23 | mc.player.sendMessage(new TextComponentString("\u1d0f\ua731\u026a\u0280\u026a\ua731 \u300b"+ cf + message)); 24 | else 25 | mc.player.sendMessage(new TextComponentString(cf + message)); 26 | } 27 | 28 | public static Color getColorFromChatFormatting(ChatFormatting cf){ 29 | if(cf == ChatFormatting.BLACK) return Color.BLACK; 30 | if(cf == ChatFormatting.GRAY) return Color.GRAY; 31 | if(cf == ChatFormatting.AQUA) return Color.CYAN; 32 | if(cf == ChatFormatting.BLUE || cf == ChatFormatting.DARK_BLUE || cf == ChatFormatting.DARK_AQUA) return Color.BLUE; 33 | if(cf == ChatFormatting.DARK_GRAY) return Color.DARK_GRAY; 34 | if(cf == ChatFormatting.DARK_GREEN || cf == ChatFormatting.GREEN) return Color.GREEN; 35 | if(cf == ChatFormatting.DARK_PURPLE) return Color.MAGENTA; 36 | if(cf == ChatFormatting.RED || cf == ChatFormatting.DARK_RED) return Color.RED; 37 | if(cf == ChatFormatting.LIGHT_PURPLE) return Color.PINK; 38 | if(cf == ChatFormatting.YELLOW) return Color.YELLOW; 39 | if(cf == ChatFormatting.GOLD) return Color.ORANGE; 40 | return Color.WHITE; 41 | } 42 | 43 | public static void sendRawMessage(String message){ 44 | mc.player.sendMessage(new TextComponentString(message)); 45 | } 46 | 47 | public static String getPrefix(){ 48 | return prefix; 49 | } 50 | 51 | public static void setPrefix(String p){ 52 | prefix = p; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/CommandManager.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.command.commands.*; 5 | 6 | import java.util.ArrayList; 7 | 8 | public class CommandManager { 9 | private static ArrayList commands; 10 | boolean b; 11 | 12 | public static void initCommands(){ 13 | commands = new ArrayList<>(); 14 | addCommand(new BindCommand()); 15 | addCommand(new ToggleCommand()); 16 | addCommand(new DrawnCommand()); 17 | addCommand(new SetCommand()); 18 | addCommand(new CmdsCommand()); 19 | addCommand(new ModsCommand()); 20 | addCommand(new PrefixCommand()); 21 | addCommand(new FriendCommand()); 22 | addCommand(new RainbowSpeedCommand()); 23 | addCommand(new MacroCommand()); 24 | addCommand(new ConfigCommand()); 25 | addCommand(new ClientMsgsCommand()); 26 | addCommand(new AutoGgCommand()); 27 | addCommand(new OpenFolderCommand()); 28 | addCommand(new LoadSpammerCommand()); 29 | addCommand(new MiddleXCommand()); 30 | addCommand(new LoadAnnouncerCommand()); 31 | addCommand(new WaypointCommand()); 32 | addCommand(new FontCommand()); 33 | addCommand(new EnemyCommand()); 34 | addCommand(new ClientnameCommand()); 35 | } 36 | 37 | public static void addCommand(Command c){ 38 | commands.add(c); 39 | } 40 | 41 | public static ArrayList getCommands(){ 42 | return commands; 43 | } 44 | 45 | public void callCommand(String input){ 46 | String[] split = input.split(" (?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)"); // Split by every space if it isn't surrounded by quotes // credit 086/KAMI 47 | String command = split[0]; 48 | String args = input.substring(command.length()).trim(); 49 | b = false; 50 | commands.forEach(c ->{ 51 | for(String s : c.getAlias()) { 52 | if (s.equalsIgnoreCase(command)) { 53 | b = true; 54 | try { 55 | c.onCommand(args, args.split(" (?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)")); 56 | } catch (Exception e) { 57 | Command.sendClientMessage(ChatFormatting.DARK_RED + c.getSyntax()); 58 | } 59 | } 60 | } 61 | }); 62 | if(!b) Command.sendClientMessage(ChatFormatting.DARK_RED + "Unknown command!"); 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/AutoGgCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.command.Command; 4 | import me.finz0.osiris.module.modules.chat.AutoGG; 5 | 6 | public class AutoGgCommand extends Command { 7 | @Override 8 | public String[] getAlias() { 9 | return new String[]{"autogg", "autoez"}; 10 | } 11 | 12 | @Override 13 | public String getSyntax() { 14 | return "autogg (use \"{name}\" for the player's name, use \"_\" for spaces)"; 15 | } 16 | 17 | @Override 18 | public void onCommand(String command, String[] args) throws Exception { 19 | String s = args[1].replace("_", " "); 20 | if(args[0].equalsIgnoreCase("add")) { 21 | if (!AutoGG.getAutoGgMessages().contains(s)) { 22 | AutoGG.addAutoGgMessage(s); 23 | Command.sendClientMessage("Added AutoGG message: " + s); 24 | } else { 25 | Command.sendClientMessage("AutoGG list doesn't contain " + s); 26 | } 27 | } else if (args[0].equalsIgnoreCase("del") || args[0].equalsIgnoreCase("remove")){ 28 | AutoGG.getAutoGgMessages().remove(s); 29 | Command.sendClientMessage("Removed AutoGG message: " + s); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/BindCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.command.Command; 4 | import me.finz0.osiris.module.ModuleManager; 5 | import org.lwjgl.input.Keyboard; 6 | 7 | public class BindCommand extends Command { 8 | @Override 9 | public String[] getAlias() { 10 | return new String[]{"bind", "b"}; 11 | } 12 | 13 | @Override 14 | public String getSyntax() { 15 | return "bind "; 16 | } 17 | 18 | @Override 19 | public void onCommand(String command, String[] args) throws Exception { 20 | int key = Keyboard.getKeyIndex(args[1].toUpperCase()); 21 | ModuleManager.getModules().forEach(m ->{ 22 | if(args[0].equalsIgnoreCase(m.getName())){ 23 | m.setBind(key); 24 | Command.sendClientMessage(args[0] + " bound to " + args[1].toUpperCase()); 25 | } 26 | }); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/ClientMsgsCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.command.Command; 5 | 6 | public class ClientMsgsCommand extends Command { 7 | @Override 8 | public String[] getAlias() { 9 | return new String[]{"messages", "clientmessages"}; 10 | } 11 | 12 | @Override 13 | public String getSyntax() { 14 | return "messages <(color) | (true | false)>"; 15 | } 16 | 17 | @Override 18 | public void onCommand(String command, String[] args) throws Exception { 19 | if(args[0].equalsIgnoreCase("color")){ 20 | if(ChatFormatting.getByName(args[1]) != null) { 21 | Command.cf = ChatFormatting.getByName(args[1]); 22 | Command.sendClientMessage("Message color set to " + args[1]); 23 | } else Command.sendClientMessage(ChatFormatting.RED + getSyntax()); 24 | } else if(args[0].equalsIgnoreCase("watermark")){ 25 | Command.MsgWaterMark = Boolean.parseBoolean(args[1]); 26 | Command.sendClientMessage("Message watermark = " + args[1]); 27 | } else { 28 | Command.sendClientMessage(ChatFormatting.RED + getSyntax()); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/ClientnameCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.command.Command; 5 | import org.lwjgl.opengl.Display; 6 | 7 | public class ClientnameCommand extends Command { 8 | @Override 9 | public String[] getAlias() { 10 | return new String[]{ 11 | "name", "modname", "clientname", "suffix", "watermark" 12 | }; 13 | } 14 | 15 | @Override 16 | public String getSyntax() { 17 | return "name "; 18 | } 19 | 20 | @Override 21 | public void onCommand(String command, String[] args) throws Exception { 22 | if(!args[0].replace("__", " ").equalsIgnoreCase("")) { 23 | OsirisMod.MODNAME = args[0].replace("__", " "); 24 | Display.setTitle(OsirisMod.MODNAME + " " + OsirisMod.MODVER); 25 | sendClientMessage("set client name to " + args[0].replace("__", " ")); 26 | }else 27 | sendClientMessage(getSyntax()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/CmdsCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.command.Command; 4 | import me.finz0.osiris.command.CommandManager; 5 | import me.finz0.osiris.module.Module; 6 | import me.finz0.osiris.module.ModuleManager; 7 | import net.minecraft.client.Minecraft; 8 | import net.minecraft.util.text.Style; 9 | import net.minecraft.util.text.TextComponentString; 10 | import net.minecraft.util.text.event.ClickEvent; 11 | import net.minecraft.util.text.event.HoverEvent; 12 | 13 | public class CmdsCommand extends Command { 14 | @Override 15 | public String[] getAlias() { 16 | return new String[]{"commands", "cmds"}; 17 | } 18 | 19 | @Override 20 | public String getSyntax() { 21 | return "commands"; 22 | } 23 | 24 | @Override 25 | public void onCommand(String command, String[] args) throws Exception { 26 | final int size = CommandManager.getCommands().size(); 27 | 28 | final TextComponentString msg = new TextComponentString("\2477Commands: "); 29 | 30 | for (int i = 0; i < size; i++) { 31 | final Command c = CommandManager.getCommands().get(i); 32 | if (c != null) { 33 | msg.appendSibling(new TextComponentString(c.getAlias()[0] + ((i == size - 1) ? "" : ", ")) 34 | .setStyle(new Style() 35 | .setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponentString(c.getSyntax()))))); 36 | } 37 | } 38 | 39 | Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage(msg); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/ConfigCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.ShutDownHookerino; 4 | import me.finz0.osiris.command.Command; 5 | 6 | public class ConfigCommand extends Command { 7 | @Override 8 | public String[] getAlias() { 9 | return new String[]{"saveconfig", "savecfg"}; 10 | } 11 | 12 | @Override 13 | public String getSyntax() { 14 | return "saveconfig"; 15 | } 16 | 17 | @Override 18 | public void onCommand(String command, String[] args) throws Exception { 19 | ShutDownHookerino.saveConfig(); 20 | Command.sendClientMessage("Config saved"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/DrawnCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.command.Command; 5 | import me.finz0.osiris.module.ModuleManager; 6 | 7 | public class DrawnCommand extends Command { 8 | boolean found; 9 | @Override 10 | public String[] getAlias() { 11 | return new String[]{"drawn", "visible", "d"}; 12 | } 13 | 14 | @Override 15 | public String getSyntax() { 16 | return "drawn "; 17 | } 18 | 19 | @Override 20 | public void onCommand(String command, String[] args) throws Exception { 21 | found = false; 22 | ModuleManager.getModules().forEach(m -> { 23 | if(m.getName().equalsIgnoreCase(args[0])){ 24 | if(m.isDrawn()){ 25 | m.setDrawn(false); 26 | found = true; 27 | Command.sendClientMessage(m.getName() + ChatFormatting.RED + " drawn = false"); 28 | } else if(!m.isDrawn()){ 29 | m.setDrawn(true); 30 | found = true; 31 | Command.sendClientMessage(m.getName() + ChatFormatting.GREEN + " drawn = true"); 32 | } 33 | } 34 | }); 35 | if(!found && args.length == 1) Command.sendClientMessage(ChatFormatting.DARK_RED + "Module not found!"); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/EnemyCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.command.Command; 5 | import me.finz0.osiris.enemy.Enemies; 6 | 7 | public class EnemyCommand extends Command { 8 | @Override 9 | public String[] getAlias() { 10 | return new String[]{ 11 | "enemy", "enemies", "e" 12 | }; 13 | } 14 | 15 | @Override 16 | public String getSyntax() { 17 | return "enemy "; 18 | } 19 | 20 | @Override 21 | public void onCommand(String command, String[] args) throws Exception { 22 | if(args[0].equalsIgnoreCase("add")) { 23 | if (!Enemies.getEnemies().contains(Enemies.getEnemyByName(args[1]))){ 24 | Enemies.addEnemy(args[1]); 25 | sendClientMessage(ChatFormatting.GREEN + "Added enemy with name " + args[1]); 26 | } else { 27 | sendClientMessage(ChatFormatting.DARK_RED + args[1] + " is already an enemy!"); 28 | } 29 | } else if(args[0].equalsIgnoreCase("del") || (args[0].equalsIgnoreCase("remove"))){ 30 | Enemies.delEnemy(args[1]); 31 | sendClientMessage(ChatFormatting.RED + "Removed enemy with name " + args[1]); 32 | } else { 33 | sendClientMessage(getSyntax()); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/FontCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.command.Command; 5 | import me.finz0.osiris.util.font.CFontRenderer; 6 | 7 | import java.awt.*; 8 | 9 | public class FontCommand extends Command { 10 | @Override 11 | public String[] getAlias() { 12 | return new String[]{ 13 | "font", "setfont" 14 | }; 15 | } 16 | 17 | @Override 18 | public String getSyntax() { 19 | return "font "; 20 | } 21 | 22 | @Override 23 | public void onCommand(String command, String[] args) throws Exception { 24 | String font = args[0].replace("_", " "); 25 | int size = Integer.parseInt(args[1]); 26 | OsirisMod.fontRenderer = new CFontRenderer(new Font(font, Font.PLAIN, size), true, false); 27 | OsirisMod.fontRenderer.setFontName(font); 28 | OsirisMod.fontRenderer.setFontSize(size); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/FriendCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.command.Command; 5 | import me.finz0.osiris.friends.Friends; 6 | 7 | public class FriendCommand extends Command { 8 | @Override 9 | public String[] getAlias() { 10 | return new String[]{"friend", "friends", "f"}; 11 | } 12 | 13 | @Override 14 | public String getSyntax() { 15 | return "friend "; 16 | } 17 | 18 | @Override 19 | public void onCommand(String command, String[] args) throws Exception { 20 | if(args[0].equalsIgnoreCase("add")){ 21 | if(Friends.isFriend(args[1])) { 22 | Command.sendClientMessage(args[1] + " is already a friend!"); 23 | return; 24 | } 25 | if(!Friends.isFriend(args[1])){ 26 | OsirisMod.getInstance().friends.addFriend(args[1]); 27 | Command.sendClientMessage("Added " + args[1] + " to friends list"); 28 | } 29 | } 30 | if(args[0].equalsIgnoreCase("del") || args[0].equalsIgnoreCase("remove")){ 31 | if(!Friends.isFriend(args[1])){ 32 | Command.sendClientMessage(args[1] + " is not a friend!"); 33 | return; 34 | } 35 | if(Friends.isFriend(args[1])){ 36 | OsirisMod.getInstance().friends.delFriend(args[1]); 37 | Command.sendClientMessage("Removed " + args[1] + " from friends list"); 38 | } 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/LoadAnnouncerCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.command.Command; 5 | 6 | public class LoadAnnouncerCommand extends Command { 7 | @Override 8 | public String[] getAlias() { 9 | return new String[]{ 10 | "loadannouncer" 11 | }; 12 | } 13 | 14 | @Override 15 | public String getSyntax() { 16 | return "loadannouncer"; 17 | } 18 | 19 | @Override 20 | public void onCommand(String command, String[] args) throws Exception { 21 | OsirisMod.getInstance().configUtils.loadAnnouncer(); 22 | sendClientMessage("Loaded Announcer file"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/LoadSpammerCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.command.Command; 5 | import me.finz0.osiris.module.modules.chat.Spammer; 6 | 7 | public class LoadSpammerCommand extends Command { 8 | @Override 9 | public String[] getAlias() { 10 | return new String[]{"loadspammer"}; 11 | } 12 | 13 | @Override 14 | public String getSyntax() { 15 | return "loadspammer"; 16 | } 17 | 18 | @Override 19 | public void onCommand(String command, String[] args) throws Exception { 20 | Spammer.text.clear(); 21 | OsirisMod.getInstance().configUtils.loadSpammer(); 22 | Command.sendClientMessage("Loaded Spammer File"); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/MacroCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.command.Command; 6 | import me.finz0.osiris.macro.Macro; 7 | import org.lwjgl.input.Keyboard; 8 | 9 | public class MacroCommand extends Command { 10 | @Override 11 | public String[] getAlias() { 12 | return new String[]{"macro", "macros"}; 13 | } 14 | 15 | @Override 16 | public String getSyntax() { 17 | return "macro "; 18 | } 19 | 20 | @Override 21 | public void onCommand(String command, String[] args) throws Exception { 22 | if(args[0].equalsIgnoreCase("add")){ 23 | OsirisMod.getInstance().macroManager.delMacro(OsirisMod.getInstance().macroManager.getMacroByKey(Keyboard.getKeyIndex(args[1]))); 24 | OsirisMod.getInstance().macroManager.addMacro(new Macro(Keyboard.getKeyIndex(args[1].toUpperCase()), args[2].replace("_", " "))); 25 | Command.sendClientMessage(ChatFormatting.GREEN + "Added" + ChatFormatting.GRAY + " macro for key \"" + args[1].toUpperCase() + "\" with value \"" + args[2].replace("_", " ") + "\"."); 26 | } 27 | if(args[0].equalsIgnoreCase("del")){ 28 | if(OsirisMod.getInstance().macroManager.getMacros().contains(OsirisMod.getInstance().macroManager.getMacroByKey(Keyboard.getKeyIndex(args[1].toUpperCase())))) { 29 | OsirisMod.getInstance().macroManager.delMacro(OsirisMod.getInstance().macroManager.getMacroByKey(Keyboard.getKeyIndex(args[1].toUpperCase()))); 30 | Command.sendClientMessage(ChatFormatting.RED + "Removed " + ChatFormatting.GRAY + "macro for key \"" + args[1].toUpperCase() + "\"."); 31 | }else { 32 | Command.sendClientMessage(ChatFormatting.RED + "That macro doesn't exist!"); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/MiddleXCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.command.Command; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.gui.ScaledResolution; 6 | 7 | public class MiddleXCommand extends Command { 8 | @Override 9 | public String[] getAlias() { 10 | return new String[]{ 11 | "getmiddlex", "middlex", "getmiddle" 12 | }; 13 | } 14 | 15 | @Override 16 | public String getSyntax() { 17 | return getAlias()[0]; 18 | } 19 | 20 | @Override 21 | public void onCommand(String command, String[] args) throws Exception { 22 | Command.sendClientMessage(new ScaledResolution(Minecraft.getMinecraft()).getScaledWidth() / 2 + ""); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/ModsCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.command.Command; 5 | import me.finz0.osiris.module.Module; 6 | import me.finz0.osiris.module.ModuleManager; 7 | import net.minecraft.client.Minecraft; 8 | import net.minecraft.util.text.Style; 9 | import net.minecraft.util.text.TextComponentString; 10 | import net.minecraft.util.text.event.ClickEvent; 11 | import net.minecraft.util.text.event.HoverEvent; 12 | 13 | //Credit: Seth - SeppukuDevelopment 14 | public class ModsCommand extends Command { 15 | @Override 16 | public String[] getAlias() { 17 | return new String[]{"modules", "mods"}; 18 | } 19 | 20 | @Override 21 | public String getSyntax() { 22 | return "modules"; 23 | } 24 | 25 | @Override 26 | public void onCommand(String command, String[] args) throws Exception { 27 | final int size = ModuleManager.getModules().size(); 28 | 29 | final TextComponentString msg = new TextComponentString("\2477Modules: " + "\247f "); 30 | 31 | for (int i = 0; i < size; i++) { 32 | final Module mod = ModuleManager.getModules().get(i); 33 | if (mod != null) { 34 | msg.appendSibling(new TextComponentString((mod.isEnabled() ? "\247a" : "\247c") + mod.getName() + "\2477" + ((i == size - 1) ? "" : ", ")) 35 | .setStyle(new Style() 36 | .setHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, new TextComponentString(mod.getCategory().name()))) 37 | .setClickEvent(new ClickEvent(ClickEvent.Action.RUN_COMMAND, Command.getPrefix() + "toggle" + " " + mod.getName())))); 38 | } 39 | } 40 | 41 | Minecraft.getMinecraft().ingameGUI.getChatGUI().printChatMessage(msg); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/OpenFolderCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.command.Command; 4 | 5 | import java.awt.*; 6 | import java.io.File; 7 | 8 | public class OpenFolderCommand extends Command { 9 | @Override 10 | public String[] getAlias() { 11 | return new String[]{"openfolder", "folder"}; 12 | } 13 | 14 | @Override 15 | public String getSyntax() { 16 | return "openfolder"; 17 | } 18 | 19 | @Override 20 | public void onCommand(String command, String[] args) throws Exception { 21 | try { 22 | Desktop.getDesktop().open(new File("Osiris")); 23 | } catch(Exception e){sendClientMessage("Error: " + e.getMessage());} 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/PrefixCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.command.Command; 4 | 5 | public class PrefixCommand extends Command { 6 | @Override 7 | public String[] getAlias() { 8 | return new String[]{"prefix", "setprefix"}; 9 | } 10 | 11 | @Override 12 | public String getSyntax() { 13 | return "prefix "; 14 | } 15 | 16 | @Override 17 | public void onCommand(String command, String[] args) throws Exception { 18 | Command.setPrefix(args[0]); 19 | Command.sendClientMessage("Command prefix set to " + Command.getPrefix()); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/RainbowSpeedCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.command.Command; 5 | import me.finz0.osiris.event.EventProcessor; 6 | 7 | public class RainbowSpeedCommand extends Command { 8 | @Override 9 | public String[] getAlias() { 10 | return new String[]{"rainbowspeed", "rainbow"}; 11 | } 12 | 13 | @Override 14 | public String getSyntax() { 15 | return "rainbowspeed "; 16 | } 17 | 18 | @Override 19 | public void onCommand(String command, String[] args) throws Exception { 20 | if(args.length == 1){ 21 | int i = Integer.parseInt(args[0]); 22 | if(i <= 0) { 23 | EventProcessor.INSTANCE.setRainbowSpeed(0); 24 | } else { 25 | EventProcessor.INSTANCE.setRainbowSpeed(i); 26 | } 27 | Command.sendClientMessage("Rainbow speed set to " + i); 28 | } else { 29 | Command.sendClientMessage(ChatFormatting.RED + this.getSyntax()); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/SetCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.command.Command; 5 | import me.finz0.osiris.module.Module; 6 | import me.finz0.osiris.module.ModuleManager; 7 | 8 | import java.awt.*; 9 | 10 | public class SetCommand extends Command { 11 | @Override 12 | public String[] getAlias() { 13 | return new String[]{"set"}; 14 | } 15 | 16 | @Override 17 | public String getSyntax() { 18 | return "set "; 19 | } 20 | 21 | @Override 22 | public void onCommand(String command, String[] args) throws Exception { 23 | for(Module m : ModuleManager.getModules()) { 24 | if(m.getName().equalsIgnoreCase(args[0])) { 25 | OsirisMod.getInstance().settingsManager.getSettingsByMod(m).stream().filter(s -> s.getDisplayName().equalsIgnoreCase(args[1])).forEach(s->{ 26 | if(s.isSlider()) { 27 | if(Double.parseDouble(args[2]) > s.getMax()) s.setValDouble(s.getMax()); 28 | if(Double.parseDouble(args[2]) < s.getMin()) s.setValDouble(s.getMin()); 29 | if(!(Double.parseDouble(args[2]) > s.getMax()) && !(Double.parseDouble(args[2]) < s.getMin())) s.setValDouble(Double.parseDouble(args[2])); 30 | Command.sendClientMessage(s.getDisplayName() + " set to " + s.getValDouble()); 31 | } 32 | if(s.isCheck()){ 33 | s.setValBoolean(Boolean.parseBoolean(args[2])); 34 | Command.sendClientMessage(s.getDisplayName() + " set to " + s.getValBoolean()); 35 | } 36 | if(s.isCombo()){ 37 | if(!s.getOptions().contains(args[2])) return; 38 | s.setValString(args[2]); 39 | Command.sendClientMessage(s.getDisplayName() + " set to " + s.getValString()); 40 | } 41 | if(s.isColorPicker()){ 42 | s.setValColor(Color.getColor(args[2])); 43 | Command.sendClientMessage(s.getDisplayName() + " set to " + s.getValColor()); 44 | } 45 | if(s.isCustomString()){ 46 | s.setCustomVal(args[2]); 47 | Command.sendClientMessage(s.getDisplayName() + " set to " + s.getCustomVal()); 48 | } 49 | }); 50 | } 51 | } 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/command/commands/ToggleCommand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.command.commands; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.command.Command; 5 | import me.finz0.osiris.module.ModuleManager; 6 | 7 | public class ToggleCommand extends Command { 8 | boolean found; 9 | @Override 10 | public String[] getAlias() { 11 | return new String[]{"toggle", "t"}; 12 | } 13 | 14 | @Override 15 | public String getSyntax() { 16 | return "toggle "; 17 | } 18 | 19 | @Override 20 | public void onCommand(String command, String[] args) throws Exception { 21 | found = false; 22 | ModuleManager.getModules().forEach(m -> { 23 | if(m.getName().equalsIgnoreCase(args[0])){ 24 | if(m.isEnabled()){ 25 | m.disable(); 26 | found = true; 27 | Command.sendClientMessage(m.getName() + ChatFormatting.RED + " disabled!"); 28 | } else if(!m.isEnabled()){ 29 | m.enable(); 30 | found = true; 31 | Command.sendClientMessage(m.getName() + ChatFormatting.GREEN + " enabled!"); 32 | } 33 | } 34 | }); 35 | if(!found && args.length == 1) Command.sendClientMessage(ChatFormatting.DARK_RED + "Module not found!"); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/enemy/Enemies.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.enemy; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class Enemies { 7 | public static List enemies; 8 | public Enemies(){ 9 | enemies = new ArrayList<>(); 10 | } 11 | 12 | public static List getEnemies(){ 13 | return enemies; 14 | } 15 | 16 | public static boolean isEnemy(String name){ 17 | boolean b = false; 18 | for(Enemy e : getEnemies()){ 19 | if(e.getName().equalsIgnoreCase(name)) b = true; 20 | } 21 | return b; 22 | } 23 | 24 | public static Enemy getEnemyByName(String name){ 25 | Enemy en = null; 26 | for(Enemy e : getEnemies()){ 27 | if(e.getName().equalsIgnoreCase(name)) en = e; 28 | } 29 | return en; 30 | } 31 | 32 | public static void addEnemy(String name){ 33 | enemies.add(new Enemy(name)); 34 | } 35 | 36 | public static void delEnemy(String name){ 37 | enemies.remove(getEnemyByName(name)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/enemy/Enemy.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.enemy; 2 | 3 | public class Enemy { 4 | String name; 5 | public Enemy(String n){ 6 | name = n; 7 | } 8 | 9 | public String getName(){ 10 | return name; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/event/OsirisEvent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.event; 2 | 3 | import me.zero.alpine.type.Cancellable; 4 | 5 | public class OsirisEvent extends Cancellable { 6 | 7 | public OsirisEvent() { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/event/events/DestroyBlockEvent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.event.events; 2 | 3 | import me.finz0.osiris.event.OsirisEvent; 4 | import net.minecraft.util.math.BlockPos; 5 | 6 | public class DestroyBlockEvent extends OsirisEvent { 7 | BlockPos pos; 8 | public DestroyBlockEvent(BlockPos blockPos){ 9 | super(); 10 | pos = blockPos; 11 | } 12 | 13 | public BlockPos getBlockPos(){ 14 | return pos; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/event/events/GuiScreenDisplayedEvent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.event.events; 2 | 3 | import me.finz0.osiris.event.OsirisEvent; 4 | import net.minecraft.client.gui.GuiScreen; 5 | 6 | public class GuiScreenDisplayedEvent extends OsirisEvent { 7 | private final GuiScreen guiScreen; 8 | public GuiScreenDisplayedEvent(GuiScreen screen){ 9 | super(); 10 | guiScreen = screen; 11 | } 12 | 13 | public GuiScreen getScreen(){ 14 | return guiScreen; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/event/events/PacketEvent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.event.events; 2 | 3 | import me.finz0.osiris.event.OsirisEvent; 4 | import net.minecraft.network.Packet; 5 | 6 | public class PacketEvent extends OsirisEvent { 7 | 8 | private final Packet packet; 9 | 10 | public PacketEvent(Packet packet) { 11 | super(); 12 | this.packet = packet; 13 | } 14 | 15 | public Packet getPacket() { 16 | return packet; 17 | } 18 | 19 | public static class Receive extends PacketEvent { 20 | public Receive(Packet packet) { 21 | super(packet); 22 | } 23 | } 24 | public static class Send extends PacketEvent { 25 | public Send(Packet packet) { 26 | super(packet); 27 | } 28 | } 29 | 30 | public static class PostReceive extends PacketEvent { 31 | public PostReceive(Packet packet) { 32 | super(packet); 33 | } 34 | } 35 | public static class PostSend extends PacketEvent { 36 | public PostSend(Packet packet) { 37 | super(packet); 38 | } 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/event/events/PlayerJoinEvent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.event.events; 2 | 3 | import me.finz0.osiris.event.OsirisEvent; 4 | 5 | public class PlayerJoinEvent extends OsirisEvent { 6 | private final String name; 7 | 8 | public PlayerJoinEvent(String n){ 9 | super(); 10 | name = n; 11 | } 12 | 13 | public String getName(){ 14 | return name; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/event/events/PlayerJumpEvent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.event.events; 2 | 3 | import me.finz0.osiris.event.OsirisEvent; 4 | 5 | public class PlayerJumpEvent extends OsirisEvent { 6 | public PlayerJumpEvent(){ 7 | super(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/event/events/PlayerLeaveEvent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.event.events; 2 | 3 | import me.finz0.osiris.event.OsirisEvent; 4 | public class PlayerLeaveEvent extends OsirisEvent { 5 | 6 | private final String name; 7 | 8 | public PlayerLeaveEvent(String n){ 9 | super(); 10 | name = n; 11 | } 12 | 13 | public String getName(){ 14 | return name; 15 | } 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/event/events/PlayerMoveEvent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.event.events; 2 | 3 | import me.finz0.osiris.event.OsirisEvent; 4 | import net.minecraft.entity.MoverType; 5 | 6 | public class PlayerMoveEvent extends OsirisEvent { 7 | MoverType type; 8 | public double x; 9 | public double y; 10 | public double z; 11 | public PlayerMoveEvent(MoverType moverType, double xx, double yy, double zz){ 12 | super(); 13 | type = moverType; 14 | x = xx; 15 | y = yy; 16 | z =zz; 17 | } 18 | 19 | public MoverType getType(){ 20 | return type; 21 | } 22 | 23 | public double getX(){ 24 | return x; 25 | } 26 | 27 | public double getY(){ 28 | return y; 29 | } 30 | 31 | public double getZ(){ 32 | return z; 33 | } 34 | 35 | public void setX(double xx){ 36 | x = xx; 37 | } 38 | 39 | public void setY(double yy){ 40 | y = yy; 41 | } 42 | 43 | public void setZ(double zz){ 44 | z = zz; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/event/events/RenderEvent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.event.events; 2 | 3 | import me.finz0.osiris.event.OsirisEvent; 4 | import net.minecraft.client.renderer.BufferBuilder; 5 | import net.minecraft.client.renderer.Tessellator; 6 | import net.minecraft.util.math.Vec3d; 7 | 8 | //Credit 086 - KAMI 9 | public class RenderEvent extends OsirisEvent { 10 | private final Tessellator tessellator; 11 | private final Vec3d renderPos; 12 | private final float partialTicks; 13 | 14 | public RenderEvent(Tessellator tessellator, Vec3d renderPos, float ticks) { 15 | super(); 16 | this.tessellator = tessellator; 17 | this.renderPos = renderPos; 18 | partialTicks = ticks; 19 | } 20 | 21 | public Tessellator getTessellator() { 22 | return tessellator; 23 | } 24 | 25 | public BufferBuilder getBuffer() { 26 | return tessellator.getBuffer(); 27 | } 28 | 29 | public Vec3d getRenderPos() { 30 | return renderPos; 31 | } 32 | 33 | public void setTranslation(Vec3d translation) { 34 | getBuffer().setTranslation(-translation.x, -translation.y, -translation.z); 35 | } 36 | 37 | public void resetTranslation() { 38 | setTranslation(renderPos); 39 | } 40 | 41 | public float getPartialTicks(){ 42 | return partialTicks; 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/friends/Friend.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.friends; 2 | 3 | public class Friend { 4 | String name; 5 | public Friend(String n){ 6 | name = n; 7 | } 8 | 9 | public String getName(){ 10 | return name; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/friends/Friends.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.friends; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class Friends { 7 | public static List friends; 8 | public Friends(){ 9 | friends = new ArrayList<>(); 10 | } 11 | 12 | public static List getFriends(){ 13 | return friends; 14 | } 15 | 16 | public static boolean isFriend(String name){ 17 | boolean b = false; 18 | for(Friend f : getFriends()){ 19 | if(f.getName().equalsIgnoreCase(name)) b = true; 20 | } 21 | return b; 22 | } 23 | 24 | public Friend getFriendByName(String name){ 25 | Friend fr = null; 26 | for(Friend f : getFriends()){ 27 | if(f.getName().equalsIgnoreCase(name)) fr = f; 28 | } 29 | return fr; 30 | } 31 | 32 | public void addFriend(String name){ 33 | friends.add(new Friend(name)); 34 | } 35 | 36 | public void delFriend(String name){ 37 | friends.remove(getFriendByName(name)); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/gui/csgui/CategoryButton.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.gui.csgui; 2 | 3 | import me.finz0.osiris.command.Command; 4 | import me.finz0.osiris.module.Module; 5 | import me.finz0.osiris.util.FontUtils; 6 | import me.finz0.osiris.util.Rainbow; 7 | import net.minecraft.client.gui.Gui; 8 | 9 | public class CategoryButton { 10 | int x; 11 | int y; 12 | int width; 13 | int height; 14 | CsClickGUI gui; 15 | Module.Category category; 16 | 17 | int newX; 18 | int newY; 19 | 20 | public CategoryButton(Module.Category c, int iX, int iY, CsClickGUI csClickGUI){ 21 | x= iX; 22 | y = iY; 23 | gui = csClickGUI; 24 | category = c; 25 | width = FontUtils.getStringWidth(gui.customFont, category.name()) + 4; 26 | height = FontUtils.getFontHeight(gui.customFont) + 6; 27 | } 28 | 29 | public void drawScreen(int mouseX, int mouseY, float partialTicks){ 30 | if(gui.dragging){ 31 | x = newX + mouseX; 32 | y = newY + mouseY; 33 | } 34 | width = FontUtils.getStringWidth(gui.customFont, category.name()) + 2; 35 | height = FontUtils.getFontHeight(gui.customFont) + 2; 36 | Gui.drawRect(x, y, x + width + 2, y + height + 2, 0xff444444); 37 | Gui.drawRect(x + 1, y + 1, (x + 1) + (width - 1), (y + 1) + (height - 1), 0xff222222); 38 | FontUtils.drawStringWithShadow(gui.customFont, category.name(), x + 2, y + 2, Rainbow.getInt()); 39 | } 40 | 41 | public boolean mouseClicked(int mouseX, int mouseY, int mouseButton){ 42 | if(mouseButton == 0 && mouseX > x && mouseX < width && mouseY > y && mouseY < height){ 43 | gui.updateCategory(category); 44 | Command.sendClientMessage("Clicked category"); 45 | return true; 46 | } 47 | 48 | if(gui.drag(mouseX, mouseY, mouseButton)){ 49 | newX = x - mouseX; 50 | newY = y - mouseY; 51 | } 52 | 53 | return false; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/gui/csgui/ModuleButton.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.gui.csgui; 2 | 3 | import me.finz0.osiris.command.Command; 4 | import me.finz0.osiris.module.Module; 5 | import me.finz0.osiris.util.FontUtils; 6 | import me.finz0.osiris.util.Rainbow; 7 | import net.minecraft.client.gui.Gui; 8 | 9 | public class ModuleButton { 10 | int x; 11 | int y; 12 | int width; 13 | int height; 14 | Module module; 15 | CsClickGUI gui; 16 | 17 | int newX; 18 | int newY; 19 | 20 | public ModuleButton(Module mod, int iX, int iY, CsClickGUI csClickGUI){ 21 | gui = csClickGUI; 22 | module = mod; 23 | x = iX; 24 | y = iY; 25 | width = 100; 26 | height = 25; 27 | } 28 | 29 | public void drawScreen(int mouseX, int mouseY, float partialTicks){ 30 | if(gui.dragging){ 31 | x = newX + mouseX; 32 | y = newY + mouseY; 33 | } 34 | Gui.drawRect(x, y, x + width, y + height, Rainbow.getInt()); 35 | Gui.drawRect(x + 2, y + 2, (x + 2) + (width - 2), (y + 2) + (height - 2), 0xff222222); 36 | FontUtils.drawStringWithShadow(gui.customFont, module.getName(), x + 2, y + 2, gui.currentModule.equals(module) ? Rainbow.getInt() : 0xffffffff); 37 | } 38 | 39 | public boolean mouseClicked(int mouseX, int mouseY, int mouseButton){ 40 | if(mouseButton == 0 && mouseX > x && mouseX < width && mouseY > y && mouseY < height){ 41 | gui.currentModule = module; 42 | Command.sendClientMessage("Clicked module"); 43 | return true; 44 | } 45 | 46 | if(gui.drag(mouseX, mouseY, mouseButton)){ 47 | newX = x - mouseX; 48 | newY = y - mouseY; 49 | } 50 | 51 | return false; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/gui/hud/HudComponentManager.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.gui.hud; 2 | 3 | import de.Hero.clickgui.ClickGUI; 4 | import de.Hero.clickgui.Panel; 5 | import me.finz0.osiris.gui.hud.components.*; 6 | 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | public class HudComponentManager { 11 | public HudComponentManager(double ix, double iy, ClickGUI parent){ 12 | hudComponents = new ArrayList<>(); 13 | addComponent(new FpsComponent(ix, iy, parent)); 14 | addComponent(new TpsComponent(ix, iy + 20, parent)); 15 | addComponent(new CoordsComponent(ix, iy + 40, parent)); 16 | addComponent(new WatermarkComponent(ix, iy + 60, parent)); 17 | addComponent(new BpsComponent(ix, iy + 80, parent)); 18 | addComponent(new PingComponent(ix, iy + 100, parent)); 19 | addComponent(new WelcomerComponent(ix, iy + 120, parent)); 20 | addComponent(new TotemsComponent(ix, iy + 140, parent)); 21 | addComponent(new TimeComponent(ix, iy + 160, parent)); 22 | addComponent(new PvpinfoComponent(ix, iy + 180, parent)); 23 | addComponent(new GappsComponent(ix, iy + 200, parent)); 24 | addComponent(new ExpComponent(ix, iy + 220, parent)); 25 | addComponent(new CrystalsComponent(ix, iy + 240, parent)); 26 | addComponent(new PlayerComponent(ix, iy + 260, parent)); 27 | addComponent(new InventoryComponent(ix, iy + 280, parent)); 28 | addComponent(new DirectionComponent(ix, iy + 300, parent)); 29 | addComponent(new ArmorComponent(ix + 50, iy, parent)); 30 | addComponent(new HoleComponent(ix + 50, iy + 20, parent)); 31 | } 32 | 33 | public static List hudComponents; 34 | 35 | private void addComponent(Panel p){ 36 | hudComponents.add(p); 37 | } 38 | 39 | public static Panel getHudComponentByName(String name){ 40 | Panel pa = null; 41 | for(Panel p : hudComponents){ 42 | if(p.title.equalsIgnoreCase(name)) pa = p; 43 | } 44 | return pa; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/gui/hud/components/FpsComponent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.gui.hud.components; 2 | 3 | import de.Hero.clickgui.ClickGUI; 4 | import de.Hero.clickgui.Panel; 5 | import de.Hero.clickgui.util.ColorUtil; 6 | import de.Hero.clickgui.util.FontUtil; 7 | import me.finz0.osiris.OsirisMod; 8 | import me.finz0.osiris.module.ModuleManager; 9 | import me.finz0.osiris.module.modules.gui.Fps; 10 | import me.finz0.osiris.util.Rainbow; 11 | import net.minecraft.client.Minecraft; 12 | import net.minecraft.client.gui.Gui; 13 | 14 | import java.awt.*; 15 | 16 | public class FpsComponent extends Panel { 17 | public FpsComponent(double ix, double iy, ClickGUI parent) { 18 | super("FPS", ix, iy, 10, 10, false, parent); 19 | this.isHudComponent = true; 20 | 21 | } 22 | 23 | 24 | 25 | Fps mod = ((Fps)ModuleManager.getModuleByName("FPS")); 26 | 27 | Color c; 28 | boolean font; 29 | Color text; 30 | Color color; 31 | 32 | 33 | public void drawHud(){ 34 | doStuff(); 35 | String fps = Minecraft.getDebugFPS() + " FPS"; 36 | if(font) OsirisMod.fontRenderer.drawStringWithShadow(fps, (float)x, (float)y, text.getRGB()); 37 | else mc.fontRenderer.drawStringWithShadow(fps, (float)x, (float)y, text.getRGB()); 38 | } 39 | 40 | @Override 41 | public void drawScreen(int mouseX, int mouseY, float partialTicks){ 42 | doStuff(); 43 | String fps = Minecraft.getDebugFPS() + " FPS"; 44 | double w = mc.fontRenderer.getStringWidth(fps) + 2; 45 | c = new Color(50, 50, 50, 100); 46 | if(isHudComponentPinned) c = new Color(ColorUtil.getClickGUIColor().darker().getRed(), ColorUtil.getClickGUIColor().darker().getGreen(), ColorUtil.getClickGUIColor().darker().getBlue(), 100); 47 | if (this.dragging) { 48 | x = x2 + mouseX; 49 | y = y2 + mouseY; 50 | } 51 | this.width = w; 52 | this.height = FontUtil.getFontHeight() + 2; 53 | Gui.drawRect((int)x, (int)y, (int)x + (int)width, (int)y + (int)height, c.getRGB()); 54 | FontUtil.drawStringWithShadow(title, x, y + height / 2 - FontUtil.getFontHeight()/2f, 0xffffffff); 55 | 56 | if(extended) { 57 | double startY = y + height; 58 | Gui.drawRect((int) x, (int) startY, (int) x + (int) width, (int) startY + (int) height, c.getRGB()); 59 | if (font) OsirisMod.fontRenderer.drawStringWithShadow(fps, (float) x, (float) startY, text.getRGB()); 60 | else mc.fontRenderer.drawStringWithShadow(fps, (float) x, (float) startY, text.getRGB()); 61 | } 62 | } 63 | 64 | private void doStuff() { 65 | //color = new Color(mod.red.getValInt(), mod.green.getValInt(), mod.blue.getValInt()); 66 | color = mod.color.getValColor(); 67 | text = mod.rainbow.getValBoolean() ? Rainbow.getColor() : color; 68 | font = mod.customFont.getValBoolean(); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/gui/hud/components/PingComponent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.gui.hud.components; 2 | 3 | import de.Hero.clickgui.ClickGUI; 4 | import de.Hero.clickgui.Panel; 5 | import de.Hero.clickgui.util.ColorUtil; 6 | import de.Hero.clickgui.util.FontUtil; 7 | import me.finz0.osiris.OsirisMod; 8 | import me.finz0.osiris.module.ModuleManager; 9 | import me.finz0.osiris.module.modules.gui.Ping; 10 | import me.finz0.osiris.util.Rainbow; 11 | import net.minecraft.client.gui.Gui; 12 | 13 | import java.awt.*; 14 | import java.text.DecimalFormat; 15 | 16 | public class PingComponent extends Panel { 17 | public PingComponent(double ix, double iy, ClickGUI parent) { 18 | super("Ping", ix, iy, 10, 10, false, parent); 19 | this.isHudComponent = true; 20 | 21 | } 22 | 23 | 24 | 25 | Ping mod = ((Ping) ModuleManager.getModuleByName("Ping")); 26 | 27 | Color c; 28 | boolean font; 29 | Color text; 30 | Color color; 31 | DecimalFormat decimalFormat = new DecimalFormat("##.#"); 32 | 33 | 34 | public void drawHud(){ 35 | doStuff(); 36 | String ping = mod.getPing() + "ms"; 37 | if(font) OsirisMod.fontRenderer.drawStringWithShadow(ping, (float)x, (float)y, text.getRGB()); 38 | else mc.fontRenderer.drawStringWithShadow(ping, (float)x, (float)y, text.getRGB()); 39 | } 40 | 41 | @Override 42 | public void drawScreen(int mouseX, int mouseY, float partialTicks){ 43 | doStuff(); 44 | String ping = mod.getPing() + "ms"; 45 | double w = mc.fontRenderer.getStringWidth(ping) + 2; 46 | c = new Color(50, 50, 50, 100); 47 | if(isHudComponentPinned) c = new Color(ColorUtil.getClickGUIColor().darker().getRed(), ColorUtil.getClickGUIColor().darker().getGreen(), ColorUtil.getClickGUIColor().darker().getBlue(), 100); 48 | if (this.dragging) { 49 | x = x2 + mouseX; 50 | y = y2 + mouseY; 51 | } 52 | this.width = w; 53 | this.height = FontUtil.getFontHeight() + 2; 54 | Gui.drawRect((int)x, (int)y, (int)x + (int)width, (int)y + (int)height, c.getRGB()); 55 | FontUtil.drawStringWithShadow(title, x, y + height / 2 - FontUtil.getFontHeight()/2f, 0xffffffff); 56 | 57 | if(extended) { 58 | double startY = y + height; 59 | Gui.drawRect((int) x, (int) startY, (int) x + (int) width, (int) startY + (int) height, c.getRGB()); 60 | if (font) OsirisMod.fontRenderer.drawStringWithShadow(ping, (float) x, (float) startY, text.getRGB()); 61 | else mc.fontRenderer.drawStringWithShadow(ping, (float) x, (float) startY, text.getRGB()); 62 | } 63 | } 64 | 65 | private void doStuff() { 66 | color = new Color(mod.red.getValInt(), mod.green.getValInt(), mod.blue.getValInt()); 67 | text = mod.rainbow.getValBoolean() ? Rainbow.getColor() : color; 68 | font = mod.customFont.getValBoolean(); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/gui/hud/components/TimeComponent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.gui.hud.components; 2 | 3 | import de.Hero.clickgui.ClickGUI; 4 | import de.Hero.clickgui.Panel; 5 | import de.Hero.clickgui.util.ColorUtil; 6 | import de.Hero.clickgui.util.FontUtil; 7 | import me.finz0.osiris.OsirisMod; 8 | import me.finz0.osiris.module.ModuleManager; 9 | import me.finz0.osiris.module.modules.gui.Time; 10 | import me.finz0.osiris.util.Rainbow; 11 | import net.minecraft.client.gui.Gui; 12 | 13 | import java.awt.*; 14 | import java.text.SimpleDateFormat; 15 | import java.util.Date; 16 | 17 | public class TimeComponent extends Panel { 18 | public TimeComponent(double ix, double iy, ClickGUI parent) { 19 | super("Time", ix, iy, 10, 10, false, parent); 20 | this.isHudComponent = true; 21 | 22 | } 23 | 24 | 25 | 26 | Time mod = ((Time) ModuleManager.getModuleByName("Time")); 27 | 28 | Color c; 29 | boolean font; 30 | Color text; 31 | Color color; 32 | 33 | 34 | public void drawHud(){ 35 | doStuff(); 36 | String date = new SimpleDateFormat("k:mm").format(new Date()); 37 | if(font) OsirisMod.fontRenderer.drawStringWithShadow(date, (float)x, (float)y, text.getRGB()); 38 | else mc.fontRenderer.drawStringWithShadow(date, (float)x, (float)y, text.getRGB()); 39 | } 40 | 41 | @Override 42 | public void drawScreen(int mouseX, int mouseY, float partialTicks){ 43 | doStuff(); 44 | String date = new SimpleDateFormat("k:mm").format(new Date()); 45 | double w = mc.fontRenderer.getStringWidth(date) + 2; 46 | c = new Color(50, 50, 50, 100); 47 | if(isHudComponentPinned) c = new Color(ColorUtil.getClickGUIColor().darker().getRed(), ColorUtil.getClickGUIColor().darker().getGreen(), ColorUtil.getClickGUIColor().darker().getBlue(), 100); 48 | if (this.dragging) { 49 | x = x2 + mouseX; 50 | y = y2 + mouseY; 51 | } 52 | this.width = w; 53 | this.height = FontUtil.getFontHeight() + 2; 54 | Gui.drawRect((int)x, (int)y, (int)x + (int)width, (int)y + (int)height, c.getRGB()); 55 | FontUtil.drawStringWithShadow(title, x, y + height / 2 - FontUtil.getFontHeight()/2f, 0xffffffff); 56 | 57 | if(extended) { 58 | double startY = y + height; 59 | Gui.drawRect((int) x, (int) startY, (int) x + (int) width, (int) startY + (int) height, c.getRGB()); 60 | if (font) OsirisMod.fontRenderer.drawStringWithShadow(date, (float) x, (float) startY, text.getRGB()); 61 | else mc.fontRenderer.drawStringWithShadow(date, (float) x, (float) startY, text.getRGB()); 62 | } 63 | } 64 | 65 | private void doStuff() { 66 | color = new Color(mod.red.getValInt(), mod.green.getValInt(), mod.blue.getValInt()); 67 | text = mod.rainbow.getValBoolean() ? Rainbow.getColor() : color; 68 | font = mod.customFont.getValBoolean(); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/gui/hud/components/TpsComponent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.gui.hud.components; 2 | 3 | import de.Hero.clickgui.ClickGUI; 4 | import de.Hero.clickgui.Panel; 5 | import de.Hero.clickgui.util.ColorUtil; 6 | import de.Hero.clickgui.util.FontUtil; 7 | import me.finz0.osiris.OsirisMod; 8 | import me.finz0.osiris.module.ModuleManager; 9 | import me.finz0.osiris.module.modules.gui.Tps; 10 | import me.finz0.osiris.util.Rainbow; 11 | import me.finz0.osiris.util.TpsUtils; 12 | import net.minecraft.client.gui.Gui; 13 | 14 | import java.awt.*; 15 | import java.text.DecimalFormat; 16 | 17 | public class TpsComponent extends Panel { 18 | public TpsComponent(double ix, double iy, ClickGUI parent) { 19 | super("TPS", ix, iy, 10, 10, false, parent); 20 | this.isHudComponent = true; 21 | 22 | } 23 | 24 | 25 | 26 | Tps mod = ((Tps) ModuleManager.getModuleByName("TPS")); 27 | 28 | Color c; 29 | boolean font; 30 | Color text; 31 | Color color; 32 | DecimalFormat decimalFormat = new DecimalFormat("##.#"); 33 | 34 | 35 | public void drawHud(){ 36 | doStuff(); 37 | String tps = decimalFormat.format(TpsUtils.getTickRate()) + " TPS"; 38 | if(font) OsirisMod.fontRenderer.drawStringWithShadow(tps, (float)x, (float)y, text.getRGB()); 39 | else mc.fontRenderer.drawStringWithShadow(tps, (float)x, (float)y, text.getRGB()); 40 | } 41 | 42 | @Override 43 | public void drawScreen(int mouseX, int mouseY, float partialTicks){ 44 | doStuff(); 45 | String tps = decimalFormat.format(TpsUtils.getTickRate()) + " TPS"; 46 | double w = mc.fontRenderer.getStringWidth(tps) + 2; 47 | c = new Color(50, 50, 50, 100); 48 | if(isHudComponentPinned) c = new Color(ColorUtil.getClickGUIColor().darker().getRed(), ColorUtil.getClickGUIColor().darker().getGreen(), ColorUtil.getClickGUIColor().darker().getBlue(), 100); 49 | if (this.dragging) { 50 | x = x2 + mouseX; 51 | y = y2 + mouseY; 52 | } 53 | this.width = w; 54 | this.height = FontUtil.getFontHeight() + 2; 55 | Gui.drawRect((int)x, (int)y, (int)x + (int)width, (int)y + (int)height, c.getRGB()); 56 | FontUtil.drawStringWithShadow(title, x, y + height / 2 - FontUtil.getFontHeight()/2f, 0xffffffff); 57 | 58 | if(extended) { 59 | double startY = y + height; 60 | Gui.drawRect((int) x, (int) startY, (int) x + (int) width, (int) startY + (int) height, c.getRGB()); 61 | if (font) OsirisMod.fontRenderer.drawStringWithShadow(tps, (float) x, (float) startY, text.getRGB()); 62 | else mc.fontRenderer.drawStringWithShadow(tps, (float) x, (float) startY, text.getRGB()); 63 | } 64 | } 65 | 66 | private void doStuff() { 67 | color = new Color(mod.red.getValInt(), mod.green.getValInt(), mod.blue.getValInt()); 68 | text = mod.rainbow.getValBoolean() ? Rainbow.getColor() : color; 69 | font = mod.customFont.getValBoolean(); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/gui/hud/components/WatermarkComponent.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.gui.hud.components; 2 | 3 | import de.Hero.clickgui.ClickGUI; 4 | import de.Hero.clickgui.Panel; 5 | import de.Hero.clickgui.util.ColorUtil; 6 | import de.Hero.clickgui.util.FontUtil; 7 | import me.finz0.osiris.OsirisMod; 8 | import me.finz0.osiris.module.ModuleManager; 9 | import me.finz0.osiris.module.modules.gui.Watermark; 10 | import me.finz0.osiris.util.Rainbow; 11 | import net.minecraft.client.gui.Gui; 12 | 13 | import java.awt.*; 14 | 15 | public class WatermarkComponent extends Panel { 16 | public WatermarkComponent(double ix, double iy, ClickGUI parent) { 17 | super("Watermark", ix, iy, 10, 10, true, parent); 18 | this.isHudComponent = true; 19 | 20 | } 21 | 22 | 23 | 24 | Watermark mod = ((Watermark) ModuleManager.getModuleByName("Watermark")); 25 | 26 | Color c; 27 | boolean font; 28 | Color text; 29 | Color color; 30 | 31 | 32 | public void drawHud(){ 33 | doStuff(); 34 | String s = OsirisMod.MODNAME + " "; 35 | if(mod.version.getValBoolean()) s += OsirisMod.MODVER; 36 | if(font) OsirisMod.fontRenderer.drawStringWithShadow(s, (float)x, (float)y, text.getRGB()); 37 | else mc.fontRenderer.drawStringWithShadow(s, (float)x, (float)y, text.getRGB()); 38 | } 39 | 40 | @Override 41 | public void drawScreen(int mouseX, int mouseY, float partialTicks){ 42 | doStuff(); 43 | String s = OsirisMod.MODNAME + " "; 44 | if(mod.version.getValBoolean()) s += OsirisMod.MODVER; 45 | double w = mc.fontRenderer.getStringWidth(s) + 2; 46 | c = new Color(50, 50, 50, 100); 47 | if(isHudComponentPinned) c = new Color(ColorUtil.getClickGUIColor().darker().getRed(), ColorUtil.getClickGUIColor().darker().getGreen(), ColorUtil.getClickGUIColor().darker().getBlue(), 100); 48 | if (this.dragging) { 49 | x = x2 + mouseX; 50 | y = y2 + mouseY; 51 | } 52 | this.width = w; 53 | this.height = FontUtil.getFontHeight() + 2; 54 | Gui.drawRect((int)x, (int)y, (int)x + (int)width, (int)y + (int)height, c.getRGB()); 55 | FontUtil.drawStringWithShadow(title, x, y + height / 2 - FontUtil.getFontHeight()/2f, 0xffffffff); 56 | 57 | if(extended) { 58 | double startY = y + height; 59 | Gui.drawRect((int) x, (int) startY, (int) x + (int) width, (int) startY + (int) height, c.getRGB()); 60 | if (font) OsirisMod.fontRenderer.drawStringWithShadow(s, (float) x, (float) startY, text.getRGB()); 61 | else mc.fontRenderer.drawStringWithShadow(s, (float) x, (float) startY, text.getRGB()); 62 | } 63 | } 64 | 65 | private void doStuff() { 66 | color = new Color(mod.red.getValInt(), mod.green.getValInt(), mod.blue.getValInt()); 67 | text = mod.rainbow.getValBoolean() ? Rainbow.getColor() : color; 68 | font = mod.customFont.getValBoolean(); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/macro/Macro.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.macro; 2 | 3 | import net.minecraft.client.Minecraft; 4 | 5 | public class Macro { 6 | int key; 7 | String value; 8 | 9 | public Macro(int k, String v){ 10 | key = k; 11 | value = v; 12 | } 13 | 14 | public void onMacro(){ 15 | if(Minecraft.getMinecraft().player != null) 16 | Minecraft.getMinecraft().player.sendChatMessage(value); 17 | } 18 | 19 | public int getKey(){ 20 | return key; 21 | } 22 | 23 | public String getValue(){ 24 | return value; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/macro/MacroManager.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.macro; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class MacroManager { 7 | List macros; 8 | public MacroManager(){ 9 | macros = new ArrayList<>(); 10 | } 11 | 12 | public List getMacros(){ 13 | return macros; 14 | } 15 | 16 | public Macro getMacroByValue(String v){ 17 | Macro m = getMacros().stream().filter(mm -> mm.getValue() == v).findFirst().orElse(null); 18 | return m; 19 | } 20 | 21 | public Macro getMacroByKey(int key){ 22 | Macro m = getMacros().stream().filter(mm -> mm.getKey() == key).findFirst().orElse(null); 23 | return m; 24 | } 25 | 26 | public void addMacro(Macro m){ 27 | macros.add(m); 28 | } 29 | 30 | public void delMacro(Macro m){ 31 | macros.remove(m); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/OsirisMixinLoader.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import net.minecraftforge.fml.relauncher.IFMLLoadingPlugin; 5 | import org.spongepowered.asm.launch.MixinBootstrap; 6 | import org.spongepowered.asm.mixin.MixinEnvironment; 7 | import org.spongepowered.asm.mixin.Mixins; 8 | 9 | import javax.annotation.Nullable; 10 | import java.util.Map; 11 | 12 | public class OsirisMixinLoader implements IFMLLoadingPlugin { 13 | private static boolean isObfuscatedEnvironment = false; 14 | 15 | public OsirisMixinLoader() { 16 | OsirisMod.log.info("Osiris mixins initialized"); 17 | MixinBootstrap.init(); 18 | Mixins.addConfiguration("mixins.osiris.json"); 19 | MixinEnvironment.getDefaultEnvironment().setObfuscationContext("searge"); 20 | OsirisMod.log.info(MixinEnvironment.getDefaultEnvironment().getObfuscationContext()); 21 | } 22 | 23 | @Override 24 | public String[] getASMTransformerClass() { 25 | return new String[0]; 26 | } 27 | 28 | @Override 29 | public String getModContainerClass() { 30 | return null; 31 | } 32 | 33 | @Nullable 34 | @Override 35 | public String getSetupClass() { 36 | return null; 37 | } 38 | 39 | @Override 40 | public void injectData(Map data) { 41 | isObfuscatedEnvironment = (boolean) (Boolean) data.get("runtimeDeobfuscationEnabled"); 42 | } 43 | 44 | @Override 45 | public String getAccessTransformerClass() { 46 | return null; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinAbstractClientPlayer.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.module.ModuleManager; 5 | import net.minecraft.client.entity.AbstractClientPlayer; 6 | import net.minecraft.client.network.NetworkPlayerInfo; 7 | import net.minecraft.util.ResourceLocation; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | 14 | import javax.annotation.Nullable; 15 | import java.util.UUID; 16 | 17 | @Mixin(AbstractClientPlayer.class) 18 | public abstract class MixinAbstractClientPlayer { 19 | @Shadow @Nullable protected abstract NetworkPlayerInfo getPlayerInfo(); 20 | 21 | @Inject(method = "getLocationCape", at = @At("HEAD"), cancellable = true) 22 | public void getLocationCape(CallbackInfoReturnable cir){ 23 | UUID uuid = getPlayerInfo().getGameProfile().getId(); 24 | 25 | if(ModuleManager.isModuleEnabled("Capes") && OsirisMod.getInstance().capeUtils.hasCape(uuid)) { 26 | cir.setReturnValue(new ResourceLocation("osiris:textures/cape.png")); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinBlock.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.util.BlockRenderLayer; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.Shadow; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 10 | 11 | @Mixin(Block.class) 12 | public abstract class MixinBlock { 13 | 14 | @Shadow public abstract String getLocalizedName(); 15 | 16 | @Inject(method = "getRenderLayer", at = @At("HEAD")) 17 | public void preGetRenderLayer(CallbackInfoReturnable cir){ 18 | if(this.getLocalizedName().equalsIgnoreCase("hmmm")){} 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinBlockSoulSand.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.module.ModuleManager; 4 | import net.minecraft.block.BlockSoulSand; 5 | import net.minecraft.block.state.IBlockState; 6 | import net.minecraft.entity.Entity; 7 | import net.minecraft.util.math.BlockPos; 8 | import net.minecraft.world.World; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | 14 | @Mixin(BlockSoulSand.class) 15 | public class MixinBlockSoulSand { 16 | @Inject(method = "onEntityCollision", at = @At("HEAD"), cancellable = true) 17 | public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn, CallbackInfo info) { 18 | if (ModuleManager.isModuleEnabled("NoSlow")) 19 | info.cancel(); 20 | } 21 | } -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinEntity.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.module.ModuleManager; 4 | import net.minecraft.entity.Entity; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Redirect; 8 | 9 | 10 | @Mixin(Entity.class) 11 | public class MixinEntity { 12 | 13 | @Redirect(method = "applyEntityCollision", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/Entity;addVelocity(DDD)V")) 14 | public void velocity(Entity entity, double x, double y, double z) { 15 | if (!ModuleManager.isModuleEnabled("NoPush")) { 16 | entity.motionX += x; 17 | entity.motionY += y; 18 | entity.motionZ += z; 19 | entity.isAirBorne = true; 20 | } 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinEntityPlayer.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.PlayerJumpEvent; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.entity.player.EntityPlayer; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.Shadow; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 | 13 | @Mixin(EntityPlayer.class) 14 | public abstract class MixinEntityPlayer { 15 | @Shadow public abstract String getName(); 16 | 17 | @Inject(method = "jump", at = @At("HEAD"), cancellable = true) 18 | public void onJump(CallbackInfo ci){ 19 | if(Minecraft.getMinecraft().player.getName() == this.getName()){ 20 | OsirisMod.EVENT_BUS.post(new PlayerJumpEvent()); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinEntityPlayerSP.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.PlayerMoveEvent; 5 | import net.minecraft.client.entity.AbstractClientPlayer; 6 | import net.minecraft.client.entity.EntityPlayerSP; 7 | import net.minecraft.entity.MoverType; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | @Mixin(EntityPlayerSP.class) 13 | public abstract class MixinEntityPlayerSP extends AbstractClientPlayer { 14 | public MixinEntityPlayerSP() { 15 | super(null, null); 16 | } 17 | 18 | @Redirect(method = "move", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/entity/AbstractClientPlayer;move(Lnet/minecraft/entity/MoverType;DDD)V")) 19 | public void move(AbstractClientPlayer player, MoverType type, double x, double y, double z) { 20 | PlayerMoveEvent moveEvent = new PlayerMoveEvent(type, x, y, z); 21 | OsirisMod.EVENT_BUS.post(moveEvent); 22 | if(moveEvent.isCancelled()) { 23 | } 24 | super.move(type, moveEvent.x, moveEvent.y, moveEvent.z); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinEntityRenderer.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.module.ModuleManager; 4 | import me.finz0.osiris.module.modules.misc.NoEntityTrace; 5 | import me.finz0.osiris.module.modules.render.NoRender; 6 | import net.minecraft.client.multiplayer.WorldClient; 7 | import net.minecraft.client.renderer.EntityRenderer; 8 | import net.minecraft.entity.Entity; 9 | import net.minecraft.util.math.AxisAlignedBB; 10 | import net.minecraft.util.math.RayTraceResult; 11 | import net.minecraft.util.math.Vec3d; 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.Inject; 15 | import org.spongepowered.asm.mixin.injection.Redirect; 16 | 17 | import java.util.ArrayList; 18 | import java.util.List; 19 | 20 | import com.google.common.base.Predicate; 21 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 22 | 23 | @Mixin(EntityRenderer.class) 24 | public class MixinEntityRenderer { 25 | 26 | @Redirect(method = "orientCamera", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/WorldClient;rayTraceBlocks(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;)Lnet/minecraft/util/math/RayTraceResult;")) 27 | public RayTraceResult rayTraceBlocks(WorldClient world, Vec3d start, Vec3d end) { 28 | if (ModuleManager.isModuleEnabled("CameraClip")) 29 | return null; 30 | else 31 | return world.rayTraceBlocks(start, end); 32 | } 33 | 34 | @Redirect(method = "getMouseOver", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/WorldClient;getEntitiesInAABBexcluding(Lnet/minecraft/entity/Entity;Lnet/minecraft/util/math/AxisAlignedBB;Lcom/google/common/base/Predicate;)Ljava/util/List;")) 35 | public List getEntitiesInAABBexcluding(WorldClient worldClient, Entity entityIn, AxisAlignedBB boundingBox, Predicate predicate) { 36 | if (((NoEntityTrace)ModuleManager.getModuleByName("NoEntityTrace")).noTrace()) { 37 | return new ArrayList<>(); 38 | } else { 39 | return worldClient.getEntitiesInAABBexcluding(entityIn, boundingBox, predicate); 40 | } 41 | } 42 | 43 | @Inject(method = "hurtCameraEffect", at = @At("HEAD"), cancellable = true) 44 | public void hurtCameraEffect(float ticks, CallbackInfo info) { 45 | if (ModuleManager.isModuleEnabled("NoRender") && ((NoRender)ModuleManager.getModuleByName("NoRender")).hurtCam.getValBoolean()) 46 | info.cancel(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinGuiContainer.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.module.modules.render.ShulkerPreview; 4 | import net.minecraft.client.gui.inventory.GuiContainer; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.Shadow; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | @Mixin(GuiContainer.class) 12 | public class MixinGuiContainer { 13 | @Shadow public int guiLeft; 14 | @Shadow public int guiTop; 15 | 16 | 17 | @Inject(method = "drawScreen", at = @At("HEAD"), cancellable = true) 18 | public void drawScreen(int mouseX, int mouseY, float partialTicks, CallbackInfo ci){ 19 | ShulkerPreview.mouseX = mouseX; 20 | ShulkerPreview.mouseY = mouseY; 21 | ShulkerPreview.guiLeft = this.guiLeft; 22 | ShulkerPreview.guiTop = this.guiTop; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinGuiMainMenu.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.util.Rainbow; 5 | import net.minecraft.client.gui.GuiMainMenu; 6 | import net.minecraft.client.gui.GuiScreen; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | @Mixin(GuiMainMenu.class) 13 | public class MixinGuiMainMenu extends GuiScreen { 14 | String s = OsirisMod.MODNAME + " " + OsirisMod.MODVER; 15 | 16 | @Inject(method = "drawScreen", at = @At("TAIL"), cancellable = true) 17 | public void drawText(int mouseX, int mouseY, float partialTicks, CallbackInfo ci){ 18 | this.drawString(this.fontRenderer, s, (this.width / 2) - (this.fontRenderer.getStringWidth(s) /2), 2, Rainbow.getInt()); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinGuiNewChat.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.module.ModuleManager; 4 | import me.finz0.osiris.module.modules.chat.BetterChat; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.client.gui.ChatLine; 7 | import net.minecraft.client.gui.Gui; 8 | import net.minecraft.client.gui.GuiNewChat; 9 | import org.spongepowered.asm.mixin.Final; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.Overwrite; 12 | import org.spongepowered.asm.mixin.Shadow; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.ModifyVariable; 15 | import org.spongepowered.asm.mixin.injection.Redirect; 16 | 17 | import java.awt.*; 18 | import java.util.List; 19 | 20 | 21 | @Mixin(GuiNewChat.class) 22 | public abstract class MixinGuiNewChat { 23 | 24 | @Shadow private int scrollPos; 25 | 26 | @Shadow @Final private List drawnChatLines; 27 | 28 | @Shadow public abstract int getLineCount(); 29 | 30 | @Redirect(method = "drawChat", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/GuiNewChat;drawRect(IIIII)V")) 31 | private void drawRectBackgroundClean(int left, int top, int right, int bottom, int color) { 32 | if(!ModuleManager.isModuleEnabled("BetterChat") || !((BetterChat)ModuleManager.getModuleByName("BetterChat")).clearBkg.getValBoolean()) { 33 | Gui.drawRect(left, top, right, bottom, color); 34 | } 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinGuiPlayerTabOverlay.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.enemy.Enemies; 4 | import me.finz0.osiris.friends.Friends; 5 | import net.minecraft.client.gui.GuiPlayerTabOverlay; 6 | import net.minecraft.client.network.NetworkPlayerInfo; 7 | import net.minecraft.scoreboard.ScorePlayerTeam; 8 | import net.minecraft.util.text.TextFormatting; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | 14 | 15 | //Credit 086 16 | @Mixin(GuiPlayerTabOverlay.class) 17 | public class MixinGuiPlayerTabOverlay { 18 | 19 | @Inject(method = "getPlayerName", at = @At("HEAD"), cancellable = true) 20 | public void getPlayerName(NetworkPlayerInfo networkPlayerInfoIn, CallbackInfoReturnable returnable) { 21 | returnable.cancel(); 22 | returnable.setReturnValue(getPlayerName(networkPlayerInfoIn)); 23 | } 24 | 25 | public String getPlayerName(NetworkPlayerInfo networkPlayerInfoIn) { 26 | String dname = networkPlayerInfoIn.getDisplayName() != null ? networkPlayerInfoIn.getDisplayName().getFormattedText() : ScorePlayerTeam.formatPlayerName(networkPlayerInfoIn.getPlayerTeam(), networkPlayerInfoIn.getGameProfile().getName()); 27 | if (Friends.isFriend(dname)) return TextFormatting.AQUA + dname; 28 | else if (Enemies.isEnemy(dname)) return TextFormatting.RED + dname; 29 | else return dname; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinGuiScreen.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.module.ModuleManager; 4 | import me.finz0.osiris.module.modules.render.ShulkerPreview; 5 | import net.minecraft.client.Minecraft; 6 | import net.minecraft.client.gui.GuiScreen; 7 | import net.minecraft.item.ItemShulkerBox; 8 | import net.minecraft.item.ItemStack; 9 | import net.minecraft.nbt.NBTTagCompound; 10 | import org.lwjgl.input.Keyboard; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.Shadow; 13 | import org.spongepowered.asm.mixin.injection.At; 14 | import org.spongepowered.asm.mixin.injection.Inject; 15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 16 | 17 | @Mixin(value = GuiScreen.class, priority = 9999) 18 | public class MixinGuiScreen { 19 | @Shadow public Minecraft mc; 20 | 21 | @Inject(method = "renderToolTip", at = @At("HEAD"), cancellable = true) 22 | public void renderToolTip(ItemStack is, int x, int y, CallbackInfo ci) { 23 | if (ModuleManager.isModuleEnabled("ShulkerPreview") && is.getItem() instanceof ItemShulkerBox) { 24 | NBTTagCompound tagCompound = is.getTagCompound(); 25 | if (tagCompound != null && tagCompound.hasKey("BlockEntityTag", 10)) { 26 | NBTTagCompound blockEntityTag = tagCompound.getCompoundTag("BlockEntityTag"); 27 | if (blockEntityTag.hasKey("Items", 9)) { 28 | ci.cancel(); 29 | 30 | ShulkerPreview.nbt = blockEntityTag; 31 | ShulkerPreview.itemStack = is; 32 | ShulkerPreview.active = true; 33 | 34 | ShulkerPreview.pinned = Keyboard.isKeyDown(Keyboard.KEY_LSHIFT); 35 | if(!ShulkerPreview.pinned){ 36 | ShulkerPreview.drawX = x; 37 | ShulkerPreview.drawY = y; 38 | } 39 | 40 | } 41 | } 42 | } 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinLayerBipedArmor.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.module.ModuleManager; 4 | import me.finz0.osiris.module.modules.render.NoRender; 5 | import net.minecraft.client.model.ModelBiped; 6 | import net.minecraft.client.renderer.GlStateManager; 7 | import net.minecraft.client.renderer.entity.layers.LayerBipedArmor; 8 | import net.minecraft.inventory.EntityEquipmentSlot; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | 14 | @Mixin(LayerBipedArmor.class) 15 | public class MixinLayerBipedArmor { 16 | 17 | @Inject(method = "setModelSlotVisible", at = @At(value = "HEAD"), cancellable = true) 18 | protected void setModelSlotVisible(ModelBiped model, EntityEquipmentSlot slotIn, CallbackInfo info) { 19 | if (ModuleManager.isModuleEnabled("NoRender") && ((NoRender)ModuleManager.getModuleByName("NoRender")).armor.getValBoolean()) { 20 | info.cancel(); 21 | switch (slotIn) { 22 | case HEAD: 23 | model.bipedHead.showModel = false; 24 | model.bipedHeadwear.showModel = false; 25 | case CHEST: 26 | model.bipedBody.showModel = false; 27 | model.bipedRightArm.showModel = false; 28 | model.bipedLeftArm.showModel = false; 29 | case LEGS: 30 | model.bipedBody.showModel = false; 31 | model.bipedRightLeg.showModel = false; 32 | model.bipedLeftLeg.showModel = false; 33 | case FEET: 34 | model.bipedRightLeg.showModel = false; 35 | model.bipedLeftLeg.showModel = false; 36 | } 37 | } 38 | } 39 | } -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinMinecraft.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.GuiScreenDisplayedEvent; 5 | import me.finz0.osiris.module.ModuleManager; 6 | import net.minecraft.client.Minecraft; 7 | import net.minecraft.client.entity.EntityPlayerSP; 8 | import net.minecraft.client.multiplayer.PlayerControllerMP; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import net.minecraft.client.gui.*; 11 | import org.spongepowered.asm.mixin.Shadow; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.Redirect; 15 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 16 | 17 | //this mixin randomly causes crash at startup sometimes idk why somebody help 18 | @Mixin(value = Minecraft.class, priority = 9999) 19 | public class MixinMinecraft { 20 | 21 | @Inject(method = "displayGuiScreen", at = @At("HEAD")) 22 | private void displayGuiScreen(GuiScreen guiScreenIn, CallbackInfo info) { 23 | GuiScreenDisplayedEvent screenEvent = new GuiScreenDisplayedEvent(guiScreenIn); 24 | OsirisMod.EVENT_BUS.post(screenEvent); 25 | } 26 | 27 | //credit cookiedragon234 this is very epic 28 | @Redirect(method = "sendClickBlockToController", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/entity/EntityPlayerSP;isHandActive()Z")) 29 | private boolean isHandActive(EntityPlayerSP player){ 30 | if(ModuleManager.isModuleEnabled("BreakTweaks")) return false; 31 | return Minecraft.getMinecraft().player.isHandActive(); 32 | } 33 | 34 | @Redirect(method = "rightClickMouse", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/PlayerControllerMP;getIsHittingBlock()Z")) 35 | private boolean isHittingBlock(PlayerControllerMP playerControllerMP){ 36 | if(ModuleManager.isModuleEnabled("BreakTweaks")) return false; 37 | return Minecraft.getMinecraft().playerController.getIsHittingBlock(); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinMovementInputFromOptions.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.module.ModuleManager; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.gui.GuiChat; 6 | import net.minecraft.client.settings.KeyBinding; 7 | import net.minecraft.util.MovementInput; 8 | import net.minecraft.util.MovementInputFromOptions; 9 | import org.lwjgl.input.Keyboard; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Redirect; 13 | 14 | @Mixin(value = MovementInputFromOptions.class, priority = 10000) 15 | public abstract class MixinMovementInputFromOptions extends MovementInput { 16 | @Redirect(method = "updatePlayerMoveState", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/settings/KeyBinding;isKeyDown()Z")) 17 | public boolean isKeyPressed(KeyBinding keyBinding) { 18 | if (ModuleManager.isModuleEnabled("GuiMove") 19 | && Minecraft.getMinecraft().currentScreen != null 20 | && !(Minecraft.getMinecraft().currentScreen instanceof GuiChat) 21 | && Minecraft.getMinecraft().player != null) { 22 | return Keyboard.isKeyDown(keyBinding.getKeyCode()); 23 | } 24 | return keyBinding.isKeyDown(); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinNetHandlerPlayClient.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import net.minecraft.client.network.NetHandlerPlayClient; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | @Mixin(NetHandlerPlayClient.class) 7 | public abstract class MixinNetHandlerPlayClient { 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinNetworkManager.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import io.netty.channel.ChannelHandlerContext; 4 | import me.finz0.osiris.OsirisMod; 5 | import net.minecraft.network.NetworkManager; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import net.minecraft.network.Packet; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | import me.finz0.osiris.event.events.PacketEvent; 12 | 13 | @Mixin(NetworkManager.class) 14 | public class MixinNetworkManager { 15 | 16 | @Inject(method = "sendPacket(Lnet/minecraft/network/Packet;)V", at = @At("HEAD"), cancellable = true) 17 | private void preSendPacket(Packet packet, CallbackInfo callbackInfo) { 18 | PacketEvent.Send event = new PacketEvent.Send(packet); 19 | OsirisMod.EVENT_BUS.post(event); 20 | 21 | if (event.isCancelled()) { 22 | callbackInfo.cancel(); 23 | } 24 | } 25 | 26 | @Inject(method = "channelRead0", at = @At("HEAD"), cancellable = true) 27 | private void preChannelRead(ChannelHandlerContext context, Packet packet, CallbackInfo callbackInfo) { 28 | PacketEvent.Receive event = new PacketEvent.Receive(packet); 29 | OsirisMod.EVENT_BUS.post(event); 30 | 31 | if (event.isCancelled()) { 32 | callbackInfo.cancel(); 33 | } 34 | } 35 | 36 | @Inject(method = "sendPacket(Lnet/minecraft/network/Packet;)V", at = @At("TAIL"), cancellable = true) 37 | private void postSendPacket(Packet packet, CallbackInfo callbackInfo) { 38 | PacketEvent.PostSend event = new PacketEvent.PostSend(packet); 39 | OsirisMod.EVENT_BUS.post(event); 40 | 41 | if (event.isCancelled()) { 42 | callbackInfo.cancel(); 43 | } 44 | } 45 | 46 | @Inject(method = "channelRead0", at = @At("TAIL"), cancellable = true) 47 | private void postChannelRead(ChannelHandlerContext context, Packet packet, CallbackInfo callbackInfo) { 48 | PacketEvent.PostReceive event = new PacketEvent.PostReceive(packet); 49 | OsirisMod.EVENT_BUS.post(event); 50 | 51 | if (event.isCancelled()) { 52 | callbackInfo.cancel(); 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/mixin/mixins/MixinPlayerControllerMP.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.mixin.mixins; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.DestroyBlockEvent; 5 | import me.finz0.osiris.module.ModuleManager; 6 | import net.minecraft.client.multiplayer.PlayerControllerMP; 7 | import net.minecraft.util.math.BlockPos; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | 14 | @Mixin(PlayerControllerMP.class) 15 | public class MixinPlayerControllerMP { 16 | @Inject(method = "onPlayerDestroyBlock", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/World;playEvent(ILnet/minecraft/util/math/BlockPos;I)V"), cancellable = true) 17 | private void onPlayerDestroyBlock(BlockPos pos, CallbackInfoReturnable info) { 18 | OsirisMod.EVENT_BUS.post(new DestroyBlockEvent(pos)); 19 | } 20 | 21 | //credit cookiedragon234 22 | @Inject(method = "resetBlockRemoving", at = @At("HEAD"), cancellable = true) 23 | private void resetBlock(CallbackInfo ci){ 24 | if(ModuleManager.isModuleEnabled("BreakTweaks")) ci.cancel(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/AutoReply.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraftforge.client.event.ClientChatReceivedEvent; 9 | 10 | public class AutoReply extends Module { 11 | public AutoReply() { 12 | super("AutoReply", Category.CHAT, "Reply to whispers"); 13 | rSetting(reply = new Setting("Message", this, "fuck off", "AutoReplyMessage")); 14 | } 15 | 16 | Setting reply; 17 | 18 | @EventHandler 19 | private Listener listener = new Listener<>(event ->{ 20 | if( event.getMessage().getUnformattedText().contains("whispers: ") && !event.getMessage().getUnformattedText().startsWith(mc.player.getName())){ 21 | mc.player.sendChatMessage("/r " + reply.getCustomVal()); 22 | } 23 | }); 24 | 25 | public void onEnable(){ 26 | OsirisMod.EVENT_BUS.subscribe(this); 27 | } 28 | 29 | public void onDisable(){ 30 | OsirisMod.EVENT_BUS.unsubscribe(this); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/BetterChat.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.settings.Setting; 5 | import me.finz0.osiris.OsirisMod; 6 | import me.finz0.osiris.module.Module; 7 | import me.finz0.osiris.friends.Friends; 8 | import me.zero.alpine.listener.EventHandler; 9 | import me.zero.alpine.listener.Listener; 10 | import net.minecraft.util.text.Style; 11 | import net.minecraft.util.text.TextFormatting; 12 | import net.minecraftforge.client.event.ClientChatReceivedEvent; 13 | 14 | public class BetterChat extends Module { 15 | public BetterChat() { 16 | super("BetterChat", Category.CHAT); 17 | } 18 | 19 | public Setting clearBkg; 20 | Setting nameHighlight; 21 | Setting friendHighlight; 22 | 23 | public void setup(){ 24 | clearBkg = new Setting("Clear", this, true, "BetterChatClear"); 25 | OsirisMod.getInstance().settingsManager.rSetting(clearBkg); 26 | OsirisMod.getInstance().settingsManager.rSetting(nameHighlight = new Setting("NameHighlight", this, false, "BetterChatNameHighlight")); 27 | OsirisMod.getInstance().settingsManager.rSetting(friendHighlight = new Setting("FriendHighlight", this, false, "BetterChatFriendHighlight")); 28 | } 29 | 30 | @EventHandler 31 | private Listener chatReceivedEventListener = new Listener<>(event -> { 32 | if(mc.player == null) return; 33 | String name = mc.player.getName().toLowerCase(); 34 | if(friendHighlight.getValBoolean()){ 35 | if(!event.getMessage().getUnformattedText().startsWith("<"+mc.player.getName()+">")){ 36 | Friends.getFriends().forEach(f -> { 37 | if(event.getMessage().getUnformattedText().contains(f.getName())){ 38 | event.getMessage().setStyle(event.getMessage().getStyle().setColor(TextFormatting.AQUA)); 39 | } 40 | }); 41 | } 42 | } 43 | if(nameHighlight.getValBoolean()){ 44 | String s = ChatFormatting.GOLD + "" + ChatFormatting.BOLD + mc.player.getName() + ChatFormatting.RESET; 45 | Style style = event.getMessage().getStyle(); 46 | if(!event.getMessage().getUnformattedText().startsWith("<"+mc.player.getName()+">") && event.getMessage().getUnformattedText().toLowerCase().contains(name)) { 47 | event.getMessage().getStyle().setParentStyle(style.setBold(true).setColor(TextFormatting.GOLD)); 48 | } 49 | } 50 | }); 51 | 52 | public void onEnable(){ 53 | OsirisMod.EVENT_BUS.subscribe(this); 54 | } 55 | 56 | public void onDisable(){ 57 | OsirisMod.EVENT_BUS.unsubscribe(this); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/ChatSuffix.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.command.Command; 6 | import me.finz0.osiris.event.events.PacketEvent; 7 | import me.finz0.osiris.module.Module; 8 | import me.zero.alpine.listener.EventHandler; 9 | import me.zero.alpine.listener.Listener; 10 | import net.minecraft.network.play.client.CPacketChatMessage; 11 | 12 | public class ChatSuffix extends Module { 13 | public ChatSuffix() { 14 | super("ChatSuffix", Category.CHAT, "Adds a suffix to your messages"); 15 | } 16 | 17 | Setting blue; 18 | 19 | public void setup(){ 20 | OsirisMod.getInstance().settingsManager.rSetting(blue = new Setting("Blue", this, false, "ChatSuffixBlue")); 21 | } 22 | 23 | @EventHandler 24 | private Listener listener = new Listener<>(event -> { 25 | if(event.getPacket() instanceof CPacketChatMessage){ 26 | if(((CPacketChatMessage) event.getPacket()).getMessage().startsWith("/") || ((CPacketChatMessage) event.getPacket()).getMessage().startsWith(Command.getPrefix())) return; 27 | String old = ((CPacketChatMessage) event.getPacket()).getMessage(); 28 | String suffix = " \u300b" + toUnicode(OsirisMod.MODNAME); 29 | String s = old + suffix; 30 | if(blue.getValBoolean()) s = old + "`" + suffix; 31 | if(s.length() > 255) return; 32 | ((CPacketChatMessage) event.getPacket()).message = s; 33 | } 34 | }); 35 | 36 | public void onEnable(){ 37 | OsirisMod.EVENT_BUS.subscribe(this); 38 | } 39 | 40 | public void onDisable(){ 41 | OsirisMod.EVENT_BUS.unsubscribe(this); 42 | } 43 | 44 | public String toUnicode(String s){ 45 | return s.toLowerCase() 46 | .replace("a", "\u1d00") 47 | .replace("b", "\u0299") 48 | .replace("c", "\u1d04") 49 | .replace("d", "\u1d05") 50 | .replace("e", "\u1d07") 51 | .replace("f", "\ua730") 52 | .replace("g", "\u0262") 53 | .replace("h", "\u029c") 54 | .replace("i", "\u026a") 55 | .replace("j", "\u1d0a") 56 | .replace("k", "\u1d0b") 57 | .replace("l", "\u029f") 58 | .replace("m", "\u1d0d") 59 | .replace("n", "\u0274") 60 | .replace("o", "\u1d0f") 61 | .replace("p", "\u1d18") 62 | .replace("q", "\u01eb") 63 | .replace("r", "\u0280") 64 | .replace("s", "\ua731") 65 | .replace("t", "\u1d1b") 66 | .replace("u", "\u1d1c") 67 | .replace("v", "\u1d20") 68 | .replace("w", "\u1d21") 69 | .replace("x", "\u02e3") 70 | .replace("y", "\u028f") 71 | .replace("z", "\u1d22"); 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/ChatTimeStamps.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.settings.Setting; 5 | import me.finz0.osiris.OsirisMod; 6 | import me.finz0.osiris.module.Module; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | import net.minecraft.util.text.TextComponentString; 10 | import net.minecraftforge.client.event.ClientChatReceivedEvent; 11 | 12 | import java.text.SimpleDateFormat; 13 | import java.util.ArrayList; 14 | import java.util.Date; 15 | 16 | public class ChatTimeStamps extends Module { 17 | public ChatTimeStamps() { 18 | super("ChatTimeStamps", Category.CHAT); 19 | ArrayList formats = new ArrayList<>(); 20 | formats.add("H24:mm"); 21 | formats.add("H12:mm"); 22 | formats.add("H12:mm a"); 23 | formats.add("H24:mm:ss"); 24 | formats.add("H12:mm:ss"); 25 | formats.add("H12:mm:ss a"); 26 | ArrayList deco = new ArrayList<>(); deco.add("< >"); deco.add("[ ]"); deco.add("{ }"); deco.add(" "); 27 | ArrayList colors = new ArrayList<>(); 28 | for(ChatFormatting cf : ChatFormatting.values()){ 29 | colors.add(cf.getName()); 30 | } 31 | 32 | rSetting(format = new Setting("Format", this, "H24:M", formats, "ChatTimeStampsFormat")); 33 | rSetting(color = new Setting("Color", this, ChatFormatting.GRAY.getName(), colors, "ChatTimeStampsColor")); 34 | rSetting(decoration = new Setting("Deco", this, "[ ]", deco, "ChatTimeStampsDeco")); 35 | rSetting(space = new Setting("Space", this, false, "ChatTimeStampsSpace")); 36 | } 37 | 38 | Setting format; 39 | Setting color; 40 | Setting decoration; 41 | Setting space; 42 | 43 | @EventHandler 44 | private Listener listener = new Listener<>(event -> { 45 | String decoLeft = decoration.getValString().equalsIgnoreCase(" ") ? "" : decoration.getValString().split(" ")[0]; 46 | String decoRight = decoration.getValString().equalsIgnoreCase(" ") ? "" : decoration.getValString().split(" ")[1]; 47 | if(space.getValBoolean()) decoRight += " "; 48 | String dateFormat = format.getValString().replace("H24", "k").replace("H12", "h"); 49 | String date = new SimpleDateFormat(dateFormat).format(new Date()); 50 | TextComponentString time = new TextComponentString(ChatFormatting.getByName(color.getValString()) + decoLeft + date + decoRight + ChatFormatting.RESET); 51 | event.setMessage(time.appendSibling(event.getMessage())); 52 | }); 53 | 54 | public void onEnable(){ 55 | OsirisMod.EVENT_BUS.subscribe(this); 56 | } 57 | 58 | public void onDisable(){ 59 | OsirisMod.EVENT_BUS.unsubscribe(this); 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/ColorChat.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.command.Command; 6 | import me.finz0.osiris.event.events.PacketEvent; 7 | import me.finz0.osiris.module.Module; 8 | import me.zero.alpine.listener.EventHandler; 9 | import me.zero.alpine.listener.Listener; 10 | import net.minecraft.network.play.client.CPacketChatMessage; 11 | 12 | import java.util.ArrayList; 13 | 14 | public class ColorChat extends Module { 15 | public ColorChat() { 16 | super("ColorChat", Category.CHAT); 17 | } 18 | 19 | Setting mode; 20 | 21 | public void setup(){ 22 | ArrayList modes = new ArrayList<>(); 23 | modes.add("Green"); 24 | modes.add("Blue"); 25 | OsirisMod.getInstance().settingsManager.rSetting(mode = new Setting("Color", this, "Green", modes, "ColorChatMode")); 26 | } 27 | 28 | @EventHandler 29 | private Listener listener = new Listener<>(event -> { 30 | if(event.getPacket() instanceof CPacketChatMessage){ 31 | if(((CPacketChatMessage) event.getPacket()).getMessage().startsWith("/") || ((CPacketChatMessage) event.getPacket()).getMessage().startsWith(Command.getPrefix())) return; 32 | String message = ((CPacketChatMessage) event.getPacket()).getMessage(); 33 | String prefix = ""; 34 | if(mode.getValString().equalsIgnoreCase("Green")) prefix = ">"; 35 | if(mode.getValString().equalsIgnoreCase("Blue")) prefix = "`"; 36 | String s = prefix + message; 37 | if(s.length() > 255) return; 38 | ((CPacketChatMessage) event.getPacket()).message = s; 39 | } 40 | }); 41 | 42 | public void onEnable(){ 43 | OsirisMod.EVENT_BUS.subscribe(this); 44 | } 45 | 46 | public void onDisable(){ 47 | OsirisMod.EVENT_BUS.unsubscribe(this); 48 | } 49 | 50 | public String getHudInfo(){ 51 | return mode.getValString().toUpperCase(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/DotGodSpammer.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | import java.text.DecimalFormat; 8 | import java.util.concurrent.ThreadLocalRandom; 9 | 10 | public class DotGodSpammer extends Module { 11 | public DotGodSpammer() { 12 | super("DotGodSpammer", Category.CHAT); 13 | } 14 | int waitCounter; 15 | Setting delay; 16 | 17 | public void setup(){ 18 | OsirisMod.getInstance().settingsManager.rSetting(delay = new Setting("Delay", this, 2, 1, 100, true, "DotgodSpammerDelay")); 19 | } 20 | 21 | public void onUpdate(){ 22 | if (waitCounter < delay.getValDouble() * 100) { 23 | waitCounter++; 24 | return; 25 | } else { 26 | waitCounter = 0; 27 | } 28 | double randomNum = ThreadLocalRandom.current().nextDouble(1.0, 200.0); 29 | 30 | mc.player.sendChatMessage("I just flew " + new DecimalFormat("0.##").format(randomNum) + " meters like a butterfly thanks to DotGod.CC!"); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/KettuLinuxDupe.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | import java.util.Random; 6 | 7 | public class KettuLinuxDupe extends Module { 8 | public KettuLinuxDupe() { 9 | super("KettuLinuxDupe", Category.CHAT); 10 | } 11 | 12 | public void onEnable(){ 13 | if(mc.player != null) 14 | mc.player.sendChatMessage("I just used the Kettu Linux Dupe and got " + new Random().nextInt(15) + " shulkers! Powered by Osiris\u2122"); 15 | disable(); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/Spammer.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.command.Command; 6 | import me.finz0.osiris.module.Module; 7 | 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | 11 | public class Spammer extends Module { 12 | public Spammer() { 13 | super("Spammer", Category.CHAT); 14 | text = new ArrayList<>(); 15 | } 16 | 17 | public static List text; 18 | int waitCounter; 19 | Setting delay; 20 | int i = -1; 21 | 22 | public void setup(){ 23 | OsirisMod.getInstance().settingsManager.rSetting(delay = new Setting("Delay", this, 5, 1, 100, true, "SpammerDelay")); 24 | } 25 | 26 | public void onUpdate(){ 27 | if(text.size() <= 0 || text.isEmpty()){ 28 | Command.sendClientMessage("Spammer list empty, disabling"); 29 | disable(); 30 | } 31 | if (waitCounter < delay.getValDouble() * 100) { 32 | waitCounter++; 33 | return; 34 | } else { 35 | waitCounter = 0; 36 | } 37 | i++; 38 | if(!(i + 1 > text.size())) 39 | mc.player.sendChatMessage(text.get(i)); 40 | else 41 | i = -1; 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/ToggleMsgs.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | public class ToggleMsgs extends Module { 6 | public ToggleMsgs() { 7 | super("ToggleMsgs", Category.CHAT, "Sends a client side message when you toggle any module"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/UwuChat.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.command.Command; 5 | import me.finz0.osiris.event.events.PacketEvent; 6 | import me.finz0.osiris.module.Module; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | import net.minecraft.network.play.client.CPacketChatMessage; 10 | 11 | public class UwuChat extends Module { 12 | public UwuChat() { 13 | super("UwuChat", Category.CHAT, "uwu"); 14 | } 15 | 16 | @EventHandler 17 | private Listener packetSendListener = new Listener<>(event -> { 18 | if(event.getPacket() instanceof CPacketChatMessage){ 19 | if(((CPacketChatMessage) event.getPacket()).getMessage().startsWith("/") || ((CPacketChatMessage) event.getPacket()).getMessage().startsWith(Command.getPrefix())) return; 20 | String old = ((CPacketChatMessage) event.getPacket()).getMessage(); 21 | String s = old.replace("r", "w").replace("R", "W").replace("ll", "ww").replace("LL", "WW") + " uwu"; 22 | if(s.length() > 255) return; 23 | ((CPacketChatMessage) event.getPacket()).message = s; 24 | } 25 | }); 26 | 27 | public void onEnable(){ 28 | OsirisMod.EVENT_BUS.subscribe(this); 29 | } 30 | 31 | public void onDisable(){ 32 | OsirisMod.EVENT_BUS.unsubscribe(this); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/VisualRange.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import me.finz0.osiris.command.Command; 4 | import me.finz0.osiris.module.Module; 5 | import me.finz0.osiris.module.ModuleManager; 6 | import me.finz0.osiris.module.modules.misc.Notifications; 7 | import net.minecraft.entity.Entity; 8 | import net.minecraft.entity.player.EntityPlayer; 9 | 10 | import java.awt.*; 11 | import java.util.ArrayList; 12 | import java.util.List; 13 | import java.util.stream.Collectors; 14 | 15 | public class VisualRange extends Module { 16 | public VisualRange() { 17 | super("VisualRange", Category.CHAT, "Sends a client side message when someone enters your render distance"); 18 | } 19 | List knownPlayers = new ArrayList<>();; 20 | List players; 21 | 22 | public void onUpdate(){ 23 | if(mc.player == null) return; 24 | players = mc.world.loadedEntityList.stream().filter(e-> e instanceof EntityPlayer).collect(Collectors.toList()); 25 | try { 26 | for (Entity e : players) { 27 | if (e instanceof EntityPlayer && !e.getName().equalsIgnoreCase(mc.player.getName())) { 28 | if (!knownPlayers.contains(e)) { 29 | knownPlayers.add(e); 30 | Command.sendClientMessage(e.getName() + " entered visual range."); 31 | if(ModuleManager.isModuleEnabled("Notifications")) 32 | Notifications.sendNotification(e.getName() + " entered visual range.", TrayIcon.MessageType.INFO); 33 | } 34 | } 35 | } 36 | } catch(Exception e){} // ez no crasherino 37 | try { 38 | for (Entity e : knownPlayers) { 39 | if (e instanceof EntityPlayer && !e.getName().equalsIgnoreCase(mc.player.getName())) { 40 | if (!players.contains(e)) { 41 | knownPlayers.remove(e);; 42 | } 43 | } 44 | } 45 | } catch(Exception e){} // ez no crasherino pt.2 46 | } 47 | 48 | public void onDisable(){ 49 | knownPlayers.clear(); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/chat/Welcomer.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.chat; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.command.Command; 6 | import me.finz0.osiris.event.events.PlayerJoinEvent; 7 | import me.finz0.osiris.event.events.PlayerLeaveEvent; 8 | import me.finz0.osiris.module.Module; 9 | 10 | import me.zero.alpine.listener.EventHandler; 11 | import me.zero.alpine.listener.Listener; 12 | 13 | public class Welcomer extends Module { 14 | public Welcomer() { 15 | super("Welcomer", Category.CHAT, "Sends a message when someone joins the server"); 16 | OsirisMod.getInstance().settingsManager.rSetting(publicS = new Setting("Public", this, false, "WelcomerPublicMode")); 17 | } 18 | Setting publicS; 19 | 20 | @EventHandler 21 | private Listener listener1 = new Listener<>(event -> { 22 | if(publicS.getValBoolean()) mc.player.sendChatMessage(event.getName() + " joined the game"); 23 | else Command.sendClientMessage(event.getName() + " joined the game"); 24 | }); 25 | 26 | @EventHandler 27 | private Listener listener2 = new Listener<>(event -> { 28 | if(publicS.getValBoolean()) mc.player.sendChatMessage(event.getName() + " left the game"); 29 | else Command.sendClientMessage(event.getName() + " left the game"); 30 | }); 31 | 32 | public void onEnable(){ 33 | OsirisMod.EVENT_BUS.subscribe(this); 34 | } 35 | 36 | public void onDisable(){ 37 | OsirisMod.EVENT_BUS.unsubscribe(this); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/combat/AntiChainPop.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.combat; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | public class AntiChainPop extends Module { 6 | public AntiChainPop() { 7 | super("AntiChainPop", Category.COMBAT); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/combat/Criticals.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.combat; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.PacketEvent; 5 | import me.finz0.osiris.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraft.network.play.client.CPacketPlayer; 9 | import net.minecraft.network.play.client.CPacketUseEntity; 10 | 11 | public class Criticals extends Module { 12 | public Criticals() { 13 | super("Criticals", Category.COMBAT, "Increases chance for a critical hit"); 14 | } 15 | 16 | public void onEnable(){ 17 | OsirisMod.EVENT_BUS.subscribe(this); 18 | } 19 | 20 | public void onDisable(){ 21 | OsirisMod.EVENT_BUS.unsubscribe(this); 22 | } 23 | 24 | @EventHandler 25 | private Listener sendListener = new Listener<>(event -> { 26 | if (event.getPacket() instanceof CPacketUseEntity) { 27 | if(((CPacketUseEntity) event.getPacket()).getAction() == CPacketUseEntity.Action.ATTACK && mc.player.onGround) { 28 | mc.player.connection.sendPacket(new CPacketPlayer.Position(mc.player.posX, mc.player.posY + 0.1f, mc.player.posZ, false)); 29 | mc.player.connection.sendPacket(new CPacketPlayer.Position(mc.player.posX, mc.player.posY, mc.player.posZ, false)); 30 | } 31 | } 32 | }); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/ArmorHUD.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.module.Module; 5 | 6 | public class ArmorHUD extends Module { 7 | public ArmorHUD() { 8 | super("ArmorHUD", Category.GUI); 9 | rSetting(vertical = new Setting("Vertical", this, false, "ArmorHudVertical")); 10 | rSetting(reverse = new Setting("Reverse", this, true, "ArmorHudReverse")); 11 | } 12 | 13 | public Setting vertical; 14 | public Setting reverse; 15 | 16 | public void onEnable(){ 17 | disable(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Bps.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | public class Bps extends Module { 8 | public Bps() { 9 | super("BPS", Category.GUI); 10 | setDrawn(false); 11 | } 12 | 13 | public Setting red; 14 | public Setting green; 15 | public Setting blue; 16 | public Setting rainbow; 17 | public Setting customFont; 18 | 19 | public void setup(){ 20 | red = new Setting("Red", this, 255, 0, 255, true, "BlocksPerSecondRed"); 21 | green = new Setting("Green", this, 255, 0, 255, true, "BlocksPerSecondGreen"); 22 | blue = new Setting("Blue", this, 255, 0, 255, true, "BlocksPerSecondBlue"); 23 | OsirisMod.getInstance().settingsManager.rSetting(red); 24 | OsirisMod.getInstance().settingsManager.rSetting(green); 25 | OsirisMod.getInstance().settingsManager.rSetting(blue); 26 | rainbow = new Setting("Rainbow", this, false, "BlocksPerSecondRaiknbow"); 27 | OsirisMod.getInstance().settingsManager.rSetting(rainbow); 28 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "BlocksPerSecondCustomFont")); 29 | } 30 | 31 | public void onEnable(){ 32 | disable(); 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/ClickGuiModule.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.command.Command; 6 | import me.finz0.osiris.module.Module; 7 | import me.finz0.osiris.module.ModuleManager; 8 | import me.finz0.osiris.module.modules.chat.Announcer; 9 | import org.lwjgl.input.Keyboard; 10 | 11 | import java.util.ArrayList; 12 | 13 | public class ClickGuiModule extends Module { 14 | public ClickGuiModule INSTANCE; 15 | public ClickGuiModule() { 16 | super("ClickGUI", Category.GUI, "Opens the ClickGUI"); 17 | setBind(Keyboard.KEY_P); 18 | INSTANCE = this; 19 | } 20 | 21 | public void setup(){ 22 | ArrayList options = new ArrayList<>(); 23 | options.add("New"); 24 | options.add("JellyLike"); 25 | options.add("f0nzi"); 26 | options.add("Windows"); 27 | OsirisMod.getInstance().settingsManager.rSetting(new Setting("Design", this, "New", options, "ClickGuiDesign")); 28 | OsirisMod.getInstance().settingsManager.rSetting(new Setting("Rainbow", this, false, "ClickGuiRainbow")); 29 | OsirisMod.getInstance().settingsManager.rSetting(new Setting("Red", this, 255, 0, 255, true, "ClickGuiRed")); 30 | OsirisMod.getInstance().settingsManager.rSetting(new Setting("Green", this, 26, 0, 255, true, "ClickGuiGreen")); 31 | OsirisMod.getInstance().settingsManager.rSetting(new Setting("Blue", this, 42, 0, 255, true, "ClickGuiBlue")); 32 | rSetting(new Setting("Tooltips", this, true, "ClickGuiTooltips")); 33 | } 34 | 35 | public void onEnable(){ 36 | mc.displayGuiScreen(OsirisMod.getInstance().clickGui); 37 | if(((Announcer)ModuleManager.getModuleByName("Announcer")).clickGui.getValBoolean() && ModuleManager.isModuleEnabled("Announcer") && mc.player != null) 38 | if(((Announcer)ModuleManager.getModuleByName("Announcer")).clientSide.getValBoolean()){ 39 | Command.sendClientMessage(Announcer.guiMessage); 40 | } else { 41 | mc.player.sendChatMessage(Announcer.guiMessage); 42 | } 43 | disable(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Coords.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | import java.util.ArrayList; 8 | 9 | public class Coords extends Module { 10 | public Coords() { 11 | super("Coordinates", Category.GUI); 12 | setDrawn(false); 13 | } 14 | 15 | public Setting red; 16 | public Setting green; 17 | public Setting blue; 18 | public Setting rainbow; 19 | public Setting customFont; 20 | public Setting decimal; 21 | 22 | public void setup(){ 23 | ArrayList modes = new ArrayList<>(); 24 | modes.add("0"); 25 | modes.add("0.0"); 26 | modes.add("0.00"); 27 | modes.add("0.0#"); 28 | red = new Setting("Red", this, 255, 0, 255, true, "CoordinatesRed"); 29 | green = new Setting("Green", this, 255, 0, 255, true, "CoordinatesGreen"); 30 | blue = new Setting("Blue", this, 255, 0, 255, true, "CoordinatesBlue"); 31 | OsirisMod.getInstance().settingsManager.rSetting(red); 32 | OsirisMod.getInstance().settingsManager.rSetting(green); 33 | OsirisMod.getInstance().settingsManager.rSetting(blue); 34 | OsirisMod.getInstance().settingsManager.rSetting(rainbow = new Setting("Rainbow", this, false, "CoordinatesRainbow")); 35 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "CoordinatesCustomFont")); 36 | OsirisMod.getInstance().settingsManager.rSetting(decimal = new Setting("DecimalFormat", this, "0", modes, "CoordinatesDecimalFormat")); 37 | } 38 | 39 | public void onEnable(){ 40 | disable(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Crystals.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | import java.util.ArrayList; 7 | 8 | public class Crystals extends Module { 9 | public Crystals() { 10 | super("Crystals", Category.GUI); 11 | setDrawn(false); 12 | } 13 | 14 | public Setting red; 15 | public Setting green; 16 | public Setting blue; 17 | public Setting rainbow; 18 | public Setting customFont; 19 | public Setting mode; 20 | 21 | public void setup(){ 22 | ArrayList modes = new ArrayList<>(); 23 | modes.add("Short"); 24 | modes.add("Full"); 25 | modes.add("Item"); 26 | red = new Setting("Red", this, 255, 0, 255, true, "CrystalsRed"); 27 | green = new Setting("Green", this, 255, 0, 255, true, "CrystalsGreen"); 28 | blue = new Setting("Blue", this, 255, 0, 255, true, "CrystalsBlue"); 29 | OsirisMod.getInstance().settingsManager.rSetting(red); 30 | OsirisMod.getInstance().settingsManager.rSetting(green); 31 | OsirisMod.getInstance().settingsManager.rSetting(blue); 32 | OsirisMod.getInstance().settingsManager.rSetting(rainbow = new Setting("Rainbow", this, false, "CrystalsRainbow")); 33 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "CrystalsCustomFont")); 34 | OsirisMod.getInstance().settingsManager.rSetting(mode = new Setting("Mode", this, "Short", modes, "CrystalsMode")); 35 | } 36 | 37 | public void onEnable(){ 38 | disable(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/CsClickGuiModule.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.module.Module; 5 | import me.finz0.osiris.settings.Setting; 6 | 7 | public class CsClickGuiModule extends Module { 8 | public CsClickGuiModule() { 9 | super("CsClickGUI", Category.GUI); 10 | rSetting(new Setting("Rainbow", this, false, "CsGuiRainbow")); 11 | rSetting(new Setting("Red", this, 200, 0, 255, true, "CsGuiRed")); 12 | rSetting(new Setting("Green", this, 50, 0, 255, true, "CsGuiGreen")); 13 | rSetting(new Setting("Blue", this, 200, 0, 255, true, "CsGuiBlue")); 14 | rSetting(cfont = new Setting("CustomFont", this, false, "CsGuiCustomFont")); 15 | } 16 | 17 | public Setting cfont; 18 | 19 | public void onEnable(){ 20 | mc.displayGuiScreen(OsirisMod.getInstance().csGui); 21 | disable(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/CurrentHole.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.module.Module; 5 | 6 | import java.util.ArrayList; 7 | 8 | public class CurrentHole extends Module { 9 | public CurrentHole() { 10 | super("Hole", Category.GUI); 11 | ArrayList modes = new ArrayList<>(); 12 | modes.add("Texture"); 13 | modes.add("Block"); 14 | modes.add("Safe/Unsafe"); 15 | rSetting(mode = new Setting("Mode", this, "Block", modes, "CurrentHoleComponentMode")); 16 | rSetting(customFont = new Setting("CFont", this, false, "CurrentHoleComponentCustomFont")); 17 | } 18 | 19 | public Setting mode; 20 | public Setting customFont; 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Direction.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.module.Module; 5 | 6 | import java.awt.Color; 7 | import java.util.ArrayList; 8 | 9 | public class Direction extends Module { 10 | public Direction() { 11 | super("Direction", Category.GUI); 12 | ArrayList modes = new ArrayList<>(); 13 | modes.add("XZ"); 14 | modes.add("NSWE"); 15 | modes.add("Both"); 16 | rSetting(mode = new Setting("Mode", this, "XZ", modes, "DirectionMode")); 17 | rSetting(rainbow = new Setting("Rainbow", this, false, "DirectionRainbow")); 18 | rSetting(customFont = new Setting("CFont", this, false, "DirectionCustomFont")); 19 | rSetting(color = new Setting("Color", this, Color.WHITE, "DirectionColor")); 20 | } 21 | 22 | public Setting color; 23 | public Setting mode; 24 | public Setting rainbow; 25 | public Setting customFont; 26 | 27 | public void onEnable(){ 28 | disable(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Exp.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | import java.util.ArrayList; 7 | 8 | public class Exp extends Module { 9 | public Exp() { 10 | super("Exp", Category.GUI); 11 | setDrawn(false); 12 | } 13 | 14 | 15 | public Setting red; 16 | public Setting green; 17 | public Setting blue; 18 | public Setting rainbow; 19 | public Setting customFont; 20 | public Setting mode; 21 | 22 | public void setup(){ 23 | ArrayList modes = new ArrayList<>(); 24 | modes.add("Short"); 25 | modes.add("Full"); 26 | modes.add("Item"); 27 | red = new Setting("Red", this, 255, 0, 255, true, "ExperienceRed"); 28 | green = new Setting("Green", this, 255, 0, 255, true, "ExperienceGreen"); 29 | blue = new Setting("Blue", this, 255, 0, 255, true, "ExperienceBlue"); 30 | OsirisMod.getInstance().settingsManager.rSetting(red); 31 | OsirisMod.getInstance().settingsManager.rSetting(green); 32 | OsirisMod.getInstance().settingsManager.rSetting(blue); 33 | OsirisMod.getInstance().settingsManager.rSetting(rainbow = new Setting("Rainbow", this, false, "ExperienceRainbow")); 34 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "ExperienceCustomFont")); 35 | OsirisMod.getInstance().settingsManager.rSetting(mode = new Setting("Mode", this, "Short", modes, "ExperienceMode")); 36 | } 37 | 38 | public void onEnable(){ 39 | disable(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Fps.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | import java.awt.*; 8 | 9 | public class Fps extends Module { 10 | public Fps() { 11 | super("FPS", Category.GUI); 12 | setDrawn(false); 13 | } 14 | public Setting rainbow; 15 | public Setting customFont; 16 | public Setting color; 17 | 18 | public void setup(){ 19 | OsirisMod.getInstance().settingsManager.rSetting(rainbow = new Setting("Rainbow", this, false, "FpsRainbow")); 20 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "FpsCustomFont")); 21 | rSetting(color = new Setting("Color", this, Color.WHITE, "FpsColor")); 22 | } 23 | 24 | public void onEnable(){ 25 | disable(); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Gapples.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | import java.util.ArrayList; 7 | 8 | public class Gapples extends Module { 9 | public Gapples() { 10 | super("Gapples", Category.GUI); 11 | setDrawn(false); 12 | } 13 | 14 | 15 | public Setting red; 16 | public Setting green; 17 | public Setting blue; 18 | public Setting rainbow; 19 | public Setting customFont; 20 | public Setting mode; 21 | 22 | public void setup(){ 23 | ArrayList modes = new ArrayList<>(); 24 | modes.add("Short"); 25 | modes.add("Full"); 26 | modes.add("Item"); 27 | red = new Setting("Red", this, 255, 0, 255, true, "GapplesRed"); 28 | green = new Setting("Green", this, 255, 0, 255, true, "GapplesGreen"); 29 | blue = new Setting("Blue", this, 255, 0, 255, true, "GapplesBlue"); 30 | OsirisMod.getInstance().settingsManager.rSetting(red); 31 | OsirisMod.getInstance().settingsManager.rSetting(green); 32 | OsirisMod.getInstance().settingsManager.rSetting(blue); 33 | OsirisMod.getInstance().settingsManager.rSetting(rainbow = new Setting("Rainbow", this, false, "GapplesRainbow")); 34 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "GapplesCustomFont")); 35 | OsirisMod.getInstance().settingsManager.rSetting(mode = new Setting("Mode", this, "Short", modes, "GapplesMode")); 36 | } 37 | 38 | public void onEnable(){ 39 | disable(); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Ping.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | public class Ping extends Module { 8 | public Ping() { 9 | super("Ping", Category.GUI); 10 | setDrawn(false); 11 | } 12 | 13 | public Setting red; 14 | public Setting green; 15 | public Setting blue; 16 | public Setting rainbow; 17 | public Setting customFont; 18 | 19 | public void setup(){ 20 | red = new Setting("Red", this, 255, 0, 255, true, "PingRed"); 21 | green = new Setting("Green", this, 255, 0, 255, true, "PingGreen"); 22 | blue = new Setting("Blue", this, 255, 0, 255, true, "PingBlue"); 23 | OsirisMod.getInstance().settingsManager.rSetting(red); 24 | OsirisMod.getInstance().settingsManager.rSetting(green); 25 | OsirisMod.getInstance().settingsManager.rSetting(blue); 26 | OsirisMod.getInstance().settingsManager.rSetting(rainbow = new Setting("Rainbow", this, false, "PingRainbow")); 27 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "PingCustomFont")); 28 | } 29 | 30 | public int getPing(){ 31 | int p = -1; 32 | if(mc.player == null || mc.getConnection() == null || mc.getConnection().getPlayerInfo(mc.player.getName()) == null){ 33 | p = -1; 34 | } else { 35 | p = mc.getConnection().getPlayerInfo(mc.player.getName()).getResponseTime(); 36 | } 37 | return p; 38 | } 39 | 40 | public void onEnable(){ 41 | disable(); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/PvpInfo.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | public class PvpInfo extends Module { 8 | public PvpInfo() { 9 | super("PvpInfo", Category.GUI); 10 | setDrawn(false); 11 | } 12 | 13 | public Setting offRainbow; 14 | public Setting offR; 15 | public Setting offG; 16 | public Setting offB; 17 | public Setting onRainbow; 18 | public Setting onR; 19 | public Setting onG; 20 | public Setting onB; 21 | public Setting customFont; 22 | 23 | public void setup(){ 24 | OsirisMod.getInstance().settingsManager.rSetting(offRainbow = new Setting("OffRainbow", this, false, "PvpInfoOffRainbow")); 25 | OsirisMod.getInstance().settingsManager.rSetting(offR = new Setting("OffR", this, 255, 0, 255, true, "PvpInfoOffRed")); 26 | OsirisMod.getInstance().settingsManager.rSetting(offG = new Setting("OffG", this, 0, 0, 255, true, "PvpInfoOffGreen")); 27 | OsirisMod.getInstance().settingsManager.rSetting(offB = new Setting("OffB", this, 0, 0, 255, true, "PvpInfoOffBlue")); 28 | OsirisMod.getInstance().settingsManager.rSetting(onRainbow = new Setting("OnRainbow", this, false, "PvpInfoOnRainbow")); 29 | OsirisMod.getInstance().settingsManager.rSetting(onR = new Setting("OnR", this, 0, 0, 255, true, "PvpInfoOnRed")); 30 | OsirisMod.getInstance().settingsManager.rSetting(onG = new Setting("OnG", this, 255, 0, 255, true, "PvpInfoOnGreen")); 31 | OsirisMod.getInstance().settingsManager.rSetting(onB = new Setting("OnB", this, 0, 0, 255, true, "PvpInfoOnBlue")); 32 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "PvpInfoCustomFont")); 33 | } 34 | 35 | public void onEnable(){ 36 | disable(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Time.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | public class Time extends Module { 8 | public Time() { 9 | super("Time", Category.GUI); 10 | setDrawn(false); 11 | } 12 | 13 | public Setting red; 14 | public Setting green; 15 | public Setting blue; 16 | public Setting rainbow; 17 | public Setting customFont; 18 | 19 | public void setup(){ 20 | red = new Setting("Red", this, 255, 0, 255, true, "TimeRed"); 21 | green = new Setting("Green", this, 255, 0, 255, true, "TimeGreen"); 22 | blue = new Setting("Blue", this, 255, 0, 255, true, "TimeBlue"); 23 | OsirisMod.getInstance().settingsManager.rSetting(red); 24 | OsirisMod.getInstance().settingsManager.rSetting(green); 25 | OsirisMod.getInstance().settingsManager.rSetting(blue); 26 | OsirisMod.getInstance().settingsManager.rSetting(rainbow = new Setting("Rainbow", this, false, "TimeRainbow")); 27 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "TimeCustomFont")); 28 | } 29 | 30 | public void onEnable(){ 31 | disable(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Totems.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | import java.util.ArrayList; 7 | 8 | public class Totems extends Module { 9 | public Totems() { 10 | super("Totems", Category.GUI); 11 | setDrawn(false); 12 | } 13 | 14 | public Setting red; 15 | public Setting green; 16 | public Setting blue; 17 | public Setting rainbow; 18 | public Setting customFont; 19 | public Setting mode; 20 | 21 | public void setup(){ 22 | ArrayList modes = new ArrayList<>(); 23 | modes.add("Short"); 24 | modes.add("Full"); 25 | modes.add("Item"); 26 | red = new Setting("Red", this, 255, 0, 255, true, "TotemsRed"); 27 | green = new Setting("Green", this, 255, 0, 255, true, "TotemsGreen"); 28 | blue = new Setting("Blue", this, 255, 0, 255, true, "TotemsBlue"); 29 | OsirisMod.getInstance().settingsManager.rSetting(red); 30 | OsirisMod.getInstance().settingsManager.rSetting(green); 31 | OsirisMod.getInstance().settingsManager.rSetting(blue); 32 | OsirisMod.getInstance().settingsManager.rSetting(rainbow = new Setting("Rainbow", this, false, "TotemsRainbow")); 33 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "TotemsCustomFont")); 34 | OsirisMod.getInstance().settingsManager.rSetting(mode = new Setting("Mode", this, "Short", modes, "TotemsMode")); 35 | } 36 | 37 | public void onEnable(){ 38 | disable(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Tps.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | public class Tps extends Module { 8 | public static Tps INSTANCE; 9 | public Tps() { 10 | super("TPS", Category.GUI); 11 | setDrawn(false); 12 | INSTANCE = this; 13 | } 14 | 15 | 16 | 17 | public Setting red; 18 | public Setting green; 19 | public Setting blue; 20 | public Setting rainbow; 21 | public Setting customFont; 22 | 23 | public void setup(){ 24 | red = new Setting("Red", this, 255, 0, 255, true, "TpsRed"); 25 | green = new Setting("Green", this, 255, 0, 255, true, "TpsGreen"); 26 | blue = new Setting("Blue", this, 255, 0, 255, true, "TpsBlue"); 27 | OsirisMod.getInstance().settingsManager.rSetting(red); 28 | OsirisMod.getInstance().settingsManager.rSetting(green); 29 | OsirisMod.getInstance().settingsManager.rSetting(blue); 30 | OsirisMod.getInstance().settingsManager.rSetting(rainbow = new Setting("Rainbow", this, false, "TpsRainbow")); 31 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "TpsCustomFont")); 32 | } 33 | 34 | public void onEnable(){ 35 | disable(); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/Watermark.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | public class Watermark extends Module { 8 | public static Watermark INSTANCE; 9 | public Watermark() { 10 | super("Watermark", Category.GUI); 11 | setDrawn(false); 12 | INSTANCE = this; 13 | } 14 | 15 | public Setting red; 16 | public Setting green; 17 | public Setting blue; 18 | public Setting rainbow; 19 | public Setting customFont; 20 | public Setting version; 21 | 22 | public void setup(){ 23 | red = new Setting("Red", this, 255, 0, 255, true, "GuiWatermarkRed"); 24 | green = new Setting("Green", this, 255, 0, 255, true, "GuiWatermarkGreen"); 25 | blue = new Setting("Blue", this, 255, 0, 255, true, "GuiWatermarkBlue"); 26 | OsirisMod.getInstance().settingsManager.rSetting(red); 27 | OsirisMod.getInstance().settingsManager.rSetting(green); 28 | OsirisMod.getInstance().settingsManager.rSetting(blue); 29 | rainbow = new Setting("Rainbow", this, true, "GuiWatermarkRainbow"); 30 | OsirisMod.getInstance().settingsManager.rSetting(rainbow); 31 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CustomFont", this, true, "GuiWatermarkCustomFont")); 32 | rSetting(version = new Setting("Version", this, true, "GuiWatermarkVersionBoolean")); 33 | } 34 | 35 | public void onEnable(){ 36 | disable(); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/gui/WelcomerGui.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.gui; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | import java.util.ArrayList; 8 | 9 | 10 | public class WelcomerGui extends Module { 11 | public WelcomerGui() { 12 | super("Welcome", Category.GUI); 13 | setDrawn(false); 14 | } 15 | 16 | public Setting red; 17 | public Setting green; 18 | public Setting blue; 19 | public Setting rainbow; 20 | public Setting message; 21 | public Setting customFont; 22 | ArrayList messages; 23 | 24 | public void setup(){ 25 | messages = new ArrayList<>(); 26 | messages.add("Welcome1"); 27 | messages.add("Welcome2"); 28 | messages.add("Hello1"); 29 | messages.add("Hello2"); 30 | red = new Setting("Red", this, 255, 0, 255, true, "GuiWelcomeRed"); 31 | green = new Setting("Green", this, 255, 0, 255, true, "GuiWelcomeGreen"); 32 | blue = new Setting("Blue", this, 255, 0, 255, true, "GuiWelcomeBlue"); 33 | OsirisMod.getInstance().settingsManager.rSetting(red); 34 | OsirisMod.getInstance().settingsManager.rSetting(green); 35 | OsirisMod.getInstance().settingsManager.rSetting(blue); 36 | rainbow = new Setting("Rainbow", this, true, "GuiWelcomeRainbow"); 37 | OsirisMod.getInstance().settingsManager.rSetting(rainbow); 38 | OsirisMod.getInstance().settingsManager.rSetting(message = new Setting("Message", this, "Welcome1", messages, "GuiWelcomeMessageMode")); 39 | OsirisMod.getInstance().settingsManager.rSetting(customFont = new Setting("CFont", this, false, "GuiWelcomeCustomFont")); 40 | } 41 | 42 | public void onEnable(){ 43 | disable(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/AutoBackdoor.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | public class AutoBackdoor extends Module { 6 | public AutoBackdoor() { 7 | super("AutoBackdoor", Category.MISC, "Strong exploit"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/AutoRespawn.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.command.Command; 6 | import me.finz0.osiris.event.events.GuiScreenDisplayedEvent; 7 | import me.finz0.osiris.module.Module; 8 | import me.zero.alpine.listener.EventHandler; 9 | import me.zero.alpine.listener.Listener; 10 | import net.minecraft.client.gui.GuiGameOver; 11 | 12 | public class AutoRespawn extends Module { 13 | public AutoRespawn() { 14 | super("AutoRespawn", Category.MISC, "Respawn when you die"); 15 | } 16 | 17 | Setting coords; 18 | 19 | public void setup(){ 20 | OsirisMod.getInstance().settingsManager.rSetting(coords = new Setting("DeathCoords", this, true, "AutoRespawnDeathCoords")); 21 | } 22 | 23 | @EventHandler 24 | private Listener listener = new Listener<>(event -> { 25 | if(event.getScreen() instanceof GuiGameOver) { 26 | if(coords.getValBoolean()) 27 | Command.sendClientMessage(String.format("You died at x%d y%d z%d", (int)mc.player.posX, (int)mc.player.posY, (int)mc.player.posZ)); 28 | if(mc.player != null) 29 | mc.player.respawnPlayer(); 30 | mc.displayGuiScreen(null); 31 | } 32 | }); 33 | 34 | public void onEnable(){ 35 | OsirisMod.EVENT_BUS.subscribe(this); 36 | } 37 | 38 | public void onDisable(){ 39 | OsirisMod.EVENT_BUS.unsubscribe(this); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/BreakTweaks.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | public class BreakTweaks extends Module { 6 | public BreakTweaks() { 7 | super("BreakTweaks", Category.MISC, "Tweaks block breaking"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/ClinetTimer.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | import java.text.DecimalFormat; 8 | 9 | public class ClinetTimer extends Module { 10 | public ClinetTimer() { 11 | super("ClinetTimer", Category.MISC, "Clinet's TimerSwitch"); 12 | OsirisMod.getInstance().settingsManager.rSetting(speedUsual = new Setting("Speed", this, 4.2, 1, 10, false, "ClinetTimerSpeed")); 13 | OsirisMod.getInstance().settingsManager.rSetting(fastUsual = new Setting("FastSpeed", this, 10, 1, 1000, false, "ClinetTimerFastSpeed")); 14 | OsirisMod.getInstance().settingsManager.rSetting(tickToFast = new Setting("TickToFast", this, 4, 0, 20, false, "ClinetTimerTickToFast")); 15 | OsirisMod.getInstance().settingsManager.rSetting(tickToNoFast = new Setting("TickToDisableFast", this, 7, 0, 20, false, "ClinetTimerTickToNoFast")); 16 | } 17 | 18 | int tickWait = 0; 19 | float hudInfo = 0; 20 | Setting speedUsual; 21 | Setting fastUsual; 22 | Setting tickToFast; 23 | Setting tickToNoFast; 24 | 25 | 26 | 27 | public void onDisable() { 28 | mc.timer.tickLength = 50.0F; 29 | } 30 | 31 | public void onUpdate() { 32 | if ((float)tickWait == (float)tickToFast.getValDouble()) { 33 | mc.timer.tickLength = 50.0F / (float)fastUsual.getValDouble(); 34 | hudInfo = (float)fastUsual.getValDouble(); 35 | } 36 | 37 | if ((float)this.tickWait >= (float)tickToNoFast.getValDouble()) { 38 | this.tickWait = 0; 39 | mc.timer.tickLength = 50.0F / (float)speedUsual.getValDouble(); 40 | hudInfo = (float)speedUsual.getValDouble(); 41 | } 42 | 43 | ++this.tickWait; 44 | } 45 | 46 | public String getHudInfo(){ 47 | return new DecimalFormat("0.##").format(hudInfo); 48 | } 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/DeathWaypoint.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.GuiScreenDisplayedEvent; 5 | import me.finz0.osiris.module.Module; 6 | import me.finz0.osiris.waypoint.Waypoint; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | import net.minecraft.client.gui.GuiGameOver; 10 | 11 | import java.awt.*; 12 | 13 | public class DeathWaypoint extends Module { 14 | public DeathWaypoint() { 15 | super("DeathWaypoint", Category.MISC, "Makes a waypoint where you die"); 16 | } 17 | 18 | @EventHandler 19 | private Listener listener = new Listener<>(event -> { 20 | if (event.getScreen() instanceof GuiGameOver) { 21 | OsirisMod.getInstance().waypointManager.delWaypoint( OsirisMod.getInstance().waypointManager.getWaypointByName("Last Death")); 22 | OsirisMod.getInstance().waypointManager.addWaypoint(new Waypoint("Last Death", mc.player.posX, mc.player.posY, mc.player.posZ, Color.RED.getRGB())); 23 | } 24 | }); 25 | 26 | public void onEnable(){ 27 | OsirisMod.EVENT_BUS.subscribe(this); 28 | } 29 | 30 | public void onDisable(){ 31 | OsirisMod.EVENT_BUS.unsubscribe(this); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/MiddleClickFriends.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.command.Command; 6 | import me.finz0.osiris.module.Module; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | import net.minecraft.entity.player.EntityPlayer; 10 | import net.minecraft.util.math.RayTraceResult; 11 | import net.minecraftforge.fml.common.gameevent.InputEvent; 12 | import org.lwjgl.input.Mouse; 13 | 14 | public class MiddleClickFriends extends Module { 15 | public MiddleClickFriends() { 16 | super("MCF", Category.MISC, "Middle click players to add / remove them as a friend"); 17 | } 18 | 19 | @EventHandler 20 | private Listener listener = new Listener<>(event -> { 21 | if (mc.objectMouseOver.typeOfHit.equals(RayTraceResult.Type.ENTITY) && mc.objectMouseOver.entityHit instanceof EntityPlayer && Mouse.getEventButton() == 2) { 22 | if (OsirisMod.getInstance().friends.isFriend(mc.objectMouseOver.entityHit.getName())) { 23 | OsirisMod.getInstance().friends.delFriend(mc.objectMouseOver.entityHit.getName()); 24 | Command.sendClientMessage(ChatFormatting.RED + "Removed " + mc.objectMouseOver.entityHit.getName() + " from friends list"); 25 | } else { 26 | OsirisMod.getInstance().friends.addFriend(mc.objectMouseOver.entityHit.getName()); 27 | Command.sendClientMessage(ChatFormatting.GREEN + "Added " + mc.objectMouseOver.entityHit.getName() + " to friends list"); 28 | } 29 | } 30 | }); 31 | 32 | public void onEnable(){ 33 | OsirisMod.EVENT_BUS.subscribe(this); 34 | } 35 | 36 | public void onDisable(){ 37 | OsirisMod.EVENT_BUS.unsubscribe(this); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/NoEntityTrace.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import me.finz0.osiris.module.Module; 4 | import me.finz0.osiris.settings.Setting; 5 | import net.minecraft.item.ItemPickaxe; 6 | 7 | public class NoEntityTrace extends Module { 8 | public NoEntityTrace() { 9 | super("NoEntityTrace", Category.MISC); 10 | rSetting(pickaxeOnly = new Setting("PickaxeOnly", this, false, "NoEntityTracePickaxeOnly")); 11 | } 12 | 13 | Setting pickaxeOnly; 14 | 15 | boolean isHoldingPickaxe = false; 16 | 17 | public void onUpdate(){ 18 | isHoldingPickaxe = mc.player.getHeldItemMainhand().getItem() instanceof ItemPickaxe; 19 | } 20 | 21 | public boolean noTrace(){ 22 | if(pickaxeOnly.getValBoolean()) return isEnabled() && isHoldingPickaxe; 23 | return isEnabled(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/Notifications.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | import java.awt.*; 6 | 7 | public class Notifications extends Module { 8 | public Notifications() { 9 | super("Notifications", Category.MISC, "Desktop notifications"); 10 | } 11 | 12 | public static void sendNotification(String message, TrayIcon.MessageType messageType){ 13 | SystemTray tray = SystemTray.getSystemTray(); 14 | Image image = Toolkit.getDefaultToolkit().createImage("icon.png"); 15 | TrayIcon icon = new TrayIcon(image, "Osiris"); 16 | icon.setImageAutoSize(true); 17 | icon.setToolTip("Osiris"); 18 | try { tray.add(icon); } 19 | catch (AWTException e) { e.printStackTrace(); } 20 | icon.displayMessage("Osiris", message, messageType); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/RpcModule.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import me.finz0.osiris.OsirisRPC; 4 | import me.finz0.osiris.command.Command; 5 | import me.finz0.osiris.module.Module; 6 | 7 | public class RpcModule extends Module { 8 | public RpcModule() { 9 | super("DiscordRPC", Category.MISC, "Discord Rich Presence"); 10 | setDrawn(false); 11 | } 12 | 13 | public void onEnable(){ 14 | OsirisRPC.init(); 15 | if(mc.player != null) 16 | Command.sendClientMessage("discord rpc started"); 17 | } 18 | 19 | public void onDisable(){ 20 | Command.sendClientMessage("you need to restart your game disable rpc"); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/SnakeModule.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import me.finz0.osiris.module.Module; 4 | import me.finz0.osiris.util.snake.Board; 5 | 6 | import java.awt.EventQueue; 7 | import javax.swing.JFrame; 8 | 9 | public class SnakeModule extends Module { 10 | public SnakeModule() { 11 | super("Snake", Category.MISC, "Play snake"); 12 | } 13 | 14 | public void onEnable(){ 15 | EventQueue.invokeLater(() -> { 16 | JFrame ex = new Snake(); 17 | ex.setVisible(true); 18 | }); 19 | disable(); 20 | } 21 | 22 | public class Snake extends JFrame { 23 | 24 | public Snake() { 25 | 26 | initUI(); 27 | } 28 | 29 | private void initUI() { 30 | 31 | add(new Board()); 32 | 33 | setResizable(false); 34 | pack(); 35 | 36 | setTitle("Osiris Snake"); 37 | setLocationRelativeTo(null); 38 | setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/Timer.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | import me.finz0.osiris.util.TpsUtils; 7 | 8 | import java.text.DecimalFormat; 9 | 10 | public class Timer extends Module { 11 | public static Timer INSTANCE; 12 | public Timer() { 13 | super("Timer", Category.MISC, "Change client tps"); 14 | INSTANCE = this; 15 | } 16 | 17 | Setting tpsSync; 18 | Setting multiplier; 19 | 20 | public void setup(){ 21 | tpsSync = new Setting("TpsSync", this, true, "TimerTpsSync"); 22 | OsirisMod.getInstance().settingsManager.rSetting(tpsSync); 23 | multiplier = new Setting("Multiplier", this, 5.0, 0.1, 20.0, false, "TimerMultiplier"); 24 | OsirisMod.getInstance().settingsManager.rSetting(multiplier); 25 | } 26 | 27 | public void onUpdate(){ 28 | mc.timer.tickLength = 50f / getMultiplier(); 29 | } 30 | 31 | public void onDisable(){ 32 | mc.timer.tickLength = 50f; 33 | } 34 | 35 | public float getMultiplier() { 36 | if (this.isEnabled()) { 37 | if (tpsSync.getValBoolean()) { 38 | float f = TpsUtils.getTickRate() / 20 * (float)multiplier.getValDouble(); 39 | if(f < 0.1f) f = 0.1f; 40 | return f; 41 | } else { 42 | return (float)multiplier.getValDouble(); 43 | } 44 | } else { 45 | return 1.0f; 46 | } 47 | } 48 | 49 | public String getHudInfo(){ 50 | return new DecimalFormat("#0.##").format(getMultiplier()); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/misc/XCarry.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.misc; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.PacketEvent; 5 | import me.finz0.osiris.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraft.network.play.client.*; 9 | 10 | public class XCarry extends Module { 11 | public XCarry() { 12 | super("XCarry", Category.MISC, "lets you carry items in your crafting slots"); 13 | } 14 | 15 | @EventHandler 16 | private Listener listener = new Listener<>(event -> { 17 | if(event.getPacket() instanceof CPacketCloseWindow){ 18 | if(((CPacketCloseWindow)event.getPacket()).windowId == mc.player.inventoryContainer.windowId){ 19 | event.cancel(); 20 | } 21 | } 22 | }); 23 | 24 | public void onEnable(){ 25 | OsirisMod.EVENT_BUS.subscribe(this); 26 | } 27 | 28 | public void onDisable(){ 29 | OsirisMod.EVENT_BUS.unsubscribe(this); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/movement/ElytraFly.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.movement; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | //this is from kami blue or somethin idk 8 | public class ElytraFly extends Module { 9 | public ElytraFly() { 10 | super("ElytraFly", Category.MOVEMENT); 11 | } 12 | 13 | Setting speed; 14 | 15 | public void setup(){ 16 | OsirisMod.getInstance().settingsManager.rSetting(speed = new Setting("Speed", this, 1.8, 0, 100, false, "ElytraFlySpeed")); 17 | } 18 | 19 | public void onUpdate(){ 20 | if(mc.player.capabilities.isFlying || mc.player.isElytraFlying()) 21 | mc.player.setSprinting(false); 22 | if (mc.player.capabilities.isFlying) { 23 | mc.player.setVelocity(0, 0, 0); 24 | mc.player.setPosition(mc.player.posX, mc.player.posY - 0.000050000002f, mc.player.posZ); 25 | mc.player.capabilities.setFlySpeed((float)speed.getValDouble()); 26 | mc.player.setSprinting(false); 27 | } 28 | 29 | if (mc.player.onGround) { 30 | mc.player.capabilities.allowFlying = false; 31 | } 32 | 33 | if (mc.player.isElytraFlying()) { 34 | mc.player.capabilities.setFlySpeed(.915f); 35 | mc.player.capabilities.isFlying = true; 36 | 37 | if (!mc.player.capabilities.isCreativeMode) 38 | mc.player.capabilities.allowFlying = true; 39 | } 40 | } 41 | 42 | protected void onDisable() { 43 | mc.player.capabilities.isFlying = false; 44 | mc.player.capabilities.setFlySpeed(0.05f); 45 | if (!mc.player.capabilities.isCreativeMode) 46 | mc.player.capabilities.allowFlying = false; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/movement/GuiMove.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.movement; 2 | 3 | import me.finz0.osiris.module.Module; 4 | import net.minecraft.client.gui.GuiChat; 5 | import org.lwjgl.input.Keyboard; 6 | 7 | public class GuiMove extends Module { 8 | public GuiMove() { 9 | super("GuiMove", Category.MOVEMENT, "Let's you move in GUIs, look around with arrow keys"); 10 | } 11 | 12 | public void onUpdate(){ 13 | if(mc.currentScreen != null && !(mc.currentScreen instanceof GuiChat)) { 14 | if (Keyboard.isKeyDown(200)) { 15 | mc.player.rotationPitch -= 5; 16 | 17 | } 18 | if (Keyboard.isKeyDown(208)) { 19 | mc.player.rotationPitch += 5; 20 | } 21 | if (Keyboard.isKeyDown(205)) { 22 | mc.player.rotationYaw += 5; 23 | } 24 | if (Keyboard.isKeyDown(203)) { 25 | mc.player.rotationYaw -= 5; 26 | } 27 | if (mc.player.rotationPitch > 90) mc.player.rotationPitch = 90; 28 | if (mc.player.rotationPitch < -90) mc.player.rotationPitch = -90; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/movement/Jesus.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.movement; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | 6 | public class Jesus extends Module { 7 | public Jesus() { 8 | super("Jesus", Category.MOVEMENT, "Walk on water, changing water to wine not implemented yet"); 9 | } 10 | 11 | public void onUpdate(){ 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/movement/NoPush.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.movement; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | public class NoPush extends Module { 6 | public NoPush() { 7 | super("NoPush", Category.MOVEMENT, "Don't get pushed by entities"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/movement/NoSlow.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.movement; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.module.Module; 5 | import me.zero.alpine.listener.EventHandler; 6 | import me.zero.alpine.listener.Listener; 7 | import net.minecraftforge.client.event.InputUpdateEvent; 8 | 9 | public class NoSlow extends Module { 10 | public NoSlow() { 11 | super("NoSlow", Category.MOVEMENT, "Prevents item use form slowing you down"); 12 | } 13 | 14 | @EventHandler 15 | private Listener eventListener = new Listener<>(event -> { 16 | if (mc.player.isHandActive() && !mc.player.isRiding()) { 17 | event.getMovementInput().moveStrafe *= 5; 18 | event.getMovementInput().moveForward *= 5; 19 | } 20 | }); 21 | 22 | public void onEnable(){ 23 | OsirisMod.EVENT_BUS.subscribe(this); 24 | } 25 | 26 | public void onDisable(){ 27 | OsirisMod.EVENT_BUS.unsubscribe(this); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/movement/Sprint.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.movement; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | public class Sprint extends Module { 6 | public Sprint() { 7 | super("Sprint", Category.MOVEMENT, "Automatically sprint"); 8 | } 9 | 10 | public void onUpdate(){ 11 | if(mc.player.moveForward > 0 && !mc.player.isSprinting()){ 12 | mc.player.setSprinting(true); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/movement/Velocity.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.movement; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.PacketEvent; 5 | import me.finz0.osiris.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraft.network.play.server.SPacketEntityVelocity; 9 | import net.minecraft.network.play.server.SPacketExplosion; 10 | 11 | public class Velocity extends Module { 12 | public Velocity() { 13 | super("Velocity", Category.MOVEMENT, "Prevents you from taking knockback"); 14 | } 15 | 16 | public void onEnable(){ 17 | OsirisMod.EVENT_BUS.subscribe(this); 18 | } 19 | 20 | public void onDisable(){ 21 | OsirisMod.EVENT_BUS.unsubscribe(this); 22 | } 23 | 24 | @EventHandler 25 | private Listener receiveListener = new Listener<>(event -> { 26 | if(event.getPacket() instanceof SPacketEntityVelocity){ 27 | if(((SPacketEntityVelocity) event.getPacket()).getEntityID() == mc.player.getEntityId()) 28 | event.cancel(); 29 | } 30 | if(event.getPacket() instanceof SPacketExplosion) 31 | event.cancel(); 32 | }); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/player/Blink.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.player; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.PacketEvent; 5 | import me.finz0.osiris.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraft.client.entity.EntityOtherPlayerMP; 9 | import net.minecraft.network.Packet; 10 | import net.minecraft.network.play.client.*; 11 | 12 | import java.util.Queue; 13 | import java.util.concurrent.ConcurrentLinkedQueue; 14 | 15 | //seppuku skid, dont care enough to rewrite 16 | public class Blink extends Module { 17 | public Blink() { 18 | super("Blink", Category.PLAYER, "Cancels most packets"); 19 | } 20 | EntityOtherPlayerMP entity; 21 | private final Queue packets = new ConcurrentLinkedQueue<>(); 22 | @EventHandler 23 | private Listener packetSendListener = new Listener<>(event -> { 24 | Packet packet = event.getPacket(); 25 | if (packet instanceof CPacketChatMessage || packet instanceof CPacketConfirmTeleport || packet instanceof CPacketKeepAlive || packet instanceof CPacketTabComplete || packet instanceof CPacketClientStatus) { 26 | return; 27 | } 28 | packets.add(packet); 29 | event.cancel(); 30 | }); 31 | 32 | public void onEnable() { 33 | OsirisMod.EVENT_BUS.subscribe(this); 34 | entity = new EntityOtherPlayerMP(mc.world, mc.getSession().getProfile()); 35 | entity.copyLocationAndAnglesFrom(mc.player); 36 | entity.rotationYaw = mc.player.rotationYaw; 37 | entity.rotationYawHead = mc.player.rotationYawHead; 38 | mc.world.addEntityToWorld(666, entity); 39 | } 40 | 41 | public void onDisable() { 42 | OsirisMod.EVENT_BUS.unsubscribe(this); 43 | if (this.entity != null) { 44 | mc.world.removeEntity(entity); 45 | } 46 | if (this.packets.size() > 0) { 47 | for (Packet packet : this.packets) { 48 | mc.player.connection.sendPacket(packet); 49 | } 50 | this.packets.clear(); 51 | } 52 | } 53 | 54 | public String getHudInfo(){ 55 | return "" + packets.size(); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/player/FastUse.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.player; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | import net.minecraft.init.Items; 8 | 9 | public class FastUse extends Module { 10 | public FastUse() { 11 | super("FastUse", Category.PLAYER, "Sets right click / block break delay to 0"); 12 | } 13 | 14 | Setting xp; 15 | Setting crystals; 16 | Setting all; 17 | Setting breakS; 18 | 19 | public void setup(){ 20 | xp = new Setting( "EXP", this, true, "FastUseEXP"); 21 | OsirisMod.getInstance().settingsManager.rSetting(xp); 22 | crystals = new Setting("Crystals", this, true, "FastUseCrystals"); 23 | OsirisMod.getInstance().settingsManager.rSetting(crystals); 24 | all = new Setting("Everything", this, false, "FastUseEverything"); 25 | OsirisMod.getInstance().settingsManager.rSetting(all); 26 | breakS = new Setting("FastBreak", this, true, "FastUseFastBreak"); 27 | OsirisMod.getInstance().settingsManager.rSetting(breakS); 28 | } 29 | 30 | public void onUpdate() { 31 | if(xp.getValBoolean()) { 32 | if (mc.player != null && (mc.player.getHeldItemMainhand().getItem() == Items.EXPERIENCE_BOTTLE || mc.player.getHeldItemOffhand().getItem() == Items.EXPERIENCE_BOTTLE)) { 33 | mc.rightClickDelayTimer = 0; 34 | } 35 | } 36 | 37 | if(crystals.getValBoolean()) { 38 | if (mc.player != null && (mc.player.getHeldItemMainhand().getItem() == Items.END_CRYSTAL || mc.player.getHeldItemOffhand().getItem() == Items.END_CRYSTAL)) { 39 | mc.rightClickDelayTimer = 0; 40 | } 41 | } 42 | 43 | if(all.getValBoolean()) { 44 | mc.rightClickDelayTimer = 0; 45 | } 46 | 47 | if(breakS.getValBoolean()){ 48 | mc.playerController.blockHitDelay = 0; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/player/Freecam.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.player; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.PacketEvent; 5 | import me.finz0.osiris.module.Module; 6 | import me.finz0.osiris.settings.Setting; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | import net.minecraft.client.entity.EntityOtherPlayerMP; 10 | import net.minecraft.network.play.client.CPacketPlayer; 11 | 12 | public class Freecam extends Module { 13 | public Freecam() { 14 | super("Freecam", Category.PLAYER); 15 | rSetting(speed = new Setting("Speed", this, 1, 0.1, 10, false, "FreecamSpeed")); 16 | } 17 | 18 | Setting speed; 19 | 20 | EntityOtherPlayerMP entity; 21 | boolean oldOnGround; 22 | boolean oldNoClip; 23 | double x; 24 | double y; 25 | double z; 26 | 27 | 28 | public void onEnable(){ 29 | disable(); 30 | OsirisMod.EVENT_BUS.subscribe(this); 31 | entity = new EntityOtherPlayerMP(mc.world, mc.getSession().getProfile()); 32 | entity.copyLocationAndAnglesFrom(mc.player); 33 | entity.rotationYaw = mc.player.rotationYaw; 34 | entity.rotationYawHead = mc.player.rotationYawHead; 35 | mc.world.addEntityToWorld(696984837, entity); 36 | 37 | oldOnGround = mc.player.onGround; 38 | oldNoClip = mc.player.noClip; 39 | x = mc.player.posX; 40 | y = mc.player.posY; 41 | z = mc.player.posZ; 42 | } 43 | 44 | public void onDisable(){ 45 | /* 46 | OsirisMod.EVENT_BUS.unsubscribe(this); 47 | if (this.entity != null) { 48 | mc.world.removeEntity(entity); 49 | } 50 | 51 | mc.player.onGround = oldOnGround; 52 | mc.player.noClip = oldNoClip; 53 | mc.player.posX = x; 54 | mc.player.posY = y; 55 | mc.player.posZ = z; 56 | */ 57 | } 58 | 59 | public void onUpdate(){ 60 | //mc.player.onGround = true; 61 | mc.player.noClip = true; 62 | if(mc.player.movementInput.jump){ 63 | mc.player.motionY = speed.getValDouble() / 10; 64 | } else if(mc.player.movementInput.sneak){ 65 | mc.player.motionY = -(speed.getValDouble() / 10); 66 | } else { 67 | mc.player.motionY = 0; 68 | } 69 | 70 | if (mc.player.movementInput.moveStrafe != 0 || mc.player.movementInput.moveForward != 0) { 71 | mc.player.motionX = speed.getValDouble(); 72 | mc.player.motionZ = speed.getValDouble(); 73 | } else { 74 | mc.player.motionX = 0; 75 | mc.player.motionZ = 0; 76 | } 77 | } 78 | 79 | @EventHandler 80 | private Listener packetSendListener = new Listener<>(event -> { 81 | if(event.getPacket() instanceof CPacketPlayer){ 82 | event.cancel(); 83 | } 84 | }); 85 | 86 | 87 | 88 | } 89 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/player/NoInteract.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.player; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.PacketEvent; 5 | import me.finz0.osiris.module.Module; 6 | import me.finz0.osiris.settings.Setting; 7 | import me.zero.alpine.listener.EventHandler; 8 | import me.zero.alpine.listener.Listener; 9 | import net.minecraft.block.BlockContainer; 10 | import net.minecraft.network.play.client.CPacketEntityAction; 11 | import net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock; 12 | import net.minecraft.util.math.BlockPos; 13 | 14 | public class NoInteract extends Module { 15 | public NoInteract() { 16 | super("NoInteract", Category.PLAYER, "Prevents opening containers"); 17 | rSetting(containerOnly = new Setting("ContainerOnly", this, false, "NoIteractContainerOnly")); 18 | } 19 | 20 | private Setting containerOnly; 21 | private boolean shouldStop = false; 22 | 23 | @EventHandler 24 | private Listener sendListener = new Listener<>(event -> { 25 | if(event.getPacket() instanceof CPacketPlayerTryUseItemOnBlock && !mc.player.isSneaking()) { 26 | 27 | CPacketPlayerTryUseItemOnBlock packet = ((CPacketPlayerTryUseItemOnBlock) event.getPacket()); 28 | BlockPos pos = packet.getPos(); 29 | 30 | if(containerOnly.getValBoolean() && !(mc.world.getBlockState(pos).getBlock() instanceof BlockContainer)) return; 31 | 32 | mc.player.connection.sendPacket(new CPacketEntityAction(mc.player, CPacketEntityAction.Action.START_SNEAKING)); 33 | shouldStop = true; 34 | } 35 | }); 36 | 37 | @EventHandler 38 | private Listener postSendListener = new Listener<>(event -> { 39 | if(event.getPacket() instanceof CPacketPlayerTryUseItemOnBlock && shouldStop) { 40 | 41 | CPacketPlayerTryUseItemOnBlock packet = ((CPacketPlayerTryUseItemOnBlock) event.getPacket()); 42 | BlockPos pos = packet.getPos(); 43 | 44 | if(containerOnly.getValBoolean() && !(mc.world.getBlockState(pos).getBlock() instanceof BlockContainer)) return; 45 | 46 | mc.player.connection.sendPacket(new CPacketEntityAction(mc.player, CPacketEntityAction.Action.STOP_SNEAKING)); 47 | shouldStop = false; 48 | } 49 | }); 50 | 51 | public void onEnable(){ 52 | OsirisMod.EVENT_BUS.subscribe(this); 53 | } 54 | 55 | public void onDisable(){ 56 | OsirisMod.EVENT_BUS.unsubscribe(this); 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/player/NoSwing.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.player; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.PacketEvent; 5 | import me.finz0.osiris.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraft.network.play.client.CPacketAnimation; 9 | 10 | public class NoSwing extends Module { 11 | public NoSwing() { 12 | super("NoSwing", Category.PLAYER, "Prevents swinging animation server side"); 13 | } 14 | 15 | @EventHandler 16 | public Listener listener = new Listener<>(event -> { 17 | if (event.getPacket() instanceof CPacketAnimation) { 18 | event.cancel(); 19 | } 20 | }); 21 | 22 | public void onEnable(){ 23 | OsirisMod.EVENT_BUS.subscribe(this); 24 | } 25 | 26 | public void onDisable(){ 27 | OsirisMod.EVENT_BUS.unsubscribe(this); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/player/PortalGodMode.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.player; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.PacketEvent; 5 | import me.finz0.osiris.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraft.network.play.client.CPacketConfirmTeleport; 9 | 10 | public class PortalGodMode extends Module { 11 | public PortalGodMode() { 12 | super("PortalGodmode", Category.PLAYER, "Godmode when you go through a portal"); 13 | } 14 | 15 | public void onEnable() { 16 | OsirisMod.EVENT_BUS.subscribe(this); 17 | } 18 | 19 | public void onDisable() { 20 | OsirisMod.EVENT_BUS.unsubscribe(this); 21 | } 22 | 23 | @EventHandler 24 | private Listener listener = new Listener<>(event -> { 25 | if(event.getPacket() instanceof CPacketConfirmTeleport) 26 | event.cancel(); 27 | }); 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/player/SpeedMine.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.player; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | public class SpeedMine extends Module { 6 | public SpeedMine() { 7 | super("SpeedMine", Category.PLAYER, "Mine blocks faster"); 8 | } 9 | 10 | public void onUpdate(){ 11 | if(mc.playerController.curBlockDamageMP >= 0) 12 | mc.playerController.curBlockDamageMP = 1; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/render/BlockHighlight.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.render; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.event.events.RenderEvent; 6 | import me.finz0.osiris.module.Module; 7 | import me.finz0.osiris.util.OsirisTessellator; 8 | import me.finz0.osiris.util.Rainbow; 9 | import net.minecraft.block.material.Material; 10 | import net.minecraft.util.math.AxisAlignedBB; 11 | import net.minecraft.util.math.BlockPos; 12 | import net.minecraft.util.math.RayTraceResult; 13 | 14 | import java.awt.*; 15 | 16 | public class BlockHighlight extends Module { 17 | public BlockHighlight() { 18 | super("BlockHighlight", Category.RENDER, "Highlights the block you're looking at"); 19 | } 20 | 21 | Setting r; 22 | Setting g; 23 | Setting b; 24 | Setting a; 25 | Setting w; 26 | Setting rainbow; 27 | 28 | public void setup(){ 29 | r = new Setting("Red", this, 255, 0, 255, true, "BlockHighlightRed"); 30 | OsirisMod.getInstance().settingsManager.rSetting(r); 31 | g = new Setting("Green", this, 255, 0, 255, true, "BlockHighlightGreen"); 32 | OsirisMod.getInstance().settingsManager.rSetting(g); 33 | b = new Setting("Blue", this, 255, 0, 255, true, "BlockHighlightBlue"); 34 | OsirisMod.getInstance().settingsManager.rSetting(b); 35 | a = new Setting("Alpha", this, 255, 0, 255, true, "BlockHighlightAlpha"); 36 | OsirisMod.getInstance().settingsManager.rSetting(a); 37 | w = new Setting("Width", this, 1, 1, 10, true, "BlockHighlightWidth"); 38 | OsirisMod.getInstance().settingsManager.rSetting(w); 39 | OsirisMod.getInstance().settingsManager.rSetting(rainbow = new Setting("Rainbow", this, false, "BlockHighlightRainbow")); 40 | } 41 | 42 | public void onWorldRender(RenderEvent event){ 43 | RayTraceResult ray = mc.objectMouseOver; 44 | AxisAlignedBB bb; 45 | BlockPos pos; 46 | Color c; 47 | Color color = Rainbow.getColor(); 48 | if(rainbow.getValBoolean()) 49 | c = new Color(color.getRed(), color.getGreen(), color.getBlue(), (int)a.getValDouble()); 50 | else 51 | c = new Color((int)r.getValDouble(), (int)g.getValDouble(), (int)b.getValDouble(), (int)a.getValDouble()); 52 | if(ray != null && ray.typeOfHit == RayTraceResult.Type.BLOCK){ 53 | pos = ray.getBlockPos(); 54 | bb = mc.world.getBlockState(pos).getSelectedBoundingBox(mc.world, pos); 55 | if(bb != null && pos != null && mc.world.getBlockState(pos).getMaterial() != Material.AIR){ 56 | OsirisTessellator.prepareGL(); 57 | OsirisTessellator.drawBoundingBox(bb, (int)w.getValDouble(), c.getRGB()); 58 | OsirisTessellator.releaseGL(); 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/render/Brightness.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.render; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | public class Brightness extends Module { 6 | public Brightness() { 7 | super("Brightness", Category.RENDER, "Lets you see shit when it's dark"); 8 | } 9 | 10 | float old; 11 | 12 | public void onEnable(){ 13 | old = mc.gameSettings.gammaSetting; 14 | } 15 | 16 | public void onUpdate(){ 17 | mc.gameSettings.gammaSetting = 666f; 18 | } 19 | 20 | public void onDisable(){ 21 | mc.gameSettings.gammaSetting = old; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/render/CameraClip.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.render; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | public class CameraClip extends Module { 6 | public CameraClip() { 7 | super("CameraClip", Category.RENDER, "makes the third person camera clip through blocks"); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/render/CapesModule.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.render; 2 | 3 | import me.finz0.osiris.module.Module; 4 | 5 | public class CapesModule extends Module { 6 | public CapesModule() { 7 | super("Capes", Category.RENDER); 8 | setEnabled(true); 9 | setDrawn(false); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/render/FovModule.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.render; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | 7 | public class FovModule extends Module { 8 | public FovModule() { 9 | super("FOV", Category.RENDER, "Changes your fov"); 10 | OsirisMod.getInstance().settingsManager.rSetting(fov = new Setting("Value", this, 90, 0, 180, true, "FovModValue")); 11 | setDrawn(false); 12 | } 13 | 14 | Setting fov; 15 | 16 | public void onUpdate(){ 17 | mc.gameSettings.fovSetting = (float)fov.getValInt(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/render/LowHands.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.render; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | import net.minecraft.client.renderer.ItemRenderer; 7 | 8 | public class LowHands extends Module { 9 | public LowHands() { 10 | super("LowOffhand", Category.RENDER, "Makes the item in your offhand not take up half of your screen"); 11 | } 12 | Setting off; 13 | ItemRenderer itemRenderer = mc.entityRenderer.itemRenderer; 14 | 15 | public void setup(){ 16 | off = new Setting("Height", this, 0.5, 0, 1, false, "LowOffhandHeight"); 17 | OsirisMod.getInstance().settingsManager.rSetting(off); 18 | } 19 | 20 | public void onUpdate(){ 21 | itemRenderer.equippedProgressOffHand = (float)off.getValDouble(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/render/NoRender.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.render; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.module.Module; 6 | import me.zero.alpine.listener.EventHandler; 7 | import me.zero.alpine.listener.Listener; 8 | import net.minecraft.init.MobEffects; 9 | import net.minecraftforge.client.event.RenderBlockOverlayEvent; 10 | 11 | public class NoRender extends Module { 12 | public NoRender() { 13 | super("NoRender", Category.RENDER, "Prevents rendering some things"); 14 | } 15 | 16 | public Setting armor; 17 | Setting fire; 18 | Setting blind; 19 | Setting nausea; 20 | public Setting hurtCam; 21 | 22 | public void setup(){ 23 | OsirisMod.getInstance().settingsManager.rSetting(armor = new Setting("Armor", this, false, "NoRenderArmor")); 24 | OsirisMod.getInstance().settingsManager.rSetting(fire = new Setting("Fire", this, false, "NoRenderFire")); 25 | OsirisMod.getInstance().settingsManager.rSetting(blind = new Setting("Blindness", this, false, "NoRenderBlindnessEffect")); 26 | OsirisMod.getInstance().settingsManager.rSetting(nausea = new Setting("Nausea", this, false, "NoRenderNauseaEffect")); 27 | OsirisMod.getInstance().settingsManager.rSetting(hurtCam = new Setting("HurtCam", this, false, "NoRenderHurtCamera")); 28 | } 29 | 30 | public void onUpdate(){ 31 | if(blind.getValBoolean() && mc.player.isPotionActive(MobEffects.BLINDNESS)) mc.player.removePotionEffect(MobEffects.BLINDNESS); 32 | if(nausea.getValBoolean() && mc.player.isPotionActive(MobEffects.NAUSEA)) mc.player.removePotionEffect(MobEffects.NAUSEA); 33 | } 34 | 35 | @EventHandler 36 | public Listener blockOverlayEventListener = new Listener<>(event -> { 37 | if(fire.getValBoolean() && event.getOverlayType() == RenderBlockOverlayEvent.OverlayType.FIRE) event.setCanceled(true); 38 | }); 39 | 40 | public void onEnable(){ 41 | OsirisMod.EVENT_BUS.subscribe(this); 42 | } 43 | 44 | public void onDisable(){ 45 | OsirisMod.EVENT_BUS.unsubscribe(this); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/render/ShulkerPreview.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.render; 2 | 3 | import me.finz0.osiris.module.Module; 4 | import net.minecraft.item.ItemStack; 5 | import net.minecraft.nbt.NBTTagCompound; 6 | import org.lwjgl.input.Keyboard; 7 | 8 | public class ShulkerPreview extends Module { 9 | public ShulkerPreview() { 10 | super("ShulkerPreview", Category.RENDER, "Show shulker contents when you hover over them"); 11 | } 12 | 13 | public static boolean pinned = false; 14 | public static int drawX = 0; 15 | public static int drawY = 0; 16 | public static NBTTagCompound nbt; 17 | public static ItemStack itemStack; 18 | public static boolean active; 19 | public static int mouseX = 0; 20 | public static int mouseY = 0; 21 | public static int guiLeft = 0; 22 | public static int guiTop = 0; 23 | 24 | public void onUpdate(){ 25 | if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) pinned = false; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/render/StorageESP.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.render; 2 | 3 | import me.finz0.osiris.settings.Setting; 4 | import me.finz0.osiris.OsirisMod; 5 | import me.finz0.osiris.event.events.RenderEvent; 6 | import me.finz0.osiris.module.Module; 7 | import me.finz0.osiris.util.OsirisTessellator; 8 | import net.minecraft.tileentity.*; 9 | 10 | import java.awt.*; 11 | import java.util.concurrent.ConcurrentHashMap; 12 | 13 | public class StorageESP extends Module { 14 | public StorageESP() { 15 | super("StorageESP", Category.RENDER, "Highlight chests and stuff"); 16 | } 17 | 18 | Setting a; 19 | Setting w; 20 | 21 | ConcurrentHashMap chests = new ConcurrentHashMap<>(); 22 | 23 | public void setup(){ 24 | a = new Setting("Alpha", this, 150, 0, 255, true, "StorageESPAlpha"); 25 | OsirisMod.getInstance().settingsManager.rSetting(a); 26 | w = new Setting("Width", this, 1, 1, 10, true, "StorageESPWidth"); 27 | OsirisMod.getInstance().settingsManager.rSetting(w); 28 | } 29 | 30 | public void onUpdate(){ 31 | mc.world.loadedTileEntityList.forEach(e->{ 32 | chests.put(e, ""); 33 | }); 34 | } 35 | 36 | public void onWorldRender(RenderEvent event){ 37 | Color c1 = new Color(200, 100, 0, (int)a.getValDouble()); 38 | Color c2 = new Color(200, 0, 200, (int)a.getValDouble()); 39 | Color c3 = new Color(150, 150, 150, (int)a.getValDouble()); 40 | if(chests != null && chests.size() > 0){ 41 | OsirisTessellator.prepareGL(); 42 | chests.forEach((c, t)->{ 43 | if(mc.world.loadedTileEntityList.contains(c)) { 44 | if(c instanceof TileEntityChest 45 | || c instanceof TileEntityShulkerBox) 46 | //OsirisTessellator.drawBox(c.getPos(), c1.getRGB(), GeometryMasks.Quad.ALL); 47 | OsirisTessellator.drawBoundingBox(mc.world.getBlockState(c.getPos()).getSelectedBoundingBox(mc.world, c.getPos()), (float)w.getValDouble(), c1.getRGB()); 48 | if(c instanceof TileEntityEnderChest) 49 | //OsirisTessellator.drawBox(c.getPos(), c2.getRGB(), GeometryMasks.Quad.ALL); 50 | OsirisTessellator.drawBoundingBox(mc.world.getBlockState(c.getPos()).getSelectedBoundingBox(mc.world, c.getPos()), (float)w.getValDouble(), c2.getRGB()); 51 | if(c instanceof TileEntityDispenser 52 | || c instanceof TileEntityFurnace 53 | || c instanceof TileEntityHopper) 54 | //OsirisTessellator.drawBox(c.getPos(), c3.getRGB(), GeometryMasks.Quad.ALL); 55 | OsirisTessellator.drawBoundingBox(mc.world.getBlockState(c.getPos()).getSelectedBoundingBox(mc.world, c.getPos()), (float)w.getValDouble(), c3.getRGB()); 56 | } 57 | }); 58 | OsirisTessellator.releaseGL(); 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/module/modules/render/TabGui.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.module.modules.render; 2 | 3 | import me.finz0.osiris.module.Module; 4 | import me.finz0.osiris.module.ModuleManager; 5 | import me.finz0.osiris.util.FontUtils; 6 | import me.finz0.osiris.util.Rainbow; 7 | import net.minecraft.client.gui.Gui; 8 | 9 | import java.util.ArrayList; 10 | 11 | public class TabGui extends Module { 12 | public TabGui() { 13 | super("TabGUI", Category.RENDER); 14 | setDrawn(false); 15 | } 16 | 17 | Category[] categories = Category.values(); 18 | int y; 19 | int modY; 20 | public static int selected = 0; 21 | public static boolean extended = false; 22 | public static int selectedMod = 0; 23 | public static Module currentMod = null; 24 | public void onRender(){ 25 | if(selected < 0) selected = 0; 26 | if(selected > categories.length - 1) selected = categories.length - 1; 27 | y = 2; 28 | modY = 2; 29 | currentMod = null; 30 | for(Category c : categories){ 31 | if(categories[selected].equals(c)) Gui.drawRect(2, y, 62, y + 12, Rainbow.getIntWithOpacity(100)); 32 | else Gui.drawRect(2, y, 62, y + 12, 0x66111111); 33 | FontUtils.drawStringWithShadow(false, c.name(), 4, y + 2, 0xffffffff); 34 | y += 12; 35 | } 36 | if(extended){ 37 | ArrayList mods = ModuleManager.getModulesInCategory(categories[selected]); 38 | if(selectedMod < 0) selectedMod = 0; 39 | if(selectedMod > mods.size() - 1) selectedMod = mods.size() - 1; 40 | int width = 60; 41 | for(Module m : mods){ 42 | int newWidth = FontUtils.getStringWidth(false, m.getName()) + 2; 43 | if(newWidth > width) width = newWidth; 44 | } 45 | for(Module m : mods){ 46 | int color = mods.get(selectedMod).equals(m) ? Rainbow.getIntWithOpacity(100) : m.isEnabled() ? 0x66116611 : 0x66111111; 47 | int yy = modY; 48 | if(mods.get(selectedMod).equals(m)) Gui.drawRect(64, yy, 64 + width, yy + 12, color); 49 | else Gui.drawRect(64, yy, 64 + width, yy + 12, color); 50 | FontUtils.drawStringWithShadow(false, m.getName(), 66, yy + 2, 0xffffffff); 51 | if(mods.get(selectedMod).equals(m)) currentMod = m; 52 | modY += 12; 53 | } 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/settings/SettingsManager.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.settings; 2 | 3 | import java.util.ArrayList; 4 | 5 | import me.finz0.osiris.module.Module; 6 | 7 | /** 8 | * Made by HeroCode 9 | * it's free to use 10 | * but you have to credit me 11 | * 12 | * @author HeroCode 13 | */ 14 | public class SettingsManager { 15 | 16 | private ArrayList settings; 17 | 18 | public SettingsManager(){ 19 | this.settings = new ArrayList<>(); 20 | } 21 | 22 | public void rSetting(Setting in){ 23 | this.settings.add(in); 24 | } 25 | 26 | public ArrayList getSettings(){ 27 | return this.settings; 28 | } 29 | 30 | public ArrayList getSettingsByMod(Module mod){ 31 | ArrayList out = new ArrayList<>(); 32 | for(Setting s : getSettings()){ 33 | if(s.getParentMod().equals(mod)){ 34 | out.add(s); 35 | } 36 | } 37 | if(out.isEmpty()){ 38 | return null; 39 | } 40 | return out; 41 | } 42 | 43 | public Setting getSettingByDisplayName(String name){ 44 | for(Setting set : getSettings()){ 45 | if(set.getDisplayName().equalsIgnoreCase(name)){ 46 | return set; 47 | } 48 | } 49 | System.err.println("[Osiris] Error Setting NOT found: '" + name +"'!"); 50 | return null; 51 | } 52 | 53 | public Setting getSettingByID(String id){ 54 | for(Setting s : getSettings()){ 55 | if(s.getId().equalsIgnoreCase(id)){ 56 | return s; 57 | } 58 | } 59 | System.err.println("[Osiris] Error Setting NOT found: '" + id +"'!"); 60 | return null; 61 | } 62 | 63 | } -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/util/CapeUtils.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.util; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.InputStreamReader; 5 | import java.net.URL; 6 | import java.util.ArrayList; 7 | import java.util.List; 8 | import java.util.UUID; 9 | 10 | public class CapeUtils { 11 | List uuids = new ArrayList<>(); 12 | public CapeUtils(){ 13 | try { 14 | URL pastebin = new URL("https://pastebin.com/raw/kikTk9zJ"); 15 | BufferedReader in = new BufferedReader(new InputStreamReader(pastebin.openStream())); 16 | String inputLine; 17 | while ((inputLine = in.readLine()) != null) { 18 | uuids.add(UUID.fromString(inputLine)); 19 | } 20 | } catch(Exception e){} 21 | } 22 | 23 | public boolean hasCape(UUID id){ 24 | return uuids.contains(id); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/util/FontUtils.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.util; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import net.minecraft.client.Minecraft; 5 | 6 | public class FontUtils { 7 | private static final Minecraft mc = Minecraft.getMinecraft(); 8 | public static float drawStringWithShadow(boolean customFont, String text, int x, int y, int color){ 9 | if(customFont) return OsirisMod.fontRenderer.drawStringWithShadow(text, x, y, color); 10 | else return mc.fontRenderer.drawStringWithShadow(text, x, y, color); 11 | } 12 | 13 | public static int getStringWidth(boolean customFont, String str){ 14 | if(customFont) return OsirisMod.fontRenderer.getStringWidth(str); 15 | else return mc.fontRenderer.getStringWidth(str); 16 | } 17 | 18 | public static int getFontHeight(boolean customFont){ 19 | if(customFont) return OsirisMod.fontRenderer.getHeight(); 20 | else return mc.fontRenderer.FONT_HEIGHT; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/util/GeometryMasks.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.util; 2 | 3 | import net.minecraft.util.EnumFacing; 4 | 5 | import java.util.HashMap; 6 | 7 | public final class GeometryMasks { 8 | 9 | public static final HashMap FACEMAP = new HashMap<>(); 10 | static { 11 | FACEMAP.put(EnumFacing.DOWN, Quad.DOWN); 12 | FACEMAP.put(EnumFacing.WEST, Quad.WEST); 13 | FACEMAP.put(EnumFacing.NORTH, Quad.NORTH); 14 | FACEMAP.put(EnumFacing.SOUTH, Quad.SOUTH); 15 | FACEMAP.put(EnumFacing.EAST, Quad.EAST); 16 | FACEMAP.put(EnumFacing.UP, Quad.UP); 17 | } 18 | 19 | public static final class Quad { 20 | public static final int DOWN = 0x01; 21 | public static final int UP = 0x02; 22 | public static final int NORTH = 0x04; 23 | public static final int SOUTH = 0x08; 24 | public static final int WEST = 0x10; 25 | public static final int EAST = 0x20; 26 | public static final int ALL = DOWN | UP | NORTH | SOUTH | WEST | EAST; 27 | } 28 | 29 | public static final class Line { 30 | public static final int DOWN_WEST = 0x11; 31 | public static final int UP_WEST = 0x12; 32 | public static final int DOWN_EAST = 0x21; 33 | public static final int UP_EAST = 0x22; 34 | public static final int DOWN_NORTH = 0x05; 35 | public static final int UP_NORTH = 0x06; 36 | public static final int DOWN_SOUTH = 0x09; 37 | public static final int UP_SOUTH = 0x0A; 38 | public static final int NORTH_WEST = 0x14; 39 | public static final int NORTH_EAST = 0x24; 40 | public static final int SOUTH_WEST = 0x18; 41 | public static final int SOUTH_EAST = 0x28; 42 | public static final int ALL = DOWN_WEST | UP_WEST | DOWN_EAST | UP_EAST | DOWN_NORTH | UP_NORTH | DOWN_SOUTH | UP_SOUTH | NORTH_WEST | NORTH_EAST | SOUTH_WEST | SOUTH_EAST; 43 | } 44 | } -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/util/Rainbow.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.util; 2 | 3 | import me.finz0.osiris.event.EventProcessor; 4 | 5 | import java.awt.*; 6 | 7 | public class Rainbow { 8 | public static int getInt(){ 9 | return EventProcessor.INSTANCE.getRgb(); 10 | } 11 | 12 | public static Color getColor(){ 13 | return EventProcessor.INSTANCE.getC(); 14 | } 15 | 16 | public static Color getColorWithOpacity(int opacity){ 17 | return new Color(getColor().getRed(), getColor().getGreen(), getColor().getBlue(), opacity); 18 | } 19 | 20 | public static int getIntWithOpacity(int opacity){ 21 | return getColorWithOpacity(opacity).getRGB(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/util/TpsUtils.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.util; 2 | 3 | import me.finz0.osiris.OsirisMod; 4 | import me.finz0.osiris.event.events.PacketEvent; 5 | import me.zero.alpine.listener.EventHandler; 6 | import me.zero.alpine.listener.Listener; 7 | import net.minecraft.network.play.server.SPacketTimeUpdate; 8 | import net.minecraft.util.math.MathHelper; 9 | 10 | import java.util.Arrays; 11 | 12 | /* 13 | * @author 086 14 | */ 15 | public class TpsUtils { 16 | private static float[] tickRates = new float[20]; 17 | private int nextIndex = 0; 18 | private long timeLastTimeUpdate; 19 | 20 | public TpsUtils(){ 21 | nextIndex = 0; 22 | timeLastTimeUpdate = -1L; 23 | Arrays.fill(tickRates, 0.0F); 24 | OsirisMod.EVENT_BUS.subscribe(this); 25 | } 26 | 27 | public static float getTickRate() { 28 | float numTicks = 0.0F; 29 | float sumTickRates = 0.0F; 30 | for (float tickRate : tickRates) { 31 | if (tickRate > 0.0F) { 32 | sumTickRates += tickRate; 33 | numTicks += 1.0F; 34 | } 35 | } 36 | return MathHelper.clamp(sumTickRates / numTicks, 0.0F, 20.0F); 37 | } 38 | 39 | private void onTimeUpdate() { 40 | if (this.timeLastTimeUpdate != -1L) { 41 | float timeElapsed = (float) (System.currentTimeMillis() - this.timeLastTimeUpdate) / 1000.0F; 42 | tickRates[(this.nextIndex % tickRates.length)] = MathHelper.clamp(20.0F / timeElapsed, 0.0F, 20.0F); 43 | this.nextIndex += 1; 44 | } 45 | this.timeLastTimeUpdate = System.currentTimeMillis(); 46 | } 47 | 48 | @EventHandler 49 | Listener listener = new Listener<>(event -> { 50 | if (event.getPacket() instanceof SPacketTimeUpdate) { 51 | onTimeUpdate(); 52 | } 53 | }); 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/waypoint/Waypoint.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.waypoint; 2 | 3 | import net.minecraft.util.math.BlockPos; 4 | 5 | import java.awt.*; 6 | 7 | public class Waypoint { 8 | BlockPos blockPos; 9 | double x; 10 | double y; 11 | double z; 12 | String name; 13 | int color; 14 | 15 | public Waypoint(String name, double x, double y, double z, int color){ 16 | this.name = name; 17 | this.x = x; 18 | this.y = y; 19 | this.z = z; 20 | this.color = color; 21 | this.blockPos = new BlockPos(x, y, z); 22 | } 23 | 24 | public Waypoint(String name, double x, double y, double z, Color color){ 25 | this.name = name; 26 | this.x = x; 27 | this.y = y; 28 | this.z = z; 29 | this.color = color.getRGB(); 30 | this.blockPos = new BlockPos(x, y, z); 31 | } 32 | 33 | public Waypoint(String name, double x, double y, double z){ 34 | this.name = name; 35 | this.x = x; 36 | this.y = y; 37 | this.z = z; 38 | this.color = 0xffffffff; 39 | this.blockPos = new BlockPos(x, y, z); 40 | } 41 | 42 | public Waypoint(String name, BlockPos blockPos, int color){ 43 | this.name = name; 44 | this.x = blockPos.getX(); 45 | this.y = blockPos.getY(); 46 | this.z = blockPos.getZ(); 47 | this.color = color; 48 | this.blockPos = blockPos; 49 | } 50 | 51 | public Waypoint(String name, BlockPos blockPos){ 52 | this.name = name; 53 | this.x = blockPos.getX(); 54 | this.y = blockPos.getY(); 55 | this.z = blockPos.getZ(); 56 | this.color = 0xffffffff; 57 | this.blockPos = blockPos; 58 | } 59 | 60 | public BlockPos getBlockPos() { 61 | return blockPos; 62 | } 63 | 64 | public void setBlockPos(BlockPos blockPos) { 65 | this.blockPos = blockPos; 66 | } 67 | 68 | public double getX() { 69 | return x; 70 | } 71 | 72 | public void setX(double x) { 73 | this.x = x; 74 | } 75 | 76 | public double getY() { 77 | return y; 78 | } 79 | 80 | public void setY(double y) { 81 | this.y = y; 82 | } 83 | 84 | public double getZ() { 85 | return z; 86 | } 87 | 88 | public void setZ(double z) { 89 | this.z = z; 90 | } 91 | 92 | public String getName() { 93 | return name; 94 | } 95 | 96 | public void setName(String name) { 97 | this.name = name; 98 | } 99 | 100 | public int getColor() { 101 | return color; 102 | } 103 | 104 | public void setColor(int color) { 105 | this.color = color; 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/me/finz0/osiris/waypoint/WaypointManager.java: -------------------------------------------------------------------------------- 1 | package me.finz0.osiris.waypoint; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | public class WaypointManager { 7 | List waypoints; 8 | 9 | public WaypointManager(){ 10 | waypoints = new ArrayList<>(); 11 | } 12 | 13 | public List getWaypoints(){ 14 | return waypoints; 15 | } 16 | 17 | public void addWaypoint(Waypoint waypoint){ 18 | delWaypoint(waypoint); 19 | waypoints.add(waypoint); 20 | } 21 | 22 | public void delWaypoint(Waypoint waypoint){ 23 | waypoints.remove(waypoint); 24 | } 25 | 26 | public Waypoint getWaypointByName(String name){ 27 | Waypoint point = waypoints.stream().filter(w -> w.getName().equalsIgnoreCase(name)).findFirst().orElse(null); 28 | return point; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/resources/assets/osiris/textures/cape.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chell-dev/Osiris/828e0f8be134f0ac8622f148a3fd8b000ef2b8a4/src/main/resources/assets/osiris/textures/cape.png -------------------------------------------------------------------------------- /src/main/resources/assets/osiris/textures/colorpicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chell-dev/Osiris/828e0f8be134f0ac8622f148a3fd8b000ef2b8a4/src/main/resources/assets/osiris/textures/colorpicker.png -------------------------------------------------------------------------------- /src/main/resources/darwin/libdiscord-rpc.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chell-dev/Osiris/828e0f8be134f0ac8622f148a3fd8b000ef2b8a4/src/main/resources/darwin/libdiscord-rpc.dylib -------------------------------------------------------------------------------- /src/main/resources/linux-x86-64/libdiscord-rpc.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chell-dev/Osiris/828e0f8be134f0ac8622f148a3fd8b000ef2b8a4/src/main/resources/linux-x86-64/libdiscord-rpc.so -------------------------------------------------------------------------------- /src/main/resources/mcmod.info: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "modid": "osiris", 4 | "name": "Osiris", 5 | "description": "", 6 | "version": "${version}", 7 | "mcversion": "1.12.2", 8 | "url": "", 9 | "authorList": ["FINZ0"], 10 | "credits": "HeroCode, Darki" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /src/main/resources/mixins.osiris.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "compatibilityLevel": "JAVA_8", 4 | "package": "me.finz0.osiris.mixin.mixins", 5 | "refmap": "mixins.osiris.refmap.json", 6 | "mixins": [ 7 | "MixinNetworkManager", 8 | "MixinEntity", 9 | "MixinGuiNewChat", 10 | "MixinMovementInputFromOptions", 11 | "MixinEntityRenderer", 12 | "MixinAbstractClientPlayer", 13 | "MixinLayerBipedArmor", 14 | "MixinPlayerControllerMP", 15 | "MixinEntityPlayer", 16 | "MixinBlockSoulSand", 17 | "MixinEntityPlayerSP", 18 | "MixinMinecraft", 19 | "MixinGuiPlayerTabOverlay", 20 | "MixinGuiMainMenu", 21 | "MixinGuiScreen", 22 | "MixinGuiContainer" 23 | ] 24 | } -------------------------------------------------------------------------------- /src/main/resources/osiris_at.cfg: -------------------------------------------------------------------------------- 1 | public net.minecraft.client.Minecraft * 2 | public net.minecraft.client.Minecraft *() 3 | public net.minecraft.network.play.client.CPacketPlayer * 4 | public net.minecraft.network.play.client.CPacketChatMessage field_149440_a # message 5 | public net.minecraft.client.multiplayer.PlayerControllerMP * 6 | public net.minecraft.client.multiplayer.PlayerControllerMP *() 7 | public net.minecraft.client.renderer.ItemRenderer * 8 | public net.minecraft.network.play.client.CPacketCloseWindow * 9 | public net.minecraft.client.renderer.EntityRenderer *() 10 | public net.minecraft.client.renderer.entity.RenderManager * 11 | public net.minecraft.util.Timer * -------------------------------------------------------------------------------- /src/main/resources/win32-x86-64/discord-rpc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chell-dev/Osiris/828e0f8be134f0ac8622f148a3fd8b000ef2b8a4/src/main/resources/win32-x86-64/discord-rpc.dll -------------------------------------------------------------------------------- /src/main/resources/win32-x86/discord-rpc.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chell-dev/Osiris/828e0f8be134f0ac8622f148a3fd8b000ef2b8a4/src/main/resources/win32-x86/discord-rpc.dll --------------------------------------------------------------------------------