mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-13 15:05:33 +00:00
Merge pull request #10 from SOF3/master
Fixed some lines indented with 4 spaces rather than tabs
This commit is contained in:
commit
d7a78ee00f
@ -23,13 +23,13 @@ namespace pocketmine;
|
|||||||
|
|
||||||
abstract class Collectable extends \Threaded implements \Collectable{
|
abstract class Collectable extends \Threaded implements \Collectable{
|
||||||
|
|
||||||
private $isGarbage = false;
|
private $isGarbage = false;
|
||||||
|
|
||||||
public function isGarbage() : bool{
|
public function isGarbage() : bool{
|
||||||
return $this->isGarbage;
|
return $this->isGarbage;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setGarbage(){
|
public function setGarbage(){
|
||||||
$this->isGarbage = true;
|
$this->isGarbage = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class ActivatorRail extends Solid {
|
class ActivatorRail extends Solid {
|
||||||
|
|
||||||
protected $id = self::ACTIVATOR_RAIL;
|
protected $id = self::ACTIVATOR_RAIL;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Activator Rail";
|
return "Activator Rail";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class CocoaBlock extends Solid {
|
class CocoaBlock extends Solid {
|
||||||
|
|
||||||
protected $id = self::COCOA_BLOCK;
|
protected $id = self::COCOA_BLOCK;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Cocoa Block";
|
return "Cocoa Block";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class DaylightSensor extends Solid {
|
class DaylightSensor extends Solid {
|
||||||
|
|
||||||
protected $id = self::DAYLIGHT_SENSOR;
|
protected $id = self::DAYLIGHT_SENSOR;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Daylight Sensor";
|
return "Daylight Sensor";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class DetectorRail extends Solid {
|
class DetectorRail extends Solid {
|
||||||
|
|
||||||
protected $id = self::DETECTOR_RAIL;
|
protected $id = self::DETECTOR_RAIL;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Detector Rail";
|
return "Detector Rail";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class Lever extends Solid {
|
class Lever extends Solid {
|
||||||
|
|
||||||
protected $id = self::LEVER;
|
protected $id = self::LEVER;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Lever";
|
return "Lever";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class LitRedstoneLamp extends Solid {
|
class LitRedstoneLamp extends Solid {
|
||||||
|
|
||||||
protected $id = self::LIT_REDSTONE_LAMP;
|
protected $id = self::LIT_REDSTONE_LAMP;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Lit Redstone Lamp";
|
return "Lit Redstone Lamp";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class LitRedstoneTorch extends Solid {
|
class LitRedstoneTorch extends Solid {
|
||||||
|
|
||||||
protected $id = self::REDSTONE_TORCH;
|
protected $id = self::REDSTONE_TORCH;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Lit Redstone Torch";
|
return "Lit Redstone Torch";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class NoteBlock extends Solid {
|
class NoteBlock extends Solid {
|
||||||
|
|
||||||
protected $id = self::NOTE_BLOCK;
|
protected $id = self::NOTE_BLOCK;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Note Block";
|
return "Note Block";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,13 +22,13 @@
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
class PoweredRail extends Solid {
|
class PoweredRail extends Solid {
|
||||||
protected $id = self::POWERED_RAIL;
|
protected $id = self::POWERED_RAIL;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Powered Rail";
|
return "Powered Rail";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class Rail extends Solid {
|
class Rail extends Solid {
|
||||||
|
|
||||||
protected $id = self::RAIL;
|
protected $id = self::RAIL;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Rail";
|
return "Rail";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class RedstoneLamp extends Solid {
|
class RedstoneLamp extends Solid {
|
||||||
|
|
||||||
protected $id = self::REDSTONE_LAMP;
|
protected $id = self::REDSTONE_LAMP;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Redstone Lamp";
|
return "Redstone Lamp";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class RedstoneTorch extends Solid {
|
class RedstoneTorch extends Solid {
|
||||||
|
|
||||||
protected $id = self::REDSTONE_TORCH;
|
protected $id = self::REDSTONE_TORCH;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Redstone Torch";
|
return "Redstone Torch";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class StoneButton extends Solid {
|
class StoneButton extends Solid {
|
||||||
|
|
||||||
protected $id = self::STONE_BUTTON;
|
protected $id = self::STONE_BUTTON;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Stone Button";
|
return "Stone Button";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class Tripwire extends Solid {
|
class Tripwire extends Solid {
|
||||||
|
|
||||||
protected $id = self::TRIPWIRE;
|
protected $id = self::TRIPWIRE;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Tripwire";
|
return "Tripwire";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class TripwireHook extends Solid {
|
class TripwireHook extends Solid {
|
||||||
|
|
||||||
protected $id = self::TRIPWIRE_HOOK;
|
protected $id = self::TRIPWIRE_HOOK;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Tripwire Hook";
|
return "Tripwire Hook";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class WeightedPressurePlateHeavy extends Solid {
|
class WeightedPressurePlateHeavy extends Solid {
|
||||||
|
|
||||||
protected $id = self::WEIGHTED_PRESSURE_PLATE_HEAVY;
|
protected $id = self::WEIGHTED_PRESSURE_PLATE_HEAVY;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Weighted Pressure Plate Heavy";
|
return "Weighted Pressure Plate Heavy";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class WeightedPressurePlateLight extends Solid {
|
class WeightedPressurePlateLight extends Solid {
|
||||||
|
|
||||||
protected $id = self::WEIGHTED_PRESSURE_PLATE_LIGHT;
|
protected $id = self::WEIGHTED_PRESSURE_PLATE_LIGHT;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Weighted Pressure Plate Light";
|
return "Weighted Pressure Plate Light";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,13 +23,13 @@ namespace pocketmine\block;
|
|||||||
|
|
||||||
class WoodenButton extends Solid {
|
class WoodenButton extends Solid {
|
||||||
|
|
||||||
protected $id = self::WOODEN_BUTTON;
|
protected $id = self::WOODEN_BUTTON;
|
||||||
|
|
||||||
public function __construct($meta = 0){
|
public function __construct($meta = 0){
|
||||||
$this->meta = $meta;
|
$this->meta = $meta;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getName(){
|
public function getName(){
|
||||||
return "Wooden Button";
|
return "Wooden Button";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ class SpruceTree extends Tree{
|
|||||||
$this->treeHeight = $random->nextBoundedInt(4) + 6;
|
$this->treeHeight = $random->nextBoundedInt(4) + 6;
|
||||||
|
|
||||||
$topSize = $this->treeHeight - (1 + $random->nextBoundedInt(2));
|
$topSize = $this->treeHeight - (1 + $random->nextBoundedInt(2));
|
||||||
$lRadius = 2 + $random->nextBoundedInt(2);
|
$lRadius = 2 + $random->nextBoundedInt(2);
|
||||||
|
|
||||||
$this->placeTrunk($level, $x, $y, $z, $random, $this->treeHeight - $random->nextBoundedInt(3));
|
$this->placeTrunk($level, $x, $y, $z, $random, $this->treeHeight - $random->nextBoundedInt(3));
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ class SpruceTree extends Tree{
|
|||||||
$xOff = abs($xx - $x);
|
$xOff = abs($xx - $x);
|
||||||
for($zz = $z - $radius; $zz <= $z + $radius; ++$zz){
|
for($zz = $z - $radius; $zz <= $z + $radius; ++$zz){
|
||||||
$zOff = abs($zz - $z);
|
$zOff = abs($zz - $z);
|
||||||
if($xOff === $radius and $zOff === $radius and $radius > 0){
|
if($xOff === $radius and $zOff === $radius and $radius > 0){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,10 +62,10 @@ class SpruceTree extends Tree{
|
|||||||
$level->setBlockIdAt($xx, $yyy, $zz, $this->leafBlock);
|
$level->setBlockIdAt($xx, $yyy, $zz, $this->leafBlock);
|
||||||
$level->setBlockDataAt($xx, $yyy, $zz, $this->type);
|
$level->setBlockDataAt($xx, $yyy, $zz, $this->type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($radius >= $maxR){
|
if($radius >= $maxR){
|
||||||
$radius = $minR;
|
$radius = $minR;
|
||||||
$minR = 1;
|
$minR = 1;
|
||||||
if(++$maxR > $lRadius){
|
if(++$maxR > $lRadius){
|
||||||
|
@ -94,7 +94,7 @@ class FloatingTextParticle extends Particle{
|
|||||||
Entity::DATA_NAMETAG => [Entity::DATA_TYPE_STRING, $this->title . ($this->text !== "" ? "\n" . $this->text : "")],
|
Entity::DATA_NAMETAG => [Entity::DATA_TYPE_STRING, $this->title . ($this->text !== "" ? "\n" . $this->text : "")],
|
||||||
Entity::DATA_SHOW_NAMETAG => [Entity::DATA_TYPE_BYTE, 1],
|
Entity::DATA_SHOW_NAMETAG => [Entity::DATA_TYPE_BYTE, 1],
|
||||||
Entity::DATA_NO_AI => [Entity::DATA_TYPE_BYTE, 1]
|
Entity::DATA_NO_AI => [Entity::DATA_TYPE_BYTE, 1]
|
||||||
];
|
];
|
||||||
|
|
||||||
$p[] = $pk;
|
$p[] = $pk;
|
||||||
}
|
}
|
||||||
|
@ -41,9 +41,9 @@ class FullChunkDataPacket extends DataPacket{
|
|||||||
|
|
||||||
public function encode(){
|
public function encode(){
|
||||||
$this->reset();
|
$this->reset();
|
||||||
$this->putInt($this->chunkX);
|
$this->putInt($this->chunkX);
|
||||||
$this->putInt($this->chunkZ);
|
$this->putInt($this->chunkZ);
|
||||||
$this->putByte($this->order);
|
$this->putByte($this->order);
|
||||||
$this->putInt(strlen($this->data));
|
$this->putInt(strlen($this->data));
|
||||||
$this->put($this->data);
|
$this->put($this->data);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ class UpdateBlockPacket extends DataPacket{
|
|||||||
|
|
||||||
const FLAG_NONE = 0b0000;
|
const FLAG_NONE = 0b0000;
|
||||||
const FLAG_NEIGHBORS = 0b0001;
|
const FLAG_NEIGHBORS = 0b0001;
|
||||||
const FLAG_NETWORK = 0b0010;
|
const FLAG_NETWORK = 0b0010;
|
||||||
const FLAG_NOGRAPHIC = 0b0100;
|
const FLAG_NOGRAPHIC = 0b0100;
|
||||||
const FLAG_PRIORITY = 0b1000;
|
const FLAG_PRIORITY = 0b1000;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user