mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2024-11-25 13:57:59 +01:00
Fix mixins for 0.7 and forge.
This commit is contained in:
parent
93f4418a83
commit
a8f6e29418
3 changed files with 8 additions and 15 deletions
|
@ -12,7 +12,7 @@ buildscript {
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
classpath 'net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT'
|
||||||
classpath 'org.spongepowered:mixingradle:0.4-SNAPSHOT'
|
classpath 'org.spongepowered:mixingradle:0.5-SNAPSHOT'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ apply plugin: 'net.minecraftforge.gradle.liteloader'
|
||||||
apply plugin: 'org.spongepowered.mixin'
|
apply plugin: 'org.spongepowered.mixin'
|
||||||
|
|
||||||
group = 'com.minelittlepony'
|
group = 'com.minelittlepony'
|
||||||
version = '1.12.0.2'
|
version = '1.12.0.3'
|
||||||
description = 'Mine Little Pony'
|
description = 'Mine Little Pony'
|
||||||
|
|
||||||
targetCompatibility = 1.8
|
targetCompatibility = 1.8
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Sat Jul 29 00:02:32 EDT 2017
|
#Tue Aug 08 16:45:16 EDT 2017
|
||||||
build.number=419
|
build.number=422
|
||||||
|
|
|
@ -27,7 +27,6 @@ import net.minecraft.util.ResourceLocation;
|
||||||
import org.objectweb.asm.Opcodes;
|
import org.objectweb.asm.Opcodes;
|
||||||
import org.spongepowered.asm.mixin.Final;
|
import org.spongepowered.asm.mixin.Final;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.Overwrite;
|
|
||||||
import org.spongepowered.asm.mixin.Shadow;
|
import org.spongepowered.asm.mixin.Shadow;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.At.Shift;
|
import org.spongepowered.asm.mixin.injection.At.Shift;
|
||||||
|
@ -35,8 +34,6 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
import javax.annotation.Nonnull;
|
|
||||||
|
|
||||||
@Mixin(RenderPlayer.class)
|
@Mixin(RenderPlayer.class)
|
||||||
public abstract class MixinRenderPlayer extends RenderLivingBase<AbstractClientPlayer> implements IRenderPony {
|
public abstract class MixinRenderPlayer extends RenderLivingBase<AbstractClientPlayer> implements IRenderPony {
|
||||||
|
|
||||||
|
@ -243,14 +240,10 @@ public abstract class MixinRenderPlayer extends RenderLivingBase<AbstractClientP
|
||||||
this.playerModel.apply(thePony.getMetadata());
|
this.playerModel.apply(thePony.getMetadata());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
@Redirect(
|
||||||
* @author killjoy
|
method = "getEntityTexture(Lnet/minecraft/client/entity/AbstractClientPlayer;)Lnet/minecraft/util/ResourceLocation;",
|
||||||
* @reason Support for background ponies and default pony skin
|
at = @At(value = "INVOKE", target = "Lnet/minecraft/client/entity/AbstractClientPlayer;getLocationSkin()Lnet/minecraft/util/ResourceLocation;"))
|
||||||
*/
|
private ResourceLocation redirectEntityTexture(AbstractClientPlayer player) {
|
||||||
@Overwrite
|
|
||||||
@Override
|
|
||||||
@Nonnull
|
|
||||||
public ResourceLocation getEntityTexture(AbstractClientPlayer player) {
|
|
||||||
Pony thePony = MineLittlePony.getInstance().getManager().getPony(player);
|
Pony thePony = MineLittlePony.getInstance().getManager().getPony(player);
|
||||||
return thePony.getTexture();
|
return thePony.getTexture();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue