Skip to content

Instantly share code, notes, and snippets.

@25A0
25A0 / patch.diff
Created March 28, 2019 15:15
mapcrafter naïve patch for new 1.14 chunk format
diff --git a/src/mapcraftercore/mc/chunk.cpp b/src/mapcraftercore/mc/chunk.cpp
index 12f318b..6c78f41 100644
--- a/src/mapcraftercore/mc/chunk.cpp
+++ b/src/mapcraftercore/mc/chunk.cpp
@@ -173,7 +173,7 @@ bool Chunk::readNBT(mc::BlockStateRegistry& block_registry, const char* data, si
const nbt::TagString& tag = level.findTag<nbt::TagString>("Status");
// completely generated chunks in fresh 1.13 worlds usually have status 'fullchunk' or 'postprocessed'
// however, chunks of converted <1.13 worlds don't use these, but the state 'mobs_spawned'
- if (!(tag.payload == "fullchunk" || tag.payload == "postprocessed" || tag.payload == "mobs_spawned")) {
+ if (!(tag.payload == "fullchunk" || tag.payload == "full" || tag.payload == "postprocessed" || tag.payload == "mobs_spawned")) {
@25A0
25A0 / _Voxel_Projector_Guide.md
Last active December 20, 2017 21:27
Random Things Voxel Projector guide

Random Things Voxel Projector guide

This guide will explain step by step how to display MagicalVoxel models in modded Minecraft, using the Voxel Projector from Random Things.

Tested with Random Things v3.7.7.1 for Minecraft v1.10.2 in singleplayer.

@25A0
25A0 / bruteforce.c
Last active April 14, 2017 22:15
Dumb bruteforcer to find preimages of capital letters([A-Z ]+) for a JavaScript 'hash' function (this one: http://werxltd.com/wp/2010/05/13/javascript-implementation-of-javas-string-hashcode-method/)
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/*
String.prototype.hashCode = function() {
var hash = 0, i, chr;
if (this.length === 0) return hash;
for (i = 0; i < this.length; i++) {
chr = this.charCodeAt(i);
@25A0
25A0 / This is fine.md
Last active November 4, 2022 08:36
This is fine. ASCII art

This is fine. ASCII art

preview

There are two versions, one is for dark letters on a bright background, the other one for bright letters on a dark background.

The bright on dark version looks better, so go for that one if you can :)

Dark letters on a bright background

Keybase proof

I hereby claim:

  • I am 25a0 on github.
  • I am 25a0 (https://keybase.io/25a0) on keybase.
  • I have a public key ASCf8RLRHCH3xtnH4EguShkqSMmVP6j7-sWoB40XgyALsQo

To claim this, I am signing this object: