This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
rotations = [0, 180, 90, 270] | |
rotations_goals = [0, 270, 90, 180] | |
rotations_player = [0, 180, 90, 270] | |
with open("tiles.json", "r", encoding="utf-8") as f: | |
tiles = json.load(f)["data"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import copy | |
import pynbs | |
import shutil | |
import os | |
file1 = "megacollab parts 1-28.nbs" | |
file2 = "megacollab parts 29-50.nbs" | |
output_file = "megacollab_merged.nbs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydub import AudioSegment | |
import numpy as np | |
class Mixer: | |
def __init__(self): | |
self.parts = [] | |
def __len__(self): | |
parts = self._sync() | |
seg = parts[0][1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import functools | |
def force_async(fn): | |
''' | |
turns a sync function to async function using threads | |
''' | |
from concurrent.futures import ThreadPoolExecutor | |
import asyncio | |
pool = ThreadPoolExecutor() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################################################################## | |
# #PokeCA Model De-animator by Bentroen # | |
######################################################################################## | |
# # | |
# Usage instrucions: point 'input_path' to a folder containing the 'models' and # | |
# 'textures' folders from the original map's resource pack. The script will # | |
# fetch the correct model according to 'model_list', and export the following # | |
# to 'output_path': every frame to 'models/all_frames/', every first frame to # | |
# 'models/' and first frame of textures to 'textures/'. If the texture itself # | |
# is animated (changes from frame to frame, e.g. Ternion's blue fire), only # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import os | |
import shutil | |
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | |
# Change this to the version you want to extract the assets from | |
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv | |
version = "1.12-af" | |
minecraft_path = os.getenv('APPDATA') + r"\.minecraft\assets" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
import sys | |
print("=================================") | |
print("sounds.json generator by Bentroen") | |
print("=================================\n") | |