Skip to content

Instantly share code, notes, and snippets.

@HenryLoenwind
Created September 5, 2018 14:21
Show Gist options
  • Save HenryLoenwind/2c89e845bfabac532b3b4bb86300d5ae to your computer and use it in GitHub Desktop.
Save HenryLoenwind/2c89e845bfabac532b3b4bb86300d5ae to your computer and use it in GitHub Desktop.
Minecraft Stack Trace Deobfuscator
#!/usr/bin/perl
use strict;
use warnings;
our $mapping = {};
while (my $line = <DATA>) {
my ($searge, $name, undef) = split /,/, $line;
if (defined $searge and defined $name) {
$mapping->{$searge} = $name;
}
}
while (my $line = <>) {
$line =~ s/((?:func|field)_\d+_[a-z]+)/$mapping->{$1} || $1/ge;
print $line;
}
__DATA__
field_100013_f,isPotionDurationMax,0,"True if potion effect duration is at maximum, false otherwise."
download mcp940.zip from http://www.modcoderpack.com/ and put the contents of the conf/fields.csv and
conf/methods.csv here
func_99999_d,run,0,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment