Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Heads don't spawn properly in plugins #2086

Open
buchwasa opened this issue Oct 15, 2016 · 4 comments
Open

Heads don't spawn properly in plugins #2086

buchwasa opened this issue Oct 15, 2016 · 4 comments

Comments

@buchwasa
Copy link
Contributor

buchwasa commented Oct 15, 2016

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

  • Genisys: c440730
  • PHP: 7.0.10
  • Server OS: Windows 10
  • Game version: 0.15.10

Crashdump, backtrace, memory dumps, plugins list or other files

http://imgur.com/a/2de8m
Sorry bad quality: http://imgur.com/a/0cfXl

@dancing-ipsum
Copy link

That's a MCPE bug, default heads work with fences. But as custom skin heads aren't actually in MCPE, it glitches out as an entity

@sylvrs
Copy link
Contributor

sylvrs commented Oct 17, 2016

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.

@JackNoordhuis
Copy link
Contributor

Does this issue still occur and does it occur on other blocks as well?

@sylvrs
Copy link
Contributor

sylvrs commented Dec 16, 2016

Yes it still occurs, it occurs with only this tile. The skull spawns in the middle of the block instead of the bottom if spawned by plugin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants