Remove more unnecessary local static variable usages

these are never mutated. Local constants would be better, if we had those.
This commit is contained in:
Dylan K. Taylor 2022-09-02 19:19:04 +01:00
parent 66cd156d80
commit f88c4d9a8c
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
2 changed files with 3 additions and 3 deletions

View File

@ -72,7 +72,7 @@ class Cactus extends Transparent{
* @return AxisAlignedBB[] * @return AxisAlignedBB[]
*/ */
protected function recalculateCollisionBoxes() : array{ protected function recalculateCollisionBoxes() : array{
static $shrinkSize = 1 / 16; $shrinkSize = 1 / 16;
return [AxisAlignedBB::one()->contract($shrinkSize, 0, $shrinkSize)->trim(Facing::UP, $shrinkSize)]; return [AxisAlignedBB::one()->contract($shrinkSize, 0, $shrinkSize)->trim(Facing::UP, $shrinkSize)];
} }

View File

@ -237,8 +237,8 @@ class ExperienceManager{
} }
public function onPickupXp(int $xpValue) : void{ public function onPickupXp(int $xpValue) : void{
static $mainHandIndex = -1; $mainHandIndex = -1;
static $offHandIndex = -2; $offHandIndex = -2;
//TODO: replace this with a more generic equipment getting/setting interface //TODO: replace this with a more generic equipment getting/setting interface
/** @var Durable[] $equipment */ /** @var Durable[] $equipment */