24 use GetTypeIdFromConstTrait;
26 public const ID = ItemStackRequestActionType::CRAFTING_RECIPE_OPTIONAL;
28 private int $recipeId;
29 private int $filterStringIndex;
32 public function __construct(
int $type,
int $filterStringIndex){
33 $this->recipeId = $type;
34 $this->filterStringIndex = $filterStringIndex;
37 public function getRecipeId() :
int{
return $this->recipeId; }
39 public function getFilterStringIndex() :
int{
return $this->filterStringIndex; }
42 $recipeId = $in->readRecipeNetId();
43 $filterStringIndex = $in->
getLInt();
44 return new self($recipeId, $filterStringIndex);
48 $out->writeRecipeNetId($this->recipeId);
49 $out->putLInt($this->filterStringIndex);