mirror of
https://github.com/ViaVersion/ViaNBT.git
synced 2024-11-22 11:35:16 +01:00
Add ByteTag boolean constructor
This commit is contained in:
parent
eec9aca691
commit
9f71f9b978
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.viaversion</groupId>
|
||||
<artifactId>nbt</artifactId>
|
||||
<version>4.2.0</version>
|
||||
<version>4.3.0</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ViaNBT</name>
|
||||
|
@ -28,6 +28,15 @@ public class ByteTag extends NumberTag {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a tag.
|
||||
*
|
||||
* @param value The value of the tag.
|
||||
*/
|
||||
public ByteTag(boolean value) {
|
||||
this.value = (byte) (value ? 1 : 0);
|
||||
}
|
||||
|
||||
public static ByteTag read(DataInput in, TagLimiter tagLimiter) throws IOException {
|
||||
tagLimiter.countByte();
|
||||
return new ByteTag(in.readByte());
|
||||
|
Loading…
Reference in New Issue
Block a user