Skip to content

Instantly share code, notes, and snippets.

View Earthcomputer's full-sized avatar

Joseph Burton Earthcomputer

View GitHub Profile
@Earthcomputer
Earthcomputer / README.md
Last active July 4, 2021 13:16
Fabric Mod README Template

$mod_name

$mod_description

Installation

  1. Download and run the Fabric installer.
    • Note: this step may vary if you aren't using the vanilla launcher or an old version of Minecraft.
  2. Download the Fabric API and move it to the mods folder (.minecraft/mods).
  3. Download $mod_name from the releases page
@Earthcomputer
Earthcomputer / README.md
Last active July 4, 2021 13:15
Template readme for alpha fabric mods

$mod_name

$mod_description

Installation

  1. Download and install MultiMC if you haven't already.
  2. If you haven't already, press "create instance", and press "import from zip", and paste the following URL into the text field: https://cdn.discordapp.com/attachments/666758878813487136/699323306637262928/fabric-alpha.zip
  3. Download $mod_name from the releases page.
  4. Click on your new MultiMC instance and click "edit instance" on the right. Click "loader mods" then "add", and navigate to the mod you just downloaded, and press OK.

Contributing

@Earthcomputer
Earthcomputer / sideonly-rework.md
Created August 23, 2020 20:25
Rework of SideOnly inspections

Rework of SideOnly inspections

MinecraftDev's SideOnly inspections gave an error when you tried to access client-only code from common code, helping to prevent a common cause of crashes on the dedicated server.

Motivation

While they were very useful in the right circumstances, the old SideOnly inspections have a number of flaws which ultimately meant they didn't see the widespread use that was originally hoped for. The problems I'm about to outline led to them being disabled by default, so not everyone even knew they existed. While I was maintaining a fork of MinecraftDev with Fabric support (now merged upstream), I randomly came across them when scrolling through my inspections list, hacked together a fix so it would work with Fabric's @Environment annotation, and enabled them by default in my fork. This was a partial success, but still shared some of the issues as before. So, what are these issues? They can be broken down into 5 key problems with the old inspections:

  1. Litter. In order to use
@Earthcomputer
Earthcomputer / make_server.py
Last active February 3, 2023 14:50
A simple python script to download a Minecraft server of any version
#!/usr/bin/python
import datetime
import json
import pathlib
import shutil
import sys
import urllib.request
date_13w39a = datetime.datetime(2013, 9, 26, 15, 11, 19, tzinfo = datetime.timezone.utc)
@Earthcomputer
Earthcomputer / main.cu
Created January 15, 2024 21:20
Amethyst cluster finder
#include <algorithm>
#include <chrono>
#include <iostream>
#include <sstream>
#include <thread>
#include <vector>
#ifdef _MSC_VER
#include <immintrin.h>
#endif