Skip to content

Commit

Permalink
Merge branch 'dev/3.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyutsuki committed Dec 7, 2019
2 parents 6fd58fe + 7b8b113 commit 170f05f
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 40 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Select Language: [English](#eng), [日本語](#jpn)

## Texter
Texter is plugin that displays and deletes FloatingTextPerticle supported to multi-world.
Latest: ver **3.3.1**
Latest: ver **3.4.0**

### Supporting
- [x] Minecraft(Bedrock)
Expand Down Expand Up @@ -85,7 +85,7 @@ Latest: ver **3.3.1**

## Texter
TexterはFloatingTextPerticleを複数ワールドに渡り表示、編集、移動、削除ができるプラグインです。
最新バージョン: **3.3.1**
最新バージョン: **3.4.0**

### 対応状況
- [x] Minecraft(Bedrock)
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"ext-yaml": ">=2.0.0",
"ext-zip": "*",
"ext-zlib": ">=1.2.11",
"pocketmine/pocketmine-mp": "dev-bedrock-1.13",
"pocketmine/pocketmine-mp": "^3.10.0",
"pocketmine/raklib": "^0.12.0",
"pocketmine/spl": "^0.3.0",
"pocketmine/binaryutils": "^0.1.0",
Expand All @@ -39,7 +39,7 @@
"repositories": [
{
"type": "vcs",
"url": "https://github.com/NetherGamesMC/PocketMine-MP"
"url": "https://github.com/pmmp/PocketMine-MP"
},
{
"type": "vcs",
Expand Down
42 changes: 21 additions & 21 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions plugin.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Texter
prefix: Texter
main: tokyo\pmmp\Texter\Core
version: 3.3.1
api: 3.9.0 # pmmp/PocketMine-MP
version: 3.4.0
api: 3.10.0 # pmmp/PocketMine-MP
mcpe-protocol: 388 # for the future
softdepend:
- FormAPI # jojoe77777/FormAPI
Expand Down
21 changes: 8 additions & 13 deletions src/tokyo/pmmp/Texter/text/FloatingText.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
use pocketmine\network\mcpe\protocol\PlayerSkinPacket;
use pocketmine\network\mcpe\protocol\RemoveActorPacket;
use pocketmine\network\mcpe\protocol\types\PlayerListEntry;
use pocketmine\network\mcpe\protocol\types\SkinAdapterSingleton;
use pocketmine\Player;
use pocketmine\utils\SerializedImage;
use pocketmine\utils\TextFormat;
use pocketmine\utils\UUID;
use tokyo\pmmp\Texter\data\Data;
Expand Down Expand Up @@ -176,20 +176,19 @@ public function asPackets(int $type = Text::SEND_TYPE_ADD, bool $owned = false):
case Text::SEND_TYPE_ADD:
case Text::SEND_TYPE_EDIT:
$uuid = UUID::fromRandom();
$skinData = str_repeat("\x00", 8192);
$transparentSkin = new Skin(
hash("md5", $skinData),
Skin::convertLegacyGeometryName("geometry.humanoid.custom"),
SerializedImage::fromLegacy($skinData)
);

$apk = new PlayerListPacket;
$apk->type = PlayerListPacket::TYPE_ADD;
$apk->entries = [PlayerListEntry::createAdditionEntry(
$uuid,
$this->eid,
$this->getIndentedTexts($owned),
$transparentSkin
SkinAdapterSingleton::get()->toSkinData(new Skin(
"Standard_Custom",
str_repeat("\x00", 8192),
"",
"geometry.humanoid.custom"
))
)];

$pk = new AddPlayerPacket;
Expand All @@ -208,14 +207,10 @@ public function asPackets(int $type = Text::SEND_TYPE_ADD, bool $owned = false):
Entity::DATA_SCALE => [Entity::DATA_TYPE_FLOAT, 0]
];

$spk = new PlayerSkinPacket;
$spk->uuid = $uuid;
$spk->skin = $transparentSkin;

$rpk = new PlayerListPacket;
$rpk->type = PlayerListPacket::TYPE_REMOVE;
$rpk->entries = [PlayerListEntry::createRemovalEntry($uuid)];
$pks = [$apk, $pk, $spk, $rpk];
$pks = [$apk, $pk, $rpk];
break;

case Text::SEND_TYPE_MOVE:
Expand Down

0 comments on commit 170f05f

Please sign in to comment.