PocketMine / PocketMine-MP

Legacy PocketMine-MP repository. Head to https://github.com/pmmp for up to date software.
https://www.pocketmine.net/
GNU Lesser General Public License v3.0
1.26k stars 660 forks source link

My server restart itself when i enter to a PC ported map #4287

Closed RocoWayne closed 8 years ago

RocoWayne commented 8 years ago

Issue description

When i enter to a map in my server it reset itself.

Steps to reproduce the issue

  1. I tp from hub to a map with /mw tp MAPNAME

    OS and versions

PocketMine-MP Crash Dump Mon Sep 19 15:20:13 UTC 2016

Error: Argument 1 passed to pocketmine\item\Item::get() must be of the type integer, string given, called in /opt/minecraft/multicraft/servers/druocco/repo-git/src/server/src/pocketmine/nbt/NBT__64bit.php on line 121 File: /repo-git/src/server/src/pocketmine/item/Item Line: 695 Type: notice

Code: [686] foreach(Item::$creative as $i => $d){ [687] if($item->equals($d, !$item->isTool())){ [688] return $i; [689] } [690] } [691] [692] return -1; [693] } [694] [695] public static function get(int $id, $meta = 0, int $count = 1, $tags = "") : Item{ [696] try{ [697] $class = self::$list[$id]; [698] if($class === \null){ [699] return (new Item($id, $meta, $count))->setCompoundTag($tags); [700] }elseif($id < 256){ [701] return (new ItemBlock(new $class($meta), $meta, $count))->setCompoundTag($tags); [702] }else{ [703] return (new $class($meta, $count))->setCompoundTag($tags); [704] } [705] }catch(\RuntimeException $e){

Backtrace:

0 /repo-git/src/server/src/pocketmine/entity/Item(83): pocketmine\nbt\NBT::getItemHelper(pocketmine\nbt\tag\CompoundTag pocketmine\nbt\tag\CompoundTag{.pocketmine\nbt\tag\StringTag:minecraft:sapling.pocketmine\nbt\tag\ByteTag:1.pocketmine\nbt\tag\ShortTag:0.})

1 /repo-git/src/server/src/pocketmine/entity/Entity__64bit(273): pocketmine\entity\Item->initEntity(boolean)

2 /repo-git/src/server/src/pocketmine/entity/Entity64bit(425): pocketmine\entity\Entity->construct(pocketmine\level\format\anvil\Chunk object, pocketmine\nbt\tag\CompoundTag pocketmine\nbt\tag\CompoundTag{.pocketmine\nbt\tag\ListTag:pocketmine\nbt\tag\ListTag{.pocketmine\nbt\tag\DoubleTag:4.515169124848E-286.pocketmine\nbt\tag\DoubleTag:-0.pocketmine\nbt\tag\DoubleTag:-1.5153202040557E-285.}.pocketmine\nbt\tag\LongTag:-7334971955026034892.pocketmine\nbt\tag\ShortTag:5.pocketmine\nbt\tag\ByteTag:0.pocketmine\nbt\tag\ShortTag:300.pocketmine\nbt\tag\ByteTag:1.pocketmine\nbt\tag\IntTag:0.pocketmine\nbt\tag\IntTag:0.pocketmine\nbt\tag\ListTag:pocketmine\nbt\tag\ListTag{.pocketmine\nbt\tag\FloatTag:81.61555480957.pocketmine\nbt\tag\FloatTag:0.}.pocketmine\nbt\tag\FloatTag:0.pocketmine\nbt\tag\CompoundTag:pocketmine\nbt\tag\CompoundTag{.pocketmine\nbt\tag\StringTag:minecraft:sapling.pocketmine\nbt\tag\ByteTag:1.pocketmine\nbt\tag\ShortTag:0.}.pocketmine\nbt\tag\LongTag:1761335983691874945.pocketmine\nbt\tag\ListTag:pocketmine\nbt\tag\ListTag{.pocketmine\nbt\tag\DoubleTag:89.738001019006.pocketmine\nbt\tag\DoubleTag:11.pocketmine\nbt\tag\DoubleTag:15.748380071693.}.pocketmine\nbt\tag\ShortTag:0.pocketmine\nbt\tag\ShortTag:65535.pocketmine\nbt\tag\StringTag:Item.pocketmine\nbt\tag\ShortTag:1240.})

3 /repo-git/src/server/src/pocketmine/level/format/generic/BaseFullChunk(148): pocketmine\entity\Entity::createEntity(string Item, pocketmine\level\format\anvil\Chunk object, pocketmine\nbt\tag\CompoundTag pocketmine\nbt\tag\CompoundTag{.pocketmine\nbt\tag\ListTag:pocketmine\nbt\tag\ListTag{.pocketmine\nbt\tag\DoubleTag:4.515169124848E-286.pocketmine\nbt\tag\DoubleTag:-0.pocketmine\nbt\tag\DoubleTag:-1.5153202040557E-285.}.pocketmine\nbt\tag\LongTag:-7334971955026034892.pocketmine\nbt\tag\ShortTag:5.pocketmine\nbt\tag\ByteTag:0.pocketmine\nbt\tag\ShortTag:300.pocketmine\nbt\tag\ByteTag:1.pocketmine\nbt\tag\IntTag:0.pocketmine\nbt\tag\IntTag:0.pocketmine\nbt\tag\ListTag:pocketmine\nbt\tag\ListTag{.pocketmine\nbt\tag\FloatTag:81.61555480957.pocketmine\nbt\tag\FloatTag:0.}.pocketmine\nbt\tag\FloatTag:0.pocketmine\nbt\tag\CompoundTag:pocketmine\nbt\tag\CompoundTag{.pocketmine\nbt\tag\StringTag:minecraft:sapling.pocketmine\nbt\tag\ByteTag:1.pocketmine\nbt\tag\ShortTag:0.}.pocketmine\nbt\tag\LongTag:1761335983691874945.pocketmine\nbt\tag\ListTag:pocketmine\nbt\tag\ListTag{.pocketmine\nbt\tag\DoubleTag:89.738001019006.pocketmine\nbt\tag\DoubleTag:11.pocketmine\nbt\tag\DoubleTag:15.748380071693.}.pocketmine\nbt\tag\ShortTag:0.pocketmine\nbt\tag\ShortTag:65535.pocketmine\nbt\tag\StringTag:Item.pocketmine\nbt\tag\ShortTag:1240.})

4 /repo-git/src/server/src/pocketmine/level/Level__64bit(2475): pocketmine\level\format\generic\BaseFullChunk->initChunk(boolean)

5 /repo-git/src/server/src/pocketmine/level/Level__64bit(2147): pocketmine\level\Level->loadChunk(integer 5, integer 0, boolean 1)

6 /repo-git/src/server/src/pocketmine/level/Level__64bit(2726): pocketmine\level\Level->getChunk(integer 5, integer 0, boolean 1)

7 /repo-git/src/server/src/pocketmine/Player__64bit(707): pocketmine\level\Level->populateChunk(integer 5, integer 0)

8 /repo-git/src/server/src/pocketmine/Player__64bit(1546): pocketmine\Player->sendNextChunk(boolean)

9 /repo-git/src/server/src/pocketmine/Server__64bit(2413): pocketmine\Player->checkNetwork(boolean)

10 /repo-git/src/server/src/pocketmine/Server__64bit(2154): pocketmine\Server->tick(boolean)

11 /repo-git/src/server/src/pocketmine/Server__64bit(2034): pocketmine\Server->tickProcessor(boolean)

12 /repo-git/src/server/src/pocketmine/Server__64bit(1653): pocketmine\Server->start(boolean)

13 /repo-git/src/server/src/pocketmine/PocketMine(464): pocketmine\Server->__construct(pocketmine\CompatibleClassLoader object, pocketmine\utils\MainLogger object, string /opt/minecraft/multicraft/servers/druocco/, string /opt/minecraft/multicraft/servers/druocco/, string /opt/minecraft/multicraft/servers/druocco/plugins/)

iPocket commented 8 years ago

crashes*

iPocket commented 8 years ago

Please close this issue, reason: This is a PC Map related issue, MCPC saves block IDs as a string not int like MCPE. like instead of ID 3, it's "dirt". You should use some world editing programs and fix it.

RocoWayne commented 8 years ago

Can you explain some more @iPocket ? What i need to change with mcedit to fix this?

iPocket commented 8 years ago

The block IDs. Also, please close this and put it on the forum, more users will answer.

RocoWayne commented 8 years ago

So, i open the map with mcedit, select each block and replace it with the same block? Im lost here, please help me!

iPocket commented 8 years ago

@RocoWayne Yes, but change the ID, you will find it for example Dirt, change it to 3.

RocoWayne commented 8 years ago

@iPocket i select all the map, and analyze it, and i find DIRT (3:0)

I need to replace DIRT (3:0) with DIRT (3:0)? Im kind off lost here :(

iPocket commented 8 years ago

Replace DIRT with only 3.

On 19 September 2016 at 20:34, RocoWayne notifications@github.com wrote:

@iPocket https://github.com/iPocket i select all the map, and analyze it, and i find DIRT (3:0)

I need to replace DIRT (3:0) with DIRT (3:0)? Im kind off lost here :(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/PocketMine/PocketMine-MP/issues/4287#issuecomment-248062859, or mute the thread https://github.com/notifications/unsubscribe-auth/ARVBWvXKGxo2xgF21-z42Py964Eu2XUzks5qrseggaJpZM4KApMF .

RocoWayne commented 8 years ago

Well, i remove entities and the map work just fine, but, i have another maps that does not work and i dont kwow that to do

Because, i dont understand how relace for example DIRT with only 3.