You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.
When you use a plugin that spawns a head, it pretty much messes up on placing the head, as you can see between the two pictures below, there is the difference between PE and PC head spawning. EDIT: It does affect all heads, not custom heads.
Steps to reproduce the issue
Try using the following code: ` public function onDeath(PlayerDeathEvent $event){
$player = $event-getPlayer();
$level = $player->getLevel();
$x = $player->getFloorX();
$y = $player->getFloorY();
$z = $player->getFloorZ();
$pos = $player->getPosition();
$level->setBlock($pos->add(0, 1, 0), Block::get(Block::SKULL_BLOCK), true, true);
$level->setBlock($pos, Block::get(Block::NETHER_BRICK_FENCE));
$chunk = $level->getChunk($x >> 4, $z >> 4);
$nbt = new CompoundTag("", [
new StringTag("id", Tile::SKULL),
new IntTag("x", $x),
new IntTag("y", $y+1),
new IntTag("z", $z),
new ByteTag("SkullType", SkullBlock::STEVE_HEAD),
new ByteTag("Rot", floor(($player->yaw * 16) + 0.5))
]);
Tile::createTile("Skull", $chunk, $nbt);
$t = $level->getTile(new Vector3($x, $y+1, $z));
$level->addTile($t);
That is a default head, but skinned as a custom one via texture packs. So no it doesn't glitch as an entity, but placing it via code is weird. I've had this issue happen as well.
Issue description
When you use a plugin that spawns a head, it pretty much messes up on placing the head, as you can see between the two pictures below, there is the difference between PE and PC head spawning. EDIT: It does affect all heads, not custom heads.
Steps to reproduce the issue
Try using the following code: ` public function onDeath(PlayerDeathEvent $event){
$player = $event-getPlayer();
$level = $player->getLevel();
$x = $player->getFloorX();
$y = $player->getFloorY();
$z = $player->getFloorZ();
$pos = $player->getPosition();
$level->setBlock($pos->add(0, 1, 0), Block::get(Block::SKULL_BLOCK), true, true);
$level->setBlock($pos, Block::get(Block::NETHER_BRICK_FENCE));
$chunk = $level->getChunk($x >> 4, $z >> 4);
$nbt = new CompoundTag("", [
new StringTag("id", Tile::SKULL),
new IntTag("x", $x),
new IntTag("y", $y+1),
new IntTag("z", $z),
new ByteTag("SkullType", SkullBlock::STEVE_HEAD),
new ByteTag("Rot", floor(($player->yaw * 16) + 0.5))
]);
Tile::createTile("Skull", $chunk, $nbt);
$t = $level->getTile(new Vector3($x, $y+1, $z));
$level->addTile($t);
OS and versions
Crashdump, backtrace, memory dumps, plugins list or other files
http://imgur.com/a/2de8m
Sorry bad quality: http://imgur.com/a/0cfXl
The text was updated successfully, but these errors were encountered: