Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash #98

Closed
xodamcm opened this issue May 16, 2022 · 2 comments
Closed

Crash #98

xodamcm opened this issue May 16, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@xodamcm
Copy link

xodamcm commented May 16, 2022

Player as put Piston and push block to Y = -1 (no bedrock at this emplacement)

Error: Pos x=2051,y=-1,z=7552 is outside of the world bounds
File: pmsrc/src/world/World
Line: 1617
Type: InvalidArgumentException
Backtrace:
#0 pmsrc/src/world/World(1604): pocketmine\world\World->setBlockAt(int 2051, int -1, int 7552, object tedo0627\redstonecircuit\block\mechanism\BlockMoving#331915, true)
#1 plugins/RedstoneCircuit_dev-83.phar/src/tedo0627/redstonecircuit/block/mechanism/BlockPiston(161): pocketmine\world\World->setBlock(object pocketmine\world\Position#486119, object tedo0627\redstonecircuit\block\mechanism\BlockMoving#331915)
#2 plugins/RedstoneCircuit_dev-83.phar/src/tedo0627/redstonecircuit/block/mechanism/BlockPiston(107): tedo0627\redstonecircuit\block\mechanism\BlockPiston->push()
#3 pmsrc/src/world/World(850): tedo0627\redstonecircuit\block\mechanism\BlockPiston->onScheduledUpdate()
#4 pmsrc/src/world/World(807): pocketmine\world\World->actuallyDoTick(int 39945)
#5 pmsrc/src/world/WorldManager(362): pocketmine\world\World->doTick(int 39945)
#6 pmsrc/src/Server(1776): pocketmine\world\WorldManager->tick(int 39945)
#7 pmsrc/src/Server(1658): pocketmine\Server->tick()
#8 pmsrc/src/Server(1047): pocketmine\Server->tickProcessor()
#9 pmsrc/src/PocketMine(304): pocketmine\Server->__construct(object BaseClassLoader#2, object pocketmine\utils\MainLogger#3, string[16] /home/container/, string[24] /home/container/plugins/)
#10 pmsrc/src/PocketMine(327): pocketmine\server()
#11 pmsrc(11): require(string[60] phar:///home/container/PocketMine-MP.phar/src/PocketMine.php)

Code:
[1608] * Sets the block at the given coordinates.
[1609] *
[1610] * If $update is true, it'll get the neighbour blocks (6 sides) and update them, and also update local lighting.
[1611] * If you are doing big changes, you might want to set this to false, then update manually.
[1612] *
[1613] * @throws \InvalidArgumentException if the position is out of the world bounds
[1614] */
[1615] public function setBlockAt(int $x, int $y, int $z, Block $block, bool $update = true) : void{
[1616] if(!$this->isInWorld($x, $y, $z)){
[1617] throw new \InvalidArgumentException("Pos x=$x,y=$y,z=$z is outside of the world bounds");
[1618] }
[1619] $chunkX = $x >> Chunk::COORD_BIT_SIZE;
[1620] $chunkZ = $z >> Chunk::COORD_BIT_SIZE;
[1621] if($this->loadChunk($chunkX, $chunkZ) === null){ //current expected behaviour is to try to load the terrain synchronously
[1622] throw new WorldException("Cannot set a block in un-generated terrain");
[1623] }
[1624]
[1625] $this->timings->setBlock->startTiming();
[1626]
[1627] $this->unlockChunk($chunkX, $chunkZ, null);

@tedo0627 tedo0627 added the bug Something isn't working label May 18, 2022
tedo0627 added a commit that referenced this issue May 18, 2022
@tedo0627
Copy link
Owner

I have fixed it.
Thank you.

@xodamcm
Copy link
Author

xodamcm commented May 18, 2022

Thank you to !! 😁

@tedo0627 tedo0627 mentioned this issue Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants