Skip to content

Instantly share code, notes, and snippets.

View dredhorse's full-sized avatar

Don Redhorse dredhorse

View GitHub Profile
@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
@windy1
windy1 / EntityDeathEvent.java
Created December 9, 2012 01:06
EntityDeathEvent
class EntityDeathEvent extends EntityEvent {
@Getter
@Setter
List<ItemStack> droppedItems;
@Getter
@Setter
int droppedExp;
@Getter
@Setter
String message;
#!/bin/bash
MCP_VERSION="721"
FORGE_VERSION="latest"
MCP_URL="https://dl.dropbox.com/s/dao8itysfwuhj9q/mcp$MCP_VERSION.zip?dl=1"
FORGE_URL="http://files.minecraftforge.net/minecraftforge-src-$FORGE_VERSION.zip"
mkdir -p forge
cd forge
@Afforess
Afforess / gist:4013360
Created November 4, 2012 19:55
Death Cause Factory pattern
public enum DeathCause implements DeathCauseFactory {
DROWNING {
public Cause<?> buildCause(Entity victim, Entity killer) {
return new DrowningCause(victim);
}
},
FALLING {
public Cause<?> buildCause(Entity victim, Entity killer) {
//TODO