Skip to content

Instantly share code, notes, and snippets.

@Pwootage
Pwootage / gist:1396569
Created November 27, 2011 00:10
Color codes
/**
* Represents black
*/
BLACK(0x0),
/**
* Represents dark blue
*/
DARK_BLUE(0x1),
/**
* Represents dark green
@Pwootage
Pwootage / input.bstruct
Created September 4, 2016 18:51
Bstruct example
big endian struct Example1 {
int32 anInt;
float positionedFloat 0x16;
float[3] position 32;
}
little endian struct Test1 {
float[6] bb;
}
@Pwootage
Pwootage / sj.json
Last active June 19, 2016 06:23
Example patch file
{
"type": "ScriptObject",
"filename": "c44e7a07.MREA",
"typ": "Pickup",
"id": "0x40007",
"objectPatch": {
"0x0C": "2d7e6590.CMDL",
"0x0D": {
"animANCS": "a9b8e446.ANCS",
"character": 0,
Caused by: org.lwjgl.LWJGLException: Could not create context (WGL_ARB_create_context)
21at org.lwjgl.opengl.WindowsContextImplementation.nCreate(Native Method)
at org.lwjgl.opengl.WindowsContextImplementation.create(WindowsContextImplementation.java:50)
at org.lwjgl.opengl.ContextGL.<init>(ContextGL.java:132)
at org.lwjgl.opengl.DrawableGL.createSharedContext(DrawableGL.java:77)
at org.lwjgl.opengl.DrawableGL.createSharedContext(DrawableGL.java:41)
at org.lwjgl.opengl.SharedDrawable.<init>(SharedDrawable.java:50)
at me.adanac.latura.render.world.impl.RenderUpdateThreadPool.<init>(RenderUpdateThreadPool.java:29)
... 5 more
@Pwootage
Pwootage / CrashExample.java
Created January 5, 2013 02:03
Crash of SharedDrawable on certain windows platforms
import javax.swing.JFrame;
import org.lwjgl.LWJGLException;
import org.lwjgl.opengl.Display;
import org.lwjgl.opengl.DisplayMode;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.SharedDrawable;
public class CrashExample extends JFrame {
set APPDATA=%CD%
minecraft
public class DList<E extends Comparable<E>> {
private class Node {
public E data;
public Node next;
public Node prev;
public Node(E data) {
this.data = data;
}
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
GL11.glMatrixMode(GL11.GL_PROJECTION);
GL11.glLoadIdentity();
Vector3 pos = game.getPlayer().getPos();
Vector3 look = game.getPlayer().getLookVec();
Vector3 eye = pos.add(look);
gluLookAt(eye.getX(), eye.getY(), eye.getZ(), pos.getX(), pos.getY(), pos.getZ(), 0, 0, 1);
@Pwootage
Pwootage / gist:1396588
Created November 27, 2011 00:23
Color codes
BLACK - 0
DARK_BLUE - 1
DARK_GREEN - 2
DARK_AQUA - 3
DARK_RED - 4
DARK_PURPLE - 5
GOLD - 6
GRAY - 7
DARK_GRAY - 8
BLUE - 9
-----------------------------------------------------
COMMA_PARENTHESIS_WHITESPACE
-----------
Use of whitespace before comma and before/after parentheses
-----------------------------------------------------
-----------------------------------------------------
DOUBLE_PUNCTUATION
-----------
Use of two consecutive dots or commas
-----------------------------------------------------