Skip to content

Instantly share code, notes, and snippets.

Dylan T. dktapps

Block or report user

Report or block dktapps

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dktapps
dktapps / pre-commit
Created Apr 10, 2019
pre-commit hook I use for PocketMine-MP
View pre-commit
#!/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 Feb 18, 2019
Simple way to make chemistry blocks work correctly on a PocketMine-MP server
View README.md

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 / blocks.json
Last active Feb 15, 2019
Minecraft: PE legacy item/block magic numbers as of 1.9.0.15. For extended blocks (IDs >= 256) `itemID = 255 - blockID`
View blocks.json
{
"minecraft:air": 0,
"minecraft:stone": 1,
"minecraft:grass": 2,
"minecraft:dirt": 3,
"minecraft:cobblestone": 4,
"minecraft:planks": 5,
"minecraft:sapling": 6,
"minecraft:bedrock": 7,
"minecraft:flowing_water": 8,
View BUILDING.md

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 / README.md
Last active May 26, 2019
Minecraft PE Android crashdump decoder script
View README.md

Minecraft PE crashdump decoder

Setting up environment

Install depot_tools and make sure the tools are available in your PATH variable. You might need to add them to your path manually.

Getting a crashdump file

Requirements:

  • A rooted Android device with MCPE installed.
  1. Trigger the crash you want to debug. When your game crashes, DON'T RESTART IT.
@dktapps
dktapps / blockstate_protocol.md
Last active May 4, 2019 — forked from Tomcc/blockstate_protocol.md
Block Changes in Beta 1.2.13
View blockstate_protocol.md

Block Storage & Network Protocol Changes

Paletted chunks & removing BlockIDs brings a few big changes to how blocks are represented. In Bedrock, Blocks used to be represented by their 8 bit ID and 4 bit data; this means that we can only represent 256 blocks and 16 variants for each block. As it happens we ran out of IDs in Update Aquatic, so we had to do something about it :)

After this change, we can represent infinite types of Blocks and infinite BlockStates, just like in Java. BlockStates are what is sent over the network as they are roughly equivalent to the old ID+data information, eg. they're all the information attached to a block.

BlockStates are serialized in two ways:

PersistentID: a PersistentID is a NBT tag containing the BlockState name and its variant number; for example

@dktapps
dktapps / SerializedNbtFixer.php
Created Apr 9, 2018
Class with utilities to unfuck serialized NBT objects from before PocketMine-MP API 3.0.0-ALPHA11
View SerializedNbtFixer.php
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
@dktapps
dktapps / runtimeid_table.json
Created Mar 16, 2018 — forked from Tomcc/runtimeid_table.json
RuntimeID temporary static lookup table
View runtimeid_table.json
[
{
"runtimeID": 0,
"name": "minecraft:air",
"id": 0,
"data": 0
},
{
"runtimeID": 1,
"name": "minecraft:stone",
View keybase.md

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:

View geometry-dump.json
{
"geometry.humanoid": {
"bones": [
{
"name": "body",
"pivot": [ 0.0, 24.0, 0.0 ],
"cubes": [
{
"origin": [ -4.0, 12.0, -2.0 ],
"size": [ 8, 12, 4 ],
You can’t perform that action at this time.