mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 17:59:48 +00:00
Fix formatting issues due to bad IDE settings
This commit is contained in:
@ -27,7 +27,7 @@ use pocketmine\entity\Entity;
|
||||
|
||||
abstract class Armor extends Item{
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -29,7 +29,7 @@ class Bed extends Item{
|
||||
parent::__construct(self::BED, 0, $count, "Bed");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -27,7 +27,7 @@ class BeetrootSoup extends Item{
|
||||
parent::__construct(self::BEETROOT_SOUP, 0, $count, "Beetroot Soup");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -33,13 +33,13 @@ class Bucket extends Item{
|
||||
parent::__construct(self::BUCKET, $meta, $count, "Bucket");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$targetBlock = Block::get($this->meta);
|
||||
|
@ -29,7 +29,7 @@ class Cake extends Item{
|
||||
parent::__construct(self::CAKE, 0, $count, "Cake");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -32,9 +32,9 @@ class FlintSteel extends Tool{
|
||||
parent::__construct(self::FLINT_STEEL, $meta, $count, "Flint and Steel");
|
||||
}
|
||||
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if(($player->gamemode & 0x01) === 0 and $this->useOn($block) and $this->getDamage() >= $this->getMaxDurability()){
|
||||
|
@ -29,7 +29,7 @@ class IronDoor extends Item{
|
||||
parent::__construct(self::IRON_DOOR, 0, $count, "Iron Door");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -399,9 +399,9 @@ class Item{
|
||||
protected $durability = 0;
|
||||
protected $name;
|
||||
|
||||
public function canBeActivated(){
|
||||
return false;
|
||||
}
|
||||
public function canBeActivated(){
|
||||
return false;
|
||||
}
|
||||
|
||||
public static function init(){
|
||||
if(self::$list === null){
|
||||
@ -427,7 +427,7 @@ class Item{
|
||||
self::$list[self::SPAWN_EGG] = SpawnEgg::class;
|
||||
self::$list[self::DIAMOND] = Diamond::class;
|
||||
self::$list[self::STICK] = Stick::class;
|
||||
self::$list[self::SNOWBALL] = Snowball::class;
|
||||
self::$list[self::SNOWBALL] = Snowball::class;
|
||||
self::$list[self::BOWL] = Bowl::class;
|
||||
self::$list[self::FEATHER] = Feather::class;
|
||||
self::$list[self::BRICK] = Brick::class;
|
||||
@ -644,7 +644,7 @@ class Item{
|
||||
}
|
||||
|
||||
final public function __toString(){
|
||||
return "Item " . $this->name . " (" . $this->id . ":" . ($this->meta === null ? "?" : $this->meta) . ")x".$this->count;
|
||||
return "Item " . $this->name . " (" . $this->id . ":" . ($this->meta === null ? "?" : $this->meta) . ")x" . $this->count;
|
||||
}
|
||||
|
||||
public function getDestroySpeed(Block $block, Player $player){
|
||||
|
@ -27,7 +27,7 @@ class MushroomStew extends Item{
|
||||
parent::__construct(self::MUSHROOM_STEW, 0, $count, "Mushroom Stew");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
}
|
@ -31,9 +31,9 @@ class Painting extends Item{
|
||||
parent::__construct(self::PAINTING, 0, $count, "Painting");
|
||||
}
|
||||
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
if($target->isTransparent() === false and $face > 1 and $block->isSolid() === false){
|
||||
|
@ -29,7 +29,7 @@ class Sign extends Item{
|
||||
parent::__construct(self::SIGN, 0, $count, "Sign");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 16;
|
||||
}
|
||||
public function getMaxStackSize(){
|
||||
return 16;
|
||||
}
|
||||
}
|
@ -27,8 +27,8 @@ class Snowball extends Item{
|
||||
parent::__construct(self::SNOWBALL, 0, $count, "Snowball");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 16;
|
||||
}
|
||||
public function getMaxStackSize(){
|
||||
return 16;
|
||||
}
|
||||
|
||||
}
|
@ -36,9 +36,9 @@ class SpawnEgg extends Item{
|
||||
parent::__construct(self::SPAWN_EGG, $meta, $count, "Spawn Egg");
|
||||
}
|
||||
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
public function canBeActivated(){
|
||||
return true;
|
||||
}
|
||||
|
||||
public function onActivate(Level $level, Player $player, Block $block, Block $target, $face, $fx, $fy, $fz){
|
||||
$entity = null;
|
||||
@ -50,19 +50,19 @@ class SpawnEgg extends Item{
|
||||
|
||||
$nbt = new Compound("", [
|
||||
"Pos" => new Enum("Pos", [
|
||||
new Double("", $block->getX() + 0.5),
|
||||
new Double("", $block->getY()),
|
||||
new Double("", $block->getZ() + 0.5)
|
||||
]),
|
||||
new Double("", $block->getX() + 0.5),
|
||||
new Double("", $block->getY()),
|
||||
new Double("", $block->getZ() + 0.5)
|
||||
]),
|
||||
"Motion" => new Enum("Motion", [
|
||||
new Double("", 0),
|
||||
new Double("", 0),
|
||||
new Double("", 0)
|
||||
]),
|
||||
new Double("", 0),
|
||||
new Double("", 0),
|
||||
new Double("", 0)
|
||||
]),
|
||||
"Rotation" => new Enum("Rotation", [
|
||||
new Float("", lcg_value() * 360),
|
||||
new Float("", 0)
|
||||
]),
|
||||
new Float("", lcg_value() * 360),
|
||||
new Float("", 0)
|
||||
]),
|
||||
]);
|
||||
|
||||
$entity = Entity::createEntity($this->meta, $chunk, $nbt);
|
||||
|
@ -36,9 +36,9 @@ abstract class Tool extends Item{
|
||||
parent::__construct($id, $meta, $count, $name);
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: Move this to each item
|
||||
|
@ -29,7 +29,7 @@ class WoodenDoor extends Item{
|
||||
parent::__construct(self::WOODEN_DOOR, 0, $count, "Wooden Door");
|
||||
}
|
||||
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
public function getMaxStackSize(){
|
||||
return 1;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user