V1 of the NBT library did some things that in hindsight were a bad idea. V3 of the NBT library is a large overhaul that adds a number of features and removes some as well. V2 is a bridge between the versions. It has all the good parts of V3 the bad parts of V1 depreciated. This means that the old code should, for the most part, continue to work but with a lot of warnings in the console. If you are a code author you should look over the changelog and your code and update it to use the new API.
This file contains hidden or 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 urllib.request import urlopen, Request | |
import json | |
# The Github API has a rate limit. This can be increased with the use of an access token. | |
# An access token is required if there are many releases. | |
# You can create one here: https://github.com/settings/tokens/new | |
# The access token does not need any permissions unless you are using this on a private repository in which case it needs the repo permission. | |
TOKEN = "" # Put your token here. Do not share it online. | |
OWNER = "Amulet-Team" |
This file contains hidden or 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 threading import Thread, get_ident | |
import time | |
# ThreadingEnabled = False | |
ThreadingEnabled = True | |
def main(): | |
class DummyObj: | |
def __init__(self): |