diff --git a/src/pocketmine/Player.php b/src/pocketmine/Player.php index b2c82a9a7..6431af329 100644 --- a/src/pocketmine/Player.php +++ b/src/pocketmine/Player.php @@ -68,7 +68,6 @@ use pocketmine\inventory\PlayerInventory; use pocketmine\inventory\SimpleTransactionGroup; use pocketmine\inventory\StonecutterShapelessRecipe; -use pocketmine\item\Armor; use pocketmine\item\Item; use pocketmine\level\format\FullChunk; use pocketmine\level\format\LevelProvider; @@ -1983,7 +1982,6 @@ public function handleDataPacket(DataPacket $packet){ EntityDamageEvent::MODIFIER_BASE => isset($damageTable[$item->getId()]) ? $damageTable[$item->getId()] : 1, ]; - $points = 0; if($this->distance($target) > 8){ $cancelled = true; }elseif($target instanceof Player){ @@ -1993,7 +1991,34 @@ public function handleDataPacket(DataPacket $packet){ $cancelled = true; } - $points = $target->getInventory()->getArmorPoints(); + $armorValues = [ + Item::LEATHER_CAP => 1, + Item::LEATHER_TUNIC => 3, + Item::LEATHER_PANTS => 2, + Item::LEATHER_BOOTS => 1, + Item::CHAIN_HELMET => 1, + Item::CHAIN_CHESTPLATE => 5, + Item::CHAIN_LEGGINGS => 4, + Item::CHAIN_BOOTS => 1, + Item::GOLD_HELMET => 1, + Item::GOLD_CHESTPLATE => 5, + Item::GOLD_LEGGINGS => 3, + Item::GOLD_BOOTS => 1, + Item::IRON_HELMET => 2, + Item::IRON_CHESTPLATE => 6, + Item::IRON_LEGGINGS => 5, + Item::IRON_BOOTS => 2, + Item::DIAMOND_HELMET => 3, + Item::DIAMOND_CHESTPLATE => 8, + Item::DIAMOND_LEGGINGS => 6, + Item::DIAMOND_BOOTS => 3, + ]; + $points = 0; + foreach($target->getInventory()->getArmorContents() as $index => $i){ + if(isset($armorValues[$i->getId()])){ + $points += $armorValues[$i->getId()]; + } + } $damage[EntityDamageEvent::MODIFIER_ARMOR] = -floor($damage[EntityDamageEvent::MODIFIER_BASE] * $points * 0.04); } @@ -2021,6 +2046,7 @@ public function handleDataPacket(DataPacket $packet){ } } + break; case ProtocolInfo::ANIMATE_PACKET: if($this->spawned === false or $this->dead === true){ @@ -2662,24 +2688,8 @@ public function attack($damage, $source = EntityDamageEvent::CAUSE_MAGIC){ parent::attack($damage, $source); - if($source instanceof EntityDamageEvent){ - if($source->isCancelled()){ - return; - } - if($source->getDamage(EntityDamageEvent::MODIFIER_ARMOR) > 0){ - for($i = 0; $i < 4; $i++){ - $piece = $this->getInventory()->getArmorItem($i); - if($piece instanceof Armor){ - $damage = $piece->getDamage(); - if($damage >= $piece->getMaxDurability()){ - $this->getInventory()->setArmorItem($i, Item::get(Item::AIR)); - }else{ - $piece->setDamage($damage + 1); - $this->getInventory()->setArmorItem($i, $piece); - } - } - } - } + if($source instanceof EntityDamageEvent and $source->isCancelled()){ + return; } if($this->getLastDamageCause() === $source){ @@ -2688,8 +2698,6 @@ public function attack($damage, $source = EntityDamageEvent::CAUSE_MAGIC){ $pk->event = 2; $this->dataPacket($pk); } - - } public function getData(){ //TODO diff --git a/src/pocketmine/block/Cactus.php b/src/pocketmine/block/Cactus.php index 2f8426eda..54dec6193 100644 --- a/src/pocketmine/block/Cactus.php +++ b/src/pocketmine/block/Cactus.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -25,8 +25,6 @@ use pocketmine\event\block\BlockGrowEvent; use pocketmine\event\entity\EntityDamageByBlockEvent; use pocketmine\event\entity\EntityDamageEvent; -use pocketmine\inventory\InventoryHolder; -use pocketmine\inventory\PlayerInventory; use pocketmine\item\Item; use pocketmine\level\Level; use pocketmine\math\AxisAlignedBB; @@ -67,14 +65,7 @@ protected function recalculateBoundingBox(){ } public function onEntityCollide(Entity $entity){ - $damage = [EntityDamageEvent::MODIFIER_BASE => 1]; - if($entity instanceof InventoryHolder){ - $inventory = $entity->getInventory(); - if($inventory instanceof PlayerInventory){ - $damage[EntityDamageEvent::MODIFIER_ARMOR] = $inventory->getArmorPoints(); - } - } - $ev = new EntityDamageByBlockEvent($this, $entity, EntityDamageEvent::CAUSE_CONTACT, $damage); + $ev = new EntityDamageByBlockEvent($this, $entity, EntityDamageEvent::CAUSE_CONTACT, 1); $entity->attack($ev->getFinalDamage(), $ev); } @@ -137,4 +128,4 @@ public function getDrops(Item $item){ [$this->id, 0, 1], ]; } -} +} \ No newline at end of file diff --git a/src/pocketmine/block/Fire.php b/src/pocketmine/block/Fire.php index 89767345c..28eb20635 100644 --- a/src/pocketmine/block/Fire.php +++ b/src/pocketmine/block/Fire.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -25,8 +25,6 @@ use pocketmine\event\entity\EntityCombustByBlockEvent; use pocketmine\event\entity\EntityDamageByBlockEvent; use pocketmine\event\entity\EntityDamageEvent; -use pocketmine\inventory\InventoryHolder; -use pocketmine\inventory\PlayerInventory; use pocketmine\item\Item; use pocketmine\level\Level; use pocketmine\Server; @@ -60,14 +58,7 @@ public function canBeReplaced(){ } public function onEntityCollide(Entity $entity){ - $damage = [EntityDamageEvent::MODIFIER_BASE => 1]; - if($entity instanceof InventoryHolder){ - $inventory = $entity->getInventory(); - if($inventory instanceof PlayerInventory){ - $damage[EntityDamageEvent::MODIFIER_ARMOR] = $inventory->getArmorPoints(); - } - } - $ev = new EntityDamageByBlockEvent($this, $entity, EntityDamageEvent::CAUSE_FIRE, $damage); + $ev = new EntityDamageByBlockEvent($this, $entity, EntityDamageEvent::CAUSE_FIRE, 1); $entity->attack($ev->getFinalDamage(), $ev); $ev = new EntityCombustByBlockEvent($this, $entity, 8); @@ -103,4 +94,4 @@ public function onUpdate($type){ return false; } -} +} \ No newline at end of file diff --git a/src/pocketmine/block/Lava.php b/src/pocketmine/block/Lava.php index 972e67432..5c1db3993 100644 --- a/src/pocketmine/block/Lava.php +++ b/src/pocketmine/block/Lava.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -25,8 +25,6 @@ use pocketmine\event\entity\EntityCombustByBlockEvent; use pocketmine\event\entity\EntityDamageByBlockEvent; use pocketmine\event\entity\EntityDamageEvent; -use pocketmine\inventory\InventoryHolder; -use pocketmine\inventory\PlayerInventory; use pocketmine\item\Item; use pocketmine\Player; use pocketmine\Server; @@ -53,14 +51,7 @@ public function getHardness(){ public function onEntityCollide(Entity $entity){ $entity->fallDistance *= 0.5; - $damage = [EntityDamageEvent::MODIFIER_BASE => 1]; - if($entity instanceof InventoryHolder){ - $inventory = $entity->getInventory(); - if($inventory instanceof PlayerInventory){ - $damage[EntityDamageEvent::MODIFIER_ARMOR] = $inventory->getArmorPoints(); - } - } - $ev = new EntityDamageByBlockEvent($this, $entity, EntityDamageEvent::CAUSE_LAVA, $damage); + $ev = new EntityDamageByBlockEvent($this, $entity, EntityDamageEvent::CAUSE_LAVA, 4); $entity->attack($ev->getFinalDamage(), $ev); $ev = new EntityCombustByBlockEvent($this, $entity, 15); diff --git a/src/pocketmine/entity/Entity.php b/src/pocketmine/entity/Entity.php index 8e6228cb7..0e72eb431 100644 --- a/src/pocketmine/entity/Entity.php +++ b/src/pocketmine/entity/Entity.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -33,8 +33,6 @@ use pocketmine\event\entity\EntitySpawnEvent; use pocketmine\event\entity\EntityTeleportEvent; use pocketmine\event\Timings; -use pocketmine\inventory\InventoryHolder; -use pocketmine\inventory\PlayerInventory; use pocketmine\level\format\Chunk; use pocketmine\level\format\FullChunk; use pocketmine\level\Level; @@ -737,13 +735,6 @@ public function getBoundingBox(){ public function fall($fallDistance){ $damage = floor($fallDistance - 3); if($damage > 0){ - $damage = [EntityDamageEvent::MODIFIER_BASE => $damage]; - if($this instanceof InventoryHolder){ - $inventory = $this->getInventory(); - if($inventory instanceof PlayerInventory){ - $damage[EntityDamageEvent::MODIFIER_ARMOR] = $inventory->getArmorPoints(); - } - } $ev = new EntityDamageEvent($this, EntityDamageEvent::CAUSE_FALL, $damage); $this->attack($ev->getFinalDamage(), $ev); } diff --git a/src/pocketmine/entity/Living.php b/src/pocketmine/entity/Living.php index 334b4c01e..c6714acb2 100644 --- a/src/pocketmine/entity/Living.php +++ b/src/pocketmine/entity/Living.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -28,8 +28,6 @@ use pocketmine\event\entity\EntityDeathEvent; use pocketmine\event\entity\EntityRegainHealthEvent; use pocketmine\event\Timings; -use pocketmine\inventory\InventoryHolder; -use pocketmine\inventory\PlayerInventory; use pocketmine\item\Item as ItemItem; use pocketmine\math\Vector3; use pocketmine\nbt\tag\Short; @@ -170,14 +168,7 @@ public function entityBaseTick($tickDiff = 1){ if($this->dead !== true and $this->isInsideOfSolid()){ $hasUpdate = true; - $damage = [EntityDamageEvent::MODIFIER_BASE => 1]; - if($this instanceof InventoryHolder){ - $inventory = $this->getInventory(); - if($inventory instanceof PlayerInventory){ - $damage[EntityDamageEvent::MODIFIER_ARMOR] = $inventory; - } - } - $ev = new EntityDamageEvent($this, EntityDamageEvent::CAUSE_SUFFOCATION, $damage); + $ev = new EntityDamageEvent($this, EntityDamageEvent::CAUSE_SUFFOCATION, 1); $this->attack($ev->getFinalDamage(), $ev); } @@ -187,14 +178,7 @@ public function entityBaseTick($tickDiff = 1){ if($this->airTicks <= -20){ $this->airTicks = 0; - $damage = [EntityDamageEvent::MODIFIER_BASE => 2]; - if($this instanceof InventoryHolder){ - $inventory = $this->getInventory(); - if($inventory instanceof PlayerInventory){ - $damage[EntityDamageEvent::MODIFIER_ARMOR] = $inventory->getArmorPoints(); - } - } - $ev = new EntityDamageEvent($this, EntityDamageEvent::CAUSE_DROWNING, $damage); + $ev = new EntityDamageEvent($this, EntityDamageEvent::CAUSE_DROWNING, 2); $this->attack($ev->getFinalDamage(), $ev); } }else{ diff --git a/src/pocketmine/entity/Projectile.php b/src/pocketmine/entity/Projectile.php index 83649028f..c155f7b73 100644 --- a/src/pocketmine/entity/Projectile.php +++ b/src/pocketmine/entity/Projectile.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -24,11 +24,10 @@ use pocketmine\event\entity\EntityCombustByEntityEvent; use pocketmine\event\entity\EntityDamageByChildEntityEvent; +use pocketmine\event\entity\EntityDamageByEntityEvent; use pocketmine\event\entity\EntityDamageEvent; use pocketmine\event\entity\EntityRegainHealthEvent; use pocketmine\event\entity\ProjectileHitEvent; -use pocketmine\inventory\InventoryHolder; -use pocketmine\inventory\PlayerInventory; use pocketmine\level\MovingObjectPosition; use pocketmine\math\Vector3; use pocketmine\nbt\tag\Short; @@ -137,22 +136,15 @@ public function onUpdate($currentTick){ $this->server->getPluginManager()->callEvent(new ProjectileHitEvent($this)); $motion = sqrt($this->motionX ** 2 + $this->motionY ** 2 + $this->motionZ ** 2); - $damage = [EntityDamageEvent::MODIFIER_BASE => ceil($motion * $this->damage)]; - $hit = $movingObjectPosition->entityHit; - if($hit instanceof InventoryHolder){ - $inventory = $hit->getInventory(); - if($inventory instanceof PlayerInventory){ - $damage[EntityDamageEvent::MODIFIER_ARMOR] = $inventory->getArmorPoints(); - } - } + $damage = ceil($motion * $this->damage); if($this->shootingEntity === null){ - $ev = new EntityDamageEvent($this, EntityDamageEvent::CAUSE_PROJECTILE, $damage); + $ev = new EntityDamageByEntityEvent($this, $movingObjectPosition->entityHit, EntityDamageEvent::CAUSE_PROJECTILE, $damage); }else{ - $ev = new EntityDamageByChildEntityEvent($this->shootingEntity, $this, $hit, EntityDamageEvent::CAUSE_PROJECTILE, $damage); + $ev = new EntityDamageByChildEntityEvent($this->shootingEntity, $this, $movingObjectPosition->entityHit, EntityDamageEvent::CAUSE_PROJECTILE, $damage); } - $hit->attack($ev->getFinalDamage(), $ev); + $movingObjectPosition->entityHit->attack($ev->getFinalDamage(), $ev); if($this->fireTicks > 0){ @@ -196,4 +188,4 @@ public function onUpdate($currentTick){ return $hasUpdate; } -} +} \ No newline at end of file diff --git a/src/pocketmine/event/entity/EntityDamageByBlockEvent.php b/src/pocketmine/event/entity/EntityDamageByBlockEvent.php index acb3c3175..bb4075d76 100644 --- a/src/pocketmine/event/entity/EntityDamageByBlockEvent.php +++ b/src/pocketmine/event/entity/EntityDamageByBlockEvent.php @@ -49,4 +49,4 @@ public function getDamager(){ } -} +} \ No newline at end of file diff --git a/src/pocketmine/inventory/PlayerInventory.php b/src/pocketmine/inventory/PlayerInventory.php index 3e48dc96d..83cc156ec 100644 --- a/src/pocketmine/inventory/PlayerInventory.php +++ b/src/pocketmine/inventory/PlayerInventory.php @@ -25,7 +25,6 @@ use pocketmine\event\entity\EntityArmorChangeEvent; use pocketmine\event\entity\EntityInventoryChangeEvent; use pocketmine\event\player\PlayerItemHeldEvent; -use pocketmine\item\Armor; use pocketmine\item\Item; use pocketmine\network\protocol\ContainerSetContentPacket; use pocketmine\network\protocol\ContainerSetSlotPacket; @@ -300,15 +299,6 @@ public function getArmorContents(){ return $armor; } - public function getArmorPoints(){ - $points = 0; - foreach($this->getArmorContents() as $i){ - if($i instanceof Armor){ - $points += $i->getArmorPoints(); - } - } - return $points; - } public function clearAll(){ $limit = $this->getSize() + 4; for($index = 0; $index < $limit; ++$index){ @@ -483,4 +473,4 @@ public function getHolder(){ return parent::getHolder(); } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/Armor.php b/src/pocketmine/item/Armor.php index e11fbe219..af5264fbf 100644 --- a/src/pocketmine/item/Armor.php +++ b/src/pocketmine/item/Armor.php @@ -27,8 +27,4 @@ abstract class Armor extends Item{ public function getMaxStackSize(){ return 1; } - /** - * @return int - */ - public abstract function getArmorPoints(); -} +} \ No newline at end of file diff --git a/src/pocketmine/item/ChainBoots.php b/src/pocketmine/item/ChainBoots.php index eca96ca5d..bd5cc6a2b 100644 --- a/src/pocketmine/item/ChainBoots.php +++ b/src/pocketmine/item/ChainBoots.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class ChainBoots extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::CHAIN_BOOTS, $meta, $count, "Chainmail Boots"); } - public function getArmorPoints(){ - return 1; - } - public function getMaxDurability(){ - return 196; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/ChainChestplate.php b/src/pocketmine/item/ChainChestplate.php index 20668e180..6037ef957 100644 --- a/src/pocketmine/item/ChainChestplate.php +++ b/src/pocketmine/item/ChainChestplate.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class ChainChestplate extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::CHAIN_CHESTPLATE, $meta, $count, "Chain Chestplate"); } - public function getArmorPoints(){ - return 5; - } - public function getMaxDurability(){ - return 241; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/ChainHelmet.php b/src/pocketmine/item/ChainHelmet.php index 36f8898a4..3455ab088 100644 --- a/src/pocketmine/item/ChainHelmet.php +++ b/src/pocketmine/item/ChainHelmet.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class ChainHelmet extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::CHAIN_HELMET, $meta, $count, "Chainmail Helmet"); } - public function getArmorPoints(){ - return 2; - } - public function getMaxDurability(){ - return 166; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/ChainLeggings.php b/src/pocketmine/item/ChainLeggings.php index 53e98addf..b005c7aff 100644 --- a/src/pocketmine/item/ChainLeggings.php +++ b/src/pocketmine/item/ChainLeggings.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class ChainLeggings extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::CHAIN_LEGGINGS, $meta, $count, "Chain Leggings"); } - public function getArmorPoints(){ - return 3; - } - public function getMaxDurability(){ - return 226; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/DiamondBoots.php b/src/pocketmine/item/DiamondBoots.php index 3b2f031da..cabd1d6a7 100644 --- a/src/pocketmine/item/DiamondBoots.php +++ b/src/pocketmine/item/DiamondBoots.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class DiamondBoots extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::DIAMOND_BOOTS, $meta, $count, "Diamond Boots"); } - public function getArmorPoints(){ - return 3; - } - public function getMaxDurability(){ - return 430; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/DiamondChestplate.php b/src/pocketmine/item/DiamondChestplate.php index 080f9d6da..61e3e1659 100644 --- a/src/pocketmine/item/DiamondChestplate.php +++ b/src/pocketmine/item/DiamondChestplate.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class DiamondChestplate extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::DIAMOND_CHESTPLATE, $meta, $count, "Diamond Chestplate"); } - public function getArmorPoints(){ - return 8; - } - public function getMaxDurability(){ - return 529; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/DiamondHelmet.php b/src/pocketmine/item/DiamondHelmet.php index cd42dd712..d884b2ae9 100644 --- a/src/pocketmine/item/DiamondHelmet.php +++ b/src/pocketmine/item/DiamondHelmet.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class DiamondHelmet extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::DIAMOND_HELMET, $meta, $count, "Diamond Helmet"); } - public function getArmorPoints(){ - return 3; - } - public function getMaxDurability(){ - return 364; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/DiamondLeggings.php b/src/pocketmine/item/DiamondLeggings.php index 5aab5e97b..abb772376 100644 --- a/src/pocketmine/item/DiamondLeggings.php +++ b/src/pocketmine/item/DiamondLeggings.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class DiamondLeggings extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::DIAMOND_LEGGINGS, $meta, $count, "Diamond Leggings"); } - public function getArmorPoints(){ - return 6; - } - public function getMaxDurability(){ - return 496; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/GoldBoots.php b/src/pocketmine/item/GoldBoots.php index 17677ff5b..7f10dd509 100644 --- a/src/pocketmine/item/GoldBoots.php +++ b/src/pocketmine/item/GoldBoots.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class GoldBoots extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::GOLD_BOOTS, $meta, $count, "Gold Boots"); } - public function getArmorPoints(){ - return 1; - } - public function getMaxDurability(){ - return 92; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/GoldChestplate.php b/src/pocketmine/item/GoldChestplate.php index d6051d74e..262994965 100644 --- a/src/pocketmine/item/GoldChestplate.php +++ b/src/pocketmine/item/GoldChestplate.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class GoldChestplate extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::GOLD_CHESTPLATE, $meta, $count, "Gold Chestplate"); } - public function getArmorPoints(){ - return 5; - } - public function getMaxDurability(){ - return 113; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/GoldHelmet.php b/src/pocketmine/item/GoldHelmet.php index 9255a886e..e54d1b44a 100644 --- a/src/pocketmine/item/GoldHelmet.php +++ b/src/pocketmine/item/GoldHelmet.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class GoldHelmet extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::GOLD_HELMET, $meta, $count, "Gold Helmet"); } - public function getArmorPoints(){ - return 2; - } - public function getMaxDurability(){ - return 78; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/GoldLeggings.php b/src/pocketmine/item/GoldLeggings.php index 439c62635..f7eabe43e 100644 --- a/src/pocketmine/item/GoldLeggings.php +++ b/src/pocketmine/item/GoldLeggings.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class GoldLeggings extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::GOLD_LEGGINGS, $meta, $count, "Gold Leggings"); } - public function getArmorPoints(){ - return 3; - } - public function getMaxDurability(){ - return 106; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/IronBoots.php b/src/pocketmine/item/IronBoots.php index 2bcb03090..370bd635e 100644 --- a/src/pocketmine/item/IronBoots.php +++ b/src/pocketmine/item/IronBoots.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class IronBoots extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::IRON_BOOTS, $meta, $count, "Iron Boots"); } - public function getArmorPoints(){ - return 2; - } - public function getMaxDurability(){ - return 196; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/IronChestplate.php b/src/pocketmine/item/IronChestplate.php index 55e13a3b7..1a485229a 100644 --- a/src/pocketmine/item/IronChestplate.php +++ b/src/pocketmine/item/IronChestplate.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class IronChestplate extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::IRON_CHESTPLATE, $meta, $count, "Iron Chestplate"); } - public function getArmorPoints(){ - return 6; - } - public function getMaxDurability(){ - return 241; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/IronHelmet.php b/src/pocketmine/item/IronHelmet.php index 3848f5ce4..eb1fbbd0f 100644 --- a/src/pocketmine/item/IronHelmet.php +++ b/src/pocketmine/item/IronHelmet.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class IronHelmet extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::IRON_HELMET, $meta, $count, "Iron Helmet"); } - public function getArmorPoints(){ - return 2; - } - public function getMaxDurability(){ - return 166; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/IronLeggings.php b/src/pocketmine/item/IronLeggings.php index 211a27697..5d99d1d20 100644 --- a/src/pocketmine/item/IronLeggings.php +++ b/src/pocketmine/item/IronLeggings.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class IronLeggings extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::IRON_LEGGINGS, $meta, $count, "Iron Leggings"); } - public function getArmorPoints(){ - return 5; - } - public function getMaxDurability(){ - return 226; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/LeatherBoots.php b/src/pocketmine/item/LeatherBoots.php index a72656c28..2a7b1816c 100644 --- a/src/pocketmine/item/LeatherBoots.php +++ b/src/pocketmine/item/LeatherBoots.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class LeatherBoots extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::LEATHER_BOOTS, $meta, $count, "Leather Boots"); } - public function getArmorPoints(){ - return 1; - } - public function getMaxDurability(){ - return 66; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/LeatherCap.php b/src/pocketmine/item/LeatherCap.php index c3ff7392a..4179b7725 100644 --- a/src/pocketmine/item/LeatherCap.php +++ b/src/pocketmine/item/LeatherCap.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class LeatherCap extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::LEATHER_CAP, $meta, $count, "Leather Cap"); } - public function getArmorPoints(){ - return 1; - } - public function getMaxDurability(){ - return 56; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/LeatherPants.php b/src/pocketmine/item/LeatherPants.php index 3c300c3e0..98e65c09e 100644 --- a/src/pocketmine/item/LeatherPants.php +++ b/src/pocketmine/item/LeatherPants.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class LeatherPants extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::LEATHER_PANTS, $meta, $count, "Leather Pants"); } - public function getArmorPoints(){ - return 2; - } - public function getMaxDurability(){ - return 76; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/item/LeatherTunic.php b/src/pocketmine/item/LeatherTunic.php index 4c9d47c69..af4d18259 100644 --- a/src/pocketmine/item/LeatherTunic.php +++ b/src/pocketmine/item/LeatherTunic.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -26,10 +26,4 @@ class LeatherTunic extends Armor{ public function __construct($meta = 0, $count = 1){ parent::__construct(self::LEATHER_TUNIC, $meta, $count, "Leather Tunic"); } - public function getArmorPoints(){ - return 3; - } - public function getMaxDurability(){ - return 81; - } -} +} \ No newline at end of file diff --git a/src/pocketmine/level/Explosion.php b/src/pocketmine/level/Explosion.php index a3608dda2..c2c4603ad 100644 --- a/src/pocketmine/level/Explosion.php +++ b/src/pocketmine/level/Explosion.php @@ -2,11 +2,11 @@ /* * - * ____ _ _ __ __ _ __ __ ____ - * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ + * ____ _ _ __ __ _ __ __ ____ + * | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \ * | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) | - * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ - * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| + * | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/ + * |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_| * * 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 @@ -15,7 +15,7 @@ * * @author PocketMine Team * @link http://www.pocketmine.net/ - * + * * */ @@ -27,8 +27,6 @@ use pocketmine\event\entity\EntityDamageByEntityEvent; use pocketmine\event\entity\EntityDamageEvent; use pocketmine\event\entity\EntityExplodeEvent; -use pocketmine\inventory\InventoryHolder; -use pocketmine\inventory\PlayerInventory; use pocketmine\item\Item; use pocketmine\math\AxisAlignedBB; use pocketmine\math\Math; @@ -163,13 +161,7 @@ public function explodeB(){ $impact = (1 - $distance) * ($exposure = 1); - $damage = [EntityDamageEvent::MODIFIER_BASE => (int) ((($impact * $impact + $impact) / 2) * 8 * $explosionSize + 1)]; - if($entity instanceof InventoryHolder){ - $inventory = $entity->getInventory(); - if($inventory instanceof PlayerInventory){ - $damage[EntityDamageEvent::MODIFIER_ARMOR] = $inventory->getArmorPoints(); - } - } + $damage = (int) ((($impact * $impact + $impact) / 2) * 8 * $explosionSize + 1); if($this->what instanceof Entity){ $ev = new EntityDamageByEntityEvent($this->what, $entity, EntityDamageEvent::CAUSE_ENTITY_EXPLOSION, $damage);