mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-28 10:58:15 -05:00
Update #48 - Added some features from OptiFine
This commit is contained in:
46
sources/main/java/net/optifine/config/GlVersion.java
Normal file
46
sources/main/java/net/optifine/config/GlVersion.java
Normal file
@ -0,0 +1,46 @@
|
||||
package net.optifine.config;
|
||||
|
||||
public class GlVersion {
|
||||
private int major;
|
||||
private int minor;
|
||||
private int release;
|
||||
private String suffix;
|
||||
|
||||
public GlVersion(int major, int minor) {
|
||||
this(major, minor, 0);
|
||||
}
|
||||
|
||||
public GlVersion(int major, int minor, int release) {
|
||||
this(major, minor, release, (String) null);
|
||||
}
|
||||
|
||||
public GlVersion(int major, int minor, int release, String suffix) {
|
||||
this.major = major;
|
||||
this.minor = minor;
|
||||
this.release = release;
|
||||
this.suffix = suffix;
|
||||
}
|
||||
|
||||
public int getMajor() {
|
||||
return this.major;
|
||||
}
|
||||
|
||||
public int getMinor() {
|
||||
return this.minor;
|
||||
}
|
||||
|
||||
public int getRelease() {
|
||||
return this.release;
|
||||
}
|
||||
|
||||
public int toInt() {
|
||||
return this.minor > 9 ? this.major * 100 + this.minor
|
||||
: (this.release > 9 ? this.major * 100 + this.minor * 10 + 9
|
||||
: this.major * 100 + this.minor * 10 + this.release);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return this.suffix == null ? "" + this.major + "." + this.minor + "." + this.release
|
||||
: "" + this.major + "." + this.minor + "." + this.release + this.suffix;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user