Skip to content

Instantly share code, notes, and snippets.

Avatar

Dylan T. dktapps

View GitHub Profile
View deserializing-items.md

Deserializing old items in world saves

Classic items (MCPE <= 1.5, PM <= 1.12)

  1. int ID + meta
  2. 1.16 string ID via item_id_map.json -> string ID + meta
  3. deserialize as medieval item

Medieval items (MCPE 1.6 - 1.8)

@dktapps
dktapps / 9999_chunker.app_fixes.json
Created May 30, 2022
BlockState Upgrader schema for fixing worlds converted by https://chunker.app
View 9999_chunker.app_fixes.json
{
"maxVersionMajor": 255,
"maxVersionMinor": 255,
"maxVersionPatch": 255,
"maxVersionRevision": 255,
"addedProperties": {
"minecraft:anvil": {
"damage": {
"string": "undamaged"
}
@dktapps
dktapps / hardness_table.json
Created Jan 16, 2022
Table of all block hardness in Bedrock as of Minecraft Bedrock 1.18.0
View hardness_table.json
{
"minecraft:acacia_button": 0.5,
"minecraft:acacia_door": 3.0,
"minecraft:acacia_fence_gate": 2.0,
"minecraft:acacia_pressure_plate": 0.5,
"minecraft:acacia_stairs": 2.0,
"minecraft:acacia_standing_sign": 1.0,
"minecraft:acacia_trapdoor": 3.0,
"minecraft:acacia_wall_sign": 1.0,
"minecraft:activator_rail": 0.5,
@dktapps
dktapps / message.txt
Last active Jan 6, 2022
Signed message listing my accounts relevant to the Minecraft community. You may verify the saltpack using the Keybase App or online verifier such as https://blackhole.dev/saltpack-verify/
View message.txt
I don't speak Russian, and I don't have an account on VK. There is someone on VK.com impersonating me.
I don't speak any language other than English.
My real accounts are:
@𝘥𝘺𝘭𝘢𝘯#2328 (Discord) (User ID: 242003500995837952)
https://github.com/dktapps
https://twitter.com/dktapps
https://keybase.io/dktapps
https://forums.pmmp.io/members/dktapps.3
https://forums.pocketmine.net/members/dktapps.50518/
View core-permissions.md

PocketMine-MP Core Permissions

Generated from PocketMine-MP 4.0.0-BETA6+dev

Name Description Implied permissions
pocketmine.broadcast.admin Allows the user to receive administrative broadcasts N/A
pocketmine.broadcast.user Allows the user to receive user broadcasts N/A
pocketmine.command.ban.ip Allows the user to ban IP addresses N/A
pocketmine.command.ban.list Allows the user to list banned players N/A
pocketmine.command.ban.player Allows the user to ban players N/A
View test3.php
<?php
namespace test;
use function hrtime;
use function printf;
class BinaryStream{
protected string $buffer = "";
View tracer.py
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import frida
import sys
import json
import argparse
import subprocess
import base64
import time
View depGraph.php
<?php
$opts = getopt("", ["directed", "path:"]);
$directed = isset($opts["directed"]);
$nodes = [];
class Node{
public $name;
public function __construct(string $name){
@dktapps
dktapps / README.md
Last active Dec 13, 2020
Packet handler used to generate most of BedrockData for PocketMine-MP (PM3 only)
View README.md

This script operates on a packet dump between a vanilla client and server.

A dump like this can be obtained in various ways - a proxy, my frida tracer, etc. However you get it, the file provided should have one packet per line, starting with read: or write: and ending with a base64-encoded packet (including the packet ID).

A quick example grabbed from one of my old log files:

read:kAHwoMpB4PUgQQAAAD8g17NAAAAAPwAAAAAAAAAA4PUgQQABAg==
write:CQ==
write:CQIBG8KnZSVtdWx0aXBsYXllci5wbGF5ZXIubGVmdAELbWN0ZXN0RHlsYW4AAA==
View r13-to-r14-blockstates-diff.txt
calculating required block table diff
matched 3029 states
16 old states removed:
CompoundTag: value={
CompoundTag: name='block', value={
StringTag: name='name', value='minecraft:kelp'
CompoundTag: name='states', value={
IntTag: name='age', value='12'
}
}