Skip to content

Instantly share code, notes, and snippets.

View Specnr's full-sized avatar
🎮
Yeah

Specnr

🎮
Yeah
View GitHub Profile
@Specnr
Specnr / seed_permutations.py
Created January 23, 2021 20:21
Finds all capitalization permutations of a given word, and converts them all to Minecraft seeds
def java_string_hashcode(s):
# Convert string to seed
# https://gist.github.com/hanleybrand/5224673
h = 0
for c in s:
h = (31 * h + ord(c)) & 0xFFFFFFFF
return ((h + 0x80000000) & 0xFFFFFFFF) - 0x80000000
def all_casings(input_string):
@Specnr
Specnr / SRG.ahk
Last active July 12, 2021 17:09
SRG Macro
; Made by Specnr
#NoEnv
SavesDirectory = C:\Users\Spencer\AppData\Roaming\.minecraft\saves\ ; Replace this with your minecraft saves
SetWorkingDir %SavesDirectory%
global delay := 36 ; Frame delay (1 frame = 16.66, round up to be safe)
SetKeyDelay, 0
IfNotExist, %SavesDirectory%
@Specnr
Specnr / MultiResetRSG-v0.24.4.ahk
Last active August 16, 2023 18:20
A multi-instance macro with instance freezing for Minecraft RSG (Depreciated, use the wall macro it has a multi mode :])
; Multi instance AHK resetting script
; Author Specnr
; Follow setup video (mainly for OBS setup) https://youtu.be/0gaG-P2XxrE
; Run the setup script https://gist.github.com/Specnr/b13dae781f1b70bb6592027205870c7e
; Follow extra instructions https://gist.github.com/Specnr/c851a92a258dd1fdbe3eee588f3f14d8#gistcomment-3810003
#NoEnv
#SingleInstance Force
@Specnr
Specnr / ResetRSG-v0.2.ahk
Last active October 8, 2021 04:35
A single-instance macro for RSG
#SingleInstance, Force
SendMode Input
SetWorkingDir, %A_ScriptDir%
global oldWorldsFolder := "C:\MultiInstanceMC\oldWorlds\"
global SavesDirectory = "C:\MultiInstanceMC\MultiMC\instances\1.16INST1\.minecraft\saves\"
MoveWorlds()
{
dir := SavesDirectories . "saves\"
@Specnr
Specnr / End-Practice.ahk
Created August 16, 2021 19:37
A macro for practicing endfights (specifically halfbow) in random worlds for Minecraft 1.16
#NoEnv
#SingleInstance Force
SetKeyDelay, 1
SetWinDelay, 1
SetTitleMatchMode, 2
; Steps:
; Update saves path (KEEP the backslash at the end of saves)
; Update load hotbar hotkey
@Specnr
Specnr / AutoResetRSG-v0.1.ahk
Created September 11, 2021 23:06
A biome-exclusive autoresetting AHK script for Minecraft RSG (Currently NOT legal)
; Biome-exclusive single-instance autoresetting AHK script
; Author: Specnr
; Depends on AutoReset Mod AND Chunk Mod v1.0.2+ AND (probably idk) FastReset
#NoEnv
#SingleInstance Force
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, 2
; default global variables
@Specnr
Specnr / MultiResetSetup-v0.3.ahk
Last active November 9, 2022 02:40
A setup script needed to run the MultiResetRSG script
#NoEnv
#SingleInstance Force
; Make sure all instances are unfrozen, and in order on the front of the taskbar
; Also have OBS open :)
SetKeyDelay, 1
SetWinDelay, 1
SetTitleMatchMode, 2
@Specnr
Specnr / MoveWorlds-v0.3.ahk
Last active October 4, 2022 02:21
Moves worlds of all open Minecrafts to a given directory (Read comment for instructions)
#SingleInstance, Force
SendMode Input
SetWorkingDir, %A_ScriptDir%
; Will move all New World/Speedrun # worlds from all open Minecrafts to oldWorldsFolder
global oldWorldsFolder := "C:\MultiInstanceMC\oldWorlds\" ; Old Worlds folder, make it whatever you want
IfNotExist, %oldWorldsFolder%
FileCreateDir %oldWorldsFolder%
@Specnr
Specnr / worldBopper9000.py
Last active May 5, 2022 16:30
DELETES all worlds called New World or Speedrun # in all instances
import shutil
import glob
import os
# Edit this
INST_FOLDER = "C:/MultiInstanceMC/MultiMC/instances"
with open("bop.log", "w") as log:
files = glob.glob(f'{INST_FOLDER}/*/.minecraft/saves/*')
for f in files:
@Specnr
Specnr / MultiInstanceStartup.py
Created December 8, 2021 16:51
Starts up all instances quickly via command line
import os
mmc = "C:\MultiInstanceMC\MultiMC" # Change this to match your mmc location
instance_format = "1.16INST" # Change this to match your instance naming convention (mine is 1.16INST1, 1.16INST2, etc)
instance_count = 9 # Change to match instance count
for i in range(1, instance_count+1):
print(f"Starting instance {instance_format}{i}")
os.system(f"{mmc}\MultiMC.exe -l {instance_format}{i}")