Skip to content

Instantly share code, notes, and snippets.

@ddevault
Created September 5, 2012 20:19
Show Gist options
  • Save ddevault/459a1691c3dd751db160 to your computer and use it in GitHub Desktop.
Save ddevault/459a1691c3dd751db160 to your computer and use it in GitHub Desktop.
/// <summary>
/// Thanks to some idiot at Mojang
/// </summary>
private static int DataSlotToNetworkSlot(int index)
{
if (index <= 8)
index += 36;
else if (index == 100)
index = 8;
else if (index == 101)
index = 7;
else if (index == 102)
index = 6;
else if (index == 103)
index = 5;
else if (index >= 80 && index <= 83)
index -= 79;
return index;
}
@yejunho10
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment