-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #626 from mircokroon/1_20_2_support
1.20.2 + 1.20.3 support
- Loading branch information
Showing
26 changed files
with
439 additions
and
60 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package game.protocol; | ||
|
||
import config.Config; | ||
import config.Version; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
public class ConfigurationProtocol extends Protocol { | ||
private final Map<Integer, String> clientBound; | ||
private final Map<Integer, String> serverBound; | ||
|
||
public ConfigurationProtocol() { | ||
clientBound = new HashMap<>(); | ||
serverBound = new HashMap<>(); | ||
|
||
if (Config.versionReporter().isAtLeast(Version.V1_20_2)) { | ||
serverBound.put(0x02, "FinishConfiguration"); | ||
|
||
clientBound.put(0x05, "RegistryData"); | ||
} else { | ||
serverBound.put(0x03, "FinishConfiguration"); | ||
} | ||
} | ||
|
||
@Override | ||
protected String clientBound(int packet) { | ||
return clientBound.getOrDefault(packet, "UNKNOWN"); | ||
} | ||
|
||
@Override | ||
protected String serverBound(int packet) { | ||
return serverBound.getOrDefault(packet, "UNKNOWN"); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.