TAG_Byte should always be signed (#962)

This commit is contained in:
Dylan K. Taylor 2017-06-02 11:30:44 +01:00 committed by GitHub
parent 2db6ea6b18
commit 3ac51e1095
2 changed files with 3 additions and 3 deletions

View File

@ -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){

View File

@ -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){