Skip to content

Instantly share code, notes, and snippets.

@Tomcc
Tomcc / runtimeid_table.json
Last active August 20, 2021 23:57
RuntimeID temporary static lookup table
[
{
"data": 0,
"id": 0,
"name": "minecraft:air",
"runtimeID": 0
},
{
"data": 0,
"id": 1,
@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

@Frago9876543210
Frago9876543210 / ui.php
Last active March 30, 2018 06:31
simple form
<?php
namespace ui;
use pocketmine\event\Listener;
use pocketmine\event\player\PlayerInteractEvent;
use pocketmine\event\player\PlayerJoinEvent;
use pocketmine\event\server\DataPacketReceiveEvent;
use pocketmine\item\Item;
use pocketmine\network\protocol\v120\ModalFormResponsePacket;
@svilex
svilex / McpeProxy_README.md
Last active April 22, 2024 08:35
Useful informations about McpeProxy
@xBeastMode
xBeastMode / Query.php
Last active August 9, 2023 07:30
Used to query PocketMine server data
<?php
class Query
{
/** @var string[] */
private $server;
/** @var string[] */
private $fetchedData;
public function __construct($host = '', $port = 19132)
{
@daicham
daicham / udpclient.js
Created November 26, 2014 00:56
Sample UDP Server and Client on node.js
// UDP Sample Client
// UDP 接続先
var host = "localhost";
var c_port = 41234;
var dgram = require("dgram");
var client = dgram.createSocket("udp4");
// サーバに送信するメッセージ
// var message = new Buffer("hello");