Skip to content

Instantly share code, notes, and snippets.

View jojoe77777's full-sized avatar
🤔

jojoe77777 jojoe77777

🤔
View GitHub Profile
@Tomcc
Tomcc / client_blob_cache.md
Last active April 9, 2024 08:46
A description of the new Client Cache for server developers

Client Blob Cache

What's the Client Blob Cache

The Client Blob Cache is a new Bedrock optimization - it allows blocks and biomes to be cached on Clients to avoid resending identical chunks over and over. Chunks and biomes make up the vast majority of network traffic in a lot of common cases (eg. login, teleport or dimension switches) but at the same time, they rarely change. Allowing the Client to reuse chunks it has seen in the past can save a ton of traffic and latency!

The Client Cache is a Content Addressed Storage (a bit like git) that stores Blobs and retrieves them based on their full hashes (BlobIds). This means that the cache doesn't actually know about Chunks - in the future, we might start using it for more types of data, like skins or data driven entities.

A nice thing we get from the CAS approach is that the cache is persistent: returning players will be able to reuse content that was sent them in previous sessions or even previous sessions in different servers as long as tha

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)
@Tomcc
Tomcc / blockstate_protocol.md
Last active April 9, 2024 08:42
Block Changes in Beta 1.2.13

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

{
"geometry.humanoid": {
"bones": [
{
"name": "body",
"pivot": [ 0.0, 24.0, 0.0 ],
"cubes": [
{
"origin": [ -4.0, 12.0, -2.0 ],
"size": [ 8, 12, 4 ],
@dktapps
dktapps / run.php
Last active February 15, 2023 04:52
A basic UDP proxy used to bypass client-side Xbox Live authentication in MCPE 1.2.
<?php
/*
*
* ____ _ _ __ __ _ __ __ ____
* | _ \ ___ ___| | _____| |_| \/ (_)_ __ ___ | \/ | _ \
* | |_) / _ \ / __| |/ / _ \ __| |\/| | | '_ \ / _ \_____| |\/| | |_) |
* | __/ (_) | (__| < __/ |_| | | | | | | | __/_____| | | | __/
* |_| \___/ \___|_|\_\___|\__|_| |_|_|_| |_|\___| |_| |_|_|
*
@superhero
superhero / git.md
Last active August 8, 2017 15:18
Git commands...

remove last commit from git and github

git push -f origin HEAD^:master

@agentsim
agentsim / highsierra_bootable.sh
Created June 10, 2017 02:23
Create bootable ISO from HighSierra Installer
# Generate a BaseSystem.dmg with 10.13 Install Packages
hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra
hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build
asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/highsierra/
mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg
@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
*/
@Semx11
Semx11 / hosts.json
Last active November 29, 2018 10:50
Autotip
{
"hosts": [
{
"id": "download",
"url": "autotip.pro/download",
"enabled": true
},
{
"id": "totip",
"url": "http://skywars.info/test/totip.php",
@moreguppy
moreguppy / droplet-cheatsheet.md
Last active November 30, 2016 16:30
Droplet Cheatsheet