I don't understand how working the new CompoundTag.. (btw I understan only old CompoundTag) Console error message: PHP: $tag = new CompoundTag("", [ new ListTag("Recipes", []), ]); $recipes = [[Item::get(Item::BRICK, 0, 1), Item::get(Item::SANDSTONE, 2, 2)], [Item::get(Item::BRICK, 0, 7), Item::get(Item::END_STONE, 0, 1)]]; $this->recipes[$p->getName()] = $recipes; $i = 0; foreach($recipes as $recipe){ $tag->Recipes[$i] = $this->makeRecipe($recipe[0], $recipe[1], $recipe[2] ?? null); ++$i; } $nbt = new NBT; $nbt->setData($tag);
This thread can explain it https://forums.pmmp.io/threads/adapting-old-code-using-compoundtags-since-api-3-0-0-alpha12.5975/