本文整理匯總了PHP中Item::isPickaxe方法的典型用法代碼示例。如果您正苦於以下問題:PHP Item::isPickaxe方法的具體用法?PHP Item::isPickaxe怎麽用?PHP Item::isPickaxe使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Item
的用法示例。
在下文中一共展示了Item::isPickaxe方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getDrops
public function getDrops(Item $item, Player $player)
{
if ($item->isPickaxe() >= 5) {
return array(array(OBSIDIAN, 0, 1));
} else {
return array();
}
}
示例2: getDrops
public function getDrops(Item $item, Player $player)
{
if ($item->isPickaxe() >= 1) {
return array(array(SLAB, $this->meta & 0x7, 2));
} else {
return array();
}
}
示例3: getDrops
public function getDrops(Item $item, Player $player)
{
if ($item->isPickaxe() >= 1) {
return array(array(COBBLESTONE, 0, 1));
} else {
return array();
}
}
示例4: getDrops
public function getDrops(Item $item, Player $player)
{
if ($item->isPickaxe() >= 4) {
return array(array(REDSTONE_DUST, 0, mt_rand(4, 5)));
} else {
return array();
}
}
示例5: getDrops
public function getDrops(Item $item, Player $player)
{
if ($item->isPickaxe() >= 1) {
return array(array(NETHER_BRICKS, 0, 1));
} else {
return array();
}
}
示例6: getDrops
public function getDrops(Item $item, Player $player)
{
if ($item->isPickaxe() >= 4) {
return array(array(GOLD_ORE, 0, 1));
} else {
return array();
}
}
示例7: getDrops
public function getDrops(Item $item, Player $player)
{
if ($item->isPickaxe() >= 1) {
return array(array(STONE_BRICKS, $this->meta & 0x3, 1));
} else {
return array();
}
}
示例8: getDrops
public function getDrops(Item $item, Player $player)
{
if ($item->isPickaxe() >= 1) {
return array(array(IRON_DOOR, 0, 1));
} else {
return array();
}
}
示例9: getDrops
public function getDrops(Item $item, Player $player)
{
if ($item->isPickaxe() >= 4) {
return array(array(DIAMOND_BLOCK, 0, 1));
} else {
return array();
}
}
示例10: getDrops
public function getDrops(Item $item, Player $player)
{
if ($item->isPickaxe() >= 3) {
return array(array(DYE, 4, mt_rand(4, 8)));
} else {
return array();
}
}
示例11: getDrops
public function getDrops(Item $item, Player $player)
{
if ($item->isPickaxe() >= 1) {
return array(array(QUARTZ_BLOCK, $this->meta & 0x3, 1));
} else {
return array();
}
}
示例12: getDrops
public function getDrops(Item $item, Player $player)
{
$drops = array();
if ($item->isPickaxe() >= 1) {
$drops[] = array(FURNACE, 0, 1);
}
$t = ServerAPI::request()->api->tile->get($this);
if ($t !== false and $t->class === TILE_FURNACE) {
for ($s = 0; $s < FURNACE_SLOTS; ++$s) {
$slot = $t->getSlot($s);
if ($slot->getID() > AIR and $slot->count > 0) {
$drops[] = array($slot->getID(), $slot->getMetadata(), $slot->count);
}
}
}
return $drops;
}
示例13: getBreakTime
public function getBreakTime(Item $item, Player $player)
{
if (($player->gamemode & 0x1) === 0x1) {
return 0.2;
}
switch ($item->isPickaxe()) {
case 5:
return 0.1;
case 4:
return 0.15;
case 3:
return 0.2;
case 2:
return 0.1;
case 1:
return 0.4;
default:
return 0.75;
}
}