├── .gitattributes ├── README.md ├── src └── main │ ├── resources │ ├── falcon │ │ ├── d.bfi │ │ ├── libRaionNative.dll │ │ ├── libRaionNative.so │ │ └── libRaionNative.dylib │ ├── assets │ │ └── minecraft │ │ │ ├── textures │ │ │ ├── gui │ │ │ │ ├── logo.png │ │ │ │ ├── font │ │ │ │ │ ├── f.ttf │ │ │ │ │ ├── font.ttf │ │ │ │ │ ├── ascii.png │ │ │ │ │ └── Product Sans Italic.ttf │ │ │ │ └── clickgui │ │ │ │ │ ├── misc.png │ │ │ │ │ ├── combat.png │ │ │ │ │ ├── exploit.png │ │ │ │ │ ├── movement.png │ │ │ │ │ ├── player.png │ │ │ │ │ └── render.png │ │ │ └── cape │ │ │ │ ├── cape0.png │ │ │ │ ├── cape1.png │ │ │ │ └── cape6.png │ │ │ └── raion │ │ │ └── shader │ │ │ ├── vertex.vert │ │ │ └── fragment │ │ │ ├── outline.frag │ │ │ └── glow.frag │ └── mcmod.info │ └── java │ ├── me │ ├── robeart │ │ └── raion │ │ │ ├── mixin │ │ │ └── common │ │ │ │ ├── entity │ │ │ │ ├── MixinEntityBoat.java │ │ │ │ └── living │ │ │ │ │ ├── MixinEntityWolf.java │ │ │ │ │ ├── MixinEntityLlama.java │ │ │ │ │ ├── player │ │ │ │ │ ├── MixinPlayerControllerMP.java │ │ │ │ │ └── MixinAbstractClientPlayer.java │ │ │ │ │ ├── MixinAbstractHorse.java │ │ │ │ │ └── MixinEntityPig.java │ │ │ │ ├── block │ │ │ │ ├── MixinBlockSoulSand.java │ │ │ │ ├── MixinBlockBarrier.java │ │ │ │ └── MixinBlockModelShapes.java │ │ │ │ ├── gui │ │ │ │ ├── MixinGuiScreen.java │ │ │ │ ├── MixinGuiBossOverlay.java │ │ │ │ └── MixinGuiIngame.java │ │ │ │ ├── item │ │ │ │ └── MixinItemTool.java │ │ │ │ ├── render │ │ │ │ ├── IMixinRenderGlobal.java │ │ │ │ ├── MixinFustrum.java │ │ │ │ ├── MixinBufferBuilder.java │ │ │ │ ├── MixinChunkRenderWorker.java │ │ │ │ ├── MixinRenderChunk.java │ │ │ │ ├── MixinRenderPlayer.java │ │ │ │ ├── MixinTileEntitySkullRenderer.java │ │ │ │ └── MixinChunkRenderDispatcher.java │ │ │ │ ├── client │ │ │ │ └── MixinTimer.java │ │ │ │ ├── network │ │ │ │ ├── packet │ │ │ │ │ ├── client │ │ │ │ │ │ ├── MixinCPacketCloseWindow.java │ │ │ │ │ │ ├── MixinCPacketChatMessage.java │ │ │ │ │ │ ├── MixinCPacketPlayerPlayerTryUseItemOnBlock.java │ │ │ │ │ │ └── MixinCPacketPlayer.java │ │ │ │ │ └── server │ │ │ │ │ │ ├── MixinSPacketExplosion.java │ │ │ │ │ │ ├── MixinSPacketEntityVelocity.java │ │ │ │ │ │ └── MixinSPacketPosLook.java │ │ │ │ └── MixinNetHandlerPlayClient.java │ │ │ │ ├── MixinVisGraph.java │ │ │ │ ├── MixinLayerCape.java │ │ │ │ ├── MixinWorldClient.java │ │ │ │ └── chunk │ │ │ │ └── MixinChunk.java │ │ │ ├── client │ │ │ ├── gui │ │ │ │ ├── clickguirework │ │ │ │ │ ├── Gui.java │ │ │ │ │ ├── settings │ │ │ │ │ │ ├── BindSetting.java │ │ │ │ │ │ ├── EnumSetting.java │ │ │ │ │ │ ├── IntSetting.java │ │ │ │ │ │ ├── DoubleSetting.java │ │ │ │ │ │ ├── FloatSetting.java │ │ │ │ │ │ ├── StringSetting.java │ │ │ │ │ │ └── BooleanSetting.java │ │ │ │ │ ├── Panel.java │ │ │ │ │ └── Component.java │ │ │ │ ├── cui │ │ │ │ │ ├── anchor │ │ │ │ │ │ ├── AnchorPointDirection.kt │ │ │ │ │ │ ├── CoordinateAnchorPoint.kt │ │ │ │ │ │ └── ElementAnchorPoint.kt │ │ │ │ │ ├── elements │ │ │ │ │ │ ├── ServerBrandElement.kt │ │ │ │ │ │ ├── PingElement.kt │ │ │ │ │ │ ├── TimeElement.kt │ │ │ │ │ │ ├── FPSCounterElement.kt │ │ │ │ │ │ ├── DurabilityElement.kt │ │ │ │ │ │ ├── DirectionsElement.kt │ │ │ │ │ │ ├── TpsElement.kt │ │ │ │ │ │ └── ServerLagElement.kt │ │ │ │ │ └── values │ │ │ │ │ │ └── ValueRenderer.kt │ │ │ │ ├── hud │ │ │ │ │ └── Popup.java │ │ │ │ ├── RaionMainMenu.kt │ │ │ │ └── clickgui │ │ │ │ │ ├── MainPanel.java │ │ │ │ │ └── BindButton.java │ │ │ ├── events │ │ │ │ ├── events │ │ │ │ │ ├── player │ │ │ │ │ │ ├── OnUpdateEvent.java │ │ │ │ │ │ ├── PushedByWaterEvent.java │ │ │ │ │ │ ├── IsEntityInsideOpaqueBlockEvent.java │ │ │ │ │ │ ├── PushOutOfBlocksEvent.java │ │ │ │ │ │ ├── UpdateWalkingPlayerEvent.java │ │ │ │ │ │ ├── SwingArmEvent.java │ │ │ │ │ │ ├── ApplyCollisionEvent.java │ │ │ │ │ │ ├── ItemPickupEvent.java │ │ │ │ │ │ ├── LocateCapeEvent.java │ │ │ │ │ │ └── MoveEvent.java │ │ │ │ │ ├── render │ │ │ │ │ │ ├── LightmapUpdateEvent.kt │ │ │ │ │ │ ├── SetupFogEvent.java │ │ │ │ │ │ ├── CloseScreenEvent.java │ │ │ │ │ │ ├── OrientCameraEvent.java │ │ │ │ │ │ ├── SetOpaqueCubeEvent.java │ │ │ │ │ │ ├── HurtCameraEffectEvent.java │ │ │ │ │ │ ├── RenderBossBarEvent.java │ │ │ │ │ │ ├── ShouldSideRenderEvent.java │ │ │ │ │ │ ├── BlockStateAtEntityViewpointEvent.java │ │ │ │ │ │ ├── RenderOverlayEvent.java │ │ │ │ │ │ ├── DisplayGuiScreenEvent.java │ │ │ │ │ │ ├── RebuildChunkEvent.java │ │ │ │ │ │ ├── Render3DEvent.java │ │ │ │ │ │ ├── RenderBlockEvent.java │ │ │ │ │ │ ├── Render2DEvent.java │ │ │ │ │ │ ├── UploadChunkEvent.java │ │ │ │ │ │ ├── RenderNameEvent.java │ │ │ │ │ │ ├── FreeRenderBuilderEvent.java │ │ │ │ │ │ ├── RenderChestEvent.java │ │ │ │ │ │ ├── CanRenderInLayerEvent.java │ │ │ │ │ │ ├── DrawScreenGuiChatEvent.java │ │ │ │ │ │ ├── PutColorMultiplierEvent.java │ │ │ │ │ │ └── RenderEntityEvent.java │ │ │ │ │ ├── block │ │ │ │ │ │ └── IsLiquidSolidEvent.kt │ │ │ │ │ ├── entity │ │ │ │ │ │ ├── PigTravelEvent.java │ │ │ │ │ │ ├── CanBeSteeredEvent.java │ │ │ │ │ │ ├── ShouldStopElytraEvent.kt │ │ │ │ │ │ ├── AbstractHorseSaddledEvent.java │ │ │ │ │ │ ├── ShouldWalkOffEdgeEvent.java │ │ │ │ │ │ ├── AddEntityVelocityEvent.java │ │ │ │ │ │ ├── HorseJumpStrengthEvent.java │ │ │ │ │ │ └── EntityLivingBaseTravelEvent.java │ │ │ │ │ ├── network │ │ │ │ │ │ ├── PacketExceptionEvent.kt │ │ │ │ │ │ ├── HandleDisconnectionEvent.kt │ │ │ │ │ │ ├── PlayerLeaveEvent.java │ │ │ │ │ │ ├── PacketReceiveEvent.java │ │ │ │ │ │ ├── PlayerJoinEvent.java │ │ │ │ │ │ └── PacketSendEvent.java │ │ │ │ │ ├── world │ │ │ │ │ │ ├── GetLiquidDownwardsFlowEvent.java │ │ │ │ │ │ ├── RemoveEntityEvent.java │ │ │ │ │ │ ├── ChunkEvent.java │ │ │ │ │ │ └── LiquidCollisionBBEvent.java │ │ │ │ │ └── client │ │ │ │ │ │ ├── GetPlayerTabTextureEvent.kt │ │ │ │ │ │ ├── UnpressAllKeysEvent.java │ │ │ │ │ │ ├── ToggleEvent.java │ │ │ │ │ │ ├── ClickMouseButtonEvent.kt │ │ │ │ │ │ ├── GetKeyStateEvent.java │ │ │ │ │ │ └── ClickMouseButtonChatEvent.java │ │ │ │ ├── EventStageable.java │ │ │ │ └── EventCancellable.java │ │ │ ├── imixin │ │ │ │ ├── IEntityPlayerSP.java │ │ │ │ ├── IItemTool.java │ │ │ │ ├── ICPacketCloseWindow.java │ │ │ │ ├── ICPacketChatMessage.java │ │ │ │ ├── IMixinPlayerControllerMP.java │ │ │ │ ├── IRenderManager.java │ │ │ │ ├── ITimer.java │ │ │ │ ├── IEntityRenderer.java │ │ │ │ ├── ISPacketExplosion.java │ │ │ │ ├── IEntity.java │ │ │ │ ├── IMixinItemRenderer.java │ │ │ │ ├── ISPacketEntityVelocity.java │ │ │ │ ├── ISPacketPlayerPosLook.java │ │ │ │ ├── ICPacketPlayerTryUseItemOnBlock.java │ │ │ │ ├── IMinecraft.java │ │ │ │ └── ICPacketPlayer.java │ │ │ ├── module │ │ │ │ ├── render │ │ │ │ │ ├── SeedOverlayModule.kt │ │ │ │ │ ├── WaypointsModule.kt │ │ │ │ │ ├── NoBossBarModule.java │ │ │ │ │ ├── StorageEspModule.kt │ │ │ │ │ ├── LowOffHandModule.java │ │ │ │ │ ├── search │ │ │ │ │ │ └── SearchConfiguration.kt │ │ │ │ │ ├── ViewportModule.kt │ │ │ │ │ └── VisionModule.kt │ │ │ │ ├── misc │ │ │ │ │ ├── TrueDurabilityModule.java │ │ │ │ │ ├── NoCompressionKick.kt │ │ │ │ │ └── MiddleClickIgnore.kt │ │ │ │ ├── movement │ │ │ │ │ ├── SafewalkModule.java │ │ │ │ │ ├── NoHungerModule.java │ │ │ │ │ ├── AutoWalkModule.java │ │ │ │ │ ├── SprintModule.java │ │ │ │ │ ├── EntityControlModule.java │ │ │ │ │ └── NoSlowDownModule.kt │ │ │ │ ├── combat │ │ │ │ │ ├── LazyItemSwitch.kt │ │ │ │ │ ├── AutoRespawnModule.java │ │ │ │ │ ├── AutoDisconnectModule.java │ │ │ │ │ ├── BlinkModule.kt │ │ │ │ │ └── BowSpamModule.java │ │ │ │ ├── player │ │ │ │ │ ├── TimerModule.java │ │ │ │ │ ├── LiquidInteractModule.kt │ │ │ │ │ ├── XCarryModule.java │ │ │ │ │ └── BetterPortalsModule.kt │ │ │ │ ├── ClickGuiModule.kt │ │ │ │ └── exploit │ │ │ │ │ ├── EnderBackpackModule.java │ │ │ │ │ └── NetHandlerModule.java │ │ │ ├── util │ │ │ │ ├── json │ │ │ │ │ ├── ISerializable.java │ │ │ │ │ └── JsonUtil.java │ │ │ │ ├── data │ │ │ │ │ └── Vec2i.java │ │ │ │ ├── MouseButton.kt │ │ │ │ ├── WorldGenerationUtils.java │ │ │ │ ├── Timer.java │ │ │ │ ├── font │ │ │ │ │ ├── Fonts.kt │ │ │ │ │ ├── FontRenderer.java │ │ │ │ │ └── BasicFontRenderer.java │ │ │ │ ├── ChatUtils.java │ │ │ │ ├── minecraft │ │ │ │ │ └── ESP │ │ │ │ │ │ ├── OutlineShader.java │ │ │ │ │ │ └── GlowShader.java │ │ │ │ ├── Utils.java │ │ │ │ └── Serializable.kt │ │ │ ├── crack │ │ │ │ ├── StructureGenerator.kt │ │ │ │ ├── MineshaftGenerator.kt │ │ │ │ └── BiomeGenerator.kt │ │ │ ├── command │ │ │ │ ├── SaveCommand.java │ │ │ │ ├── PeekCommand.java │ │ │ │ ├── PrefixCommand.java │ │ │ │ ├── SoftLeaveCommand.java │ │ │ │ ├── HelpCommand.java │ │ │ │ ├── DrawnCommand.kt │ │ │ │ ├── BindCommand.java │ │ │ │ ├── NbtDumpCommand.kt │ │ │ │ ├── TeleportCommand.java │ │ │ │ ├── Command.java │ │ │ │ ├── FriendCommand.java │ │ │ │ ├── ToggleCommand.java │ │ │ │ ├── ModuleListCommand.kt │ │ │ │ ├── DiscordRPCEditCommand.java │ │ │ │ └── SearchCommand.kt │ │ │ ├── managers │ │ │ │ ├── FileManager.kt │ │ │ │ ├── PopupManager.java │ │ │ │ └── MacroManager.kt │ │ │ ├── macro │ │ │ │ └── Macro.kt │ │ │ ├── value │ │ │ │ ├── kotlin │ │ │ │ │ └── ValueDelegate.kt │ │ │ │ ├── NumberValue.java │ │ │ │ └── StringValue.java │ │ │ └── config │ │ │ │ └── MacroConfig.kt │ │ │ └── LoadClient.java │ └── cookiedragon234 │ │ └── falcon │ │ ├── antidump │ │ └── antis │ │ │ ├── Anti0x22.kt │ │ │ ├── AntiBella.kt │ │ │ ├── AntiDarki.kt │ │ │ ├── AntiBabbaj.kt │ │ │ ├── AntiJohn200410.kt │ │ │ └── AntiPaster.kt │ │ ├── loading │ │ └── RaionURL.java │ │ ├── authentication │ │ ├── hwid │ │ │ ├── ByteConverter.java │ │ │ └── HwidGetter.java │ │ └── HttpUtil.java │ │ └── RaionMod.java │ ├── dev │ └── binclub │ │ └── fps │ │ └── client │ │ └── utils │ │ └── RenderBindable.kt │ └── team │ └── stiff │ └── pomelo │ ├── dispatch │ └── EventDispatcher.java │ ├── filter │ ├── EventFilterScanner.java │ └── EventFilter.java │ ├── impl │ └── annotated │ │ ├── handler │ │ ├── scan │ │ │ ├── AnnotatedListenerPredicate.java │ │ │ └── MethodHandlerScanner.java │ │ └── annotation │ │ │ └── Listener.java │ │ ├── dispatch │ │ └── MethodEventDispatcher.java │ │ └── filter │ │ └── MethodFilterScanner.java │ ├── handler │ ├── scan │ │ └── EventHandlerScanner.java │ ├── ListenerPriority.java │ └── EventHandler.java │ └── EventManager.java ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── libs └── java-discord-rpc-2.0.1-all.jar ├── gradle.properties └── .gitignore /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # raion 2 | A hacked client oriented at the server 2b2t.org made by [x4e](https://github.com/x4e) and Robeart 3 | -------------------------------------------------------------------------------- /src/main/resources/falcon/d.bfi: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/falcon/d.bfi -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /libs/java-discord-rpc-2.0.1-all.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/libs/java-discord-rpc-2.0.1-all.jar -------------------------------------------------------------------------------- /src/main/resources/falcon/libRaionNative.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/falcon/libRaionNative.dll -------------------------------------------------------------------------------- /src/main/resources/falcon/libRaionNative.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/falcon/libRaionNative.so -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | modGroup=me.robeart 2 | modVersion=1.0-SNAPSHOT 3 | modBaseName=raion 4 | forgeVersion=1.12.2-14.23.5.2847 5 | mcpVersion=stable_39 6 | -------------------------------------------------------------------------------- /src/main/resources/falcon/libRaionNative.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/falcon/libRaionNative.dylib -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/entity/MixinEntityBoat.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.entity; 2 | 3 | public class MixinEntityBoat { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/gui/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/gui/logo.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/cape/cape0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/cape/cape0.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/cape/cape1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/cape/cape1.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/cape/cape6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/cape/cape6.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/gui/font/f.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/gui/font/f.ttf -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/entity/living/MixinEntityWolf.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.entity.living; 2 | 3 | public class MixinEntityWolf { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/gui/font/font.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/gui/font/font.ttf -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/gui/font/ascii.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/gui/font/ascii.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/gui/clickgui/misc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/gui/clickgui/misc.png -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickguirework/Gui.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickguirework; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public class Gui { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/gui/clickgui/combat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/gui/clickgui/combat.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/gui/clickgui/exploit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/gui/clickgui/exploit.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/gui/clickgui/movement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/gui/clickgui/movement.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/gui/clickgui/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/gui/clickgui/player.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/gui/clickgui/render.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/gui/clickgui/render.png -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/textures/gui/font/Product Sans Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ropro2002/raion-public/HEAD/src/main/resources/assets/minecraft/textures/gui/font/Product Sans Italic.ttf -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/player/OnUpdateEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.player; 2 | 3 | public class OnUpdateEvent { 4 | public OnUpdateEvent() { 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/IEntityPlayerSP.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | public interface IEntityPlayerSP { 4 | 5 | void setHorseJumpPower(float horseJumpPower); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickguirework/settings/BindSetting.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickguirework.settings; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public class BindSetting { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickguirework/settings/EnumSetting.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickguirework.settings; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public class EnumSetting { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickguirework/settings/IntSetting.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickguirework.settings; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public class IntSetting { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/render/SeedOverlayModule.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.render 2 | 3 | /** 4 | * @author cookiedragon234 12/Aug/2020 5 | */ 6 | object SeedOverlayModule { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/LightmapUpdateEvent.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render 2 | 3 | /** 4 | * @author cookiedragon234 27/Mar/2020 5 | */ 6 | class LightmapUpdateEvent 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickguirework/settings/DoubleSetting.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickguirework.settings; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public class DoubleSetting { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickguirework/settings/FloatSetting.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickguirework.settings; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public class FloatSetting { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickguirework/settings/StringSetting.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickguirework.settings; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public class StringSetting { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickguirework/settings/BooleanSetting.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickguirework.settings; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public class BooleanSetting { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/IItemTool.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public interface IItemTool { 7 | 8 | float getAttackDamage(); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/ICPacketCloseWindow.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public interface ICPacketCloseWindow { 7 | 8 | int getWindowId(); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/ICPacketChatMessage.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public interface ICPacketChatMessage { 7 | 8 | void setMessage(String msg); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/block/IsLiquidSolidEvent.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.block 2 | 3 | /** 4 | * @author cookiedragon234 25/Mar/2020 5 | */ 6 | data class IsLiquidSolidEvent( 7 | var solid: Boolean 8 | ) 9 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/entity/PigTravelEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.entity; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class PigTravelEvent extends EventCancellable { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/SetupFogEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class SetupFogEvent extends EventCancellable { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/entity/CanBeSteeredEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.entity; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class CanBeSteeredEvent extends EventCancellable { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/CloseScreenEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class CloseScreenEvent extends EventCancellable { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/OrientCameraEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class OrientCameraEvent extends EventCancellable { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/IMixinPlayerControllerMP.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | /** 4 | * @author cookiedragon234 25/Jul/2020 5 | */ 6 | public interface IMixinPlayerControllerMP { 7 | void invokeSyncCurrentPlayItem(); 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/entity/ShouldStopElytraEvent.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.entity 2 | 3 | /** 4 | * @author cookiedragon234 29/Mar/2020 5 | */ 6 | data class ShouldStopElytraEvent( 7 | var isWorldRemote: Boolean 8 | ) 9 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/player/PushedByWaterEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.player; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class PushedByWaterEvent extends EventCancellable { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/SetOpaqueCubeEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class SetOpaqueCubeEvent extends EventCancellable { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/IRenderManager.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | public interface IRenderManager { 4 | 5 | double getRenderPosX(); 6 | 7 | double getRenderPosY(); 8 | 9 | double getRenderPosZ(); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/ITimer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public interface ITimer { 7 | 8 | float getTickLength(); 9 | 10 | void setTickLength(float timerSpeed); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/network/PacketExceptionEvent.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.network 2 | 3 | import me.robeart.raion.client.events.EventCancellable 4 | 5 | class PacketExceptionEvent(eventStage: EventStage): EventCancellable() 6 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/HurtCameraEffectEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class HurtCameraEffectEvent extends EventCancellable { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/IEntityRenderer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public interface IEntityRenderer { 7 | 8 | void setupCameraTransform0(float partialTicks, int pass); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/entity/AbstractHorseSaddledEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.entity; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class AbstractHorseSaddledEvent extends EventCancellable { 6 | } 7 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Jan 06 11:47:07 PST 2020 2 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.3-all.zip 3 | distributionBase=GRADLE_USER_HOME 4 | distributionPath=wrapper/dists 5 | zipStorePath=wrapper/dists 6 | zipStoreBase=GRADLE_USER_HOME 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/player/IsEntityInsideOpaqueBlockEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.player; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class IsEntityInsideOpaqueBlockEvent extends EventCancellable { 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/ISPacketExplosion.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | public interface ISPacketExplosion { 4 | 5 | void setMotionX(float motionX); 6 | 7 | void setMotionY(float motionY); 8 | 9 | void setMotionZ(float motionZ); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/block/MixinBlockSoulSand.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.block; 2 | 3 | import net.minecraft.block.BlockSoulSand; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | @Mixin(BlockSoulSand.class) 7 | public abstract class MixinBlockSoulSand { 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/anchor/AnchorPointDirection.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.anchor 2 | 3 | /** 4 | * @author cookiedragon234 17/Jun/2020 5 | */ 6 | enum class AnchorPointDirection { 7 | TOP_LEFT, 8 | TOP_RIGHT, 9 | BOTTOM_RIGHT, 10 | BOTTOM_LEFT; 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/render/WaypointsModule.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.render 2 | 3 | import me.robeart.raion.client.module.Module 4 | 5 | /** 6 | * @author cookiedragon234 24/May/2020 7 | */ 8 | object WaypointsModule: Module("Waypoints", "Render waypoints", Category.RENDER) 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # eclipse 2 | bin 3 | *.launch 4 | .settings 5 | .metadata 6 | .classpath 7 | .project 8 | 9 | # idea 10 | out 11 | *.ipr 12 | *.iws 13 | *.iml 14 | .idea 15 | 16 | # gradle 17 | build 18 | .gradle 19 | 20 | # other 21 | eclipse 22 | run 23 | 24 | # Weird mac file that can be pushed 25 | .DS_Store 26 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/network/HandleDisconnectionEvent.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.network 2 | 3 | import me.robeart.raion.client.events.EventCancellable 4 | 5 | /** 6 | * @author cookiedragon234 22/May/2020 7 | */ 8 | class HandleDisconnectionEvent: EventCancellable() 9 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/RenderBossBarEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | /** 6 | * @author cats 7 | */ 8 | public class RenderBossBarEvent extends EventCancellable { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/world/GetLiquidDownwardsFlowEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.world; 2 | 3 | public class GetLiquidDownwardsFlowEvent { 4 | public double flow; 5 | 6 | public GetLiquidDownwardsFlowEvent(double flow) { 7 | this.flow = flow; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/entity/ShouldWalkOffEdgeEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.entity; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | /** 6 | * @author Robeart 7 | */ 8 | public class ShouldWalkOffEdgeEvent extends EventCancellable { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/IEntity.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public interface IEntity { 7 | 8 | void setIsInWeb(boolean isInWeb); 9 | 10 | void setInPortal(boolean inPortal); 11 | 12 | void setFlag0(int flag, boolean set); 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/IMixinItemRenderer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | /** 4 | * @author cats 5 | */ 6 | public interface IMixinItemRenderer { 7 | void setEquippedProgressOffHand(float equippedProgressOffHand); 8 | void setEquippedProgressMainHand(float equippedProgressMainHand); 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/ISPacketEntityVelocity.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public interface ISPacketEntityVelocity { 7 | 8 | void setMotionX(int motionX); 9 | 10 | void setMotionY(int motionY); 11 | 12 | void setMotionZ(int motionZ); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/json/ISerializable.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util.json; 2 | 3 | import com.google.gson.JsonObject; 4 | 5 | /** 6 | * @author cookiedragon234 11/Nov/2019 7 | */ 8 | public interface ISerializable { 9 | JsonObject serialize(); 10 | 11 | void deserialize(JsonObject jsonObject); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/ISPacketPlayerPosLook.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | /** 4 | * @author cats 5 | */ 6 | public interface ISPacketPlayerPosLook { 7 | 8 | float getYaw(); 9 | 10 | void setYaw(float yaw); 11 | 12 | float getPitch(); 13 | 14 | void setPitch(float pitch); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/ICPacketPlayerTryUseItemOnBlock.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | import net.minecraft.util.EnumFacing; 4 | 5 | /** 6 | * @author Robeart 25/07/2020 7 | */ 8 | public interface ICPacketPlayerTryUseItemOnBlock { 9 | 10 | void setDirection(EnumFacing placedBlockDirection); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/me/cookiedragon234/falcon/antidump/antis/Anti0x22.kt: -------------------------------------------------------------------------------- 1 | package me.cookiedragon234.falcon.antidump.antis 2 | 3 | /** 4 | * @author cookiedragon234 03/Mar/2020 5 | */ 6 | object Anti0x22: AntiPaster { 7 | override fun pasterDown(name: String) { 8 | if (name.equals("0x22", true)) { 9 | AntiPaster.eleminateThePaster() 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/me/cookiedragon234/falcon/antidump/antis/AntiBella.kt: -------------------------------------------------------------------------------- 1 | package me.cookiedragon234.falcon.antidump.antis 2 | 3 | /** 4 | * @author cookiedragon234 03/Mar/2020 5 | */ 6 | object AntiBella: AntiPaster { 7 | override fun pasterDown(name: String) { 8 | if (name.equals("Bella", true)) { 9 | AntiPaster.eleminateThePaster() 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/me/cookiedragon234/falcon/antidump/antis/AntiDarki.kt: -------------------------------------------------------------------------------- 1 | package me.cookiedragon234.falcon.antidump.antis 2 | 3 | /** 4 | * @author cookiedragon234 03/Mar/2020 5 | */ 6 | object AntiDarki: AntiPaster { 7 | override fun pasterDown(name: String) { 8 | if (name.equals("Darki", true)) { 9 | AntiPaster.eleminateThePaster() 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/client/GetPlayerTabTextureEvent.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.client 2 | 3 | import net.minecraft.client.network.NetworkPlayerInfo 4 | 5 | /** 6 | * @author cookiedragon234 03/Mar/2020 7 | */ 8 | data class GetPlayerTabTextureEvent(val networkPlayerInfo: NetworkPlayerInfo, var shouldLoad: Boolean) 9 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/hud/Popup.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.hud; 2 | 3 | public interface Popup { 4 | 5 | void render(); 6 | 7 | int getY(); 8 | 9 | void setY(int y); 10 | 11 | int getTime(); 12 | 13 | void setTime(int time); 14 | 15 | boolean getDestroy(); 16 | 17 | void setDestroy(boolean destroy); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/me/cookiedragon234/falcon/antidump/antis/AntiBabbaj.kt: -------------------------------------------------------------------------------- 1 | package me.cookiedragon234.falcon.antidump.antis 2 | 3 | /** 4 | * @author cookiedragon234 03/Mar/2020 5 | */ 6 | object AntiBabbaj: AntiPaster { 7 | override fun pasterDown(name: String) { 8 | if (name.equals("Babbaj", true)) { 9 | AntiPaster.eleminateThePaster() 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/me/cookiedragon234/falcon/antidump/antis/AntiJohn200410.kt: -------------------------------------------------------------------------------- 1 | package me.cookiedragon234.falcon.antidump.antis 2 | 3 | /** 4 | * @author cookiedragon234 03/Mar/2020 5 | */ 6 | object AntiJohn200410: AntiPaster { 7 | override fun pasterDown(name: String) { 8 | if (name.equals("john200410", true)) { 9 | AntiPaster.eleminateThePaster() 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/client/UnpressAllKeysEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.client; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | /** 6 | * @author cookiedragon234 12/Nov/2019 7 | */ 8 | public class UnpressAllKeysEvent extends EventCancellable { 9 | public boolean shouldUnpress = true; 10 | } 11 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/IMinecraft.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | import net.minecraft.util.Timer; 4 | 5 | /** 6 | * @author Robeart 7 | */ 8 | public interface IMinecraft { 9 | 10 | int getRightClickDelayTimer(); 11 | 12 | void setRightClickDelayTimer(int rightClickDelayTimer); 13 | 14 | Timer getTimer(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/misc/TrueDurabilityModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.misc; 2 | 3 | import me.robeart.raion.client.module.Module; 4 | 5 | public class TrueDurabilityModule extends Module { 6 | 7 | public TrueDurabilityModule() { 8 | super("TrueDurability", "Show durability of thingys", Category.MISC); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/raion/shader/vertex.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | void main(void) { 4 | //Map gl_MultiTexCoord0 to index zero of gl_TexCoord 5 | gl_TexCoord[0] = gl_MultiTexCoord0; 6 | 7 | //Calculate position by multiplying model, view and projection matrix by the vertex vector 8 | gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/crack/StructureGenerator.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.crack 2 | 3 | import net.minecraft.util.math.ChunkPos 4 | import net.minecraft.world.World 5 | import java.util.Random 6 | 7 | /** 8 | * @author cookiedragon234 13/Jun/2020 9 | */ 10 | interface StructureGenerator { 11 | fun generateStructure(randomIn: Random, chunkCoord: ChunkPos) 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/dev/binclub/fps/client/utils/RenderBindable.kt: -------------------------------------------------------------------------------- 1 | package dev.binclub.fps.client.utils 2 | 3 | /** 4 | * @author cookiedragon234 05/Jul/2020 5 | */ 6 | interface RenderBindable { 7 | fun bind() 8 | fun unbind() 9 | } 10 | 11 | inline fun RenderBindable.use(block: () -> T): T { 12 | try { 13 | this.bind() 14 | return block() 15 | } finally { 16 | this.unbind() 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/data/Vec2i.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util.data; 2 | 3 | /** 4 | * @author cookiedragon234 11/Nov/2019 5 | */ 6 | public class Vec2i { 7 | public int x; 8 | public int y; 9 | 10 | public Vec2i(int x, int y) { 11 | this.x = x; 12 | this.y = y; 13 | } 14 | 15 | @Override 16 | public String toString() { 17 | return x + ", " + y; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/client/ToggleEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.client; 2 | 3 | import me.robeart.raion.client.module.Module; 4 | 5 | public class ToggleEvent { 6 | 7 | private Module module; 8 | 9 | public ToggleEvent(Module module) { 10 | this.module = module; 11 | } 12 | 13 | public Module getModule() { 14 | return module; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickguirework/Panel.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickguirework; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public class Panel extends Component { 7 | 8 | public Panel(int x, int y, int width, int heigth, int red, int green, int blue, int alpha, Component parent) { 9 | super(x, y, width, heigth, red, green, blue, alpha, parent); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/mcmod.info: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "modid": "raionloader", 4 | "name": "Raion Loader", 5 | "description": "A loader for the utility mod Raion", 6 | "version": "${version}", 7 | "mcversion": "${mcversion}", 8 | "url": "", 9 | "updateUrl": "", 10 | "authorList": ["Robeart", "Cookiedragon234"], 11 | "credits": "", 12 | "logoFile": "", 13 | "screenshots": [], 14 | "dependencies": [] 15 | } 16 | ] 17 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/crack/MineshaftGenerator.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.crack 2 | 3 | import net.minecraft.util.math.ChunkPos 4 | import java.util.Random 5 | 6 | /** 7 | * @author cookiedragon234 13/Jun/2020 8 | */ 9 | object MineshaftGenerator: StructureGenerator { 10 | override fun generateStructure(randomIn: Random, chunkCoord: ChunkPos) { 11 | TODO("Not yet implemented") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/imixin/ICPacketPlayer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.imixin; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public interface ICPacketPlayer { 7 | 8 | void setYaw(float yaw); 9 | 10 | void setPitch(float pitch); 11 | 12 | void setX(double x); 13 | 14 | void setY(double y); 15 | 16 | void setZ(double z); 17 | 18 | void setOnGround(boolean onGround); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/client/ClickMouseButtonEvent.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.client 2 | 3 | import me.robeart.raion.client.events.EventCancellable 4 | import me.robeart.raion.client.util.MouseButton 5 | 6 | /** 7 | * @author cookiedragon234 25/Mar/2020 8 | */ 9 | data class ClickMouseButtonEvent( 10 | val mouseButton: MouseButton 11 | ): EventCancellable(EventStage.PRE) 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/MouseButton.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util 2 | 3 | enum class MouseButton { 4 | LEFT, 5 | MIDDLE, 6 | RIGHT; 7 | 8 | companion object { 9 | fun fromState(buttonState: Int): MouseButton { 10 | return when (buttonState) { 11 | 0 -> LEFT 12 | 1 -> RIGHT 13 | 2 -> MIDDLE 14 | else -> error("Illegal state $buttonState") 15 | } 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/player/PushOutOfBlocksEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.player; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class PushOutOfBlocksEvent extends EventCancellable { 6 | public double x, y, z; 7 | 8 | public PushOutOfBlocksEvent(double x, double y, double z) { 9 | this.x = x; 10 | this.y = y; 11 | this.z = z; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/player/UpdateWalkingPlayerEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.player; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import me.robeart.raion.client.events.EventStageable; 5 | 6 | public class UpdateWalkingPlayerEvent extends EventCancellable { 7 | 8 | public UpdateWalkingPlayerEvent(EventStageable.EventStage stage) { 9 | super(stage); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/json/JsonUtil.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util.json; 2 | 3 | import com.google.gson.Gson; 4 | import com.google.gson.GsonBuilder; 5 | import com.google.gson.JsonParser; 6 | 7 | public final class JsonUtil { 8 | public static final Gson gson = new Gson(); 9 | public static final Gson prettyGson = new GsonBuilder().setPrettyPrinting().create(); 10 | public static final JsonParser jsonParser = new JsonParser(); 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/SaveCommand.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command; 2 | 3 | import me.robeart.raion.client.Raion; 4 | 5 | /** 6 | * @author Robeart 7 | */ 8 | public class SaveCommand extends Command { 9 | 10 | public SaveCommand() { 11 | super("Save", new String[]{"safe"}, "Save the config", "save"); 12 | } 13 | 14 | 15 | @Override 16 | public void call(String[] args) { 17 | Raion.INSTANCE.getConfigManager().saveAll(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/managers/FileManager.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.managers 2 | 3 | import net.minecraft.client.Minecraft 4 | import java.io.File 5 | 6 | /** 7 | * @author Robeart 8 | */ 9 | class FileManager { 10 | 11 | val mc = Minecraft.getMinecraft() 12 | 13 | val dir = File(mc.gameDir, "raion") 14 | 15 | init { 16 | setupFolder() 17 | } 18 | 19 | fun setupFolder() { 20 | if (!dir.exists()) dir.mkdir() 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/client/GetKeyStateEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.client; 2 | 3 | import net.minecraft.client.settings.KeyBinding; 4 | 5 | /** 6 | * @author cookiedragon234 12/Nov/2019 7 | */ 8 | public class GetKeyStateEvent { 9 | public final KeyBinding keyBinding; 10 | public boolean value; 11 | 12 | public GetKeyStateEvent(KeyBinding keyBinding, boolean value) { 13 | this.keyBinding = keyBinding; 14 | this.value = value; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/gui/MixinGuiScreen.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.gui; 2 | 3 | import net.minecraft.client.Minecraft; 4 | import net.minecraft.client.gui.GuiScreen; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.Shadow; 7 | 8 | @Mixin(GuiScreen.class) 9 | public class MixinGuiScreen { 10 | 11 | @Shadow 12 | public int width; 13 | 14 | @Shadow 15 | public int height; 16 | 17 | @Shadow 18 | public Minecraft mc; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/dispatch/EventDispatcher.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo.dispatch; 2 | 3 | /** 4 | * The dispatcher handles invocation of all registered listeners. 5 | * 6 | * @author Daniel 7 | * @since May 31, 2017 8 | */ 9 | public interface EventDispatcher { 10 | 11 | /** 12 | * Dispatch all listeners that are listening for the 13 | * given event. 14 | * 15 | * @param event event instance 16 | * @param event type 17 | */ 18 | void dispatch(E event); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/filter/EventFilterScanner.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo.filter; 2 | 3 | import java.util.Set; 4 | 5 | /** 6 | * Scans a listener for any filters associated with the listener. 7 | * 8 | * @author Daniel 9 | * @since Jun 13, 2017 10 | */ 11 | public interface EventFilterScanner { 12 | 13 | /** 14 | * Finds all associated filters with the given listener 15 | * type. 16 | * 17 | * @param listener listener instance 18 | */ 19 | Set scan(T listener); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/item/MixinItemTool.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.item; 2 | 3 | import me.robeart.raion.client.imixin.IItemTool; 4 | import net.minecraft.item.ItemTool; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | /** 9 | * @author Robeart 10 | */ 11 | @Mixin(ItemTool.class) 12 | public abstract class MixinItemTool implements IItemTool { 13 | 14 | @Accessor(value = "attackDamage") 15 | public abstract float getAttackDamage(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/player/SwingArmEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.player; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.util.EnumHand; 5 | 6 | public class SwingArmEvent extends EventCancellable { 7 | 8 | private EnumHand hand; 9 | 10 | public SwingArmEvent(EnumHand hand) { 11 | this.hand = hand; 12 | } 13 | 14 | public EnumHand getHand() { 15 | return this.hand; 16 | } 17 | 18 | public void setHand(EnumHand hand) { 19 | this.hand = hand; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/entity/AddEntityVelocityEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.entity; 2 | 3 | import net.minecraft.entity.Entity; 4 | 5 | import javax.annotation.Nullable; 6 | 7 | public class AddEntityVelocityEvent { 8 | @Nullable 9 | public Entity entity; 10 | public double x; 11 | public double y; 12 | public double z; 13 | 14 | public AddEntityVelocityEvent(@Nullable Entity entity, double x, double y, double z) { 15 | this.entity = entity; 16 | this.x = x; 17 | this.y = y; 18 | this.z = z; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/macro/Macro.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.macro 2 | 3 | import me.robeart.raion.client.util.ChatUtils 4 | import me.robeart.raion.client.util.Key 5 | import net.minecraft.client.Minecraft 6 | 7 | /** 8 | * @author cats 9 | */ 10 | data class Macro(var bind: Key, var commands: String) { 11 | fun run() { 12 | ChatUtils.message("Executed macro for key $bind") 13 | for (string in commands.split(";")) { 14 | if (!string.isBlank()) { 15 | Minecraft.getMinecraft().player.sendChatMessage(string) 16 | } 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/entity/HorseJumpStrengthEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.entity; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | public class HorseJumpStrengthEvent extends EventCancellable { 6 | 7 | private double strength; 8 | 9 | public HorseJumpStrengthEvent(double strength) { 10 | this.strength = strength; 11 | } 12 | 13 | public double getStrength() { 14 | return strength; 15 | } 16 | 17 | public void setStrength(double strength) { 18 | this.strength = strength; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/PeekCommand.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command; 2 | 3 | 4 | import net.minecraft.item.ItemShulkerBox; 5 | import net.minecraft.tileentity.TileEntityShulkerBox; 6 | 7 | public class PeekCommand extends Command { 8 | 9 | public static TileEntityShulkerBox sb; 10 | 11 | public PeekCommand() { 12 | super("Peek", "See inside a shulkerbox", "peek"); 13 | } 14 | 15 | @Override 16 | public void call(String[] args) { 17 | if (mc.player.getHeldItemMainhand().getItem() instanceof ItemShulkerBox) { 18 | } 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/player/ApplyCollisionEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.player; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.entity.Entity; 5 | 6 | public class ApplyCollisionEvent extends EventCancellable { 7 | 8 | Entity entity; 9 | 10 | public ApplyCollisionEvent(Entity entity) { 11 | this.entity = entity; 12 | } 13 | 14 | public Entity getEntity() { 15 | return entity; 16 | } 17 | 18 | public void setEntity(Entity entity) { 19 | this.entity = entity; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/render/IMixinRenderGlobal.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.render; 2 | 3 | import net.minecraft.client.renderer.DestroyBlockProgress; 4 | import net.minecraft.client.renderer.RenderGlobal; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | import java.util.Map; 9 | 10 | /** 11 | * @author cookiedragon234 08/Jun/2020 12 | */ 13 | @Mixin(RenderGlobal.class) 14 | public interface IMixinRenderGlobal { 15 | @Accessor 16 | Map getDamagedBlocks(); 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/me/cookiedragon234/falcon/loading/RaionURL.java: -------------------------------------------------------------------------------- 1 | package me.cookiedragon234.falcon.loading; 2 | 3 | import java.io.IOException; 4 | import java.net.URL; 5 | import java.net.URLConnection; 6 | import java.net.URLStreamHandler; 7 | 8 | /** 9 | * @author cookiedragon234 10/Jun/2020 10 | */ 11 | public class RaionURL extends URLStreamHandler { 12 | byte[] resource; 13 | 14 | public RaionURL(byte[] resource) { 15 | this.resource = resource; 16 | } 17 | 18 | @Override 19 | protected URLConnection openConnection(URL u) throws IOException { 20 | return null; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/impl/annotated/handler/scan/AnnotatedListenerPredicate.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo.impl.annotated.handler.scan; 2 | 3 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 4 | 5 | import java.lang.reflect.Method; 6 | import java.util.function.Predicate; 7 | 8 | public final class AnnotatedListenerPredicate implements Predicate { 9 | 10 | @Override 11 | public boolean test(final Method method) { 12 | return method.isAnnotationPresent(Listener.class) && 13 | method.getParameterCount() == 1; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/EventStageable.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events; 2 | 3 | public class EventStageable { 4 | private EventStageable.EventStage stage; 5 | 6 | public EventStageable() { 7 | } 8 | 9 | public EventStageable(EventStageable.EventStage stage) { 10 | this.stage = stage; 11 | } 12 | 13 | public EventStageable.EventStage getStage() { 14 | return this.stage; 15 | } 16 | 17 | public void setStage(EventStageable.EventStage stage) { 18 | this.stage = stage; 19 | } 20 | 21 | public enum EventStage { 22 | PRE, 23 | POST 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/ShouldSideRenderEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.block.Block; 5 | 6 | public class ShouldSideRenderEvent extends EventCancellable { 7 | 8 | private Block block; 9 | 10 | public ShouldSideRenderEvent(Block block) { 11 | this.block = block; 12 | } 13 | 14 | public Block getBlock() { 15 | return this.block; 16 | } 17 | 18 | public void setBlock(Block block) { 19 | this.block = block; 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/value/kotlin/ValueDelegate.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.value.kotlin 2 | 3 | import me.robeart.raion.client.value.Value 4 | import kotlin.reflect.KProperty 5 | 6 | /** 7 | * @author cookiedragon234 27/Mar/2020 8 | */ 9 | class ValueDelegate>(val value: T) { 10 | fun getActualValue(): T = value 11 | 12 | operator fun getValue(thisRef: Any?, property: KProperty<*>): F { 13 | return value.value 14 | } 15 | 16 | operator fun setValue(thisRef: Any?, property: KProperty<*>, newVal: F) { 17 | value.value = newVal 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/LoadClient.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion; 2 | 3 | import me.cookiedragon234.falcon.NativeAccessor; 4 | import me.robeart.raion.client.Raion; 5 | import net.minecraftforge.fml.common.event.FMLInitializationEvent; 6 | 7 | /** 8 | * @author Robeart 9 | */ 10 | public class LoadClient { 11 | static { 12 | NativeAccessor.println("Load Client clinit"); 13 | } 14 | 15 | public LoadClient() { 16 | NativeAccessor.println("Load Client initialization"); 17 | } 18 | 19 | public void init(FMLInitializationEvent event) { 20 | Raion.INSTANCE.initClient(); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/network/PlayerLeaveEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.network; 2 | 3 | import com.mojang.authlib.GameProfile; 4 | 5 | /** 6 | * @author Robeart 7 | */ 8 | public class PlayerLeaveEvent { 9 | 10 | private GameProfile gameProfile; 11 | 12 | public PlayerLeaveEvent(GameProfile gameProfile) { 13 | this.gameProfile = gameProfile; 14 | } 15 | 16 | public GameProfile getGameProfile() { 17 | return gameProfile; 18 | } 19 | 20 | public void setGameProfile(GameProfile gameProfile) { 21 | this.gameProfile = gameProfile; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/network/PacketReceiveEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.network; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import me.robeart.raion.client.events.EventStageable; 5 | import net.minecraft.network.Packet; 6 | 7 | public class PacketReceiveEvent extends EventCancellable { 8 | 9 | private Packet packet; 10 | 11 | public PacketReceiveEvent(EventStageable.EventStage stage, Packet packet) { 12 | super(stage); 13 | this.packet = packet; 14 | } 15 | 16 | public Packet getPacket() { 17 | return packet; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/network/PlayerJoinEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.network; 2 | 3 | import com.mojang.authlib.GameProfile; 4 | 5 | /** 6 | * @author Robeart 7 | */ 8 | public class PlayerJoinEvent { 9 | 10 | private GameProfile gameProfile; 11 | 12 | public PlayerJoinEvent(GameProfile gameProfile) { 13 | this.gameProfile = gameProfile; 14 | } 15 | 16 | public GameProfile getGameProfile() { 17 | return gameProfile; 18 | } 19 | 20 | public void setGameProfile(GameProfile gameProfile) { 21 | this.gameProfile = gameProfile; 22 | } 23 | 24 | } 25 | 26 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/BlockStateAtEntityViewpointEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import net.minecraft.block.state.IBlockState; 4 | 5 | public class BlockStateAtEntityViewpointEvent { 6 | 7 | private IBlockState iBlockState; 8 | 9 | public BlockStateAtEntityViewpointEvent(IBlockState iBlockState) { 10 | this.iBlockState = iBlockState; 11 | } 12 | 13 | public IBlockState getiBlockState() { 14 | return iBlockState; 15 | } 16 | 17 | public void setiBlockState(IBlockState iBlockState) { 18 | this.iBlockState = iBlockState; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/world/RemoveEntityEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.world; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.entity.Entity; 5 | 6 | /** 7 | * @author Robeart 8 | */ 9 | public class RemoveEntityEvent extends EventCancellable { 10 | 11 | private Entity entity; 12 | 13 | public RemoveEntityEvent(Entity entity) { 14 | this.entity = entity; 15 | } 16 | 17 | public Entity getEntity() { 18 | return entity; 19 | } 20 | 21 | public void setEntity(Entity entity) { 22 | this.entity = entity; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/cookiedragon234/falcon/antidump/antis/AntiPaster.kt: -------------------------------------------------------------------------------- 1 | package me.cookiedragon234.falcon.antidump.antis 2 | 3 | import me.cookiedragon234.falcon.NativeAccessor 4 | 5 | /** 6 | * @author cookiedragon234 03/Mar/2020 7 | */ 8 | interface AntiPaster { 9 | fun pasterDown(name: String) 10 | 11 | companion object { 12 | inline fun eleminateThePaster(): Nothing { 13 | NativeAccessor.prepareTransformer(null, null, null, null) 14 | throw NullPointerException() 15 | //for (i in 0 until 50) { 16 | // println("Paster Down! ♪┏(・o・)┛♪┗ ( ・o・) ┓♪") 17 | //} 18 | //CookieFuckery.shutdownHard() 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/client/MixinTimer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.client; 2 | 3 | import me.robeart.raion.client.imixin.ITimer; 4 | import net.minecraft.util.Timer; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | /** 9 | * @author Robeart 10 | */ 11 | @Mixin(Timer.class) 12 | public abstract class MixinTimer implements ITimer { 13 | 14 | @Accessor(value = "tickLength") 15 | public abstract float getTickLength(); 16 | 17 | @Accessor(value = "tickLength") 18 | public abstract void setTickLength(float tickLength); 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/network/packet/client/MixinCPacketCloseWindow.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.network.packet.client; 2 | 3 | import me.robeart.raion.client.imixin.ICPacketCloseWindow; 4 | import net.minecraft.network.play.client.CPacketCloseWindow; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | /** 9 | * @author Robeart 10 | */ 11 | @Mixin(CPacketCloseWindow.class) 12 | public abstract class MixinCPacketCloseWindow implements ICPacketCloseWindow { 13 | 14 | @Accessor(value = "windowId") 15 | public abstract int getWindowId(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/network/packet/client/MixinCPacketChatMessage.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.network.packet.client; 2 | 3 | import me.robeart.raion.client.imixin.ICPacketChatMessage; 4 | import net.minecraft.network.play.client.CPacketChatMessage; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | /** 9 | * @author Robeart 10 | */ 11 | @Mixin(CPacketChatMessage.class) 12 | public abstract class MixinCPacketChatMessage implements ICPacketChatMessage { 13 | 14 | @Accessor(value = "message") 15 | public abstract void setMessage(String msg); 16 | 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/EventCancellable.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events; 2 | 3 | public class EventCancellable extends EventStageable { 4 | private boolean canceled; 5 | 6 | public EventCancellable() { 7 | } 8 | 9 | public EventCancellable(EventStageable.EventStage stage) { 10 | super(stage); 11 | } 12 | 13 | public EventCancellable(EventStageable.EventStage stage, boolean canceled) { 14 | super(stage); 15 | this.canceled = canceled; 16 | } 17 | 18 | public boolean isCanceled() { 19 | return this.canceled; 20 | } 21 | 22 | public void setCanceled(boolean canceled) { 23 | this.canceled = canceled; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/WorldGenerationUtils.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util; 2 | 3 | import java.util.Random; 4 | 5 | /** 6 | * @author cookiedragon234 09/Jun/2020 7 | */ 8 | public class WorldGenerationUtils { 9 | public static boolean isSlimeChunk(long seed, int chunkX, int chunkZ) { 10 | long lchunkX = chunkX; 11 | long lchunkZ = chunkZ; 12 | Random rnd = new Random( 13 | seed + 14 | (int) (lchunkX * lchunkX * 0x4c1906) + 15 | (int) (lchunkX * 0x5ac0db) + 16 | (int) (lchunkZ * lchunkZ) * 0x4307a7L + 17 | (int) (lchunkZ * 0x5f24f) ^ 0x3ad8025f 18 | ); 19 | 20 | return rnd.nextInt(10) == 0; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/Timer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util; 2 | 3 | public class Timer { 4 | 5 | private long time; 6 | 7 | public Timer() { 8 | this.time = -1L; 9 | } 10 | 11 | public boolean passed(double ms) { 12 | return System.currentTimeMillis() - this.time >= ms; 13 | } 14 | 15 | public boolean passed(int ms) { 16 | return System.currentTimeMillis() - this.time >= ms; 17 | } 18 | 19 | public void reset() { 20 | this.time = System.currentTimeMillis(); 21 | } 22 | 23 | public long getTime() { 24 | return this.time; 25 | } 26 | 27 | public void setTime(long time) { 28 | this.time = time; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/RenderOverlayEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | /** 6 | * @author Robeart 7 | */ 8 | public class RenderOverlayEvent extends EventCancellable { 9 | 10 | private OverlayType type; 11 | 12 | public RenderOverlayEvent(OverlayType type) { 13 | this.type = type; 14 | } 15 | 16 | public OverlayType getType() { 17 | return type; 18 | } 19 | 20 | public void setType(OverlayType type) { 21 | this.type = type; 22 | } 23 | 24 | public enum OverlayType { 25 | ITEM, 26 | LIQUID, 27 | FIRE 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/PrefixCommand.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.util.ChatUtils; 5 | 6 | public class PrefixCommand extends Command { 7 | 8 | public PrefixCommand() { 9 | super("Prefix", "Set the prefix", "prefix [prefix]"); 10 | } 11 | 12 | @Override 13 | public void call(String[] args) { 14 | if (args.length == 0) { 15 | ChatUtils.message("Please specify what you would like as prefix!"); 16 | return; 17 | } 18 | Raion.INSTANCE.getCommandManager().setPrefix(args[0]); 19 | ChatUtils.message("Prefix has been changed to: " + args[0]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/DisplayGuiScreenEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.client.gui.GuiScreen; 5 | 6 | /** 7 | * @author Robeart 8 | */ 9 | public class DisplayGuiScreenEvent extends EventCancellable { 10 | 11 | private GuiScreen guiScreen; 12 | 13 | public DisplayGuiScreenEvent(GuiScreen guiScreen) { 14 | this.guiScreen = guiScreen; 15 | } 16 | 17 | public GuiScreen getGuiScreen() { 18 | return guiScreen; 19 | } 20 | 21 | public void setGuiScreen(GuiScreen guiScreen) { 22 | this.guiScreen = guiScreen; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/SoftLeaveCommand.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command; 2 | 3 | import net.minecraft.client.gui.GuiMainMenu; 4 | import net.minecraft.client.gui.GuiMultiplayer; 5 | 6 | /** 7 | * @author cookiedragon234 18/Jan/2020 8 | */ 9 | public class SoftLeaveCommand extends Command { 10 | public SoftLeaveCommand() { 11 | super("softleave", "Leave without closing the connection", "softleave {unload}"); 12 | } 13 | 14 | @Override 15 | public void call(String[] args) { 16 | if (args.length >= 1 && args[0].equals("unload")) { 17 | mc.loadWorld(null); 18 | } 19 | 20 | mc.currentScreen = new GuiMultiplayer(new GuiMainMenu()); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/world/ChunkEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.world; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.network.play.server.SPacketChunkData; 5 | import net.minecraft.world.chunk.Chunk; 6 | 7 | public class ChunkEvent extends EventCancellable { 8 | 9 | private Chunk chunk; 10 | private SPacketChunkData data; 11 | 12 | public ChunkEvent(Chunk chunk, SPacketChunkData data) { 13 | this.chunk = chunk; 14 | this.data = data; 15 | } 16 | 17 | public Chunk getChunk() { 18 | return chunk; 19 | } 20 | 21 | public SPacketChunkData getData() { 22 | return data; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/movement/SafewalkModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.movement; 2 | 3 | import me.robeart.raion.client.events.events.entity.ShouldWalkOffEdgeEvent; 4 | import me.robeart.raion.client.module.Module; 5 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 6 | 7 | /** 8 | * @author Robeart 9 | */ 10 | public class SafewalkModule extends Module { 11 | 12 | public SafewalkModule() { 13 | super("SafeWalk", "Stops you from walking off of the edge of a block", Category.MOVEMENT); 14 | } 15 | 16 | @Listener 17 | public void shouldWalkOfEdge(ShouldWalkOffEdgeEvent event) { 18 | event.setCanceled(true); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/render/NoBossBarModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.render; 2 | 3 | import me.robeart.raion.client.events.events.render.RenderBossBarEvent; 4 | import me.robeart.raion.client.module.Module; 5 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 6 | 7 | /** 8 | * @author cats 9 | */ 10 | public class NoBossBarModule extends Module { 11 | 12 | public NoBossBarModule() { 13 | super("NoBossBar", "Hides the boss health bar on entities like withers and enderdragons", Category.RENDER); 14 | } 15 | 16 | @Listener 17 | public void onRenderBossBar(RenderBossBarEvent event) { 18 | event.setCanceled(true); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/RebuildChunkEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventStageable; 4 | import net.minecraft.client.renderer.chunk.RenderChunk; 5 | 6 | public class RebuildChunkEvent extends EventStageable { 7 | 8 | private RenderChunk renderChunk; 9 | 10 | public RebuildChunkEvent(EventStage stage, RenderChunk renderChunk) { 11 | super(stage); 12 | this.renderChunk = renderChunk; 13 | } 14 | 15 | public RenderChunk getRenderChunk() { 16 | return renderChunk; 17 | } 18 | 19 | public void setRenderChunk(RenderChunk renderChunk) { 20 | this.renderChunk = renderChunk; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/elements/ServerBrandElement.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.elements 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting 4 | import me.robeart.raion.client.gui.cui.element.CuiElement 5 | import me.robeart.raion.client.util.Utils 6 | import net.minecraft.util.math.Vec2f 7 | 8 | /** 9 | * @author Robeart 22/07/2020 10 | */ 11 | class ServerBrandElement: CuiElement() { 12 | override fun render(mousePos: Vec2f) { 13 | super.render(mousePos) 14 | 15 | val brand = mc.player.serverBrand 16 | val text = "${ChatFormatting.GRAY}Brand ${ChatFormatting.WHITE}$brand" 17 | drawText(text, Utils.getRgb(255, 255, 255, 255)) 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/me/cookiedragon234/falcon/authentication/hwid/ByteConverter.java: -------------------------------------------------------------------------------- 1 | package me.cookiedragon234.falcon.authentication.hwid; 2 | 3 | public class ByteConverter { 4 | private static final char[] bytes; 5 | 6 | static { 7 | bytes = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; 8 | } 9 | 10 | public static String bytesToStr(final byte[] array) { 11 | final int length; 12 | final char[] array2 = new char[(length = array.length) << 1]; 13 | int i = 0; 14 | int n = 0; 15 | while (i < length) { 16 | array2[n++] = bytes[(0xF0 & array[i]) >>> 4]; 17 | array2[n++] = bytes[0xF & array[i]]; 18 | ++i; 19 | } 20 | return new String(array2); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/Render3DEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | public class Render3DEvent { 4 | private float partialTicks; 5 | private long pass; 6 | 7 | public Render3DEvent(float partialTicks, long finishTimeNano) { 8 | this.partialTicks = partialTicks; 9 | this.pass = finishTimeNano; 10 | } 11 | 12 | public float getPartialTicks() { 13 | return this.partialTicks; 14 | } 15 | 16 | public void setPartialTicks(float partialTicks) { 17 | this.partialTicks = partialTicks; 18 | } 19 | 20 | public long getPass() { 21 | return this.pass; 22 | } 23 | 24 | public void setPass(long pass) { 25 | this.pass = pass; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/elements/PingElement.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.elements 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting 4 | import me.robeart.raion.client.gui.cui.element.CuiElement 5 | import me.robeart.raion.client.util.Utils 6 | import net.minecraft.util.math.Vec2f 7 | 8 | /** 9 | * @author Robeart 22/07/2020 10 | */ 11 | class PingElement: CuiElement() { 12 | override fun render(mousePos: Vec2f) { 13 | super.render(mousePos) 14 | 15 | val ping = mc.player.connection.getPlayerInfo(mc.player.uniqueID).responseTime 16 | val text = "${ChatFormatting.GRAY}Ping ${ChatFormatting.WHITE}$ping" 17 | drawText(text, Utils.getRgb(255, 255, 255, 255)) 18 | } 19 | } -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/HelpCommand.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.util.ChatUtils; 5 | 6 | public class HelpCommand extends Command { 7 | 8 | public HelpCommand() { 9 | super("Help", new String[]{"?", "wtf"}, "show the help screen", "help"); 10 | } 11 | 12 | @Override 13 | public void call(String[] args) { 14 | StringBuilder text = new StringBuilder("Avalaible commands:\n"); 15 | for (Command c : Raion.INSTANCE.getCommandManager().getCommandList()) { 16 | text.append(c.getName()) 17 | .append(": ") 18 | .append(c.getUsage()) 19 | .append("\n"); 20 | } 21 | ChatUtils.message(text.toString()); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/handler/scan/EventHandlerScanner.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo.handler.scan; 2 | 3 | import team.stiff.pomelo.handler.EventHandler; 4 | 5 | import java.util.Map; 6 | import java.util.Set; 7 | 8 | /** 9 | * Attempts to locate all event listeners in a given object and 10 | * stores them in a unmodifiable list. ({@see #getImmutableListeners}) 11 | * 12 | * @author Daniel 13 | * @since May 31, 2017 14 | */ 15 | public interface EventHandlerScanner { 16 | 17 | /** 18 | * Check the given object for any possible listeners that are 19 | * contained inside. 20 | * 21 | * @return true if listeners located, false otherwise 22 | */ 23 | Map, Set> locate(Object listenerContainer); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/player/ItemPickupEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.player; 2 | 3 | import net.minecraft.entity.Entity; 4 | 5 | /** 6 | * @author Robeart 7 | */ 8 | public class ItemPickupEvent { 9 | 10 | private Entity entity; 11 | private int quantity; 12 | 13 | public ItemPickupEvent(Entity entity, int quantity) { 14 | this.entity = entity; 15 | this.quantity = quantity; 16 | } 17 | 18 | public Entity getEntity() { 19 | return entity; 20 | } 21 | 22 | public void setEntity(Entity entity) { 23 | this.entity = entity; 24 | } 25 | 26 | public int getQuantity() { 27 | return quantity; 28 | } 29 | 30 | public void setQuantity(int quantity) { 31 | this.quantity = quantity; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/RenderBlockEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.util.math.BlockPos; 5 | 6 | public class RenderBlockEvent { 7 | 8 | private Block block; 9 | private BlockPos blockPos; 10 | 11 | public RenderBlockEvent(Block block, BlockPos blockPos) { 12 | this.block = block; 13 | this.blockPos = blockPos; 14 | } 15 | 16 | public Block getBlock() { 17 | return block; 18 | } 19 | 20 | public void setBlock(Block block) { 21 | this.block = block; 22 | } 23 | 24 | public BlockPos getBlockPos() { 25 | return blockPos; 26 | } 27 | 28 | public void setBlockPos(BlockPos blockPos) { 29 | this.blockPos = blockPos; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/entity/EntityLivingBaseTravelEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.entity; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.entity.Entity; 5 | import net.minecraft.entity.EntityLivingBase; 6 | 7 | /** 8 | * @author cats 9 | * @since 19 Mar 2020 10 | */ 11 | public class EntityLivingBaseTravelEvent extends EventCancellable { 12 | private EntityLivingBase entity; 13 | 14 | public EntityLivingBaseTravelEvent(Entity entity) { 15 | this.entity = (EntityLivingBase) entity; 16 | } 17 | 18 | public EntityLivingBaseTravelEvent(EntityLivingBase entity) { 19 | this.entity = entity; 20 | } 21 | 22 | public EntityLivingBase getEntity() { 23 | return this.entity; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/raion/shader/fragment/outline.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | uniform sampler2D texture; 4 | uniform vec2 texelSize; 5 | 6 | uniform vec4 color; 7 | uniform float radius; 8 | 9 | void main(void) { 10 | vec4 centerCol = texture2D(texture, gl_TexCoord[0].xy); 11 | 12 | if(centerCol.a != 0) { 13 | gl_FragColor = vec4(0, 0, 0, 0); 14 | } else { 15 | for (float x = -radius; x <= radius; x++) { 16 | for (float y = -radius; y <= radius; y++) { 17 | vec4 currentColor = texture2D(texture, gl_TexCoord[0].xy + vec2(texelSize.x * x, texelSize.y * y)); 18 | 19 | if (currentColor.a != 0) { 20 | gl_FragColor = color; 21 | } 22 | } 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/managers/PopupManager.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.managers; 2 | 3 | import me.robeart.raion.client.gui.hud.Popup; 4 | 5 | import java.util.ArrayList; 6 | import java.util.List; 7 | 8 | public class PopupManager { 9 | 10 | private List popups = new ArrayList<>(); 11 | 12 | public PopupManager() { 13 | } 14 | 15 | public void add(Popup popup) { 16 | for (Popup p : popups) { 17 | p.setY(p.getY() + 20); 18 | } 19 | popups.add(popup); 20 | } 21 | 22 | public void onRender() { 23 | for (int i = popups.size() - 1; i >= 0; i--) { 24 | Popup p = popups.get(i); 25 | if (p.getDestroy()) { 26 | popups.remove(p); 27 | } 28 | else { 29 | p.setTime(p.getTime() - 1); 30 | p.render(); 31 | } 32 | } 33 | } 34 | 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/handler/ListenerPriority.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo.handler; 2 | 3 | /** 4 | * Designates the order within a listener of event distribution. This 5 | * is not globally sorted as the current structure of stored event listeners is 6 | * too complex to properly sort without major code refactoring. 7 | * 8 | * todo: hint hint... 9 | */ 10 | public enum ListenerPriority { 11 | LOWEST(-750), 12 | LOWER(-500), 13 | LOW(-250), 14 | NORMAL(0), 15 | HIGH(250), 16 | HIGHER(500), 17 | HIGHEST(750); 18 | 19 | private final int priorityLevel; 20 | 21 | ListenerPriority(final int priorityLevel) { 22 | this.priorityLevel = priorityLevel; 23 | } 24 | 25 | public int getPriorityLevel() { 26 | return priorityLevel; 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/network/packet/client/MixinCPacketPlayerPlayerTryUseItemOnBlock.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.network.packet.client; 2 | 3 | import me.robeart.raion.client.imixin.ICPacketPlayerTryUseItemOnBlock; 4 | import net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock; 5 | import net.minecraft.util.EnumFacing; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.gen.Accessor; 8 | 9 | /** 10 | * @author Robeart 25/07/2020 11 | */ 12 | @Mixin(CPacketPlayerTryUseItemOnBlock.class) 13 | public abstract class MixinCPacketPlayerPlayerTryUseItemOnBlock implements ICPacketPlayerTryUseItemOnBlock { 14 | 15 | @Accessor(value = "placedBlockDirection") 16 | public abstract void setDirection(EnumFacing placedBlockDirection); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/filter/EventFilter.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo.filter; 2 | 3 | import team.stiff.pomelo.handler.EventHandler; 4 | 5 | /** 6 | * An event filter tests whether or not certain conditions 7 | * are met whatever situation the filter will be used in 8 | * before allowing the event handler to be invoked. 9 | * 10 | * @author Daniel 11 | * @since May 31, 2017 12 | */ 13 | public interface EventFilter { 14 | 15 | /** 16 | * Tests the given predicate when the handling 17 | * event is dispatched. 18 | * 19 | * @param eventHandler event handler instance 20 | * @param event instance of event being dispatched 21 | * @return true if listener passes all filters, false otherwise 22 | */ 23 | boolean test(EventHandler eventHandler, E event); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/RaionMainMenu.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui 2 | 3 | import me.robeart.raion.client.Raion 4 | import net.minecraft.client.gui.GuiButton 5 | import net.minecraft.client.gui.GuiMainMenu 6 | 7 | /** 8 | * @author cookiedragon234 07/Jun/2020 9 | */ 10 | class RaionMainMenu: GuiMainMenu() { 11 | override fun initGui() { 12 | super.initGui() 13 | val startHeight = height / 4 + 48 14 | val buttonHeight = 24 15 | this.buttonList.add(GuiButton(30, width / 2 - 100, startHeight + (buttonHeight * 5), "Raion")) 16 | } 17 | 18 | override fun actionPerformed(button: GuiButton) { 19 | if (button.id == 30) { 20 | val gui = Raion.INSTANCE.gui 21 | gui.setParent(this) 22 | mc.displayGuiScreen(gui) 23 | return 24 | } 25 | super.actionPerformed(button) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/network/packet/server/MixinSPacketExplosion.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.network.packet.server; 2 | 3 | import me.robeart.raion.client.imixin.ISPacketExplosion; 4 | import net.minecraft.network.play.server.SPacketExplosion; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | /** 9 | * @author Robeart 10 | */ 11 | @Mixin(SPacketExplosion.class) 12 | public abstract class MixinSPacketExplosion implements ISPacketExplosion { 13 | 14 | @Accessor(value = "motionX") 15 | public abstract void setMotionX(float motionX); 16 | 17 | @Accessor(value = "motionY") 18 | public abstract void setMotionY(float motionY); 19 | 20 | @Accessor(value = "motionZ") 21 | public abstract void setMotionZ(float motionZ); 22 | 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/font/Fonts.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util.font 2 | 3 | import me.robeart.raion.client.Raion 4 | 5 | /** 6 | * @author Robeart 1/07/2020 7 | */ 8 | object Fonts { 9 | 10 | val font = Raion.INSTANCE.getFont(); 11 | 12 | val font20 = MinecraftFontRenderer(font.deriveFont(20f), true) 13 | val font28 = MinecraftFontRenderer(font.deriveFont(28f), true) 14 | val font35 = MinecraftFontRenderer(font.deriveFont(35f), true) 15 | val font36 = MinecraftFontRenderer(font.deriveFont(36f), true) 16 | val font40 = MinecraftFontRenderer(font.deriveFont(40f), true) 17 | val font42 = MinecraftFontRenderer(font.deriveFont(42f), true) 18 | val font48 = MinecraftFontRenderer(font.deriveFont(48f), true) 19 | val font80 = MinecraftFontRenderer(font.deriveFont(80f), true) 20 | 21 | 22 | } -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/render/MixinFustrum.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.render; 2 | 3 | import net.minecraft.client.renderer.culling.Frustum; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | /** 7 | * @author cookiedragon234 30/Apr/2020 8 | */ 9 | @Mixin(Frustum.class) 10 | public class MixinFustrum { 11 | 12 | // This is slower than it ought to be, so I'll comment it out for now 13 | // TODO find a more elegant solution, todo for later as I haven't found one just yet 14 | /* @Inject(method = "isBoundingBoxInFrustum(Lnet/minecraft/util/math/AxisAlignedBB;)Z", at = @At("HEAD"), cancellable = true) 15 | public void injectIsBoundingBoxInFrustum(AxisAlignedBB bb, CallbackInfoReturnable ci) { 16 | if (FreecamModule.INSTANCE.getState()) { 17 | ci.setReturnValue(true); 18 | } 19 | }*/ 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/me/cookiedragon234/falcon/RaionMod.java: -------------------------------------------------------------------------------- 1 | package me.cookiedragon234.falcon; 2 | 3 | import net.minecraftforge.fml.common.Mod; 4 | import net.minecraftforge.fml.common.event.FMLInitializationEvent; 5 | 6 | import java.lang.reflect.Method; 7 | 8 | @Mod(name = "Raion Loader", modid = "raionloader", version = "0.1", clientSideOnly = true) 9 | public class RaionMod { 10 | public static Object raion = null; 11 | 12 | @Mod.EventHandler 13 | private void init(FMLInitializationEvent event) { 14 | try { 15 | raion.getClass().getDeclaredMethod("init", FMLInitializationEvent.class).invoke(raion, event); 16 | } 17 | catch (Exception e) { 18 | for (Method declaredMethod : raion.getClass().getDeclaredMethods()) { 19 | System.out.println(declaredMethod); 20 | } 21 | throw new IllegalStateException("init", e); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/elements/TimeElement.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.elements 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting 4 | import me.robeart.raion.client.gui.cui.element.CuiElement 5 | import me.robeart.raion.client.util.Utils 6 | import net.minecraft.util.math.Vec2f 7 | import java.time.LocalDateTime 8 | import java.time.format.DateTimeFormatter 9 | 10 | /** 11 | * @author Robeart 22/07/2020 12 | */ 13 | class TimeElement: CuiElement() { 14 | override fun render(mousePos: Vec2f) { 15 | super.render(mousePos) 16 | 17 | val formatter = DateTimeFormatter.ofPattern("HH:mm") 18 | val time = LocalDateTime.now().format(formatter) 19 | val text = "${ChatFormatting.GRAY}Time ${ChatFormatting.WHITE}$time" 20 | drawText(text, Utils.getRgb(255, 255, 255, 255)) 21 | } 22 | } -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/network/packet/server/MixinSPacketEntityVelocity.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.network.packet.server; 2 | 3 | import me.robeart.raion.client.imixin.ISPacketEntityVelocity; 4 | import net.minecraft.network.play.server.SPacketEntityVelocity; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | /** 9 | * @author Robeart 10 | */ 11 | @Mixin(SPacketEntityVelocity.class) 12 | public abstract class MixinSPacketEntityVelocity implements ISPacketEntityVelocity { 13 | 14 | @Accessor(value = "motionX") 15 | public abstract void setMotionX(int motionX); 16 | 17 | @Accessor(value = "motionY") 18 | public abstract void setMotionY(int motionY); 19 | 20 | @Accessor(value = "motionZ") 21 | public abstract void setMotionZ(int motionZ); 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/network/packet/server/MixinSPacketPosLook.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.network.packet.server; 2 | 3 | import me.robeart.raion.client.imixin.ISPacketPlayerPosLook; 4 | import net.minecraft.network.play.server.SPacketPlayerPosLook; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | /** 9 | * @author cats 10 | */ 11 | @Mixin(SPacketPlayerPosLook.class) 12 | public abstract class MixinSPacketPosLook implements ISPacketPlayerPosLook { 13 | 14 | @Accessor(value = "yaw") 15 | public abstract float getYaw(); 16 | 17 | @Accessor(value = "yaw") 18 | public abstract void setYaw(float yaw); 19 | 20 | @Accessor(value = "pitch") 21 | public abstract float getPitch(); 22 | 23 | @Accessor(value = "pitch") 24 | public abstract void setPitch(float pitch); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/DrawnCommand.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command 2 | 3 | import me.robeart.raion.client.Raion 4 | import me.robeart.raion.client.util.ChatUtils 5 | 6 | /** 7 | * @author Robeart 8 | */ 9 | object DrawnCommand: Command( 10 | "Drawn", 11 | arrayOf("d", "visible"), 12 | "Disable modules being drawn on the arraylist", 13 | "drawn (module)" 14 | ) { 15 | override fun call(args: Array) { 16 | if (args.isEmpty()) { 17 | ChatUtils.message("Please specify a module") 18 | return 19 | } else { 20 | val m = Raion.INSTANCE.moduleManager.getModule(args[0]) 21 | if (m == null) ChatUtils.message(args[0] + " is not a valid module") 22 | else { 23 | m.visible = m.visible.not() 24 | ChatUtils.message(m.name + " is now " + (if (m.visible) "visible" else "hidden")) 25 | } 26 | return 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/elements/FPSCounterElement.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.elements 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting 4 | import me.robeart.raion.client.Raion 5 | import me.robeart.raion.client.gui.cui.element.CuiElement 6 | import me.robeart.raion.client.util.Utils 7 | import me.robeart.raion.client.util.font.Fonts 8 | import me.robeart.raion.client.util.font.MinecraftFontRenderer 9 | import net.minecraft.client.Minecraft 10 | import net.minecraft.util.math.Vec2f 11 | 12 | /** 13 | * @author cookiedragon234 17/Jun/2020 14 | */ 15 | class FPSCounterElement: CuiElement() { 16 | override fun render(mousePos: Vec2f) { 17 | super.render(mousePos) 18 | val fps = Minecraft.getDebugFPS() 19 | val text = "${ChatFormatting.GRAY}FPS ${ChatFormatting.WHITE}$fps" 20 | drawText(text, Utils.getRgb(255,255,255,255)) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/combat/LazyItemSwitch.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.combat 2 | 3 | import me.robeart.raion.client.module.Module 4 | import net.minecraft.client.multiplayer.PlayerControllerMP 5 | 6 | /** 7 | * @author cookiedragon234 25/Jul/2020 8 | */ 9 | object LazyItemSwitch: Module("LazyItemSwitch", "Spoof your server side item until necessary", Category.COMBAT) { 10 | fun updatePlayerControllerOnTick(playerController: PlayerControllerMP) { 11 | if (!this.state) { 12 | playerController.updateController() 13 | } else { 14 | // Send/receive packets without syncing item as would normally be done each tick 15 | 16 | val conn = mc.player.connection 17 | if (conn.networkManager.isChannelOpen) { 18 | conn.networkManager.processReceivedPackets() 19 | } else { 20 | conn.networkManager.handleDisconnection() 21 | } 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/ChatUtils.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util; 2 | 3 | import net.minecraft.client.Minecraft; 4 | import net.minecraft.util.text.ITextComponent; 5 | import net.minecraft.util.text.TextComponentString; 6 | 7 | public class ChatUtils { 8 | 9 | public static void component(ITextComponent component) { 10 | Minecraft.getMinecraft().ingameGUI.getChatGUI() 11 | .printChatMessage(new TextComponentString("\u00a78[\u00A79Raion\u00a78]\u00a7r ").appendSibling(component)); 12 | } 13 | 14 | public static void message(String message) { 15 | component(new TextComponentString(message)); 16 | } 17 | 18 | public static void warning(String message) { 19 | message("\u00a7c[\u00a76\u00a7lWARNING\u00a7c]\u00a7r" + message); 20 | } 21 | 22 | public static void error(String message) { 23 | message("\u00a7c[\u00a74\u00a7lERROR\u00a7c]\u00a7r " + message); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/Render2DEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import net.minecraft.client.gui.ScaledResolution; 4 | 5 | public class Render2DEvent { 6 | 7 | private float partialTicks; 8 | private ScaledResolution scaledResolution; 9 | 10 | public Render2DEvent(float partialTicks, ScaledResolution scaledResolution) { 11 | this.partialTicks = partialTicks; 12 | this.scaledResolution = scaledResolution; 13 | } 14 | 15 | public float getPartialTicks() { 16 | return this.partialTicks; 17 | } 18 | 19 | public void setPartialTicks(float partialTicks) { 20 | this.partialTicks = partialTicks; 21 | } 22 | 23 | public ScaledResolution getScaledResolution() { 24 | return this.scaledResolution; 25 | } 26 | 27 | public void setScaledResolution(ScaledResolution scaledResolution) { 28 | this.scaledResolution = scaledResolution; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/MixinVisGraph.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.events.events.render.SetOpaqueCubeEvent; 5 | import net.minecraft.client.renderer.chunk.VisGraph; 6 | import net.minecraft.util.math.BlockPos; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | @Mixin(VisGraph.class) 13 | public class MixinVisGraph { 14 | 15 | @Inject(method = "setOpaqueCube", at = @At("HEAD"), cancellable = true) 16 | public void setOpaqueCube(BlockPos pos, CallbackInfo ci) { 17 | SetOpaqueCubeEvent event = new SetOpaqueCubeEvent(); 18 | Raion.INSTANCE.getEventManager().dispatchEvent(event); 19 | if (event.isCanceled()) ci.cancel(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/player/LocateCapeEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.player; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.util.ResourceLocation; 5 | 6 | import java.util.UUID; 7 | 8 | /** 9 | * @author Robeart 10 | */ 11 | public class LocateCapeEvent extends EventCancellable { 12 | 13 | ResourceLocation resourceLocation; 14 | UUID uuid; 15 | 16 | public LocateCapeEvent(UUID uuid) { 17 | this.uuid = uuid; 18 | this.resourceLocation = null; 19 | } 20 | 21 | public UUID getUuid() { 22 | return uuid; 23 | } 24 | 25 | public void setUuid(UUID uuid) { 26 | this.uuid = uuid; 27 | } 28 | 29 | public ResourceLocation getResourceLocation() { 30 | return resourceLocation; 31 | } 32 | 33 | public void setResourceLocation(ResourceLocation resourceLocation) { 34 | this.resourceLocation = resourceLocation; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/gui/MixinGuiBossOverlay.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.gui; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.events.events.render.RenderBossBarEvent; 5 | import net.minecraft.client.gui.GuiBossOverlay; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | /** 12 | * @author cats 13 | */ 14 | @Mixin(GuiBossOverlay.class) 15 | public class MixinGuiBossOverlay { 16 | 17 | @Inject(method = "renderBossHealth", at = @At("HEAD"), cancellable = true) 18 | private void renderBossHealth(CallbackInfo ci) { 19 | final RenderBossBarEvent event = new RenderBossBarEvent(); 20 | Raion.INSTANCE.getEventManager().dispatchEvent(event); 21 | if (event.isCanceled()) ci.cancel(); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/font/FontRenderer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util.font; 2 | 3 | public interface FontRenderer { 4 | 5 | /** 6 | * @return The width (in pixels) of the text rendered. 7 | */ 8 | @Deprecated 9 | float drawString(FontData fontData, String text, float x, float y, int color); 10 | 11 | @Deprecated 12 | default int drawString(FontData fontData, String text, int x, int y, int color) { 13 | return (int) drawString(fontData, text, (float) x, (float) y, color); 14 | } 15 | 16 | /** 17 | * @return The width (in pixels) of the text rendered. 18 | */ 19 | float drawString(String text, float x, float y, int color); 20 | 21 | default int drawString(String text, int x, int y, int color) { 22 | return (int) drawString(text, (float) x, (float) y, color); 23 | } 24 | 25 | /** 26 | * @return The {@link FontData} used by this FontRenderer. 27 | */ 28 | FontData getFontData(); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/entity/living/MixinEntityLlama.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.entity.living; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.events.events.entity.CanBeSteeredEvent; 5 | import net.minecraft.entity.passive.EntityLlama; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 10 | 11 | @Mixin(EntityLlama.class) 12 | public class MixinEntityLlama { 13 | 14 | @Inject(method = "canBeSteered", at = @At("HEAD"), cancellable = true) 15 | public void canBeSteered(CallbackInfoReturnable ci) { 16 | CanBeSteeredEvent event = new CanBeSteeredEvent(); 17 | Raion.INSTANCE.getEventManager().dispatchEvent(event); 18 | if (event.isCanceled()) ci.setReturnValue(true); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/render/MixinBufferBuilder.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.render; 2 | 3 | import net.minecraft.client.renderer.BufferBuilder; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | import org.spongepowered.asm.mixin.gen.Accessor; 6 | 7 | @Mixin(BufferBuilder.class) 8 | public abstract class MixinBufferBuilder { 9 | 10 | @Accessor 11 | public abstract boolean isIsDrawing(); 12 | 13 | /*@Redirect(method = "putColorMultiplier", at = @At(value = "INVOKE", remap = false, target = "java/nio/IntBuffer.put(II)Ljava/nio/IntBuffer;")) 14 | private IntBuffer onPutColorMultiplier(IntBuffer a, int a2, int a3) { 15 | if (Raion.INSTANCE.getModuleManager().getModule(XrayModule.class).getState()) { 16 | a3 = ((XrayModule) Raion.INSTANCE.getModuleManager().getModule(XrayModule.class)).opacity.getValue() << 24 | a3 & 0xFFFFFF; 17 | } 18 | return a.put(a2, a3); 19 | }*/ 20 | 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/UploadChunkEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import net.minecraft.client.renderer.BufferBuilder; 4 | import net.minecraft.client.renderer.chunk.RenderChunk; 5 | 6 | public class UploadChunkEvent { 7 | 8 | private RenderChunk renderChunk; 9 | private BufferBuilder bufferBuilder; 10 | 11 | public UploadChunkEvent(RenderChunk renderChunk, BufferBuilder bufferBuilder) { 12 | this.renderChunk = renderChunk; 13 | this.bufferBuilder = bufferBuilder; 14 | } 15 | 16 | public BufferBuilder getBufferBuilder() { 17 | return bufferBuilder; 18 | } 19 | 20 | public void setBufferBuilder(BufferBuilder bufferBuilder) { 21 | this.bufferBuilder = bufferBuilder; 22 | } 23 | 24 | public RenderChunk getRenderChunk() { 25 | return renderChunk; 26 | } 27 | 28 | public void setRenderChunk(RenderChunk renderChunk) { 29 | this.renderChunk = renderChunk; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/value/NumberValue.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.value; 2 | 3 | /** 4 | * @author cookiedragon234 17/Jun/2020 5 | */ 6 | public abstract class NumberValue extends Value { 7 | public NumberValue(String name) { 8 | super(name); 9 | } 10 | 11 | public NumberValue(String name, String description) { 12 | super(name, description); 13 | } 14 | 15 | public NumberValue(String name, Value parentSetting) { 16 | super(name, parentSetting); 17 | } 18 | 19 | public NumberValue(String name, String description, Value parentSetting) { 20 | super(name, description, parentSetting); 21 | } 22 | 23 | public NumberValue(String name, Value parentSetting, String listFilter) { 24 | super(name, parentSetting, listFilter); 25 | } 26 | 27 | public NumberValue(String name, String description, Value parentSetting, String listFilter) { 28 | super(name, description, parentSetting, listFilter); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/raion/shader/fragment/glow.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | uniform sampler2D texture; 4 | uniform vec2 texelSize; 5 | 6 | uniform vec3 color; 7 | 8 | uniform float radius; 9 | uniform float divider; 10 | uniform float maxSample; 11 | 12 | void main() { 13 | vec4 centerCol = texture2D(texture, gl_TexCoord[0].xy); 14 | 15 | if(centerCol.a != 0) { 16 | gl_FragColor = vec4(centerCol.rgb, 0); 17 | } else { 18 | 19 | float alpha = 0; 20 | 21 | for (float x = -radius; x < radius; x++) { 22 | for (float y = -radius; y < radius; y++) { 23 | vec4 currentColor = texture2D(texture, gl_TexCoord[0].xy + vec2(texelSize.x * x, texelSize.y * y)); 24 | 25 | if (currentColor.a != 0) 26 | alpha += divider > 0 ? max(0, (maxSample - distance(vec2(x, y), vec2(0))) / divider) : 1; 27 | } 28 | } 29 | gl_FragColor = vec4(color, alpha); 30 | } 31 | } -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/world/LiquidCollisionBBEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.world; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.util.math.AxisAlignedBB; 5 | import net.minecraft.util.math.BlockPos; 6 | 7 | public class LiquidCollisionBBEvent extends EventCancellable { 8 | 9 | private AxisAlignedBB boundingBox; 10 | private BlockPos blockPos; 11 | 12 | public LiquidCollisionBBEvent(AxisAlignedBB boundingBox, BlockPos blockPos) { 13 | this.boundingBox = boundingBox; 14 | this.blockPos = blockPos; 15 | } 16 | 17 | public AxisAlignedBB getBoundingBox() { 18 | return this.boundingBox; 19 | } 20 | 21 | public void setBoundingBox(AxisAlignedBB boundingBox) { 22 | this.boundingBox = boundingBox; 23 | } 24 | 25 | public BlockPos getBlockPos() { 26 | return this.blockPos; 27 | } 28 | 29 | public void setBlockPos(BlockPos blockPos) { 30 | this.blockPos = blockPos; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/misc/NoCompressionKick.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.misc 2 | 3 | import me.robeart.raion.client.events.EventStageable 4 | import me.robeart.raion.client.events.events.network.PacketExceptionEvent 5 | import me.robeart.raion.client.module.Module 6 | import me.robeart.raion.client.util.ChatUtils 7 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener 8 | 9 | object NoCompressionKick: Module( 10 | "NoCompKick", 11 | "Stops the exception from being thrown for badly compressed packets", 12 | Category.MISC 13 | ) { 14 | @Listener 15 | fun onBadPacket(event: PacketExceptionEvent) { 16 | if (event.stage == EventStageable.EventStage.PRE) { 17 | event.isCanceled = true 18 | ChatUtils.message("Prevented packet exception from being thrown") 19 | } else if (event.stage == EventStageable.EventStage.POST) { 20 | event.isCanceled = true 21 | ChatUtils.message("Prevented thrown exception from disconnect") 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/player/TimerModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.player; 2 | 3 | import me.robeart.raion.client.events.events.player.OnUpdateEvent; 4 | import me.robeart.raion.client.imixin.IMinecraft; 5 | import me.robeart.raion.client.imixin.ITimer; 6 | import me.robeart.raion.client.module.Module; 7 | import me.robeart.raion.client.value.FloatValue; 8 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 9 | 10 | public class TimerModule extends Module { 11 | 12 | public FloatValue speed = new FloatValue("Speed", 2.0f, 0.1f, 50.0f, 0.1f); 13 | 14 | public TimerModule() { 15 | super("Timer", "Speeds up your whole game", Category.PLAYER); 16 | } 17 | 18 | @Override 19 | public void onDisable() { 20 | ((ITimer) ((IMinecraft) mc).getTimer()).setTickLength(50.0f); 21 | } 22 | 23 | @Listener 24 | private void onUpdate(OnUpdateEvent event) { 25 | ((ITimer) ((IMinecraft) mc).getTimer()).setTickLength(50.0f / speed.getValue()); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/MixinLayerCape.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common; 2 | 3 | import net.minecraft.client.entity.AbstractClientPlayer; 4 | import net.minecraft.client.renderer.entity.layers.LayerCape; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.injection.At; 7 | import org.spongepowered.asm.mixin.injection.Inject; 8 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 9 | 10 | @Mixin(LayerCape.class) 11 | public class MixinLayerCape { 12 | 13 | @Inject(method = "doRenderLayer", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/renderer/entity/RenderPlayer;bindTexture(Lnet/minecraft/util/ResourceLocation;)V"), cancellable = true) 14 | public void doRenderLayer(AbstractClientPlayer entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale, CallbackInfo ci) { 15 | //GLUtils.glColor(GLUtils.getColor(100)); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/minecraft/ESP/OutlineShader.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util.minecraft.ESP; 2 | 3 | import org.lwjgl.opengl.GL20; 4 | 5 | public final class OutlineShader extends FramebufferShader { 6 | 7 | public static final OutlineShader OUTLINE_SHADER = new OutlineShader(); 8 | 9 | public OutlineShader() { 10 | super("outline.frag"); 11 | } 12 | 13 | @Override 14 | public void setupUniforms() { 15 | setupUniform("texture"); 16 | setupUniform("texelSize"); 17 | setupUniform("color"); 18 | setupUniform("divider"); 19 | setupUniform("radius"); 20 | setupUniform("maxSample"); 21 | } 22 | 23 | @Override 24 | public void updateUniforms() { 25 | GL20.glUniform1i(getUniform("texture"), 0); 26 | GL20.glUniform2f(getUniform("texelSize"), 1F / mc.displayWidth * (radius * quality), 1F / mc.displayHeight * (radius * quality)); 27 | GL20.glUniform4f(getUniform("color"), red, green, blue, alpha); 28 | GL20.glUniform1f(getUniform("radius"), radius); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/Utils.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util; 2 | 3 | import java.lang.reflect.Field; 4 | import java.lang.reflect.Modifier; 5 | 6 | /** 7 | * @author cookiedragon234 21/Apr/2020 8 | */ 9 | public class Utils { 10 | /** 11 | * Scale of 0-255 12 | */ 13 | public static int getRgb(int r, int g, int b, int a) { 14 | return ((a & 0xFF) << 24) | 15 | ((r & 0xFF) << 16) | 16 | ((g & 0xFF) << 8) | 17 | ((b & 0xFF) << 0); 18 | } 19 | 20 | public static void setFinalStatic(Field field, Object newValue) throws Exception { 21 | setFinalStatic(field, null, newValue); 22 | } 23 | 24 | public static void setFinalStatic(Field field, Object instance, Object newValue) throws Exception { 25 | field.setAccessible(true); 26 | 27 | Field modifiersField = Field.class.getDeclaredField("modifiers"); 28 | modifiersField.setAccessible(true); 29 | modifiersField.setInt(field, field.getModifiers() & ~Modifier.FINAL); 30 | 31 | field.set(instance, newValue); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/network/packet/client/MixinCPacketPlayer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.network.packet.client; 2 | 3 | import me.robeart.raion.client.imixin.ICPacketPlayer; 4 | import net.minecraft.network.play.client.CPacketPlayer; 5 | import org.spongepowered.asm.mixin.Mixin; 6 | import org.spongepowered.asm.mixin.gen.Accessor; 7 | 8 | /** 9 | * @author Robeart 10 | */ 11 | @Mixin(CPacketPlayer.class) 12 | public abstract class MixinCPacketPlayer implements ICPacketPlayer { 13 | 14 | @Accessor(value = "yaw") 15 | public abstract void setYaw(float yaw); 16 | 17 | @Accessor(value = "pitch") 18 | public abstract void setPitch(float pitch); 19 | 20 | @Accessor(value = "x") 21 | public abstract void setX(double x); 22 | 23 | @Accessor(value = "y") 24 | public abstract void setY(double y); 25 | 26 | @Accessor(value = "z") 27 | public abstract void setZ(double z); 28 | 29 | @Accessor(value = "onGround") 30 | public abstract void setOnGround(boolean onGround); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/render/MixinChunkRenderWorker.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.render; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.events.events.render.FreeRenderBuilderEvent; 5 | import net.minecraft.client.renderer.chunk.ChunkCompileTaskGenerator; 6 | import net.minecraft.client.renderer.chunk.ChunkRenderWorker; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | @Mixin(ChunkRenderWorker.class) 13 | public abstract class MixinChunkRenderWorker { 14 | 15 | @Inject(method = "freeRenderBuilder", at = @At(value = "HEAD")) 16 | private void freeRenderBuilder(ChunkCompileTaskGenerator taskGenerator, CallbackInfo ci) { 17 | Raion.INSTANCE.getEventManager() 18 | .dispatchEvent(new FreeRenderBuilderEvent(taskGenerator, taskGenerator.getRenderChunk())); 19 | } 20 | 21 | } 22 | 23 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/block/MixinBlockBarrier.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.block; 2 | 3 | import me.robeart.raion.client.module.render.VisionModule; 4 | import net.minecraft.block.BlockBarrier; 5 | import net.minecraft.block.state.IBlockState; 6 | import net.minecraft.util.EnumBlockRenderType; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | /** 13 | * @author cookiedragon234 08/Jun/2020 14 | */ 15 | @Mixin(BlockBarrier.class) 16 | public class MixinBlockBarrier { 17 | @Inject(method = "getRenderType", at = @At("RETURN"), cancellable = true) 18 | private void getRenderTypeWrapper(IBlockState state, CallbackInfoReturnable cir) { 19 | if (VisionModule.INSTANCE.getState() && VisionModule.INSTANCE.getBarriers()) { 20 | cir.setReturnValue(EnumBlockRenderType.MODEL); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/movement/NoHungerModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.movement; 2 | 3 | import me.robeart.raion.client.events.EventStageable; 4 | import me.robeart.raion.client.events.events.network.PacketSendEvent; 5 | import me.robeart.raion.client.imixin.ICPacketPlayer; 6 | import me.robeart.raion.client.module.Module; 7 | import net.minecraft.network.play.client.CPacketPlayer; 8 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 9 | 10 | /** 11 | * @author cats 12 | */ 13 | 14 | public class NoHungerModule extends Module { 15 | 16 | public NoHungerModule() { 17 | super("NoHunger", "Decreases the speed of losing hunger", Category.MOVEMENT); 18 | } 19 | 20 | @Listener 21 | public void packetSend(PacketSendEvent event) { 22 | if (event.getStage() != EventStageable.EventStage.PRE) return; 23 | if (event.getPacket() instanceof CPacketPlayer) { 24 | final ICPacketPlayer packet = (ICPacketPlayer) event.getPacket(); 25 | packet.setOnGround(false); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/anchor/CoordinateAnchorPoint.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.anchor 2 | 3 | import me.robeart.raion.client.gui.cui.element.CuiElement 4 | import net.minecraft.util.math.Vec2f 5 | 6 | /** 7 | * @author cookiedragon234 17/Jun/2020 8 | */ 9 | class CoordinateAnchorPoint(val snapTo: Vec2f, direction: AnchorPointDirection): AnchorPoint(direction) { 10 | override fun snap(element: CuiElement) { 11 | when (direction) { 12 | AnchorPointDirection.TOP_LEFT -> { 13 | element.position.posX = snapTo.x 14 | element.position.posY = snapTo.y 15 | } 16 | AnchorPointDirection.TOP_RIGHT -> { 17 | element.position.bottomX = snapTo.x 18 | element.position.posY = snapTo.y 19 | } 20 | AnchorPointDirection.BOTTOM_RIGHT -> { 21 | element.position.bottomX = snapTo.x 22 | element.position.bottomY = snapTo.y 23 | } 24 | AnchorPointDirection.BOTTOM_LEFT -> { 25 | element.position.posX = snapTo.x 26 | element.position.bottomY = snapTo.y 27 | } 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/BindCommand.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.module.Module; 5 | import me.robeart.raion.client.util.ChatUtils; 6 | import org.lwjgl.input.Keyboard; 7 | 8 | /** 9 | * @author Robeart 10 | */ 11 | public class BindCommand extends Command { 12 | 13 | public BindCommand() { 14 | super("Bind", new String[]{"b", "bd"}, "Bind a module", "bind [module] {key}"); 15 | } 16 | 17 | @Override 18 | public void call(String[] args) { 19 | if (args.length < 2) { 20 | ChatUtils.message("Please specify a module/key!"); 21 | return; 22 | } 23 | Module module = Raion.INSTANCE.getModuleManager().getModule(args[0]); 24 | if (module == null) { 25 | ChatUtils.message("Can't find module " + args[0]); 26 | return; 27 | } 28 | module.setBind(Keyboard.getKeyName(Keyboard.getKeyIndex(args[1].toUpperCase()))); 29 | ChatUtils.message("Set keybind of " + module.getName() + " to " + module.getBind()); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/render/MixinRenderChunk.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.render; 2 | 3 | import net.minecraft.client.renderer.chunk.RenderChunk; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | @Mixin(RenderChunk.class) 7 | public abstract class MixinRenderChunk { 8 | 9 | /*@Redirect(method = "rebuildChunk", at = @At(value = "INVOKE", remap = false, target = "Lnet/minecraft/block/Block;canRenderInLayer(Lnet/minecraft/block/state/IBlockState;Lnet/minecraft/util/BlockRenderLayer;)Z")) 10 | public boolean canRenderInLayer(Block block, IBlockState iBlockState, BlockRenderLayer blockRenderLayer) { 11 | if (Raion.INSTANCE.getModuleManager().getModule(XrayModule.class).getState()) { 12 | if (!(blockRenderLayer == BlockRenderLayer.TRANSLUCENT)) 13 | return XrayModule.shouldXray(block) && (iBlockState.getBlock().getRenderLayer() == blockRenderLayer); 14 | else return true; 15 | } else return (block.getRenderLayer() == blockRenderLayer); 16 | }*/ 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/combat/AutoRespawnModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.combat; 2 | 3 | import me.robeart.raion.client.events.events.render.DisplayGuiScreenEvent; 4 | import me.robeart.raion.client.module.Module; 5 | import me.robeart.raion.client.util.ChatUtils; 6 | import me.robeart.raion.client.util.MathUtils; 7 | import net.minecraft.client.gui.GuiGameOver; 8 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 9 | 10 | /** 11 | * @author Robeart 12 | */ 13 | public class AutoRespawnModule extends Module { 14 | 15 | public AutoRespawnModule() { 16 | super("AutoRespawn", "Automatically respawn upon death", Category.COMBAT); 17 | } 18 | 19 | @Listener 20 | private void onDisplayGuiScreen(DisplayGuiScreenEvent event) { 21 | if (event.getGuiScreen() instanceof GuiGameOver) { 22 | ChatUtils.message("Died at: " + MathUtils.round(mc.player.posX, 0) + " " + MathUtils.round(mc.player.posY, 0) + " " + MathUtils 23 | .round(mc.player.posZ, 0)); 24 | mc.player.respawnPlayer(); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/movement/AutoWalkModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.movement; 2 | 3 | import me.robeart.raion.client.events.events.client.GetKeyStateEvent; 4 | import me.robeart.raion.client.events.events.player.OnUpdateEvent; 5 | import me.robeart.raion.client.module.Module; 6 | import me.robeart.raion.client.value.BooleanValue; 7 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 8 | 9 | public class AutoWalkModule extends Module { 10 | 11 | public BooleanValue sprint = new BooleanValue("Sprint", true); 12 | 13 | public AutoWalkModule() { 14 | super("AutoWalk", "Automatically walks for you", Category.MOVEMENT); 15 | } 16 | 17 | @Listener 18 | public void onUpdate(OnUpdateEvent event) { 19 | if (sprint.getValue()) mc.player.setSprinting(true); 20 | } 21 | 22 | @Listener 23 | private void onGetKeyState(GetKeyStateEvent event) { 24 | try { 25 | if (event.keyBinding == mc.gameSettings.keyBindForward) event.value = true; 26 | } 27 | catch (Exception ignored) { 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/client/ClickMouseButtonChatEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.client; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | /** 6 | * @author Robeart 7 | */ 8 | public class ClickMouseButtonChatEvent extends EventCancellable { 9 | 10 | private int mouseX; 11 | private int mouseY; 12 | private int mouseButton; 13 | 14 | public ClickMouseButtonChatEvent(int mouseX, int mouseY, int mouseButton) { 15 | this.mouseX = mouseX; 16 | this.mouseY = mouseY; 17 | this.mouseButton = mouseButton; 18 | } 19 | 20 | public int getMouseButton() { 21 | return mouseButton; 22 | } 23 | 24 | public void setMouseButton(int mouseButton) { 25 | this.mouseButton = mouseButton; 26 | } 27 | 28 | public int getMouseX() { 29 | return mouseX; 30 | } 31 | 32 | public void setMouseX(int mouseX) { 33 | this.mouseX = mouseX; 34 | } 35 | 36 | public int getMouseY() { 37 | return mouseY; 38 | } 39 | 40 | public void setMouseY(int mouseY) { 41 | this.mouseY = mouseY; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/minecraft/ESP/GlowShader.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util.minecraft.ESP; 2 | 3 | import org.lwjgl.opengl.GL20; 4 | 5 | public final class GlowShader extends FramebufferShader { 6 | 7 | public static final GlowShader GLOW_SHADER = new GlowShader(); 8 | 9 | public GlowShader() { 10 | super("glow.frag"); 11 | } 12 | 13 | @Override 14 | public void setupUniforms() { 15 | setupUniform("texture"); 16 | setupUniform("texelSize"); 17 | setupUniform("color"); 18 | setupUniform("divider"); 19 | setupUniform("radius"); 20 | setupUniform("maxSample"); 21 | } 22 | 23 | @Override 24 | public void updateUniforms() { 25 | GL20.glUniform1i(getUniform("texture"), 0); 26 | GL20.glUniform2f(getUniform("texelSize"), 1F / mc.displayWidth * (radius * quality), 1F / mc.displayHeight * (radius * quality)); 27 | GL20.glUniform3f(getUniform("color"), red, green, blue); 28 | GL20.glUniform1f(getUniform("divider"), 140F); 29 | GL20.glUniform1f(getUniform("radius"), radius); 30 | GL20.glUniform1f(getUniform("maxSample"), 10F); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/values/ValueRenderer.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.values 2 | 3 | import me.robeart.raion.client.gui.cui.utils.Box2f 4 | import me.robeart.raion.client.util.MouseButton 5 | import me.robeart.raion.client.util.font.MinecraftFontRenderer 6 | import me.robeart.raion.client.value.Value 7 | import net.minecraft.client.Minecraft 8 | import net.minecraft.util.math.Vec2f 9 | 10 | /** 11 | * @author cookiedragon234 16/Jun/2020 12 | */ 13 | abstract class ValueRenderer>( 14 | val value: T, 15 | val font: MinecraftFontRenderer 16 | ) { 17 | val mc = Minecraft.getMinecraft() 18 | val position = Box2f() 19 | var visible = false 20 | abstract fun render(mousePos: Vec2f) 21 | abstract fun onMouseDown(mousePos: Vec2f, button: MouseButton, consumed: Boolean): Boolean 22 | abstract fun onMouseRelease(mousePos: Vec2f, button: MouseButton, consumed: Boolean): Boolean 23 | abstract fun onMouseMove(mousePos: Vec2f, button: MouseButton, consumed: Boolean): Boolean 24 | 25 | fun mouseOver(mousePos: Vec2f) = visible && position.contains(mousePos) 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/handler/EventHandler.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo.handler; 2 | 3 | import team.stiff.pomelo.filter.EventFilter; 4 | 5 | /** 6 | * The event handler is a container that will assist in the 7 | * process of handling the event. 8 | * 9 | * @author Daniel 10 | * @since May 31, 2017 11 | */ 12 | public interface EventHandler extends Comparable { 13 | 14 | /** 15 | * Invoked when the listener needs to handle 16 | * an event. 17 | */ 18 | void handle(final E event); 19 | 20 | /** 21 | * The object of the event listener. 22 | * 23 | * @return parent of listener 24 | */ 25 | Object getListener(); 26 | 27 | /** 28 | * The priority of the current listener inside the container. 29 | * 30 | * @return listener priority 31 | */ 32 | ListenerPriority getPriority(); 33 | 34 | /** 35 | * All of the filters that will be tested on the 36 | * handler when being dispatched. 37 | * 38 | * @return iterable filters 39 | */ 40 | Iterable getFilters(); 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/render/MixinRenderPlayer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.render; 2 | 3 | import me.robeart.raion.client.module.player.FreecamModule; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.entity.AbstractClientPlayer; 6 | import net.minecraft.client.renderer.entity.RenderPlayer; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Redirect; 10 | 11 | /** 12 | * @author cookiedragon234 30/Apr/2020 13 | */ 14 | @Mixin(RenderPlayer.class) 15 | public class MixinRenderPlayer { 16 | @Redirect(method = "doRender", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/entity/AbstractClientPlayer;isUser()Z")) 17 | private boolean isUserRedirect(AbstractClientPlayer abstractClientPlayer) { 18 | Minecraft mc = Minecraft.getMinecraft(); 19 | if (FreecamModule.INSTANCE.getState()) { 20 | return abstractClientPlayer.isUser() && abstractClientPlayer == mc.getRenderViewEntity(); 21 | } 22 | 23 | return abstractClientPlayer.isUser(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/NbtDumpCommand.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command 2 | 3 | import me.robeart.raion.client.util.ChatUtils 4 | import net.minecraft.nbt.NBTTagCompound 5 | import java.io.DataOutput 6 | import java.io.DataOutputStream 7 | import java.io.File 8 | 9 | /** 10 | * @author cookiedragon234 15/May/2020 11 | */ 12 | object NbtDumpCommand: Command("nbtdump", "nbtdump", "nbtdump") { 13 | val out = File("raion/nbtdump.nbt") 14 | 15 | val write by lazy { 16 | NBTTagCompound::class.java.getDeclaredMethod("write", DataOutput::class.java).also { 17 | it.isAccessible = true 18 | } 19 | } 20 | 21 | override fun call(args: Array?) { 22 | val item = if (mc.player.heldItemMainhand.isEmpty == false) { 23 | mc.player.heldItemMainhand 24 | } else if (mc.player.heldItemOffhand.isEmpty == false) { 25 | mc.player.heldItemOffhand 26 | } else { 27 | ChatUtils.error("Please hold an item") 28 | return 29 | } 30 | 31 | val nbt = NBTTagCompound() 32 | item.writeToNBT(nbt) 33 | DataOutputStream(out.outputStream()).use { 34 | write(nbt, it) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/RenderNameEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.entity.EntityLivingBase; 5 | 6 | public class RenderNameEvent extends EventCancellable { 7 | 8 | double x; 9 | double y; 10 | double z; 11 | private EntityLivingBase entity; 12 | 13 | public RenderNameEvent(EntityLivingBase entity, double x, double y, double z) { 14 | this.entity = entity; 15 | this.x = x; 16 | this.y = y; 17 | this.z = z; 18 | } 19 | 20 | public EntityLivingBase getEntity() { 21 | return this.entity; 22 | } 23 | 24 | public void setEntity(EntityLivingBase entity) { 25 | this.entity = entity; 26 | } 27 | 28 | public double getX() { 29 | return x; 30 | } 31 | 32 | public void setX(double x) { 33 | this.x = x; 34 | } 35 | 36 | public double getY() { 37 | return y; 38 | } 39 | 40 | public void setY(double y) { 41 | this.y = y; 42 | } 43 | 44 | public double getZ() { 45 | return z; 46 | } 47 | 48 | public void setZ(double z) { 49 | this.z = z; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickguirework/Component.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickguirework; 2 | 3 | /** 4 | * @author Robeart 5 | */ 6 | public class Component { 7 | 8 | private int x; 9 | private int y; 10 | private int width; 11 | private int heigth; 12 | 13 | private int red; 14 | private int green; 15 | private int blue; 16 | private int alpha; 17 | 18 | private boolean hovering; 19 | private boolean mouseDown; 20 | 21 | private int priority; 22 | 23 | private Component parent; 24 | 25 | public Component(int x, int y, int width, int heigth, int red, int green, int blue, int alpha, Component parent) { 26 | this.x = x; 27 | this.y = y; 28 | this.width = width; 29 | this.heigth = heigth; 30 | this.red = red; 31 | this.green = green; 32 | this.blue = blue; 33 | this.alpha = alpha; 34 | this.parent = parent; 35 | } 36 | 37 | public void draw(int mouseX, int mouseY) { 38 | 39 | } 40 | 41 | public void mouseClicked(int mouseX, int mouseY, int state) { 42 | 43 | } 44 | 45 | public void mouseReleased(int mouseX, int mouseY, int state) { 46 | 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/render/StorageEspModule.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.render 2 | 3 | import me.robeart.raion.client.events.events.render.Render3DEvent 4 | import me.robeart.raion.client.module.Module 5 | import me.robeart.raion.client.util.minecraft.RenderUtils 6 | import net.minecraft.tileentity.* 7 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener 8 | 9 | /** 10 | * @author cookiedragon234 07/May/2020 11 | */ 12 | object StorageEspModule: Module("StorageESP", "Highlights blocks that store items", Category.RENDER) { 13 | 14 | @Listener 15 | fun onRender(event: Render3DEvent) { 16 | mc.world.loadedTileEntityList.forEach { tileEntity -> 17 | getColour(tileEntity)?.let { colour -> 18 | RenderUtils.blockEsp(tileEntity.pos, colour, 1.0, 1.0) 19 | } 20 | } 21 | } 22 | 23 | private fun getColour(tileEntity: TileEntity): Int? = when (tileEntity) { 24 | is TileEntityChest -> 0x45fcc203 25 | is TileEntityEnderChest -> 0x4503fcb1 26 | is TileEntityShulkerBox -> 0x459d03fc 27 | is TileEntityHopper -> 0x45595963 28 | else -> null 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/render/MixinTileEntitySkullRenderer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.render; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.events.events.render.RenderChestEvent; 5 | import net.minecraft.client.renderer.tileentity.TileEntityChestRenderer; 6 | import net.minecraft.tileentity.TileEntityChest; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | /** 13 | * @author Robeart 14 | */ 15 | @Mixin(TileEntityChestRenderer.class) 16 | public abstract class MixinTileEntitySkullRenderer { 17 | 18 | @Inject(method = "render", at = @At("HEAD"), cancellable = true) 19 | public void render(TileEntityChest te, double x, double y, double z, float partialTicks, int destroyStage, float alpha, CallbackInfo ci) { 20 | RenderChestEvent event = new RenderChestEvent(te, x, y, z); 21 | Raion.INSTANCE.getEventManager().dispatchEvent(event); 22 | if (event.isCanceled()) ci.cancel(); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/player/MoveEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.player; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.entity.MoverType; 5 | 6 | public class MoveEvent extends EventCancellable { 7 | 8 | private MoverType moverType; 9 | private double x; 10 | private double y; 11 | private double z; 12 | 13 | public MoveEvent(MoverType moverType, double x, double y, double z) { 14 | this.moverType = moverType; 15 | this.x = x; 16 | this.y = y; 17 | this.z = z; 18 | } 19 | 20 | public MoverType getMoverType() { 21 | return this.moverType; 22 | } 23 | 24 | public void setMoverType(MoverType moverType) { 25 | this.moverType = moverType; 26 | } 27 | 28 | public double getX() { 29 | return this.x; 30 | } 31 | 32 | public void setX(double x) { 33 | this.x = x; 34 | } 35 | 36 | public double getY() { 37 | return this.y; 38 | } 39 | 40 | public void setY(double y) { 41 | this.y = y; 42 | } 43 | 44 | public double getZ() { 45 | return this.z; 46 | } 47 | 48 | public void setZ(double z) { 49 | this.z = z; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/network/PacketSendEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.network; 2 | 3 | import io.netty.channel.SimpleChannelInboundHandler; 4 | import me.robeart.raion.client.events.EventCancellable; 5 | import me.robeart.raion.client.events.EventStageable; 6 | import net.minecraft.network.NetworkManager; 7 | import net.minecraft.network.Packet; 8 | 9 | public class PacketSendEvent extends EventCancellable { 10 | 11 | private Packet packet; 12 | private NetworkManager networkManager; 13 | 14 | public PacketSendEvent(EventStageable.EventStage stage, Packet packet, SimpleChannelInboundHandler networkManager) { 15 | super(stage); 16 | this.packet = packet; 17 | this.networkManager = (NetworkManager) networkManager; 18 | } 19 | 20 | public PacketSendEvent(EventStageable.EventStage stage, Packet packet, NetworkManager networkManager) { 21 | super(stage); 22 | this.packet = packet; 23 | this.networkManager = networkManager; 24 | } 25 | 26 | public Packet getPacket() { 27 | return packet; 28 | } 29 | 30 | public NetworkManager getNetworkManager() { 31 | return networkManager; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/FreeRenderBuilderEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import net.minecraft.client.renderer.chunk.ChunkCompileTaskGenerator; 4 | import net.minecraft.client.renderer.chunk.RenderChunk; 5 | 6 | public class FreeRenderBuilderEvent { 7 | 8 | private ChunkCompileTaskGenerator chunkCompileTaskGenerator; 9 | private RenderChunk renderChunk; 10 | 11 | public FreeRenderBuilderEvent(ChunkCompileTaskGenerator chunkCompileTaskGenerator, RenderChunk renderChunk) { 12 | this.chunkCompileTaskGenerator = chunkCompileTaskGenerator; 13 | this.renderChunk = renderChunk; 14 | } 15 | 16 | public RenderChunk getRenderChunk() { 17 | return renderChunk; 18 | } 19 | 20 | public void setRenderChunk(RenderChunk renderChunk) { 21 | this.renderChunk = renderChunk; 22 | } 23 | 24 | public ChunkCompileTaskGenerator getChunkCompileTaskGenerator() { 25 | return chunkCompileTaskGenerator; 26 | } 27 | 28 | public void setChunkCompileTaskGenerator(ChunkCompileTaskGenerator chunkCompileTaskGenerator) { 29 | this.chunkCompileTaskGenerator = chunkCompileTaskGenerator; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/misc/MiddleClickIgnore.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.misc 2 | 3 | import me.robeart.raion.client.events.events.client.ClickMouseButtonChatEvent 4 | import me.robeart.raion.client.module.Module 5 | import net.minecraft.network.play.client.CPacketChatMessage 6 | import org.lwjgl.input.Mouse.getX 7 | import org.lwjgl.input.Mouse.getY 8 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener 9 | 10 | /** 11 | * @author Robeart 12 | */ 13 | object MiddleClickIgnore: Module("ClickIgnore", "MiddleClick chat message to ignore the sender", Category.MISC) { 14 | 15 | private var down = false 16 | 17 | @Listener 18 | fun onMouseClick(event: ClickMouseButtonChatEvent) { 19 | if (event.mouseButton == 2) { 20 | val t = mc.ingameGUI.chatGUI.getChatComponent(getX(), getY()) ?: return 21 | val name = t.formattedText.split(" ")[0].replace("[<>]".toRegex(), "") 22 | println(name) 23 | val playerinfo = mc.player.connection.getPlayerInfo(name) ?: return 24 | if (playerinfo.gameProfile != mc.player.gameProfile) 25 | mc.connection?.sendPacket(CPacketChatMessage("/ignore $name")) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/MixinWorldClient.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common; 2 | 3 | import me.robeart.raion.client.module.render.VisionModule; 4 | import net.minecraft.client.multiplayer.WorldClient; 5 | import net.minecraft.util.math.BlockPos; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | import java.util.Random; 12 | 13 | /** 14 | * @author cookiedragon234 08/Jun/2020 15 | */ 16 | @Mixin(WorldClient.class) 17 | public class MixinWorldClient { 18 | @Inject(method = "showBarrierParticles", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/multiplayer/WorldClient;spawnParticle(Lnet/minecraft/util/EnumParticleTypes;DDDDDD[I)V"), cancellable = true) 19 | private void renderBarrierParticleInject(int x, int y, int z, int offset, Random random, boolean holdingBarrier, BlockPos.MutableBlockPos pos, CallbackInfo ci) { 20 | if (VisionModule.INSTANCE.getState() && VisionModule.INSTANCE.getBarriers()) { 21 | ci.cancel(); 22 | return; 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/render/LowOffHandModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.render; 2 | 3 | import me.robeart.raion.client.events.events.player.OnUpdateEvent; 4 | import me.robeart.raion.client.imixin.IMixinItemRenderer; 5 | import me.robeart.raion.client.module.Module; 6 | import me.robeart.raion.client.value.FloatValue; 7 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 8 | 9 | /** 10 | * @author cats 11 | */ 12 | public class LowOffHandModule extends Module { 13 | 14 | private final IMixinItemRenderer itemRenderer = (IMixinItemRenderer) mc.entityRenderer.itemRenderer; 15 | public FloatValue mainHeight = new FloatValue("Mainhand Height", 70f, 0f, 100f, 0.1f); 16 | public FloatValue offHeight = new FloatValue("Offhand Height", 70f, 0f, 100f, 0.1f); 17 | 18 | 19 | public LowOffHandModule() { 20 | super("LowHand", "Makes your hands appear lower", Category.RENDER); 21 | } 22 | 23 | @Listener 24 | public void onUpdate(OnUpdateEvent event) { 25 | itemRenderer.setEquippedProgressMainHand((this.mainHeight.getValue() / 100)); 26 | itemRenderer.setEquippedProgressOffHand((this.offHeight.getValue() / 100)); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/entity/living/player/MixinPlayerControllerMP.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.entity.living.player; 2 | 3 | import me.robeart.raion.client.imixin.IMixinPlayerControllerMP; 4 | import me.robeart.raion.client.module.player.InteractionTweaksModule; 5 | import net.minecraft.client.multiplayer.PlayerControllerMP; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.gen.Invoker; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | @Mixin(PlayerControllerMP.class) 13 | public abstract class MixinPlayerControllerMP implements IMixinPlayerControllerMP { 14 | @Inject(method = "resetBlockRemoving", at = @At("HEAD"), cancellable = true) 15 | private void resetBlockRemovingInject(CallbackInfo ci) { 16 | if (InteractionTweaksModule.INSTANCE.getState() && InteractionTweaksModule.INSTANCE.getStickyBreak()) { 17 | ci.cancel(); 18 | return; 19 | } 20 | } 21 | 22 | @Invoker("syncCurrentPlayItem") 23 | @Override 24 | public abstract void invokeSyncCurrentPlayItem(); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/RenderChestEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.tileentity.TileEntityChest; 5 | 6 | /** 7 | * @author Robeart 8 | */ 9 | public class RenderChestEvent extends EventCancellable { 10 | 11 | double x; 12 | double y; 13 | double z; 14 | private TileEntityChest entity; 15 | 16 | public RenderChestEvent(TileEntityChest entity, double x, double y, double z) { 17 | this.entity = entity; 18 | this.x = x; 19 | this.y = y; 20 | this.z = z; 21 | } 22 | 23 | public TileEntityChest getEntity() { 24 | return this.entity; 25 | } 26 | 27 | public void setEntity(TileEntityChest entity) { 28 | this.entity = entity; 29 | } 30 | 31 | public double getX() { 32 | return x; 33 | } 34 | 35 | public void setX(double x) { 36 | this.x = x; 37 | } 38 | 39 | public double getY() { 40 | return y; 41 | } 42 | 43 | public void setY(double y) { 44 | this.y = y; 45 | } 46 | 47 | public double getZ() { 48 | return z; 49 | } 50 | 51 | public void setZ(double z) { 52 | this.z = z; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/block/MixinBlockModelShapes.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.block; 2 | 3 | import me.robeart.raion.client.module.render.VisionModule; 4 | import net.minecraft.block.state.IBlockState; 5 | import net.minecraft.client.renderer.BlockModelShapes; 6 | import net.minecraft.client.renderer.block.model.IBakedModel; 7 | import net.minecraft.init.Blocks; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 12 | 13 | /** 14 | * @author cookiedragon234 08/Jun/2020 15 | */ 16 | @Mixin(BlockModelShapes.class) 17 | public class MixinBlockModelShapes { 18 | @Inject(method = "getModelForState", at = @At("HEAD"), cancellable = true) 19 | private void getModelInject(IBlockState state, CallbackInfoReturnable cir) { 20 | if (VisionModule.INSTANCE.getState() && VisionModule.INSTANCE.getBarriers()) { 21 | if (state.getBlock() == Blocks.BARRIER) { 22 | cir.setReturnValue(VisionModule.INSTANCE.getBarrierModel()); 23 | return; 24 | } 25 | } 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/impl/annotated/handler/annotation/Listener.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo.impl.annotated.handler.annotation; 2 | 3 | import team.stiff.pomelo.filter.EventFilter; 4 | import team.stiff.pomelo.handler.ListenerPriority; 5 | 6 | import java.lang.annotation.ElementType; 7 | import java.lang.annotation.Retention; 8 | import java.lang.annotation.RetentionPolicy; 9 | import java.lang.annotation.Target; 10 | 11 | /** 12 | * Annotation to denote that the method being marked 13 | * is a listener for event dispatching. 14 | * 15 | * @author Daniel 16 | * @since May 31, 2017 17 | */ 18 | @Retention(RetentionPolicy.RUNTIME) 19 | @Target(ElementType.METHOD) 20 | public @interface Listener { 21 | 22 | /** 23 | * An array of class filters that will be used to 24 | * determine if an event listener should be dispatched 25 | * or not. 26 | * 27 | * @return array of filters 28 | */ 29 | Class[] filters() default { }; 30 | 31 | /** 32 | * The priority of the event listener in the container. 33 | * 34 | * @return listener priority 35 | */ 36 | ListenerPriority priority() default ListenerPriority.NORMAL; 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/elements/DurabilityElement.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.elements 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting 4 | import me.robeart.raion.client.gui.cui.CuiManagerGui 5 | import me.robeart.raion.client.gui.cui.element.CuiElement 6 | import me.robeart.raion.client.util.MathUtils 7 | import me.robeart.raion.client.util.Utils 8 | import net.minecraft.client.Minecraft 9 | import net.minecraft.util.math.Vec2f 10 | 11 | /** 12 | * @author Robeart 22/07/2020 13 | */ 14 | class DurabilityElement: CuiElement() { 15 | override fun render(mousePos: Vec2f) { 16 | super.render(mousePos) 17 | val item = mc.player.heldItemMainhand 18 | val color = MathUtils.getBlendedColor((item.maxDamage - item.itemDamage).toFloat() / item.maxDamage.toFloat()) 19 | val c = Utils.getRgb(color.red, color.green, color.blue, color.alpha) 20 | val text = "${ChatFormatting.GRAY}Durability ${ChatFormatting.RESET}${item.maxDamage - item.itemDamage}" 21 | if(item.maxDamage > 0) drawText(text, c) 22 | else if(mc.currentScreen is CuiManagerGui) drawText("${ChatFormatting.GRAY}Durability ${ChatFormatting.WHITE}xx", -1) 23 | } 24 | } -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/TeleportCommand.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command; 2 | 3 | import me.robeart.raion.client.util.ChatUtils; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.entity.EntityPlayerSP; 6 | 7 | public class TeleportCommand extends Command { 8 | 9 | public TeleportCommand() { 10 | super("Teleport", new String[]{"tp"}, "Teleport to where you want to go ", "tp [y], tp [x] [z], tp [x] [y] [z]"); 11 | } 12 | 13 | @Override 14 | public void call(String[] args) { 15 | if (args.length == 0) { 16 | ChatUtils.message("Invalid arguments"); 17 | return; 18 | } 19 | Minecraft mc = Minecraft.getMinecraft(); 20 | EntityPlayerSP player = mc.player; 21 | if (args.length == 1) { 22 | player.setPosition(player.posX, player.posY + Double.parseDouble(args[0]), player.posZ); 23 | } 24 | if (args.length == 2) 25 | player.setPosition(player.posX + Double.parseDouble(args[0]), player.posY, player.posZ + Double.parseDouble(args[1])); 26 | if (args.length == 3) 27 | player.setPosition(player.posX + Double.parseDouble(args[0]), player.posY + Double.parseDouble(args[1]), player.posZ + Double 28 | .parseDouble(args[2])); 29 | 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/Command.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import net.minecraft.client.Minecraft; 5 | 6 | public abstract class Command { 7 | 8 | protected static final Minecraft mc = Minecraft.getMinecraft(); 9 | private String name; 10 | private String[] alias; 11 | private String description; 12 | private String usage; 13 | 14 | public Command(String name, String[] alias, String description, String usage) { 15 | this.name = name; 16 | this.alias = alias; 17 | this.description = description; 18 | this.usage = usage; 19 | } 20 | 21 | public Command(String name, String description, String usage) { 22 | this.name = name; 23 | this.alias = null; 24 | this.description = description; 25 | this.usage = usage; 26 | } 27 | 28 | public abstract void call(String[] args); 29 | 30 | public String getName() { 31 | return this.name; 32 | } 33 | 34 | public String[] getAlias() { 35 | return this.alias; 36 | } 37 | 38 | public String getDescription() { 39 | return this.description; 40 | } 41 | 42 | public String getUsage() { 43 | return Raion.INSTANCE.getCommandManager().getPrefix() + this.usage; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/managers/MacroManager.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.managers 2 | 3 | import me.robeart.raion.client.macro.Macro 4 | import me.robeart.raion.client.util.Key 5 | 6 | /** 7 | * @author cats 8 | */ 9 | object MacroManager: MutableMap { 10 | val macros = HashMap() 11 | override operator fun get(bind: Key): Macro? = macros[bind] 12 | operator fun set(bind: Key, macro: Macro) { 13 | macros[bind] = macro 14 | } 15 | 16 | override fun remove(bind: Key): Macro? = macros.remove(bind) 17 | override val size: Int = macros.size 18 | 19 | override fun containsKey(key: Key): Boolean = macros.containsKey(key) 20 | override fun containsValue(value: Macro): Boolean = macros.containsValue(value) 21 | override fun isEmpty(): Boolean = macros.isEmpty() 22 | override val entries: MutableSet> 23 | get() = macros.entries 24 | override val keys: MutableSet 25 | get() = macros.keys 26 | override val values: MutableCollection 27 | get() = macros.values 28 | 29 | override fun clear() = macros.clear() 30 | override fun put(key: Key, value: Macro): Macro? = macros.put(key, value) 31 | override fun putAll(from: Map) = macros.putAll(from) 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickgui/MainPanel.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickgui; 2 | 3 | import me.robeart.raion.client.gui.clickgui.theme.Theme; 4 | 5 | import java.util.ArrayList; 6 | 7 | public class MainPanel { 8 | public int x; 9 | public int y; 10 | public String headerString; 11 | public CategoryPanel currentPanel = null; 12 | public ArrayList typeButtons; 13 | public ArrayList typePanels; 14 | Theme theme; 15 | 16 | public MainPanel(String header, int x, int y, Theme theme) { 17 | this.headerString = header; 18 | this.x = x; 19 | this.y = y; 20 | this.theme = theme; 21 | this.typeButtons = new ArrayList(); 22 | this.typePanels = new ArrayList(); 23 | theme.mainPanelConstructor(this, x, y); 24 | } 25 | 26 | public void draw(float mouseX, float mouseY) { 27 | theme.mainPanelDraw(this, mouseX, mouseY); 28 | } 29 | 30 | public void mouseClicked(float mouseX, float mouseY, int state) { 31 | theme.mainPanelMouseClicked(this, mouseX, mouseY, state); 32 | } 33 | 34 | public void mouseReleased(float x, float y, int state) { 35 | theme.mainPanelMouseReleased(this, x, y, state); 36 | } 37 | 38 | public void keyPressed(int key) { 39 | theme.mainPanelKeyPress(this, key); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/FriendCommand.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.util.ChatUtils; 5 | 6 | /** 7 | * @author Robeart 8 | */ 9 | public class FriendCommand extends Command { 10 | 11 | public FriendCommand() { 12 | super("Friend", new String[]{"friend"}, "Manage Friends", "friend add/remove [player]"); 13 | } 14 | 15 | @Override 16 | public void call(String[] args) { 17 | if (args.length == 0) { 18 | ChatUtils.message("Please specify add/remove and a player!"); 19 | return; 20 | } 21 | if (args.length == 1) { 22 | ChatUtils.message("Please specify a player!"); 23 | return; 24 | } 25 | if (args[0].equalsIgnoreCase("add")) { 26 | if (Raion.INSTANCE.getFriendManager().add(args[1])) 27 | ChatUtils.message("Added " + args[1] + " to your friendslist"); 28 | else ChatUtils.message(args[1] + "is already in your friendslist"); 29 | 30 | } 31 | if (args[0].equalsIgnoreCase("remove")) { 32 | if (Raion.INSTANCE.getFriendManager().remove(args[1])) 33 | ChatUtils.message("Removed " + args[1] + " from your friendslist"); 34 | else ChatUtils.message("Can't find " + args[1] + " in your friendslist"); 35 | 36 | } 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/ClickGuiModule.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module 2 | 3 | import me.robeart.raion.client.Raion 4 | import me.robeart.raion.client.value.BooleanValue 5 | import me.robeart.raion.client.value.FloatValue 6 | import me.robeart.raion.client.value.IntValue 7 | import me.robeart.raion.client.value.ListValue 8 | import me.robeart.raion.client.value.kotlin.ValueDelegate 9 | 10 | /** 11 | * @author cookiedragon234 07/Jun/2020 12 | */ 13 | object ClickGuiModule: Module("ClickGui", "O", "Enable the ClickGui", Category.RENDER, false) { 14 | private val backgroundStyleSetting = ListValue("Background", "Blur", listOf("Opaque", "Blur")) 15 | val backgroundStyle by ValueDelegate(backgroundStyleSetting) 16 | val backgroundOpacity by ValueDelegate(FloatValue("Opacity", 0.5f, 0.0f, 1.0f, 0.05f, backgroundStyleSetting, "Opaque")) 17 | val maxCategorySize by ValueDelegate(IntValue("Category Size", 200, 100, 500, 5)) 18 | val scrollSpeed by ValueDelegate(FloatValue("Scroll Speed", 5f, 1f, 10f, 1f)) 19 | val useEventScroll by ValueDelegate(BooleanValue("Event Scroll", false)) 20 | val colourSpeed by ValueDelegate(FloatValue("Colour Interpolate", 0.2f, 0.1f, 1f, 0.05f)) 21 | 22 | override fun onEnable() { 23 | mc.displayGuiScreen(Raion.INSTANCE.gui) 24 | state = false 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/exploit/EnderBackpackModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.exploit; 2 | 3 | import me.robeart.raion.client.events.events.player.OnUpdateEvent; 4 | import me.robeart.raion.client.module.Module; 5 | import net.minecraft.client.gui.GuiScreen; 6 | import net.minecraft.client.gui.inventory.GuiChest; 7 | import net.minecraft.client.gui.inventory.GuiScreenHorseInventory; 8 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 9 | 10 | /** 11 | * @author cats 12 | * This lets you close then reopen the enderchest GUI, it is very buggy, and not recommended for standard use 13 | */ 14 | public class EnderBackpackModule extends Module { 15 | 16 | private GuiScreen screen; 17 | 18 | public EnderBackpackModule() { 19 | super("EBackPack", "Closes your enderchest GUI and allows you to open it whenever you want", Category.EXPLOIT); 20 | } 21 | 22 | @Listener 23 | public void onUpdate(OnUpdateEvent event) { 24 | if (mc.currentScreen instanceof GuiChest || mc.currentScreen instanceof GuiScreenHorseInventory) { 25 | screen = mc.currentScreen; 26 | mc.currentScreen = null; 27 | } 28 | } 29 | 30 | @Override 31 | public void onDisable() { 32 | if (mc.world != null && mc.player != null) { 33 | mc.currentScreen = screen; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/render/search/SearchConfiguration.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.render.search 2 | 3 | import java.io.File 4 | import java.io.PrintWriter 5 | import java.util.Scanner 6 | 7 | /** 8 | * @author cookiedragon234 19/Jun/2020 9 | */ 10 | object SearchConfiguration { 11 | 12 | val saveFile = File("raion/search.txt").also { 13 | if (!it.exists()) { 14 | it.createNewFile() 15 | } 16 | } 17 | fun load() { 18 | try { 19 | Scanner(saveFile.inputStream()).use { 20 | while (it.hasNextLine()) { 21 | SearchBlocksManager.addHighlight( 22 | it.nextLine(), 23 | true 24 | ) 25 | } 26 | } 27 | if (SearchBlocksManager.toHighlight.isNotEmpty()) { 28 | return 29 | } 30 | } catch (t: Throwable) { 31 | t.printStackTrace() 32 | } 33 | SearchBlocksManager.addHighlight("chest", true) 34 | SearchBlocksManager.addHighlight("ender_chest", true) 35 | SearchBlocksManager.addHighlight("shulker", true) 36 | save() 37 | } 38 | fun save() { 39 | try { 40 | PrintWriter(saveFile.outputStream()).use { 41 | for (block in SearchBlocksManager.toHighlight) { 42 | it.println(block.registryName?.path ?: block.localizedName) 43 | } 44 | } 45 | } catch (t: Throwable) { 46 | t.printStackTrace() 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/ToggleCommand.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.module.Module; 5 | import me.robeart.raion.client.util.ChatUtils; 6 | 7 | public class ToggleCommand extends Command { 8 | 9 | public ToggleCommand() { 10 | super("Toggle", new String[]{"t", "tl"}, "Toggle a module", "toggle [module], toggle [module] on/off"); 11 | } 12 | 13 | @Override 14 | public void call(String[] args) { 15 | if (args.length == 0) { 16 | ChatUtils.message("Please specify a module!"); 17 | return; 18 | } 19 | else { 20 | Module module = Raion.INSTANCE.getModuleManager().getModule(args[0]); 21 | if (module == null) { 22 | ChatUtils.message("Can't find module " + args[0]); 23 | return; 24 | } 25 | if (args.length >= 2) { 26 | if (args[1].equalsIgnoreCase("on") || args[1].equalsIgnoreCase("off")) { 27 | boolean value = args[1].equalsIgnoreCase("on"); 28 | module.setState(value); 29 | } 30 | else { 31 | ChatUtils.message("Invalid argument " + args[1]); 32 | } 33 | } 34 | else module.toggle(); 35 | String state = module.getState() ? "\u00a7aenabled" : "\u00a7cdisabled"; 36 | ChatUtils.message(module.getName() + " has been " + state); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/elements/DirectionsElement.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.elements 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting 4 | import me.robeart.raion.client.gui.cui.element.CuiElement 5 | import me.robeart.raion.client.util.MathUtils 6 | import me.robeart.raion.client.util.Utils 7 | import net.minecraft.util.math.MathHelper 8 | import net.minecraft.util.math.Vec2f 9 | 10 | /** 11 | * @author Robeart 22/07/2020 12 | */ 13 | class DirectionsElement: CuiElement() { 14 | override fun render(mousePos: Vec2f) { 15 | super.render(mousePos) 16 | var entity = mc.renderViewEntity 17 | if (entity == null) entity = mc.player 18 | 19 | val pitch = MathUtils.round(MathHelper.wrapDegrees(entity!!.rotationPitch), 1) 20 | val yaw = MathUtils.round(MathHelper.wrapDegrees(entity!!.rotationYaw), 1) 21 | val direction = when(entity.horizontalFacing.getName()) { 22 | "south" -> "South +Z" 23 | "north" -> "North -Z" 24 | "east" -> "East +X" 25 | "west" -> "West -X" 26 | else -> "Error" 27 | } 28 | 29 | val text = "$direction ${ChatFormatting.GRAY}[${ChatFormatting.WHITE}$yaw, $pitch${ChatFormatting.GRAY}]" 30 | drawText(text, Utils.getRgb(255, 255, 255, 255)) 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/movement/SprintModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.movement; 2 | 3 | import me.robeart.raion.client.events.EventStageable; 4 | import me.robeart.raion.client.events.events.player.UpdateWalkingPlayerEvent; 5 | import me.robeart.raion.client.module.Module; 6 | import me.robeart.raion.client.value.ListValue; 7 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 8 | 9 | import java.util.Arrays; 10 | 11 | /** 12 | * @author cookiedragon234 13 | */ 14 | public class SprintModule extends Module { 15 | private final ListValue mode = new ListValue("Mode", "Rage", Arrays.asList("Rage", "Legit")); 16 | 17 | public SprintModule() { 18 | super("Sprint", "Automatically sprints", Category.MOVEMENT); 19 | } 20 | 21 | @Listener 22 | private void onUpdateWalkingPlayer(UpdateWalkingPlayerEvent event) { 23 | if (event.getStage() == EventStageable.EventStage.PRE) { 24 | if (mode.getValue().equals("Rage")) { 25 | if (mc.player.movementInput.moveForward != 0 || mc.player.movementInput.moveStrafe != 0) { 26 | mc.player.setSprinting(true); 27 | } 28 | } 29 | else { 30 | if (mc.player.movementInput.moveForward >= 0.8F && mc.player.getFoodStats().getFoodLevel() > 6.0f) { 31 | mc.player.setSprinting(true); 32 | } 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/player/LiquidInteractModule.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.player 2 | 3 | import me.robeart.raion.client.events.events.block.IsLiquidSolidEvent 4 | import me.robeart.raion.client.events.events.client.ClickMouseButtonEvent 5 | import me.robeart.raion.client.module.Module 6 | import me.robeart.raion.client.util.MouseButton 7 | import me.robeart.raion.client.value.BooleanValue 8 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener 9 | 10 | /** 11 | * @author cookiedragon234 25/Mar/2020 12 | */ 13 | object LiquidInteractModule: Module( 14 | "LiquidInteract", 15 | "Makes liquids like water and lava react the same way as blocks", 16 | Category.PLAYER 17 | ) { 18 | private val onlyRightClick = BooleanValue("Only Right Click", true) 19 | private var solid = false 20 | 21 | @Listener 22 | private fun onMouseClick(event: ClickMouseButtonEvent) { 23 | if (event.mouseButton == MouseButton.RIGHT && onlyRightClick.value) { 24 | solid = true 25 | mc.entityRenderer.getMouseOver(1f) 26 | } 27 | } 28 | 29 | @Listener 30 | private fun onLiquidSolidityCheck(isLiquidSolidEvent: IsLiquidSolidEvent) { 31 | if (onlyRightClick.value) { 32 | isLiquidSolidEvent.solid = solid 33 | solid = false 34 | } else { 35 | isLiquidSolidEvent.solid = true 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/render/MixinChunkRenderDispatcher.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.render; 2 | 3 | import com.google.common.util.concurrent.ListenableFuture; 4 | import me.robeart.raion.client.Raion; 5 | import me.robeart.raion.client.events.events.render.UploadChunkEvent; 6 | import net.minecraft.client.renderer.BufferBuilder; 7 | import net.minecraft.client.renderer.chunk.ChunkRenderDispatcher; 8 | import net.minecraft.client.renderer.chunk.CompiledChunk; 9 | import net.minecraft.client.renderer.chunk.RenderChunk; 10 | import net.minecraft.util.BlockRenderLayer; 11 | import org.spongepowered.asm.mixin.Mixin; 12 | import org.spongepowered.asm.mixin.injection.At; 13 | import org.spongepowered.asm.mixin.injection.Inject; 14 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 15 | 16 | @Mixin(ChunkRenderDispatcher.class) 17 | public abstract class MixinChunkRenderDispatcher { 18 | 19 | @Inject(method = "uploadChunk", at = @At(value = "INVOKE", target = "net/minecraft/client/renderer/OpenGlHelper.useVbo()Z")) 20 | private void onUploadChunk(BlockRenderLayer a, BufferBuilder a2, RenderChunk a3, CompiledChunk a4, double a5, CallbackInfoReturnable> a6) { 21 | Raion.INSTANCE.getEventManager().dispatchEvent(new UploadChunkEvent(a3, a2)); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/CanRenderInLayerEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.block.Block; 5 | import net.minecraft.block.state.IBlockState; 6 | import net.minecraft.util.BlockRenderLayer; 7 | 8 | public class CanRenderInLayerEvent extends EventCancellable { 9 | 10 | private Block block; 11 | private IBlockState iBlockState; 12 | private BlockRenderLayer blockRenderLayer; 13 | 14 | public CanRenderInLayerEvent(Block block, IBlockState iBlockState, BlockRenderLayer blockRenderLayer) { 15 | this.block = block; 16 | this.iBlockState = iBlockState; 17 | this.blockRenderLayer = blockRenderLayer; 18 | } 19 | 20 | public Block getBlock() { 21 | return this.block; 22 | } 23 | 24 | public void setBlock(Block block) { 25 | this.block = block; 26 | } 27 | 28 | public IBlockState getiBlockState() { 29 | return this.iBlockState; 30 | } 31 | 32 | public void setiBlockState(IBlockState iBlockState) { 33 | this.iBlockState = iBlockState; 34 | } 35 | 36 | public BlockRenderLayer getBlockRenderLayer() { 37 | return this.blockRenderLayer; 38 | } 39 | 40 | public void setBlockRenderLayer(BlockRenderLayer blockRenderLayer) { 41 | this.blockRenderLayer = blockRenderLayer; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/impl/annotated/dispatch/MethodEventDispatcher.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo.impl.annotated.dispatch; 2 | 3 | import team.stiff.pomelo.dispatch.EventDispatcher; 4 | import team.stiff.pomelo.handler.EventHandler; 5 | 6 | import java.lang.reflect.Method; 7 | import java.util.Collections; 8 | import java.util.Map; 9 | import java.util.Set; 10 | 11 | /** 12 | * An implementation of the {@link EventDispatcher} designed 13 | * to invoke the listeners via reflection as the handler is a 14 | * {@link Method} object. 15 | * 16 | * @author Daniel 17 | * @since May 31, 2017 18 | */ 19 | public final class MethodEventDispatcher implements EventDispatcher { 20 | /** 21 | * The scanning strategy chosen by the event-bus implementation. 22 | */ 23 | private final Map, Set> eventHandlers; 24 | 25 | public MethodEventDispatcher(final Map, Set> eventHandlers) { 26 | this.eventHandlers = eventHandlers; 27 | } 28 | 29 | @Override 30 | public void dispatch(final E event) { 31 | // iterate all registered event handlers and pass the event onto them 32 | for (final EventHandler eventHandler : eventHandlers.getOrDefault( 33 | event.getClass(), Collections.emptySet())) 34 | eventHandler.handle(event); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/player/XCarryModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.player; 2 | 3 | import me.robeart.raion.client.events.EventStageable; 4 | import me.robeart.raion.client.events.events.network.PacketSendEvent; 5 | import me.robeart.raion.client.imixin.ICPacketCloseWindow; 6 | import me.robeart.raion.client.module.Module; 7 | import net.minecraft.network.play.client.CPacketCloseWindow; 8 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 9 | 10 | /** 11 | * @author Robeart 12 | */ 13 | public class XCarryModule extends Module { 14 | 15 | public XCarryModule() { 16 | super("XCarry", "Allows you to carry items in your crafting table slots", Category.PLAYER); 17 | } 18 | 19 | @Override 20 | public void onDisable() { 21 | if (mc.world != null) { 22 | mc.getConnection().sendPacket(new CPacketCloseWindow(mc.player.inventoryContainer.windowId)); 23 | } 24 | } 25 | 26 | @Listener 27 | private void onSendPacket(PacketSendEvent event) { 28 | if (event.getStage() != EventStageable.EventStage.PRE) return; 29 | if (event.getPacket() instanceof CPacketCloseWindow) { 30 | CPacketCloseWindow packet = (CPacketCloseWindow) event.getPacket(); 31 | if (((ICPacketCloseWindow) packet).getWindowId() == mc.player.inventoryContainer.windowId) 32 | event.setCanceled(true); 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/combat/AutoDisconnectModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.combat; 2 | 3 | import me.robeart.raion.client.events.events.player.OnUpdateEvent; 4 | import me.robeart.raion.client.module.Module; 5 | import me.robeart.raion.client.util.minecraft.MinecraftUtils; 6 | import me.robeart.raion.client.value.BooleanValue; 7 | import me.robeart.raion.client.value.FloatValue; 8 | import net.minecraft.util.text.TextComponentString; 9 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 10 | 11 | /** 12 | * @author Robeart 13 | */ 14 | public class AutoDisconnectModule extends Module { 15 | 16 | public FloatValue health = new FloatValue("Health", 4.0f, 1f, 20f, 1f); 17 | public BooleanValue disable = new BooleanValue("Disable on DC", true); 18 | 19 | public AutoDisconnectModule() { 20 | super("AutoDisconnect", "Automatically disconnects from the server when on set health", Category.COMBAT); 21 | } 22 | 23 | @Listener 24 | private void onUpdate(OnUpdateEvent event) { 25 | if (mc.player.getHealth() <= health.getValue() && mc.player.getHealth() != 0 && !mc.player.isDead) { 26 | MinecraftUtils.quickLogout(); 27 | mc.getConnection().getNetworkManager().closeChannel(new TextComponentString("Kicked by AutoDisconnect!")); 28 | if (disable.getValue()) this.toggle(); 29 | } 30 | } 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/exploit/NetHandlerModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.exploit; 2 | 3 | //import com.sun.xml.internal.bind.v2.runtime.reflect.Lister; 4 | 5 | import me.robeart.raion.client.events.EventStageable; 6 | import me.robeart.raion.client.events.events.network.PacketSendEvent; 7 | import me.robeart.raion.client.module.Module; 8 | import net.minecraft.network.NetworkManager; 9 | import net.minecraft.network.play.client.CPacketChatMessage; 10 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 11 | 12 | /** 13 | * @author Robeart 14 | */ 15 | public class NetHandlerModule extends Module { 16 | 17 | public NetworkManager handler; 18 | 19 | public NetHandlerModule() { 20 | super("NetHandler", "Changes SPacketChat NetHandler to the current NetHandler after softLeave", Category.EXPLOIT); 21 | } 22 | 23 | @Override 24 | public void onEnable() { 25 | if (mc.getConnection() != null) this.handler = mc.getConnection().getNetworkManager(); 26 | } 27 | 28 | @Listener 29 | public void onPacketSend(PacketSendEvent event) { 30 | if (event.getStage() != EventStageable.EventStage.PRE) return; 31 | if (event.getPacket() instanceof CPacketChatMessage) { 32 | if (event.getNetworkManager() != handler) { 33 | handler.sendPacket(event.getPacket()); 34 | event.setCanceled(true); 35 | } 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/DrawScreenGuiChatEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import net.minecraft.client.gui.GuiTextField; 5 | 6 | public class DrawScreenGuiChatEvent extends EventCancellable { 7 | 8 | private int mouseX, mouseY; 9 | private float partialTicks; 10 | private GuiTextField inputField; 11 | 12 | public DrawScreenGuiChatEvent(int mouseX, int mouseY, float partialTicks, GuiTextField inputField) { 13 | this.mouseX = mouseX; 14 | this.mouseY = mouseY; 15 | this.partialTicks = partialTicks; 16 | this.inputField = inputField; 17 | } 18 | 19 | public int getMouseX() { 20 | return this.mouseX; 21 | } 22 | 23 | public void setMouseX(int mouseX) { 24 | this.mouseX = mouseX; 25 | } 26 | 27 | public int getMouseY() { 28 | return this.mouseY; 29 | } 30 | 31 | public void setMouseY(int mouseY) { 32 | this.mouseY = mouseY; 33 | } 34 | 35 | public float getPartialTicks() { 36 | return this.partialTicks; 37 | } 38 | 39 | public void setPartialTicks(float partialTicks) { 40 | this.partialTicks = partialTicks; 41 | } 42 | 43 | public GuiTextField getInputField() { 44 | return this.inputField; 45 | } 46 | 47 | public void setInputField(GuiTextField inputField) { 48 | this.inputField = inputField; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/anchor/ElementAnchorPoint.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.anchor 2 | 3 | import me.robeart.raion.client.gui.cui.RaionCui 4 | import me.robeart.raion.client.gui.cui.anchor.AnchorPointDirection.* 5 | import me.robeart.raion.client.gui.cui.element.CuiElement 6 | import java.util.UUID 7 | 8 | /** 9 | * @author cookiedragon234 17/Jun/2020 10 | */ 11 | class ElementAnchorPoint(var snapTo: CuiElement?, direction: AnchorPointDirection, val uuid: UUID? = snapTo?.uuid): AnchorPoint(direction) { 12 | override fun snap(element: CuiElement) { 13 | val snapTo = snapTo ?: (RaionCui.elements.firstOrNull { it.uuid == uuid } ?: return) 14 | this.snapTo = snapTo 15 | when (direction) { 16 | TOP_LEFT -> { 17 | element.position.posX = snapTo.position.posX 18 | element.position.posY = snapTo.position.posY - element.position.sizeY 19 | } 20 | TOP_RIGHT -> { 21 | element.position.posX = snapTo.position.bottomX - element.position.sizeX 22 | element.position.posY = snapTo.position.posY - element.position.sizeY 23 | } 24 | BOTTOM_RIGHT -> { 25 | element.position.posX = snapTo.position.bottomX - element.position.sizeX 26 | element.position.posY = snapTo.position.bottomY 27 | } 28 | BOTTOM_LEFT -> { 29 | element.position.posX = snapTo.position.posX 30 | element.position.posY = snapTo.position.bottomY 31 | } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/config/MacroConfig.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.config 2 | 3 | import com.google.gson.JsonArray 4 | import com.google.gson.JsonObject 5 | import me.robeart.raion.client.macro.Macro 6 | import me.robeart.raion.client.managers.MacroManager 7 | import me.robeart.raion.client.util.Key 8 | import me.robeart.raion.client.util.Saveable 9 | import java.io.File 10 | 11 | /** 12 | * @author cookiedragon234 02/Jun/2020 13 | */ 14 | object MacroConfig: Saveable { 15 | override val configFile: File = File("raion/macros.json") 16 | override val name: String 17 | get() = "Macros Config" 18 | 19 | override fun write(jsonObject: JsonObject) { 20 | val macrosObj = JsonArray() 21 | for ((key, macro) in MacroManager.macros) { 22 | val macroJson = JsonObject() 23 | macroJson.addProperty("Key", key.toString()) 24 | macroJson.addProperty("Command", macro.commands) 25 | macrosObj.add(macroJson) 26 | } 27 | jsonObject.add("Macros", macrosObj) 28 | } 29 | 30 | override fun read(jsonObject: JsonObject) { 31 | val macrosObj = jsonObject.get("Macros") 32 | macrosObj as JsonArray 33 | for (entry in macrosObj) { 34 | entry as JsonObject 35 | val keyName = entry.get("Key").asString 36 | val command = entry.get("Command").asString 37 | val key = Key.fromName(keyName) 38 | val macro = Macro(key, command) 39 | MacroManager.macros[key] = macro 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/PutColorMultiplierEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | 5 | import java.nio.IntBuffer; 6 | 7 | public class PutColorMultiplierEvent extends EventCancellable { 8 | 9 | float r, g, b; 10 | IntBuffer buffer; 11 | int startBufferSizeIn; 12 | 13 | public PutColorMultiplierEvent(float r, float g, float b, IntBuffer buffer, int startBufferSizeIn) { 14 | this.r = r; 15 | this.g = g; 16 | this.b = b; 17 | this.buffer = buffer; 18 | this.startBufferSizeIn = startBufferSizeIn; 19 | } 20 | 21 | public float getR() { 22 | return this.r; 23 | } 24 | 25 | public void setR(float r) { 26 | this.r = r; 27 | } 28 | 29 | public float getG() { 30 | return this.g; 31 | } 32 | 33 | public void setG(float g) { 34 | this.g = g; 35 | } 36 | 37 | public float getB() { 38 | return this.b; 39 | } 40 | 41 | public void setB(float b) { 42 | this.b = b; 43 | } 44 | 45 | public IntBuffer getBuffer() { 46 | return this.buffer; 47 | } 48 | 49 | public void setBuffer(IntBuffer buffer) { 50 | this.buffer = buffer; 51 | } 52 | 53 | public int getStartBufferSizeIn() { 54 | return this.startBufferSizeIn; 55 | } 56 | 57 | public void setStartBufferSizeIn(int startBufferSizeIn) { 58 | this.startBufferSizeIn = startBufferSizeIn; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/ModuleListCommand.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command 2 | 3 | import me.robeart.raion.client.Raion 4 | 5 | /** 6 | * @author cookiedragon234 20/Apr/2020 7 | */ 8 | object ModuleListCommand: Command("modulelist", "print a module list", "modulelist") { 9 | override fun call(args: Array) { 10 | println(buildString { 11 | append("-------------Modules:-------------\n") 12 | for (module in Raion.INSTANCE.moduleManager.moduleList) { 13 | append(module.name) 14 | append(": ") 15 | append(module.description) 16 | append('\n') 17 | // TODO: Collate values in a tree structure representing parent child relationships 18 | // e.g.: 19 | // Crystal Aura 20 | // - Place: Boolean 21 | // - Place Delay: Int 22 | // - Break: Boolean 23 | // -- Break Delay: Int 24 | for (value in module.values) { 25 | append("\t- ") 26 | append(value.name) 27 | append(": ") 28 | append(value.value::class.java.simpleName) 29 | append('\n') 30 | } 31 | } 32 | 33 | append("\n-------------Commands:-------------\n") 34 | for (command in Raion.INSTANCE.commandManager.commandList) { 35 | if (command == this@ModuleListCommand) continue 36 | 37 | append(command.name) 38 | append(": ") 39 | append(command.description) 40 | append('\n') 41 | } 42 | }) 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/chunk/MixinChunk.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.chunk; 2 | 3 | import me.robeart.raion.client.module.render.VisionModule; 4 | import net.minecraft.util.math.BlockPos; 5 | import net.minecraft.world.EnumSkyBlock; 6 | import net.minecraft.world.chunk.Chunk; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | /** 13 | * @author cookiedragon234 08/Jun/2020 14 | */ 15 | @Mixin(Chunk.class) 16 | public class MixinChunk { 17 | @Inject(method = "getLightFor", at = @At("HEAD"), cancellable = true) 18 | private void injectGetLightFor(EnumSkyBlock type, BlockPos pos, CallbackInfoReturnable cir) { 19 | try { 20 | if (VisionModule.INSTANCE.getState() && VisionModule.INSTANCE.getBrightness()) { 21 | //cir.setReturnValue(15); 22 | //return; 23 | } 24 | } catch (Throwable t) {} 25 | } 26 | 27 | @Inject(method = "getLightSubtracted", at = @At("HEAD"), cancellable = true) 28 | private void getLightSubtractedInject(BlockPos pos, int amount, CallbackInfoReturnable cir) { 29 | try { 30 | if (VisionModule.INSTANCE.getState() && VisionModule.INSTANCE.getBrightness()) { 31 | //cir.setReturnValue(15); 32 | //return; 33 | } 34 | } catch (Throwable t) {} 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/entity/living/MixinAbstractHorse.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.entity.living; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.events.events.entity.AbstractHorseSaddledEvent; 5 | import me.robeart.raion.client.events.events.entity.CanBeSteeredEvent; 6 | import net.minecraft.entity.passive.AbstractHorse; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 11 | 12 | @Mixin(value = AbstractHorse.class, priority = 9998) 13 | public abstract class MixinAbstractHorse { 14 | 15 | @Inject(method = "isHorseSaddled", at = @At("HEAD"), cancellable = true) 16 | private void isHorseSaddled(CallbackInfoReturnable ci) { 17 | AbstractHorseSaddledEvent event = new AbstractHorseSaddledEvent(); 18 | Raion.INSTANCE.getEventManager().dispatchEvent(event); 19 | if (event.isCanceled()) ci.setReturnValue(event.isCanceled()); 20 | } 21 | 22 | @Inject(method = "canBeSteered", at = @At("HEAD"), cancellable = true) 23 | public void canBeSteered(CallbackInfoReturnable ci) { 24 | CanBeSteeredEvent event = new CanBeSteeredEvent(); 25 | Raion.INSTANCE.getEventManager().dispatchEvent(event); 26 | if (event.isCanceled()) ci.setReturnValue(event.isCanceled()); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/impl/annotated/filter/MethodFilterScanner.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo.impl.annotated.filter; 2 | 3 | import team.stiff.pomelo.filter.EventFilter; 4 | import team.stiff.pomelo.filter.EventFilterScanner; 5 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 6 | 7 | import java.lang.reflect.Method; 8 | import java.util.Collections; 9 | import java.util.HashSet; 10 | import java.util.Set; 11 | 12 | /** 13 | * An implementation of the filter scanner that locates specific 14 | * filters based on annotations and reflection. 15 | * 16 | * @author Daniel 17 | * @since Jun 14, 2017 18 | */ 19 | public final class MethodFilterScanner implements EventFilterScanner { 20 | 21 | @Override 22 | public Set scan(final Method listener) { 23 | if (!listener.isAnnotationPresent(Listener.class)) 24 | return Collections.emptySet(); 25 | 26 | final Set filters = new HashSet<>(); 27 | // iterate all filters in the annotation and instantiate them 28 | for (final Class filter : listener 29 | .getDeclaredAnnotation(Listener.class).filters()) 30 | try { 31 | filters.add(filter.newInstance()); 32 | } catch (final Exception exception) { 33 | exception.printStackTrace(); 34 | } 35 | 36 | return filters; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/render/ViewportModule.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.render 2 | 3 | import me.robeart.raion.client.module.Module 4 | import me.robeart.raion.client.value.BooleanValue 5 | import me.robeart.raion.client.value.FloatValue 6 | import me.robeart.raion.client.value.IntValue 7 | import me.robeart.raion.client.value.kotlin.ValueDelegate 8 | import org.lwjgl.util.glu.Project 9 | 10 | /** 11 | * @author cookiedragon234 16/Jul/2020 12 | */ 13 | object ViewportModule: Module("Viewport", "Modify your viewport", Category.RENDER) { 14 | private val hands by ValueDelegate(BooleanValue("Hands", true)) 15 | private val fovSetting = BooleanValue("FOV", true) 16 | private val fov by ValueDelegate(IntValue("FOV", 90, 10, 180, 5, fovSetting)) 17 | private val aspectSetting = BooleanValue("Aspect Ratio", true) 18 | private val aspect by ValueDelegate(FloatValue("Aspect Ratio", 1.77f, 0.75f, 2.5f, 0.1f, aspectSetting)) 19 | 20 | @JvmOverloads 21 | fun project(oldFovY: Float, oldAspectRatio: Float, oldZNear: Float, oldZFar: Float, fromHands: Boolean = false) { 22 | if (this.state && (!fromHands || hands)) { 23 | Project.gluPerspective( 24 | if (fovSetting.value) fov.toFloat() else oldFovY, 25 | if (aspectSetting.value) aspect else oldAspectRatio, 26 | oldZNear, 27 | oldZFar 28 | ) 29 | } else { 30 | Project.gluPerspective(oldFovY, oldAspectRatio, oldZNear, oldZFar) 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/crack/BiomeGenerator.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.crack 2 | 3 | import it.unimi.dsi.fastutil.longs.Long2ObjectMap 4 | import net.minecraft.init.Biomes 5 | import net.minecraft.world.WorldType 6 | import net.minecraft.world.biome.Biome 7 | import net.minecraft.world.gen.ChunkGeneratorSettings 8 | import net.minecraft.world.gen.layer.GenLayer 9 | import net.minecraft.world.gen.layer.IntCache 10 | 11 | /** 12 | * @author cookiedragon234 13/Jun/2020 13 | */ 14 | object BiomeGenerator { 15 | private val genLayers = HashMap>() 16 | 17 | fun getLayersForSeed(seed: Long): Array { 18 | var out = genLayers[seed] 19 | 20 | if (out == null) { 21 | out = GenLayer.initializeAllBiomeGenerators(seed, WorldType.DEFAULT, ChunkGeneratorSettings.Factory().build()) 22 | genLayers[seed] = out 23 | } 24 | 25 | return out!! 26 | } 27 | 28 | fun getBiomesAtLocation(seed: Long, x: Int, y: Int, width: Int, height: Int): Array { 29 | val genLayers = getLayersForSeed(seed) 30 | val biomeGen = genLayers[0] // Quarter resolution biome generator 31 | val biomeGenFull = genLayers[1] // Full resolution biome generator, needed for accurate biome calculation 32 | 33 | IntCache.resetIntCache() 34 | val biomeData = biomeGenFull.getInts(x, y, width, height) 35 | return Array(width * height) { i -> 36 | Biome.getBiome(biomeData[i], Biomes.PLAINS) 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/elements/TpsElement.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.elements 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting 4 | import me.robeart.raion.client.events.events.network.PacketReceiveEvent 5 | import me.robeart.raion.client.gui.cui.element.CuiElement 6 | import me.robeart.raion.client.util.MathUtils.clamp 7 | import me.robeart.raion.client.util.Utils 8 | import net.minecraft.network.play.server.SPacketTimeUpdate 9 | import net.minecraft.util.math.MathHelper 10 | import net.minecraft.util.math.Vec2f 11 | 12 | /** 13 | * @author cookiedragon234 02/Jul/2020 14 | */ 15 | class TpsElement: CuiElement() { 16 | 17 | private val tps = FloatArray(20) { 20f } 18 | private var lastUpdate: Long = -1L 19 | private var next: Int = 0 20 | 21 | override fun render(mousePos: Vec2f) { 22 | super.render(mousePos) 23 | 24 | val tps = getTps() 25 | val text = "${ChatFormatting.GRAY}TPS ${ChatFormatting.WHITE}$tps" 26 | drawText(text) 27 | } 28 | 29 | override fun onPacketReceive(event: PacketReceiveEvent) { 30 | if(event.packet is SPacketTimeUpdate) { 31 | val now = System.currentTimeMillis() 32 | if (lastUpdate > 0) { 33 | val delta = (now - lastUpdate) / 1000f // delta seconds 34 | tps[next % tps.size] = clamp(20f / delta, 0f, 20f) 35 | next += 1 36 | } 37 | lastUpdate = now 38 | } 39 | } 40 | 41 | private fun getTps(): Float = if (tps.isNotEmpty()) tps.sum() / tps.size else 0f 42 | 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/entity/living/player/MixinAbstractClientPlayer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.entity.living.player; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.events.events.player.LocateCapeEvent; 5 | import net.minecraft.client.entity.AbstractClientPlayer; 6 | import net.minecraft.client.network.NetworkPlayerInfo; 7 | import net.minecraft.util.ResourceLocation; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | 14 | import javax.annotation.Nullable; 15 | 16 | @Mixin(AbstractClientPlayer.class) 17 | public abstract class MixinAbstractClientPlayer { 18 | 19 | @Shadow 20 | @Nullable 21 | protected abstract NetworkPlayerInfo getPlayerInfo(); 22 | 23 | @Inject(method = "getLocationCape", at = @At("HEAD"), cancellable = true) 24 | public void preGetLocationCape(CallbackInfoReturnable callbackInfoReturnable) { 25 | NetworkPlayerInfo info = this.getPlayerInfo(); 26 | if (info != null) { 27 | LocateCapeEvent event = new LocateCapeEvent(info.getGameProfile().getId()); 28 | Raion.INSTANCE.getEventManager().dispatchEvent(event); 29 | if (event.isCanceled()) callbackInfoReturnable.setReturnValue(event.getResourceLocation()); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/me/cookiedragon234/falcon/authentication/HttpUtil.java: -------------------------------------------------------------------------------- 1 | package me.cookiedragon234.falcon.authentication; 2 | 3 | import com.google.gson.JsonObject; 4 | import org.apache.http.HttpResponse; 5 | import org.apache.http.ParseException; 6 | import org.apache.http.client.HttpClient; 7 | import org.apache.http.client.methods.HttpPost; 8 | import org.apache.http.entity.StringEntity; 9 | import org.apache.http.impl.client.HttpClientBuilder; 10 | import org.apache.http.util.EntityUtils; 11 | 12 | import javax.annotation.Nullable; 13 | import java.io.IOException; 14 | import java.net.URI; 15 | 16 | public class HttpUtil { 17 | @Nullable 18 | public static String makePostRequest(URI url, JsonObject payload) throws IOException, ParseException { 19 | HttpClient httpClient = HttpClientBuilder.create().build(); 20 | 21 | try { 22 | HttpPost request = new HttpPost(url); 23 | request.addHeader("content-type", "application/x-www-form-urlencoded"); 24 | 25 | StringEntity params = new StringEntity("content=" + payload.toString()); 26 | request.setEntity(params); 27 | 28 | HttpResponse response = httpClient.execute(request); 29 | 30 | String output = EntityUtils.toString(response.getEntity()); 31 | 32 | EntityUtils.consume(response.getEntity()); 33 | httpClient.getConnectionManager().shutdown(); 34 | 35 | return output; 36 | } 37 | catch (Exception e) { 38 | httpClient.getConnectionManager().shutdown(); 39 | throw e; 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/gui/MixinGuiIngame.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.gui; 2 | 3 | import me.robeart.raion.client.module.player.FreecamModule; 4 | import net.minecraft.client.Minecraft; 5 | import net.minecraft.client.entity.EntityPlayerSP; 6 | import net.minecraft.client.gui.GuiIngame; 7 | import net.minecraft.entity.Entity; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Redirect; 11 | 12 | /** 13 | * @author cookiedragon234 06/Jun/2020 14 | */ 15 | @Mixin(GuiIngame.class) 16 | public class MixinGuiIngame { 17 | @Redirect(method = "renderGameOverlay", at = @At(value = "FIELD", target = "Lnet/minecraft/client/Minecraft;player:Lnet/minecraft/client/entity/EntityPlayerSP;")) 18 | private EntityPlayerSP redirectOverlayPlayer(Minecraft mc) { 19 | Entity active = FreecamModule.INSTANCE.getActiveEntity(); 20 | if (active instanceof EntityPlayerSP) { 21 | return (EntityPlayerSP) active; 22 | } 23 | return mc.player; 24 | } 25 | 26 | @Redirect(method = "renderPotionEffects", at = @At(value = "FIELD", target = "Lnet/minecraft/client/Minecraft;player:Lnet/minecraft/client/entity/EntityPlayerSP;")) 27 | private EntityPlayerSP redirectPotionPlayer(Minecraft mc) { 28 | Entity active = FreecamModule.INSTANCE.getActiveEntity(); 29 | if (active instanceof EntityPlayerSP) { 30 | return (EntityPlayerSP) active; 31 | } 32 | return mc.player; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/entity/living/MixinEntityPig.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.entity.living; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.events.events.entity.CanBeSteeredEvent; 5 | import me.robeart.raion.client.events.events.entity.PigTravelEvent; 6 | import net.minecraft.entity.passive.EntityPig; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 12 | 13 | @Mixin(value = EntityPig.class) 14 | public class MixinEntityPig { 15 | 16 | @Inject(method = "canBeSteered", at = @At("HEAD"), cancellable = true) 17 | private void canBeSteered(CallbackInfoReturnable ci) { 18 | CanBeSteeredEvent event = new CanBeSteeredEvent(); 19 | Raion.INSTANCE.getEventManager().dispatchEvent(event); 20 | if (event.isCanceled()) ci.setReturnValue(event.isCanceled()); 21 | } 22 | 23 | @Inject(method = "travel", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/passive/EntityPig;setAIMoveSpeed(F)V"), cancellable = true) 24 | public void travel(float strafe, float vertical, float forward, CallbackInfo ci) { 25 | PigTravelEvent event = new PigTravelEvent(); 26 | Raion.INSTANCE.getEventManager().dispatchEvent(event); 27 | if (event.isCanceled()) ci.cancel(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/Serializable.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util 2 | 3 | import com.google.gson.GsonBuilder 4 | import com.google.gson.JsonObject 5 | import com.google.gson.JsonParser 6 | import java.io.File 7 | 8 | 9 | /** 10 | * @author cookiedragon234 02/May/2020 11 | */ 12 | interface Saveable: Configurable, Serializable { 13 | val configFile: File 14 | val name: String 15 | get() = this::class.java.name 16 | 17 | override fun load() { 18 | if (!configFile.exists()) { 19 | configFile.createNewFile() 20 | return 21 | } 22 | try { 23 | configFile.reader().use { 24 | val obj = JsonParser().parse(it)?.asJsonObject ?: error("Corrupt configuration file for $name") 25 | read(obj) 26 | println("Restored $name") 27 | } 28 | } catch (t: Throwable) { 29 | throw IllegalStateException("Error while loading configuration for $name", t) 30 | } 31 | } 32 | 33 | override fun save() { 34 | try { 35 | configFile.writer().use { 36 | val obj = JsonObject() 37 | write(obj) 38 | val gson = GsonBuilder() 39 | .setPrettyPrinting() 40 | .create() 41 | gson.toJson(obj, it) 42 | println("Saved $name") 43 | } 44 | } catch (t: Throwable) { 45 | throw IllegalStateException("Error while reading configuration for $name", t) 46 | } 47 | } 48 | } 49 | 50 | interface Serializable { 51 | fun write(jsonObject: JsonObject) 52 | fun read(jsonObject: JsonObject) 53 | } 54 | 55 | interface Configurable { 56 | fun load() 57 | fun save() 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/me/cookiedragon234/falcon/authentication/hwid/HwidGetter.java: -------------------------------------------------------------------------------- 1 | package me.cookiedragon234.falcon.authentication.hwid; 2 | 3 | import javax.annotation.Nonnull; 4 | import javax.annotation.Nullable; 5 | 6 | public class HwidGetter { 7 | private final static String hostname; 8 | private final static String ethernetAddr; 9 | private final static String diskUUID; 10 | private final static String diskSN; 11 | private static String virtualOS; 12 | 13 | static { 14 | hostname = safeNull(HwidGetterImpl.getHostName()); 15 | ethernetAddr = safeNull(HwidGetterImpl.getEthernetAddress()); 16 | diskUUID = safeNull(HwidGetterImpl.getDiskUUID()); 17 | diskSN = safeNull(HwidGetterImpl.getDiskSerialNumber()); 18 | 19 | try { 20 | if (HwidGetterImpl.isRunningInVM()) { 21 | virtualOS = HwidGetterImpl.getVM(); 22 | } 23 | else 24 | virtualOS = null; 25 | } 26 | catch (Exception e) { 27 | virtualOS = null; 28 | e.printStackTrace(); 29 | } 30 | } 31 | 32 | @Nonnull 33 | private static String safeNull(@Nullable String s) { 34 | if (s == null) 35 | return "null"; 36 | return s; 37 | } 38 | 39 | public static String getHostname() { 40 | return hostname; 41 | } 42 | 43 | public static String getEthernetAddr() { 44 | return ethernetAddr; 45 | } 46 | 47 | public static String getDiskUUID() { 48 | return diskUUID; 49 | } 50 | 51 | public static String getDiskSN() { 52 | return diskSN; 53 | } 54 | 55 | public static String getVirtualOS() { 56 | return virtualOS; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/combat/BlinkModule.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.combat 2 | 3 | import me.robeart.raion.client.events.EventStageable.EventStage.PRE 4 | import me.robeart.raion.client.events.events.network.PacketSendEvent 5 | import me.robeart.raion.client.module.Module 6 | import net.minecraft.network.Packet 7 | import net.minecraft.network.play.client.* 8 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener 9 | import java.util.concurrent.ConcurrentLinkedQueue 10 | 11 | /** 12 | * @author cookiedragon234 09/Jun/2020 13 | */ 14 | object BlinkModule: Module( 15 | "Blink", 16 | "Pauses sending packets, so it sends all packets at once when turned off", 17 | Category.COMBAT 18 | ) { 19 | private val packets = ConcurrentLinkedQueue>() 20 | 21 | @Listener 22 | fun onSendPacket(event: PacketSendEvent) { 23 | if (event.stage != PRE) return 24 | 25 | if (mc.world == null || mc.player == null || mc.isSingleplayer) return 26 | 27 | val packet = event.packet 28 | if (packet is CPacketChatMessage 29 | || packet is CPacketConfirmTeleport 30 | || packet is CPacketKeepAlive 31 | || packet is CPacketTabComplete 32 | || packet is CPacketClientStatus 33 | ) { 34 | return 35 | } 36 | packets.add(packet) 37 | event.isCanceled = true 38 | } 39 | 40 | override fun onEnable() { 41 | packets.clear() 42 | } 43 | 44 | override fun onDisable() { 45 | packets.forEach { 46 | mc.connection?.sendPacket(it) 47 | } 48 | packets.clear() 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/clickgui/BindButton.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.clickgui; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.module.ClickGuiModule; 5 | import me.robeart.raion.client.module.Module; 6 | import me.robeart.raion.client.util.Interpolation; 7 | import net.minecraft.client.Minecraft; 8 | 9 | import static me.robeart.raion.client.util.Utils.getRgb; 10 | 11 | public class BindButton { 12 | private static final Minecraft mc = Minecraft.getMinecraft(); 13 | public Button button; 14 | public float x; 15 | public float y; 16 | public Module module; 17 | private int colour; 18 | 19 | public BindButton(Button button, float x, float y, Module module) { 20 | this.button = button; 21 | this.x = x; 22 | this.y = y; 23 | this.module = module; 24 | } 25 | 26 | public int getColour(boolean hovered) { 27 | int desired; 28 | if (hovered) { 29 | desired = getRgb(77, 77, 77, 100); 30 | } 31 | else { 32 | desired = getRgb(0, 0, 0, 80); 33 | } 34 | colour = Interpolation.cinterpTo(colour, desired, mc.getRenderPartialTicks(), ClickGuiModule.INSTANCE.getColourSpeed()); 35 | return colour; 36 | } 37 | 38 | public void draw(float mouseX, float mouseY) { 39 | Raion.INSTANCE.getGui().getTheme().bindButtonDraw(this, mouseX, mouseY, this.button); 40 | } 41 | 42 | public void mouseClicked(float mouseX, float mouseY, int state) { 43 | Raion.INSTANCE.getGui().getTheme().bindButtonMouseClicked(this, mouseX, mouseY, state, this.button); 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/player/BetterPortalsModule.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.player 2 | 3 | import me.robeart.raion.client.events.events.player.OnUpdateEvent 4 | import me.robeart.raion.client.imixin.IEntity 5 | import me.robeart.raion.client.module.Module 6 | import me.robeart.raion.client.value.BooleanValue 7 | import me.robeart.raion.client.value.kotlin.ValueDelegate 8 | import net.minecraftforge.client.GuiIngameForge 9 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener 10 | 11 | /** 12 | * @author cookiedragon234 28/Apr/2020 13 | */ 14 | object BetterPortalsModule: Module("BetterPortals", "Remove unwanted portal functionality", Category.PLAYER) { 15 | val allowGuis by ValueDelegate(BooleanValue("Allow Gui", true)) 16 | val noRenderEffect by ValueDelegate(BooleanValue("No Render Effect", true)) 17 | val noHitbox by ValueDelegate(BooleanValue("No Hitbox", true)) 18 | val noParticles by ValueDelegate(BooleanValue("No Particles", true)) 19 | val noSound by ValueDelegate(BooleanValue("No Sound", true)) 20 | 21 | private var renderPortal: Boolean? = null 22 | 23 | override fun onEnable() { 24 | renderPortal = GuiIngameForge.renderPortal 25 | } 26 | 27 | @Listener 28 | private fun onUpdate(event: OnUpdateEvent) { 29 | if (allowGuis) { 30 | (mc.player as IEntity).setInPortal(false) 31 | } 32 | if (noRenderEffect) { 33 | GuiIngameForge.renderPortal = false 34 | } 35 | } 36 | 37 | override fun onDisable() { 38 | renderPortal?.let { GuiIngameForge.renderPortal = it } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/value/StringValue.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.value; 2 | 3 | import com.google.gson.JsonElement; 4 | import com.google.gson.JsonPrimitive; 5 | import me.robeart.raion.client.gui.cui.values.ValueRenderer; 6 | 7 | /** 8 | * @author Robeart 9 | */ 10 | public class StringValue extends Value { 11 | 12 | private String value; 13 | 14 | public StringValue(String name, String value) { 15 | super(name); 16 | this.value = value; 17 | } 18 | 19 | public StringValue(String name, String value, Value mainSetting) { 20 | super(name, mainSetting); 21 | this.value = value; 22 | } 23 | 24 | public StringValue(String name, String value, Value mainSetting, String listValue) { 25 | super(name, mainSetting, listValue); 26 | this.value = value; 27 | } 28 | 29 | @Override 30 | public ValueRenderer createRenderer() { 31 | return null;//return new NumberValueRenderer(this, new MinecraftFontRenderer(Raion.INSTANCE.getFont().deriveFont(40f), true)); 32 | } 33 | 34 | @Override 35 | public String getValue() { 36 | return value; 37 | } 38 | 39 | @Override 40 | public void setValue(String value) { 41 | this.value = value; 42 | callback(value); 43 | } 44 | 45 | @Override 46 | public void fromJson(JsonElement json) { 47 | if (!json.isJsonPrimitive()) return; 48 | JsonPrimitive primitive = json.getAsJsonPrimitive(); 49 | if (!primitive.isString()) return; 50 | setValue(primitive.getAsString()); 51 | } 52 | 53 | @Override 54 | public JsonElement toJson() { 55 | return new JsonPrimitive(value); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/movement/EntityControlModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.movement; 2 | 3 | import me.robeart.raion.client.events.events.entity.AbstractHorseSaddledEvent; 4 | import me.robeart.raion.client.events.events.entity.CanBeSteeredEvent; 5 | import me.robeart.raion.client.events.events.entity.PigTravelEvent; 6 | import me.robeart.raion.client.events.events.player.OnUpdateEvent; 7 | import me.robeart.raion.client.imixin.IEntityPlayerSP; 8 | import me.robeart.raion.client.module.Module; 9 | import me.robeart.raion.client.value.BooleanValue; 10 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 11 | 12 | public class EntityControlModule extends Module { 13 | 14 | public BooleanValue ai = new BooleanValue("Pig AI", true); 15 | public BooleanValue jump = new BooleanValue("Jump Strength", true); 16 | 17 | public EntityControlModule() { 18 | super("EntityControl", "Allows you to control a rideable entity", Module.Category.MOVEMENT); 19 | } 20 | 21 | @Listener 22 | private void onUpdate(OnUpdateEvent event) { 23 | if (jump.getValue()) { 24 | IEntityPlayerSP player = (IEntityPlayerSP) mc.player; 25 | player.setHorseJumpPower(1.0f); 26 | } 27 | } 28 | 29 | @Listener 30 | private void canBeSteered(CanBeSteeredEvent event) { 31 | event.setCanceled(true); 32 | } 33 | 34 | @Listener 35 | private void travel(PigTravelEvent event) { 36 | if (ai.getValue()) event.setCanceled(true); 37 | } 38 | 39 | @Listener 40 | private void isSaddled(AbstractHorseSaddledEvent event) { 41 | event.setCanceled(true); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/movement/NoSlowDownModule.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.movement 2 | 3 | import me.robeart.raion.client.events.events.player.MoveEvent 4 | import me.robeart.raion.client.imixin.IEntity 5 | import me.robeart.raion.client.module.Module 6 | import me.robeart.raion.client.value.BooleanValue 7 | import me.robeart.raion.client.value.kotlin.ValueDelegate 8 | import net.minecraftforge.client.event.InputUpdateEvent 9 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener 10 | 11 | /** 12 | * @author cookiedragon234 23/Jun/2020 13 | */ 14 | object NoSlowDownModule: Module( 15 | "NoSlowDown", 16 | "Stops things like eating from slowing you down", 17 | Category.MOVEMENT 18 | ) { 19 | val items by ValueDelegate(BooleanValue("Items", true)) 20 | val webs by ValueDelegate(BooleanValue("Webs", true)) 21 | val liquids by ValueDelegate( BooleanValue("Liquids", false)) 22 | val liquidsUp by ValueDelegate( BooleanValue("Liquids Up", false)) 23 | val sidewaysMovement by ValueDelegate(BooleanValue("Sideways", true)) 24 | 25 | @Listener 26 | fun onMove(event: MoveEvent?) { 27 | if (webs) { 28 | (mc.player as IEntity).setIsInWeb(false) 29 | } 30 | } 31 | 32 | @Listener 33 | fun onInput(event: InputUpdateEvent?) { // The event kami uses 34 | if (items) { 35 | // If the player is using their hand (Dont speed up while riding as movement isnt affected anyway) 36 | if (mc.player.isHandActive && !mc.player.isRiding) { 37 | mc.player.movementInput.moveStrafe /= 0.2f 38 | mc.player.movementInput.moveForward /= 0.2f 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/gui/cui/elements/ServerLagElement.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.gui.cui.elements 2 | 3 | import com.mojang.realmsclient.gui.ChatFormatting 4 | import me.robeart.raion.client.events.events.network.PacketReceiveEvent 5 | import me.robeart.raion.client.gui.cui.CuiManagerGui 6 | import me.robeart.raion.client.gui.cui.element.CuiElement 7 | import me.robeart.raion.client.util.Utils 8 | import me.robeart.raion.client.value.IntValue 9 | import me.robeart.raion.client.value.kotlin.ValueDelegate 10 | import net.minecraft.util.math.Vec2f 11 | import java.text.DecimalFormat 12 | 13 | /** 14 | * @author Robeart 22/07/2020 15 | */ 16 | class ServerLagElement: CuiElement() { 17 | 18 | val responseDelay by ValueDelegate(IntValue("Lag Delay", 1000, 0, 10000, 250)) 19 | 20 | private var now = System.currentTimeMillis() 21 | 22 | override fun render(mousePos: Vec2f) { 23 | super.render(mousePos) 24 | if(System.currentTimeMillis() - now >= responseDelay) { 25 | val lag = DecimalFormat("0.0").format((System.currentTimeMillis() - now) / 1000.0) 26 | val text = "${ChatFormatting.GRAY}Server has stopped responding for ${lag}s" 27 | drawText(text, Utils.getRgb(255, 255, 255, 255)) 28 | } else if(mc.currentScreen is CuiManagerGui) { 29 | val text = "${ChatFormatting.GRAY}Server has stopped responding for XXXs" 30 | drawText(text, Utils.getRgb(255, 255, 255, 255)) 31 | } 32 | } 33 | 34 | override fun onPacketReceive(event: PacketReceiveEvent) { 35 | now = System.currentTimeMillis() 36 | } 37 | } -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/combat/BowSpamModule.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.combat; 2 | 3 | import me.robeart.raion.client.events.events.player.OnUpdateEvent; 4 | import me.robeart.raion.client.module.Module; 5 | import me.robeart.raion.client.util.Timer; 6 | import me.robeart.raion.client.value.DoubleValue; 7 | import net.minecraft.item.ItemBow; 8 | import net.minecraft.network.play.client.CPacketPlayerDigging; 9 | import net.minecraft.util.math.BlockPos; 10 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 11 | 12 | public class BowSpamModule extends Module { 13 | 14 | public DoubleValue delay = new DoubleValue("Delay", 0, 0, 15, 0.1); 15 | private Timer delaytimer = new Timer(); 16 | 17 | public BowSpamModule() { 18 | super("BowSpam", "Releases the bow automatically", Category.COMBAT); 19 | } 20 | 21 | @Listener 22 | public void onUpdate(OnUpdateEvent event) { 23 | if (!delaytimer.passed(delay.getValue() * 100)) return; 24 | if (((mc.player.inventory.getCurrentItem().getItem() instanceof ItemBow)) && 25 | (mc.player.isHandActive()) && (mc.player.getItemInUseMaxCount() >= 3)) { 26 | mc.player.connection.sendPacket(new CPacketPlayerDigging(net.minecraft.network.play.client.CPacketPlayerDigging.Action.RELEASE_USE_ITEM, BlockPos.ORIGIN, mc.player 27 | .getHorizontalFacing())); 28 | mc.player.connection.sendPacket(new net.minecraft.network.play.client.CPacketPlayerTryUseItem(mc.player.getActiveHand())); 29 | mc.player.stopActiveHand(); 30 | //System.out.println(delaytimer.getTime()); 31 | delaytimer.reset(); 32 | } 33 | 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/EventManager.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo; 2 | 3 | import team.stiff.pomelo.handler.EventHandler; 4 | 5 | /** 6 | * Pomelo is a simplistic event-bus that supports event filtering. 7 | *

8 | * todo; thread-safety 9 | * todo; junit testing 10 | * 11 | * @author Daniel 12 | * @since May 31, 2017 13 | */ 14 | public interface EventManager { 15 | 16 | /** 17 | * Notify all registered {@link EventHandler}s that are listening 18 | * for the passed event that the event has been dispatched. 19 | * 20 | * @param event event instance 21 | * @param event type 22 | * @return passed event instance 23 | */ 24 | E dispatchEvent(E event); 25 | 26 | /** 27 | * Checks if the given listener object is registered. 28 | * 29 | * @param listener listener instance 30 | * @return true if registered; false otherwise 31 | */ 32 | boolean isRegisteredListener(Object listener); 33 | 34 | /** 35 | * Register an object as an event listener that listens for the provided 36 | * eventClass type to be dispatched. 37 | * 38 | * @param listener event listener instance 39 | * @return true if successfully added; false otherwise 40 | */ 41 | boolean addEventListener(Object listener); 42 | 43 | /** 44 | * Remove an event listener from the bus so it does not listen 45 | * for event dispatches anymore. 46 | * 47 | * @param listener event listener instance 48 | * @return true if successfully removed; false otherwise 49 | */ 50 | boolean removeEventListener(Object listener); 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/DiscordRPCEditCommand.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.events.events.player.OnUpdateEvent; 5 | import me.robeart.raion.client.gui.discordrpc.DiscordPrecenceChangerGui; 6 | import me.robeart.raion.client.module.misc.DiscordRPCModule; 7 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener; 8 | 9 | /** 10 | * @author cookiedragon234 11/Nov/2019 11 | */ 12 | public class DiscordRPCEditCommand extends Command { 13 | public DiscordRPCEditCommand() { 14 | super("DiscordRPCEdit", new String[]{"rpc", "discord"}, "Edit Discord RPC", "rpc"); 15 | } 16 | 17 | @Override 18 | public void call(String[] args) { 19 | /** 20 | * when you send a chat message the the {@link net.minecraft.client.gui.GuiChat} automatically sets the 21 | * guiscreen to null in order to close the chat screen, and with commands opening a gui will occur 22 | * before the guichat closes the gui, if that makes sense. 23 | * Therefore we need to schedule a task to occur next game tick 24 | * 25 | * @see {@link net.minecraft.client.gui.GuiChat#keyTyped(char, int)} (line 132) 26 | */ 27 | Raion.INSTANCE.getEventManager().addEventListener(this); 28 | } 29 | 30 | @Listener 31 | private void onUpdate(OnUpdateEvent event) { 32 | mc.addScheduledTask(() -> 33 | { 34 | DiscordRPCModule.RpcSettings rpcSettings = DiscordRPCModule.getRpcSettings(); 35 | mc.displayGuiScreen(new DiscordPrecenceChangerGui(rpcSettings)); 36 | } 37 | ); 38 | Raion.INSTANCE.getEventManager().removeEventListener(this); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/command/SearchCommand.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.command 2 | 3 | import me.robeart.raion.client.module.render.search.SearchBlocksManager 4 | import me.robeart.raion.client.module.render.search.SearchModule 5 | import me.robeart.raion.client.util.ChatUtils 6 | 7 | /** 8 | * @author cookiedragon234 17/May/2020 9 | */ 10 | object SearchCommand: Command("Search", "Add items to search list", "search [add/remove/list]") { 11 | override fun call(args: Array?) { 12 | if (args?.isNotEmpty() != true) { 13 | ChatUtils.error(super.getUsage()) 14 | return 15 | } 16 | 17 | when (args[0]) { 18 | "add" -> { 19 | if (args.size < 2) { 20 | ChatUtils.error(".search add shulker") 21 | } 22 | if (SearchBlocksManager.addHighlight(args[1], true)) { 23 | ChatUtils.message("Added ${args[1]}") 24 | } else { 25 | ChatUtils.error("Couldnt find ${args[1]}") 26 | } 27 | } 28 | "remove" -> { 29 | if (args.size < 2) { 30 | ChatUtils.error(".search remove shulker") 31 | } 32 | if (SearchBlocksManager.addHighlight(args[1], false)) { 33 | ChatUtils.message("Removed ${args[1]}") 34 | } else { 35 | ChatUtils.error("Couldnt find ${args[1]}") 36 | } 37 | } 38 | "list" -> { 39 | val highlighted = SearchBlocksManager.getToHighlighted() 40 | ChatUtils.message("Highlighting ${highlighted.size} blocks:\n${highlighted.joinToString("\n")}") 41 | } 42 | "clear" -> { 43 | ChatUtils.message("Cleared ${SearchBlocksManager.clearHighlighted()} blocks") 44 | } 45 | else -> ChatUtils.error(super.getUsage()) 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/util/font/BasicFontRenderer.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.util.font; 2 | 3 | import net.minecraft.client.renderer.GlStateManager; 4 | 5 | public class BasicFontRenderer implements FontRenderer { 6 | 7 | protected final FontData fontData = new FontData(); 8 | protected int kerning = 0; 9 | 10 | public BasicFontRenderer() { 11 | } 12 | 13 | @Override 14 | public float drawString(FontData fontData, String text, float x, float y, int color) { 15 | if (!fontData.hasFont()) 16 | return 0; 17 | GlStateManager.enableBlend(); 18 | fontData.bind(); 19 | GLManager.glColor(color); 20 | int size = text.length(); 21 | for (int i = 0; i < size; i++) { 22 | char character = text.charAt(i); 23 | if (fontData.hasBounds(character)) { 24 | FontData.CharacterData area = fontData.getCharacterBounds(character); 25 | FontUtils.drawTextureRect(x, y, area.width, area.height, 26 | (float) area.x / fontData.getTextureWidth(), 27 | (float) area.y / fontData.getTextureHeight(), 28 | (float) (area.x + area.width) / fontData.getTextureWidth(), 29 | (float) (area.y + area.height) / fontData.getTextureHeight() 30 | ); 31 | x += area.width + kerning; 32 | } 33 | } 34 | return x; 35 | } 36 | 37 | @Override 38 | public float drawString(String text, float x, float y, int color) { 39 | return drawString(fontData, text, x, y, color); 40 | } 41 | 42 | public int getKerning() { 43 | return kerning; 44 | } 45 | 46 | public void setKerning(int kerning) { 47 | this.kerning = kerning; 48 | } 49 | 50 | @Override 51 | public FontData getFontData() { 52 | return fontData; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/module/render/VisionModule.kt: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.module.render 2 | 3 | import me.robeart.raion.client.events.events.render.BlockStateAtEntityViewpointEvent 4 | import me.robeart.raion.client.events.events.render.SetupFogEvent 5 | import me.robeart.raion.client.module.Module 6 | import me.robeart.raion.client.value.BooleanValue 7 | import me.robeart.raion.client.value.kotlin.ValueDelegate 8 | import net.minecraft.block.state.IBlockState 9 | import net.minecraft.client.renderer.block.model.IBakedModel 10 | import net.minecraft.init.Blocks 11 | import net.minecraft.item.ItemStack 12 | import team.stiff.pomelo.impl.annotated.handler.annotation.Listener 13 | 14 | 15 | /** 16 | * @author cookiedragon234 27/Mar/2020 17 | */ 18 | object VisionModule: Module("Vision", "Makes things easy to see", Category.RENDER) { 19 | val brightness by ValueDelegate(BooleanValue("Brightness", true)) 20 | val barriers by ValueDelegate(BooleanValue("Barriers", true)) 21 | val noFog by ValueDelegate(BooleanValue("No Fog", true)) 22 | 23 | val barrierModel: IBakedModel by lazy { 24 | mc.renderItem.itemModelMesher.getItemModel(ItemStack(Blocks.BARRIER)) 25 | } 26 | 27 | override fun onEnable() { 28 | mc.renderGlobal?.loadRenderers() 29 | } 30 | 31 | override fun onDisable() { 32 | mc.renderGlobal?.loadRenderers() 33 | } 34 | 35 | 36 | @Listener 37 | private fun onSetupFog(event: SetupFogEvent) { 38 | if (noFog) { 39 | event.isCanceled = true 40 | } 41 | } 42 | 43 | @Listener 44 | private fun onBlockStateAtEntityViewpoint(event: BlockStateAtEntityViewpointEvent) { 45 | if (noFog) { 46 | event.setiBlockState(Blocks.AIR as IBlockState) 47 | } 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/mixin/common/network/MixinNetHandlerPlayClient.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.mixin.common.network; 2 | 3 | import me.robeart.raion.client.Raion; 4 | import me.robeart.raion.client.events.events.world.ChunkEvent; 5 | import net.minecraft.client.network.NetHandlerPlayClient; 6 | import net.minecraft.network.PacketBuffer; 7 | import net.minecraft.network.play.server.SPacketChunkData; 8 | import net.minecraft.world.chunk.Chunk; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.Redirect; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 14 | import org.spongepowered.asm.mixin.injection.callback.LocalCapture; 15 | 16 | @Mixin(NetHandlerPlayClient.class) 17 | public class MixinNetHandlerPlayClient { 18 | SPacketChunkData data = null; 19 | 20 | @Inject(method = "handleChunkData", 21 | at = @At(value = "INVOKE", target = "Lnet/minecraft/world/chunk/Chunk;read(Lnet/minecraft/network/PacketBuffer;IZ)V"), 22 | locals = LocalCapture.CAPTURE_FAILHARD) 23 | private void read(SPacketChunkData data, CallbackInfo info, Chunk chunk) { 24 | this.data = data; 25 | } 26 | 27 | @Redirect(method = "handleChunkData", at = @At(value = "INVOKE", target = "Lnet/minecraft/world/chunk/Chunk;read(Lnet/minecraft/network/PacketBuffer;IZ)V")) 28 | private void readRedir(Chunk chunk, PacketBuffer buf, int availableSections, boolean groundUpContinuous) { 29 | chunk.read(buf, availableSections, groundUpContinuous); 30 | ChunkEvent event = new ChunkEvent(chunk, data); 31 | Raion.INSTANCE.getEventManager().dispatchEvent(event); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/me/robeart/raion/client/events/events/render/RenderEntityEvent.java: -------------------------------------------------------------------------------- 1 | package me.robeart.raion.client.events.events.render; 2 | 3 | import me.robeart.raion.client.events.EventCancellable; 4 | import me.robeart.raion.client.events.EventStageable; 5 | import net.minecraft.entity.Entity; 6 | 7 | public class RenderEntityEvent extends EventCancellable { 8 | 9 | private Entity entity; 10 | private double x; 11 | private double y; 12 | private double z; 13 | private float yaw; 14 | private float partialTicks; 15 | 16 | public RenderEntityEvent(EventStageable.EventStage stage, Entity entity, double x, double y, double z, float yaw, float partialTicks) { 17 | super(stage); 18 | this.entity = entity; 19 | this.x = x; 20 | this.y = y; 21 | this.z = z; 22 | this.yaw = yaw; 23 | this.partialTicks = partialTicks; 24 | } 25 | 26 | public Entity getEntity() { 27 | return this.entity; 28 | } 29 | 30 | public void setEntity(Entity entity) { 31 | this.entity = entity; 32 | } 33 | 34 | public double getX() { 35 | return this.x; 36 | } 37 | 38 | public void setX(double x) { 39 | this.x = x; 40 | } 41 | 42 | public double getY() { 43 | return this.y; 44 | } 45 | 46 | public void setY(double y) { 47 | this.y = y; 48 | } 49 | 50 | public double getZ() { 51 | return this.z; 52 | } 53 | 54 | public void setZ(double z) { 55 | this.z = z; 56 | } 57 | 58 | public float getYaw() { 59 | return this.yaw; 60 | } 61 | 62 | public void setYaw(float yaw) { 63 | this.yaw = yaw; 64 | } 65 | 66 | public float getPartialTicks() { 67 | return this.partialTicks; 68 | } 69 | 70 | public void setPartialTicks(float partialTicks) { 71 | this.partialTicks = partialTicks; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/team/stiff/pomelo/impl/annotated/handler/scan/MethodHandlerScanner.java: -------------------------------------------------------------------------------- 1 | package team.stiff.pomelo.impl.annotated.handler.scan; 2 | 3 | import team.stiff.pomelo.filter.EventFilterScanner; 4 | import team.stiff.pomelo.handler.EventHandler; 5 | import team.stiff.pomelo.handler.scan.EventHandlerScanner; 6 | import team.stiff.pomelo.impl.annotated.filter.MethodFilterScanner; 7 | import team.stiff.pomelo.impl.annotated.handler.MethodEventHandler; 8 | 9 | import java.lang.reflect.Method; 10 | import java.util.HashMap; 11 | import java.util.Map; 12 | import java.util.Set; 13 | import java.util.TreeSet; 14 | import java.util.stream.Stream; 15 | 16 | /** 17 | * An implementation of {@link EventHandlerScanner} that locates 18 | * all methods of a class that are event listeners. 19 | * 20 | * @author Daniel 21 | * @since May 31, 2017 22 | */ 23 | public final class MethodHandlerScanner implements EventHandlerScanner { 24 | private final AnnotatedListenerPredicate annotatedListenerPredicate = 25 | new AnnotatedListenerPredicate(); 26 | private final EventFilterScanner filterScanner = new MethodFilterScanner(); 27 | 28 | @Override 29 | public Map, Set> locate(final Object listenerContainer) { 30 | final Map, Set> eventHandlers = new HashMap<>(); 31 | Stream.of(listenerContainer.getClass().getDeclaredMethods()) 32 | .filter(annotatedListenerPredicate).forEach(method -> eventHandlers 33 | .computeIfAbsent(method.getParameterTypes()[0], obj -> new TreeSet<>()) 34 | .add(new MethodEventHandler(listenerContainer, method, 35 | filterScanner.scan(method)))); 36 | return eventHandlers; 37 | } 38 | } 39 | --------------------------------------------------------------------------------