mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
TAG_Byte should always be signed (#962)
This commit is contained in:
parent
2db6ea6b18
commit
3ac51e1095
@ -267,8 +267,8 @@ class NBT{
|
||||
$tag->write($this, $network);
|
||||
}
|
||||
|
||||
public function getByte(){
|
||||
return Binary::readByte($this->get(1));
|
||||
public function getByte(bool $signed = false){
|
||||
return Binary::readByte($this->get(1), $signed);
|
||||
}
|
||||
|
||||
public function putByte($v){
|
||||
|
@ -32,7 +32,7 @@ class ByteTag extends NamedTag{
|
||||
}
|
||||
|
||||
public function read(NBT $nbt, bool $network = false){
|
||||
$this->value = $nbt->getByte();
|
||||
$this->value = $nbt->getByte(true);
|
||||
}
|
||||
|
||||
public function write(NBT $nbt, bool $network = false){
|
||||
|
Loading…
x
Reference in New Issue
Block a user