Skip to content
This repository has been archived by the owner on Jan 14, 2022. It is now read-only.

pmmp/PocketMine-C-ChunkUtils

Repository files navigation

PocketMine-C ChunkUtils extension

Travis CI build status AppVeyor Build status

This extension provides a C implementation of the ChunkUtils class in PocketMine-MP. It is intended as a drop-in performance enhancement if the user is using Anvil-formatted worlds (Minecraft PC worlds).

Why?

The PHP implementations of the chunk data conversion methods are (relatively) extremely slow. This extension provides chunk load time enhancements of up to 10-200x faster per chunk loaded or unloaded.

Installation

Requirements

  • PHP >=7.0
  • PocketMine-MP 1.6.2dev with API 3.0.0-ALPHA3 or later

To compile, you'll need to add the source to your ext source folder in your PHP source and compile PHP with the --enable-pocketmine-chunkutils option. No core changes are needed to PocketMine-MP, simply enable the extension and run the server. With Anvil worlds, you should see a vast performance improvement.

Windows

Because compiling PHP on Windows isn't most people's bag, you can obtain a DLL for this extension from AppVeyor. Drop the DLL into the extensions directory for your PHP installation and add extension=php_pocketmine_chunkutils.dll to your php.ini.

FAQ

  • I'm using PMAnvil and/or McRegion worlds, will this extension provide a performance boost to those?

No. This extension provides a fast C replacement for a class which is used primarily by the Anvil chunk I/O provider. This extension simply accelerates Anvil chunk conversion to make PC worlds usable.