Skip to content

Instantly share code, notes, and snippets.

View falkreon's full-sized avatar

Falkreon falkreon

View GitHub Profile

*excerpt from slab6.txt in the SLAB6 download found at http://advsys.net/ken/download.htm#slab6 *

VOX file format

Both SLABSPRI&SLAB6(D) support a simpler, uncompressed voxel format using the VOX file extension. Here's some C pseudocode that describes the format:

long xsiz, ysiz, zsiz;          //Variable declarations
char voxel[xsiz][ysiz][zsiz];
@falkreon
falkreon / Lcm.java
Created December 11, 2019 19:07
Fraction shenanigans
/** Returns the greatest common divisor (factor) of positive integers a and b
* <p>Source: https://en.wikipedia.org/wiki/Binary_GCD_algorithm
*/
private static int gcdUnsigned(int u, int v) {
// simple cases (termination)
if (u == v) return u;
if (u == 0) return v;
if (v == 0) return u;
// look for factors of 2
@falkreon
falkreon / cybertruck_facts.md
Created November 27, 2019 20:26
Master List of Cybertruck Facts

People misunderstand the design a lot; the cybertruck is really the native-cybertron version of Devastator's foot.

The cybertruck is what would happen if EA asked themselves, "what if you could play as the loot crate?"

The cybertruck is what happens when you make something that is already "for men", for men.

With cybertruck Razr answered the question, "what if a car was RGB?"

The cybertruck is like a Tardis, but it's the same size on the inside.

@falkreon
falkreon / JRD.java
Created May 19, 2019 20:14
Webfinger object example
package io.github.ionch.aptest.ap;
import java.util.List;
import javax.annotation.Nullable;
import java.util.ArrayList;
import java.util.HashMap;
/**
@falkreon
falkreon / build.gradle
Created August 30, 2018 19:03
endless.blue option for Jankson dependency resolution
repositories {
ivy {
name "endless.blue dependency mirror";
artifactPattern "https://endless.blue/files/ivy/[module]-[revision].[ext]";
}
}
dependencies {
compile "blue.endless:Jankson:0.0.4";
}
@falkreon
falkreon / exception.log
Last active July 7, 2018 11:41
"RSSI" seems to be an invalid property on the BlueZ Device1 interface
Exception in thread "Thread-6" org.freedesktop.dbus.exceptions.DBusExecutionException: No such property 'RSSI'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.freedesktop.dbus.Error.getException(Error.java:141)
at org.freedesktop.dbus.Error.throwException(Error.java:171)
at org.freedesktop.dbus.RemoteInvocationHandler.executeRemoteMethod(RemoteInvocationHandler.java:158)
at org.freedesktop.dbus.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:222)
at com.sun.proxy.$Proxy3.Get(Unknown Source)
@falkreon
falkreon / crash.log
Created June 2, 2018 05:00
RFTools clientside WorldData access
[00:55:27] [main/FATAL] [net.minecraft.client.Minecraft]: Unreported exception thrown!
java.lang.RuntimeException: Don't access this client-side!
at mcjty.lib.worlddata.AbstractWorldData.getData(AbstractWorldData.java:48) ~[AbstractWorldData.class:?]
at mcjty.rftools.blocks.blockprotector.BlockProtectors.getProtectors(BlockProtectors.java:66) ~[BlockProtectors.class:?]
at mcjty.rftools.blocks.blockprotector.BlockProtectors.getProtectors(BlockProtectors.java:36) ~[BlockProtectors.class:?]
at mcjty.rftools.ForgeEventHandlers.onPlayerInteractEvent(ForgeEventHandlers.java:190) ~[ForgeEventHandlers.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_2053_ForgeEventHandlers_onPlayerInteractEvent_PlayerInteractEvent.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) ~[EventBus.class:?]
at net.minecraftforge.common.Forge
@falkreon
falkreon / crash.log
Created May 29, 2018 15:06
More CoModExes in Betweenlands
[10:28:57] [Server thread/ERROR] [FML]: Exception caught during firing event net.minecraftforge.fml.common.gameevent.TickEvent$WorldTickEvent@5d37e844:
java.util.ConcurrentModificationException: null
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:909) ~[?:1.8.0_162]
at java.util.ArrayList$Itr.next(ArrayList.java:859) ~[?:1.8.0_162]
at thebetweenlands.common.world.storage.WorldStorageImpl.tick(WorldStorageImpl.java:252) ~[WorldStorageImpl.class:?]
at thebetweenlands.common.world.storage.BetweenlandsWorldStorage.tick(BetweenlandsWorldStorage.java:135) ~[BetweenlandsWorldStorage.class:?]
at thebetweenlands.common.handler.WorldEventHandler.tickWorld(WorldEventHandler.java:141) ~[WorldEventHandler.class:?]
at thebetweenlands.common.handler.WorldEventHandler.onWorldTick(WorldEventHandler.java:123) ~[WorldEventHandler.class:?]
at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_1958_WorldEventHandler_onWorldTick_WorldTickEvent.invoke(.dynamic) ~[?:?]
at net.minecraftforge.fml.comm
@falkreon
falkreon / DeepEnergyHandler.java
Last active May 19, 2018 13:35
Gaze upon my new non-euclidean horror and weep.
/*
* MIT License
*
* Copyright (c) 2018 Isaac Ellingson (Falkreon) and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
// ==UserScript==
// @name Cybre.space Select Fix
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Stops text being mysteriously selected when you click underneath the toot box
// @author Falkreon, Unascribed
// @match https://cybre.space/*
// @grant none
// ==/UserScript==