Skip to content

Instantly share code, notes, and snippets.

@ljfa-ag
ljfa-ag / modelbase_to_layerdefinition.perl
Last active November 1, 2022 14:01
Script for converting ModelBase Java code to the newer LayerDefinition format in Minecraft
#!/usr/bin/env perl
# Released into Public Domain
# A quick and dirty script to convert ModelBase Java code (for example,
# generated by Techne) into the LayerDefinition format used by newer Minecraft
# versions (1.17+). This might be useful for adapting old Entity or BlockEntity
# models.
# This script outputs Java code for a static method that returns a
# LayerDefinition for the model, as typical for Model subclasses in Minecraft.
@ljfa-ag
ljfa-ag / modelbase_to_json.perl
Last active November 1, 2022 14:02
Script for converting exported Techne models for Minecraft into other model formats
#!/usr/bin/env perl
# Released into Public Domain
# A quick and dirty script to convert ModelBase Java code as generated
# by Techne (or possibly Tabula) into Minecraft's JSON model format.
# It is quite limited (it does not handle rotations, as the JSON model format
# is limited in that regard anyway), but it is at least a help.
# Usage:
# modelbase_to_json input.java > output.json

Keybase proof

I hereby claim:

  • I am ljfa-ag on github.
  • I am ljfa (https://keybase.io/ljfa) on keybase.
  • I have a public key whose fingerprint is 3EA4 0D31 A0D4 69E1 047F 65DA 41F7 AB39 7036 78A7

To claim this, I am signing this object:

@ljfa-ag
ljfa-ag / GuiTest.java
Last active February 10, 2016 21:58
An example for rendering blocks into GUIs. Video: http://gfycat.com/LivelyUnimportantBullfrog
import java.util.Random;
import org.apache.logging.log4j.Level;
import org.lwjgl.opengl.GL11;
import cpw.mods.fml.common.FMLLog;
import net.minecraft.block.Block;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.Tessellator;
@ljfa-ag
ljfa-ag / aspect_colors.lua
Created October 8, 2015 10:25
A Computercraft program that I used in the past to manage and refill Thaumcraft jars with Logistics Pipes. It's outdated by now and probably won't work without major adaptations.
--The MIT License (MIT)
--Copyright (c) 2014-2015 ljfa
--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: