本文整理汇总了PHP中pocketmine\tile\Tile::registerTile方法的典型用法代码示例。如果您正苦于以下问题:PHP Tile::registerTile方法的具体用法?PHP Tile::registerTile怎么用?PHP Tile::registerTile使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pocketmine\tile\Tile
的用法示例。
在下文中一共展示了Tile::registerTile方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onEnable
public function onEnable()
{
//アイテムの追加
Item::$list[self::ITEM_FLOWER_POT] = ItemFlowerPot::class;
//ブロックの追加
$this->registerBlock(self::BLOCK_FLOWER_POT, BlockFlowerPot::class);
//ブロックタイルエンティティの追加
Tile::registerTile(FlowerPot::class);
//アイテムをクリエイティブタブに追加
Item::addCreativeItem(Item::get(self::ITEM_FLOWER_POT, 0));
//一応レシピ追加
Server::getInstance()->getCraftingManager()->registerRecipe((new ShapedRecipe(Item::get(MainClass::ITEM_FLOWER_POT, 0, 1), "X X", " X "))->setIngredient("X", Item::get(Item::BRICK, null)));
//omake skull
//アイテムの追加
Item::$list[self::ITEM_SKULL] = ItemSkull::class;
//ブロックの追加
$this->registerBlock(self::BLOCK_SKULL, BlockSkull::class);
//ブロックタイルエンティティの追加
Tile::registerTile(Skull::class);
//アイテムをクリエイティブタブに追加
Item::addCreativeItem(Item::get(self::ITEM_SKULL, 0));
Item::addCreativeItem(Item::get(self::ITEM_SKULL, 1));
Item::addCreativeItem(Item::get(self::ITEM_SKULL, 2));
Item::addCreativeItem(Item::get(self::ITEM_SKULL, 3));
Item::addCreativeItem(Item::get(self::ITEM_SKULL, 4));
}
示例2: registerTiles
private function registerTiles()
{
Tile::registerTile(Chest::class);
Tile::registerTile(Furnace::class);
Tile::registerTile(Sign::class);
Tile::registerTile(Skull::class);
Tile::registerTile(BrewingStand::class);
Tile::registerTile(EnchantTable::class);
}
示例3: registerTiles
private function registerTiles()
{
Tile::registerTile(Chest::class);
Tile::registerTile(Furnace::class);
Tile::registerTile(Sign::class);
}
示例4: registerTiles
private function registerTiles()
{
Tile::registerTile(Beacon::class);
Tile::registerTile(BrewingStand::class);
Tile::registerTile(Cauldron::class);
Tile::registerTile(Chest::class);
Tile::registerTile(Dispenser::class);
Tile::registerTile(DLDetector::class);
Tile::registerTile(Dropper::class);
Tile::registerTile(EnchantTable::class);
Tile::registerTile(FlowerPot::class);
Tile::registerTile(Furnace::class);
Tile::registerTile(Hopper::class);
Tile::registerTile(ItemFrame::class);
Tile::registerTile(MobSpawner::class);
Tile::registerTile(Music::class);
Tile::registerTile(Piston::class);
Tile::registerTile(Sign::class);
Tile::registerTile(Skull::class);
// Tile::registerTile(TrappedChest::class);
}
示例5: registerTiles
private function registerTiles()
{
Tile::registerTile(Chest::class);
Tile::registerTile(EnchantTable::class);
Tile::registerTile(FlowerPot::class);
Tile::registerTile(Furnace::class);
Tile::registerTile(Sign::class);
Tile::registerTile(Skull::class);
}
示例6: registerTiles
private function registerTiles()
{
Tile::registerTile(BrewingStand::class);
Tile::registerTile(Chest::class);
Tile::registerTile(Dispenser::class);
Tile::registerTile(Dropper::class);
Tile::registerTile(EnchantTable::class);
Tile::registerTile(Furnace::class);
Tile::registerTile(FlowerPot::class);
Tile::registerTile(Hopper::class);
Tile::registerTile(Sign::class);
Tile::registerTile(Skull::class);
Tile::registerTile(TrappedChest::class);
}
示例7: onEnable
public function onEnable()
{
//flower pot
//add item
$this->registerItem(self::ITEM_FLOWER_POT, ItemFlowerPot::class);
//add block
$this->registerBlock(self::BLOCK_FLOWER_POT, BlockFlowerPot::class);
//add block entity(tile)
Tile::registerTile(FlowerPot::class);
//add to creative item
$this->addCreativeItem(Item::get(self::ITEM_FLOWER_POT, 0));
//extra: skull
//add item
$this->registerItem(self::ITEM_SKULL, ItemSkull::class);
//add block
$this->registerBlock(self::BLOCK_SKULL, BlockSkull::class);
//add block entity(tile)
Tile::registerTile(Skull::class);
//add to creative item
$this->addCreativeItem(Item::get(self::ITEM_SKULL, 0));
$this->addCreativeItem(Item::get(self::ITEM_SKULL, 1));
$this->addCreativeItem(Item::get(self::ITEM_SKULL, 2));
$this->addCreativeItem(Item::get(self::ITEM_SKULL, 3));
$this->addCreativeItem(Item::get(self::ITEM_SKULL, 4));
//extra: note block
//add item(block)
$this->registerItem(self::BLOCK_NOTE, BlockNote::class);
//add block
$this->registerBlock(self::BLOCK_NOTE, BlockNote::class);
//add block entity(tile)
Tile::registerTile(Note::class);
//add creative item
$this->addCreativeItem(Item::get(self::BLOCK_NOTE, 0));
//extra: item frame
//add block
$this->registerBlock(self::BLOCK_ITEM_FRAME, BlockItemFrame::class);
//add item
$this->registerItem(self::ITEM_ITEM_FRAME, ItemItemFrame::class);
//add block entity(tile)
Tile::registerTile(ItemFrame::class);
//add to creative item
$this->addCreativeItem(Item::get(self::ITEM_ITEM_FRAME, 0));
//add drop packet to network
Server::getInstance()->getNetWork()->registerPacket(MainClass::PROTOCOL_ITEM_FRAME_DROP_ITEM_PACKET, ItemFrameDropPacket::class);
//extra: Cauldron
//add item
$this->registerItem(self::ITEM_CAULDRON, ItemCauldron::class);
//add block
$this->registerBlock(self::BLOCK_CAULDRON, BlockCauldron::class);
//add block entity(tile)
Tile::registerTile(Cauldron::class);
//add creative item
$this->addCreativeItem(Item::get(self::ITEM_CAULDRON, 0));
//init Color
Color::init();
//fix max stack
$this->registerItem(Item::POTION, Potion::class);
$this->registerItem(Item::SPLASH_POTION, SplashPotion::class);
//Recipes
$craftingManager = Server::getInstance()->getCraftingManager();
//.FlowerPot
$craftingManager->registerRecipe((new BigShapedRecipe(Item::get(MainClass::ITEM_FLOWER_POT, 0, 1), "B B", " B ", " "))->setIngredient("B", Item::get(Item::BRICK, null, 1)));
//.NoteBlock
$craftingManager->registerRecipe((new BigShapedRecipe(Item::get(MainClass::BLOCK_NOTE, 0, 1), "PPP", "PRP", "PPP"))->setIngredient("P", Item::get(Item::PLANK, null, 1))->setIngredient("R", Item::get(Item::REDSTONE, null, 1)));
//.ItemFrame
$craftingManager->registerRecipe((new BigShapedRecipe(Item::get(MainClass::ITEM_ITEM_FRAME, 0, 1), "SSS", "SLS", "SSS"))->setIngredient("S", Item::get(Item::STICK, null, 1))->setIngredient("L", Item::get(Item::LEATHER, null, 1)));
//.Cauldron
$craftingManager->registerRecipe((new BigShapedRecipe(Item::get(MainClass::ITEM_CAULDRON, 0, 1), "I I", "I I", "III"))->setIngredient("I", Item::get(Item::IRON_INGOT, null, 1)));
Server::getInstance()->getPluginManager()->registerEvents($this, $this);
}