File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,10 @@ public static function create(
143
143
Vector3 $ cameraOrientation ,
144
144
Vector2 $ rawMove
145
145
) : self {
146
+ if ($ inputFlags ->getLength () !== 65 ){
147
+ throw new \InvalidArgumentException ("Input flags must be 65 bits long " );
148
+ }
149
+
146
150
if ($ playMode === PlayMode::VR and $ vrGazeDirection === null ){
147
151
//yuck, can we get a properly written packet just once? ...
148
152
throw new \InvalidArgumentException ("Gaze direction must be provided for VR play mode " );
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ public function getDefaultHandSettings() : ?string{ return $this->defaultHandSet
60
60
61
61
public static function read (PacketSerializer $ in ) : self {
62
62
$ identifier = $ in ->getString ();
63
- if ($ in ->getProtocolId () >= ProtocolInfo::PROTOCOL_1_21_60 ){
63
+ if ($ in ->getProtocolId () < ProtocolInfo::PROTOCOL_1_21_60 ){
64
64
$ categories = $ in ->getString ();
65
65
}
66
66
@@ -95,7 +95,7 @@ public static function read(PacketSerializer $in) : self{
95
95
96
96
public function write (PacketSerializer $ out ) : void {
97
97
$ out ->putString ($ this ->identifier );
98
- if ($ out ->getProtocolId () >= ProtocolInfo::PROTOCOL_1_21_60 ){
98
+ if ($ out ->getProtocolId () < ProtocolInfo::PROTOCOL_1_21_60 ){
99
99
$ out ->putString ($ this ->categories );
100
100
}
101
101
You can’t perform that action at this time.
0 commit comments