Skip to content

Instantly share code, notes, and snippets.

View tildejustin's full-sized avatar

justin tildejustin

View GitHub Profile
import csv
import json
import os
import re
import requests
from packaging.version import Version
version_manifest_url = "https://launchermeta.mojang.com/mc/game/version_manifest.json"
libraries = {}
@tildejustin
tildejustin / disable_narrator.json
Created September 1, 2025 20:29
prism component to disable the narrator hotkey
{
"formatVersion": 1,
"libraries": [
{
"downloads": {
"classifiers": {
"natives-linux": {
"sha1": "ac641755a2a841d1fca9e660194f42523ee5cfe0",
"size": 7833,
"url": "https://libraries.minecraft.net/com/mojang/text2speech/1.11.3/text2speech-1.11.3-natives-linux.jar"
import datetime
import requests
def get_runs_until(game: str, until: datetime.date) -> list[str]:
runs = []
next_uri = f"https://www.speedrun.com/api/v1/runs?game={game}&orderby=submitted&direction=desc&=&max=200"
while next_uri != None:
res = requests.get(next_uri).json()
if not res.get("data"):
break
@tildejustin
tildejustin / MaC_speedrunigt_debug_log.txt
Created December 18, 2024 18:35
log from speedrunigt MaC dev, just looks cool
Prism Launcher version: 8.0 (archlinux)
Launched instance in online mode
authserver.mojang.com resolves to:
[**.**.**.**, **.**.**.**, **.**.**.**, **.**.**.**]
session.minecraft.net resolves to:
[**.**.**.**, **.**.**.**, ****:****:****:****:****:****:****:****, ****:****:****:****:****:****:****:****]
@tildejustin
tildejustin / 1.18-set-spawn-write-up.md
Created August 25, 2024 02:22
something about spawn logic that i wrote sometime last year

assuming getSpawnRadius -> 10 for now for simplicity
and assuming player is further from the world border than the spawnRadius, again, for simplicity
i = 10: spawnRadius
l = 21: width / height of spawn square
m = 441: area of spawn square
k = m = 441: area of spawn square (integer overflow safe)
n = 17: spawnOffsetMultiplier, is 17 if area of spawn square is > 16, which it almost certainly is
o is random called in range of k (spawn square area)
p = 0: start of a loop maxing out in k steps, p is incremented every time
in loop:

@tildejustin
tildejustin / villagechance.py
Created August 25, 2024 02:16
villager trade probability simulator for 1.3
import random
def add_item(name: str, chance: float, offers_list: list):
if random.random() < chance:
offers_list.append(name)
def get_brown_coat_trade() -> str:
new_offers = []
add_item("wheat", .9, new_offers)
add_item("wool", .5, new_offers)
@tildejustin
tildejustin / end_hash.py
Created August 25, 2024 02:13
20w14inf something or other sitting on my hard drive
import hashlib
import random
# 264^4 dimensions
# need hash to equal 2
def get_string(input: str) -> str:
# stolen from net.minecraft.world.dimension.DimensionHashHelper$getHash
return input + ":why_so_salty#LazyCrypto"
This file has been truncated, but you can view the full file.
tiny 2 0 official intermediary named
c a net/minecraft/class_1442 net/minecraft/util/Formatting
f Z A field_5480 modifier
f Ljava/lang/String; B field_5481 stringValue
f I C field_9145 colorIndex
f [La; D field_5482 field_1072
f La; a field_5483 BLACK
f La; b field_5484 DARK_BLUE
f La; c field_5485 DARK_GREEN
f La; d field_5486 DARK_AQUA
{
"schemaVersion": 5,
"mods": [
{
"modid": "sodium",
"name": "Sodium",
"description": "Sodium is a free and open-source optimization mod for Minecraft which improves frame rates and reduces lag spikes.",
"versions": [
{
"target_version": [