Skip to content

Instantly share code, notes, and snippets.

bincont = b"\x34\x83\x12\x6F"
def bitlist(inbytes):
output = []
for byte in reversed(inbytes):
for i in range(0, 8):
bit = byte & (1 << i)
if bit:
output.append(1)
else:
[
[
["MAIN", "block", 346],
[0, "DESCRIPTOR_NAME", "string"],
[16, "TEMPLATE_NAME", "string"],
[32, "COMM_TYPE", "enum", {
"0": "byte",
"1": "word"
}],
[34, "COMM_ORDER", "enum", {
import mysql.connector as mysql
# Convert Ultrabans to Ban Management database
#0: "Banned"
#1: "IPBanned"
#2: "Warn"
#3: "Kick"
#5: "Unban"
#6: "Jailed"
import mysql.connector as mysql
import uuid
import yaml
import time
filepath = "playerfiles/"
conn = mysql.connect(user="", password="",
host="localhost", database="mc_global_gesuit")
import mysql.connector as mysql
import yaml
filepath = "warps/"
conn = mysql.connect(user="", password="",
host="localhost", database="mc_global_gesuit")
print("Fetching data")
cur = conn.cursor()
import mysql.connector as mysql
import yaml
group_ids = {
1: ("Guest", [], 10),
2: ("Builder", [], 20),
3: ("Trusted", [], 30),
4: ("Trusted", ["Donator"], 0),
5: ("Guard", [], 50),
6: ("Moderator", [], 60),
import os.path
import re
oldfiles = "playerfiles/"
newfiles = "newfiles"
logre = re.compile("logout: (\d+)")
for filename in os.listdir(oldfiles):
oldpath = os.path.join(oldfiles, filename)
newpath = os.path.join(newfiles, filename)
import os.path
import yaml
import string
import math
oldfiles = "newfiles/"
newfiles = "homefix/"
allowedchars = string.ascii_letters+string.digits+"_"
for filename in os.listdir(oldfiles):
import yaml
import os.path
import collections
import copy
from pprint import pprint
configpath = "config.yml"
groupspath = "groups/"
worldspath = "worlds/"
outputpath = "final/"
Blocks:
PIXELMON_POKEHEALER 165
PIXELMON_THUNDERSTONE_ORE 166
PIXELMON_LEAFSTONE_ORE 167
PIXELMON_WATERSTONE_ORE 168
PIXELMON_FIRESTONE_ORE 169
PIXELMON_DAWNSTONE_ORE 176
PIXELMON_PC_BLOCK 177
PIXELMON_PIXELMON_ANVIL 178
PIXELMON_FOSSIL_MACHINE_BLOCK 179