Skip to content

Commit

Permalink
Merge pull request #27 from rico132/Entity-Type
Browse files Browse the repository at this point in the history
add type property to ticking entity problem and solution
  • Loading branch information
matthi4s authored Jul 20, 2022
2 parents 63c4dc8 + 398a0a4 commit d96240f
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Analysis/Problem/CrashReport/TickingEntityProblem.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ public function setMatches(array $matches, $patternKey): void
protected function updateSolution(): void
{
$this->solutions[0]->setName($this->getName());
$this->solutions[0]->setType($this->getType());
$this->solutions[0]->setLocationX($this->getLocationX());
$this->solutions[0]->setLocationY($this->getLocationY());
$this->solutions[0]->setLocationZ($this->getLocationZ());
Expand Down
17 changes: 17 additions & 0 deletions src/Analysis/Solution/CrashReport/RemoveEntitySolution.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class RemoveEntitySolution extends CrashReportSolution
{
protected ?string $name;
protected ?string $type;
protected ?float $locationX;
protected ?float $locationY;
protected ?float $locationZ;
Expand Down Expand Up @@ -40,6 +41,22 @@ public function setName(?string $name): RemoveEntitySolution
return $this;
}

/**
* @return string|null
*/
public function getType(): ?string
{
return $this->type;
}

/**
* @param string|null $type
*/
public function setType(?string $type): void
{
$this->type = $type;
}

/**
* @return float|null
*/
Expand Down
1 change: 1 addition & 0 deletions test/tests/auto/CrashReports/Forge1165Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -2925,6 +2925,7 @@ public function testParseAndAnalyse(): void
[0] => Aternos\Codex\Minecraft\Analysis\Solution\CrashReport\RemoveEntitySolution Object
(
[name:protected] => Drowned
[type:protected] => minecraft:drowned
[locationX:protected] => 78.5
[locationY:protected] => 50
[locationZ:protected] => 50.5
Expand Down
1 change: 1 addition & 0 deletions test/tests/auto/CrashReports/ForgeCrashReportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2545,6 +2545,7 @@ public function testParseAndAnalyse(): void
[0] => Aternos\Codex\Minecraft\Analysis\Solution\CrashReport\RemoveEntitySolution Object
(
[name:protected] => item.item.spruceseed
[type:protected] => Item
[locationX:protected] => -37.8
[locationY:protected] => 106
[locationZ:protected] => 82.88
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6060,6 +6060,7 @@ public function testParseAndAnalyse(): void
[0] => Aternos\Codex\Minecraft\Analysis\Solution\CrashReport\RemoveEntitySolution Object
(
[name:protected] => Illager Minion
[type:protected] => village_employment:illager_minion
[locationX:protected] => 439
[locationY:protected] => 71.94
[locationZ:protected] => 91
Expand Down

0 comments on commit d96240f

Please sign in to comment.