Skip to content

Instantly share code, notes, and snippets.

#!/bin/python3
fr = open("prime.txt")
s = fr.read(2000)
s = s.replace("\n","").replace(" ","")
i = int(s)
fw = open("prime.gz","wb")
# Using pymclevel.nbt, source here: https://github.com/mcedit/pymclevel/blob/master/nbt.py
import pymclevel.nbt as nbt
nbtTag = nbt.load(path_to_nbt_file)
# Do some stuff here
nbtTag.save(path_to_nbt_file)
@majaha
majaha / gist:d9f1bda86f3b6762a8c8
Created August 10, 2014 02:46
MCEdit getting data folder in any dimension
if level.dimNo == 0:
dataPath = level.worldFolder.getFolderPath("data")
else:
dataPath = level.parentWorld.worldFolder.getFolderPath("data")