├── Mapping.png ├── src └── main │ ├── resources │ ├── icons │ │ ├── LICENSE │ │ ├── checkmark.png │ │ ├── minecraft.ico │ │ └── minecraft.png │ ├── META-INF │ │ └── MANIFEST.MF │ ├── LICENSE │ └── launcher.css │ └── java │ └── com │ └── nur1popcorn │ └── irrlicht │ ├── engine │ ├── wrappers │ │ ├── client │ │ │ ├── network │ │ │ │ ├── INetHandlerServer.java │ │ │ │ ├── client │ │ │ │ │ ├── C14TabComplete.java │ │ │ │ │ └── C01ChatMessage.java │ │ │ │ ├── Packet.java │ │ │ │ ├── INetHandlerClient.java │ │ │ │ ├── NetHandlerServer.java │ │ │ │ ├── NetHandlerClient.java │ │ │ │ ├── server │ │ │ │ │ └── S12Velocity.java │ │ │ │ └── NetworkManager.java │ │ │ ├── entity │ │ │ │ ├── ClientPlayer.java │ │ │ │ ├── PlayerMpOther.java │ │ │ │ └── PlayerSp.java │ │ │ ├── minecraft │ │ │ │ └── Timer.java │ │ │ ├── gui │ │ │ │ ├── GuiIngame.java │ │ │ │ └── GuiScreen.java │ │ │ ├── renderer │ │ │ │ └── EntityRenderer.java │ │ │ ├── settings │ │ │ │ └── GameSettings.java │ │ │ └── Minecraft.java │ │ ├── world │ │ │ ├── WorldClient.java │ │ │ └── World.java │ │ ├── entity │ │ │ ├── EntityPlayer.java │ │ │ ├── EntityLivingBase.java │ │ │ └── PlayerAbilities.java │ │ ├── Start.java │ │ ├── Wrapper.java │ │ └── util │ │ │ └── AxisAlignedBB.java │ ├── events │ │ ├── Event.java │ │ ├── Priority.java │ │ ├── ILocalVariableEvent.java │ │ ├── impl │ │ │ ├── CancellableEvent.java │ │ │ └── LocalVariableEvent.java │ │ ├── ICancellableEvent.java │ │ ├── EventTarget.java │ │ └── MethodInfo.java │ ├── hooker │ │ ├── impl │ │ │ ├── Render3DEvent.java │ │ │ ├── SwapBuffersEvent.java │ │ │ ├── UpdateEvent.java │ │ │ ├── Render2DEvent.java │ │ │ ├── PacketSendEvent.java │ │ │ └── PacketReceiveEvent.java │ │ ├── HookingHandler.java │ │ └── HookingMethod.java │ ├── mapper │ │ ├── DiscoveryHandler.java │ │ ├── DiscoveryMethod.java │ │ ├── WrapperBridge.java │ │ └── WrapperDelegationHandler.java │ └── exceptions │ │ └── MappingException.java │ ├── gui │ ├── package-info.java │ ├── components │ │ ├── layout │ │ │ ├── Align.java │ │ │ ├── Direction.java │ │ │ └── Orientation.java │ │ ├── Focusable.java │ │ ├── Observer.java │ │ ├── LockableComponent.java │ │ ├── Checkbox.java │ │ ├── Label.java │ │ ├── Observable.java │ │ ├── containers │ │ │ ├── Container.java │ │ │ └── Frame.java │ │ └── Button.java │ ├── themes │ │ ├── MouseEventType.java │ │ ├── parsing │ │ │ ├── values │ │ │ │ ├── StringValue.java │ │ │ │ ├── ColorValue.java │ │ │ │ ├── NumberValue.java │ │ │ │ └── Value.java │ │ │ ├── TokenInfo.java │ │ │ ├── TokenType.java │ │ │ ├── exceptions │ │ │ │ └── ParserException.java │ │ │ └── Token.java │ │ ├── ContainerHandler.java │ │ └── vis │ │ │ └── VisLabelHandler.java │ └── GuiScreenBridge.java │ ├── management │ ├── commands │ │ ├── Command.java │ │ └── CommandManager.java │ ├── values │ │ ├── ValueTarget.java │ │ ├── ToggleValue.java │ │ ├── ModeValue.java │ │ ├── SliderValue.java │ │ └── Value.java │ ├── GameConfig.java │ ├── TimeHelper.java │ ├── keybind │ │ ├── KeyBind.java │ │ └── KeyMask.java │ ├── ScaledResolution.java │ └── ChatColor.java │ ├── modules │ ├── Category.java │ ├── ModuleInfo.java │ ├── impl │ │ ├── movement │ │ │ ├── Speed.java │ │ │ ├── NoFall.java │ │ │ └── Fly.java │ │ ├── misc │ │ │ └── Delorean.java │ │ └── combat │ │ │ ├── AutoClicker.java │ │ │ └── Velocity.java │ └── Module.java │ ├── launcher │ └── rmi │ │ ├── ILauncher.java │ │ ├── IRmiManager.java │ │ ├── IPerformanceCharts.java │ │ └── ILogOutput.java │ ├── utils │ ├── StringUtils.java │ ├── MathUtils.java │ ├── MovementUtils.java │ ├── NumberUtils.java │ └── LoggerFactory.java │ └── Agent.java ├── .gitignore └── LICENSE /Mapping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nur1popcorn/Irrlicht/HEAD/Mapping.png -------------------------------------------------------------------------------- /src/main/resources/icons/LICENSE: -------------------------------------------------------------------------------- 1 | Checkmark icon credits -------------------------------------------------------------------------------- /src/main/resources/icons/checkmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nur1popcorn/Irrlicht/HEAD/src/main/resources/icons/checkmark.png -------------------------------------------------------------------------------- /src/main/resources/icons/minecraft.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nur1popcorn/Irrlicht/HEAD/src/main/resources/icons/minecraft.ico -------------------------------------------------------------------------------- /src/main/resources/icons/minecraft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nur1popcorn/Irrlicht/HEAD/src/main/resources/icons/minecraft.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/* 2 | target/* 3 | *.iml 4 | dependency-reduced-pom.xml 5 | 6 | *.jar 7 | *.war 8 | *.ear 9 | *.zip 10 | *.tar.gz 11 | *.rar 12 | 13 | hs_err_pid* -------------------------------------------------------------------------------- /src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Main-Class: com.nur1popcorn.irrlicht.launcher.Launcher 3 | Agent-Class: com.nur1popcorn.irrlicht.Agent 4 | Premain-Class: com.nur1popcorn.irrlicht.Agent 5 | Can-Retransform-Classes: true 6 | Can-Redefine-Classes: true 7 | Class-Path: tools.jar 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) Keanu Poeschko - All Rights Reserved 2 | Unauthorized copying of this file is strictly prohibited 3 | 4 | Created by Keanu Poeschko , April 2017 5 | This file is part of {Irrlicht}. 6 | 7 | Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 8 | 9 | Permission to use, copy, modify, and distribute my software for 10 | educational, and research purposes, without a signed licensing agreement 11 | and for free, is hereby granted, provided that the above copyright notice 12 | and this paragraph appear in all copies, modifications, and distributions. -------------------------------------------------------------------------------- /src/main/resources/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) Keanu Poeschko - All Rights Reserved 2 | Unauthorized copying of this file is strictly prohibited 3 | 4 | Created by Keanu Poeschko , April 2017 5 | This file is part of {Irrlicht}. 6 | 7 | Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 8 | Permission to use, copy, modify, and distribute my software for 9 | educational, and research purposes, without a signed licensing agreement 10 | and for free, is hereby granted, provided that the above copyright notice 11 | and this paragraph appear in all copies, modifications, and distributions. -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/network/INetHandlerServer.java: -------------------------------------------------------------------------------- 1 | package com.nur1popcorn.irrlicht.engine.wrappers.client.network; 2 | 3 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 4 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 5 | import com.nur1popcorn.irrlicht.engine.wrappers.Wrapper; 6 | 7 | /** 8 | * The {@link INetHandlerClient} is used to handle packets sent by the server. 9 | * 10 | * @see Wrapper 11 | * @see NetHandlerServer 12 | * 13 | * @author nur1popcorn 14 | * @since 1.1.0-alpha 15 | */ 16 | @DiscoveryMethod(checks = Mapper.CUSTOM) 17 | public interface INetHandlerServer extends Wrapper 18 | { 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | @Deprecated 21 | package com.nur1popcorn.irrlicht.gui; -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/commands/Command.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management.commands; 21 | 22 | public class Command 23 | { 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/commands/CommandManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management.commands; 21 | 22 | public class CommandManager 23 | { 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/events/Event.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.events; 21 | 22 | /** 23 | * The {@link Event} is the base for every other {@link Event}. 24 | * 25 | * @see EventManager 26 | * 27 | * @author nur1popcorn 28 | * @since 1.0.1-alpha 29 | */ 30 | public interface Event 31 | {} 32 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/components/layout/Align.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.components.layout; 21 | 22 | /** 23 | * The {@link Align} is used for aligning components. 24 | * 25 | * @author nur1popcorn 26 | * @since 1.0.0-alpha 27 | */ 28 | public enum Align 29 | { 30 | LEFT, 31 | CENTER, 32 | RIGHT 33 | } -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/modules/Category.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.modules; 21 | 22 | /** 23 | * The {@link Category} class is used to represent cheat categories. 24 | * 25 | * @see Module 26 | * 27 | * @author nur1popcorn 28 | * @since 1.0.0-alpha 29 | */ 30 | public enum Category 31 | { 32 | COMBAT, 33 | MOVEMENT, 34 | MISC 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/components/layout/Direction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.components.layout; 21 | 22 | /** 23 | * The {@link Direction} is used for multiple things like padding or margin. 24 | * 25 | * @author nur1popcorn 26 | * @since 1.0.0-alpha 27 | */ 28 | public enum Direction 29 | { 30 | TOP, 31 | LEFT, 32 | BOTTOM, 33 | RIGHT 34 | } -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/components/layout/Orientation.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.components.layout; 21 | 22 | /** 23 | * The {@link Orientation} is used to determine the type of container and layout components. 24 | * 25 | * @author nur1popcorn 26 | * @since 1.0.0-alpha 27 | */ 28 | public enum Orientation 29 | { 30 | VERTICAL, 31 | HORIZONTAL 32 | } -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/hooker/impl/Render3DEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.hooker.impl; 21 | 22 | import com.nur1popcorn.irrlicht.engine.events.Event; 23 | 24 | /** 25 | * The {@link Render3DEvent} is called when drawing. 26 | * 27 | * @see Event 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public class Render3DEvent implements Event 33 | { 34 | 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/themes/MouseEventType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.themes; 21 | 22 | /** 23 | * The {@link MouseEventType}s are used to represent different kinds of click states. 24 | * 25 | * @see com.nur1popcorn.irrlicht.gui.GuiManager 26 | * @see Theme 27 | * @see ComponentHandler 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public enum MouseEventType 33 | { 34 | PRESSED, 35 | RELEASED 36 | } -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/hooker/impl/SwapBuffersEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.hooker.impl; 21 | 22 | import com.nur1popcorn.irrlicht.engine.events.Event; 23 | import org.lwjgl.opengl.Display; 24 | 25 | /** 26 | * The {@link SwapBuffersEvent} is called when {@link Display#swapBuffers()} is called 27 | * and is used for performance measurements. 28 | * 29 | * @see Event 30 | * 31 | * @author nur1popcorn 32 | * @since 1.1.0-alpha 33 | */ 34 | public class SwapBuffersEvent implements Event 35 | {} 36 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/hooker/impl/UpdateEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.hooker.impl; 21 | 22 | import com.nur1popcorn.irrlicht.engine.events.Event; 23 | 24 | /** 25 | * The {@link UpdateEvent} is called every 1/20th of a second and is used to update 26 | * the game's logic. 27 | * 28 | * @see Event 29 | * @see com.nur1popcorn.irrlicht.engine.wrappers.client.entity.PlayerSp 30 | * 31 | * @author nur1popcorn 32 | * @since 1.0.0-alpha 33 | */ 34 | public class UpdateEvent implements Event 35 | {} 36 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/network/client/C14TabComplete.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.network.client; 21 | 22 | import com.nur1popcorn.irrlicht.engine.wrappers.client.network.Packet; 23 | 24 | /** 25 | * The {@link C14TabComplete} is a packet sent by the player requesting the server to 26 | * tab complete his message. 27 | * 28 | * @see Packet 29 | * 30 | * @author nur1popcorn 31 | * @since 1.1.0-alpha 32 | */ 33 | public interface C14TabComplete extends Packet 34 | { 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/values/ValueTarget.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management.values; 21 | 22 | import java.lang.annotation.*; 23 | 24 | /** 25 | * The {@link ValueTarget} is used by the {@link com.nur1popcorn.irrlicht.modules.Module} class 26 | * to determine whether or not a {@link Value} is a setting. 27 | * 28 | * @see Value 29 | * @see com.nur1popcorn.irrlicht.modules.Module 30 | * 31 | * @author nur1popcorn 32 | * @since 1.0.0-alpha 33 | */ 34 | @Target(ElementType.FIELD) 35 | @Retention(RetentionPolicy.RUNTIME) 36 | public @interface ValueTarget 37 | {} 38 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/hooker/impl/Render2DEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.hooker.impl; 21 | 22 | import com.nur1popcorn.irrlicht.engine.events.Event; 23 | 24 | /** 25 | * The {@link Render2DEvent} is called by the 26 | * {@link com.nur1popcorn.irrlicht.engine.wrappers.client.gui.GuiIngame} class when 27 | * everything else was drawn to screen. 28 | * 29 | * @see Event 30 | * @see com.nur1popcorn.irrlicht.engine.wrappers.client.gui.GuiIngame 31 | * 32 | * @author nur1popcorn 33 | * @since 1.0.0-alpha 34 | */ 35 | public class Render2DEvent implements Event 36 | {} 37 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/network/Packet.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.network; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.Wrapper; 25 | 26 | /** 27 | * The {@link Packet} is the class any other packet implements. 28 | * 29 | * @see Wrapper 30 | * 31 | * @author nur1popcorn 32 | * @since 1.1.0-alpha 33 | */ 34 | @DiscoveryMethod(checks = Mapper.CUSTOM) 35 | public interface Packet extends Wrapper 36 | {} 37 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/components/Focusable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.components; 21 | 22 | /** 23 | * The {@link Focusable} class is used to focus certain {@link Component}s. 24 | * 25 | * @see Component 26 | * 27 | * @author nur1popcorn 28 | * @since 1.0.0-alpha 29 | */ 30 | public interface Focusable 31 | { 32 | /** 33 | * Called when the {@link Component} is focused. 34 | */ 35 | default void gainFocus() 36 | {} 37 | 38 | /** 39 | * Called when the {@link Component} loses focus. 40 | */ 41 | default void loseFocus() 42 | {} 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/components/Observer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.components; 21 | 22 | /** 23 | * The {@link Observer}s are used to observe {@link Observable}s. 24 | * 25 | * @see Observable 26 | * 27 | * @author nur1popcorn 28 | * @since 1.0.0-alpha 29 | */ 30 | public interface Observer 31 | { 32 | /** 33 | * Called when the {@link Observable} the {@link Observer} is attached to changes the 34 | * value. 35 | * 36 | * @param observable the {@link Observable} the {@link Observer} is attached to. 37 | */ 38 | public void onUpdate(Observable observable); 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/launcher/rmi/ILauncher.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.launcher.rmi; 21 | 22 | import java.io.File; 23 | import java.rmi.Remote; 24 | import java.rmi.RemoteException; 25 | 26 | /** 27 | * The {@link ILauncher} is used for client launcher communication. 28 | * 29 | * @see Remote 30 | * 31 | * @author nur1popcorn 32 | * @since 1.1.0-alpha 33 | */ 34 | public interface ILauncher extends Remote 35 | { 36 | /** 37 | * @throws RemoteException 38 | * 39 | * @return the path the launcher is located in. 40 | */ 41 | public File getLauncherDir() throws RemoteException; 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/launcher/rmi/IRmiManager.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.launcher.rmi; 21 | 22 | import java.rmi.Remote; 23 | import java.rmi.RemoteException; 24 | 25 | /** 26 | * The {@link IRmiManager} is to listen for client shutdown. 27 | * 28 | * @see Remote 29 | * 30 | * @author nur1popcorn 31 | * @since 1.1.0-alpha 32 | */ 33 | public interface IRmiManager extends Remote 34 | { 35 | /** 36 | * Shuts down the launcher's 37 | * {@link com.nur1popcorn.irrlicht.launcher.rmi.impl.RmiManager}. 38 | * 39 | * @throws RuntimeException 40 | */ 41 | public void shutdown() throws RemoteException; 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/launcher/rmi/IPerformanceCharts.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.launcher.rmi; 21 | 22 | import java.rmi.Remote; 23 | import java.rmi.RemoteException; 24 | 25 | /** 26 | * The {@link IPerformanceCharts} is used to communicate with the launchers 27 | * {@link com.nur1popcorn.irrlicht.launcher.PerformanceCharts} 28 | * 29 | * @see Remote 30 | * 31 | * @author nur1popcorn 32 | * @since 1.1.0-alpha 33 | */ 34 | public interface IPerformanceCharts extends Remote 35 | { 36 | public void update(Type type, String text, int value) throws RemoteException; 37 | 38 | public enum Type 39 | { 40 | RAM, 41 | CPU_LOAD, 42 | FPS 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/hooker/HookingHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.hooker; 21 | 22 | import org.objectweb.asm.tree.MethodNode; 23 | 24 | /** 25 | * The {@link HookingMethod} is responsible for handling custom checks. 26 | * 27 | * @see Hooker 28 | * @see com.nur1popcorn.irrlicht.engine.events.Event 29 | * @see MethodNode 30 | * 31 | * @author nur1popcorn 32 | * @since 1.0.0-alpha 33 | */ 34 | public interface HookingHandler 35 | { 36 | /** 37 | * Adds a custom hook to the {@link MethodNode} provided. 38 | * 39 | * @param methodNode the {@link MethodNode} which the hook is supposed to be added to. 40 | */ 41 | public void hook(MethodNode methodNode); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/events/Priority.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.events; 21 | 22 | /** 23 | * The {@link Priority} is used to determine in what order {@link Event}s are called. 24 | * 25 | * @see EventManager 26 | * @see MethodInfo 27 | * 28 | * @author nur1popcorn 29 | * @since 1.0.1-alpha 30 | */ 31 | public enum Priority 32 | { 33 | /** 34 | * Called first. 35 | */ 36 | LOWEST, 37 | /** 38 | * Called after lowest. 39 | */ 40 | LOW, 41 | /** 42 | * Called after low. 43 | */ 44 | NORMAL, 45 | /** 46 | * Called after normal. 47 | */ 48 | HIGH, 49 | /** 50 | * Called after high. 51 | */ 52 | HIGHEST 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/entity/ClientPlayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.entity; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.entity.EntityPlayer; 25 | 26 | /** 27 | * The {@link ClientPlayer} provides some information about the player sent by the server. 28 | * 29 | * @see EntityPlayer 30 | * 31 | * @author nur1popcorn 32 | * @since 1.0.0-alpha 33 | */ 34 | @DiscoveryMethod(declaring = PlayerSp.class, 35 | checks = Mapper.DEFAULT | Mapper.EXTENSION) 36 | public interface ClientPlayer extends EntityPlayer 37 | {} 38 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/entity/PlayerMpOther.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.entity; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.client.network.NetHandlerServer; 25 | 26 | /** 27 | * The {@link PlayerMpOther} represents other players on the server. 28 | * 29 | * @author nur1popcorn 30 | * @since 1.1.0-alpha 31 | */ 32 | @DiscoveryMethod(checks = Mapper.CUSTOM) 33 | public interface PlayerMpOther extends ClientPlayer 34 | { 35 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 36 | public NetHandlerServer getConnection(); 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/network/INetHandlerClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.network; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.Wrapper; 25 | 26 | /** 27 | * The {@link INetHandlerClient} is used to handle packets sent by the server. 28 | * 29 | * @see Wrapper 30 | * @see NetHandlerClient 31 | * 32 | * @author nur1popcorn 33 | * @since 1.1.0-alpha 34 | */ 35 | @DiscoveryMethod(checks = Mapper.CUSTOM) 36 | public interface INetHandlerClient extends Wrapper 37 | { 38 | //public void handleEntityVelocity(S12Velocity packetIn); 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/world/WorldClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.world; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.client.Minecraft; 25 | 26 | /** 27 | * The {@link WorldClient} is the multiplayer {@link World}'s instance. 28 | * 29 | * @see World 30 | * @see Minecraft 31 | * 32 | * @author Siphedrion 33 | * @since 1.1.1-alpha 34 | */ 35 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.STRING_CONST, 36 | declaring = Minecraft.class, 37 | constants = { "MpServer" }) 38 | public interface WorldClient extends World 39 | { 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/themes/parsing/values/StringValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.themes.parsing.values; 21 | 22 | import com.nur1popcorn.irrlicht.gui.themes.parsing.exceptions.ParserException; 23 | 24 | /** 25 | * The {@link StringValue} is a {@link Value} storing a string. 26 | * 27 | * @see Value 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public class StringValue extends Value 33 | { 34 | @Override 35 | public String deserialize(String data) throws ParserException 36 | { 37 | return data.substring(1, data.length() - 1); 38 | } 39 | 40 | @Override 41 | public String serialize() throws ParserException 42 | { 43 | return "'" + value + "'"; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/launcher/rmi/ILogOutput.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.launcher.rmi; 21 | 22 | import java.rmi.Remote; 23 | import java.rmi.RemoteException; 24 | import java.util.logging.LogRecord; 25 | 26 | /** 27 | * The {@link ILogOutput} is used to communicate with the launchers 28 | * {@link com.nur1popcorn.irrlicht.launcher.LogOutput}. 29 | * 30 | * @see Remote 31 | * 32 | * @author nur1popcorn 33 | * @since 1.1.0-alpha 34 | */ 35 | public interface ILogOutput extends Remote 36 | { 37 | /** 38 | * Logs the provided {@link LogRecord}. 39 | * 40 | * @param logRecord the {@link LogRecord} which should be logged. 41 | * 42 | * @throws RemoteException 43 | */ 44 | public void log(LogRecord logRecord) throws RemoteException; 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/values/ToggleValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management.values; 21 | 22 | import com.nur1popcorn.irrlicht.modules.Module; 23 | 24 | /** 25 | * The {@link ToggleValue} is a boolean {@link Value} that can be toggled on or off. 26 | * 27 | * @see Value 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public class ToggleValue extends Value 33 | { 34 | public ToggleValue(Module module, String name, Boolean value) 35 | { 36 | super(module, name, value); 37 | } 38 | 39 | @Override 40 | public void load(String data) 41 | { 42 | value = Boolean.valueOf(data); 43 | } 44 | 45 | @Override 46 | public String save() 47 | { 48 | return value.toString(); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/events/ILocalVariableEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.events; 21 | 22 | import com.nur1popcorn.irrlicht.engine.events.impl.LocalVariableEvent; 23 | 24 | /** 25 | * The {@link LocalVariableEvent} is a {@link Event} which is used to hijack the 26 | * local variables of a method. 27 | * 28 | * @see Event 29 | * 30 | * @author nur1popcorn 31 | * @since 1.1.0-alpha 32 | */ 33 | public interface ILocalVariableEvent extends Event 34 | { 35 | /** 36 | * @param localVariables the obtained local variables of the hooked function. 37 | */ 38 | public void setLocalVariables(Object[] localVariables); 39 | 40 | /** 41 | * @return the local variables which should be overwritten. 42 | */ 43 | public Object[] getLocalVariables(); 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/entity/EntityPlayer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.entity; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.client.entity.ClientPlayer; 25 | 26 | /** 27 | * The {@link EntityPlayer} class is a player class. 28 | * 29 | * @see EntityLivingBase 30 | * 31 | * @author nur1popcorn 32 | * @since 1.0.0-alpha 33 | */ 34 | @DiscoveryMethod(declaring = ClientPlayer.class, 35 | checks = Mapper.DEFAULT | Mapper.EXTENSION) 36 | public interface EntityPlayer extends EntityLivingBase 37 | { 38 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 39 | public PlayerAbilities getPlayerAbilities(); 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/GameConfig.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management; 21 | 22 | import java.io.File; 23 | 24 | /** 25 | * The {@link GameConfig} class contains useful information about the game which the 26 | * client was injected into. 27 | * 28 | * @author nur1popcorn 29 | * @since 1.1.0-alpha 30 | */ 31 | public class GameConfig 32 | { 33 | public final String version; 34 | public final File gameDir, 35 | assetDir; 36 | public final Class main; 37 | 38 | public GameConfig(String version, String gameDir, String assetDir, String main) throws ClassNotFoundException 39 | { 40 | this.version = version; 41 | this.gameDir = new File(gameDir); 42 | this.assetDir = new File(assetDir); 43 | this.main = Class.forName(main); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/Start.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | 25 | import java.lang.reflect.Modifier; 26 | 27 | /** 28 | * The {@link Start} class is the main class of Minecraft. 29 | * 30 | * @see Wrapper 31 | * @see Mapper 32 | * 33 | * @author nur1popcorn 34 | * @since 1.0.0-alpha 35 | */ 36 | @DiscoveryMethod(checks = Mapper.CUSTOM) 37 | public interface Start extends Wrapper 38 | { 39 | /** 40 | * The main class's location. 41 | */ 42 | public static final String DEFAULT_LOC = "net.minecraft.client.main.Main"; 43 | 44 | @DiscoveryMethod(modifiers = Modifier.PUBLIC | Modifier.STATIC) 45 | public void main(String[] args); 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/network/client/C01ChatMessage.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.network.client; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.client.network.Packet; 25 | 26 | /** 27 | * The {@link C01ChatMessage} is a packet sent by the player containing the chat message. 28 | * 29 | * @see Packet 30 | * 31 | * @author nur1popcorn 32 | * @since 1.1.0-alpha 33 | */ 34 | public interface C01ChatMessage extends Packet 35 | { 36 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 37 | public String getMessage(); 38 | 39 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 40 | public void setMessage(String message); 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/modules/ModuleInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.modules; 21 | 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | import java.lang.annotation.Target; 26 | 27 | /** 28 | * The {@link ModuleInfo} stores necessary information for each {@link Module}. 29 | * 30 | * @see Module 31 | * @see Category 32 | * 33 | * @author nur1popcorn 34 | * @since 1.0.0-alpha 35 | */ 36 | @Target(ElementType.TYPE) 37 | @Retention(RetentionPolicy.RUNTIME) 38 | public @interface ModuleInfo 39 | { 40 | /** 41 | * @return the {@link Module}'s name. 42 | */ 43 | String name(); 44 | 45 | /** 46 | * @return the {@link Category} the {@link Module} should be assigned to. 47 | */ 48 | Category category(); 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/world/World.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.world; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.Wrapper; 25 | 26 | /** 27 | * The {@link World} represents Minecraft's client world. 28 | * 29 | * @see Wrapper 30 | * @see WorldClient 31 | * 32 | * @author Siphedrion 33 | * @since 1.1.1-alpha 34 | */ 35 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.EXTENSION, 36 | declaring = WorldClient.class) 37 | public interface World extends Wrapper 38 | { 39 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.STRING_CONST, 40 | constants = { "entities", "global" }) 41 | public void updateEntities(); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/values/ModeValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management.values; 21 | 22 | import com.nur1popcorn.irrlicht.modules.Module; 23 | 24 | /** 25 | * The {@link ModeValue} is a {@link Value} that is used to switch in between states. 26 | * 27 | * @see Value 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public class ModeValue extends Value 33 | { 34 | public ModeValue(Module module, String name, T value) 35 | { 36 | super(module, name, value); 37 | } 38 | 39 | @Override 40 | public void load(String data) 41 | { 42 | value = (T)value.getDeclaringClass().getEnumConstants()[Integer.valueOf(data)]; 43 | } 44 | 45 | @Override 46 | public String save() 47 | { 48 | return Integer.toString(value.ordinal()); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/events/impl/CancellableEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.events.impl; 21 | 22 | import com.nur1popcorn.irrlicht.engine.events.Event; 23 | import com.nur1popcorn.irrlicht.engine.events.ICancellableEvent; 24 | 25 | /** 26 | * The {@link CancellableEvent} is a {@link Event} which can be cancelled typically resulting 27 | * in the rest of the caller method being ignored. 28 | * 29 | * @see Event 30 | * 31 | * @author nur1popcorn 32 | * @since 1.0.1-alpha 33 | */ 34 | public class CancellableEvent implements ICancellableEvent 35 | { 36 | private boolean cancelled; 37 | 38 | @Override 39 | public boolean isCancelled() 40 | { 41 | return cancelled; 42 | } 43 | 44 | @Override 45 | public void setCancelled(boolean cancelled) 46 | { 47 | this.cancelled = cancelled; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/events/ICancellableEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.events; 21 | 22 | import com.nur1popcorn.irrlicht.engine.events.impl.CancellableEvent; 23 | 24 | /** 25 | * The {@link CancellableEvent} is a {@link Event} which can be cancelled typically resulting 26 | * in the rest of the caller method being ignored. 27 | * 28 | * @see Event 29 | * 30 | * @author nur1popcorn 31 | * @since 1.1.0-alpha 32 | */ 33 | public interface ICancellableEvent extends Event 34 | { 35 | /** 36 | * @return whether or not the {@link Event} was cancelled. 37 | */ 38 | public boolean isCancelled(); 39 | 40 | /** 41 | * Sets whether or not the {@link Event} is cancelled. 42 | * 43 | * @param cancelled whether or not the {@link Event} is cancelled. 44 | */ 45 | public void setCancelled(boolean cancelled); 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/events/impl/LocalVariableEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.events.impl; 21 | 22 | import com.nur1popcorn.irrlicht.engine.events.Event; 23 | import com.nur1popcorn.irrlicht.engine.events.ILocalVariableEvent; 24 | 25 | /** 26 | * The {@link LocalVariableEvent} is a {@link Event} which is used to modify the 27 | * local variables of a method. 28 | * 29 | * @see Event 30 | * 31 | * @author nur1popcorn 32 | * @since 1.1.0-alpha 33 | */ 34 | public class LocalVariableEvent implements ILocalVariableEvent 35 | { 36 | protected Object[] localVariables; 37 | 38 | @Override 39 | public void setLocalVariables(Object[] localVariables) 40 | { 41 | this.localVariables = localVariables; 42 | } 43 | 44 | @Override 45 | public Object[] getLocalVariables() 46 | { 47 | return localVariables; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/network/NetHandlerServer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.network; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.client.entity.PlayerMpOther; 25 | 26 | /** 27 | * The {@link NetHandlerServer} handles incoming packets. 28 | * 29 | * @see INetHandlerServer 30 | * 31 | * @author nur1popcorn 32 | * @since 1.0.0-alpha 33 | */ 34 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.STRING_CONST, 35 | declaring = PlayerMpOther.class, 36 | constants = { "keepAlive" }) 37 | public interface NetHandlerServer extends INetHandlerServer 38 | { 39 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 40 | public NetworkManager getNetworkManager(); 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/network/NetHandlerClient.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.network; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.client.entity.PlayerSp; 25 | 26 | /** 27 | * The {@link NetHandlerClient} handle incoming packets. 28 | * 29 | * @see PlayerSp 30 | * @see INetHandlerClient 31 | * 32 | * @author nur1popcorn 33 | * @since 1.0.0-alpha 34 | */ 35 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.STRING_CONST, 36 | declaring = PlayerSp.class, 37 | constants = { "MC|Brand" }) 38 | public interface NetHandlerClient extends INetHandlerClient 39 | { 40 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 41 | public NetworkManager getNetManager(); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/themes/parsing/TokenInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.themes.parsing; 21 | 22 | import java.util.regex.Pattern; 23 | 24 | /** 25 | * The {@link TokenInfo} stores information about the {@link Token} and how to identify it. 26 | * 27 | * @see Token 28 | * @see Tokenizer 29 | * 30 | * @author nur1popcorn 31 | * @since 1.0.0-alpha 32 | */ 33 | public class TokenInfo 34 | { 35 | private final Pattern regex; 36 | private final int type; 37 | 38 | public TokenInfo(Pattern regex, int type) 39 | { 40 | this.regex = regex; 41 | this.type = type; 42 | } 43 | 44 | /** 45 | * @return the pattern used to find the token. 46 | */ 47 | public Pattern getRegex() 48 | { 49 | return regex; 50 | } 51 | 52 | /** 53 | * @return the token type. 54 | */ 55 | public int getType() 56 | { 57 | return type; 58 | } 59 | } -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/themes/parsing/values/ColorValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.themes.parsing.values; 21 | 22 | import com.nur1popcorn.irrlicht.gui.themes.parsing.exceptions.ParserException; 23 | 24 | /** 25 | * The {@link ColorValue} is a {@link Value} storing a color. 26 | * 27 | * @see Value 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public class ColorValue extends Value 33 | { 34 | @Override 35 | public Integer deserialize(String data) throws ParserException 36 | { 37 | try 38 | { 39 | return (int)Long.parseLong(data.substring(1, 9), 16); 40 | } 41 | catch(NumberFormatException e) 42 | { 43 | throw new ParserException("Invalid color value: " + data); 44 | } 45 | } 46 | 47 | @Override 48 | public String serialize() 49 | { 50 | return "#" + Integer.toHexString(value); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/Wrapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers; 21 | 22 | import java.lang.reflect.Method; 23 | 24 | /** 25 | * The {@link Wrapper}s are a way of making the obfuscated classes easily accessible. 26 | * 27 | * @see com.nur1popcorn.irrlicht.engine.mapper.Mapper 28 | * @see com.nur1popcorn.irrlicht.engine.mapper.WrapperDelegationHandler 29 | * @see com.nur1popcorn.irrlicht.engine.hooker.Hooker 30 | * 31 | * @author nur1popcorn 32 | * @since 1.0.0-alpha 33 | */ 34 | public interface Wrapper 35 | { 36 | /** 37 | * The instance to which the method calls will be redirected. 38 | * 39 | * @see com.nur1popcorn.irrlicht.engine.mapper.WrapperDelegationHandler#createWrapperProxy(Class, Object) 40 | * @see com.nur1popcorn.irrlicht.engine.mapper.WrapperDelegationHandler#invoke(Object, Method, Object[]) 41 | * 42 | * @return the {@link Wrapper}'s handle. 43 | */ 44 | public Object getHandle(); 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/entity/EntityLivingBase.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.entity; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | 25 | /** 26 | * The {@link Entity} class is an abstract class all living entities extend. 27 | * 28 | * @see Entity 29 | * 30 | * @author nur1popcorn 31 | * @since 1.0.0-alpha 32 | */ 33 | @DiscoveryMethod(declaring = EntityPlayer.class, 34 | checks = Mapper.DEFAULT | Mapper.EXTENSION) 35 | public interface EntityLivingBase extends Entity 36 | { 37 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD | Mapper.STRUCTURE_START) 38 | public boolean isJumping(); 39 | 40 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 41 | public float getStrafe(); 42 | 43 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD | Mapper.STRUCTURE_END) 44 | public float getForward(); 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/events/EventTarget.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.events; 21 | 22 | import java.lang.annotation.ElementType; 23 | import java.lang.annotation.Retention; 24 | import java.lang.annotation.RetentionPolicy; 25 | import java.lang.annotation.Target; 26 | 27 | /** 28 | * The {@link EventTarget} is used to determine whether or not a method is a {@link Event} 29 | * listener and the {@link Priority} of that listener. 30 | * 31 | * @see Priority 32 | * @see EventManager 33 | * 34 | * @author nur1popcorn 35 | * @since 1.0.1-alpha 36 | */ 37 | @Target(ElementType.METHOD) 38 | @Retention(RetentionPolicy.RUNTIME) 39 | public @interface EventTarget 40 | { 41 | /** 42 | * @return the {@link Priority} of the listener. 43 | */ 44 | public Priority priority() default Priority.NORMAL; 45 | 46 | /** 47 | * @return whether or not the {@link Event} should be ignored if it is cancelled. 48 | */ 49 | public boolean ignoreCancelled() default false; 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/themes/parsing/TokenType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.themes.parsing; 21 | 22 | /** 23 | * The {@link TokenType} is a list of available {@link Token}s. 24 | * 25 | * @see Token 26 | * @see Style 27 | * @see Tokenizer 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public enum TokenType 33 | { 34 | CONSTANT("define(%s, %s)"), 35 | START_CLASS(".%s {"), 36 | VALUE("-%s: %s;"), 37 | END_CLASS("}"); 38 | 39 | private String tokenFormat; 40 | 41 | TokenType(String tokenFormat) 42 | { 43 | this.tokenFormat = tokenFormat; 44 | } 45 | 46 | /** 47 | * @param format strings used to replace the '%s' in the token format. 48 | * 49 | * @return a formatted token. 50 | */ 51 | public String getTokenFormat(String... format) 52 | { 53 | String finalFormat = tokenFormat; 54 | for(String s : format) 55 | finalFormat = finalFormat.replaceFirst("%s", s); 56 | return finalFormat; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/components/LockableComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.components; 21 | 22 | /** 23 | * The {@link LockableComponent} is a disabled {@link Component}. 24 | * 25 | * @see Observable 26 | * 27 | * @author nur1popcorn 28 | * @since 1.0.0-alpha 29 | */ 30 | public abstract class LockableComponent extends Component 31 | { 32 | private boolean locked; 33 | 34 | public LockableComponent() 35 | {} 36 | 37 | public LockableComponent(int width, int height) 38 | { 39 | super(width, height); 40 | } 41 | 42 | public LockableComponent(int x, int y, int width, int height) 43 | { 44 | super(x, y, width, height); 45 | } 46 | 47 | /** 48 | * Toggles the lock of {@link Component}. 49 | */ 50 | public void lock() 51 | { 52 | this.locked = !locked; 53 | } 54 | 55 | /** 56 | * @return whether or not the {@link Component} is locked. 57 | */ 58 | public boolean isLocked() 59 | { 60 | return locked; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/TimeHelper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management; 21 | 22 | /** 23 | * The {@link TimeHelper} is an util used to make it easier measuring the time passed. 24 | * 25 | * @author nur1popcorn 26 | * @since 1.0.0-alpha 27 | */ 28 | public class TimeHelper 29 | { 30 | private long startTime; 31 | 32 | public TimeHelper() 33 | { 34 | reset(); 35 | } 36 | 37 | /** 38 | * Resets the amount of time passed. 39 | */ 40 | public void reset() 41 | { 42 | startTime = System.currentTimeMillis(); 43 | } 44 | 45 | /** 46 | * @return the amount of ms passed. 47 | */ 48 | public long getMSPassed() 49 | { 50 | return System.currentTimeMillis() - startTime; 51 | } 52 | 53 | /** 54 | * @param ms the amount of time which should have passed. 55 | * 56 | * @return whether or not the amount of ms have passed. 57 | */ 58 | public boolean hasMSPassed(long ms) 59 | { 60 | return getMSPassed() >= ms; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/themes/parsing/exceptions/ParserException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.themes.parsing.exceptions; 21 | 22 | import com.nur1popcorn.irrlicht.gui.themes.parsing.Token; 23 | 24 | /** 25 | * The {@link ParserException} is thrown when an error occurs while tokenizing or parsing 26 | * the source. 27 | * 28 | * @see com.nur1popcorn.irrlicht.gui.themes.parsing.Tokenizer 29 | * @see com.nur1popcorn.irrlicht.gui.themes.parsing.Style 30 | * @see Token 31 | * 32 | * @author nur1popcorn 33 | * @since 1.0.0-alpha 34 | */ 35 | public class ParserException extends Exception 36 | { 37 | private Token token; 38 | 39 | public ParserException(String message) 40 | { 41 | super(message); 42 | } 43 | 44 | public ParserException(String message, Token token) 45 | { 46 | this(message); 47 | this.token = token; 48 | } 49 | /** 50 | * @return the {@link Token]} through which the exception was caused. 51 | */ 52 | public Token getToken() 53 | { 54 | return token; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/mapper/DiscoveryHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.mapper; 21 | 22 | /** 23 | * The {@link DiscoveryHandler} is responsible for handling custom checks. 24 | * 25 | * @see Mapper 26 | * @see Mapper#register(Class, DiscoveryHandler[]) 27 | * @see com.nur1popcorn.irrlicht.engine.wrappers.Wrapper 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public interface DiscoveryHandler 33 | { 34 | /** 35 | * Finds the class/method/field it is attached to within the obfuscated classes. 36 | * 37 | * @param mapper the {@link Mapper} for which the class/method/field is supposed to be discovered. 38 | * 39 | * @throws ClassNotFoundException if the class wasn't found. 40 | * @throws NoSuchMethodException if the method wasn't found. 41 | * @throws NoSuchFieldException if the field wasn't found. 42 | * 43 | * @return the discovered class/method/field. 44 | */ 45 | public T discover(Mapper mapper) throws ClassNotFoundException, NoSuchMethodException, NoSuchFieldException; 46 | } -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/utils/StringUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.utils; 21 | 22 | /** 23 | * The {@link StringUtils} is an util providing all sorts of useful methods concerning 24 | * strings. 25 | * 26 | * @author nur1popcorn 27 | * @since 1.1.0-alpha 28 | */ 29 | public class StringUtils 30 | { 31 | //prevent construction :/ 32 | private StringUtils() 33 | {} 34 | 35 | /** 36 | * @param s the string which should be capitalized. 37 | * @param delimiter the character after which the next letter should be capitalized. 38 | * 39 | * @return a capitalized version of the string provided. 40 | */ 41 | public static String capitalize(String s, char delimiter) 42 | { 43 | boolean capitalize = true; 44 | final char chars[] = s.toCharArray(); 45 | for(int i = 0; i < s.length(); i++) 46 | { 47 | chars[i] = capitalize ? Character.toUpperCase(chars[i]) : Character.toLowerCase(chars[i]); 48 | capitalize = chars[i] == delimiter; 49 | } 50 | return new String(chars); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/themes/parsing/Token.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.themes.parsing; 21 | 22 | /** 23 | * The {@link Token} a token ready to be parsed. 24 | * 25 | * @see Tokenizer 26 | * @see TokenInfo 27 | * @see Style 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public class Token 33 | { 34 | private final int tokenType; 35 | private String source; 36 | 37 | public Token(int tokenType, String source) 38 | { 39 | this.tokenType = tokenType; 40 | this.source = source; 41 | } 42 | 43 | /** 44 | * @return the opcode of the {@link Token}. 45 | */ 46 | public int getTokenType() 47 | { 48 | return tokenType; 49 | } 50 | 51 | 52 | /** 53 | * Sets the {@link Token}'s description. 54 | * 55 | * @param source the {@link Token}'s description. 56 | */ 57 | public void setSource(String source) 58 | { 59 | this.source = source; 60 | } 61 | 62 | /** 63 | * @return the description of the {@link Token}. 64 | */ 65 | public String getSource() 66 | { 67 | return source; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/exceptions/MappingException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.exceptions; 21 | 22 | import com.nur1popcorn.irrlicht.engine.wrappers.Wrapper; 23 | 24 | import java.util.Set; 25 | 26 | /** 27 | * The {@link MappingException} is an exception thrown by the 28 | * {@link com.nur1popcorn.irrlicht.engine.mapper.Mapper} 29 | * 30 | * @see com.nur1popcorn.irrlicht.engine.mapper.Mapper 31 | * @see Wrapper 32 | * 33 | * @author nur1popcorn 34 | * @since 1.0.0-alpha 35 | */ 36 | public class MappingException extends Exception 37 | { 38 | private Set> wrappers; 39 | 40 | public MappingException(String message, Set> wrappers) 41 | { 42 | super(message); 43 | this.wrappers = wrappers; 44 | } 45 | 46 | /** 47 | * the {@link Wrapper}s for which the 48 | * {@link com.nur1popcorn.irrlicht.engine.mapper.Mapper} failed to generate mappings. 49 | * 50 | * @return the {@link Wrapper}s for which the generation failed. 51 | */ 52 | public Set> getWrappers() 53 | { 54 | return wrappers; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/minecraft/Timer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.minecraft; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.Wrapper; 25 | import com.nur1popcorn.irrlicht.engine.wrappers.client.Minecraft; 26 | import org.objectweb.asm.Opcodes; 27 | 28 | /** 29 | * The {@link Timer} class is used to handle the game's timings like updates per second 30 | * by incrementing this way one could speed up the game. 31 | * 32 | * @see Wrapper 33 | * @see Minecraft 34 | * 35 | * @author nur1popcorn 36 | * @since 1.0.0-alpha 37 | */ 38 | @DiscoveryMethod(declaring = Minecraft.class) 39 | public interface Timer extends Wrapper 40 | { 41 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.CONSTRUCTOR | Mapper.FIRST_MATCH | Mapper.OPCODES, 42 | opcodes = { 43 | Opcodes.ALOAD, 44 | Opcodes.INVOKESTATIC, 45 | Opcodes.PUTFIELD 46 | }) 47 | public Timer construct(float ticksPerSecond); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/modules/impl/movement/Speed.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.modules.impl.movement; 21 | 22 | import com.nur1popcorn.irrlicht.engine.events.EventTarget; 23 | import com.nur1popcorn.irrlicht.engine.hooker.impl.UpdateEvent; 24 | import com.nur1popcorn.irrlicht.management.values.SliderValue; 25 | import com.nur1popcorn.irrlicht.management.values.ValueTarget; 26 | import com.nur1popcorn.irrlicht.modules.Category; 27 | import com.nur1popcorn.irrlicht.modules.Module; 28 | import com.nur1popcorn.irrlicht.modules.ModuleInfo; 29 | import com.nur1popcorn.irrlicht.utils.MovementUtils; 30 | 31 | /** 32 | * The {@link Speed} is a cheat that accelerates the player's movement. 33 | * 34 | * @see Module 35 | * @see UpdateEvent 36 | * @see MovementUtils 37 | * 38 | * @author nur1popcorn 39 | * @since 1.0.0-alpha 40 | */ 41 | @ModuleInfo(name = "Speed", 42 | category = Category.MOVEMENT) 43 | public class Speed extends Module 44 | { 45 | @ValueTarget 46 | private SliderValue speed = new SliderValue<>(this, "Speed", 1d, 0.1d, 2.5d, 0.1d); 47 | 48 | @EventTarget 49 | public void onUpdate(UpdateEvent event) 50 | { 51 | MovementUtils.setSpeed(speed.value); 52 | } 53 | } -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/modules/impl/movement/NoFall.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.modules.impl.movement; 21 | 22 | import com.nur1popcorn.irrlicht.Irrlicht; 23 | import com.nur1popcorn.irrlicht.engine.events.EventTarget; 24 | import com.nur1popcorn.irrlicht.engine.hooker.impl.UpdateEvent; 25 | import com.nur1popcorn.irrlicht.management.values.ToggleValue; 26 | import com.nur1popcorn.irrlicht.management.values.ValueTarget; 27 | import com.nur1popcorn.irrlicht.modules.Category; 28 | import com.nur1popcorn.irrlicht.modules.Module; 29 | import com.nur1popcorn.irrlicht.modules.ModuleInfo; 30 | 31 | /** 32 | * The {@link NoFall} is a cheat that makes the player take no fall damage. 33 | * 34 | * @see Module 35 | * @see UpdateEvent 36 | * 37 | * @author nur1popcorn 38 | * @since 1.0.0-alpha 39 | */ 40 | @ModuleInfo(name = "NoFall", 41 | category = Category.MOVEMENT) 42 | public class NoFall extends Module 43 | { 44 | @ValueTarget 45 | private ToggleValue groundSpoof = new ToggleValue(this, "GroundSpoof", false); 46 | 47 | @EventTarget 48 | public void onUpdate(UpdateEvent event) 49 | { 50 | Irrlicht.getMinecraft() 51 | .getPlayer() 52 | .setOnGround(!groundSpoof.value); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/hooker/impl/PacketSendEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.hooker.impl; 21 | 22 | import com.nur1popcorn.irrlicht.engine.events.ILocalVariableEvent; 23 | import com.nur1popcorn.irrlicht.engine.events.impl.CancellableEvent; 24 | import com.nur1popcorn.irrlicht.engine.mapper.WrapperDelegationHandler; 25 | import com.nur1popcorn.irrlicht.engine.wrappers.client.network.Packet; 26 | 27 | /** 28 | * The {@link PacketSendEvent} is called when the client is attempting to send a packet. 29 | * 30 | * @see CancellableEvent 31 | * @see Packet 32 | * @see WrapperDelegationHandler 33 | * @see com.nur1popcorn.irrlicht.engine.wrappers.client.network.NetworkManager 34 | * 35 | * @author nur1popcorn 36 | * @since 1.1.0-alpha 37 | */ 38 | public class PacketSendEvent extends CancellableEvent implements ILocalVariableEvent 39 | { 40 | public Packet packet; 41 | 42 | @Override 43 | public void setLocalVariables(Object[] localVariables) 44 | { 45 | packet = WrapperDelegationHandler.createWrapperProxy(Packet.class, localVariables[0]); 46 | } 47 | 48 | @Override 49 | public Object[] getLocalVariables() 50 | { 51 | return new Object[] { 52 | packet.getHandle() 53 | }; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/modules/impl/movement/Fly.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.modules.impl.movement; 21 | 22 | import com.nur1popcorn.irrlicht.Irrlicht; 23 | import com.nur1popcorn.irrlicht.engine.events.EventTarget; 24 | import com.nur1popcorn.irrlicht.engine.hooker.impl.UpdateEvent; 25 | import com.nur1popcorn.irrlicht.modules.Category; 26 | import com.nur1popcorn.irrlicht.modules.Module; 27 | import com.nur1popcorn.irrlicht.modules.ModuleInfo; 28 | 29 | /** 30 | * The {@link Fly} is a cheat that allows the player to fly. 31 | * 32 | * @see Module 33 | * @see UpdateEvent 34 | * 35 | * @author nur1popcorn 36 | * @since 1.0.0-alpha 37 | */ 38 | @ModuleInfo(name = "Fly", 39 | category = Category.MOVEMENT) 40 | public class Fly extends Module 41 | { 42 | @Override 43 | public void onDisable() 44 | { 45 | super.onDisable(); 46 | Irrlicht.getMinecraft() 47 | .getPlayer() 48 | .getPlayerAbilities() 49 | .setFlying(false); 50 | } 51 | 52 | @EventTarget 53 | public void onUpdate(UpdateEvent event) 54 | { 55 | Irrlicht.getMinecraft() 56 | .getPlayer() 57 | .getPlayerAbilities() 58 | .setFlying(true); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/gui/GuiIngame.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.gui; 21 | 22 | import com.nur1popcorn.irrlicht.engine.hooker.Hooker; 23 | import com.nur1popcorn.irrlicht.engine.hooker.HookingMethod; 24 | import com.nur1popcorn.irrlicht.engine.hooker.impl.Render2DEvent; 25 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 26 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 27 | import com.nur1popcorn.irrlicht.engine.wrappers.Wrapper; 28 | import com.nur1popcorn.irrlicht.engine.wrappers.client.Minecraft; 29 | 30 | /** 31 | * The {@link GuiIngame} is a class used to render the in game gui like the toolbar. 32 | * 33 | * @see Wrapper 34 | * @see Minecraft 35 | * @see Minecraft#displayGuiScreen(GuiScreen) 36 | * 37 | * @author nur1popcorn 38 | * @since 1.0.0-alpha 39 | */ 40 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.STRING_CONST, 41 | declaring = Minecraft.class, 42 | constants = { "textures/misc/vignette.png", "textures/gui/widgets.png" }) 43 | public interface GuiIngame extends Wrapper 44 | { 45 | @HookingMethod(value = Render2DEvent.class, 46 | flags = Hooker.DEFAULT | Hooker.AFTER) 47 | public void renderWidgets(float partialTicks); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/hooker/impl/PacketReceiveEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | 21 | package com.nur1popcorn.irrlicht.engine.hooker.impl; 22 | 23 | import com.nur1popcorn.irrlicht.engine.events.ILocalVariableEvent; 24 | import com.nur1popcorn.irrlicht.engine.events.impl.CancellableEvent; 25 | import com.nur1popcorn.irrlicht.engine.mapper.WrapperDelegationHandler; 26 | import com.nur1popcorn.irrlicht.engine.wrappers.client.network.Packet; 27 | 28 | /** 29 | * The {@link PacketReceiveEvent} is called when the client receives a packet from the 30 | * server. 31 | * 32 | * @see CancellableEvent 33 | * @see Packet 34 | * @see WrapperDelegationHandler 35 | * @see com.nur1popcorn.irrlicht.engine.wrappers.client.network.NetworkManager 36 | * 37 | * @author nur1popcorn 38 | * @since 1.1.0-alpha 39 | */ 40 | public class PacketReceiveEvent extends CancellableEvent implements ILocalVariableEvent 41 | { 42 | public Packet packet; 43 | 44 | @Override 45 | public void setLocalVariables(Object[] localVariables) 46 | { 47 | packet = WrapperDelegationHandler.createWrapperProxy(Packet.class, localVariables[0]); 48 | } 49 | 50 | @Override 51 | public Object[] getLocalVariables() 52 | { 53 | return new Object[] { 54 | packet.getHandle() 55 | }; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/keybind/KeyBind.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management.keybind; 21 | 22 | import org.lwjgl.input.Keyboard; 23 | 24 | /** 25 | * The {@link KeyBind} class is used to store and check key binds easily. 26 | * 27 | * @see KeyMask 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public class KeyBind 33 | { 34 | private KeyMask keyMask; 35 | private int key; 36 | 37 | public KeyBind(KeyMask keyMask, int key) 38 | { 39 | this.keyMask = keyMask; 40 | this.key = key; 41 | } 42 | 43 | /** 44 | * @return the {@link KeyBind}'s {@link KeyMask} 45 | */ 46 | public KeyMask getKeyMask() 47 | { 48 | return keyMask; 49 | } 50 | 51 | /** 52 | * @return the {@link KeyBind}'s key. 53 | */ 54 | public int getKey() 55 | { 56 | return key; 57 | } 58 | 59 | /** 60 | * @return whether or not the {@link KeyBind} is down. 61 | */ 62 | public boolean isDown() 63 | { 64 | return keyMask.isDown() && Keyboard.isKeyDown(key); 65 | } 66 | 67 | /** 68 | * @return whether or not the {@link KeyBind} is pressed. 69 | */ 70 | public boolean isPressed() 71 | { 72 | //TODO: implement. 73 | throw new RuntimeException(); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/values/SliderValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management.values; 21 | 22 | import com.nur1popcorn.irrlicht.modules.Module; 23 | 24 | /** 25 | * The {@link SliderValue} is a slider {@link Value} providing min, max and increment. 26 | * 27 | * @see Value 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public class SliderValue extends Value 33 | { 34 | public final T min, 35 | max, 36 | increment; 37 | 38 | public SliderValue(Module module, String name, T value, T min, T max, T increment) 39 | { 40 | super(module, name, value); 41 | this.min = min; 42 | this.max = max; 43 | this.increment = increment; 44 | } 45 | 46 | @Override 47 | public void load(String data) 48 | { 49 | if(value instanceof Integer) 50 | value = (T) Integer.valueOf(data); 51 | else if(value instanceof Double) 52 | value = (T) Double.valueOf(data); 53 | else if(value instanceof Float) 54 | value = (T) Float.valueOf(data); 55 | else if(value instanceof Short) 56 | value = (T) Short.valueOf(data); 57 | } 58 | 59 | @Override 60 | public String save() 61 | { 62 | return value.toString(); 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/keybind/KeyMask.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management.keybind; 21 | 22 | import org.lwjgl.input.Keyboard; 23 | 24 | /** 25 | * The {@link KeyMask} is used by {@link KeyBind}s to create more complex combinations like: 26 | * CTRL+X, CTRL+Z, etc. 27 | * 28 | * @see KeyBind 29 | * 30 | * @author nur1popcorn 31 | * @since 1.0.0-alpha 32 | */ 33 | public enum KeyMask 34 | { 35 | NONE(null), 36 | SHIFT(new int[] { 37 | Keyboard.KEY_LSHIFT, 38 | Keyboard.KEY_RSHIFT 39 | }), 40 | CONTROL(new int[] { 41 | Keyboard.KEY_LCONTROL, 42 | Keyboard.KEY_RCONTROL 43 | }), 44 | ALT(new int[] { 45 | Keyboard.KEY_LMENU, 46 | Keyboard.KEY_RMENU 47 | }); 48 | 49 | private final int[] keys; 50 | 51 | KeyMask(int[] keys) 52 | { 53 | this.keys = keys; 54 | } 55 | 56 | /** 57 | * @return all keys associated with the mask. 58 | */ 59 | public int[] getKeys() 60 | { 61 | return keys; 62 | } 63 | 64 | /** 65 | * @return whether or not the {@link KeyMask} is down. 66 | */ 67 | public boolean isDown() 68 | { 69 | if(keys != null) 70 | { 71 | for(int key : keys) 72 | if(Keyboard.isKeyDown(key)) 73 | return true; 74 | return false; 75 | } 76 | return true; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/values/Value.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management.values; 21 | 22 | import com.nur1popcorn.irrlicht.modules.Module; 23 | 24 | /** 25 | * The {@link Value} class is used to store, load and save different kinds of settings 26 | * for modules. 27 | * 28 | * @see Module 29 | * 30 | * @author nur1popcorn 31 | * @since 1.0.0-alpha 32 | */ 33 | public abstract class Value 34 | { 35 | public T value; 36 | protected Module module; 37 | protected String name; 38 | 39 | public Value(Module module, String name, T value) 40 | { 41 | this.module = module; 42 | this.name = name; 43 | this.value = value; 44 | } 45 | 46 | /** 47 | * @return the name of the {@link Value}. 48 | */ 49 | public String getName() 50 | { 51 | return name; 52 | } 53 | 54 | /** 55 | * @return the {@link Module} it is attached to. 56 | */ 57 | public Module getModule() 58 | { 59 | return module; 60 | } 61 | 62 | /** 63 | * loads the value from the string provided. 64 | * 65 | * @see #save() 66 | * 67 | * @param data the information from which the {@link Value} should be loaded. 68 | */ 69 | public abstract void load(String data); 70 | 71 | /** 72 | * @see #load(String) 73 | * 74 | * @return a serialized version of the {@link Value}. 75 | */ 76 | public abstract String save(); 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/renderer/EntityRenderer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.renderer; 21 | 22 | import com.nur1popcorn.irrlicht.engine.hooker.HookingMethod; 23 | import com.nur1popcorn.irrlicht.engine.hooker.impl.Render3DEvent; 24 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 25 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 26 | import com.nur1popcorn.irrlicht.engine.wrappers.Wrapper; 27 | import com.nur1popcorn.irrlicht.engine.wrappers.client.Minecraft; 28 | import org.objectweb.asm.Opcodes; 29 | 30 | /** 31 | * The {@link EntityRenderer} class is used to do all player rendering 32 | * events. 33 | * 34 | * @see Wrapper 35 | * @see Minecraft 36 | * 37 | * @author Siphedrion 38 | * @since 1.1.1-alpha 39 | */ 40 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.STRING_CONST, 41 | declaring = Minecraft.class, 42 | constants = { "shaders/post/notch.json" }) 43 | public interface EntityRenderer extends Wrapper 44 | { 45 | @HookingMethod(value = Render3DEvent.class) 46 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIRST_MATCH | Mapper.OPCODES, 47 | opcodes = { 48 | Opcodes.ALOAD, 49 | Opcodes.GETFIELD, 50 | Opcodes.FLOAD, 51 | Opcodes.INVOKEVIRTUAL 52 | }) 53 | public void renderHand(float partialTicks, int pass); 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/network/server/S12Velocity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.network.server; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.client.network.Packet; 25 | 26 | /** 27 | * The {@link S12Velocity} is a packet is sent to the client to move the player. 28 | * 29 | * @see Packet 30 | * 31 | * @author nur1popcorn 32 | * @since 1.1.0-alpha 33 | */ 34 | public interface S12Velocity extends Packet 35 | { 36 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD | Mapper.STRUCTURE_START) 37 | public int getEntityID(); 38 | 39 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 40 | public int getMotionX(); 41 | 42 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 43 | public int getMotionY(); 44 | 45 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD | Mapper.STRUCTURE_END) 46 | public int getMotionZ(); 47 | 48 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD | Mapper.STRUCTURE_START) 49 | public void setEntityID(int entityID); 50 | 51 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 52 | public void setMotionX(int motionX); 53 | 54 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 55 | public void setMotionY(int motionY); 56 | 57 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD | Mapper.STRUCTURE_END) 58 | public void setMotionZ(int motionZ); 59 | } 60 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/utils/MathUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | 21 | package com.nur1popcorn.irrlicht.utils; 22 | 23 | import java.math.BigDecimal; 24 | import java.math.RoundingMode; 25 | 26 | /** 27 | * The {@link MathUtils} is an util providing all sorts of useful methods concerning 28 | * math. 29 | * 30 | * @author nur1popcorn 31 | * @since 1.1.0-alpha 32 | */ 33 | public class MathUtils 34 | { 35 | //prevent construction :/ 36 | private MathUtils() 37 | {} 38 | 39 | /** 40 | * @param number the number which should be rounded. 41 | * @param places the number of places which should be kept. 42 | * 43 | * @return the provided number rounded to the number of places. 44 | */ 45 | public static double round(double number, int places) 46 | { 47 | assert places > 0; 48 | final double multiplier = Math.pow(10, places); 49 | return (int)(number * multiplier) / multiplier; 50 | } 51 | 52 | /** 53 | *

Rounds the number cleanly.

54 | *

Note:should be used when the result needs to accurate.

55 | * 56 | * @param number the number which should be rounded. 57 | * @param places the number of places which should be kept. 58 | * 59 | * @return the provided number rounded to the number of places. 60 | */ 61 | public static double roundClean(double number, int places) 62 | { 63 | assert places > 0; 64 | return new BigDecimal(number) 65 | .setScale(places, RoundingMode.HALF_UP) 66 | .doubleValue(); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/themes/parsing/values/NumberValue.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.themes.parsing.values; 21 | 22 | import com.nur1popcorn.irrlicht.gui.themes.parsing.exceptions.ParserException; 23 | 24 | /** 25 | * The {@link NumberValue} is a {@link Value} storing a {@link Number}. 26 | * 27 | * @see Value 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public class NumberValue extends Value 33 | { 34 | private Class type; 35 | 36 | @Override 37 | public Number deserialize(String data) throws ParserException 38 | { 39 | if(data.contains(".")) 40 | { 41 | type = Double.class; 42 | return Double.parseDouble(data); 43 | } 44 | else 45 | { 46 | type = Integer.class; 47 | return Integer.parseInt(data); 48 | } 49 | } 50 | 51 | @Override 52 | public String serialize() throws ParserException 53 | { 54 | if(type.isAssignableFrom(Double.class)) 55 | return Double.toString((Double)value); 56 | else if(type.isAssignableFrom(Integer.class)) 57 | return Integer.toString((Integer)value); 58 | throw new ParserException("Could not determine type of number: " + value + ", " + type); 59 | } 60 | 61 | /** 62 | * Returns the type of number based on the data provided. 63 | * 64 | * @return the type of the number based on the data provided. 65 | */ 66 | public Class getType() 67 | { 68 | return type; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/management/ScaledResolution.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.management; 21 | 22 | import com.nur1popcorn.irrlicht.engine.wrappers.client.settings.GameSettings; 23 | import org.lwjgl.opengl.Display; 24 | 25 | /** 26 | * The {@link ScaledResolution} is a class based on Minecraft's sourcecode. It's used to 27 | * position elements on the scaled viewport. 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public class ScaledResolution 33 | { 34 | private int scaleFactor = 1, 35 | scaledWidth = Display.getWidth(), 36 | scaledHeight = Display.getHeight(); 37 | 38 | public ScaledResolution(GameSettings gameSettings) 39 | { 40 | int guiScale = (guiScale = gameSettings.getGuiScale()) == 0 ? 1000 : guiScale; 41 | while(scaleFactor < guiScale && 42 | scaledWidth / (scaleFactor + 1) >= 320 && 43 | scaledHeight / (scaleFactor + 1) >= 240) 44 | scaleFactor++; 45 | scaledWidth = scaledWidth / scaleFactor; 46 | scaledHeight = scaledHeight / scaleFactor; 47 | } 48 | 49 | /** 50 | * @return by how much the viewport was scaled down. 51 | */ 52 | public int getScaleFactor() 53 | { 54 | return scaleFactor; 55 | } 56 | 57 | /** 58 | * @return the scaled viewport's width. 59 | */ 60 | public int getScaledWidth() 61 | { 62 | return scaledWidth; 63 | } 64 | 65 | /** 66 | * @return the scaled viewport's height. 67 | */ 68 | public int getScaledHeight() 69 | { 70 | return scaledHeight; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/settings/GameSettings.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.settings; 21 | 22 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 23 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 24 | import com.nur1popcorn.irrlicht.engine.wrappers.Wrapper; 25 | import com.nur1popcorn.irrlicht.engine.wrappers.client.Minecraft; 26 | 27 | import java.io.File; 28 | 29 | /** 30 | * The {@link GameSettings} class is storing all of the game's settings. 31 | * 32 | * @see Wrapper 33 | * @see Minecraft 34 | * 35 | * @author nur1popcorn 36 | * @since 1.0.0-alpha 37 | */ 38 | @DiscoveryMethod(declaring = Minecraft.class) 39 | public interface GameSettings extends Wrapper 40 | { 41 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.CONSTRUCTOR) 42 | public GameSettings construct(Minecraft minecraft, File file); 43 | 44 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.CONSTRUCTOR) 45 | public GameSettings construct(); 46 | 47 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD | Mapper.STRUCTURE_START) 48 | public boolean isSmoothCameraEnabled(); 49 | 50 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 51 | public boolean isDebugCamEnabled(); 52 | 53 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 54 | public float getFovSetting(); 55 | 56 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 57 | public float getGamma(); 58 | 59 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 60 | public float getSaturation(); 61 | 62 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD | Mapper.STRUCTURE_END) 63 | public int getGuiScale(); 64 | 65 | } 66 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/components/Checkbox.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.components; 21 | 22 | import com.nur1popcorn.irrlicht.management.values.ToggleValue; 23 | 24 | /** 25 | * The {@link Checkbox} is used to toggle a value. 26 | * 27 | * @see LockableComponent 28 | * @see Focusable 29 | * @see Observable 30 | * @see Observer 31 | * 32 | * @author nur1popcorn 33 | * @since 1.0.0-alpha 34 | */ 35 | public class Checkbox extends LockableComponent implements Focusable 36 | { 37 | private Observable checked; 38 | 39 | public Checkbox(boolean checked) 40 | { 41 | super(5, 5); 42 | this.checked = new Observable<>(checked); 43 | } 44 | 45 | public Checkbox() 46 | { 47 | this(false); 48 | } 49 | 50 | public Checkbox(ToggleValue toggleValue) 51 | { 52 | this(toggleValue.value); 53 | checked.register(observable -> toggleValue.value = observable.get()); 54 | } 55 | 56 | /** 57 | * @return whether or not the {@link Checkbox} is checked. 58 | */ 59 | public boolean isChecked() 60 | { 61 | return checked.get(); 62 | } 63 | 64 | /** 65 | * Sets whether or not the {@link Checkbox} is checked. 66 | * 67 | * @param checked whether or not the {@link Checkbox} is checked. 68 | */ 69 | public void setChecked(boolean checked) 70 | { 71 | this.checked.set(checked); 72 | } 73 | 74 | /** 75 | * Adds a {@link Observer} to the {@link Checkbox}'s value. 76 | * 77 | * @param observer the {@link Observer} used to observe the value. 78 | */ 79 | public void onChange(Observer observer) 80 | { 81 | checked.register(observer); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/components/Label.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.components; 21 | 22 | import com.nur1popcorn.irrlicht.gui.font.FontRenderer; 23 | 24 | /** 25 | * The {@link Label} is a text {@link Component}. 26 | * 27 | * @see Component 28 | * 29 | * @author nur1popcorn 30 | * @since 1.0.0-alpha 31 | */ 32 | public class Label extends Component 33 | { 34 | public static FontRenderer fontRenderer; 35 | private String text, 36 | link; 37 | 38 | public Label(String text) 39 | { 40 | setText(text); 41 | } 42 | 43 | public Label(String text, String link) 44 | { 45 | this(text); 46 | this.link = link; 47 | } 48 | 49 | /** 50 | * Sets the labels text. 51 | * 52 | * @param text the labels text. 53 | */ 54 | public void setText(String text) 55 | { 56 | if(fontRenderer != null) 57 | { 58 | setPrefWidth(fontRenderer.getStringWidth(text)); 59 | setPrefHeight(fontRenderer.getStringHeight(text)); 60 | } 61 | this.text = text; 62 | } 63 | 64 | /** 65 | * @return the labels text. 66 | */ 67 | public String getText() 68 | { 69 | return text; 70 | } 71 | 72 | /** 73 | * Sets the labels link. 74 | * 75 | * @param link the labels link. 76 | */ 77 | public void setLink(String link) 78 | { 79 | this.link = link; 80 | } 81 | 82 | /** 83 | * @return the labels link. 84 | */ 85 | public String getLink() 86 | { 87 | return link; 88 | } 89 | 90 | /** 91 | * @return whether or not the label has a link. 92 | */ 93 | public boolean isLink() 94 | { 95 | return link != null; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/modules/impl/misc/Delorean.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.modules.impl.misc; 21 | 22 | import com.nur1popcorn.irrlicht.Irrlicht; 23 | import com.nur1popcorn.irrlicht.engine.events.EventTarget; 24 | import com.nur1popcorn.irrlicht.engine.hooker.impl.UpdateEvent; 25 | import com.nur1popcorn.irrlicht.engine.mapper.WrapperDelegationHandler; 26 | import com.nur1popcorn.irrlicht.engine.wrappers.client.minecraft.Timer; 27 | import com.nur1popcorn.irrlicht.management.values.SliderValue; 28 | import com.nur1popcorn.irrlicht.management.values.ValueTarget; 29 | import com.nur1popcorn.irrlicht.modules.Category; 30 | import com.nur1popcorn.irrlicht.modules.Module; 31 | import com.nur1popcorn.irrlicht.modules.ModuleInfo; 32 | 33 | /** 34 | * The {@link Delorean} is a cheat that accelerates the game's number of updates effectively 35 | * incrementing the number of packets being sent and the number of movements being made. 36 | * 37 | * @see Module 38 | * @see UpdateEvent 39 | * 40 | * @author nur1popcorn 41 | * @since 1.0.0-alpha 42 | */ 43 | @ModuleInfo(name = "Delorean", 44 | category = Category.MISC) 45 | public class Delorean extends Module 46 | { 47 | @ValueTarget 48 | private SliderValue timerSpeed = new SliderValue<>(this, "Speed", 1f, 0.1f, 10f, 0.1f); 49 | 50 | private final Timer timer = WrapperDelegationHandler.createWrapperProxy(Timer.class, null); 51 | 52 | @Override 53 | public void onDisable() 54 | { 55 | super.onDisable(); 56 | 57 | Irrlicht.getMinecraft() 58 | .setTimer(timer.construct(20.0f)); 59 | } 60 | 61 | @EventTarget 62 | public void onUpdate(UpdateEvent event) 63 | { 64 | Irrlicht.getMinecraft() 65 | .setTimer(timer.construct(20.0f * timerSpeed.value)); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/components/Observable.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.components; 21 | 22 | import java.util.ArrayList; 23 | import java.util.List; 24 | 25 | /** 26 | * The {@link Observable}s are used to store {@link Observer}s and update them on value 27 | * change. 28 | * 29 | * @see Observer 30 | * 31 | * @author nur1popcorn 32 | * @since 1.0.0-alpha 33 | */ 34 | public class Observable 35 | { 36 | private List> observers = new ArrayList<>(); 37 | private T value; 38 | 39 | public Observable() 40 | {} 41 | 42 | public Observable(T value) 43 | { 44 | this.value = value; 45 | } 46 | 47 | /** 48 | * @return the value that is being observed. 49 | */ 50 | public T get() 51 | { 52 | return value; 53 | } 54 | 55 | /** 56 | * Sets the value which is being observed and updates all of the {@link Observer}s. 57 | * 58 | * @param value the value is going to be set to. 59 | */ 60 | public void set(T value) 61 | { 62 | this.value = value; 63 | observers.forEach(observer -> observer.onUpdate(this)); 64 | } 65 | 66 | /** 67 | * Adds a {@link Observer}. 68 | * 69 | * @param observer the {@link Observer} to be added. 70 | */ 71 | public void register(Observer observer) 72 | { 73 | observers.add(observer); 74 | } 75 | 76 | /** 77 | * Removes a {@link Observer}. 78 | * 79 | * @param observer the {@link Observer} to be removed. 80 | */ 81 | public void unregister(Observer observer) 82 | { 83 | observers.remove(observer); 84 | } 85 | 86 | /*** 87 | * Removes all of the {@link Observer}s. 88 | */ 89 | public void clear() 90 | { 91 | observers.clear(); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/themes/ContainerHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.themes; 21 | 22 | import com.nur1popcorn.irrlicht.gui.components.Component; 23 | import com.nur1popcorn.irrlicht.gui.components.containers.Container; 24 | 25 | /** 26 | * The {@link ContainerHandler} is a default {@link ComponentHandler} for {@link Container}s. 27 | * 28 | * @see Theme 29 | * @see Component 30 | * @see Container 31 | * @see ComponentHandler 32 | * 33 | * @author nur1popcorn 34 | * @since 1.0.0-alpha 35 | */ 36 | public class ContainerHandler extends ComponentHandler 37 | { 38 | public ContainerHandler(Theme theme) 39 | { 40 | super(theme); 41 | } 42 | 43 | @Override 44 | public boolean handleInput(T container, int mouseX, int mouseY, int mouseButton, MouseEventType mouseEventType) 45 | { 46 | for(Component component : container.getComponents()) 47 | if(theme.handleInput(component, mouseX, mouseY, mouseButton, mouseEventType)) 48 | return true; 49 | return false; 50 | } 51 | 52 | @Override 53 | public boolean handleKeyTyped(T container, char typedChar, int keyCode) 54 | { 55 | for(Component component : container.getComponents()) 56 | if(theme.handleKeyTyped(component, typedChar, keyCode)) 57 | return true; 58 | return false; 59 | } 60 | 61 | @Override 62 | public void draw(T container, int mouseX, int mouseY, float partialTicks) 63 | { 64 | container.getComponents() 65 | .forEach(component -> theme.draw(component, mouseX, mouseY, partialTicks)); 66 | } 67 | 68 | @Override 69 | public void update(T container) 70 | { 71 | container.getComponents() 72 | .forEach(theme::update); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/events/MethodInfo.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.events; 21 | 22 | import java.lang.reflect.Method; 23 | 24 | /** 25 | * The {@link Priority} this class is used to store data about the method including a handle 26 | * form which the method will be invoked and the {@link Priority} of the method. 27 | * 28 | * @see EventManager 29 | * @see Priority 30 | * 31 | * @author nur1popcorn 32 | * @since 1.0.1-alpha 33 | */ 34 | public class MethodInfo 35 | { 36 | private final Method method; 37 | private final Object handle; 38 | private final Priority priority; 39 | private final boolean ignoreCancelled; 40 | 41 | public MethodInfo(Method method, Object handle, Priority priority, boolean ignoreCancelled) 42 | { 43 | this.method = method; 44 | this.handle = handle; 45 | this.priority = priority; 46 | this.ignoreCancelled = ICancellableEvent.class.isAssignableFrom(method.getParameterTypes()[0]) && ignoreCancelled; 47 | } 48 | 49 | /** 50 | * @return the method which should be invoked. 51 | */ 52 | public Method getMethod() 53 | { 54 | return method; 55 | } 56 | 57 | /** 58 | * @return the handle for which the method will be invoked. 59 | */ 60 | public Object getHandle() 61 | { 62 | return handle; 63 | } 64 | 65 | /** 66 | * @return the {@link Priority} the method has. 67 | */ 68 | public Priority getPriority() 69 | { 70 | return priority; 71 | } 72 | 73 | /** 74 | * @return weather or not the {@link Event} should be ignored if it was cancelled. 75 | */ 76 | public boolean ignoreCancelled() 77 | { 78 | return ignoreCancelled; 79 | } 80 | 81 | @Override 82 | public int hashCode() 83 | { 84 | return priority.ordinal(); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/modules/impl/combat/AutoClicker.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.modules.impl.combat; 21 | 22 | import com.nur1popcorn.irrlicht.Irrlicht; 23 | import com.nur1popcorn.irrlicht.engine.events.EventTarget; 24 | import com.nur1popcorn.irrlicht.engine.hooker.impl.UpdateEvent; 25 | import com.nur1popcorn.irrlicht.engine.wrappers.client.Minecraft; 26 | import com.nur1popcorn.irrlicht.management.values.SliderValue; 27 | import com.nur1popcorn.irrlicht.management.values.ToggleValue; 28 | import com.nur1popcorn.irrlicht.management.values.ValueTarget; 29 | import com.nur1popcorn.irrlicht.modules.Category; 30 | import com.nur1popcorn.irrlicht.modules.Module; 31 | import com.nur1popcorn.irrlicht.modules.ModuleInfo; 32 | import com.nur1popcorn.irrlicht.management.TimeHelper; 33 | import org.lwjgl.input.Mouse; 34 | 35 | /** 36 | * The {@link AutoClicker} clicks for you. 37 | * 38 | * @see Module 39 | * @see UpdateEvent 40 | * 41 | * @author nur1popcorn 42 | * @since 1.0.0-alpha 43 | */ 44 | @ModuleInfo(name = "AutoClicker", 45 | category = Category.COMBAT) 46 | public class AutoClicker extends Module 47 | { 48 | @ValueTarget 49 | private SliderValue cps = new SliderValue<>(this, "Cps", 12, 1, 20, 1); 50 | 51 | @ValueTarget 52 | private ToggleValue blockhit = new ToggleValue(this, "BlockHit", false); 53 | 54 | private TimeHelper timer = new TimeHelper(); 55 | 56 | @EventTarget 57 | public void onUpdate(UpdateEvent event) 58 | { 59 | Minecraft minecraft; 60 | if(Mouse.isButtonDown(0) && 61 | (blockhit.value || !Mouse.isButtonDown(1)) && 62 | (minecraft = Irrlicht.getMinecraft()).getGuiScreen().getHandle() == null && 63 | timer.hasMSPassed(1000 / cps.value)) 64 | { 65 | minecraft.setLeftClickDelay(0); 66 | minecraft.clickMouse(); 67 | timer.reset(); 68 | } 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/utils/MovementUtils.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.utils; 21 | 22 | import com.nur1popcorn.irrlicht.Irrlicht; 23 | import com.nur1popcorn.irrlicht.engine.wrappers.client.entity.PlayerSp; 24 | 25 | /** 26 | * The {@link MovementUtils} is an util providing all sorts of movement helpers. 27 | * 28 | * @see Irrlicht 29 | * @see PlayerSp 30 | * 31 | * @author nur1popcorn 32 | * @since 1.0.0-alpha 33 | */ 34 | public class MovementUtils 35 | { 36 | //prevent construction :/ 37 | private MovementUtils() 38 | {} 39 | 40 | /** 41 | * @return whether or not the {@link PlayerSp} is moving. 42 | * 43 | * @see PlayerSp 44 | * @see Irrlicht 45 | */ 46 | public static boolean isMoving() 47 | { 48 | final PlayerSp player = Irrlicht.getMinecraft().getPlayer(); 49 | return player.getStrafe() != 0 || 50 | player.getForward() != 0; 51 | } 52 | 53 | /** 54 | * Sets the {@link PlayerSp}'s speed. 55 | * 56 | * @see PlayerSp 57 | * @see Irrlicht 58 | * 59 | * @param speed the speed the {@link PlayerSp} should be set to. 60 | */ 61 | public static void setSpeed(double speed) 62 | { 63 | if(isMoving()) 64 | { 65 | final PlayerSp player = Irrlicht.getMinecraft().getPlayer(); 66 | final float forward = player.getForward(), 67 | strafe = player.getStrafe(); 68 | final double yaw = Math.toRadians(player.getRotationYaw() + (strafe != 0 ? (forward < 0 ? -1 : 1) * new int[] { 69 | -90, 70 | -45, 71 | 90, 72 | 45, 73 | }[(int)(MathUtils.roundClean(Math.abs(forward), 1) - MathUtils.roundClean(strafe, 1) + 1)] : 0) + (forward < 0 ? -180 : 0)); 74 | player.setMotionX(-Math.sin(yaw) * speed); 75 | player.setMotionZ(Math.cos(yaw) * speed); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/engine/wrappers/client/entity/PlayerSp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.engine.wrappers.client.entity; 21 | 22 | import com.nur1popcorn.irrlicht.engine.hooker.Hooker; 23 | import com.nur1popcorn.irrlicht.engine.hooker.HookingMethod; 24 | import com.nur1popcorn.irrlicht.engine.hooker.impl.UpdateEvent; 25 | import com.nur1popcorn.irrlicht.engine.mapper.DiscoveryMethod; 26 | import com.nur1popcorn.irrlicht.engine.mapper.Mapper; 27 | import com.nur1popcorn.irrlicht.engine.wrappers.client.Minecraft; 28 | import com.nur1popcorn.irrlicht.engine.wrappers.client.network.NetHandlerClient; 29 | import org.objectweb.asm.Opcodes; 30 | 31 | /** 32 | * The {@link PlayerSp} is the player, one is controlling. 33 | * 34 | * @see ClientPlayer 35 | * @see Minecraft 36 | * 37 | * @author nur1popcorn 38 | * @since 1.0.0-alpha 39 | */ 40 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.STRING_CONST, 41 | declaring = Minecraft.class, 42 | constants = { "minecraft:container", "minecraft:chest", "minecraft:hopper" }) 43 | public interface PlayerSp extends ClientPlayer 44 | { 45 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.FIELD) 46 | public NetHandlerClient getNetHandlerClient(); 47 | 48 | @HookingMethod(value = UpdateEvent.class, 49 | flags = Hooker.DEFAULT | Hooker.OPCODES | Hooker.AFTER, 50 | opcodes = { 51 | //inject after super call. 52 | Opcodes.ALOAD, 53 | Opcodes.INVOKESPECIAL 54 | }) 55 | @DiscoveryMethod(checks = Mapper.DEFAULT | Mapper.OPCODES, 56 | opcodes = { 57 | Opcodes.ALOAD, 58 | Opcodes.GETFIELD, 59 | Opcodes.INVOKESPECIAL, 60 | Opcodes.INVOKEVIRTUAL, 61 | Opcodes.IFNE 62 | }) 63 | public void onUpdate(); 64 | } 65 | -------------------------------------------------------------------------------- /src/main/java/com/nur1popcorn/irrlicht/gui/themes/vis/VisLabelHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) Keanu Poeschko - All Rights Reserved 3 | * Unauthorized copying of this file is strictly prohibited 4 | * 5 | * Created by Keanu Poeschko , April 2017 6 | * This file is part of {Irrlicht}. 7 | * 8 | * Do not copy or distribute files of {Irrlicht} without permission of {Keanu Poeschko} 9 | * 10 | * Permission to use, copy, modify, and distribute my software for 11 | * educational, and research purposes, without a signed licensing agreement 12 | * and for free, is hereby granted, provided that the above copyright notice 13 | * and this paragraph appear in all copies, modifications, and distributions. 14 | * 15 | * 16 | * 17 | * 18 | */ 19 | 20 | package com.nur1popcorn.irrlicht.gui.themes.vis; 21 | 22 | import com.nur1popcorn.irrlicht.gui.components.Label; 23 | import com.nur1popcorn.irrlicht.gui.font.FontRenderer; 24 | import com.nur1popcorn.irrlicht.gui.themes.ComponentHandler; 25 | import com.nur1popcorn.irrlicht.gui.themes.Theme; 26 | import com.nur1popcorn.irrlicht.gui.themes.parsing.Style; 27 | import com.nur1popcorn.irrlicht.gui.themes.parsing.values.ColorValue; 28 | import com.nur1popcorn.irrlicht.gui.themes.parsing.values.NumberValue; 29 | import com.nur1popcorn.irrlicht.gui.themes.parsing.values.StringValue; 30 | 31 | import java.awt.*; 32 | 33 | /** 34 | * The {@link VisLabelHandler} is a simple {@link Label} {@link ComponentHandler}. 35 | * 36 | * @see Label 37 | * @see ComponentHandler 38 | * 39 | * @author nur1popcorn 40 | * @since 1.0.0-alpha 41 | */ 42 | public class VisLabelHandler extends ComponentHandler