Skip to content

Instantly share code, notes, and snippets.


quaternary quat1024

View GitHub Profile
quat1024 / Reg.xml
Created Jul 1, 2021
All my custom intellij live templates as of right now
View Reg.xml
<template name="Reg" value="Registry" description="Registry" toReformat="false" toShortenFQNames="false">
<option name="JAVA_DECLARATION" value="true" />
<option name="JAVA_EXPRESSION" value="true" />
<option name="JAVA_STATEMENT" value="true" />
quat1024 / readme.txt
Last active Mar 20, 2021
Good title for my puzzle game (PuzzleScript Script)
View readme.txt
Play this game by pasting the script in
quat1024 /
Created Jan 21, 2021
convert gifs from Zachtronics games to mp4 files and squirrel them away in a subfolder (place this on your desktop)
mkdir -p zach/conv
mkdir -p zach/orig
for file in *.gif; do
echo "Converting $file"
ffmpeg -y -hide_banner -loglevel error -stats -i "$file" -crf 15 -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" "./zach/conv/${file%.*}.mp4"
mv "$file" "./zach/orig/$file"
quat1024 / fix
Last active Feb 23, 2021
Fix stuff being broke in IntelliJ.
View fix


When compiling mods in recent versions of IntelliJ, weird things start happening:

  • With ForgeGradle 2 (1.12-), none of the assets show up in-game (language keys, models, textures etc)
  • Broken hotswapping.
  • Potentially other Bad, Terrible Things that are yet to be discovered.


quat1024 / index.html
Last active May 24, 2020
new incarnation of the start page...
View index.html
<link rel="stylesheet" type="text/css" href="./style.css" />
<div class="grid">
<div class="square new">
<div>New Tab.</div>
quat1024 / we out here
Last active Jan 19, 2020
Probably Very Wrong Overview of Resource Reloading in 1.14.4/Fabric
View we out here


If you want to load some resources or data in Fabric 1.14 or 1.15, do this:

ResourceManagerHelper.get(ResourceType.ASSETS).registerReloadListener(new SimpleResourceReloadListener<MyResource>() {
  public Identifier getFabricId() {
    return new Identifier("some_identifier", "that_describes_this_task");
quat1024 / results.csv
Created Aug 29, 2019
minecraft 1.14.4 OctavePerlinNoiseSampler range test
View results.csv
octaves min max
1 -0.9969206357348224 0.9548434333558826
2 -2.467316652344656 2.328985326760562
3 -4.87585625756149 5.042024033453523
4 -10.471273767083549 9.815261877437226
5 -19.49006180243939 20.237465228549873
6 -38.99800348214662 39.152905589627906
7 -77.5585684240792 85.56938743688391
8 -176.25487846647394 162.466075461866
9 -335.0233240038607 319.2838169712373
quat1024 /
Last active Feb 12, 2019
matching nbt tags w/ recipe items
private static boolean isTagSubset(@Nullable NBTTagCompound recipeTag, @Nullable NBTTagCompound suppliedTag) {
//check that the user supplied item has, at least, the same nbt tags as the recipe item
//it is OK if the supplied item has *more* tags - however all the tags that *are* specified
//in the recipe item must match
//check easy cases
//if there's no specified recipe nbt tag, anything goes
if(recipeTag == null || recipeTag.isEmpty()) return true;
//if the recipe has nbt but the supplied item doesn't, there's no way it can match
if(suppliedTag == null || suppliedTag.isEmpty()) return false;
quat1024 / readme.txt
Last active Jan 7, 2019
Multiplicity (PuzzleScript Script)
View readme.txt
Play this game by pasting the script in