PM5 Block State Converter PocketMine-MP 5

Bedrock Edition block states → PM5 PHP code

Convert Bedrock Block States to PM5 PHP Code

Select a block, configure its state properties, and get ready-to-use VanillaBlocks factory PHP code for your PocketMine-MP 5 plugins.

Try: stairs, slab, door, log, wool, copper, torch, rail, lever

Block Properties

Generated PHP Code

What Changed in PocketMine-MP 5?

PocketMine-MP 5 (PM5) completely replaced the legacy numeric block IDs and metadata system with a modern block state property system based on Bedrock Edition's block states. This means:

  • No more numeric IDs — blocks are identified by string identifiers like minecraft:oak_stairs
  • No more meta values — block variants are defined by typed state properties (direction, color, open/closed, etc.)
  • VanillaBlocks factory — use VanillaBlocks::OAK_STAIRS() instead of Block::get(53, 0)
  • Fluent setters — chain property setters like ->setFacing(Facing::NORTH)->setUpsideDown(true)

Why Use This Converter?

Writing PM5 block state code manually requires knowing the exact property names, valid values, and the mapping between Bedrock states and PM5 methods. This tool automates the process — just pick a block, set properties visually, and copy the generated PHP code.

How to Use Generated Code in Your Plugin

The generated code creates a block instance that you can use anywhere in your PM5 plugin:

use pocketmine\block\VanillaBlocks;
use pocketmine\math\Facing;

// Place a block in the world
$block = VanillaBlocks::OAK_STAIRS()
    ->setFacing(Facing::NORTH)
    ->setUpsideDown(true);

$world->setBlock($position, $block);

Frequently Asked Questions

What is PocketMine-MP 5?

PocketMine-MP 5 (PM5 / PMMP5) is the latest major version of PocketMine-MP, an open-source server software for Minecraft: Bedrock Edition (formerly Pocket Edition / MCPE). It features a completely rewritten block system using typed state properties instead of legacy numeric IDs.

What are block states in Bedrock Edition?

Block states are named properties that define a block's variant or configuration. For example, stairs have upside_down_bit (flipped or not) and weirdo_direction (which way they face). In PM5, these map to PHP setter methods on block objects.

Can I use this for PM4 or older versions?

No. This tool generates code exclusively for PocketMine-MP 5, which uses the VanillaBlocks factory and typed state properties. PM4 and older versions use the legacy numeric ID + meta system, which is fundamentally different.

Which blocks are supported?

This converter supports 200+ blocks including stairs, slabs, doors, trapdoors, fence gates, buttons, pressure plates, logs, walls, signs, torches, rails, redstone components, crops, colored blocks (wool, concrete, terracotta, glass), copper variants, candles, and many more.

Is this tool open source?

Yes! The source code is available on GitHub. Contributions and suggestions are welcome.