Skip to content

Instantly share code, notes, and snippets.

@Deamon5550
Created December 20, 2014 05:19
Show Gist options
  • Save Deamon5550/6ecac09683eb7dd56492 to your computer and use it in GitHub Desktop.
Save Deamon5550/6ecac09683eb7dd56492 to your computer and use it in GitHub Desktop.
Mixin of like-named method
interface ItemType
{
int getMaxDamage();
}
class net.minecraft.src.Item
{
...
int getMaxDamage() //becomes func_24925_a
{
return this.maxDamage;
}
...
}
@Mixin(Item.class)
abstract class MixinItemType implements ItemType
{
@Shadow(prefix = "sp$")
public abstract int sp$getMaxDamage();
@Override
public int getMaxDamage()
{
return sp$getMaxDamage();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment