second array in ContainerSetContentPacket will be read no matter is windowid==0

This commit is contained in:
GameHerobrine 2026-03-10 21:50:47 +03:00
parent 878fc5f74b
commit d6c57e4aa6

View file

@ -15,11 +15,10 @@ class ContainerSetContentPacket extends RakNetDataPacket{
for($s = 0; $s < $count and !$this->feof(); ++$s){
$this->slots[$s] = $this->getSlot();
}
if($this->windowid === 0){
$count = $this->getShort();
for($s = 0; $s < $count and !$this->feof(); ++$s){
$this->hotbar[$s] = $this->getInt();
}
$count = $this->getShort();
for($s = 0; $s < $count and !$this->feof(); ++$s){
$this->hotbar[$s] = $this->getInt();
}
}