Skip to content

Instantly share code, notes, and snippets.

@gabizou
Forked from Deamon5550/gist:6ecac09683eb7dd56492
Last active August 29, 2015 14:11
Show Gist options
  • Save gabizou/92bd3fd9739c1cb3b712 to your computer and use it in GitHub Desktop.
Save gabizou/92bd3fd9739c1cb3b712 to your computer and use it in GitHub Desktop.
interface ItemType
{
int getMaxDamage();
}
class net.minecraft.src.Item
{
...
int getMaxDamage() //becomes func_24925_a
{
return this.maxDamage;
}
...
}
@Mixin(Item.class)
@Implements(@Interface(iface = ItemType.class, prefix = "sp$"))
abstract class MixinItemType
{
@Shadow
public abstract int getMaxDamage();
public int sp$getMaxDamage()
{
return getMaxDamage();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment