Skip to content

Instantly share code, notes, and snippets.

function leftPad1(str, len, ch) {
return new Array(len - str.length).fill(!ch && ch !== 0 ? ' ' : ch).join("") + str;
}
function leftPad2(str, len, ch) {
str = String(str);
var i = -1;
if (!ch && ch !== 0) ch = ' ';
len = len - str.length;
while (++i < len) {
@NathanHuisman
NathanHuisman / big_island_seeds.txt
Created December 31, 2021 13:56
Big spawn island seeds
#Version: 1.12.1
#Time: ma dec. 27 17:59:09 2021
#MC: 1.18
#Search: 1
#Progress: 9997709697785795853
#Threads: 8
#ResStop: 0
#Mode48: 0
#HutQual: 0
#MonArea: 13028
@NathanHuisman
NathanHuisman / extract_inventories.py
Created November 4, 2021 22:02
Code to scan minecraft world for items in tile entities.
"""
A python script I put together in a couple of minutes (I'm lying, hours)
to go though a minecraft world and read all the tile entities.
Player inventories are not scanned yet.
License MIT (whatever)
Dependencies are numpy and pynbt
Nathan Huisman, 2021