Skip to content

Instantly share code, notes, and snippets.

View dktapps's full-sized avatar

Dylan T. dktapps

View GitHub Profile
@dktapps
dktapps / pm-0.16-metadata-changes.md
Created November 5, 2016 21:01
Entity metadata changes in 0.16. PocketMine only, does not account for spoon changes.
Type Constant name Status Details
Property Ageable::DATA_AGEABLE_FLAGS Removed Ageable flags (Entity::DATA_FLAG_BABY) are now set on the generic entity status (Entity::DATA_FLAGS)
Property Entity::DATA_AIR Changed Value changed (1 -> 7) and default changed (300 -> 400)
Property Entity::DATA_FLAGS Changed Type changed (byte -> long)
Property Entity::DATA_LEAD_EID Changed/Removed Value changed (23 -> 38) and renamed with clearer name (DATA_LEAD_HOLDER_EID).
Property Entity::DATA_NAMETAG Changed Value changed (2 -> 4)
Property Entity::DATA_NO_AI Changed/Removed Changed to a data flag (DATA_FLAG_NO_AI)
Property Entity::DATA_POTION_AMBIENT Changed Value changed (8 -> 9)
Property Entity::DATA_POTION_COLOR Changed Value changed (7 -> 8)
@dktapps
dktapps / TransferPlugin.php
Created February 1, 2017 13:18
Proof of concept transfer plugin for PocketMine with MCPE 1.0.3
<?php
/**
* @name TransferPlugin
* @main dktapps\TransferPlugin\Main
* @api 3.0.0-ALPHA3
* @version 1.0.0
* @description Proof-of-concept for server transfer in MCPE 1.0.3
* @author dktapps
*/
<?php
namespace dktapps\NoRak;
use pocketmine\plugin\PluginBase;
use pocketmine\command\CommandSender;
use pocketmine\command\Command;
use pocketmine\event\Listener;
use pocketmine\event\server\NetworkInterfaceRegisterEvent;
use pocketmine\network\mcpe\RakLibInterface;

Keybase proof

I hereby claim:

  • I am dktapps on github.
  • I am dktapps (https://keybase.io/dktapps) on keybase.
  • I have a public key ASBSphcrMkK13kZqMlU-L8vaSunFR401CHjZloqdImcabgo

To claim this, I am signing this object:

@dktapps
dktapps / SerializedNbtFixer.php
Created April 9, 2018 18:32
Class with utilities to unfuck serialized NBT objects from before PocketMine-MP API 3.0.0-ALPHA11
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*

Building PocketMine-MP from source (Linux/Mac)

Pre-requisites

  • Install git
  • Download and install PHP >= 7.2.0 ZTS with the required extensions
    • PMMP-provided binaries
    • This document will not cover the process of compiling PHP with the required extensions manually, but if you do you will need to:
  • enable CLI (--enable-cli)
@dktapps
dktapps / pre-commit
Created April 10, 2019 13:56
pre-commit hook I use for PocketMine-MP
#!/usr/bin/bash
if git rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
# Initial commit: diff against an empty tree object
against=4b825dc642cb6eb9a060e54bf8d69288fbee4904
fi
@dktapps
dktapps / README.md
Created February 18, 2019 10:56
Simple way to make chemistry blocks work correctly on a PocketMine-MP server

Enabling chemistry blocks on a PocketMine-MP server

Chemistry blocks (the ones that are implemented, that is) are already present OOB with PocketMine-MP unconditionally. Unfortunately, they don't render correctly due to weirdness in the way Mojang handles the resources.

TL;DR

  1. Download the manifest.json file from this gist.
  2. Add it to a zip file (on Windows, right click -> Send to -> Compressed (zipped) folder)
  3. Place the zip file in PocketMine-MP's resource pack folder and enable it like a normal resource pack.
  4. Profit!
@dktapps
dktapps / MCPE-1.0-NETWORK-CHUNK-SPEC.md
Last active September 29, 2019 11:52
Network chunk specification as of MCPE 1.0

MCPE 1.0 Network Chunk specification

Note: the accuracy of this specification may be flawed. This specification is believed to be correct as of beta 1.0.0.7, but its accuracy is by no means guaranteed.

Basic changes

Biome colour removal

The ability to set biome colours disappeared this update, which is a shame. The old method using biome IDs is back; colours and gradients are now handled automatically client side. While this is a bonus for PocketMine in the way that biome colours in Anvil worlds will now work correctly again, it's a shame to see that capability disappear.

This file has been truncated, but you can view the full file.
ListTag: value={
CompoundTag: value={
CompoundTag: name='old', value={
StringTag: name='name', value='minecraft:acacia_button'
ShortTag: name='val', value='0'
}
CompoundTag: name='new', value={
StringTag: name='name', value='minecraft:acacia_button'
CompoundTag: name='states', value={
ByteTag: name='button_pressed_bit', value='0'