Pocketmine-mp: Pick-block on a sign and then placing it results in empty sign

Created on 22 Oct 2020  路  4Comments  路  Source: pmmp/PocketMine-MP

Issue description

  • Expected result: Sign with text of sign pick-blocked
  • Actual result: Empty sign. Text is visible though until the sign UI opens.

Steps to reproduce the issue

  1. Take a sign and write text on it
  2. Pick-Block the sign with data (CTRL-Middleclick)
  3. Place the sign

OS and versions

  • PocketMine-MP: This server is running PocketMine-MP 4.0.0+dev for Minecraft: Bedrock Edition v1.16.20 (protocol version 408)
  • PHP: 7.3
  • Server OS: deb9
  • Game version: PE/Win10 (delete as appropriate) 1.16.4

Plugins


Plugins (6): DEVirion v1.2.5-ALPHA13, DevTools v1.15.0+dev, FormImagesFix v0.0.1, MagicWE2 v10.1.0, WFCore v0.0.0, WarpUI v4.0.1

  • If you remove all plugins, does the issue still occur? Yes
  • If the issue is not reproducible without plugins:

    • Have you asked for help on our forums before creating an issue?

    • Can you provide sample, minimal reproducing code for the issue? If so, paste it in the bottom section

Crashdump, backtrace or other files


Gameplay Debugged

Most helpful comment

This happens because the client thinks there isn't any text on the sign and opens the sign editing UI. This happens because the item NBT isn't added properly.

All 4 comments

$pos = new Vector3($player->x,$player->y,$player->z);
    $chest = Tile::createTile(Tile::CHEST,$player->getLevelNonNull(),TileChest::createNBT($pos, null, null, $player));
    $inventory= new ChestInventory($chest);
    $player->addWindow($inventory);
    $inventory->onOpen($player);
            $pk = new ContainerOpenPacket();
    $pk->windowId = $player->getWindowId($inventory);
    $pk->type = WindowTypes::MINECART_CHEST;
    $pk->x = $pk->y = $pk->z = 0;
    $pk->entityUniqueId = $player->getId();
    $player->dataPacket($pk);

What's wrong with this string of code.

This happens because the client thinks there isn't any text on the sign and opens the sign editing UI. This happens because the item NBT isn't added properly.

Same with chests and items inside

no

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Hugheth picture Hugheth  路  3Comments

dktapps picture dktapps  路  3Comments

Muqsit picture Muqsit  路  3Comments

MisteFr picture MisteFr  路  3Comments

nmo0ory picture nmo0ory  路  3Comments