Hey, does anyone know why this doesn't rename my virtual inventory? It just stays "Chest" PHP: public function sendBin (Player $player) { $nbt = new CompoundTag ( "", [ new StringTag ( "id", Tile::CHEST ), new IntTag ( "Inventory", 1 ), new StringTag("CustomName", c::GREEN. "ImperialBin"), new IntTag ( "x", ( int ) $player->getX () ), new IntTag ( "y", ( int ) $player->getY () ), new IntTag ( "z", ( int ) $player->getZ () ) ] ); /** @var Chest $tile */ $tile = Tile::createTile ( "Chest", $player->getLevel (), $nbt ); $block = Block::get ( Block::CHEST ); $block->x = ( int ) $tile->x; $block->y = ( int ) $tile->y; $block->z = ( int ) $tile->z; $block->level = $tile->getLevel (); $block->level->sendBlocks ( [ $player ], [ $block ] );
They were not removed in 1.2, I have tested it Try this: PHP: public function sendBin (Player $player) { $nbt = new CompoundTag ( "", [ new StringTag ( "id", Tile::CHEST ), new IntTag ( "Inventory", 1 ), new StringTag("CustomName", c::GREEN. "ImperialBin"), new IntTag ( "x", ( int ) $player->getX () ), new IntTag ( "y", ( int ) $player->getY () ), new IntTag ( "z", ( int ) $player->getZ () ) ] ); /** @var Chest $tile */ $tile = Tile::createTile ( "Chest", $player->getLevel (), $nbt ); $block = Block::get ( Block::CHEST ); $block->x = ( int ) $tile->x; $block->y = ( int ) $tile->y; $block->z = ( int ) $tile->z; $block->level = $tile->getLevel (); $block->level->sendBlocks ( [ $player ], [ $block ] ); $inventory = new ChestInventory($tile); $tile->saveNBT(); $tile->spawnTo($player); $player->addWindow($inventory); return $inventory; [/QUOTE]