backport ec0558597b6ca948228846b25751c2b1863cbf3f: CommandParameter: change byte1 field to "flags" (#3115)

This commit is contained in:
Frago9876543210 2019-09-18 13:10:42 +03:00 committed by Dylan K. Taylor
parent 447477c5fb
commit cff2d37add
2 changed files with 3 additions and 3 deletions

View File

@ -227,7 +227,7 @@ class AvailableCommandsPacket extends DataPacket{
$parameter->paramName = $this->getString();
$parameter->paramType = $this->getLInt();
$parameter->isOptional = $this->getBool();
$parameter->byte1 = $this->getByte();
$parameter->flags = $this->getByte();
if($parameter->paramType & self::ARG_FLAG_ENUM){
$index = ($parameter->paramType & 0xffff);
@ -285,7 +285,7 @@ class AvailableCommandsPacket extends DataPacket{
$this->putLInt($type);
$this->putBool($parameter->isOptional);
$this->putByte($parameter->byte1);
$this->putByte($parameter->flags);
}
}
}

View File

@ -31,7 +31,7 @@ class CommandParameter{
/** @var bool */
public $isOptional;
/** @var int */
public $byte1 = 0; //unknown, always zero except for in /gamerule command
public $flags = 0; //shows enum name if 1, always zero except for in /gamerule command
/** @var CommandEnum|null */
public $enum;
/** @var string|null */