Skip to content

Instantly share code, notes, and snippets.

View Pokechu22's full-sized avatar

Pokechu22 Pokechu22

View GitHub Profile
import com.google.gson.Gson;
import java.io.FileReader;
import java.util.Map;
import org.bukkit.Material;
public class MaterialChecker {
private static Burger burger;
public static void main(String[] args) throws Exception {
try (FileReader reader = new FileReader(args[0])) {
// Burger files contain an array of verisons; we want the first version
@Pokechu22
Pokechu22 / log4j2.xml
Created October 30, 2016 18:23
Launcher debug output configuration
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN" packages="com.mojang">
<Appenders>
<Console name="SysOut" target="SYSTEM_OUT">
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" />
</Console>
<Queue name="DevelopmentConsole">
<PatternLayout pattern="[%d{HH:mm:ss} %level]: %msg%n" />
</Queue>
<Async name="Async">
"""
Makes spectatorCantUse message appear in chat rather than actionbar
"""
from jawa.cf import ClassFile
from jawa.constants import *
from jawa.util.bytecode import Instruction
from zipfile import ZipFile
try:
from cStringIO import StringIO
@Pokechu22
Pokechu22 / Beta 1.6-pre3 to beta 1.6.patch
Created July 27, 2016 23:48
Diff from beta1.6 prerelease 3 to beta 1.6
diff --git a/C:/pokechu22/mcp32-1.6-pre3/src/minecraft/net/minecraft/client/Minecraft.java b/C:/pokechu22/mcp32-1.6/src/minecraft/net/minecraft/client/Minecraft.java
index cc25dbd..80899f6 100644
--- a/C:/pokechu22/mcp32-1.6-pre3/src/minecraft/net/minecraft/client/Minecraft.java
+++ b/C:/pokechu22/mcp32-1.6/src/minecraft/net/minecraft/client/Minecraft.java
@@ -108,7 +108,7 @@ public abstract class Minecraft
{
Display.setDisplayMode(new DisplayMode(displayWidth, displayHeight));
}
- Display.setTitle("Minecraft Minecraft Beta 1.6 Test Build 3");
+ Display.setTitle("Minecraft Minecraft Beta 1.6");
@Pokechu22
Pokechu22 / Setting up MCP without a full MCP release.md
Last active May 14, 2024 17:52
Setting up MCP for newer versions (e.g. 1.12.2)

It's possible to use create an MCP installation for versions of Minecraft where there hasn't been a full MCP release. It takes a little bit of manual setup, but the end result is highly useful.

  1. Download and extract the most recent MCP build from http://www.modcoderpack.com/. (Currently, the latest build is http://www.modcoderpack.com/files/mcp940.zip)

  2. Edit version.cfg in the conf folder, and change ClientVersion and ServerVersion to the version you want (for instance, 1.12.2).

  3. Download the SRG zip for the version you want; these can generally be found at http://mcpbot.bspk.rs/mcp/<version>/mcp-<version>-srg.zip (for example, http://mcpbot.bspk.rs/mcp/1.11.2/mcp-1.11.2-srg.zip) or at http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/<version>/mcp-<version>-srg.zip (for example, http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.12.2/mcp-1.12.2-srg.zip). (For 1.12.1 and 1.12.2, only the minecraftforge link works)

  4. Extract that zip into the MCP conf folder, over

Hang report for C:\Program Files\Java\jre1.8.0_72\bin\javaw.exe
Generated by using WhatIsHang on 6/28/2016 12:52:31 PM
Web site: http://www.nirsoft.net
Remarks:
* The program hangs in a single system call. You can look in the call stack and stack data to find out which API function cause this hang.
Strings found in the stack:
@Pokechu22
Pokechu22 / Protocol19x.cpp.patch
Created April 9, 2016 22:31
Changes between Protocol18x.cpp and Protocol19x.cpp
diff --git a/src/protocol/protocol18x.cpp b/src/protocol/protocol19x.cpp
index ae9571f..8ee10d5 100644
--- a/src/protocol/protocol18x.cpp
+++ b/src/protocol/protocol19x.cpp
@@ -1,16 +1,20 @@
-// Protocol18x.cpp
+// Protocol19x.cpp
/*
@Pokechu22
Pokechu22 / portalpatcher.py
Created March 26, 2016 00:03
Patches a craftbukkit or spigot jar to allow portals to spawn above y=128 in the nether
from jawa.cf import ClassFile
from zipfile import ZipFile
import re
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from jawa.assemble import assemble
import tempfile
import zipfile
@Pokechu22
Pokechu22 / 1.9-pre3_16w04a_diff.json
Created February 25, 2016 21:32
Minecraft 16w04a and 1.9-pre3 differences in packets (generated via burger and hamburglar)
{
"packets": {
"packet": {
"PLAY_CLIENTBOUND_0": [
{
"class": "fj.class",
"direction": "CLIENTBOUND",
"from_client": false,
"from_server": true,
"id": 0,
@Pokechu22
Pokechu22 / minecraft_1.9-pre3_packetinstructions.json
Last active March 25, 2016 18:25
Packet instructions for 1.9-pre3
[
{
"__coment": "The values here, especially for instructions, may be wrong - burger's still a work in progress! Use caution with them... They may be missing chat components, NBT tags, and a few similar things (or may be flat-out wrong)",
"classes": {
"biome.superclass": "aig",
"block.list": "aju",
"block.superclass": "ajt",
"entity.list": "rt",
"item.list": "ads",
"item.superclass": "ado",