Pocketmine-mp: setBlock does not create/remove tiles

Created on 2 May 2017  路  5Comments  路  Source: pmmp/PocketMine-MP

Issue description




For several reasons i've experienced plugin using setBlock, but forgetting to create/remove a tile for e.g. chests.
So, there are invisible tile blocks after a rejoin, which can be quite annoying

The other scenario: A plugin uses setblock, but doesn't remove the tile. when another tile is placed at the same position, it contains the same data as the old one.
For example you can setBlock a monsterspawner where a chest was, and then you hav a chest displayed inside a monster spawner.

Giving the server the option to remove this would also reduce some load (ticked tiles) and memory on levels, and Level::getTiles() would no longer return invalid tiles.

When setting a TileBlock, a tile could be created using the default compound (previousely getSpawnCompound)

Steps to reproduce the issue

  1. setblock a chest
  2. ur setblock air where a chest was

OS and versions

API Core Fixed

Most helpful comment

ideally plugin developers shouldn't need to know that "tiles" or "block entities" are even a thing - they should just be blocks with special behaviour. So yes, this is a TODO.

All 5 comments

btw you can't link a static artifact name on lastSuccessfulBuild @thebigsmileXD

Why not, the vrsion is fully stated behind it.
image

Bump: Is this actually a TODO, or should users better create tiles themself via the new, easier tile function?

ideally plugin developers shouldn't need to know that "tiles" or "block entities" are even a thing - they should just be blocks with special behaviour. So yes, this is a TODO.

This is planned for resolution in 4.0. Work is underway to deal with this, amongst other issues.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sergeysova picture sergeysova  路  3Comments

jasonwynn10 picture jasonwynn10  路  3Comments

beetree picture beetree  路  3Comments

Ox531 picture Ox531  路  3Comments

dktapps picture dktapps  路  3Comments