Skip to content

Instantly share code, notes, and snippets.

View Pokechu22's full-sized avatar

Pokechu22 Pokechu22

View GitHub Profile
@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
/*
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 / 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

@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");
"""
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 / 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">
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 / missing.txt
Created February 7, 2017 23:22
Known/unknown versions
A list of missing versions
@Pokechu22
Pokechu22 / Rail Proposal.md
Created July 21, 2017 19:07
Rail line proposal for RocketPig

Intro

First off, if you haven't seen the old skyblock map... you're missing out on a lot of context. But the short version is: I made a lot of rails. Check out this overviewer-powered render of the map here (download and extract the large zip file, and then open index.html, allowing scripts if prompted - it's an interactive render). The skyblock map is also (still) up for download on mediafire (you will need 7-zip or another extractor to open this RAR file); there's access to the nether if you fly behind the windmill (~100 blocks).

I really enjoyed handling this transportation for the community, and I'd like to do something like this again. But, right now the islands are fairly close, so there's no real reason to make it in the nether. Instead, it should be done in the overworld.

The actual proposal

Basically,

Please use this guide instead, this one was written in a hurry and I forgot I had the older one.

~~Basically, you'll want to start with the MCP 1.12 release (temporarily at http://www.modcoderpack.com/files/mcp940.zip ), and then modify it to work with 1.12.2. This is actually quite simple. First, you need to edit conf/version.cfg and set both versions to 1.12.2. That on its own is not enough, but it's a critical step. Then you need to grab new SRG mappings. Normally you'd get that through the !srg command, but MCPBot doesn't have it for some versions. Instead, you can get it through forge's maven. (normally it's also on the export site but not for 1.12.2). The link is http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.12.2/mcp-1.12.2-srg.zip . To set that up, first delete the conf/patches folder (otherwise patches will be merged, breaking things), and then unzip the contents of that ZIP into conf, overwriting files as pr