move crafting stuff to pocketmine\crafting namespace

This commit is contained in:
Dylan K. Taylor 2019-07-01 18:47:09 +01:00
parent 601ba4264d
commit 7aa4d974ef
14 changed files with 27 additions and 26 deletions

View File

@ -33,13 +33,13 @@ use pocketmine\command\CommandSender;
use pocketmine\command\ConsoleCommandSender;
use pocketmine\command\PluginIdentifiableCommand;
use pocketmine\command\SimpleCommandMap;
use pocketmine\crafting\CraftingManager;
use pocketmine\entity\EntityFactory;
use pocketmine\event\HandlerListManager;
use pocketmine\event\player\PlayerDataSaveEvent;
use pocketmine\event\server\CommandEvent;
use pocketmine\event\server\DataPacketBroadcastEvent;
use pocketmine\event\server\QueryRegenerateEvent;
use pocketmine\inventory\CraftingManager;
use pocketmine\inventory\CreativeInventory;
use pocketmine\item\enchantment\Enchantment;
use pocketmine\item\ItemFactory;

View File

@ -23,7 +23,7 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\inventory\CraftingGrid;
use pocketmine\crafting\CraftingGrid;
use pocketmine\item\Item;
use pocketmine\math\Vector3;
use pocketmine\player\Player;

View File

@ -24,11 +24,11 @@ declare(strict_types=1);
namespace pocketmine\block\tile;
use pocketmine\block\Furnace as BlockFurnace;
use pocketmine\crafting\FurnaceRecipe;
use pocketmine\event\inventory\FurnaceBurnEvent;
use pocketmine\event\inventory\FurnaceSmeltEvent;
use pocketmine\inventory\CallbackInventoryChangeListener;
use pocketmine\inventory\FurnaceInventory;
use pocketmine\inventory\FurnaceRecipe;
use pocketmine\inventory\Inventory;
use pocketmine\item\Item;
use pocketmine\item\ItemFactory;

View File

@ -21,8 +21,9 @@
declare(strict_types=1);
namespace pocketmine\inventory;
namespace pocketmine\crafting;
use pocketmine\inventory\BaseInventory;
use pocketmine\item\Item;
use pocketmine\player\Player;
use function max;

View File

@ -21,7 +21,7 @@
declare(strict_types=1);
namespace pocketmine\inventory;
namespace pocketmine\crafting;
use pocketmine\item\Item;
use pocketmine\network\mcpe\compression\CompressBatchPromise;

View File

@ -21,7 +21,7 @@
declare(strict_types=1);
namespace pocketmine\inventory;
namespace pocketmine\crafting;
use pocketmine\item\Item;

View File

@ -21,7 +21,7 @@
declare(strict_types=1);
namespace pocketmine\inventory;
namespace pocketmine\crafting;
use pocketmine\item\Item;

View File

@ -21,7 +21,7 @@
declare(strict_types=1);
namespace pocketmine\inventory;
namespace pocketmine\crafting;
use pocketmine\utils\UUID;

View File

@ -21,7 +21,7 @@
declare(strict_types=1);
namespace pocketmine\inventory;
namespace pocketmine\crafting;
use pocketmine\item\Item;
use pocketmine\item\ItemFactory;

View File

@ -21,7 +21,7 @@
declare(strict_types=1);
namespace pocketmine\inventory;
namespace pocketmine\crafting;
use pocketmine\item\Item;
use function array_map;

View File

@ -23,10 +23,10 @@ declare(strict_types=1);
namespace pocketmine\event\inventory;
use pocketmine\crafting\CraftingRecipe;
use pocketmine\event\Cancellable;
use pocketmine\event\CancellableTrait;
use pocketmine\event\Event;
use pocketmine\inventory\CraftingRecipe;
use pocketmine\inventory\transaction\CraftingTransaction;
use pocketmine\item\Item;
use pocketmine\player\Player;
@ -36,7 +36,7 @@ class CraftItemEvent extends Event implements Cancellable{
/** @var CraftingTransaction */
private $transaction;
/** @var CraftingRecipe */
/** @var \pocketmine\crafting\CraftingRecipe */
private $recipe;
/** @var int */
private $repetitions;
@ -46,13 +46,13 @@ class CraftItemEvent extends Event implements Cancellable{
private $outputs;
/**
* @param CraftingTransaction $transaction
* @param CraftingRecipe $recipe
* @param int $repetitions
* @param Item[] $inputs
* @param Item[] $outputs
* @param CraftingTransaction $transaction
* @param \pocketmine\crafting\CraftingRecipe $recipe
* @param int $repetitions
* @param Item[] $inputs
* @param Item[] $outputs
*/
public function __construct(CraftingTransaction $transaction, CraftingRecipe $recipe, int $repetitions, array $inputs, array $outputs){
public function __construct(CraftingTransaction $transaction, \pocketmine\crafting\CraftingRecipe $recipe, int $repetitions, array $inputs, array $outputs){
$this->transaction = $transaction;
$this->recipe = $recipe;
$this->repetitions = $repetitions;
@ -72,9 +72,9 @@ class CraftItemEvent extends Event implements Cancellable{
/**
* Returns the recipe crafted.
*
* @return CraftingRecipe
* @return \pocketmine\crafting\CraftingRecipe
*/
public function getRecipe() : CraftingRecipe{
public function getRecipe() : \pocketmine\crafting\CraftingRecipe{
return $this->recipe;
}

View File

@ -23,8 +23,8 @@ declare(strict_types=1);
namespace pocketmine\inventory\transaction;
use pocketmine\crafting\CraftingRecipe;
use pocketmine\event\inventory\CraftItemEvent;
use pocketmine\inventory\CraftingRecipe;
use pocketmine\item\Item;
use pocketmine\network\mcpe\protocol\ContainerClosePacket;
use pocketmine\network\mcpe\protocol\types\ContainerIds;

View File

@ -26,9 +26,9 @@ namespace pocketmine\network\mcpe\protocol;
#include <rules/DataPacket.h>
use pocketmine\inventory\FurnaceRecipe;
use pocketmine\inventory\ShapedRecipe;
use pocketmine\inventory\ShapelessRecipe;
use pocketmine\crafting\FurnaceRecipe;
use pocketmine\crafting\ShapedRecipe;
use pocketmine\crafting\ShapelessRecipe;
use pocketmine\item\Item;
use pocketmine\item\ItemFactory;
use pocketmine\network\BadPacketException;

View File

@ -28,6 +28,7 @@ use pocketmine\block\BlockFactory;
use pocketmine\block\BlockLegacyIds;
use pocketmine\block\UnknownBlock;
use pocketmine\command\CommandSender;
use pocketmine\crafting\CraftingGrid;
use pocketmine\entity\effect\Effect;
use pocketmine\entity\effect\EffectInstance;
use pocketmine\entity\Entity;
@ -67,7 +68,6 @@ use pocketmine\event\player\PlayerToggleSprintEvent;
use pocketmine\event\player\PlayerTransferEvent;
use pocketmine\form\Form;
use pocketmine\form\FormValidationException;
use pocketmine\inventory\CraftingGrid;
use pocketmine\inventory\Inventory;
use pocketmine\inventory\PlayerCursorInventory;
use pocketmine\item\Consumable;
@ -183,7 +183,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
protected $permanentWindows = [];
/** @var PlayerCursorInventory */
protected $cursorInventory;
/** @var CraftingGrid */
/** @var \pocketmine\crafting\CraftingGrid */
protected $craftingGrid = null;
/** @var int */