Created
December 20, 2014 05:19
-
-
Save Deamon5550/6ecac09683eb7dd56492 to your computer and use it in GitHub Desktop.
Mixin of like-named method
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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