Fixed request rejecting

This commit is contained in:
Dylan K. Taylor
2023-03-20 01:35:03 +00:00
parent eece6c4433
commit 4e55433ed8
5 changed files with 17 additions and 14 deletions

View File

@ -65,7 +65,7 @@ final class ItemStackResponseBuilder{
return [$inventory, $slot];
}
public function build(bool $success) : ItemStackResponse{
public function build() : ItemStackResponse{
$responseInfosByContainer = [];
foreach($this->changedSlots as $containerInterfaceId => $slotIds){
if($containerInterfaceId === ContainerUIIds::CREATED_OUTPUT){
@ -107,6 +107,6 @@ final class ItemStackResponseBuilder{
$responseContainerInfos[] = new ItemStackResponseContainerInfo($containerInterfaceId, $responseInfos);
}
return new ItemStackResponse($success ? ItemStackResponse::RESULT_OK : ItemStackResponse::RESULT_ERROR, $this->requestId, $responseContainerInfos);
return new ItemStackResponse(ItemStackResponse::RESULT_OK, $this->requestId, $responseContainerInfos);
}
}