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

@ -141,6 +141,7 @@ use function mb_strtolower;
* @method static Candle CANDLE()
* @method static Carpet CARPET()
* @method static Carrot CARROTS()
* @method static CartographyTable CARTOGRAPHY_TABLE()
* @method static CarvedPumpkin CARVED_PUMPKIN()
* @method static ChemicalHeat CHEMICAL_HEAT()
* @method static Chest CHEST()
@ -612,6 +613,7 @@ use function mb_strtolower;
* @method static Opaque SHROOMLIGHT()
* @method static ShulkerBox SHULKER_BOX()
* @method static Slime SLIME()
* @method static SmithingTable SMITHING_TABLE()
* @method static Furnace SMOKER()
* @method static Opaque SMOOTH_BASALT()
* @method static Opaque SMOOTH_QUARTZ()
@ -1158,6 +1160,7 @@ final class VanillaBlocks{
self::registerBlocksR17();
self::registerMudBlocks();
self::registerCraftingTables();
self::registerOres();
self::registerWoodenBlocks();
}
@ -1356,6 +1359,13 @@ final class VanillaBlocks{
self::register("nether_gold_ore", new NetherGoldOre(new BID(Ids::NETHER_GOLD_ORE), "Nether Gold Ore", $netherrackOreBreakInfo));
}
private static function registerCraftingTables() : void{
//TODO: this is the same for all wooden crafting blocks
$craftingBlockBreakInfo = new BreakInfo(2.5, ToolType::AXE);
self::register("cartography_table", new CartographyTable(new BID(Ids::CARTOGRAPHY_TABLE), "Cartography Table", $craftingBlockBreakInfo));
self::register("smithing_table", new SmithingTable(new BID(Ids::SMITHING_TABLE), "Smithing Table", $craftingBlockBreakInfo));
}
private static function registerBlocksR13() : void{
self::register("light", new Light(new BID(Ids::LIGHT), "Light Block", BreakInfo::indestructible()));
self::register("wither_rose", new WitherRose(new BID(Ids::WITHER_ROSE), "Wither Rose", BreakInfo::instant()));