mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 16:37:45 +00:00
Small change to RenderPlayer mixin
This commit is contained in:
1 parent
418bece268
commit
d04dab9f70
1 file changed
+7
-4
@@ -4,6 +4,9 @@ import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
import net.minecraft.client.renderer.entity.RendererLivingEntity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import noppes.npcs.controllers.data.AnimationData;
|
||||
import noppes.npcs.client.ClientCacheHandler;
|
||||
import noppes.npcs.constants.EnumAnimationPart;
|
||||
@@ -19,11 +22,11 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
public class MixinRenderPlayer {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Inject(method = "renderLivingAt", at = @At(value = "TAIL"))
|
||||
protected void modelDataRotations(AbstractClientPlayer p_77039_1_, double p_77039_2_, double p_77039_4_, double p_77039_6_, CallbackInfo callbackInfo)
|
||||
@Inject(method = "rotateCorpse*", at = @At(value = "TAIL"))
|
||||
protected void modelDataRotations(AbstractClientPlayer p_77043_1_, float p_77043_2_, float p_77043_3_, float p_77043_4_, CallbackInfo callbackInfo)
|
||||
{
|
||||
if (ClientCacheHandler.playerAnimations.containsKey(p_77039_1_.getUniqueID())) {
|
||||
AnimationData animData = ClientCacheHandler.playerAnimations.get(p_77039_1_.getUniqueID());
|
||||
if (ClientCacheHandler.playerAnimations.containsKey(p_77043_1_.getUniqueID())) {
|
||||
AnimationData animData = ClientCacheHandler.playerAnimations.get(p_77043_1_.getUniqueID());
|
||||
if (animData != null && animData.isActive()) {
|
||||
Frame frame = (Frame) animData.animation.currentFrame();
|
||||
if (frame.frameParts.containsKey(EnumAnimationPart.FULL_MODEL)) {
|
||||
|
||||
Reference in new issue
Block a user