Skip to content

Instantly share code, notes, and snippets.

View unascribed's full-sized avatar

Una Kearney unascribed

View GitHub Profile
@unascribed
unascribed / MaterialColor.java
Last active September 22, 2015 01:18
Premade Material Design color palettes for varying target platforms
package com.droidhackers.misc;
public class MaterialColor {
// File created by Aesen Vismea based off the Google Material Design spec
// http://www.google.com/design/spec/style/color.html#color-color-palette
// This is the Java edition.
// Updates: https://gist.github.com/AesenV/1cfc377df2fca5d00732
public static final int RED_50 = 0xFFFFEBEE;
@Override
public Multimap getAttributeModifiers(ItemStack stack) {
Multimap multimap = super.getAttributeModifiers(stack);
double damage = /* ... */;
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(),
new AttributeModifier(field_111210_e, "<My item> damage modifier", damage, 0));
return multimap;
}
if [ "$DESIRED_RELEASE" == "recommended" ]; then
# this is unholy, but Forge doesn't appear to supply an API, and
# their Maven repo appears to not be well formed
DESIRED_RELEASE=`curl -s http://files.minecraftforge.net/ |
grep -m 1 -A 2 '<td>Recommended' |
grep -v 'Recommended' |
cut -d '>' -f 2 |
cut -d '<' -f 1 |
tac |
head -c -1 |