Added cartography and smithing tables

these have working inventories, and their crafting menus will 'just work' once the items for the associated recipes have been implemented (maps, netherite).
This commit is contained in:
Dylan K. Taylor
2022-07-14 18:01:47 +01:00
parent 91719051e2
commit eb8fb63409
14 changed files with 202 additions and 9 deletions

View File

@ -213,7 +213,8 @@ final class CraftingManagerFromDataHelper{
$recipeType = match($recipe->block){
"crafting_table" => ShapelessRecipeType::CRAFTING(),
"stonecutter" => ShapelessRecipeType::STONECUTTER(),
//TODO: Cartography Table
"smithing_table" => ShapelessRecipeType::SMITHING(),
"cartography_table" => ShapelessRecipeType::CARTOGRAPHY(),
default => null
};
if($recipeType === null){

View File

@ -31,7 +31,9 @@ use pocketmine\utils\EnumTrait;
* @see build/generate-registry-annotations.php
* @generate-registry-docblock
*
* @method static ShapelessRecipeType CARTOGRAPHY()
* @method static ShapelessRecipeType CRAFTING()
* @method static ShapelessRecipeType SMITHING()
* @method static ShapelessRecipeType STONECUTTER()
*/
final class ShapelessRecipeType{
@ -40,7 +42,9 @@ final class ShapelessRecipeType{
protected static function setup() : void{
self::registerAll(
new self("crafting"),
new self("stonecutter")
new self("stonecutter"),
new self("smithing"),
new self("cartography")
);
}
}