Skip to content

Instantly share code, notes, and snippets.

Sid Meier's 10 Rules of Game Design
1. Choose a topic you have a passion for. Game Design is about creativity.
2. Do research after the game is done. Tap into the player’s brain.
3. Define your axioms, refine your axioms. Prototype, prototype, prototype; sit in all the chairs.
4. Double it or cut it in half. You are more wrong than you think.

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@codetaylor
codetaylor / version.sh
Last active August 14, 2017 05:23
Git versioning script
#!/bin/bash
# Initialize a string with dashes.
printf -v fill "%80s" ""
fill="${fill// /-}"
# Function for printing headers.
printfmt() { printf '%s%0.'$(( 80 - ${#1} - ${#2} ))'s%s\n' "$1" "$fill" "$2"; }
# Common header formatting.
@codetaylor
codetaylor / gist:0458f82807b9a3875a0e54216918053c
Created December 10, 2017 01:00
java.lang.NoClassDefFoundError: one/flexo/nibbler/registry/NibblerRegistry
---- Minecraft Crash Report ----
// I feel sad now :(
Time: 12/9/17 4:54 PM
Description: There was a severe problem during mod loading that has caused the game to fail
net.minecraftforge.fml.common.LoaderExceptionModCrash: Caught exception from Nibbler (nibbler)
Caused by: java.lang.NoClassDefFoundError: one/flexo/nibbler/registry/NibblerRegistry
at one.flexo.nibbler.Nibbler.<clinit>(Nibbler.java:46)
at java.lang.Class.forName0(Native Method)
---- Minecraft Crash Report ----
WARNING: coremods are present:
AppleCore (AppleCore-mc1.12.2-3.1.0.jar)
BNBGamingCore (BNBGamingCore-1.12-0.5.1.jar)
ColytraLoadingPlugin (colytra-1.12.2-1.0.4.2.jar)
IMLoadingPlugin (infinimend-1.12-1.0.2.jar)
CTMCorePlugin (CTM-MC1.12-0.2.3.9.jar)
MalisisCorePlugin (malisiscore-1.12.2-6.3.0.jar)
DynamicSurroundingsCore (DynamicSurroundings-1.12.2-3.4.7.2.jar)
---- Minecraft Crash Report ----
WARNING: coremods are present:
CTMCorePlugin (CTM-MC1.12-0.2.3.9.jar)
Contact their authors BEFORE contacting forge
// Why did you do that?
Time: 12/10/17 5:31 PM
Description: There was a severe problem during mod loading that has caused the game to fail
---- Minecraft Crash Report ----
WARNING: coremods are present:
CTMCorePlugin (CTM-MC1.12-0.2.3.9.jar)
Contact their authors BEFORE contacting forge
// Surprise! Haha. Well, this is awkward.
Time: 12/10/17 5:43 PM
Description: Initializing game
package com.sudoplay.mc.pwcustom.lib;
import com.google.common.base.Preconditions;
import com.sudoplay.mc.pwcustom.ModPWCustom;
import com.sudoplay.mc.pwcustom.lib.spi.IBlockVariant;
import com.sudoplay.mc.pwcustom.lib.spi.IVariant;
import net.minecraft.block.Block;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
@codetaylor
codetaylor / gist:a22649fcedb7bc5ed48e0ddcd98c32cb
Last active December 23, 2017 08:28
Some notes for Yuudaari
// -----------------------------------------------------------------------
So it looks like the only thing that I do differently is explicitly register an ItemMultiTexture for the block with variants
and then do some mapping for the models.
Side note, this is a good resource:
https://github.com/Choonster-Minecraft-Mods/TestMod3/tree/1.12.2/src/main/java/choonster/testmod3
https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/1.12.2/src/main/java/choonster/testmod3/block/BlockVariants.java
https://github.com/Choonster-Minecraft-Mods/TestMod3/blob/1.12.2/src/main/java/choonster/testmod3/init/ModBlocks.java#L184
Here is the ItemMultiTexture.
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: net/minecraft/client/gui/inventory/GuiContainer
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_144]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_144]
at net.minecraft.util.Util.runTask(Util.java:54) [Util.class:?]
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:796) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.updateTimeLightAndEntities(DedicatedServer.java:414) [DedicatedServer.class:?]
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:741) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:590) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_144]
Caused by: java.lang.NoClassDefFoundError: net/minecraft/client/gui/inventory/GuiContainer