Skip to content

Instantly share code, notes, and snippets.

@shoghicp
shoghicp / namespacer.php
Last active August 29, 2015 13:57
Tool used on PocketMine-MP to autogenerate Namespace use importing, with automatic collision detection. Abuses PCRE
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
@shoghicp
shoghicp / list.md
Last active August 29, 2015 14:00
Tech things done by Mojang for Minecraft: Pocket Edition

These are a few things requested to Mojang, or the developer themselves, or we were told that they added this.

Done / Confirmed

Thing done Version Notes
Play -> Edit -> External menu 0.7.4
Fix protocol inconsistencies MCPE-6865 0.9.0
@shoghicp
shoghicp / threads.md
Last active August 29, 2015 14:02
PocketMine-MP Alpha_1.4 Threads

PocketMine-MP Alpha_1.4 Threads

default RCONInstance threads: 1

default AsyncTask Workers: 3

  • (0) Main thread
  • (1) MainLogger [sleeping]
  • (2) CommandReader [sleeping]
  • (3) RakLib networking
@shoghicp
shoghicp / IO.php
Created January 12, 2013 12:24
async PHP Console I/O, Needs pthreads https://github.com/krakjoe/pthreads/
<?php
if(!extension_loaded("pthreads") and @dl((PHP_SHLIB_SUFFIX === "dll" ? "php_":"") . "pthreads." . PHP_SHLIB_SUFFIX) === false){
trigger_error("Unable to find pthreads extension", E_USER_ERROR);
exit(1);
}
function kill($pid){
$uname = strtoupper(php_uname("s"));
           -
         /   \
      /         \
   /   PocketMine  \
/          MP         \
|\     @shoghicp     /|
|.   \           /   .|
| ..     \   /     .. |
| .. | .. |
This file has been truncated, but you can view the full file.
'use strict';
var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !1;
goog.LOCALE = "en";
goog.provide = function (a) {
if (!COMPILED) {
if (goog.isProvided_(a))
throw Error('Namespace "' + a + '" already declared.');
delete goog.implicitNamespaces_[a];

DEFLATEPacket mixed protocol encapsulation for Minecraft: Pocket Edition

This protocol aims to use less bandwidth sending big packets / chunks of smaller packets compressed using DEFLATE. It works encapsulating raw packets into this protocol, without modifying them. It follows a mixed approach, letting normal packets work and handling compressed packet seamlessly. Both parties must support this protocol, so a Handshake system exists.

All numbers are Big-endian

Packet Structure

| Packet ID | Field Name | Type | Notes |

@shoghicp
shoghicp / MCHead.php
Last active May 6, 2016 06:55
Draw a Canvas of a Minecraft skin, with the hat.
<?php
/*
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
@shoghicp
shoghicp / Translations.php
Last active September 28, 2017 20:13
PocketMine Realms login translations
<?php
/*
UTF-8 encoded.
UPPERCASE words are replaced with data, do NOT modify that, only move it to the correct place.
Words like PocketMine, Mojang, Minecraft, Pocket Edition and Mine Pocket shouldn't be translated.
Don't modify HTML tags (exception: text inside the tags and NOT in UPPERCASE)
Translations completed: English (shoghicp), Spanish (shoghicp), Standard Chinese (HAZ_ljyloo), Dutch (Intyre), Japanese (Omattyao), Russian (Alexey Egoshin), French (symonium), German (Xmoe)
Translations being publicly checked: Vietnamese (Phuocpeter19), Italian (ceppopipc1999), Serbian (xXStefoXx)
Translations in progress: Korean (bigswbigsw), Irish (A9_0Z), Turkish
@shoghicp
shoghicp / banned.md
Last active May 20, 2018 19:27
Ban List of #mcpedevs and #pocketmine

#mcpedevs

  • LoveJoy: (aka xXDARK_KNIGHTXx, *lovejoy, lovejoy1598, DJ_HeRtBrEaK, mcpelover +more) Swearing, pirating MCPE, Spamming, Spamming Quote bot, Multiple ban evasion. by Intyre, shoghicp
  • KevinWang_China: (aka VanishedKevin) Malicious plugin creation, spamming, Ban Evasion. by shoghicp
  • Xiang: (aka NgJinXiang) Spamming questions. by Intyre
  • nikony: Spamming pacman. by Intyre
  • shader: (aka Shad-Bot, proCmd) Insulting, advertising, ban evasion related logs. by shoghicp
  • TrilogiForce: Spamming, threatening the team. by Brandon15811
  • JasperBeastHD: (aka JasperHD, JassperBeastHD) Insulting moderators, evading ban. some related logs. by Brandon15811
  • DarkDemon101: Pinging main developers needlessly, asking to be admin/tester/co-owner after being told to stop. by shoghicp
  • Striker209_MPE: Spammin