add mixin annotation processor to eclipse

This commit is contained in:
Matthew Messinger 2016-04-13 21:05:51 -04:00
parent 45ba3cb8df
commit bb5c99d5c7
2 changed files with 23 additions and 13 deletions

View file

@ -5,6 +5,10 @@ buildscript {
name 'forge'
url 'http://files.minecraftforge.net/maven'
}
maven {
name 'm2'
url 'https://plugins.gradle.org/m2'
}
maven {
name = 'sponge'
url = 'http://repo.spongepowered.org/maven'
@ -13,6 +17,7 @@ buildscript {
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:2.1-SNAPSHOT'
classpath 'org.spongepowered:mixingradle:0.4-SNAPSHOT'
classpath 'gradle.plugin.mnm.mods.kappa:ap-ide:1.0.5'
}
}
@ -20,6 +25,7 @@ ext.revision = 213
apply plugin: 'net.minecraftforge.gradle.liteloader'
apply plugin: 'org.spongepowered.mixin'
apply plugin: 'mnm.gradle.ap-ide'
group = 'com.brohoof.minelp'
version = '1.8.9.2'
@ -56,12 +62,12 @@ sourceSets {
//tweakClass = 'com.brohoof.minelittlepony.launch.MineLPTweaker'
//}
processResources {
def props = [
version: version,
mcversion: minecraft.version,
revision: revision
]
inputs.properties props
def props = [
version: version,
mcversion: minecraft.version,
revision: revision
]
inputs.properties props
from(sourceSets.main.resources.srcDirs) {
include 'litemod.json'
expand props
@ -71,11 +77,18 @@ processResources {
}
}
dependencies {
factory 'org.spongepowered:mixin:0.5.3-SNAPSHOT'
}
processor {
options.reobfSrgFile = project.tasks.genSrgs.mcpToSrg.path
}
jar {
from sourceSets.findAll { it.name != 'api' }*.output
}
mixin {
defaultObfuscationEnv notch
defaultObfuscationEnv notch
}
task deploy(type: Copy, dependsOn: build) {
from jar.archivePath

View file

@ -33,9 +33,6 @@ import net.minecraft.util.ResourceLocation;
@Mixin(RenderPlayer.class)
public abstract class MixinRenderPlayer extends RendererLivingEntity<AbstractClientPlayer> implements IRenderPony {
private static final String RenderManager = "Lnet/minecraft/client/renderer/entity/RenderManager;";
private static final String AbstractClientPlayer = "Lnet/minecraft/client/entity/AbstractClientPlayer;";
@Shadow
private boolean smallArms;
private PlayerModel playerModel;
@ -46,7 +43,7 @@ public abstract class MixinRenderPlayer extends RendererLivingEntity<AbstractCli
}
@Inject(
method = "<init>(" + RenderManager + "Z)V",
method = "<init>(" + "Lnet/minecraft/client/renderer/entity/RenderManager;" + "Z)V",
at = @At("RETURN") )
private void init(RenderManager renderManager, boolean useSmallArms, CallbackInfo ci) {
this.playerModel = smallArms ? PMAPI.ponySmall : PMAPI.pony;
@ -130,13 +127,13 @@ public abstract class MixinRenderPlayer extends RendererLivingEntity<AbstractCli
}
}
@Inject(method = "renderRightArm(" + AbstractClientPlayer + ")V", at = @At("HEAD") )
@Inject(method = "renderRightArm(Lnet/minecraft/client/entity/AbstractClientPlayer;)V", at = @At("HEAD") )
private void onRenderRightArm(AbstractClientPlayer player, CallbackInfo ci) {
updateModel(player);
bindEntityTexture(player);
}
@Inject(method = "renderLeftArm(" + AbstractClientPlayer + ")V", at = @At("HEAD") )
@Inject(method = "renderLeftArm(Lnet/minecraft/client/entity/AbstractClientPlayer;)V", at = @At("HEAD") )
private void onRenderLeftArm(AbstractClientPlayer player, CallbackInfo ci) {
updateModel(player);
bindEntityTexture(player);