Skip to content

Instantly share code, notes, and snippets.

Avatar

Niclas Olofsson NiclasOlofsson

  • Malmö, Sweden
View GitHub Profile
View gist:fb7256c4cfda8c16360c6ee7451b5c5d
FFFFFFFF ; ---------------------------------------------------------------------------
FFFFFFFF
FFFFFFFF ; enum CommandRegistry::HardNonTerminal, copyof_5669, width 4 bytes
FFFFFFFF Epsilon = 100000h
FFFFFFFF Int_0 = 100001h
FFFFFFFF Val = 100002h
FFFFFFFF RVal = 100003h
FFFFFFFF WildcardInt = 100004h
FFFFFFFF Operator_0 = 100005h
FFFFFFFF Selection = 100006h
@NiclasOlofsson
NiclasOlofsson / blockstates.json
Created Jan 14, 2020
Blockstates for 1.14+ including Item for each blockstate.
View blockstates.json
[
{"Id":0,"Data":0,"Name":"minecraft:air","RuntimeId":0,"States":[],"ItemInstance":null},
{"Id":1,"Data":0,"Name":"minecraft:stone","RuntimeId":1,"States":[{"Type":8,"Name":"stone_type","Value":"stone"}],"ItemInstance":{"Id":0,"Metadata":0,"WantNbt":false}},
{"Id":1,"Data":1,"Name":"minecraft:stone","RuntimeId":2,"States":[{"Type":8,"Name":"stone_type","Value":"granite"}],"ItemInstance":{"Id":1,"Metadata":0,"WantNbt":false}},
{"Id":1,"Data":2,"Name":"minecraft:stone","RuntimeId":3,"States":[{"Type":8,"Name":"stone_type","Value":"granite_smooth"}],"ItemInstance":{"Id":1,"Metadata":1,"WantNbt":false}},
{"Id":1,"Data":3,"Name":"minecraft:stone","RuntimeId":4,"States":[{"Type":8,"Name":"stone_type","Value":"diorite"}],"ItemInstance":{"Id":1,"Metadata":2,"WantNbt":false}},
{"Id":1,"Data":4,"Name":"minecraft:stone","RuntimeId":5,"States":[{"Type":8,"Name":"stone_type","Value":"diorite_smooth"}],"ItemInstance":{"Id":1,"Metadata":3,"WantNbt":false}},
{"Id":1,"Data":5,"Name":"minecraft:stone","RuntimeId":6,"States":[{
@NiclasOlofsson
NiclasOlofsson / blockstates.json
Created Jan 14, 2020
Blockstates for 1.14+ including Item for each blockstate.
View blockstates.json
[
{"Id":0,"Data":0,"Name":"minecraft:air","RuntimeId":0,"States":[],"ItemInstance":null},
{"Id":1,"Data":0,"Name":"minecraft:stone","RuntimeId":1,"States":[{"Type":8,"Name":"stone_type","Value":"stone"}],"ItemInstance":{"Id":0,"Metadata":0,"WantNbt":false}},
{"Id":1,"Data":1,"Name":"minecraft:stone","RuntimeId":2,"States":[{"Type":8,"Name":"stone_type","Value":"granite"}],"ItemInstance":{"Id":1,"Metadata":0,"WantNbt":false}},
{"Id":1,"Data":2,"Name":"minecraft:stone","RuntimeId":3,"States":[{"Type":8,"Name":"stone_type","Value":"granite_smooth"}],"ItemInstance":{"Id":1,"Metadata":1,"WantNbt":false}},
{"Id":1,"Data":3,"Name":"minecraft:stone","RuntimeId":4,"States":[{"Type":8,"Name":"stone_type","Value":"diorite"}],"ItemInstance":{"Id":1,"Metadata":2,"WantNbt":false}},
{"Id":1,"Data":4,"Name":"minecraft:stone","RuntimeId":5,"States":[{"Type":8,"Name":"stone_type","Value":"diorite_smooth"}],"ItemInstance":{"Id":1,"Metadata":3,"WantNbt":false}},
{"Id":1,"Data":5,"Name":"minecraft:stone","RuntimeId":6,"States":[{
@NiclasOlofsson
NiclasOlofsson / client_blob_cache.md
Created Jul 11, 2019 — forked from Tomcc/client_blob_cache.md
A description of the new Client Cache for server developers
View client_blob_cache.md

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

View Available Entity NBT
2019-06-06 22:00:12,632 [16] DEBUG MiNET.Client.BedrockTraceHandler - TAG_Compound: 1 entries {
TAG_List("idlist"): 103 entries {
TAG_Compound: 6 entries {
TAG_String("bid"): ":"
TAG_Byte("experimental"): 0
TAG_Byte("hasspawnegg"): 1
TAG_String("id"): "minecraft:villager_v2"
TAG_Int("rid"): 115
TAG_Byte("summonable"): 0
}
@NiclasOlofsson
NiclasOlofsson / enums.cs
Created Dec 13, 2017
All enums in bedrock 1.2
View enums.cs
public enum GameMode{
creative,
survival,
adventure,
c,
s,
a,
}
public enum RValueParam{
View mobspawns.txt
Entity Type: 4874 - 0x130a
Entity Family: 19 - 0x13
Entity Type ID: 10 - 0x0a Chicken
Metadata:
MetadataDictionary metadata = new MetadataDictionary();
metadata[0] = new MetadataLong(105561706725376); // 11000000000001000000000000010000000000000000000; CanClimb, Breathing, HasCollision, AffectedByGravity19, 33, 45, 46,
metadata[1] = new MetadataInt(1);
metadata[2] = new MetadataInt(0);
metadata[3] = new MetadataByte(0);
metadata[4] = new MetadataString("");
@NiclasOlofsson
NiclasOlofsson / fireworks.cs
Created Dec 4, 2017
MiNET fireworks example - all configs
View fireworks.cs
var fireworks = new ItemFireworks() {Count = 64};
fireworks.ExtraData = ItemFireworks.ToNbt(new ItemFireworks.FireworksData()
{
Explosions = new List<ItemFireworks.FireworksExplosion>()
{
new ItemFireworks.FireworksExplosion()
{
FireworkColor = new[] {(byte) 0},
FireworkFade = new[] {(byte) 1},
FireworkFlicker = true,
View form_example.json
{
"type": "custom_form",
"title": "Buying 61000 MineCoinsr for 4.99$",
"content": [
{
"type": "label",
"text": "6VIPr gives you ability to fly in hub, bfree diamond armorr on HungerGames and SkyWars and a 6Strength Vr potion in Duels!\nIt's absolutely secure!!"
},
{
"type": "input",
View commands
2017-09-09 15:00:39,376 WARN MiNET.Net.McpeAvailableCommands - Commands definitions 39
2017-09-09 15:00:39,382 DEBUG MiNET.Net.McpeAvailableCommands - clear, commands.clear.description, 0, 1, -1, 1
2017-09-09 15:00:39,382 DEBUG MiNET.Net.McpeAvailableCommands - clear, 4, player, 0x0010, False, 4, -1, -1, True
2017-09-09 15:00:39,382 DEBUG MiNET.Net.McpeAvailableCommands - clear, 4, itemName, 0x0030, True, -1, 9, -1, True
2017-09-09 15:00:39,382 DEBUG MiNET.Net.McpeAvailableCommands - clear, 4, data, 0x0010, False, 1, -1, -1, True
2017-09-09 15:00:39,382 DEBUG MiNET.Net.McpeAvailableCommands - clear, 4, maxCount, 0x0010, False, 1, -1, -1, True
2017-09-09 15:00:39,382 DEBUG MiNET.Net.McpeAvailableCommands - clone, commands.clone.description, 0, 1, -1, 2
2017-09-09 15:00:39,382 DEBUG MiNET.Net.McpeAvailableCommands - clone, 5, begin, 0x0010, False, 14, -1, -1, False
2017-09-09 15:00:39,382 DEBUG MiNET.Net.McpeAvailableCommands - clone, 5, end, 0x0010, False, 14, -1, -1, False
2017-09-09 15:00:39,382 DEBUG MiNET
You can’t perform that action at this time.