Skip to content

Instantly share code, notes, and snippets.

View Earthcomputer's full-sized avatar

Joseph Burton Earthcomputer

View GitHub Profile
package mcp;
import javax.annotation.Nonnull;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.annotation.meta.TypeQualifierDefault;
@Documented
@Earthcomputer
Earthcomputer / reverse_tsrg.py
Created August 13, 2018 00:10
Reverses a TSRG file
classMap = {}
def mapDescriptor(desc):
global classMap
newDesc = "("
index = 1
while index < len(desc):
if desc[index] == "L":
endIndex = index + 1
while desc[endIndex] != ";":
@Earthcomputer
Earthcomputer / specialsource_fix.py
Created August 1, 2018 09:22
specialsource_fix.py
# EARTHCOMPUTER'S HACKFIX FOR SPECIALSOURCE FUCKING UP IN 1.13
from zipfile import ZipFile
import sys
def load_csrg(csrgf):
csrg = {}
for line in csrgf:
parts = line.rstrip().split(" ")
if len(parts) > 2:
package test;
import net.minecraft.command.CommandBase;
import net.minecraft.command.CommandException;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.server.MinecraftServer;
import test.TestRandom.DebugLevel;
public class CommandDebugRandom extends CommandBase {
package test;
import java.util.Arrays;
import java.util.Random;
import java.util.stream.Collectors;
public class TestRandom extends Random {
private static final long serialVersionUID = 1L;