Skip to content

Instantly share code, notes, and snippets.

import json
from collections import OrderedDict
from pathlib import Path
# CHANGE THIS LINE!!!
master_spell_file = json.loads(Path("C://absolute/path/to/spells_1646435987882452000.json").read_text(encoding = "utf-8"))
all_spells = {}
for spell_level in master_spell_file:
for spell in master_spell_file[spell_level]:
@TheNathanSpace
TheNathanSpace / README.md
Last active October 8, 2021 18:10
Hypixel Online Alert Bot

This bot sends a message to a Discord channel when someone connects or disconnects to Hypixel. This bot waits 5 seconds between cycles. If you have more than 10 players in your player_dict, you'll start running into Hypixel API trouble, since you can't make more than 120 requests per minute.

You'll need to install the PyPixel package from here.

You'll need to create a Discord bot. Be sure to put all the relevant secrets in secrets.py. Set the channel in line 29 of api_manager.py.

@TheNathanSpace
TheNathanSpace / MYMOD.java
Created November 10, 2020 14:43
Register sounds using DeferredRegister
@Mod ("mymod")
public class MYMOD
{
public static final String MODID = "mymod";
public MYMOD()
{
ModSounds.registerSounds();
}
}
// Program: Sample Arduino code for a flying fader
// Purpose: Demonstrating how to not use blocking code when moving a motor back and forth based on a analog sensor input
// Programmer: LRTNZ
// Date: 13/05/2020
// |------------|
// | Pin Values |
// |------------|
// Motor Pins
Here's an example of sending packets from the client to the server!