本文整理汇总了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;
}
}