Entity: remove more useless classes

these were slated for removal some time ago, but it never happened because they were used in the API. This is no longer the case on 4.0, so these classes are now entirely useless.
This commit is contained in:
Dylan K. Taylor 2019-06-27 14:23:24 +01:00
parent 2ba76bd97d
commit f3882dd658
12 changed files with 6 additions and 180 deletions

View File

@ -26,7 +26,7 @@ namespace pocketmine\entity;
use pocketmine\network\mcpe\protocol\types\EntityMetadataFlags;
abstract class Animal extends Creature implements Ageable{
abstract class Animal extends Living implements Ageable{
public function isBaby() : bool{
return $this->getGenericFlag(EntityMetadataFlags::BABY);

View File

@ -1,29 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\entity;
abstract class Creature extends Living{
}

View File

@ -1,29 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\entity;
interface Damageable{
}

View File

@ -72,7 +72,7 @@ use function strlen;
use const INT32_MAX;
use const INT32_MIN;
class Human extends Creature implements ProjectileSource, InventoryHolder{
class Human extends Living implements ProjectileSource, InventoryHolder{
/** @var PlayerInventory */
protected $inventory;

View File

@ -67,7 +67,7 @@ use function mt_rand;
use function sqrt;
use const M_PI;
abstract class Living extends Entity implements Damageable{
abstract class Living extends Entity{
protected $gravity = 0.08;
protected $drag = 0.02;

View File

@ -1,29 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\entity;
abstract class Monster extends Creature{
}

View File

@ -1,29 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\entity;
interface NPC{
}

View File

@ -1,29 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\entity;
interface Rideable{
}

View File

@ -1,29 +0,0 @@
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* @author PocketMine Team
* @link http://www.pocketmine.net/
*
*
*/
declare(strict_types=1);
namespace pocketmine\entity;
abstract class Vehicle extends Entity implements Rideable{
}

View File

@ -27,7 +27,7 @@ use pocketmine\nbt\tag\CompoundTag;
use pocketmine\network\mcpe\protocol\types\EntityMetadataFlags;
use pocketmine\network\mcpe\protocol\types\EntityMetadataProperties;
class Villager extends Creature implements NPC, Ageable{
class Villager extends Living implements Ageable{
public const PROFESSION_FARMER = 0;
public const PROFESSION_LIBRARIAN = 1;
public const PROFESSION_PRIEST = 2;

View File

@ -26,7 +26,7 @@ namespace pocketmine\entity;
use pocketmine\event\entity\EntityDamageEvent;
use pocketmine\network\mcpe\protocol\types\EntityMetadataFlags;
abstract class WaterAnimal extends Creature implements Ageable{
abstract class WaterAnimal extends Living implements Ageable{
public function isBaby() : bool{
return $this->getGenericFlag(EntityMetadataFlags::BABY);

View File

@ -27,7 +27,7 @@ use pocketmine\item\Item;
use pocketmine\item\ItemFactory;
use function mt_rand;
class Zombie extends Monster{
class Zombie extends Living{
public const NETWORK_ID = self::ZOMBIE;
public $width = 0.6;