Skip to content

Instantly share code, notes, and snippets.

View superblaubeere27's full-sized avatar

superblaubeere27 superblaubeere27

View GitHub Profile
package net.superblaubeere27.masxinlingvaj.postprocessor.extensions;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
public class NativeLoaderExtension {
private static final Object NATIVE_LOADER_LOCK = new Object();
@superblaubeere27
superblaubeere27 / LWJGLMain.java
Created June 8, 2020 13:11
Render GLSL Shaders in LWJGL
package net.superblaubeere27.glslsandboxrenderer;
import org.lwjgl.*;
import org.lwjgl.glfw.*;
import org.lwjgl.opengl.*;
import org.lwjgl.system.*;
import java.io.IOException;
import java.nio.*;
@superblaubeere27
superblaubeere27 / shader_background.patch
Last active June 9, 2020 12:29
A patch for MCP (1.8 - 1.8.9) which enables GLSLSandbox MainMenu shaders
Index: src/minecraft/net/minecraft/client/gui/GuiMainMenu.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/minecraft/net/minecraft/client/gui/GuiMainMenu.java (date 1591536256953)
+++ src/minecraft/net/minecraft/client/gui/GuiMainMenu.java (date 1591536256953)
@@ -25,10 +25,12 @@
import net.minecraft.world.demo.DemoWorldServer;
import net.minecraft.world.storage.ISaveFormat;
@superblaubeere27
superblaubeere27 / GLSLSandboxShader.java
Last active February 25, 2023 18:04
GLSLSandbox Renderer, compatible with LWJGL 2 - 3 (compatible for minecraft)
/*
* Copyright (c) superblaubeere27 2020
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOF
@superblaubeere27
superblaubeere27 / index.md
Last active August 2, 2022 02:24
Code injection with Java Agents

Code injection with Java Agents

General information

Java Agents are used to replace code when the application is running. When you are debugging with IntelliJ, Eclipse etc. and you saving / rebuilding your code, an agent will be loaded to do it.

Restrictions

The environment has to be a Java Development Kit (not a Java Runtime Enviroment) to inject the code at runtime. If you want to apply the agent with -javaagent:<agent-jar> it will work for both.

Furthermore the agent can only add classes and change method contents at runtime.

@superblaubeere27
superblaubeere27 / Main.java
Created December 28, 2019 14:20
AgentAttacher
package net.superblaubeere27.agentattacher;
import com.sun.tools.attach.*;
import joptsimple.*;
import java.io.File;
import java.io.IOException;
import java.util.Optional;
public class Main {
@superblaubeere27
superblaubeere27 / ClickGUI.java
Last active December 5, 2022 04:54
Code for my ClickGUI Video
/*
* Copyright (c) 2018 superblaubeere27
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH TH
@superblaubeere27
superblaubeere27 / Discord.md
Last active March 22, 2021 14:26
My Discord Server...
@superblaubeere27
superblaubeere27 / 1_index.md
Last active December 8, 2018 16:15
ClientBase Commands

Setup

JVM-Args: -Dfml.coreMods.load=net.superblaubeere27.clientbase.injection.MixinLoader Please replace net.superblaubeere27.clientbase.injection.MixinLoader with the full class name of MixinLoader (if you moved the class)

IntelliJ IDEA

Gradle setup command: gradlew -Dorg.gradle.jvmargs=-Xmx5G setupDecompWorkspace idea genIntelliJRuns build

Eclipse

@superblaubeere27
superblaubeere27 / Clock.java
Created November 2, 2018 15:26
Draw clock (LWJGL 2 + Slick 2D)
package me.superblaubeere27;
import org.lwjgl.LWJGLException;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.PixelFormat;
import org.newdawn.slick.TrueTypeFont;
import java.awt.*;