mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-25 14:57:08 +00:00
fix PHPstan
This commit is contained in:
parent
e4f979dadf
commit
44c3e03598
@ -56,6 +56,8 @@ class ArmorMaterial{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the items that can be used to repair the armor
|
* Returns the items that can be used to repair the armor
|
||||||
|
*
|
||||||
|
* @return int[]
|
||||||
*/
|
*/
|
||||||
public function getRepairMaterials() : array{
|
public function getRepairMaterials() : array{
|
||||||
return $this->repairMaterials;
|
return $this->repairMaterials;
|
||||||
|
@ -427,7 +427,7 @@ class Item implements \JsonSerializable{
|
|||||||
$tag->removeTag(self::TAG_KEEP_ON_DEATH);
|
$tag->removeTag(self::TAG_KEEP_ON_DEATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->repairCost){
|
if($this->repairCost > 0){
|
||||||
$tag->setInt(self::TAG_REPAIR_COST, $this->repairCost);
|
$tag->setInt(self::TAG_REPAIR_COST, $this->repairCost);
|
||||||
}else{
|
}else{
|
||||||
$tag->removeTag(self::TAG_REPAIR_COST);
|
$tag->removeTag(self::TAG_REPAIR_COST);
|
||||||
|
@ -51,6 +51,7 @@ enum ToolTier{
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This function exists only to permit the use of named arguments and to make the code easier to read in PhpStorm.
|
* This function exists only to permit the use of named arguments and to make the code easier to read in PhpStorm.
|
||||||
|
* @param int[] $repairMaterials The typeId of the items that can be used to repair this tool in the anvil.
|
||||||
* @phpstan-return TMetadata
|
* @phpstan-return TMetadata
|
||||||
*/
|
*/
|
||||||
private static function meta(int $harvestLevel, int $maxDurability, int $baseAttackPoints, int $baseEfficiency, int $enchantability, array $repairMaterials = []) : array{
|
private static function meta(int $harvestLevel, int $maxDurability, int $baseAttackPoints, int $baseEfficiency, int $enchantability, array $repairMaterials = []) : array{
|
||||||
@ -112,7 +113,7 @@ enum ToolTier{
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the list of items that can be used to repair this tool.
|
* Returns the typeId of items that can be used to repair this tool in the anvil.
|
||||||
*
|
*
|
||||||
* @return int[]
|
* @return int[]
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user