-
Notifications
You must be signed in to change notification settings - Fork 95
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 #211 from ApocalypsjeNL/3.0
Add BuildPlatforn and UIProfile enums
- Loading branch information
Showing
2 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/BuildPlatform.java
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,51 @@ | ||
package org.cloudburstmc.protocol.bedrock.data; | ||
|
||
public enum BuildPlatform { | ||
|
||
UNDEFINED, | ||
/** | ||
* Android | ||
*/ | ||
GOOGLE, | ||
IOS, | ||
/** | ||
* Mac OS | ||
*/ | ||
OSX, | ||
/** | ||
* Kindle, FireTV | ||
*/ | ||
AMAZON, | ||
GEAR_VR, | ||
HOLOLENS, | ||
/** | ||
* Windows Store version | ||
*/ | ||
UWP, | ||
/** | ||
* Educational edition | ||
*/ | ||
WIN_32, | ||
DEDICATED, | ||
/** | ||
* Apple TV | ||
*/ | ||
TV_OS, | ||
/** | ||
* Playstation | ||
*/ | ||
SONY, | ||
/** | ||
* Nintendo Switch | ||
*/ | ||
NX, | ||
XBOX, | ||
WINDOWS_PHONE, | ||
LINUX; | ||
|
||
private static final BuildPlatform[] VALUES = values(); | ||
|
||
public static BuildPlatform from(int id) { | ||
return id > 0 && id < VALUES.length ? VALUES[id] : VALUES[0]; | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
bedrock-codec/src/main/java/org/cloudburstmc/protocol/bedrock/data/UserInterfaceProfile.java
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,14 @@ | ||
package org.cloudburstmc.protocol.bedrock.data; | ||
|
||
public enum UserInterfaceProfile { | ||
|
||
CLASSIC, | ||
POCKET, | ||
NONE; | ||
|
||
private static final UserInterfaceProfile[] VALUES = values(); | ||
|
||
public static UserInterfaceProfile from(int id) { | ||
return VALUES[id]; | ||
} | ||
} |