iTXTech / Genisys

Feature-rich server software for Minecraft: Pocket Edition & Windows 10 Edition Beta
https://itxtech.org/genisys/
GNU General Public License v3.0
432 stars 244 forks source link

Heads don't spawn properly in plugins #2086

Open buchwasa opened 8 years ago

buchwasa commented 8 years ago

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

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

dancing-ipsum commented 8 years ago

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 commented 7 years ago

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 commented 7 years ago

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

sylvrs commented 7 years ago

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.