Created
February 3, 2015 05:33
-
-
Save sirsavary/08ee16d55916f1ebc7f4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private MinecraftVersion determineMCVersion() { | |
| int protocolVersion; | |
| boolean legacy = false; | |
| // Determine protocol version based on MC version, see http://wiki.vg/Protocol_version_numbers | |
| if (Loader.MC_VERSION.equals("1.7.2") || Loader.MC_VERSION.equals("1.7.4") || Loader.MC_VERSION.equals("1.7.5")) protocolVersion = 4; | |
| else if (Loader.MC_VERSION.equals("1.7.6") || Loader.MC_VERSION.equals("1.7.7") || Loader.MC_VERSION.equals("1.7.8") || Loader.MC_VERSION.equals("1.7.9") || Loader.MC_VERSION.equals("1.7.9")) protocolVersion = 5; | |
| else if (Loader.MC_VERSION.equals("1.8")) protocolVersion = 47; | |
| if (legacy) return new SpongeLegacyMinecraftVersion(Loader.MC_VERSION, protocolVersion); | |
| else return new SpongeMinecraftVersion(Loader.MC_VERSION, protocolVersion); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment