Skip to content

Commit

Permalink
added ticking entity problem
Browse files Browse the repository at this point in the history
  • Loading branch information
matthi4s committed Feb 26, 2019
1 parent f19dfef commit 957937c
Show file tree
Hide file tree
Showing 6 changed files with 1,194 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,7 @@
"mod-install-solution-with-version": "Install the mod '{{mod-name}}' with version {{mod-version}}.",
"mod-remove-solution": "Remove the mod '{{mod-name}}'.",
"aquatic-version-install-solution": "Update the server software to 1.13 or newer.",
"plugin-command-exception-problem": "The plugin '{{plugin-name}}' cannot execute the command '{{command}}'."
"plugin-command-exception-problem": "The plugin '{{plugin-name}}' cannot execute the command '{{command}}'.",
"ticking-block-entity-problem": "A block in the world is causing problems.",
"remove-block-solution": "Remove the block from the world, e.g. with MCEdit."
}
2 changes: 2 additions & 0 deletions src/Analyser/VanillaAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Aternos\Codex\Minecraft\Analysis\Information\Vanilla\VanillaVersionInformation;
use Aternos\Codex\Minecraft\Analysis\Problem\Vanilla\AquaticWorldOnOlderVersionProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Vanilla\OldPlayerDirectoryProblem;
use Aternos\Codex\Minecraft\Analysis\Problem\Vanilla\TickingBlockEntityProblem;

/**
* Class VanillaAnalyser
Expand All @@ -19,5 +20,6 @@ public function __construct()

$this->addPossibleInsightClass(OldPlayerDirectoryProblem::class);
$this->addPossibleInsightClass(AquaticWorldOnOlderVersionProblem::class);
$this->addPossibleInsightClass(TickingBlockEntityProblem::class);
}
}
50 changes: 50 additions & 0 deletions src/Analysis/Problem/Vanilla/TickingBlockEntityProblem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<?php

namespace Aternos\Codex\Minecraft\Analysis\Problem\Vanilla;

use Aternos\Codex\Minecraft\Analysis\Solution\File\FileDeleteSolution;
use Aternos\Codex\Minecraft\Analysis\Solution\Vanilla\BlockRemoveSolution;
use Aternos\Codex\Minecraft\Translator\Translator;

/**
* Class TickingBlockEntityProblem
*
* @package Aternos\Codex\Minecraft\Analysis\Problem\Vanilla
*/
class TickingBlockEntityProblem extends VanillaProblem
{
/**
* Get a human readable message
*
* @return string
*/
public function getMessage(): string
{
return Translator::getInstance()->getTranslation("ticking-block-entity-problem");
}

/**
* Get an array of possible patterns
*
* The array key of the pattern will be passed to setMatches()
*
* @return array
*/
public static function getPatterns(): array
{
return ['/Encountered an unexpected exception\n\s?net\.minecraft\.util\.ReportedException\: Ticking block entity/'];
}

/**
* Apply the matches from the pattern
*
* @param array $matches
* @param $patternKey
* @return mixed
*/
public function setMatches(array $matches, $patternKey)
{
$this->addSolution((new FileDeleteSolution())->setRelativePath("world"));
$this->addSolution((new BlockRemoveSolution()));
}
}
23 changes: 23 additions & 0 deletions src/Analysis/Solution/Vanilla/BlockRemoveSolution.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php

namespace Aternos\Codex\Minecraft\Analysis\Solution\Vanilla;

use Aternos\Codex\Minecraft\Translator\Translator;

/**
* Class BlockRemoveSolution
*
* @package Aternos\Codex\Minecraft\Analysis\Solution\Vanilla
*/
class BlockRemoveSolution extends VanillaSolution
{
/**
* Get the solution as a human readable message
*
* @return string
*/
public function getMessage(): string
{
return Translator::getInstance()->getTranslation("remove-block-solution");
}
}
55 changes: 55 additions & 0 deletions test/data/vanilla/vanilla-forge-ticking-entity.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
[16:20:04] [Server thread/INFO]: Starting minecraft server version 1.10.2
[16:21:57] [Server thread/INFO]: Loading properties
[16:21:57] [Server thread/INFO]: Default game type: SURVIVAL
[16:21:57] [Server thread/INFO]: Generating keypair
[16:21:57] [Server thread/INFO]: Starting Minecraft server on *:10272
[16:21:57] [Server thread/INFO]: Using epoll channel type
[16:22:34] [Server thread/INFO]: Preparing level "world"
[16:22:39] [Server thread/INFO]: Preparing start region for level 0
[16:22:41] [Server thread/INFO]: Preparing spawn area: 0%
[16:22:42] [Server thread/INFO]: Preparing spawn area: 8%
[16:22:43] [Server thread/INFO]: Preparing spawn area: 23%
[16:22:44] [Server thread/INFO]: Preparing spawn area: 37%
[16:22:45] [Server thread/INFO]: Preparing spawn area: 56%
[16:22:46] [Server thread/INFO]: Preparing spawn area: 71%
[16:22:47] [Server thread/INFO]: Preparing spawn area: 87%
[16:22:48] [Server thread/INFO]: Preparing spawn area: 98%
[16:22:48] [Server thread/INFO]: Done (14.532s)! For help, type "help" or "?"
[16:22:48] [Server thread/INFO]: Starting GS4 status listener
[16:22:48] [Query Listener #1/INFO]: Query running on **.**.**.**:10272
[16:23:01] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.util.ReportedException: Ticking block entity
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:715) ~[MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:387) ~[ld.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:613) ~[MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:471) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Caused by: java.lang.NoSuchMethodError: nc.tile.energy.TileEnergy.addTileToENet()V
at nc.tile.energy.TileEnergy.onAdded(TileEnergy.java:57) ~[TileEnergy.class:?]
at nc.tile.processor.TileEnergyItemProcessor.onAdded(TileEnergyItemProcessor.java:127) ~[TileEnergyItemProcessor.class:?]
at nc.tile.NCTile.func_73660_a(NCTile.java:25) ~[NCTile.class:?]
at nc.tile.energy.TileEnergy.func_73660_a(TileEnergy.java:46) ~[TileEnergy.class:?]
at nc.tile.processor.TileEnergyItemProcessor.func_73660_a(TileEnergyItemProcessor.java:72) ~[TileEnergyItemProcessor.class:?]
at net.minecraft.world.World.func_72939_s(World.java:1804) ~[aid.class:?]
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:620) ~[ls.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:709) ~[MinecraftServer.class:?]
... 4 more
[16:23:01] [Server thread/ERROR]: This crash report has been saved to: /aternos/server/./crash-reports/crash-2019-02-26_16.23.01-server.txt
[16:23:01] [Server thread/INFO]: Stopping server
[16:23:01] [Server thread/INFO]: Saving players
[16:23:01] [Server thread/INFO]: Saving worlds
[16:23:01] [Server thread/INFO]: Saving chunks for level 'world'/Overworld
[16:23:03] [Server thread/INFO]: Saving chunks for level 'world'/Nether
[16:23:03] [Server thread/INFO]: Saving chunks for level 'world'/The End
[16:23:03] [Server thread/INFO]: Saving chunks for level 'world'/Deep Dark
[16:23:03] [Server thread/INFO]: Saving chunks for level 'world'/ExtraUtils2_Quarry_Dim
[16:23:03] [Server thread/INFO]: Saving chunks for level 'world'/The Beneath
[16:23:03] [Server thread/INFO]: Saving chunks for level 'world'/Abyss
[16:23:03] [Server thread/INFO]: Saving chunks for level 'world'/The Dark Realm
[16:23:03] [Server thread/INFO]: Saving chunks for level 'world'/Omothol
[16:23:03] [Server thread/INFO]: Saving chunks for level 'world'/The Dreadlands
[16:23:03] [Server thread/INFO]: Saving chunks for level 'world'/The Abyssal Wasteland
[16:23:03] [Server thread/INFO]: Saving chunks for level 'world'/Overworld
[16:23:07] [Server Shutdown Thread/INFO]: Stopping server
[16:23:07] [Server Shutdown Thread/INFO]: Saving players
[16:23:07] [Server Shutdown Thread/INFO]: Saving worlds
Loading

0 comments on commit 957937c

Please sign in to comment.