Skip to content

Instantly share code, notes, and snippets.

@eutro
eutro / Day8.java
Last active December 8, 2020 14:32
Day 8 of AoC 2020 but it compiles to Java bytecode.
import java.io.*;
import java.util.*;
import java.util.stream.*;
import org.objectweb.asm.*;
import org.objectweb.asm.commons.*;
import static org.objectweb.asm.Opcodes.*;
public class Day8 {
@eutro
eutro / framing.zs
Last active July 26, 2020 21:10
Frame your drawers by hand!
import crafttweaker.item.IItemStack;
import crafttweaker.item.IIngredient;
import crafttweaker.data.IData;
import crafttweaker.recipes.IRecipeFunction;
val framingMaterial as IIngredient = <*>.only(function(stack as IItemStack) as bool {
if(!stack.isItemBlock) {
return false;
}
return stack.asBlock().definition.getStateFromMeta(stack.metadata).opaqueCube;
@eutro
eutro / contenttweaker.zs
Last active June 16, 2020 20:58
Extra S'mores
#loader contenttweaker
import mods.contenttweaker.VanillaFactory;
import mods.contenttweaker.IItemFoodEaten;
import crafttweaker.potions.IPotion;
var smingots as string[] = [
"eightsmore",
"sixteensmore",
"thirtytwosmore",
#loader contenttweaker
import mods.contenttweaker.VanillaFactory;
import mods.contenttweaker.BlockMaterial;
VanillaFactory.createBlock("microverse_casing", <blockmaterial:iron>).register();
VanillaFactory.createBlock("microverse_vent", <blockmaterial:iron>).register();
This file has been truncated, but you can view the full file.
[14:10:50] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[14:10:50] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[14:10:50] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[14:10:50] [main/INFO] [FML]: Forge Mod Loader version 14.23.5.2847 for Minecraft 1.12.2 loading
[14:10:50] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_51, running on Windows 10:amd64:10.0, installed at D:\MyGames\Minecraft\runtime\jre-x64
[14:10:51] [main/WARN] [FML]: The coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin) is not signed!
[14:10:51] [main/WARN] [FML]: The coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin) is not signed!
[14:10:51] [main/INFO] [FML]: Searching C:\Users\John\AppData\Roaming\.minecraft\mods for mods
[14:10:51] [main/INFO] [FML]: Searching C:\Users\John\AppData\Roaming
/**
Copyright (c) <year> <copyright holders>
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
furnished to do so, subject to the following conditions:
(fn [& args]
(apply
((*tricks* (nth args 0)) :func)
(drop 1 args)
)
)